@katanaperps/katana-perps-sdk 2.0.0 → 2.1.0-alpha.1

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 (59) hide show
  1. package/dist/abis/ExchangeLayerZeroAdapter_v1.json +0 -5
  2. package/dist/abis/ExchangeLocalDepositAdapter_v1.json +318 -0
  3. package/dist/abis/ExchangeLoopbackAdapter_v1.json +300 -0
  4. package/dist/abis/FixedIncomeVaultProviderStateAggregator_v1.json +229 -0
  5. package/dist/abis/FixedIncomeVaultProvider_v1.json +2655 -0
  6. package/dist/abis/KatanaPerpsStargateForwarder_v1.json +1 -1
  7. package/dist/bridge/config.d.ts +2 -3
  8. package/dist/bridge/config.d.ts.map +1 -1
  9. package/dist/bridge/config.js +3 -4
  10. package/dist/bridge/deposit.d.ts +9 -2
  11. package/dist/bridge/deposit.d.ts.map +1 -1
  12. package/dist/bridge/deposit.js +60 -4
  13. package/dist/bridge/utils.d.ts +3 -3
  14. package/dist/bridge/utils.d.ts.map +1 -1
  15. package/dist/bridge/utils.js +17 -6
  16. package/dist/client/rest/authenticated.d.ts +17 -3
  17. package/dist/client/rest/authenticated.d.ts.map +1 -1
  18. package/dist/client/rest/authenticated.js +19 -12
  19. package/dist/typechain-types/ExchangeLayerZeroAdapter_v1.d.ts +2 -5
  20. package/dist/typechain-types/ExchangeLayerZeroAdapter_v1.d.ts.map +1 -1
  21. package/dist/typechain-types/ExchangeLocalDepositAdapter_v1.d.ts +210 -0
  22. package/dist/typechain-types/ExchangeLocalDepositAdapter_v1.d.ts.map +1 -0
  23. package/dist/typechain-types/ExchangeLocalDepositAdapter_v1.js +2 -0
  24. package/dist/typechain-types/ExchangeLoopbackAdapter_v1.d.ts +196 -0
  25. package/dist/typechain-types/ExchangeLoopbackAdapter_v1.d.ts.map +1 -0
  26. package/dist/typechain-types/ExchangeLoopbackAdapter_v1.js +2 -0
  27. package/dist/typechain-types/FixedIncomeVaultProviderStateAggregator_v1.d.ts +16 -16
  28. package/dist/typechain-types/FixedIncomeVaultProviderStateAggregator_v1.d.ts.map +1 -1
  29. package/dist/typechain-types/FixedIncomeVaultProvider_v1.d.ts +78 -100
  30. package/dist/typechain-types/FixedIncomeVaultProvider_v1.d.ts.map +1 -1
  31. package/dist/typechain-types/KatanaPerpsStargateForwarder_v1.d.ts +2 -2
  32. package/dist/typechain-types/KatanaPerpsStargateForwarder_v1.d.ts.map +1 -1
  33. package/dist/typechain-types/factories/ExchangeLayerZeroAdapter_v1__factory.d.ts +0 -4
  34. package/dist/typechain-types/factories/ExchangeLayerZeroAdapter_v1__factory.d.ts.map +1 -1
  35. package/dist/typechain-types/factories/ExchangeLayerZeroAdapter_v1__factory.js +0 -5
  36. package/dist/typechain-types/factories/ExchangeLocalDepositAdapter_v1__factory.d.ts +255 -0
  37. package/dist/typechain-types/factories/ExchangeLocalDepositAdapter_v1__factory.d.ts.map +1 -0
  38. package/dist/typechain-types/factories/ExchangeLocalDepositAdapter_v1__factory.js +335 -0
  39. package/dist/typechain-types/factories/ExchangeLoopbackAdapter_v1__factory.d.ts +241 -0
  40. package/dist/typechain-types/factories/ExchangeLoopbackAdapter_v1__factory.d.ts.map +1 -0
  41. package/dist/typechain-types/factories/ExchangeLoopbackAdapter_v1__factory.js +317 -0
  42. package/dist/typechain-types/factories/FixedIncomeVaultProviderStateAggregator_v1__factory.d.ts +16 -16
  43. package/dist/typechain-types/factories/FixedIncomeVaultProviderStateAggregator_v1__factory.js +21 -21
  44. package/dist/typechain-types/factories/FixedIncomeVaultProvider_v1__factory.d.ts +90 -113
  45. package/dist/typechain-types/factories/FixedIncomeVaultProvider_v1__factory.d.ts.map +1 -1
  46. package/dist/typechain-types/factories/FixedIncomeVaultProvider_v1__factory.js +106 -136
  47. package/dist/typechain-types/factories/KatanaPerpsStargateForwarder_v1__factory.d.ts +1 -1
  48. package/dist/typechain-types/factories/KatanaPerpsStargateForwarder_v1__factory.js +1 -1
  49. package/dist/typechain-types/factories/index.d.ts +4 -0
  50. package/dist/typechain-types/factories/index.d.ts.map +1 -1
  51. package/dist/typechain-types/factories/index.js +9 -1
  52. package/dist/typechain-types/index.d.ts +8 -0
  53. package/dist/typechain-types/index.d.ts.map +1 -1
  54. package/dist/typechain-types/index.js +9 -1
  55. package/dist/types/rest/endpoints/GetExchange.d.ts +44 -0
  56. package/dist/types/rest/endpoints/GetExchange.d.ts.map +1 -1
  57. package/dist/types/rest/endpoints/internal.d.ts +35 -0
  58. package/dist/types/rest/endpoints/internal.d.ts.map +1 -1
  59. package/package.json +1 -1
