@gainsnetwork/sdk 0.2.20-rc2 → 0.2.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/lib/constants.d.ts +2 -0
  2. package/lib/constants.js +3 -1
  3. package/lib/contracts/types/generated/GFarmTradingStorageV5.d.ts +1911 -0
  4. package/lib/contracts/types/generated/GFarmTradingStorageV5.js +2 -0
  5. package/lib/contracts/types/generated/GNSBorrowingFees.d.ts +1067 -0
  6. package/lib/contracts/types/generated/GNSBorrowingFees.js +2 -0
  7. package/lib/contracts/types/generated/GNSMultiCollatDiamond.d.ts +1131 -477
  8. package/lib/contracts/types/generated/GNSNftRewardsV6.d.ts +533 -0
  9. package/lib/contracts/types/generated/GNSNftRewardsV6.js +2 -0
  10. package/lib/contracts/types/generated/GNSNftRewardsV6_3_1.d.ts +613 -0
  11. package/lib/contracts/types/generated/GNSNftRewardsV6_3_1.js +2 -0
  12. package/lib/contracts/types/generated/GNSTrading.d.ts +758 -0
  13. package/lib/contracts/types/generated/GNSTrading.js +2 -0
  14. package/lib/contracts/types/generated/GNSTradingCallbacks.d.ts +875 -0
  15. package/lib/contracts/types/generated/GNSTradingCallbacks.js +2 -0
  16. package/lib/contracts/types/generated/GNSTradingStorage.d.ts +1387 -0
  17. package/lib/contracts/types/generated/GNSTradingStorage.js +2 -0
  18. package/lib/contracts/types/generated/factories/GFarmTradingStorageV5__factory.d.ts +83 -0
  19. package/lib/contracts/types/generated/factories/GFarmTradingStorageV5__factory.js +2691 -0
  20. package/lib/contracts/types/generated/factories/GNSBorrowingFees__factory.d.ts +124 -0
  21. package/lib/contracts/types/generated/factories/GNSBorrowingFees__factory.js +1784 -0
  22. package/lib/contracts/types/generated/factories/GNSMultiCollatDiamond__factory.d.ts +28 -81
  23. package/lib/contracts/types/generated/factories/GNSMultiCollatDiamond__factory.js +3174 -1417
  24. package/lib/contracts/types/generated/factories/GNSNftRewardsV6_3_1__factory.d.ts +100 -0
  25. package/lib/contracts/types/generated/factories/GNSNftRewardsV6_3_1__factory.js +1116 -0
  26. package/lib/contracts/types/generated/factories/GNSNftRewardsV6__factory.d.ts +100 -0
  27. package/lib/contracts/types/generated/factories/GNSNftRewardsV6__factory.js +1003 -0
  28. package/lib/contracts/types/generated/factories/GNSTradingCallbacks__factory.d.ts +113 -0
  29. package/lib/contracts/types/generated/factories/GNSTradingCallbacks__factory.js +1428 -0
  30. package/lib/contracts/types/generated/factories/GNSTradingStorage__factory.d.ts +96 -0
  31. package/lib/contracts/types/generated/factories/GNSTradingStorage__factory.js +2241 -0
  32. package/lib/contracts/types/generated/factories/GNSTrading__factory.d.ts +95 -0
  33. package/lib/contracts/types/generated/factories/GNSTrading__factory.js +1071 -0
  34. package/lib/contracts/types/index.d.ts +4 -0
  35. package/lib/contracts/types/index.js +6 -1
  36. package/lib/contracts/utils/openTrades.js +13 -2
  37. package/lib/trade/fees/borrowing/index.d.ts +0 -1
  38. package/lib/trade/fees/borrowing/index.js +9 -7
  39. package/lib/trade/liquidation.d.ts +6 -1
  40. package/lib/trade/liquidation.js +37 -3
  41. package/lib/trade/pnl.d.ts +4 -2
  42. package/lib/trade/pnl.js +4 -2
  43. package/lib/trade/spread.d.ts +18 -2
  44. package/lib/trade/spread.js +69 -8
  45. package/lib/trade/types.d.ts +17 -1
  46. package/package.json +1 -1
