@neutral-trade/sdk 0.2.5 → 0.2.6
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.
- package/README.md +49 -0
- package/dist/index.d.mts +254 -2243
- package/dist/index.mjs +308 -2574
- package/package.json +3 -5
package/dist/index.d.mts
CHANGED
|
@@ -1,2081 +1,20 @@
|
|
|
1
|
-
import { AnchorProvider,
|
|
2
|
-
import { AnchorProvider as AnchorProvider$1, IdlAccounts as IdlAccounts$1, Program as Program$1 } from "@coral-xyz/anchor-32";
|
|
1
|
+
import { AnchorProvider, IdlAccounts, Program, Wallet } from "@coral-xyz/anchor";
|
|
3
2
|
import { Connection, PublicKey, TransactionInstruction } from "@solana/web3.js";
|
|
4
3
|
import { z } from "zod";
|
|
4
|
+
import BN from "bn.js";
|
|
5
5
|
|
|
6
6
|
//#region src/constants/client.d.ts
|
|
7
7
|
declare function createDummyWallet(): Wallet;
|
|
8
|
-
declare function createConnection(rpcUrl: string): Connection;
|
|
9
|
-
declare function createAnchorProviderV29(connection: Connection, wallet?: Wallet): AnchorProvider;
|
|
10
|
-
declare function createAnchorProviderV32(connection: Connection, wallet?: Wallet): AnchorProvider$1;
|
|
11
8
|
//#endregion
|
|
12
|
-
//#region src/
|
|
13
|
-
declare enum SupportedChain {
|
|
14
|
-
Solana = "Solana",
|
|
15
|
-
Hyperliquid = "Hyperliquid",
|
|
16
|
-
}
|
|
17
|
-
declare enum SupportedToken {
|
|
18
|
-
USDC = "USDC",
|
|
19
|
-
USDT = "USDT",
|
|
20
|
-
SOL = "SOL",
|
|
21
|
-
WBTC = "WBTC",
|
|
22
|
-
WETH = "WETH",
|
|
23
|
-
JLP = "JLP",
|
|
24
|
-
}
|
|
25
|
-
interface Token {
|
|
26
|
-
name: string;
|
|
27
|
-
symbol: string;
|
|
28
|
-
onChain: { [chain in SupportedChain]: {
|
|
29
|
-
address: string;
|
|
30
|
-
decimals: number;
|
|
31
|
-
} | null };
|
|
32
|
-
}
|
|
33
|
-
declare const tokens: { [name in SupportedToken]: Token };
|
|
34
|
-
//#endregion
|
|
35
|
-
//#region src/idl/bundle-v1.d.ts
|
|
36
|
-
interface NtbundleV1 {
|
|
37
|
-
version: '0.1.0';
|
|
38
|
-
name: 'ntbundle';
|
|
39
|
-
instructions: [{
|
|
40
|
-
name: 'initializeBundleMasterAccount';
|
|
41
|
-
accounts: [{
|
|
42
|
-
name: 'admin';
|
|
43
|
-
isMut: true;
|
|
44
|
-
isSigner: true;
|
|
45
|
-
}, {
|
|
46
|
-
name: 'bundleMasterAccount';
|
|
47
|
-
isMut: true;
|
|
48
|
-
isSigner: false;
|
|
49
|
-
}, {
|
|
50
|
-
name: 'systemProgram';
|
|
51
|
-
isMut: false;
|
|
52
|
-
isSigner: false;
|
|
53
|
-
}];
|
|
54
|
-
args: [];
|
|
55
|
-
}, {
|
|
56
|
-
name: 'changeBundleMasterAdmin';
|
|
57
|
-
accounts: [{
|
|
58
|
-
name: 'admin';
|
|
59
|
-
isMut: true;
|
|
60
|
-
isSigner: true;
|
|
61
|
-
}, {
|
|
62
|
-
name: 'bundleMasterAccount';
|
|
63
|
-
isMut: true;
|
|
64
|
-
isSigner: false;
|
|
65
|
-
}];
|
|
66
|
-
args: [{
|
|
67
|
-
name: 'newAdmin';
|
|
68
|
-
type: 'publicKey';
|
|
69
|
-
}];
|
|
70
|
-
}, {
|
|
71
|
-
name: 'setBundleCreator';
|
|
72
|
-
accounts: [{
|
|
73
|
-
name: 'admin';
|
|
74
|
-
isMut: true;
|
|
75
|
-
isSigner: true;
|
|
76
|
-
}, {
|
|
77
|
-
name: 'bundleMasterAccount';
|
|
78
|
-
isMut: false;
|
|
79
|
-
isSigner: false;
|
|
80
|
-
}, {
|
|
81
|
-
name: 'creator';
|
|
82
|
-
isMut: false;
|
|
83
|
-
isSigner: false;
|
|
84
|
-
docs: ['CHECK safe as only the pubkey is read'];
|
|
85
|
-
}, {
|
|
86
|
-
name: 'bundleCreatorAccount';
|
|
87
|
-
isMut: true;
|
|
88
|
-
isSigner: false;
|
|
89
|
-
}, {
|
|
90
|
-
name: 'systemProgram';
|
|
91
|
-
isMut: false;
|
|
92
|
-
isSigner: false;
|
|
93
|
-
}];
|
|
94
|
-
args: [{
|
|
95
|
-
name: 'allowed';
|
|
96
|
-
type: 'bool';
|
|
97
|
-
}];
|
|
98
|
-
}, {
|
|
99
|
-
name: 'initializeBundle';
|
|
100
|
-
accounts: [{
|
|
101
|
-
name: 'creator';
|
|
102
|
-
isMut: true;
|
|
103
|
-
isSigner: true;
|
|
104
|
-
}, {
|
|
105
|
-
name: 'bundleCreatorAccount';
|
|
106
|
-
isMut: false;
|
|
107
|
-
isSigner: false;
|
|
108
|
-
}, {
|
|
109
|
-
name: 'systemProgram';
|
|
110
|
-
isMut: false;
|
|
111
|
-
isSigner: false;
|
|
112
|
-
}, {
|
|
113
|
-
name: 'treasuryAccount';
|
|
114
|
-
isMut: true;
|
|
115
|
-
isSigner: false;
|
|
116
|
-
}, {
|
|
117
|
-
name: 'assetAddress';
|
|
118
|
-
isMut: true;
|
|
119
|
-
isSigner: false;
|
|
120
|
-
}, {
|
|
121
|
-
name: 'bundleAccount';
|
|
122
|
-
isMut: true;
|
|
123
|
-
isSigner: false;
|
|
124
|
-
}, {
|
|
125
|
-
name: 'bundleTempData';
|
|
126
|
-
isMut: true;
|
|
127
|
-
isSigner: false;
|
|
128
|
-
}, {
|
|
129
|
-
name: 'oracleData';
|
|
130
|
-
isMut: true;
|
|
131
|
-
isSigner: false;
|
|
132
|
-
}];
|
|
133
|
-
args: [{
|
|
134
|
-
name: 'name';
|
|
135
|
-
type: {
|
|
136
|
-
array: ['u8', 32];
|
|
137
|
-
};
|
|
138
|
-
}, {
|
|
139
|
-
name: 'keeper';
|
|
140
|
-
type: 'publicKey';
|
|
141
|
-
}, {
|
|
142
|
-
name: 'depositFee';
|
|
143
|
-
type: 'u32';
|
|
144
|
-
}, {
|
|
145
|
-
name: 'withdrawalFee';
|
|
146
|
-
type: 'u32';
|
|
147
|
-
}, {
|
|
148
|
-
name: 'performanceFee';
|
|
149
|
-
type: 'u32';
|
|
150
|
-
}, {
|
|
151
|
-
name: 'managementFeeBps';
|
|
152
|
-
type: 'u32';
|
|
153
|
-
}, {
|
|
154
|
-
name: 'oracleBuffer';
|
|
155
|
-
type: 'u64';
|
|
156
|
-
}, {
|
|
157
|
-
name: 'maxDepositAmount';
|
|
158
|
-
type: 'u64';
|
|
159
|
-
}, {
|
|
160
|
-
name: 'withdrawalDelay';
|
|
161
|
-
type: 'u64';
|
|
162
|
-
}, {
|
|
163
|
-
name: 'withdrawalTMin';
|
|
164
|
-
type: 'i64';
|
|
165
|
-
}, {
|
|
166
|
-
name: 'withdrawalTMax';
|
|
167
|
-
type: 'i64';
|
|
168
|
-
}, {
|
|
169
|
-
name: 'withdrawalCurve';
|
|
170
|
-
type: 'f32';
|
|
171
|
-
}, {
|
|
172
|
-
name: 'permissionned';
|
|
173
|
-
type: 'bool';
|
|
174
|
-
}];
|
|
175
|
-
}, {
|
|
176
|
-
name: 'initializeBundleDepositor';
|
|
177
|
-
accounts: [{
|
|
178
|
-
name: 'payer';
|
|
179
|
-
isMut: true;
|
|
180
|
-
isSigner: true;
|
|
181
|
-
}, {
|
|
182
|
-
name: 'authority';
|
|
183
|
-
isMut: true;
|
|
184
|
-
isSigner: true;
|
|
185
|
-
}, {
|
|
186
|
-
name: 'systemProgram';
|
|
187
|
-
isMut: false;
|
|
188
|
-
isSigner: false;
|
|
189
|
-
}, {
|
|
190
|
-
name: 'bundleAccount';
|
|
191
|
-
isMut: true;
|
|
192
|
-
isSigner: false;
|
|
193
|
-
}, {
|
|
194
|
-
name: 'userBundleAccount';
|
|
195
|
-
isMut: true;
|
|
196
|
-
isSigner: false;
|
|
197
|
-
docs: ['each user gets one UserBundleAccount account; it will be created if it doesn\'t exist.'];
|
|
198
|
-
}];
|
|
199
|
-
args: [];
|
|
200
|
-
}, {
|
|
201
|
-
name: 'initializePermissionedBundleDepositor';
|
|
202
|
-
accounts: [{
|
|
203
|
-
name: 'payer';
|
|
204
|
-
isMut: true;
|
|
205
|
-
isSigner: true;
|
|
206
|
-
}, {
|
|
207
|
-
name: 'authority';
|
|
208
|
-
isMut: true;
|
|
209
|
-
isSigner: false;
|
|
210
|
-
}, {
|
|
211
|
-
name: 'systemProgram';
|
|
212
|
-
isMut: false;
|
|
213
|
-
isSigner: false;
|
|
214
|
-
}, {
|
|
215
|
-
name: 'bundleAccount';
|
|
216
|
-
isMut: true;
|
|
217
|
-
isSigner: false;
|
|
218
|
-
}, {
|
|
219
|
-
name: 'userBundleAccount';
|
|
220
|
-
isMut: true;
|
|
221
|
-
isSigner: false;
|
|
222
|
-
docs: ['each user gets one UserBundleAccount account; it will be created if it doesn\'t exist.'];
|
|
223
|
-
}];
|
|
224
|
-
args: [];
|
|
225
|
-
}, {
|
|
226
|
-
name: 'setOracleBuffer';
|
|
227
|
-
accounts: [{
|
|
228
|
-
name: 'manager';
|
|
229
|
-
isMut: true;
|
|
230
|
-
isSigner: true;
|
|
231
|
-
}, {
|
|
232
|
-
name: 'bundleAccount';
|
|
233
|
-
isMut: true;
|
|
234
|
-
isSigner: false;
|
|
235
|
-
}];
|
|
236
|
-
args: [{
|
|
237
|
-
name: 'oracleBuffer';
|
|
238
|
-
type: 'u64';
|
|
239
|
-
}];
|
|
240
|
-
}, {
|
|
241
|
-
name: 'setDelays';
|
|
242
|
-
accounts: [{
|
|
243
|
-
name: 'manager';
|
|
244
|
-
isMut: true;
|
|
245
|
-
isSigner: true;
|
|
246
|
-
}, {
|
|
247
|
-
name: 'bundleAccount';
|
|
248
|
-
isMut: true;
|
|
249
|
-
isSigner: false;
|
|
250
|
-
}];
|
|
251
|
-
args: [{
|
|
252
|
-
name: 'withdrawalDelay';
|
|
253
|
-
type: 'u64';
|
|
254
|
-
}, {
|
|
255
|
-
name: 'withdrawalTMin';
|
|
256
|
-
type: 'i64';
|
|
257
|
-
}, {
|
|
258
|
-
name: 'withdrawalTMax';
|
|
259
|
-
type: 'i64';
|
|
260
|
-
}, {
|
|
261
|
-
name: 'withdrawalCurve';
|
|
262
|
-
type: 'f32';
|
|
263
|
-
}];
|
|
264
|
-
}, {
|
|
265
|
-
name: 'setMaxDepositAmount';
|
|
266
|
-
accounts: [{
|
|
267
|
-
name: 'manager';
|
|
268
|
-
isMut: true;
|
|
269
|
-
isSigner: true;
|
|
270
|
-
}, {
|
|
271
|
-
name: 'bundleAccount';
|
|
272
|
-
isMut: true;
|
|
273
|
-
isSigner: false;
|
|
274
|
-
}];
|
|
275
|
-
args: [{
|
|
276
|
-
name: 'maxDepositAmount';
|
|
277
|
-
type: 'u64';
|
|
278
|
-
}];
|
|
279
|
-
}, {
|
|
280
|
-
name: 'setKeeper';
|
|
281
|
-
accounts: [{
|
|
282
|
-
name: 'manager';
|
|
283
|
-
isMut: true;
|
|
284
|
-
isSigner: true;
|
|
285
|
-
}, {
|
|
286
|
-
name: 'bundleAccount';
|
|
287
|
-
isMut: true;
|
|
288
|
-
isSigner: false;
|
|
289
|
-
}];
|
|
290
|
-
args: [{
|
|
291
|
-
name: 'newkeeper';
|
|
292
|
-
type: 'publicKey';
|
|
293
|
-
}];
|
|
294
|
-
}, {
|
|
295
|
-
name: 'addStrategy';
|
|
296
|
-
accounts: [{
|
|
297
|
-
name: 'manager';
|
|
298
|
-
isMut: true;
|
|
299
|
-
isSigner: true;
|
|
300
|
-
}, {
|
|
301
|
-
name: 'strategyAccount';
|
|
302
|
-
isMut: true;
|
|
303
|
-
isSigner: false;
|
|
304
|
-
}, {
|
|
305
|
-
name: 'bundleAccount';
|
|
306
|
-
isMut: true;
|
|
307
|
-
isSigner: false;
|
|
308
|
-
}, {
|
|
309
|
-
name: 'receiverAddress';
|
|
310
|
-
isMut: true;
|
|
311
|
-
isSigner: false;
|
|
312
|
-
}, {
|
|
313
|
-
name: 'systemProgram';
|
|
314
|
-
isMut: false;
|
|
315
|
-
isSigner: false;
|
|
316
|
-
}];
|
|
317
|
-
args: [{
|
|
318
|
-
name: 'allocationBps';
|
|
319
|
-
type: 'u32';
|
|
320
|
-
}];
|
|
321
|
-
}, {
|
|
322
|
-
name: 'removeStrategy';
|
|
323
|
-
accounts: [{
|
|
324
|
-
name: 'manager';
|
|
325
|
-
isMut: true;
|
|
326
|
-
isSigner: true;
|
|
327
|
-
}, {
|
|
328
|
-
name: 'strategyAccount';
|
|
329
|
-
isMut: true;
|
|
330
|
-
isSigner: false;
|
|
331
|
-
}, {
|
|
332
|
-
name: 'bundleAccount';
|
|
333
|
-
isMut: true;
|
|
334
|
-
isSigner: false;
|
|
335
|
-
}, {
|
|
336
|
-
name: 'receiverAddress';
|
|
337
|
-
isMut: true;
|
|
338
|
-
isSigner: false;
|
|
339
|
-
}, {
|
|
340
|
-
name: 'systemProgram';
|
|
341
|
-
isMut: false;
|
|
342
|
-
isSigner: false;
|
|
343
|
-
}];
|
|
344
|
-
args: [];
|
|
345
|
-
}, {
|
|
346
|
-
name: 'enableStrategy';
|
|
347
|
-
accounts: [{
|
|
348
|
-
name: 'manager';
|
|
349
|
-
isMut: true;
|
|
350
|
-
isSigner: true;
|
|
351
|
-
}, {
|
|
352
|
-
name: 'strategyAccount';
|
|
353
|
-
isMut: true;
|
|
354
|
-
isSigner: false;
|
|
355
|
-
}, {
|
|
356
|
-
name: 'bundleAccount';
|
|
357
|
-
isMut: true;
|
|
358
|
-
isSigner: false;
|
|
359
|
-
}, {
|
|
360
|
-
name: 'receiverAddress';
|
|
361
|
-
isMut: true;
|
|
362
|
-
isSigner: false;
|
|
363
|
-
}, {
|
|
364
|
-
name: 'systemProgram';
|
|
365
|
-
isMut: false;
|
|
366
|
-
isSigner: false;
|
|
367
|
-
}];
|
|
368
|
-
args: [];
|
|
369
|
-
}, {
|
|
370
|
-
name: 'updateAllocations';
|
|
371
|
-
accounts: [{
|
|
372
|
-
name: 'manager';
|
|
373
|
-
isMut: true;
|
|
374
|
-
isSigner: true;
|
|
375
|
-
}, {
|
|
376
|
-
name: 'receiverAddress';
|
|
377
|
-
isMut: true;
|
|
378
|
-
isSigner: false;
|
|
379
|
-
}, {
|
|
380
|
-
name: 'bundleAccount';
|
|
381
|
-
isMut: true;
|
|
382
|
-
isSigner: false;
|
|
383
|
-
}, {
|
|
384
|
-
name: 'strategyAccount';
|
|
385
|
-
isMut: true;
|
|
386
|
-
isSigner: false;
|
|
387
|
-
}];
|
|
388
|
-
args: [{
|
|
389
|
-
name: 'newAllocationBps';
|
|
390
|
-
type: 'u32';
|
|
391
|
-
}];
|
|
392
|
-
}, {
|
|
393
|
-
name: 'changeManager';
|
|
394
|
-
accounts: [{
|
|
395
|
-
name: 'manager';
|
|
396
|
-
isMut: true;
|
|
397
|
-
isSigner: true;
|
|
398
|
-
}, {
|
|
399
|
-
name: 'bundleAccount';
|
|
400
|
-
isMut: true;
|
|
401
|
-
isSigner: false;
|
|
402
|
-
}];
|
|
403
|
-
args: [{
|
|
404
|
-
name: 'newManager';
|
|
405
|
-
type: 'publicKey';
|
|
406
|
-
}];
|
|
407
|
-
}, {
|
|
408
|
-
name: 'setFees';
|
|
409
|
-
accounts: [{
|
|
410
|
-
name: 'manager';
|
|
411
|
-
isMut: true;
|
|
412
|
-
isSigner: true;
|
|
413
|
-
}, {
|
|
414
|
-
name: 'bundleAccount';
|
|
415
|
-
isMut: true;
|
|
416
|
-
isSigner: false;
|
|
417
|
-
}];
|
|
418
|
-
args: [{
|
|
419
|
-
name: 'treasury';
|
|
420
|
-
type: 'publicKey';
|
|
421
|
-
}, {
|
|
422
|
-
name: 'depositFee';
|
|
423
|
-
type: 'u32';
|
|
424
|
-
}, {
|
|
425
|
-
name: 'withdrawalFee';
|
|
426
|
-
type: 'u32';
|
|
427
|
-
}, {
|
|
428
|
-
name: 'performanceFee';
|
|
429
|
-
type: 'u32';
|
|
430
|
-
}, {
|
|
431
|
-
name: 'managementFeeBps';
|
|
432
|
-
type: 'u32';
|
|
433
|
-
}];
|
|
434
|
-
}, {
|
|
435
|
-
name: 'updateOracle';
|
|
436
|
-
accounts: [{
|
|
437
|
-
name: 'keeper';
|
|
438
|
-
isMut: true;
|
|
439
|
-
isSigner: true;
|
|
440
|
-
}, {
|
|
441
|
-
name: 'bundleAccount';
|
|
442
|
-
isMut: true;
|
|
443
|
-
isSigner: false;
|
|
444
|
-
}, {
|
|
445
|
-
name: 'bundleTempData';
|
|
446
|
-
isMut: true;
|
|
447
|
-
isSigner: false;
|
|
448
|
-
}, {
|
|
449
|
-
name: 'oracleData';
|
|
450
|
-
isMut: true;
|
|
451
|
-
isSigner: false;
|
|
452
|
-
}];
|
|
453
|
-
args: [{
|
|
454
|
-
name: 'newEquity';
|
|
455
|
-
type: 'u64';
|
|
456
|
-
}];
|
|
457
|
-
}, {
|
|
458
|
-
name: 'applyFeesToUser';
|
|
459
|
-
accounts: [{
|
|
460
|
-
name: 'keeper';
|
|
461
|
-
isMut: true;
|
|
462
|
-
isSigner: true;
|
|
463
|
-
}, {
|
|
464
|
-
name: 'userBundleAccountOwner';
|
|
465
|
-
isMut: true;
|
|
466
|
-
isSigner: false;
|
|
467
|
-
}, {
|
|
468
|
-
name: 'userBundleAccount';
|
|
469
|
-
isMut: true;
|
|
470
|
-
isSigner: false;
|
|
471
|
-
}, {
|
|
472
|
-
name: 'bundleAccount';
|
|
473
|
-
isMut: true;
|
|
474
|
-
isSigner: false;
|
|
475
|
-
}, {
|
|
476
|
-
name: 'oracleData';
|
|
477
|
-
isMut: true;
|
|
478
|
-
isSigner: false;
|
|
479
|
-
}, {
|
|
480
|
-
name: 'bundleAssetAuthority';
|
|
481
|
-
isMut: true;
|
|
482
|
-
isSigner: false;
|
|
483
|
-
}];
|
|
484
|
-
args: [];
|
|
485
|
-
}, {
|
|
486
|
-
name: 'managerWithdraw';
|
|
487
|
-
accounts: [{
|
|
488
|
-
name: 'manager';
|
|
489
|
-
isMut: true;
|
|
490
|
-
isSigner: true;
|
|
491
|
-
}, {
|
|
492
|
-
name: 'managerTokenAccount';
|
|
493
|
-
isMut: true;
|
|
494
|
-
isSigner: false;
|
|
495
|
-
}, {
|
|
496
|
-
name: 'assetAddress';
|
|
497
|
-
isMut: true;
|
|
498
|
-
isSigner: false;
|
|
499
|
-
}, {
|
|
500
|
-
name: 'bundleAssetAccount';
|
|
501
|
-
isMut: true;
|
|
502
|
-
isSigner: false;
|
|
503
|
-
}, {
|
|
504
|
-
name: 'bundleAccount';
|
|
505
|
-
isMut: true;
|
|
506
|
-
isSigner: false;
|
|
507
|
-
}, {
|
|
508
|
-
name: 'oracleData';
|
|
509
|
-
isMut: true;
|
|
510
|
-
isSigner: false;
|
|
511
|
-
}, {
|
|
512
|
-
name: 'bundleAssetAuthority';
|
|
513
|
-
isMut: true;
|
|
514
|
-
isSigner: false;
|
|
515
|
-
}, {
|
|
516
|
-
name: 'tokenProgram';
|
|
517
|
-
isMut: false;
|
|
518
|
-
isSigner: false;
|
|
519
|
-
}];
|
|
520
|
-
args: [];
|
|
521
|
-
}, {
|
|
522
|
-
name: 'netPendingTransactions';
|
|
523
|
-
accounts: [{
|
|
524
|
-
name: 'keeper';
|
|
525
|
-
isMut: true;
|
|
526
|
-
isSigner: true;
|
|
527
|
-
}, {
|
|
528
|
-
name: 'bundleAccount';
|
|
529
|
-
isMut: true;
|
|
530
|
-
isSigner: false;
|
|
531
|
-
}, {
|
|
532
|
-
name: 'pendingDepositTokenAccount';
|
|
533
|
-
isMut: true;
|
|
534
|
-
isSigner: false;
|
|
535
|
-
}, {
|
|
536
|
-
name: 'bundleAssetAccount';
|
|
537
|
-
isMut: true;
|
|
538
|
-
isSigner: false;
|
|
539
|
-
}, {
|
|
540
|
-
name: 'assetAddress';
|
|
541
|
-
isMut: true;
|
|
542
|
-
isSigner: false;
|
|
543
|
-
}, {
|
|
544
|
-
name: 'pendingBundleAssetAuthority';
|
|
545
|
-
isMut: true;
|
|
546
|
-
isSigner: false;
|
|
547
|
-
}, {
|
|
548
|
-
name: 'oracleData';
|
|
549
|
-
isMut: true;
|
|
550
|
-
isSigner: false;
|
|
551
|
-
}, {
|
|
552
|
-
name: 'bundleTempData';
|
|
553
|
-
isMut: true;
|
|
554
|
-
isSigner: false;
|
|
555
|
-
}, {
|
|
556
|
-
name: 'bundleAssetAuthority';
|
|
557
|
-
isMut: true;
|
|
558
|
-
isSigner: false;
|
|
559
|
-
}, {
|
|
560
|
-
name: 'tokenProgram';
|
|
561
|
-
isMut: false;
|
|
562
|
-
isSigner: false;
|
|
563
|
-
}];
|
|
564
|
-
args: [];
|
|
565
|
-
}, {
|
|
566
|
-
name: 'requestDeposit';
|
|
567
|
-
accounts: [{
|
|
568
|
-
name: 'user';
|
|
569
|
-
isMut: true;
|
|
570
|
-
isSigner: true;
|
|
571
|
-
}, {
|
|
572
|
-
name: 'userTokenAccount';
|
|
573
|
-
isMut: true;
|
|
574
|
-
isSigner: false;
|
|
575
|
-
docs: ['user token account (source of funds)'];
|
|
576
|
-
}, {
|
|
577
|
-
name: 'pendingDepositTokenAccount';
|
|
578
|
-
isMut: true;
|
|
579
|
-
isSigner: false;
|
|
580
|
-
}, {
|
|
581
|
-
name: 'treasuryAccount';
|
|
582
|
-
isMut: true;
|
|
583
|
-
isSigner: false;
|
|
584
|
-
}, {
|
|
585
|
-
name: 'userBundleAccount';
|
|
586
|
-
isMut: true;
|
|
587
|
-
isSigner: false;
|
|
588
|
-
}, {
|
|
589
|
-
name: 'assetAddress';
|
|
590
|
-
isMut: true;
|
|
591
|
-
isSigner: false;
|
|
592
|
-
}, {
|
|
593
|
-
name: 'oracleData';
|
|
594
|
-
isMut: true;
|
|
595
|
-
isSigner: false;
|
|
596
|
-
}, {
|
|
597
|
-
name: 'bundleTempData';
|
|
598
|
-
isMut: true;
|
|
599
|
-
isSigner: false;
|
|
600
|
-
}, {
|
|
601
|
-
name: 'bundleAccount';
|
|
602
|
-
isMut: true;
|
|
603
|
-
isSigner: false;
|
|
604
|
-
}, {
|
|
605
|
-
name: 'pendingBundleAssetAuthority';
|
|
606
|
-
isMut: true;
|
|
607
|
-
isSigner: false;
|
|
608
|
-
}, {
|
|
609
|
-
name: 'tokenProgram';
|
|
610
|
-
isMut: false;
|
|
611
|
-
isSigner: false;
|
|
612
|
-
}, {
|
|
613
|
-
name: 'systemProgram';
|
|
614
|
-
isMut: false;
|
|
615
|
-
isSigner: false;
|
|
616
|
-
}];
|
|
617
|
-
args: [{
|
|
618
|
-
name: 'amount';
|
|
619
|
-
type: 'u64';
|
|
620
|
-
}];
|
|
621
|
-
}, {
|
|
622
|
-
name: 'processDeposit';
|
|
623
|
-
accounts: [{
|
|
624
|
-
name: 'keeper';
|
|
625
|
-
isMut: true;
|
|
626
|
-
isSigner: true;
|
|
627
|
-
}, {
|
|
628
|
-
name: 'userBundleAccount';
|
|
629
|
-
isMut: true;
|
|
630
|
-
isSigner: false;
|
|
631
|
-
}, {
|
|
632
|
-
name: 'pendingDepositTokenAccount';
|
|
633
|
-
isMut: true;
|
|
634
|
-
isSigner: false;
|
|
635
|
-
docs: ['the account holding the user\'s deposited asset before allocation.'];
|
|
636
|
-
}, {
|
|
637
|
-
name: 'userBundleAccountOwner';
|
|
638
|
-
isMut: false;
|
|
639
|
-
isSigner: false;
|
|
640
|
-
docs: ['the owner of the pending request (for event purposes).'];
|
|
641
|
-
}, {
|
|
642
|
-
name: 'assetAddress';
|
|
643
|
-
isMut: true;
|
|
644
|
-
isSigner: false;
|
|
645
|
-
}, {
|
|
646
|
-
name: 'bundleAssetAccount';
|
|
647
|
-
isMut: true;
|
|
648
|
-
isSigner: false;
|
|
649
|
-
}, {
|
|
650
|
-
name: 'bundleAccount';
|
|
651
|
-
isMut: true;
|
|
652
|
-
isSigner: false;
|
|
653
|
-
}, {
|
|
654
|
-
name: 'bundleTempData';
|
|
655
|
-
isMut: true;
|
|
656
|
-
isSigner: false;
|
|
657
|
-
}, {
|
|
658
|
-
name: 'oracleData';
|
|
659
|
-
isMut: true;
|
|
660
|
-
isSigner: false;
|
|
661
|
-
}, {
|
|
662
|
-
name: 'pendingBundleAssetAuthority';
|
|
663
|
-
isMut: true;
|
|
664
|
-
isSigner: false;
|
|
665
|
-
}, {
|
|
666
|
-
name: 'bundleAssetAuthority';
|
|
667
|
-
isMut: true;
|
|
668
|
-
isSigner: false;
|
|
669
|
-
}, {
|
|
670
|
-
name: 'tokenProgram';
|
|
671
|
-
isMut: false;
|
|
672
|
-
isSigner: false;
|
|
673
|
-
}, {
|
|
674
|
-
name: 'systemProgram';
|
|
675
|
-
isMut: false;
|
|
676
|
-
isSigner: false;
|
|
677
|
-
}];
|
|
678
|
-
args: [];
|
|
679
|
-
}, {
|
|
680
|
-
name: 'refundDeposit';
|
|
681
|
-
accounts: [{
|
|
682
|
-
name: 'keeper';
|
|
683
|
-
isMut: true;
|
|
684
|
-
isSigner: true;
|
|
685
|
-
}, {
|
|
686
|
-
name: 'userBundleAccount';
|
|
687
|
-
isMut: true;
|
|
688
|
-
isSigner: false;
|
|
689
|
-
}, {
|
|
690
|
-
name: 'userBundleAccountOwner';
|
|
691
|
-
isMut: false;
|
|
692
|
-
isSigner: false;
|
|
693
|
-
docs: ['the owner of the pending request (for event purposes).'];
|
|
694
|
-
}, {
|
|
695
|
-
name: 'userTokenAccount';
|
|
696
|
-
isMut: true;
|
|
697
|
-
isSigner: false;
|
|
698
|
-
}, {
|
|
699
|
-
name: 'assetAddress';
|
|
700
|
-
isMut: true;
|
|
701
|
-
isSigner: false;
|
|
702
|
-
}, {
|
|
703
|
-
name: 'bundleAssetAccount';
|
|
704
|
-
isMut: true;
|
|
705
|
-
isSigner: false;
|
|
706
|
-
}, {
|
|
707
|
-
name: 'bundleAssetAuthority';
|
|
708
|
-
isMut: true;
|
|
709
|
-
isSigner: false;
|
|
710
|
-
}, {
|
|
711
|
-
name: 'bundleAccount';
|
|
712
|
-
isMut: true;
|
|
713
|
-
isSigner: false;
|
|
714
|
-
}, {
|
|
715
|
-
name: 'bundleTempData';
|
|
716
|
-
isMut: true;
|
|
717
|
-
isSigner: false;
|
|
718
|
-
}, {
|
|
719
|
-
name: 'tokenProgram';
|
|
720
|
-
isMut: false;
|
|
721
|
-
isSigner: false;
|
|
722
|
-
}, {
|
|
723
|
-
name: 'systemProgram';
|
|
724
|
-
isMut: false;
|
|
725
|
-
isSigner: false;
|
|
726
|
-
}];
|
|
727
|
-
args: [];
|
|
728
|
-
}, {
|
|
729
|
-
name: 'requestWithdrawal';
|
|
730
|
-
accounts: [{
|
|
731
|
-
name: 'user';
|
|
732
|
-
isMut: true;
|
|
733
|
-
isSigner: true;
|
|
734
|
-
}, {
|
|
735
|
-
name: 'userBundleAccount';
|
|
736
|
-
isMut: true;
|
|
737
|
-
isSigner: false;
|
|
738
|
-
}, {
|
|
739
|
-
name: 'bundleAccount';
|
|
740
|
-
isMut: true;
|
|
741
|
-
isSigner: false;
|
|
742
|
-
}, {
|
|
743
|
-
name: 'oracleData';
|
|
744
|
-
isMut: true;
|
|
745
|
-
isSigner: false;
|
|
746
|
-
}, {
|
|
747
|
-
name: 'bundleTempData';
|
|
748
|
-
isMut: true;
|
|
749
|
-
isSigner: false;
|
|
750
|
-
}, {
|
|
751
|
-
name: 'tokenProgram';
|
|
752
|
-
isMut: false;
|
|
753
|
-
isSigner: false;
|
|
754
|
-
}, {
|
|
755
|
-
name: 'systemProgram';
|
|
756
|
-
isMut: false;
|
|
757
|
-
isSigner: false;
|
|
758
|
-
}, {
|
|
759
|
-
name: 'rent';
|
|
760
|
-
isMut: false;
|
|
761
|
-
isSigner: false;
|
|
762
|
-
}];
|
|
763
|
-
args: [{
|
|
764
|
-
name: 'sharesAmount';
|
|
765
|
-
type: 'u128';
|
|
766
|
-
}];
|
|
767
|
-
}, {
|
|
768
|
-
name: 'processWithdrawal';
|
|
769
|
-
accounts: [{
|
|
770
|
-
name: 'keeper';
|
|
771
|
-
isMut: true;
|
|
772
|
-
isSigner: true;
|
|
773
|
-
}, {
|
|
774
|
-
name: 'userBundleAccountOwner';
|
|
775
|
-
isMut: false;
|
|
776
|
-
isSigner: false;
|
|
777
|
-
}, {
|
|
778
|
-
name: 'userTokenAccount';
|
|
779
|
-
isMut: true;
|
|
780
|
-
isSigner: false;
|
|
781
|
-
}, {
|
|
782
|
-
name: 'assetAddress';
|
|
783
|
-
isMut: true;
|
|
784
|
-
isSigner: false;
|
|
785
|
-
}, {
|
|
786
|
-
name: 'bundleAssetAccount';
|
|
787
|
-
isMut: true;
|
|
788
|
-
isSigner: false;
|
|
789
|
-
}, {
|
|
790
|
-
name: 'pendingBundleAssetAuthority';
|
|
791
|
-
isMut: true;
|
|
792
|
-
isSigner: false;
|
|
793
|
-
}, {
|
|
794
|
-
name: 'userBundleAccount';
|
|
795
|
-
isMut: true;
|
|
796
|
-
isSigner: false;
|
|
797
|
-
}, {
|
|
798
|
-
name: 'treasuryAccount';
|
|
799
|
-
isMut: true;
|
|
800
|
-
isSigner: false;
|
|
801
|
-
}, {
|
|
802
|
-
name: 'bundleAssetAuthority';
|
|
803
|
-
isMut: true;
|
|
804
|
-
isSigner: false;
|
|
805
|
-
}, {
|
|
806
|
-
name: 'bundleAccount';
|
|
807
|
-
isMut: true;
|
|
808
|
-
isSigner: false;
|
|
809
|
-
}, {
|
|
810
|
-
name: 'bundleTempData';
|
|
811
|
-
isMut: true;
|
|
812
|
-
isSigner: false;
|
|
813
|
-
}, {
|
|
814
|
-
name: 'oracleData';
|
|
815
|
-
isMut: true;
|
|
816
|
-
isSigner: false;
|
|
817
|
-
}, {
|
|
818
|
-
name: 'tokenProgram';
|
|
819
|
-
isMut: false;
|
|
820
|
-
isSigner: false;
|
|
821
|
-
}, {
|
|
822
|
-
name: 'systemProgram';
|
|
823
|
-
isMut: false;
|
|
824
|
-
isSigner: false;
|
|
825
|
-
}];
|
|
826
|
-
args: [];
|
|
827
|
-
}, {
|
|
828
|
-
name: 'pauseDepositsWithdrawals';
|
|
829
|
-
accounts: [{
|
|
830
|
-
name: 'keeper';
|
|
831
|
-
isMut: true;
|
|
832
|
-
isSigner: true;
|
|
833
|
-
}, {
|
|
834
|
-
name: 'bundleAccount';
|
|
835
|
-
isMut: true;
|
|
836
|
-
isSigner: false;
|
|
837
|
-
}, {
|
|
838
|
-
name: 'bundleTempData';
|
|
839
|
-
isMut: true;
|
|
840
|
-
isSigner: false;
|
|
841
|
-
}, {
|
|
842
|
-
name: 'oracleData';
|
|
843
|
-
isMut: true;
|
|
844
|
-
isSigner: false;
|
|
845
|
-
}];
|
|
846
|
-
args: [{
|
|
847
|
-
name: 'pause';
|
|
848
|
-
type: 'bool';
|
|
849
|
-
}];
|
|
850
|
-
}, {
|
|
851
|
-
name: 'startDistribution';
|
|
852
|
-
accounts: [{
|
|
853
|
-
name: 'keeper';
|
|
854
|
-
isMut: true;
|
|
855
|
-
isSigner: true;
|
|
856
|
-
}, {
|
|
857
|
-
name: 'bundleAccount';
|
|
858
|
-
isMut: true;
|
|
859
|
-
isSigner: false;
|
|
860
|
-
}, {
|
|
861
|
-
name: 'bundleTempData';
|
|
862
|
-
isMut: true;
|
|
863
|
-
isSigner: false;
|
|
864
|
-
}, {
|
|
865
|
-
name: 'oracleData';
|
|
866
|
-
isMut: true;
|
|
867
|
-
isSigner: false;
|
|
868
|
-
}];
|
|
869
|
-
args: [];
|
|
870
|
-
}, {
|
|
871
|
-
name: 'endDistribution';
|
|
872
|
-
accounts: [{
|
|
873
|
-
name: 'keeper';
|
|
874
|
-
isMut: true;
|
|
875
|
-
isSigner: true;
|
|
876
|
-
}, {
|
|
877
|
-
name: 'bundleAccount';
|
|
878
|
-
isMut: true;
|
|
879
|
-
isSigner: false;
|
|
880
|
-
}, {
|
|
881
|
-
name: 'bundleTempData';
|
|
882
|
-
isMut: true;
|
|
883
|
-
isSigner: false;
|
|
884
|
-
}, {
|
|
885
|
-
name: 'oracleData';
|
|
886
|
-
isMut: true;
|
|
887
|
-
isSigner: false;
|
|
888
|
-
}];
|
|
889
|
-
args: [];
|
|
890
|
-
}, {
|
|
891
|
-
name: 'performRefill';
|
|
892
|
-
accounts: [{
|
|
893
|
-
name: 'receiverAddress';
|
|
894
|
-
isMut: true;
|
|
895
|
-
isSigner: true;
|
|
896
|
-
}, {
|
|
897
|
-
name: 'bundleAssetAccount';
|
|
898
|
-
isMut: true;
|
|
899
|
-
isSigner: false;
|
|
900
|
-
}, {
|
|
901
|
-
name: 'receiverAta';
|
|
902
|
-
isMut: true;
|
|
903
|
-
isSigner: false;
|
|
904
|
-
}, {
|
|
905
|
-
name: 'assetAddress';
|
|
906
|
-
isMut: false;
|
|
907
|
-
isSigner: false;
|
|
908
|
-
}, {
|
|
909
|
-
name: 'bundleAccount';
|
|
910
|
-
isMut: true;
|
|
911
|
-
isSigner: false;
|
|
912
|
-
}, {
|
|
913
|
-
name: 'strategyAccount';
|
|
914
|
-
isMut: true;
|
|
915
|
-
isSigner: false;
|
|
916
|
-
}, {
|
|
917
|
-
name: 'oracleData';
|
|
918
|
-
isMut: true;
|
|
919
|
-
isSigner: false;
|
|
920
|
-
}, {
|
|
921
|
-
name: 'bundleAssetAuthority';
|
|
922
|
-
isMut: true;
|
|
923
|
-
isSigner: false;
|
|
924
|
-
}, {
|
|
925
|
-
name: 'tokenProgram';
|
|
926
|
-
isMut: false;
|
|
927
|
-
isSigner: false;
|
|
928
|
-
}];
|
|
929
|
-
args: [{
|
|
930
|
-
name: 'refillAmount';
|
|
931
|
-
type: 'u64';
|
|
932
|
-
}];
|
|
933
|
-
}, {
|
|
934
|
-
name: 'distributeToReceivers';
|
|
935
|
-
accounts: [{
|
|
936
|
-
name: 'keeper';
|
|
937
|
-
isMut: true;
|
|
938
|
-
isSigner: true;
|
|
939
|
-
}, {
|
|
940
|
-
name: 'receiverAddress';
|
|
941
|
-
isMut: true;
|
|
942
|
-
isSigner: false;
|
|
943
|
-
}, {
|
|
944
|
-
name: 'bundleAssetAccount';
|
|
945
|
-
isMut: true;
|
|
946
|
-
isSigner: false;
|
|
947
|
-
}, {
|
|
948
|
-
name: 'receiverAta';
|
|
949
|
-
isMut: true;
|
|
950
|
-
isSigner: false;
|
|
951
|
-
}, {
|
|
952
|
-
name: 'assetAddress';
|
|
953
|
-
isMut: false;
|
|
954
|
-
isSigner: false;
|
|
955
|
-
}, {
|
|
956
|
-
name: 'oracleData';
|
|
957
|
-
isMut: true;
|
|
958
|
-
isSigner: false;
|
|
959
|
-
}, {
|
|
960
|
-
name: 'bundleAssetAuthority';
|
|
961
|
-
isMut: true;
|
|
962
|
-
isSigner: false;
|
|
963
|
-
}, {
|
|
964
|
-
name: 'tokenProgram';
|
|
965
|
-
isMut: false;
|
|
966
|
-
isSigner: false;
|
|
967
|
-
}, {
|
|
968
|
-
name: 'bundleAccount';
|
|
969
|
-
isMut: true;
|
|
970
|
-
isSigner: false;
|
|
971
|
-
}, {
|
|
972
|
-
name: 'bundleTempData';
|
|
973
|
-
isMut: true;
|
|
974
|
-
isSigner: false;
|
|
975
|
-
}, {
|
|
976
|
-
name: 'strategyAccount';
|
|
977
|
-
isMut: true;
|
|
978
|
-
isSigner: false;
|
|
979
|
-
}];
|
|
980
|
-
args: [];
|
|
981
|
-
}, {
|
|
982
|
-
name: 'forceWithdrawPosition';
|
|
983
|
-
accounts: [{
|
|
984
|
-
name: 'keeper';
|
|
985
|
-
isMut: true;
|
|
986
|
-
isSigner: true;
|
|
987
|
-
}, {
|
|
988
|
-
name: 'userBundleAccountOwner';
|
|
989
|
-
isMut: true;
|
|
990
|
-
isSigner: false;
|
|
991
|
-
}, {
|
|
992
|
-
name: 'userTokenAccount';
|
|
993
|
-
isMut: true;
|
|
994
|
-
isSigner: false;
|
|
995
|
-
}, {
|
|
996
|
-
name: 'assetAddress';
|
|
997
|
-
isMut: true;
|
|
998
|
-
isSigner: false;
|
|
999
|
-
}, {
|
|
1000
|
-
name: 'bundleAssetAccount';
|
|
1001
|
-
isMut: true;
|
|
1002
|
-
isSigner: false;
|
|
1003
|
-
}, {
|
|
1004
|
-
name: 'pendingBundleAssetAuthority';
|
|
1005
|
-
isMut: true;
|
|
1006
|
-
isSigner: false;
|
|
1007
|
-
}, {
|
|
1008
|
-
name: 'userBundleAccount';
|
|
1009
|
-
isMut: true;
|
|
1010
|
-
isSigner: false;
|
|
1011
|
-
}, {
|
|
1012
|
-
name: 'treasuryAccount';
|
|
1013
|
-
isMut: true;
|
|
1014
|
-
isSigner: false;
|
|
1015
|
-
}, {
|
|
1016
|
-
name: 'bundleAssetAuthority';
|
|
1017
|
-
isMut: true;
|
|
1018
|
-
isSigner: false;
|
|
1019
|
-
}, {
|
|
1020
|
-
name: 'bundleAccount';
|
|
1021
|
-
isMut: true;
|
|
1022
|
-
isSigner: false;
|
|
1023
|
-
}, {
|
|
1024
|
-
name: 'bundleTempData';
|
|
1025
|
-
isMut: true;
|
|
1026
|
-
isSigner: false;
|
|
1027
|
-
}, {
|
|
1028
|
-
name: 'oracleData';
|
|
1029
|
-
isMut: true;
|
|
1030
|
-
isSigner: false;
|
|
1031
|
-
}, {
|
|
1032
|
-
name: 'tokenProgram';
|
|
1033
|
-
isMut: false;
|
|
1034
|
-
isSigner: false;
|
|
1035
|
-
}, {
|
|
1036
|
-
name: 'systemProgram';
|
|
1037
|
-
isMut: false;
|
|
1038
|
-
isSigner: false;
|
|
1039
|
-
}];
|
|
1040
|
-
args: [];
|
|
1041
|
-
}];
|
|
1042
|
-
accounts: [{
|
|
1043
|
-
name: 'bundle';
|
|
1044
|
-
type: {
|
|
1045
|
-
kind: 'struct';
|
|
1046
|
-
fields: [{
|
|
1047
|
-
name: 'name';
|
|
1048
|
-
type: {
|
|
1049
|
-
array: ['u8', 32];
|
|
1050
|
-
};
|
|
1051
|
-
}, {
|
|
1052
|
-
name: 'manager';
|
|
1053
|
-
type: 'publicKey';
|
|
1054
|
-
}, {
|
|
1055
|
-
name: 'keeper';
|
|
1056
|
-
type: 'publicKey';
|
|
1057
|
-
}, {
|
|
1058
|
-
name: 'treasuryAccount';
|
|
1059
|
-
type: 'publicKey';
|
|
1060
|
-
}, {
|
|
1061
|
-
name: 'allocatedReceivers';
|
|
1062
|
-
type: {
|
|
1063
|
-
vec: 'publicKey';
|
|
1064
|
-
};
|
|
1065
|
-
}, {
|
|
1066
|
-
name: 'bundleUnderlyingBalance';
|
|
1067
|
-
type: 'u64';
|
|
1068
|
-
}, {
|
|
1069
|
-
name: 'maxDepositAmount';
|
|
1070
|
-
type: 'u64';
|
|
1071
|
-
}, {
|
|
1072
|
-
name: 'withdrawalDelay';
|
|
1073
|
-
type: 'u64';
|
|
1074
|
-
}, {
|
|
1075
|
-
name: 'performanceFee';
|
|
1076
|
-
type: 'u32';
|
|
1077
|
-
}, {
|
|
1078
|
-
name: 'managementFeeBps';
|
|
1079
|
-
type: 'u32';
|
|
1080
|
-
}, {
|
|
1081
|
-
name: 'depositFee';
|
|
1082
|
-
type: 'u32';
|
|
1083
|
-
}, {
|
|
1084
|
-
name: 'withdrawalFee';
|
|
1085
|
-
type: 'u32';
|
|
1086
|
-
}, {
|
|
1087
|
-
name: 'managerPfeeShares';
|
|
1088
|
-
type: 'u128';
|
|
1089
|
-
}, {
|
|
1090
|
-
name: 'currentAllocationBps';
|
|
1091
|
-
type: 'u32';
|
|
1092
|
-
}, {
|
|
1093
|
-
name: 'oracleBuffer';
|
|
1094
|
-
type: 'u64';
|
|
1095
|
-
}, {
|
|
1096
|
-
name: 'totalShares';
|
|
1097
|
-
type: 'u128';
|
|
1098
|
-
}, {
|
|
1099
|
-
name: 'assetPrecision';
|
|
1100
|
-
type: 'u64';
|
|
1101
|
-
}, {
|
|
1102
|
-
name: 'assetAddress';
|
|
1103
|
-
type: 'publicKey';
|
|
1104
|
-
}, {
|
|
1105
|
-
name: 'assetDecimals';
|
|
1106
|
-
type: 'u8';
|
|
1107
|
-
}, {
|
|
1108
|
-
name: 'withdrawalTMin';
|
|
1109
|
-
type: 'i64';
|
|
1110
|
-
}, {
|
|
1111
|
-
name: 'withdrawalTMax';
|
|
1112
|
-
type: 'i64';
|
|
1113
|
-
}, {
|
|
1114
|
-
name: 'withdrawalCurve';
|
|
1115
|
-
type: 'f32';
|
|
1116
|
-
}, {
|
|
1117
|
-
name: 'permissionned';
|
|
1118
|
-
type: 'bool';
|
|
1119
|
-
}, {
|
|
1120
|
-
name: 'managerMfeeShares';
|
|
1121
|
-
type: 'u128';
|
|
1122
|
-
}, {
|
|
1123
|
-
name: 'padding';
|
|
1124
|
-
type: {
|
|
1125
|
-
array: ['u8', 255];
|
|
1126
|
-
};
|
|
1127
|
-
}];
|
|
1128
|
-
};
|
|
1129
|
-
}, {
|
|
1130
|
-
name: 'bundleCreatorAccount';
|
|
1131
|
-
type: {
|
|
1132
|
-
kind: 'struct';
|
|
1133
|
-
fields: [{
|
|
1134
|
-
name: 'allowed';
|
|
1135
|
-
type: 'bool';
|
|
1136
|
-
}, {
|
|
1137
|
-
name: 'padding';
|
|
1138
|
-
type: {
|
|
1139
|
-
array: ['u8', 64];
|
|
1140
|
-
};
|
|
1141
|
-
}];
|
|
1142
|
-
};
|
|
1143
|
-
}, {
|
|
1144
|
-
name: 'bundleMasterAccount';
|
|
1145
|
-
type: {
|
|
1146
|
-
kind: 'struct';
|
|
1147
|
-
fields: [{
|
|
1148
|
-
name: 'admin';
|
|
1149
|
-
type: 'publicKey';
|
|
1150
|
-
}, {
|
|
1151
|
-
name: 'padding';
|
|
1152
|
-
type: {
|
|
1153
|
-
array: ['u8', 96];
|
|
1154
|
-
};
|
|
1155
|
-
}];
|
|
1156
|
-
};
|
|
1157
|
-
}, {
|
|
1158
|
-
name: 'bundleTempData';
|
|
1159
|
-
type: {
|
|
1160
|
-
kind: 'struct';
|
|
1161
|
-
fields: [{
|
|
1162
|
-
name: 'cumulativePendingDeposits';
|
|
1163
|
-
type: 'u64';
|
|
1164
|
-
}, {
|
|
1165
|
-
name: 'pendingDepositsCounter';
|
|
1166
|
-
type: 'u64';
|
|
1167
|
-
}, {
|
|
1168
|
-
name: 'pendingWithdrawalsCounter';
|
|
1169
|
-
type: 'u64';
|
|
1170
|
-
}, {
|
|
1171
|
-
name: 'pendingLockedWithdrawalsCounter';
|
|
1172
|
-
type: 'u64';
|
|
1173
|
-
}, {
|
|
1174
|
-
name: 'lastTotalSharesMinted';
|
|
1175
|
-
type: 'u128';
|
|
1176
|
-
}, {
|
|
1177
|
-
name: 'lastNettingTimestamp';
|
|
1178
|
-
type: 'i64';
|
|
1179
|
-
}, {
|
|
1180
|
-
name: 'isNettingDone';
|
|
1181
|
-
type: 'bool';
|
|
1182
|
-
}, {
|
|
1183
|
-
name: 'distributionBaseAmount';
|
|
1184
|
-
type: 'u64';
|
|
1185
|
-
}, {
|
|
1186
|
-
name: 'isDistributionStarted';
|
|
1187
|
-
type: 'bool';
|
|
1188
|
-
}, {
|
|
1189
|
-
name: 'pausedDepositsWithdrawals';
|
|
1190
|
-
type: 'bool';
|
|
1191
|
-
}, {
|
|
1192
|
-
name: 'leftToDistribute';
|
|
1193
|
-
type: 'u64';
|
|
1194
|
-
}, {
|
|
1195
|
-
name: 'padding';
|
|
1196
|
-
type: {
|
|
1197
|
-
array: ['u8', 184];
|
|
1198
|
-
};
|
|
1199
|
-
}];
|
|
1200
|
-
};
|
|
1201
|
-
}, {
|
|
1202
|
-
name: 'oracleData';
|
|
1203
|
-
type: {
|
|
1204
|
-
kind: 'struct';
|
|
1205
|
-
fields: [{
|
|
1206
|
-
name: 'averageExternalEquity';
|
|
1207
|
-
type: 'u64';
|
|
1208
|
-
}, {
|
|
1209
|
-
name: 'lastUpdateTime';
|
|
1210
|
-
type: 'i64';
|
|
1211
|
-
}, {
|
|
1212
|
-
name: 'padding';
|
|
1213
|
-
type: {
|
|
1214
|
-
array: ['u8', 64];
|
|
1215
|
-
};
|
|
1216
|
-
}];
|
|
1217
|
-
};
|
|
1218
|
-
}, {
|
|
1219
|
-
name: 'strategy';
|
|
1220
|
-
type: {
|
|
1221
|
-
kind: 'struct';
|
|
1222
|
-
fields: [{
|
|
1223
|
-
name: 'receiverAddress';
|
|
1224
|
-
type: 'publicKey';
|
|
1225
|
-
}, {
|
|
1226
|
-
name: 'allocationBps';
|
|
1227
|
-
type: 'u32';
|
|
1228
|
-
}, {
|
|
1229
|
-
name: 'allowed';
|
|
1230
|
-
type: 'bool';
|
|
1231
|
-
}, {
|
|
1232
|
-
name: 'padding';
|
|
1233
|
-
type: {
|
|
1234
|
-
array: ['u8', 96];
|
|
1235
|
-
};
|
|
1236
|
-
}];
|
|
1237
|
-
};
|
|
1238
|
-
}, {
|
|
1239
|
-
name: 'userBundleAccount';
|
|
1240
|
-
type: {
|
|
1241
|
-
kind: 'struct';
|
|
1242
|
-
fields: [{
|
|
1243
|
-
name: 'owner';
|
|
1244
|
-
type: 'publicKey';
|
|
1245
|
-
}, {
|
|
1246
|
-
name: 'lastDepositTimestamp';
|
|
1247
|
-
type: 'i64';
|
|
1248
|
-
}, {
|
|
1249
|
-
name: 'shares';
|
|
1250
|
-
type: 'u128';
|
|
1251
|
-
}, {
|
|
1252
|
-
name: 'pendingDeposit';
|
|
1253
|
-
type: 'u64';
|
|
1254
|
-
}, {
|
|
1255
|
-
name: 'pendingShares';
|
|
1256
|
-
type: 'u128';
|
|
1257
|
-
}, {
|
|
1258
|
-
name: 'estimatedPendingWithdrawalValue';
|
|
1259
|
-
type: 'u64';
|
|
1260
|
-
}, {
|
|
1261
|
-
name: 'withdrawalAvailableTimestamp';
|
|
1262
|
-
type: 'i64';
|
|
1263
|
-
}, {
|
|
1264
|
-
name: 'lastWithdrawalProcessTimestamp';
|
|
1265
|
-
type: 'i64';
|
|
1266
|
-
}, {
|
|
1267
|
-
name: 'lastHighWaterMark';
|
|
1268
|
-
type: 'u128';
|
|
1269
|
-
}, {
|
|
1270
|
-
name: 'hwmPerShare';
|
|
1271
|
-
type: 'u128';
|
|
1272
|
-
}, {
|
|
1273
|
-
name: 'lastManagementFeeTimestamp';
|
|
1274
|
-
type: 'i64';
|
|
1275
|
-
}, {
|
|
1276
|
-
name: 'netDeposits';
|
|
1277
|
-
type: 'i128';
|
|
1278
|
-
}, {
|
|
1279
|
-
name: 'totalFeeCharged';
|
|
1280
|
-
type: 'u64';
|
|
1281
|
-
}, {
|
|
1282
|
-
name: 'padding';
|
|
1283
|
-
type: {
|
|
1284
|
-
array: ['u8', 264];
|
|
1285
|
-
};
|
|
1286
|
-
}];
|
|
1287
|
-
};
|
|
1288
|
-
}];
|
|
1289
|
-
events: [{
|
|
1290
|
-
name: 'Allocated';
|
|
1291
|
-
fields: [{
|
|
1292
|
-
name: 'from';
|
|
1293
|
-
type: 'publicKey';
|
|
1294
|
-
index: false;
|
|
1295
|
-
}, {
|
|
1296
|
-
name: 'to';
|
|
1297
|
-
type: 'publicKey';
|
|
1298
|
-
index: false;
|
|
1299
|
-
}, {
|
|
1300
|
-
name: 'amount';
|
|
1301
|
-
type: 'u64';
|
|
1302
|
-
index: false;
|
|
1303
|
-
}, {
|
|
1304
|
-
name: 'timestamp';
|
|
1305
|
-
type: 'i64';
|
|
1306
|
-
index: false;
|
|
1307
|
-
}, {
|
|
1308
|
-
name: 'bundleAccountKey';
|
|
1309
|
-
type: 'publicKey';
|
|
1310
|
-
index: false;
|
|
1311
|
-
}];
|
|
1312
|
-
}, {
|
|
1313
|
-
name: 'AllocationsUpdated';
|
|
1314
|
-
fields: [{
|
|
1315
|
-
name: 'receiverAddress';
|
|
1316
|
-
type: 'publicKey';
|
|
1317
|
-
index: false;
|
|
1318
|
-
}, {
|
|
1319
|
-
name: 'allocationBps';
|
|
1320
|
-
type: 'u32';
|
|
1321
|
-
index: false;
|
|
1322
|
-
}];
|
|
1323
|
-
}, {
|
|
1324
|
-
name: 'AssignedProfitShare';
|
|
1325
|
-
fields: [{
|
|
1326
|
-
name: 'amount';
|
|
1327
|
-
type: 'u128';
|
|
1328
|
-
index: false;
|
|
1329
|
-
}];
|
|
1330
|
-
}, {
|
|
1331
|
-
name: 'AuthorizedReceiverAdded';
|
|
1332
|
-
fields: [{
|
|
1333
|
-
name: 'allowed';
|
|
1334
|
-
type: 'bool';
|
|
1335
|
-
index: false;
|
|
1336
|
-
}];
|
|
1337
|
-
}, {
|
|
1338
|
-
name: 'AuthorizedReceiverRemoved';
|
|
1339
|
-
fields: [{
|
|
1340
|
-
name: 'allowed';
|
|
1341
|
-
type: 'bool';
|
|
1342
|
-
index: false;
|
|
1343
|
-
}];
|
|
1344
|
-
}, {
|
|
1345
|
-
name: 'BundleCreatorAccountChanged';
|
|
1346
|
-
fields: [{
|
|
1347
|
-
name: 'creator';
|
|
1348
|
-
type: 'publicKey';
|
|
1349
|
-
index: false;
|
|
1350
|
-
}, {
|
|
1351
|
-
name: 'allowed';
|
|
1352
|
-
type: 'bool';
|
|
1353
|
-
index: false;
|
|
1354
|
-
}];
|
|
1355
|
-
}, {
|
|
1356
|
-
name: 'BundleDepositorInitialized';
|
|
1357
|
-
fields: [{
|
|
1358
|
-
name: 'bundleDepositor';
|
|
1359
|
-
type: 'publicKey';
|
|
1360
|
-
index: false;
|
|
1361
|
-
}];
|
|
1362
|
-
}, {
|
|
1363
|
-
name: 'BundleMasterAccountInitialized';
|
|
1364
|
-
fields: [{
|
|
1365
|
-
name: 'admin';
|
|
1366
|
-
type: 'publicKey';
|
|
1367
|
-
index: false;
|
|
1368
|
-
}];
|
|
1369
|
-
}, {
|
|
1370
|
-
name: 'BundleMasterAdminChanged';
|
|
1371
|
-
fields: [{
|
|
1372
|
-
name: 'newAdmin';
|
|
1373
|
-
type: 'publicKey';
|
|
1374
|
-
index: false;
|
|
1375
|
-
}];
|
|
1376
|
-
}, {
|
|
1377
|
-
name: 'ChangedCoreParams';
|
|
1378
|
-
fields: [{
|
|
1379
|
-
name: 'treasury';
|
|
1380
|
-
type: 'publicKey';
|
|
1381
|
-
index: false;
|
|
1382
|
-
}, {
|
|
1383
|
-
name: 'depositFee';
|
|
1384
|
-
type: 'u32';
|
|
1385
|
-
index: false;
|
|
1386
|
-
}, {
|
|
1387
|
-
name: 'withdrawalFee';
|
|
1388
|
-
type: 'u32';
|
|
1389
|
-
index: false;
|
|
1390
|
-
}, {
|
|
1391
|
-
name: 'performanceFee';
|
|
1392
|
-
type: 'u32';
|
|
1393
|
-
index: false;
|
|
1394
|
-
}, {
|
|
1395
|
-
name: 'managementFeeBps';
|
|
1396
|
-
type: 'u32';
|
|
1397
|
-
index: false;
|
|
1398
|
-
}];
|
|
1399
|
-
}, {
|
|
1400
|
-
name: 'ChargedFeesToUser';
|
|
1401
|
-
fields: [{
|
|
1402
|
-
name: 'totalFeeShares';
|
|
1403
|
-
type: 'u128';
|
|
1404
|
-
index: false;
|
|
1405
|
-
}, {
|
|
1406
|
-
name: 'totalFeeValue';
|
|
1407
|
-
type: 'u64';
|
|
1408
|
-
index: false;
|
|
1409
|
-
}, {
|
|
1410
|
-
name: 'managementFeeShares';
|
|
1411
|
-
type: 'u128';
|
|
1412
|
-
index: false;
|
|
1413
|
-
}, {
|
|
1414
|
-
name: 'performanceFeeShares';
|
|
1415
|
-
type: 'u128';
|
|
1416
|
-
index: false;
|
|
1417
|
-
}, {
|
|
1418
|
-
name: 'sharePrice';
|
|
1419
|
-
type: 'u128';
|
|
1420
|
-
index: false;
|
|
1421
|
-
}, {
|
|
1422
|
-
name: 'bundleAccountKey';
|
|
1423
|
-
type: 'publicKey';
|
|
1424
|
-
index: false;
|
|
1425
|
-
}];
|
|
1426
|
-
}, {
|
|
1427
|
-
name: 'DelaysSet';
|
|
1428
|
-
fields: [{
|
|
1429
|
-
name: 'withdrawalDelay';
|
|
1430
|
-
type: 'u64';
|
|
1431
|
-
index: false;
|
|
1432
|
-
}, {
|
|
1433
|
-
name: 'withdrawalTMin';
|
|
1434
|
-
type: 'i64';
|
|
1435
|
-
index: false;
|
|
1436
|
-
}, {
|
|
1437
|
-
name: 'withdrawalTMax';
|
|
1438
|
-
type: 'i64';
|
|
1439
|
-
index: false;
|
|
1440
|
-
}, {
|
|
1441
|
-
name: 'withdrawalCurve';
|
|
1442
|
-
type: 'f32';
|
|
1443
|
-
index: false;
|
|
1444
|
-
}];
|
|
1445
|
-
}, {
|
|
1446
|
-
name: 'DepositRequested';
|
|
1447
|
-
fields: [{
|
|
1448
|
-
name: 'user';
|
|
1449
|
-
type: 'publicKey';
|
|
1450
|
-
index: false;
|
|
1451
|
-
}, {
|
|
1452
|
-
name: 'amount';
|
|
1453
|
-
type: 'u64';
|
|
1454
|
-
index: false;
|
|
1455
|
-
}, {
|
|
1456
|
-
name: 'timestamp';
|
|
1457
|
-
type: 'i64';
|
|
1458
|
-
index: false;
|
|
1459
|
-
}, {
|
|
1460
|
-
name: 'bundleAccountKey';
|
|
1461
|
-
type: 'publicKey';
|
|
1462
|
-
index: false;
|
|
1463
|
-
}, {
|
|
1464
|
-
name: 'toppingUp';
|
|
1465
|
-
type: 'bool';
|
|
1466
|
-
index: false;
|
|
1467
|
-
}];
|
|
1468
|
-
}, {
|
|
1469
|
-
name: 'DepositedToDriftVault';
|
|
1470
|
-
fields: [{
|
|
1471
|
-
name: 'amount';
|
|
1472
|
-
type: 'u64';
|
|
1473
|
-
index: false;
|
|
1474
|
-
}, {
|
|
1475
|
-
name: 'from';
|
|
1476
|
-
type: 'publicKey';
|
|
1477
|
-
index: false;
|
|
1478
|
-
}, {
|
|
1479
|
-
name: 'to';
|
|
1480
|
-
type: 'publicKey';
|
|
1481
|
-
index: false;
|
|
1482
|
-
}, {
|
|
1483
|
-
name: 'timestamp';
|
|
1484
|
-
type: 'i64';
|
|
1485
|
-
index: false;
|
|
1486
|
-
}];
|
|
1487
|
-
}, {
|
|
1488
|
-
name: 'DistributedToReceivers';
|
|
1489
|
-
fields: [{
|
|
1490
|
-
name: 'amount';
|
|
1491
|
-
type: 'u64';
|
|
1492
|
-
index: false;
|
|
1493
|
-
}, {
|
|
1494
|
-
name: 'from';
|
|
1495
|
-
type: 'publicKey';
|
|
1496
|
-
index: false;
|
|
1497
|
-
}, {
|
|
1498
|
-
name: 'receiver';
|
|
1499
|
-
type: 'publicKey';
|
|
1500
|
-
index: false;
|
|
1501
|
-
}, {
|
|
1502
|
-
name: 'timestamp';
|
|
1503
|
-
type: 'i64';
|
|
1504
|
-
index: false;
|
|
1505
|
-
}];
|
|
1506
|
-
}, {
|
|
1507
|
-
name: 'DistributionEnded';
|
|
1508
|
-
fields: [{
|
|
1509
|
-
name: 'amount';
|
|
1510
|
-
type: 'u64';
|
|
1511
|
-
index: false;
|
|
1512
|
-
}, {
|
|
1513
|
-
name: 'timestamp';
|
|
1514
|
-
type: 'i64';
|
|
1515
|
-
index: false;
|
|
1516
|
-
}];
|
|
1517
|
-
}, {
|
|
1518
|
-
name: 'DistributionStarted';
|
|
1519
|
-
fields: [{
|
|
1520
|
-
name: 'amount';
|
|
1521
|
-
type: 'u64';
|
|
1522
|
-
index: false;
|
|
1523
|
-
}, {
|
|
1524
|
-
name: 'timestamp';
|
|
1525
|
-
type: 'i64';
|
|
1526
|
-
index: false;
|
|
1527
|
-
}];
|
|
1528
|
-
}, {
|
|
1529
|
-
name: 'ForceRedeemed';
|
|
1530
|
-
fields: [{
|
|
1531
|
-
name: 'from';
|
|
1532
|
-
type: 'publicKey';
|
|
1533
|
-
index: false;
|
|
1534
|
-
}, {
|
|
1535
|
-
name: 'to';
|
|
1536
|
-
type: 'publicKey';
|
|
1537
|
-
index: false;
|
|
1538
|
-
}, {
|
|
1539
|
-
name: 'netAmount';
|
|
1540
|
-
type: 'u64';
|
|
1541
|
-
index: false;
|
|
1542
|
-
}, {
|
|
1543
|
-
name: 'feeAmount';
|
|
1544
|
-
type: 'u64';
|
|
1545
|
-
index: false;
|
|
1546
|
-
}, {
|
|
1547
|
-
name: 'timestamp';
|
|
1548
|
-
type: 'i64';
|
|
1549
|
-
index: false;
|
|
1550
|
-
}, {
|
|
1551
|
-
name: 'bundleAccountKey';
|
|
1552
|
-
type: 'publicKey';
|
|
1553
|
-
index: false;
|
|
1554
|
-
}, {
|
|
1555
|
-
name: 'hadRequested';
|
|
1556
|
-
type: 'bool';
|
|
1557
|
-
index: false;
|
|
1558
|
-
}];
|
|
1559
|
-
}, {
|
|
1560
|
-
name: 'InitializedNewVaultDepositor';
|
|
1561
|
-
fields: [{
|
|
1562
|
-
name: 'vault';
|
|
1563
|
-
type: 'publicKey';
|
|
1564
|
-
index: false;
|
|
1565
|
-
}, {
|
|
1566
|
-
name: 'vaultDepositor';
|
|
1567
|
-
type: 'publicKey';
|
|
1568
|
-
index: false;
|
|
1569
|
-
}, {
|
|
1570
|
-
name: 'keeper';
|
|
1571
|
-
type: 'publicKey';
|
|
1572
|
-
index: false;
|
|
1573
|
-
}];
|
|
1574
|
-
}, {
|
|
1575
|
-
name: 'InitializedReceivers';
|
|
1576
|
-
fields: [{
|
|
1577
|
-
name: 'manager';
|
|
1578
|
-
type: 'publicKey';
|
|
1579
|
-
index: false;
|
|
1580
|
-
}];
|
|
1581
|
-
}, {
|
|
1582
|
-
name: 'InitializedVault';
|
|
1583
|
-
fields: [{
|
|
1584
|
-
name: 'manager';
|
|
1585
|
-
type: 'publicKey';
|
|
1586
|
-
index: false;
|
|
1587
|
-
}];
|
|
1588
|
-
}, {
|
|
1589
|
-
name: 'ManagerWithdrawal';
|
|
1590
|
-
fields: [{
|
|
1591
|
-
name: 'managerShares';
|
|
1592
|
-
type: 'u128';
|
|
1593
|
-
index: false;
|
|
1594
|
-
}, {
|
|
1595
|
-
name: 'redemptionAmount';
|
|
1596
|
-
type: 'u64';
|
|
1597
|
-
index: false;
|
|
1598
|
-
}];
|
|
1599
|
-
}, {
|
|
1600
|
-
name: 'MaxDepositAmountSet';
|
|
1601
|
-
fields: [{
|
|
1602
|
-
name: 'maxDepositAmount';
|
|
1603
|
-
type: 'u64';
|
|
1604
|
-
index: false;
|
|
1605
|
-
}];
|
|
1606
|
-
}, {
|
|
1607
|
-
name: 'NettingCompleted';
|
|
1608
|
-
fields: [{
|
|
1609
|
-
name: 'timestamp';
|
|
1610
|
-
type: 'i64';
|
|
1611
|
-
index: false;
|
|
1612
|
-
}];
|
|
1613
|
-
}, {
|
|
1614
|
-
name: 'NewKeeperSet';
|
|
1615
|
-
fields: [{
|
|
1616
|
-
name: 'keeper';
|
|
1617
|
-
type: 'publicKey';
|
|
1618
|
-
index: false;
|
|
1619
|
-
}];
|
|
1620
|
-
}, {
|
|
1621
|
-
name: 'NewManagerSet';
|
|
1622
|
-
fields: [{
|
|
1623
|
-
name: 'manager';
|
|
1624
|
-
type: 'publicKey';
|
|
1625
|
-
index: false;
|
|
1626
|
-
}];
|
|
1627
|
-
}, {
|
|
1628
|
-
name: 'OracleBufferSet';
|
|
1629
|
-
fields: [{
|
|
1630
|
-
name: 'oracleBuffer';
|
|
1631
|
-
type: 'u64';
|
|
1632
|
-
index: false;
|
|
1633
|
-
}];
|
|
1634
|
-
}, {
|
|
1635
|
-
name: 'OracleUpdated';
|
|
1636
|
-
fields: [{
|
|
1637
|
-
name: 'averageExternalEquity';
|
|
1638
|
-
type: 'u64';
|
|
1639
|
-
index: false;
|
|
1640
|
-
}];
|
|
1641
|
-
}, {
|
|
1642
|
-
name: 'PausedDepositsWithdrawals';
|
|
1643
|
-
fields: [{
|
|
1644
|
-
name: 'paused';
|
|
1645
|
-
type: 'bool';
|
|
1646
|
-
index: false;
|
|
1647
|
-
}, {
|
|
1648
|
-
name: 'bundleAccountKey';
|
|
1649
|
-
type: 'publicKey';
|
|
1650
|
-
index: false;
|
|
1651
|
-
}];
|
|
1652
|
-
}, {
|
|
1653
|
-
name: 'Redeemed';
|
|
1654
|
-
fields: [{
|
|
1655
|
-
name: 'from';
|
|
1656
|
-
type: 'publicKey';
|
|
1657
|
-
index: false;
|
|
1658
|
-
}, {
|
|
1659
|
-
name: 'to';
|
|
1660
|
-
type: 'publicKey';
|
|
1661
|
-
index: false;
|
|
1662
|
-
}, {
|
|
1663
|
-
name: 'netAmount';
|
|
1664
|
-
type: 'u64';
|
|
1665
|
-
index: false;
|
|
1666
|
-
}, {
|
|
1667
|
-
name: 'feeAmount';
|
|
1668
|
-
type: 'u64';
|
|
1669
|
-
index: false;
|
|
1670
|
-
}, {
|
|
1671
|
-
name: 'timestamp';
|
|
1672
|
-
type: 'i64';
|
|
1673
|
-
index: false;
|
|
1674
|
-
}, {
|
|
1675
|
-
name: 'bundleAccountKey';
|
|
1676
|
-
type: 'publicKey';
|
|
1677
|
-
index: false;
|
|
1678
|
-
}];
|
|
1679
|
-
}, {
|
|
1680
|
-
name: 'Refilled';
|
|
1681
|
-
fields: [{
|
|
1682
|
-
name: 'from';
|
|
1683
|
-
type: 'publicKey';
|
|
1684
|
-
index: false;
|
|
1685
|
-
}, {
|
|
1686
|
-
name: 'refillValue';
|
|
1687
|
-
type: 'u64';
|
|
1688
|
-
index: false;
|
|
1689
|
-
}, {
|
|
1690
|
-
name: 'timestamp';
|
|
1691
|
-
type: 'i64';
|
|
1692
|
-
index: false;
|
|
1693
|
-
}];
|
|
1694
|
-
}, {
|
|
1695
|
-
name: 'RefundedDeposit';
|
|
1696
|
-
fields: [{
|
|
1697
|
-
name: 'user';
|
|
1698
|
-
type: 'publicKey';
|
|
1699
|
-
index: false;
|
|
1700
|
-
}, {
|
|
1701
|
-
name: 'amount';
|
|
1702
|
-
type: 'u64';
|
|
1703
|
-
index: false;
|
|
1704
|
-
}, {
|
|
1705
|
-
name: 'timestamp';
|
|
1706
|
-
type: 'i64';
|
|
1707
|
-
index: false;
|
|
1708
|
-
}, {
|
|
1709
|
-
name: 'bundleAccountKey';
|
|
1710
|
-
type: 'publicKey';
|
|
1711
|
-
index: false;
|
|
1712
|
-
}];
|
|
1713
|
-
}, {
|
|
1714
|
-
name: 'RequestedWithdrawalToDriftVault';
|
|
1715
|
-
fields: [{
|
|
1716
|
-
name: 'amount';
|
|
1717
|
-
type: 'u64';
|
|
1718
|
-
index: false;
|
|
1719
|
-
}, {
|
|
1720
|
-
name: 'from';
|
|
1721
|
-
type: 'publicKey';
|
|
1722
|
-
index: false;
|
|
1723
|
-
}, {
|
|
1724
|
-
name: 'to';
|
|
1725
|
-
type: 'publicKey';
|
|
1726
|
-
index: false;
|
|
1727
|
-
}, {
|
|
1728
|
-
name: 'timestamp';
|
|
1729
|
-
type: 'i64';
|
|
1730
|
-
index: false;
|
|
1731
|
-
}];
|
|
1732
|
-
}, {
|
|
1733
|
-
name: 'StrategyAdded';
|
|
1734
|
-
fields: [{
|
|
1735
|
-
name: 'receiverAddress';
|
|
1736
|
-
type: 'publicKey';
|
|
1737
|
-
index: false;
|
|
1738
|
-
}, {
|
|
1739
|
-
name: 'allocationBps';
|
|
1740
|
-
type: 'u32';
|
|
1741
|
-
index: false;
|
|
1742
|
-
}];
|
|
1743
|
-
}, {
|
|
1744
|
-
name: 'StrategyEnabled';
|
|
1745
|
-
fields: [{
|
|
1746
|
-
name: 'receiverAddress';
|
|
1747
|
-
type: 'publicKey';
|
|
1748
|
-
index: false;
|
|
1749
|
-
}];
|
|
1750
|
-
}, {
|
|
1751
|
-
name: 'StrategyRemoved';
|
|
1752
|
-
fields: [{
|
|
1753
|
-
name: 'receiverAddress';
|
|
1754
|
-
type: 'publicKey';
|
|
1755
|
-
index: false;
|
|
1756
|
-
}];
|
|
1757
|
-
}, {
|
|
1758
|
-
name: 'VaultNeutralFeeIncrementerSet';
|
|
1759
|
-
fields: [{
|
|
1760
|
-
name: 'neutralFeeIncrementer';
|
|
1761
|
-
type: 'publicKey';
|
|
1762
|
-
index: false;
|
|
1763
|
-
}];
|
|
1764
|
-
}, {
|
|
1765
|
-
name: 'WithdrawalRequested';
|
|
1766
|
-
fields: [{
|
|
1767
|
-
name: 'user';
|
|
1768
|
-
type: 'publicKey';
|
|
1769
|
-
index: false;
|
|
1770
|
-
}, {
|
|
1771
|
-
name: 'amount';
|
|
1772
|
-
type: 'u128';
|
|
1773
|
-
index: false;
|
|
1774
|
-
}, {
|
|
1775
|
-
name: 'timestamp';
|
|
1776
|
-
type: 'i64';
|
|
1777
|
-
index: false;
|
|
1778
|
-
}, {
|
|
1779
|
-
name: 'cooldownPeriod';
|
|
1780
|
-
type: 'i64';
|
|
1781
|
-
index: false;
|
|
1782
|
-
}, {
|
|
1783
|
-
name: 'estimatedPendingWithdrawalValue';
|
|
1784
|
-
type: 'u64';
|
|
1785
|
-
index: false;
|
|
1786
|
-
}, {
|
|
1787
|
-
name: 'bundleAccountKey';
|
|
1788
|
-
type: 'publicKey';
|
|
1789
|
-
index: false;
|
|
1790
|
-
}];
|
|
1791
|
-
}, {
|
|
1792
|
-
name: 'WithdrawnFromDriftVault';
|
|
1793
|
-
fields: [{
|
|
1794
|
-
name: 'amount';
|
|
1795
|
-
type: 'u64';
|
|
1796
|
-
index: false;
|
|
1797
|
-
}, {
|
|
1798
|
-
name: 'from';
|
|
1799
|
-
type: 'publicKey';
|
|
1800
|
-
index: false;
|
|
1801
|
-
}, {
|
|
1802
|
-
name: 'to';
|
|
1803
|
-
type: 'publicKey';
|
|
1804
|
-
index: false;
|
|
1805
|
-
}, {
|
|
1806
|
-
name: 'timestamp';
|
|
1807
|
-
type: 'i64';
|
|
1808
|
-
index: false;
|
|
1809
|
-
}];
|
|
1810
|
-
}];
|
|
1811
|
-
errors: [{
|
|
1812
|
-
code: 6000;
|
|
1813
|
-
name: 'InsufficientFunds';
|
|
1814
|
-
msg: 'Insufficient funds to process withdrawal';
|
|
1815
|
-
}, {
|
|
1816
|
-
code: 6001;
|
|
1817
|
-
name: 'AllocationAmountZero';
|
|
1818
|
-
msg: 'Allocation amount must be > 0';
|
|
1819
|
-
}, {
|
|
1820
|
-
code: 6002;
|
|
1821
|
-
name: 'RedemptionAmountExceeded';
|
|
1822
|
-
msg: 'Redemption exceeds bundle balance';
|
|
1823
|
-
}, {
|
|
1824
|
-
code: 6003;
|
|
1825
|
-
name: 'RefillAmountInvalid';
|
|
1826
|
-
msg: 'Refill amount must be > 0';
|
|
1827
|
-
}, {
|
|
1828
|
-
code: 6004;
|
|
1829
|
-
name: 'UnauthorizedKeeperAction';
|
|
1830
|
-
msg: 'Not bundle keeper';
|
|
1831
|
-
}, {
|
|
1832
|
-
code: 6005;
|
|
1833
|
-
name: 'UnauthorizedManagerAction';
|
|
1834
|
-
msg: 'Not bundle manager';
|
|
1835
|
-
}, {
|
|
1836
|
-
code: 6006;
|
|
1837
|
-
name: 'UnauthorizedAdminAction';
|
|
1838
|
-
msg: 'Not bundle admin';
|
|
1839
|
-
}, {
|
|
1840
|
-
code: 6007;
|
|
1841
|
-
name: 'UnauthorizedBundleCreator';
|
|
1842
|
-
msg: 'Not whitelisted bundle creator';
|
|
1843
|
-
}, {
|
|
1844
|
-
code: 6008;
|
|
1845
|
-
name: 'CallerNotNeutralFeeIncrementer';
|
|
1846
|
-
msg: 'Not neutral fee incrementer';
|
|
1847
|
-
}, {
|
|
1848
|
-
code: 6009;
|
|
1849
|
-
name: 'AmountMustBeBelowMax';
|
|
1850
|
-
msg: 'Amount above max limit';
|
|
1851
|
-
}, {
|
|
1852
|
-
code: 6010;
|
|
1853
|
-
name: 'InvalidNeutralFeeIncrementer';
|
|
1854
|
-
msg: 'Invalid fee incrementer';
|
|
1855
|
-
}, {
|
|
1856
|
-
code: 6011;
|
|
1857
|
-
name: 'InvalidReceiver';
|
|
1858
|
-
msg: 'Invalid receiver address';
|
|
1859
|
-
}, {
|
|
1860
|
-
code: 6012;
|
|
1861
|
-
name: 'MathError';
|
|
1862
|
-
msg: 'Math error';
|
|
1863
|
-
}, {
|
|
1864
|
-
code: 6013;
|
|
1865
|
-
name: 'InvalidAllocations';
|
|
1866
|
-
msg: 'Invalid allocations';
|
|
1867
|
-
}, {
|
|
1868
|
-
code: 6014;
|
|
1869
|
-
name: 'MustBeInWhitelist';
|
|
1870
|
-
msg: 'Not in whitelist';
|
|
1871
|
-
}, {
|
|
1872
|
-
code: 6015;
|
|
1873
|
-
name: 'DistributionAlreadyStarted';
|
|
1874
|
-
msg: 'Distribution already started';
|
|
1875
|
-
}, {
|
|
1876
|
-
code: 6016;
|
|
1877
|
-
name: 'DistributionNotStarted';
|
|
1878
|
-
msg: 'Distribution not started';
|
|
1879
|
-
}, {
|
|
1880
|
-
code: 6017;
|
|
1881
|
-
name: 'LeftToDistributeNotZero';
|
|
1882
|
-
msg: 'Distribution amount not zero';
|
|
1883
|
-
}, {
|
|
1884
|
-
code: 6018;
|
|
1885
|
-
name: 'ReceiverAlreadyAllocated';
|
|
1886
|
-
msg: 'Receiver already allocated';
|
|
1887
|
-
}, {
|
|
1888
|
-
code: 6019;
|
|
1889
|
-
name: 'RawTransferReceiver';
|
|
1890
|
-
msg: 'Not a raw transfer receiver';
|
|
1891
|
-
}, {
|
|
1892
|
-
code: 6020;
|
|
1893
|
-
name: 'InvalidTwapPeriod';
|
|
1894
|
-
msg: 'Invalid twap period';
|
|
1895
|
-
}, {
|
|
1896
|
-
code: 6021;
|
|
1897
|
-
name: 'RefillAmountExceeded';
|
|
1898
|
-
msg: 'Refill amount exceeded';
|
|
1899
|
-
}, {
|
|
1900
|
-
code: 6022;
|
|
1901
|
-
name: 'PodTokenTotalSupplyZero';
|
|
1902
|
-
msg: 'Pod token total supply is zero';
|
|
1903
|
-
}, {
|
|
1904
|
-
code: 6023;
|
|
1905
|
-
name: 'AllocationBpsGreaterThanGlobalAllocationBps';
|
|
1906
|
-
msg: 'Allocation bps greater than global allocation bps';
|
|
1907
|
-
}, {
|
|
1908
|
-
code: 6024;
|
|
1909
|
-
name: 'EquityOutOfBufferBound';
|
|
1910
|
-
msg: 'Equity out of buffer bound';
|
|
1911
|
-
}, {
|
|
1912
|
-
code: 6025;
|
|
1913
|
-
name: 'RedemptionAmountZero';
|
|
1914
|
-
msg: 'Redemption amount must be > 0';
|
|
1915
|
-
}, {
|
|
1916
|
-
code: 6026;
|
|
1917
|
-
name: 'PendingDepositExists';
|
|
1918
|
-
msg: 'Pending deposit exists';
|
|
1919
|
-
}, {
|
|
1920
|
-
code: 6027;
|
|
1921
|
-
name: 'InsufficientSharesBalance';
|
|
1922
|
-
msg: 'Insufficient Shares balance';
|
|
1923
|
-
}, {
|
|
1924
|
-
code: 6028;
|
|
1925
|
-
name: 'PendingWithdrawalExists';
|
|
1926
|
-
msg: 'Pending withdrawal exists';
|
|
1927
|
-
}, {
|
|
1928
|
-
code: 6029;
|
|
1929
|
-
name: 'PendingDepositOrWithdrawalExists';
|
|
1930
|
-
msg: 'Pending deposit or withdrawal exists';
|
|
1931
|
-
}, {
|
|
1932
|
-
code: 6030;
|
|
1933
|
-
name: 'NoPendingWithdrawal';
|
|
1934
|
-
msg: 'No pending withdrawal';
|
|
1935
|
-
}, {
|
|
1936
|
-
code: 6031;
|
|
1937
|
-
name: 'WithdrawalAlreadyProcessed';
|
|
1938
|
-
msg: 'Withdrawal already processed';
|
|
1939
|
-
}, {
|
|
1940
|
-
code: 6032;
|
|
1941
|
-
name: 'PendingDepositAmountZero';
|
|
1942
|
-
msg: 'Pending deposit amount is zero';
|
|
1943
|
-
}, {
|
|
1944
|
-
code: 6033;
|
|
1945
|
-
name: 'InsufficientBundleBalance';
|
|
1946
|
-
msg: 'Insufficient bundle balance';
|
|
1947
|
-
}, {
|
|
1948
|
-
code: 6034;
|
|
1949
|
-
name: 'NoPendingTransactions';
|
|
1950
|
-
msg: 'No pending transactions';
|
|
1951
|
-
}, {
|
|
1952
|
-
code: 6035;
|
|
1953
|
-
name: 'DepositsExtraInPendingsNotZero';
|
|
1954
|
-
msg: 'Deposits extra in pendings not zero';
|
|
1955
|
-
}, {
|
|
1956
|
-
code: 6036;
|
|
1957
|
-
name: 'PendingTransactionsExist';
|
|
1958
|
-
msg: 'Pending transactions exist';
|
|
1959
|
-
}, {
|
|
1960
|
-
code: 6037;
|
|
1961
|
-
name: 'ManagerSharesZero';
|
|
1962
|
-
msg: 'Manager shares is zero';
|
|
1963
|
-
}, {
|
|
1964
|
-
code: 6038;
|
|
1965
|
-
name: 'PausedDepositsWithdrawals';
|
|
1966
|
-
msg: 'Paused deposits withdrawals';
|
|
1967
|
-
}, {
|
|
1968
|
-
code: 6039;
|
|
1969
|
-
name: 'UnpausedDepositsWithdrawals';
|
|
1970
|
-
msg: 'Unpaused deposits withdrawals';
|
|
1971
|
-
}, {
|
|
1972
|
-
code: 6040;
|
|
1973
|
-
name: 'NettingNotDone';
|
|
1974
|
-
msg: 'Netting not done';
|
|
1975
|
-
}, {
|
|
1976
|
-
code: 6041;
|
|
1977
|
-
name: 'NettingAlreadyDone';
|
|
1978
|
-
msg: 'Netting already done';
|
|
1979
|
-
}, {
|
|
1980
|
-
code: 6042;
|
|
1981
|
-
name: 'OracleNotUpdated';
|
|
1982
|
-
msg: 'Oracle not updated';
|
|
1983
|
-
}, {
|
|
1984
|
-
code: 6043;
|
|
1985
|
-
name: 'MaxDepositAmountExceeded';
|
|
1986
|
-
msg: 'Max deposit amount exceeded';
|
|
1987
|
-
}, {
|
|
1988
|
-
code: 6044;
|
|
1989
|
-
name: 'TotalAssetExceedNewMaxDepositAmount';
|
|
1990
|
-
msg: 'Total asset exceed new max deposit amount';
|
|
1991
|
-
}, {
|
|
1992
|
-
code: 6045;
|
|
1993
|
-
name: 'AllocationBpsIsZero';
|
|
1994
|
-
msg: 'Allocation bps is zero';
|
|
1995
|
-
}, {
|
|
1996
|
-
code: 6046;
|
|
1997
|
-
name: 'DepositAmountZero';
|
|
1998
|
-
msg: 'Deposit amount is zero';
|
|
1999
|
-
}, {
|
|
2000
|
-
code: 6047;
|
|
2001
|
-
name: 'InvalidWithdrawalDelay';
|
|
2002
|
-
msg: 'Invalid withdrawal delay';
|
|
2003
|
-
}, {
|
|
2004
|
-
code: 6048;
|
|
2005
|
-
name: 'InvalidWithdrawalCooldownPeriod';
|
|
2006
|
-
msg: 'Invalid withdrawal cooldown period';
|
|
2007
|
-
}, {
|
|
2008
|
-
code: 6049;
|
|
2009
|
-
name: 'InvalidOracleBuffer';
|
|
2010
|
-
msg: 'Invalid oracle buffer';
|
|
2011
|
-
}, {
|
|
2012
|
-
code: 6050;
|
|
2013
|
-
name: 'ExcessivePerformanceFee';
|
|
2014
|
-
msg: 'Excessive performance fee';
|
|
2015
|
-
}, {
|
|
2016
|
-
code: 6051;
|
|
2017
|
-
name: 'ExcessiveManagementFee';
|
|
2018
|
-
msg: 'Excessive management fee';
|
|
2019
|
-
}, {
|
|
2020
|
-
code: 6052;
|
|
2021
|
-
name: 'ExcessiveDepositFee';
|
|
2022
|
-
msg: 'Excessive deposit fee';
|
|
2023
|
-
}, {
|
|
2024
|
-
code: 6053;
|
|
2025
|
-
name: 'ExcessiveWithdrawFee';
|
|
2026
|
-
msg: 'Excessive withdraw fee';
|
|
2027
|
-
}, {
|
|
2028
|
-
code: 6054;
|
|
2029
|
-
name: 'WithdrawalDelayNotMet';
|
|
2030
|
-
msg: 'Withdrawal delay not met';
|
|
2031
|
-
}, {
|
|
2032
|
-
code: 6055;
|
|
2033
|
-
name: 'InvalidAssetPrecision';
|
|
2034
|
-
msg: 'Invalid asset precision';
|
|
2035
|
-
}, {
|
|
2036
|
-
code: 6056;
|
|
2037
|
-
name: 'InvalidAssetAddress';
|
|
2038
|
-
msg: 'Invalid asset address';
|
|
2039
|
-
}, {
|
|
2040
|
-
code: 6057;
|
|
2041
|
-
name: 'InvalidPermissionnedDepositor';
|
|
2042
|
-
msg: 'Invalid permissionned depositor';
|
|
2043
|
-
}, {
|
|
2044
|
-
code: 6058;
|
|
2045
|
-
name: 'PayerNotAuthority';
|
|
2046
|
-
msg: 'Payer is not the authority';
|
|
2047
|
-
}, {
|
|
2048
|
-
code: 6059;
|
|
2049
|
-
name: 'StrategyAlreadyEnabled';
|
|
2050
|
-
msg: 'Strategy is already enabled';
|
|
2051
|
-
}, {
|
|
2052
|
-
code: 6060;
|
|
2053
|
-
name: 'StrategyDisabled';
|
|
2054
|
-
msg: 'Strategy is disabled';
|
|
2055
|
-
}, {
|
|
2056
|
-
code: 6061;
|
|
2057
|
-
name: 'InvalidWithdrawalAmount';
|
|
2058
|
-
msg: 'Invalid withdrawal amount';
|
|
2059
|
-
}, {
|
|
2060
|
-
code: 6062;
|
|
2061
|
-
name: 'BundleNotPermissionned';
|
|
2062
|
-
msg: 'Not permissionned';
|
|
2063
|
-
}, {
|
|
2064
|
-
code: 6063;
|
|
2065
|
-
name: 'BundleIsPermissionned';
|
|
2066
|
-
msg: 'Bundle is permissionned, use initialize_permissioned_bundle_depositor';
|
|
2067
|
-
}];
|
|
2068
|
-
}
|
|
2069
|
-
//#endregion
|
|
2070
|
-
//#region src/idl/bundle-v2.d.ts
|
|
9
|
+
//#region src/idl/ntbundle.d.ts
|
|
2071
10
|
/**
|
|
2072
11
|
* Program IDL in camelCase format in order to be used in JS/TS.
|
|
2073
12
|
*
|
|
2074
13
|
* Note that this is only a type helper and is not the actual IDL. The original
|
|
2075
14
|
* IDL can be found at `target/idl/ntbundle.json`.
|
|
2076
15
|
*/
|
|
2077
|
-
interface
|
|
2078
|
-
address: '
|
|
16
|
+
interface Ntbundle {
|
|
17
|
+
address: 'BUNDDh4P5XviMm1f3gCvnq2qKx6TGosAGnoUK12e7cXU';
|
|
2079
18
|
metadata: {
|
|
2080
19
|
name: 'ntbundle';
|
|
2081
20
|
version: '0.1.0';
|
|
@@ -2507,6 +446,15 @@ interface NtbundleV2 {
|
|
|
2507
446
|
}, {
|
|
2508
447
|
name: 'oracleUpdateTimeLimit';
|
|
2509
448
|
type: 'i64';
|
|
449
|
+
}, {
|
|
450
|
+
name: 'withdrawalRedemptionRequestCutoffTs';
|
|
451
|
+
type: 'i64';
|
|
452
|
+
}, {
|
|
453
|
+
name: 'withdrawalRedemptionUnlockCurrentCycleTs';
|
|
454
|
+
type: 'i64';
|
|
455
|
+
}, {
|
|
456
|
+
name: 'withdrawalRedemptionUnlockNextCycleTs';
|
|
457
|
+
type: 'i64';
|
|
2510
458
|
}, {
|
|
2511
459
|
name: 'permissionned';
|
|
2512
460
|
type: 'bool';
|
|
@@ -3587,6 +1535,27 @@ interface NtbundleV2 {
|
|
|
3587
1535
|
name: 'oracleUpdateTimeLimit';
|
|
3588
1536
|
type: 'i64';
|
|
3589
1537
|
}];
|
|
1538
|
+
}, {
|
|
1539
|
+
name: 'setWithdrawalRedemptionSchedule';
|
|
1540
|
+
discriminator: [134, 108, 237, 103, 185, 13, 177, 105];
|
|
1541
|
+
accounts: [{
|
|
1542
|
+
name: 'manager';
|
|
1543
|
+
writable: true;
|
|
1544
|
+
signer: true;
|
|
1545
|
+
}, {
|
|
1546
|
+
name: 'bundleAccount';
|
|
1547
|
+
writable: true;
|
|
1548
|
+
}];
|
|
1549
|
+
args: [{
|
|
1550
|
+
name: 'withdrawalRedemptionRequestCutoffTs';
|
|
1551
|
+
type: 'i64';
|
|
1552
|
+
}, {
|
|
1553
|
+
name: 'withdrawalRedemptionUnlockCurrentCycleTs';
|
|
1554
|
+
type: 'i64';
|
|
1555
|
+
}, {
|
|
1556
|
+
name: 'withdrawalRedemptionUnlockNextCycleTs';
|
|
1557
|
+
type: 'i64';
|
|
1558
|
+
}];
|
|
3590
1559
|
}, {
|
|
3591
1560
|
name: 'startDistribution';
|
|
3592
1561
|
discriminator: [118, 230, 215, 75, 83, 2, 163, 35];
|
|
@@ -3841,6 +1810,9 @@ interface NtbundleV2 {
|
|
|
3841
1810
|
}, {
|
|
3842
1811
|
name: 'vaultNeutralFeeIncrementerSet';
|
|
3843
1812
|
discriminator: [7, 53, 169, 104, 118, 22, 134, 207];
|
|
1813
|
+
}, {
|
|
1814
|
+
name: 'withdrawalRedemptionScheduleSet';
|
|
1815
|
+
discriminator: [245, 195, 40, 76, 237, 247, 150, 107];
|
|
3844
1816
|
}, {
|
|
3845
1817
|
name: 'withdrawalRequested';
|
|
3846
1818
|
discriminator: [75, 207, 21, 12, 160, 102, 150, 55];
|
|
@@ -4128,6 +2100,10 @@ interface NtbundleV2 {
|
|
|
4128
2100
|
code: 6069;
|
|
4129
2101
|
name: 'invalidOracleUpdateTimeLimit';
|
|
4130
2102
|
msg: 'Invalid oracle update time limit';
|
|
2103
|
+
}, {
|
|
2104
|
+
code: 6070;
|
|
2105
|
+
name: 'invalidWithdrawalRedemptionSchedule';
|
|
2106
|
+
msg: 'Invalid withdrawal redemption schedule';
|
|
4131
2107
|
}];
|
|
4132
2108
|
types: [{
|
|
4133
2109
|
name: 'allocated';
|
|
@@ -4148,6 +2124,21 @@ interface NtbundleV2 {
|
|
|
4148
2124
|
}, {
|
|
4149
2125
|
name: 'bundleAccountKey';
|
|
4150
2126
|
type: 'pubkey';
|
|
2127
|
+
}, {
|
|
2128
|
+
name: 'netAmount';
|
|
2129
|
+
type: 'u64';
|
|
2130
|
+
}, {
|
|
2131
|
+
name: 'sharePrice';
|
|
2132
|
+
type: 'u128';
|
|
2133
|
+
}, {
|
|
2134
|
+
name: 'userSharesBefore';
|
|
2135
|
+
type: 'u128';
|
|
2136
|
+
}, {
|
|
2137
|
+
name: 'userSharesAfter';
|
|
2138
|
+
type: 'u128';
|
|
2139
|
+
}, {
|
|
2140
|
+
name: 'totalShares';
|
|
2141
|
+
type: 'u128';
|
|
4151
2142
|
}];
|
|
4152
2143
|
};
|
|
4153
2144
|
}, {
|
|
@@ -4218,9 +2209,6 @@ interface NtbundleV2 {
|
|
|
4218
2209
|
}, {
|
|
4219
2210
|
name: 'maxDepositAmount';
|
|
4220
2211
|
type: 'u64';
|
|
4221
|
-
}, {
|
|
4222
|
-
name: 'minDepositAmount';
|
|
4223
|
-
type: 'u64';
|
|
4224
2212
|
}, {
|
|
4225
2213
|
name: 'withdrawalDelay';
|
|
4226
2214
|
type: 'u64';
|
|
@@ -4245,12 +2233,6 @@ interface NtbundleV2 {
|
|
|
4245
2233
|
}, {
|
|
4246
2234
|
name: 'oracleBuffer';
|
|
4247
2235
|
type: 'u64';
|
|
4248
|
-
}, {
|
|
4249
|
-
name: 'oracleUpdateTimeLimit';
|
|
4250
|
-
type: 'i64';
|
|
4251
|
-
}, {
|
|
4252
|
-
name: 'oracleMaxAge';
|
|
4253
|
-
type: 'i64';
|
|
4254
2236
|
}, {
|
|
4255
2237
|
name: 'totalShares';
|
|
4256
2238
|
type: 'u128';
|
|
@@ -4278,10 +2260,28 @@ interface NtbundleV2 {
|
|
|
4278
2260
|
}, {
|
|
4279
2261
|
name: 'managerMfeeShares';
|
|
4280
2262
|
type: 'u128';
|
|
2263
|
+
}, {
|
|
2264
|
+
name: 'minDepositAmount';
|
|
2265
|
+
type: 'u64';
|
|
2266
|
+
}, {
|
|
2267
|
+
name: 'oracleUpdateTimeLimit';
|
|
2268
|
+
type: 'i64';
|
|
2269
|
+
}, {
|
|
2270
|
+
name: 'oracleMaxAge';
|
|
2271
|
+
type: 'i64';
|
|
2272
|
+
}, {
|
|
2273
|
+
name: 'withdrawalRedemptionRequestCutoffTs';
|
|
2274
|
+
type: 'i64';
|
|
2275
|
+
}, {
|
|
2276
|
+
name: 'withdrawalRedemptionUnlockCurrentCycleTs';
|
|
2277
|
+
type: 'i64';
|
|
2278
|
+
}, {
|
|
2279
|
+
name: 'withdrawalRedemptionUnlockNextCycleTs';
|
|
2280
|
+
type: 'i64';
|
|
4281
2281
|
}, {
|
|
4282
2282
|
name: 'padding';
|
|
4283
2283
|
type: {
|
|
4284
|
-
array: ['u8',
|
|
2284
|
+
array: ['u8', 207];
|
|
4285
2285
|
};
|
|
4286
2286
|
}];
|
|
4287
2287
|
};
|
|
@@ -4481,6 +2481,18 @@ interface NtbundleV2 {
|
|
|
4481
2481
|
}, {
|
|
4482
2482
|
name: 'toppingUp';
|
|
4483
2483
|
type: 'bool';
|
|
2484
|
+
}, {
|
|
2485
|
+
name: 'grossAmount';
|
|
2486
|
+
type: 'u64';
|
|
2487
|
+
}, {
|
|
2488
|
+
name: 'feeAmount';
|
|
2489
|
+
type: 'u64';
|
|
2490
|
+
}, {
|
|
2491
|
+
name: 'netAmount';
|
|
2492
|
+
type: 'u64';
|
|
2493
|
+
}, {
|
|
2494
|
+
name: 'assetMint';
|
|
2495
|
+
type: 'pubkey';
|
|
4484
2496
|
}];
|
|
4485
2497
|
};
|
|
4486
2498
|
}, {
|
|
@@ -4738,6 +2750,24 @@ interface NtbundleV2 {
|
|
|
4738
2750
|
}, {
|
|
4739
2751
|
name: 'bundleAccountKey';
|
|
4740
2752
|
type: 'pubkey';
|
|
2753
|
+
}, {
|
|
2754
|
+
name: 'grossAmount';
|
|
2755
|
+
type: 'u64';
|
|
2756
|
+
}, {
|
|
2757
|
+
name: 'sharePrice';
|
|
2758
|
+
type: 'u128';
|
|
2759
|
+
}, {
|
|
2760
|
+
name: 'userSharesBefore';
|
|
2761
|
+
type: 'u128';
|
|
2762
|
+
}, {
|
|
2763
|
+
name: 'userSharesAfter';
|
|
2764
|
+
type: 'u128';
|
|
2765
|
+
}, {
|
|
2766
|
+
name: 'totalSharesBefore';
|
|
2767
|
+
type: 'u128';
|
|
2768
|
+
}, {
|
|
2769
|
+
name: 'totalSharesAfter';
|
|
2770
|
+
type: 'u128';
|
|
4741
2771
|
}];
|
|
4742
2772
|
};
|
|
4743
2773
|
}, {
|
|
@@ -4915,6 +2945,21 @@ interface NtbundleV2 {
|
|
|
4915
2945
|
type: 'pubkey';
|
|
4916
2946
|
}];
|
|
4917
2947
|
};
|
|
2948
|
+
}, {
|
|
2949
|
+
name: 'withdrawalRedemptionScheduleSet';
|
|
2950
|
+
type: {
|
|
2951
|
+
kind: 'struct';
|
|
2952
|
+
fields: [{
|
|
2953
|
+
name: 'withdrawalRedemptionRequestCutoffTs';
|
|
2954
|
+
type: 'i64';
|
|
2955
|
+
}, {
|
|
2956
|
+
name: 'withdrawalRedemptionUnlockCurrentCycleTs';
|
|
2957
|
+
type: 'i64';
|
|
2958
|
+
}, {
|
|
2959
|
+
name: 'withdrawalRedemptionUnlockNextCycleTs';
|
|
2960
|
+
type: 'i64';
|
|
2961
|
+
}];
|
|
2962
|
+
};
|
|
4918
2963
|
}, {
|
|
4919
2964
|
name: 'withdrawalRequested';
|
|
4920
2965
|
type: {
|
|
@@ -4937,6 +2982,12 @@ interface NtbundleV2 {
|
|
|
4937
2982
|
}, {
|
|
4938
2983
|
name: 'bundleAccountKey';
|
|
4939
2984
|
type: 'pubkey';
|
|
2985
|
+
}, {
|
|
2986
|
+
name: 'cooldownEndTimestamp';
|
|
2987
|
+
type: 'i64';
|
|
2988
|
+
}, {
|
|
2989
|
+
name: 'estimatedNetAmount';
|
|
2990
|
+
type: 'u64';
|
|
4940
2991
|
}];
|
|
4941
2992
|
};
|
|
4942
2993
|
}, {
|
|
@@ -4960,114 +3011,11 @@ interface NtbundleV2 {
|
|
|
4960
3011
|
}];
|
|
4961
3012
|
}
|
|
4962
3013
|
//#endregion
|
|
4963
|
-
//#region src/types/bundle-types.d.ts
|
|
4964
|
-
type UserBundleAccount = IdlAccounts<NtbundleV1>['userBundleAccount'] | IdlAccounts$1<NtbundleV2>['userBundleAccount'];
|
|
4965
|
-
type UserBundleTempData = IdlAccounts<NtbundleV1>['bundleTempData'] | IdlAccounts$1<NtbundleV2>['bundleTempData'];
|
|
4966
|
-
type OracleData = IdlAccounts<NtbundleV1>['oracleData'] | IdlAccounts$1<NtbundleV2>['oracleData'];
|
|
4967
|
-
type BundleAccount = IdlAccounts<NtbundleV1>['bundle'] | IdlAccounts$1<NtbundleV2>['bundle'];
|
|
4968
|
-
//#endregion
|
|
4969
|
-
//#region src/types/vault-types.d.ts
|
|
4970
|
-
declare enum VaultType {
|
|
4971
|
-
Drift = "Drift",
|
|
4972
|
-
Bundle = "Bundle",
|
|
4973
|
-
Hyperliquid = "Hyperliquid",
|
|
4974
|
-
Kamino = "Kamino",
|
|
4975
|
-
}
|
|
4976
|
-
declare enum VaultCategory {
|
|
4977
|
-
marketNeutral = "Market Neutral",
|
|
4978
|
-
directional = "Directional",
|
|
4979
|
-
etf = "Index",
|
|
4980
|
-
bet = "Bet",
|
|
4981
|
-
savings = "Savings",
|
|
4982
|
-
privateCredit = "Private Credit",
|
|
4983
|
-
airdropFarming = "Airdrop Farming",
|
|
4984
|
-
yieldEnhancement = "Yield Enhancement",
|
|
4985
|
-
fundOfFund = "Fund Of Fund",
|
|
4986
|
-
}
|
|
4987
|
-
/** Raw vault entry from registry JSON */
|
|
4988
|
-
interface VaultRegistryEntry {
|
|
4989
|
-
vaultId: number;
|
|
4990
|
-
name: string;
|
|
4991
|
-
subname?: string;
|
|
4992
|
-
type: VaultType;
|
|
4993
|
-
category: VaultCategory;
|
|
4994
|
-
vaultAddress: string;
|
|
4995
|
-
depositToken: SupportedToken;
|
|
4996
|
-
pfee?: number;
|
|
4997
|
-
/** Optional Drift program ID (only for Drift vaults with non-default program) */
|
|
4998
|
-
driftProgramId?: string;
|
|
4999
|
-
/** Optional Bundle program ID (only for Bundle vaults with non-default V2 program) */
|
|
5000
|
-
bundleProgramId?: string;
|
|
5001
|
-
/** Points: eTVL multiplier (default 1) */
|
|
5002
|
-
pointsMultiplier?: number;
|
|
5003
|
-
/** Points: include in points calculation (default true) */
|
|
5004
|
-
pointsEnabled?: boolean;
|
|
5005
|
-
}
|
|
5006
|
-
/** Vault registry as a record keyed by vaultId */
|
|
5007
|
-
type VaultRegistry = Record<number, VaultRegistryEntry>;
|
|
5008
|
-
//#endregion
|
|
5009
|
-
//#region src/types/index.d.ts
|
|
5010
|
-
interface VaultBalanceData {
|
|
5011
|
-
balanceToken: number;
|
|
5012
|
-
balanceUsd: number;
|
|
5013
|
-
netEarnings: number;
|
|
5014
|
-
netEarningsUsd: number;
|
|
5015
|
-
totalDeposit: number;
|
|
5016
|
-
totalDepositUsd: number;
|
|
5017
|
-
pendingDeposit?: number;
|
|
5018
|
-
requestWithdrawToken?: number;
|
|
5019
|
-
highWaterMark?: number;
|
|
5020
|
-
/** Total profit share fee paid by the user */
|
|
5021
|
-
feesPaid?: number;
|
|
5022
|
-
pendingProfitShareFee?: number;
|
|
5023
|
-
/** Unpaid / accrued fees in deposit token; null if not applicable. Bundle: mgmt+perf estimate; Drift: pending profit share. */
|
|
5024
|
-
pendingFee: number | null;
|
|
5025
|
-
pendingFeeUsd: number | null;
|
|
5026
|
-
spotPrice: number;
|
|
5027
|
-
/** User's vault shares (raw number, not divided by decimals) */
|
|
5028
|
-
vaultShares?: number;
|
|
5029
|
-
/** User's net deposits in token amount (already divided by decimals) */
|
|
5030
|
-
netDeposit?: number;
|
|
5031
|
-
asset: SupportedToken;
|
|
5032
|
-
}
|
|
5033
|
-
type UserBalanceResult = Record<number, VaultBalanceData | null>;
|
|
5034
|
-
//#endregion
|
|
5035
|
-
//#region src/constants/points-vaults.d.ts
|
|
5036
|
-
/** Points-ready vault entry (no full Token - consumer resolves depositToken) */
|
|
5037
|
-
interface PointsVaultEntry {
|
|
5038
|
-
vaultId: number;
|
|
5039
|
-
name: string;
|
|
5040
|
-
address: string;
|
|
5041
|
-
depositToken: string;
|
|
5042
|
-
type: VaultType;
|
|
5043
|
-
multiplier: number;
|
|
5044
|
-
enabled: boolean;
|
|
5045
|
-
bundleProgramId?: string;
|
|
5046
|
-
}
|
|
5047
|
-
/**
|
|
5048
|
-
* Get vaults that earn points, filtered by pointsEnabled !== false.
|
|
5049
|
-
* Returns entries ready for points backend consumption.
|
|
5050
|
-
*/
|
|
5051
|
-
declare function getPointsVaults(registry: VaultRegistry): PointsVaultEntry[];
|
|
5052
|
-
//#endregion
|
|
5053
3014
|
//#region src/constants/programs.d.ts
|
|
5054
|
-
|
|
5055
|
-
|
|
5056
|
-
|
|
5057
|
-
|
|
5058
|
-
/**
|
|
5059
|
-
* Create Bundle Program instances for a given provider
|
|
5060
|
-
*/
|
|
5061
|
-
declare function createBundleProgramV1(provider: AnchorProvider): Program<NtbundleV1>;
|
|
5062
|
-
declare function createBundleProgramV2(provider: AnchorProvider$1): Program$1<NtbundleV2>;
|
|
5063
|
-
/**
|
|
5064
|
-
* Create both Bundle Program instances from a connection.
|
|
5065
|
-
* Use bundleProgramV1 for V1 vaults, bundleProgramV2 for V2 vaults (e.g. vault 69).
|
|
5066
|
-
*/
|
|
5067
|
-
declare function createBundlePrograms(connection: Connection): {
|
|
5068
|
-
bundleProgramV1: Program<NtbundleV1>;
|
|
5069
|
-
bundleProgramV2: Program$1<NtbundleV2>;
|
|
5070
|
-
};
|
|
3015
|
+
type BundleCluster = 'mainnet' | 'devnet';
|
|
3016
|
+
declare const DEFAULT_BUNDLE_PROGRAM_ID_MAINNET = "BUNDDh4P5XviMm1f3gCvnq2qKx6TGosAGnoUK12e7cXU";
|
|
3017
|
+
declare const DEFAULT_BUNDLE_PROGRAM_ID_DEVNET = "7trSyt7d1ZRnvfGh9JaQZwZMWtfAXMvMwN3UxgMzVFbv";
|
|
3018
|
+
declare function getDefaultBundleProgramIdByCluster(cluster?: BundleCluster): string;
|
|
5071
3019
|
//#endregion
|
|
5072
3020
|
//#region src/constants/vault-ids.d.ts
|
|
5073
3021
|
/**
|
|
@@ -5233,13 +3181,108 @@ declare enum VaultId {
|
|
|
5233
3181
|
jlp_delta_neutral_vault_1_0 = 0,
|
|
5234
3182
|
}
|
|
5235
3183
|
//#endregion
|
|
3184
|
+
//#region src/types/tokens.d.ts
|
|
3185
|
+
declare enum SupportedChain {
|
|
3186
|
+
Solana = "Solana",
|
|
3187
|
+
Hyperliquid = "Hyperliquid",
|
|
3188
|
+
}
|
|
3189
|
+
declare enum SupportedToken {
|
|
3190
|
+
USDC = "USDC",
|
|
3191
|
+
USDT = "USDT",
|
|
3192
|
+
SOL = "SOL",
|
|
3193
|
+
WBTC = "WBTC",
|
|
3194
|
+
WETH = "WETH",
|
|
3195
|
+
JLP = "JLP",
|
|
3196
|
+
}
|
|
3197
|
+
interface Token {
|
|
3198
|
+
name: string;
|
|
3199
|
+
symbol: string;
|
|
3200
|
+
onChain: { [chain in SupportedChain]: {
|
|
3201
|
+
address: string;
|
|
3202
|
+
decimals: number;
|
|
3203
|
+
} | null };
|
|
3204
|
+
}
|
|
3205
|
+
declare const tokens: { [name in SupportedToken]: Token };
|
|
3206
|
+
//#endregion
|
|
3207
|
+
//#region src/types/bundle-types.d.ts
|
|
3208
|
+
type UserBundleAccount = IdlAccounts<Ntbundle>['userBundleAccount'];
|
|
3209
|
+
type UserBundleTempData = IdlAccounts<Ntbundle>['bundleTempData'];
|
|
3210
|
+
type OracleData = IdlAccounts<Ntbundle>['oracleData'];
|
|
3211
|
+
type BundleAccount = IdlAccounts<Ntbundle>['bundle'];
|
|
3212
|
+
//#endregion
|
|
3213
|
+
//#region src/types/vault-types.d.ts
|
|
3214
|
+
declare enum VaultType {
|
|
3215
|
+
Drift = "Drift",
|
|
3216
|
+
Bundle = "Bundle",
|
|
3217
|
+
Hyperliquid = "Hyperliquid",
|
|
3218
|
+
Kamino = "Kamino",
|
|
3219
|
+
}
|
|
3220
|
+
declare enum VaultCategory {
|
|
3221
|
+
marketNeutral = "Market Neutral",
|
|
3222
|
+
directional = "Directional",
|
|
3223
|
+
etf = "Index",
|
|
3224
|
+
bet = "Bet",
|
|
3225
|
+
savings = "Savings",
|
|
3226
|
+
privateCredit = "Private Credit",
|
|
3227
|
+
airdropFarming = "Airdrop Farming",
|
|
3228
|
+
yieldEnhancement = "Yield Enhancement",
|
|
3229
|
+
fundOfFund = "Fund Of Fund",
|
|
3230
|
+
}
|
|
3231
|
+
/** Raw vault entry from registry JSON */
|
|
3232
|
+
interface VaultRegistryEntry {
|
|
3233
|
+
vaultId: number;
|
|
3234
|
+
name: string;
|
|
3235
|
+
subname?: string;
|
|
3236
|
+
type: VaultType;
|
|
3237
|
+
category: VaultCategory;
|
|
3238
|
+
vaultAddress: string;
|
|
3239
|
+
depositToken: SupportedToken;
|
|
3240
|
+
pfee?: number;
|
|
3241
|
+
/** Optional Drift program ID (only for Drift vaults with non-default program) */
|
|
3242
|
+
driftProgramId?: string;
|
|
3243
|
+
/** Optional Bundle program ID. If omitted, SDK uses cluster default bundle program ID. */
|
|
3244
|
+
bundleProgramId?: string;
|
|
3245
|
+
/** Points: eTVL multiplier (default 1) */
|
|
3246
|
+
pointsMultiplier?: number;
|
|
3247
|
+
/** Points: include in points calculation (default true) */
|
|
3248
|
+
pointsEnabled?: boolean;
|
|
3249
|
+
}
|
|
3250
|
+
/** Vault registry as a record keyed by vaultId */
|
|
3251
|
+
type VaultRegistry = Record<number, VaultRegistryEntry>;
|
|
3252
|
+
//#endregion
|
|
3253
|
+
//#region src/types/index.d.ts
|
|
3254
|
+
interface VaultBalanceData {
|
|
3255
|
+
balanceToken: number;
|
|
3256
|
+
balanceUsd: number;
|
|
3257
|
+
netEarnings: number;
|
|
3258
|
+
netEarningsUsd: number;
|
|
3259
|
+
totalDeposit: number;
|
|
3260
|
+
totalDepositUsd: number;
|
|
3261
|
+
pendingDeposit?: number;
|
|
3262
|
+
requestWithdrawToken?: number;
|
|
3263
|
+
highWaterMark?: number;
|
|
3264
|
+
/** Total profit share fee paid by the user */
|
|
3265
|
+
feesPaid?: number;
|
|
3266
|
+
pendingProfitShareFee?: number;
|
|
3267
|
+
/** Unpaid / accrued fees in deposit token; null if not applicable. Bundle: mgmt+perf estimate; Drift: pending profit share. */
|
|
3268
|
+
pendingFee: number | null;
|
|
3269
|
+
pendingFeeUsd: number | null;
|
|
3270
|
+
spotPrice: number;
|
|
3271
|
+
/** User's vault shares (raw number, not divided by decimals) */
|
|
3272
|
+
vaultShares?: number;
|
|
3273
|
+
/** User's net deposits in token amount (already divided by decimals) */
|
|
3274
|
+
netDeposit?: number;
|
|
3275
|
+
asset: SupportedToken;
|
|
3276
|
+
}
|
|
3277
|
+
type UserBalanceResult = Record<number, VaultBalanceData | null>;
|
|
3278
|
+
//#endregion
|
|
5236
3279
|
//#region src/constants/vaults.d.ts
|
|
5237
3280
|
/**
|
|
5238
3281
|
* Get Bundle Program ID for a vault config
|
|
5239
|
-
* Uses registry value if present, otherwise
|
|
3282
|
+
* Uses registry value if present, otherwise falls back to cluster default.
|
|
5240
3283
|
*/
|
|
5241
|
-
declare function getBundleProgramId(vault: VaultRegistryEntry):
|
|
5242
|
-
declare const vaults
|
|
3284
|
+
declare function getBundleProgramId(vault: VaultRegistryEntry, cluster?: BundleCluster): string | undefined;
|
|
3285
|
+
declare const vaults: VaultRegistry;
|
|
5243
3286
|
declare function isValidVaultAddress(address: string): boolean;
|
|
5244
3287
|
declare function getVaultByAddress(address: string): VaultRegistryEntry | undefined;
|
|
5245
3288
|
declare function getVaultById(vaultId: number): VaultRegistryEntry | undefined;
|
|
@@ -5247,33 +3290,41 @@ declare function getVaultById(vaultId: number): VaultRegistryEntry | undefined;
|
|
|
5247
3290
|
//#region src/NeutralTrade.d.ts
|
|
5248
3291
|
interface NeutralTradeConfig {
|
|
5249
3292
|
rpcUrl: string;
|
|
5250
|
-
/**
|
|
3293
|
+
/** Bundle program cluster selector. Defaults to 'mainnet'. */
|
|
3294
|
+
bundleCluster?: BundleCluster;
|
|
3295
|
+
/** If true, include built-in vault registry entries only when no custom registry source is provided. Defaults to true. */
|
|
3296
|
+
includeBuiltInVaults?: boolean;
|
|
3297
|
+
/** Optional local registry entries. Applied after built-in configs and before registryUrl (if provided). */
|
|
3298
|
+
registry?: VaultRegistryEntry[];
|
|
3299
|
+
/** Optional registry URL to fetch vault configurations from. If provided, fetched vaults override merged built-in/local entries. */
|
|
5251
3300
|
registryUrl?: string;
|
|
5252
3301
|
/** Optional fallback prices map. Prices are fetched from Pyth Network first; fallback is used only if Pyth returns incomplete data */
|
|
5253
3302
|
fallbackPrices?: Partial<Record<SupportedToken, number>>;
|
|
5254
3303
|
}
|
|
5255
3304
|
interface NeutralTradeCoreContext {
|
|
5256
3305
|
connection: Connection;
|
|
5257
|
-
|
|
5258
|
-
bundleProgramV2: Program$1<NtbundleV2>;
|
|
3306
|
+
bundlePrograms: Record<string, Program<Ntbundle>>;
|
|
5259
3307
|
vaults: VaultRegistry;
|
|
5260
3308
|
priceMap: Map<SupportedToken, number>;
|
|
5261
3309
|
}
|
|
5262
3310
|
declare class NeutralTrade {
|
|
5263
3311
|
readonly connection: Connection;
|
|
5264
|
-
readonly
|
|
5265
|
-
readonly
|
|
5266
|
-
/** Vault configurations
|
|
3312
|
+
readonly bundlePrograms: Record<string, Program<Ntbundle>>;
|
|
3313
|
+
readonly bundleCluster: BundleCluster;
|
|
3314
|
+
/** Vault configurations after merge order: built-in < local registry < registryUrl */
|
|
5267
3315
|
readonly vaults: VaultRegistry;
|
|
5268
3316
|
/** Price map for deposit tokens */
|
|
5269
3317
|
readonly priceMap: Map<SupportedToken, number>;
|
|
5270
|
-
protected constructor(connection: Connection,
|
|
3318
|
+
protected constructor(connection: Connection, bundlePrograms: Record<string, Program<Ntbundle>>, bundleCluster: BundleCluster, vaults: VaultRegistry, priceMap: Map<SupportedToken, number>);
|
|
5271
3319
|
/**
|
|
5272
3320
|
* Create a new NeutralTrade instance
|
|
5273
|
-
*
|
|
3321
|
+
* Merge order: built-in (when allowed) < local registry < registryUrl
|
|
3322
|
+
* @throws Error if registry or registryUrl validation fails (or fetch fails for registryUrl)
|
|
5274
3323
|
*/
|
|
5275
3324
|
protected static initCore(config: NeutralTradeConfig): Promise<NeutralTradeCoreContext>;
|
|
5276
3325
|
static create(config: NeutralTradeConfig): Promise<NeutralTrade>;
|
|
3326
|
+
private getBundleProgramForVault;
|
|
3327
|
+
private static parseVaultRegistryEntries;
|
|
5277
3328
|
/**
|
|
5278
3329
|
* Fetch vault configurations from a remote registry URL
|
|
5279
3330
|
* Expects JSON array format and transforms to Record<number, VaultConfig>
|
|
@@ -5319,28 +3370,10 @@ declare class NeutralTrade {
|
|
|
5319
3370
|
}): Promise<TransactionInstruction>;
|
|
5320
3371
|
}
|
|
5321
3372
|
//#endregion
|
|
5322
|
-
//#region src/utils/bundle.d.ts
|
|
5323
|
-
/**
|
|
5324
|
-
* Estimated unpaid bundle fees in deposit token (mgmt + performance), matching on-chain `charge_user_fees`.
|
|
5325
|
-
*/
|
|
5326
|
-
declare function estimatePendingBundleFeeToken({
|
|
5327
|
-
oracleData,
|
|
5328
|
-
bundleData,
|
|
5329
|
-
userBundle,
|
|
5330
|
-
assetDecimals,
|
|
5331
|
-
nowUnixSeconds
|
|
5332
|
-
}: {
|
|
5333
|
-
oracleData: OracleData;
|
|
5334
|
-
bundleData: BundleAccount;
|
|
5335
|
-
userBundle: UserBundleAccount;
|
|
5336
|
-
assetDecimals: number;
|
|
5337
|
-
nowUnixSeconds?: number;
|
|
5338
|
-
}): number;
|
|
5339
|
-
//#endregion
|
|
5340
3373
|
//#region src/utils/bundle-instructions.d.ts
|
|
5341
3374
|
interface BuildBundleDepositInstructionsParams {
|
|
5342
|
-
|
|
5343
|
-
|
|
3375
|
+
bundleProgram: Program<Ntbundle>;
|
|
3376
|
+
bundleCluster?: BundleCluster;
|
|
5344
3377
|
vault: VaultRegistryEntry;
|
|
5345
3378
|
user: PublicKey;
|
|
5346
3379
|
/** UI token amount (multiplied by 10**on-chain decimals inside). */
|
|
@@ -5348,32 +3381,18 @@ interface BuildBundleDepositInstructionsParams {
|
|
|
5348
3381
|
needsInit?: boolean;
|
|
5349
3382
|
}
|
|
5350
3383
|
interface BuildBundleRequestWithdrawInstructionParams {
|
|
5351
|
-
|
|
5352
|
-
|
|
3384
|
+
bundleProgram: Program<Ntbundle>;
|
|
3385
|
+
bundleCluster?: BundleCluster;
|
|
5353
3386
|
vault: VaultRegistryEntry;
|
|
5354
3387
|
user: PublicKey;
|
|
5355
3388
|
amount: number;
|
|
5356
3389
|
}
|
|
5357
|
-
/** Same share math as legacy app `useBundleRequestWithdrawMutation`. */
|
|
5358
|
-
declare function computeRequestWithdrawalSharesAmount({
|
|
5359
|
-
amount,
|
|
5360
|
-
userVaultBalance,
|
|
5361
|
-
pps,
|
|
5362
|
-
assetDecimals,
|
|
5363
|
-
userShares
|
|
5364
|
-
}: {
|
|
5365
|
-
amount: number;
|
|
5366
|
-
userVaultBalance: number;
|
|
5367
|
-
pps: number;
|
|
5368
|
-
assetDecimals: number;
|
|
5369
|
-
userShares: BN;
|
|
5370
|
-
}): BN;
|
|
5371
3390
|
/**
|
|
5372
3391
|
* Optional `initializeBundleDepositor` + `requestDeposit`. Fetches bundle account internally.
|
|
5373
3392
|
*/
|
|
5374
3393
|
declare function buildBundleDepositInstructions({
|
|
5375
|
-
|
|
5376
|
-
|
|
3394
|
+
bundleProgram,
|
|
3395
|
+
bundleCluster,
|
|
5377
3396
|
vault,
|
|
5378
3397
|
user,
|
|
5379
3398
|
amount,
|
|
@@ -5383,8 +3402,8 @@ declare function buildBundleDepositInstructions({
|
|
|
5383
3402
|
* `requestWithdrawal` only. Fetches bundle, oracle, and user bundle internally.
|
|
5384
3403
|
*/
|
|
5385
3404
|
declare function buildBundleRequestWithdrawInstruction({
|
|
5386
|
-
|
|
5387
|
-
|
|
3405
|
+
bundleProgram,
|
|
3406
|
+
bundleCluster,
|
|
5388
3407
|
vault,
|
|
5389
3408
|
user,
|
|
5390
3409
|
amount
|
|
@@ -5399,18 +3418,10 @@ declare function deriveOraclePDA(bundlePDA: PublicKey, programId: PublicKey): Pu
|
|
|
5399
3418
|
* Derive User PDA for Bundle vault
|
|
5400
3419
|
*/
|
|
5401
3420
|
declare function deriveUserPDA(userKey: PublicKey, bundlePDA: PublicKey, programId: PublicKey): PublicKey;
|
|
5402
|
-
/**
|
|
5403
|
-
* Derive Temp Data PDA for Bundle vault
|
|
5404
|
-
*/
|
|
5405
|
-
declare function deriveTempDataPDA(bundlePDA: PublicKey, programId: PublicKey): PublicKey;
|
|
5406
|
-
/**
|
|
5407
|
-
* Derive pending bundle asset authority PDA (pending deposit token ATA owner)
|
|
5408
|
-
*/
|
|
5409
|
-
declare function derivePendingAuthPDA(bundlePDA: PublicKey, programId: PublicKey): PublicKey;
|
|
5410
3421
|
/**
|
|
5411
3422
|
* Get Vault Depositor PDA for Drift vault
|
|
5412
3423
|
* Custom code to handle jlpdnv1 special case
|
|
5413
3424
|
*/
|
|
5414
3425
|
declare function getVaultDepositorAddressSync(programId: PublicKey, vault: PublicKey, authority: PublicKey): PublicKey;
|
|
5415
3426
|
//#endregion
|
|
5416
|
-
export { type
|
|
3427
|
+
export { type BundleAccount, type BundleCluster, DEFAULT_BUNDLE_PROGRAM_ID_DEVNET, DEFAULT_BUNDLE_PROGRAM_ID_MAINNET, NeutralTrade, type NeutralTradeConfig, type NeutralTradeCoreContext, type OracleData, SupportedChain, SupportedToken, type Token, type UserBalanceResult, type UserBundleAccount, type UserBundleTempData, type VaultBalanceData, VaultCategory, type VaultRegistryEntry as VaultConfig, type VaultRegistry as VaultConfigRecord, VaultId, VaultType, buildBundleDepositInstructions, buildBundleRequestWithdrawInstruction, createDummyWallet, deriveOraclePDA, deriveUserPDA, getBundleProgramId, getDefaultBundleProgramIdByCluster, getVaultByAddress, getVaultById, getVaultDepositorAddressSync, isValidVaultAddress, tokens, vaults };
|