@@ -0,0 +1,317 @@
1
+ "use strict";
2
+ /* Autogenerated file. Do not edit manually. */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ExchangeLoopbackAdapter_v1__factory = void 0;
7
+ const ethers_1 = require("ethers");
8
+ const _abi = [
9
+ {
10
+ inputs: [
11
+ {
12
+ internalType: 'address',
13
+ name: 'exchange_',
14
+ type: 'address',
15
+ },
16
+ {
17
+ internalType: 'address',
18
+ name: 'exchangeManagedAccountDepositAdapter_',
19
+ type: 'address',
20
+ },
21
+ ],
22
+ stateMutability: 'nonpayable',
23
+ type: 'constructor',
24
+ },
25
+ {
26
+ inputs: [
27
+ {
28
+ internalType: 'address',
29
+ name: 'owner',
30
+ type: 'address',
31
+ },
32
+ ],
33
+ name: 'OwnableInvalidOwner',
34
+ type: 'error',
35
+ },
36
+ {
37
+ inputs: [
38
+ {
39
+ internalType: 'address',
40
+ name: 'account',
41
+ type: 'address',
42
+ },
43
+ ],
44
+ name: 'OwnableUnauthorizedAccount',
45
+ type: 'error',
46
+ },
47
+ {
48
+ anonymous: false,
49
+ inputs: [
50
+ {
51
+ indexed: false,
52
+ internalType: 'address',
53
+ name: 'depositorWallet',
54
+ type: 'address',
55
+ },
56
+ {
57
+ indexed: false,
58
+ internalType: 'uint256',
59
+ name: 'quantity',
60
+ type: 'uint256',
61
+ },
62
+ {
63
+ indexed: false,
64
+ internalType: 'bytes',
65
+ name: 'errorData',
66
+ type: 'bytes',
67
+ },
68
+ ],
69
+ name: 'ComposeFailed',
70
+ type: 'event',
71
+ },
72
+ {
73
+ anonymous: false,
74
+ inputs: [
75
+ {
76
+ indexed: false,
77
+ internalType: 'uint32',
78
+ name: 'sourceEndpointId',
79
+ type: 'uint32',
80
+ },
81
+ {
82
+ indexed: false,
83
+ internalType: 'address',
84
+ name: 'destinationWallet',
85
+ type: 'address',
86
+ },
87
+ {
88
+ indexed: false,
89
+ internalType: 'uint256',
90
+ name: 'quantity',
91
+ type: 'uint256',
92
+ },
93
+ ],
94
+ name: 'ComposeSucceeded',
95
+ type: 'event',
96
+ },
97
+ {
98
+ anonymous: false,
99
+ inputs: [
100
+ {
101
+ indexed: true,
102
+ internalType: 'address',
103
+ name: 'previousOwner',
104
+ type: 'address',
105
+ },
106
+ {
107
+ indexed: true,
108
+ internalType: 'address',
109
+ name: 'newOwner',
110
+ type: 'address',
111
+ },
112
+ ],
113
+ name: 'OwnershipTransferStarted',
114
+ type: 'event',
115
+ },
116
+ {
117
+ anonymous: false,
118
+ inputs: [
119
+ {
120
+ indexed: true,
121
+ internalType: 'address',
122
+ name: 'previousOwner',
123
+ type: 'address',
124
+ },
125
+ {
126
+ indexed: true,
127
+ internalType: 'address',
128
+ name: 'newOwner',
129
+ type: 'address',
130
+ },
131
+ ],
132
+ name: 'OwnershipTransferred',
133
+ type: 'event',
134
+ },
135
+ {
136
+ anonymous: false,
137
+ inputs: [
138
+ {
139
+ indexed: false,
140
+ internalType: 'address',
141
+ name: 'depositorWallet',
142
+ type: 'address',
143
+ },
144
+ {
145
+ indexed: false,
146
+ internalType: 'uint256',
147
+ name: 'quantity',
148
+ type: 'uint256',
149
+ },
150
+ {
151
+ indexed: false,
152
+ internalType: 'bytes',
153
+ name: 'payload',
154
+ type: 'bytes',
155
+ },
156
+ {
157
+ indexed: false,
158
+ internalType: 'bytes',
159
+ name: 'errorData',
160
+ type: 'bytes',
161
+ },
162
+ ],
163
+ name: 'WithdrawQuoteAssetFailed',
164
+ type: 'event',
165
+ },
166
+ {
167
+ inputs: [],
168
+ name: 'acceptOwnership',
169
+ outputs: [],
170
+ stateMutability: 'nonpayable',
171
+ type: 'function',
172
+ },
173
+ {
174
+ inputs: [],
175
+ name: 'exchange',
176
+ outputs: [
177
+ {
178
+ internalType: 'contract IExchange',
179
+ name: '',
180
+ type: 'address',
181
+ },
182
+ ],
183
+ stateMutability: 'view',
184
+ type: 'function',
185
+ },
186
+ {
187
+ inputs: [],
188
+ name: 'exchangeManagedAccountDepositAdapter',
189
+ outputs: [
190
+ {
191
+ internalType: 'contract IExchangeManagedAccountDepositAdapter',
192
+ name: '',
193
+ type: 'address',
194
+ },
195
+ ],
196
+ stateMutability: 'view',
197
+ type: 'function',
198
+ },
199
+ {
200
+ inputs: [],
201
+ name: 'isWithdrawEnabled',
202
+ outputs: [
203
+ {
204
+ internalType: 'bool',
205
+ name: '',
206
+ type: 'bool',
207
+ },
208
+ ],
209
+ stateMutability: 'view',
210
+ type: 'function',
211
+ },
212
+ {
213
+ inputs: [],
214
+ name: 'owner',
215
+ outputs: [
216
+ {
217
+ internalType: 'address',
218
+ name: '',
219
+ type: 'address',
220
+ },
221
+ ],
222
+ stateMutability: 'view',
223
+ type: 'function',
224
+ },
225
+ {
226
+ inputs: [],
227
+ name: 'pendingOwner',
228
+ outputs: [
229
+ {
230
+ internalType: 'address',
231
+ name: '',
232
+ type: 'address',
233
+ },
234
+ ],
235
+ stateMutability: 'view',
236
+ type: 'function',
237
+ },
238
+ {
239
+ inputs: [],
240
+ name: 'quoteAsset',
241
+ outputs: [
242
+ {
243
+ internalType: 'contract IERC20',
244
+ name: '',
245
+ type: 'address',
246
+ },
247
+ ],
248
+ stateMutability: 'view',
249
+ type: 'function',
250
+ },
251
+ {
252
+ inputs: [],
253
+ name: 'renounceOwnership',
254
+ outputs: [],
255
+ stateMutability: 'nonpayable',
256
+ type: 'function',
257
+ },
258
+ {
259
+ inputs: [
260
+ {
261
+ internalType: 'bool',
262
+ name: 'isEnabled',
263
+ type: 'bool',
264
+ },
265
+ ],
266
+ name: 'setWithdrawEnabled',
267
+ outputs: [],
268
+ stateMutability: 'nonpayable',
269
+ type: 'function',
270
+ },
271
+ {
272
+ inputs: [
273
+ {
274
+ internalType: 'address',
275
+ name: 'newOwner',
276
+ type: 'address',
277
+ },
278
+ ],
279
+ name: 'transferOwnership',
280
+ outputs: [],
281
+ stateMutability: 'nonpayable',
282
+ type: 'function',
283
+ },
284
+ {
285
+ inputs: [
286
+ {
287
+ internalType: 'address',
288
+ name: 'depositorWallet',
289
+ type: 'address',
290
+ },
291
+ {
292
+ internalType: 'uint256',
293
+ name: 'quantity',
294
+ type: 'uint256',
295
+ },
296
+ {
297
+ internalType: 'bytes',
298
+ name: 'payload',
299
+ type: 'bytes',
300
+ },
301
+ ],
302
+ name: 'withdrawQuoteAsset',
303
+ outputs: [],
304
+ stateMutability: 'nonpayable',
305
+ type: 'function',
306
+ },
307
+ ];
308
+ class ExchangeLoopbackAdapter_v1__factory {
309
+ static abi = _abi;
310
+ static createInterface() {
311
+ return new ethers_1.Interface(_abi);
312
+ }
313
+ static connect(address, runner) {
314
+ return new ethers_1.Contract(address, _abi, runner);
315
+ }
316
+ }
317
+ exports.ExchangeLoopbackAdapter_v1__factory = ExchangeLoopbackAdapter_v1__factory;
@@ -19,6 +19,20 @@ export declare class FixedIncomeVaultProviderStateAggregator_v1__factory {
19
19
  }];