@@ -8,9 +8,7 @@ export declare class GNSMultiCollatDiamond__factory {
8
8
  type: string;
9
9
  name?: undefined;
10
10
  outputs?: undefined;
11
- constant?: undefined;
12
11
  signature?: undefined;
13
- payable?: undefined;
14
12
  anonymous?: undefined;
15
13
  } | {
16
14
  inputs: {
@@ -22,9 +20,7 @@ export declare class GNSMultiCollatDiamond__factory {
22
20
  type: string;
23
21
  stateMutability?: undefined;
24
22
  outputs?: undefined;
25
- constant?: undefined;
26
23
  signature?: undefined;
27
- payable?: undefined;
28
24
  anonymous?: undefined;
29
25
  } | {
30
26
  inputs: {
@@ -55,9 +51,7 @@ export declare class GNSMultiCollatDiamond__factory {
55
51
  }[];
56
52
  stateMutability: string;
57
53
  type: string;
58
- constant: boolean;
59
54
  signature: string;
60
- payable?: undefined;
61
55
  anonymous?: undefined;
62
56
  } | {
63
57
  inputs: ({
@@ -90,34 +84,24 @@ export declare class GNSMultiCollatDiamond__factory {
90
84
  stateMutability: string;
91
85
  type: string;
92
86
  signature: string;
93
- constant?: undefined;
94
- payable?: undefined;
95
87
  anonymous?: undefined;
96
88
  } | {
97
89
  inputs: {
98
- internalType: string;
99
- name: string;
100
- type: string;
101
- }[];
102
- name: string;
103
- outputs: {
104
- internalType: string;
105
- name: string;
106
- type: string;
107
- }[];
108
- stateMutability: string;
109
- type: string;
110
- signature: string;
111
- constant?: undefined;
112
- payable?: undefined;
113
- anonymous?: undefined;
114
- } | {
115
- inputs: {
116
- components: {
90
+ components: ({
91
+ components: {
92
+ internalType: string;
93
+ name: string;
94
+ type: string;
95
+ }[];
117
96
  internalType: string;
118
97
  name: string;
119
98
  type: string;
120
- }[];
99
+ } | {
100
+ internalType: string;
101
+ name: string;
102
+ type: string;
103
+ components?: undefined;
104
+ })[];
121
105
  internalType: string;
122
106
  name: string;
123
107
  type: string;
@@ -145,9 +129,7 @@ export declare class GNSMultiCollatDiamond__factory {
145
129
  }[];
146
130
  stateMutability: string;
147
131
  type: string;
148
- constant: boolean;
149
132
  signature: string;
150
- payable?: undefined;
151
133
  anonymous?: undefined;
152
134
  } | {
153
135
  inputs: ({
@@ -166,41 +148,33 @@ export declare class GNSMultiCollatDiamond__factory {
166
148
  components?: undefined;
167
149
  })[];
168
150
  name: string;
169
- outputs: {
151
+ outputs: ({
152
+ components: {
153
+ internalType: string;
154
+ name: string;
155
+ type: string;
156
+ }[];
170
157
  internalType: string;
171
158
  name: string;
172
159
  type: string;
173
- }[];
160
+ } | {
161
+ internalType: string;
162
+ name: string;
163
+ type: string;
164
+ components?: undefined;
165
+ })[];
174
166
  stateMutability: string;
175
167
  type: string;
176
- constant: boolean;
177
168
  signature: string;
178
- payable?: undefined;
179
169
  anonymous?: undefined;
180
170
  } | {
181
171
  inputs: {
182
172
  components: ({
183
- components: {
184
- internalType: string;
185
- name: string;
186
- type: string;
187
- }[];
188
- internalType: string;
189
- name: string;
190
- type: string;
191
- } | {
192
173
  internalType: string;
193
174
  name: string;
194
175
  type: string;
195
176
  components?: undefined;
196
- })[];
197
- internalType: string;
198
- name: string;
199
- type: string;
200
- }[];
201
- name: string;
202
- outputs: {
203
- components: ({
177
+ } | {
204
178
  components: {
205
179
  internalType: string;
206
180
  name: string;
@@ -209,45 +183,20 @@ export declare class GNSMultiCollatDiamond__factory {
209
183
  internalType: string;
210
184
  name: string;
211
185
  type: string;
212
- } | {
213
- internalType: string;
214
- name: string;
215
- type: string;
216
- components?: undefined;
217
186
  })[];
218
187
  internalType: string;
219
188
  name: string;
220
189
  type: string;
221
190
  }[];
222
- stateMutability: string;
223
- type: string;
224
- signature: string;
225
- constant?: undefined;
226
- payable?: undefined;
227
- anonymous?: undefined;
228
- } | {
229
- inputs: ({
230
- components: {
231
- internalType: string;
232
- name: string;
233
- type: string;
234
- }[];
235
- internalType: string;
236
- name: string;
237
- type: string;
238
- } | {
191
+ name: string;
192
+ outputs: {
239
193
  internalType: string;
240
194
  name: string;
241
195
  type: string;
242
- components?: undefined;
243
- })[];
244
- name: string;
245
- outputs: never[];
196
+ }[];
246
197
  stateMutability: string;
247
198
  type: string;
248
- payable: boolean;
249
199
  signature: string;
250
- constant?: undefined;
251
200
  anonymous?: undefined;
252
201
  } | {
253
202
  anonymous: boolean;
@@ -283,8 +232,6 @@ export declare class GNSMultiCollatDiamond__factory {
283
232
  signature: string;
284
233
  stateMutability?: undefined;
285
234
  outputs?: undefined;
286
- constant?: undefined;
287
- payable?: undefined;
288
235
  })[];
289
236
  static createInterface(): GNSMultiCollatDiamondInterface;
290
237
  static connect(address: string, signerOrProvider: Signer | Provider): GNSMultiCollatDiamond;