20
20
  readonly stateMutability: "view";
21
21
  readonly type: "function";
22
+ }, {
23
+ readonly inputs: readonly [{
24
+ readonly internalType: "address[]";
25
+ readonly name: "managerWallets";
26
+ readonly type: "address[]";
27
+ }];
28
+ readonly name: "loadTotalQuantitiesOwedByVaults";
29
+ readonly outputs: readonly [{
30
+ readonly internalType: "uint64[]";
31
+ readonly name: "loadTotalQuantitiesOwedByVaultsResults";
32
+ readonly type: "uint64[]";
33
+ }];
34
+ readonly stateMutability: "view";
35
+ readonly type: "function";
22
36
  }, {
23
37
  readonly inputs: readonly [{
24
38
  readonly internalType: "address";
@@ -53,7 +67,7 @@ export declare class FixedIncomeVaultProviderStateAggregator_v1__factory {
53
67
  readonly type: "uint64";
54
68
  }, {
55
69
  readonly internalType: "uint64";
56
- readonly name: "minimumUnappliedWithdrawalAgeInSToInitiateExit";
70
+ readonly name: "minimumUnappliedDepositOrWithdrawalAgeInSToInitiateExit";
57
71
  readonly type: "uint64";
58
72
  }, {
59
73
  readonly internalType: "uint64";
@@ -132,20 +146,6 @@ export declare class FixedIncomeVaultProviderStateAggregator_v1__factory {
132
146
  }];
133
147
  readonly stateMutability: "view";
134
148
  readonly type: "function";
135
- }, {
136
- readonly inputs: readonly [{
137
- readonly internalType: "address[]";
138
- readonly name: "managerWallets";
139
- readonly type: "address[]";
140
- }];
141
- readonly name: "loadVaultDeposits";
142
- readonly outputs: readonly [{
143
- readonly internalType: "uint64[]";
144
- readonly name: "loadVaultDepositsResults";
145
- readonly type: "uint64[]";
146
- }];
147
- readonly stateMutability: "view";
148
- readonly type: "function";
149
149
  }, {
150
150
  readonly inputs: readonly [{
151
151
  readonly internalType: "address";
@@ -167,7 +167,7 @@ export declare class FixedIncomeVaultProviderStateAggregator_v1__factory {
167
167
  readonly name: "grossQuantity";
168
168
  readonly type: "uint64";
169
169
  }];
170
- readonly internalType: "struct LoadVaultWithdrawalQueueResult[]";
170
+ readonly internalType: "struct VaultWithdrawQueueItem[]";
171
171
  readonly name: "loadVaultWithdrawalQueueResults";
172
172
  readonly type: "tuple[]";
173
173
  }];
@@ -30,6 +30,25 @@ const _abi = [
30
30
  stateMutability: 'view',
31
31
  type: 'function',
32
32
  },
33
+ {
34
+ inputs: [
35
+ {
36
+ internalType: 'address[]',
37
+ name: 'managerWallets',
38
+ type: 'address[]',
39
+ },
40
+ ],
41
+ name: 'loadTotalQuantitiesOwedByVaults',
42
+ outputs: [
43
+ {
44
+ internalType: 'uint64[]',
45
+ name: 'loadTotalQuantitiesOwedByVaultsResults',
46
+ type: 'uint64[]',
47
+ },
48
+ ],
49
+ stateMutability: 'view',
50
+ type: 'function',
51
+ },
33
52
  {
34
53
  inputs: [
35
54
  {
@@ -74,7 +93,7 @@ const _abi = [
74
93
  },
75
94
  {
76
95
  internalType: 'uint64',
77
- name: 'minimumUnappliedWithdrawalAgeInSToInitiateExit',
96
+ name: 'minimumUnappliedDepositOrWithdrawalAgeInSToInitiateExit',
78
97
  type: 'uint64',
79
98
  },
80
99
  {
@@ -178,25 +197,6 @@ const _abi = [
178
197
  stateMutability: 'view',
179
198
  type: 'function',
180
199
  },
181
- {
182
- inputs: [
183
- {
184
- internalType: 'address[]',
185
- name: 'managerWallets',
186
- type: 'address[]',
187
- },
188
- ],
189
- name: 'loadVaultDeposits',
190
- outputs: [
191
- {
192
- internalType: 'uint64[]',
193
- name: 'loadVaultDepositsResults',
194
- type: 'uint64[]',
195
- },
196
- ],
197
- stateMutability: 'view',
198
- type: 'function',
199
- },
200
200
  {
201
201
  inputs: [
202
202
  {
@@ -225,7 +225,7 @@ const _abi = [
225
225
  type: 'uint64',
226
226
  },
227
227
  ],
228
- internalType: 'struct LoadVaultWithdrawalQueueResult[]',
228
+ internalType: 'struct VaultWithdrawQueueItem[]',
229
229
  name: 'loadVaultWithdrawalQueueResults',
230
230
  type: 'tuple[]',
231
231
  },