@neutral-trade/sdk 0.3.11 → 0.4.2

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/dist/index.d.mts CHANGED
@@ -1,3033 +1,11 @@
1
- import { AnchorProvider, IdlAccounts, Program, Wallet } from "@coral-xyz/anchor";
1
+ import { A as SupportedToken, B as DEFAULT_BUNDLE_PROGRAM_ID_DEVNET, C as VaultRegistryEntry, D as UserBundleAccount, E as OracleData, F as ALLOWLISTED_BUNDLE_PROGRAM_IDS_BY_CLUSTER, G as getDefaultBundleProgramIdByCluster, H as assertAllowlistedBundleProgramId, I as BUNDLE_PROGRAM_ID_V2_MAINNET, K as isAllowlistedBundleProgramId, L as BundleCluster, M as getSolanaTokenDecimals, N as getSolanaTokenMint, O as UserBundleTempData, P as tokens, R as BundleProgram, S as VaultRegistry, T as BundleAccount, U as createAllowlistedBundleProgram, V as DEFAULT_BUNDLE_PROGRAM_ID_MAINNET, W as createBundleProgramById, _ as vaults, b as VaultBalanceData, d as NeutralTradeConfig, f as getBundleProgramId, g as isValidVaultAddress, h as getVaultRegistry, j as Token, k as SupportedChain, m as getVaultById, p as getVaultByAddress, t as NeutralTradeCoreContext, u as NeutralTrade, v as vaultsDevnet, w as VaultType, x as VaultCategory, y as UserBalanceResult, z as BundleProvider } from "./neutral-trade-core-ChBn3_UV.mjs";
2
+ import { AnchorProvider, Wallet } from "@coral-xyz/anchor";
2
3
  import { Connection, PublicKey, TransactionInstruction } from "@solana/web3.js";
3
- import { z } from "zod";
4
4
  import BN from "bn.js";
5
5
 
6
6
  //#region src/constants/client.d.ts
7
7
  declare function createDummyWallet(): Wallet;
8
8
  //#endregion
9
- //#region src/idl/ntbundle.d.ts
10
- /**
11
- * Program IDL in camelCase format in order to be used in JS/TS.
12
- *
13
- * Note that this is only a type helper and is not the actual IDL. The original
14
- * IDL can be found at `target/idl/ntbundle.json`.
15
- */
16
- interface Ntbundle {
17
- address: 'BUNDDh4P5XviMm1f3gCvnq2qKx6TGosAGnoUK12e7cXU';
18
- metadata: {
19
- name: 'ntbundle';
20
- version: '0.1.0';
21
- spec: '0.1.0';
22
- description: 'Created with Anchor';
23
- };
24
- instructions: [{
25
- name: 'addStrategy';
26
- discriminator: [64, 123, 127, 227, 192, 234, 198, 20];
27
- accounts: [{
28
- name: 'manager';
29
- writable: true;
30
- signer: true;
31
- }, {
32
- name: 'strategyAccount';
33
- writable: true;
34
- pda: {
35
- seeds: [{
36
- kind: 'const';
37
- value: [83, 84, 82, 65, 84, 69, 71, 89];
38
- }, {
39
- kind: 'account';
40
- path: 'receiverAddress';
41
- }, {
42
- kind: 'account';
43
- path: 'bundleAccount';
44
- }];
45
- };
46
- }, {
47
- name: 'bundleAccount';
48
- writable: true;
49
- }, {
50
- name: 'receiverAddress';
51
- writable: true;
52
- }, {
53
- name: 'systemProgram';
54
- address: '11111111111111111111111111111111';
55
- }];
56
- args: [{
57
- name: 'allocationBps';
58
- type: 'u32';
59
- }];
60
- }, {
61
- name: 'applyFeesToUser';
62
- discriminator: [26, 41, 103, 167, 61, 147, 141, 30];
63
- accounts: [{
64
- name: 'keeper';
65
- writable: true;
66
- signer: true;
67
- }, {
68
- name: 'userBundleAccountOwner';
69
- writable: true;
70
- }, {
71
- name: 'userBundleAccount';
72
- writable: true;
73
- pda: {
74
- seeds: [{
75
- kind: 'const';
76
- value: [85, 83, 69, 82, 95, 66, 85, 78, 68, 76, 69];
77
- }, {
78
- kind: 'account';
79
- path: 'userBundleAccountOwner';
80
- }, {
81
- kind: 'account';
82
- path: 'bundleAccount';
83
- }];
84
- };
85
- }, {
86
- name: 'bundleAccount';
87
- writable: true;
88
- }, {
89
- name: 'oracleData';
90
- writable: true;
91
- pda: {
92
- seeds: [{
93
- kind: 'const';
94
- value: [79, 82, 65, 67, 76, 69];
95
- }, {
96
- kind: 'account';
97
- path: 'bundleAccount';
98
- }];
99
- };
100
- }, {
101
- name: 'bundleAssetAuthority';
102
- writable: true;
103
- pda: {
104
- seeds: [{
105
- kind: 'const';
106
- value: [66, 85, 78, 68, 76, 69, 95, 65, 83, 83, 69, 84, 95, 65, 85, 84, 72, 79, 82, 73, 84, 89];
107
- }, {
108
- kind: 'account';
109
- path: 'bundleAccount';
110
- }];
111
- };
112
- }];
113
- args: [];
114
- }, {
115
- name: 'changeBundleMasterAdmin';
116
- discriminator: [255, 41, 246, 82, 7, 81, 174, 112];
117
- accounts: [{
118
- name: 'admin';
119
- writable: true;
120
- signer: true;
121
- }, {
122
- name: 'bundleMasterAccount';
123
- writable: true;
124
- pda: {
125
- seeds: [{
126
- kind: 'const';
127
- value: [66, 85, 78, 68, 76, 69, 95, 77, 65, 83, 84, 69, 82];
128
- }];
129
- };
130
- }];
131
- args: [{
132
- name: 'newAdmin';
133
- type: 'pubkey';
134
- }];
135
- }, {
136
- name: 'changeManager';
137
- discriminator: [97, 44, 74, 213, 119, 243, 203, 8];
138
- accounts: [{
139
- name: 'manager';
140
- writable: true;
141
- signer: true;
142
- }, {
143
- name: 'bundleAccount';
144
- writable: true;
145
- }];
146
- args: [{
147
- name: 'newManager';
148
- type: 'pubkey';
149
- }];
150
- }, {
151
- name: 'closeUserBundleAccount';
152
- discriminator: [201, 195, 126, 228, 9, 173, 79, 215];
153
- accounts: [{
154
- name: 'authority';
155
- writable: true;
156
- signer: true;
157
- }, {
158
- name: 'userBundleAccount';
159
- writable: true;
160
- pda: {
161
- seeds: [{
162
- kind: 'const';
163
- value: [85, 83, 69, 82, 95, 66, 85, 78, 68, 76, 69];
164
- }, {
165
- kind: 'account';
166
- path: 'authority';
167
- }, {
168
- kind: 'account';
169
- path: 'bundleAccount';
170
- }];
171
- };
172
- }, {
173
- name: 'bundleAccount';
174
- }];
175
- args: [];
176
- }, {
177
- name: 'distributeToReceivers';
178
- discriminator: [123, 169, 151, 143, 0, 82, 209, 145];
179
- accounts: [{
180
- name: 'keeper';
181
- writable: true;
182
- signer: true;
183
- }, {
184
- name: 'receiverAddress';
185
- writable: true;
186
- }, {
187
- name: 'bundleAssetAccount';
188
- writable: true;
189
- pda: {
190
- seeds: [{
191
- kind: 'account';
192
- path: 'bundleAssetAuthority';
193
- }, {
194
- kind: 'const';
195
- value: [6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169];
196
- }, {
197
- kind: 'account';
198
- path: 'assetAddress';
199
- }];
200
- program: {
201
- kind: 'const';
202
- value: [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
203
- };
204
- };
205
- }, {
206
- name: 'receiverAta';
207
- writable: true;
208
- }, {
209
- name: 'assetAddress';
210
- }, {
211
- name: 'oracleData';
212
- writable: true;
213
- pda: {
214
- seeds: [{
215
- kind: 'const';
216
- value: [79, 82, 65, 67, 76, 69];
217
- }, {
218
- kind: 'account';
219
- path: 'bundleAccount';
220
- }];
221
- };
222
- }, {
223
- name: 'bundleAssetAuthority';
224
- writable: true;
225
- pda: {
226
- seeds: [{
227
- kind: 'const';
228
- value: [66, 85, 78, 68, 76, 69, 95, 65, 83, 83, 69, 84, 95, 65, 85, 84, 72, 79, 82, 73, 84, 89];
229
- }, {
230
- kind: 'account';
231
- path: 'bundleAccount';
232
- }];
233
- };
234
- }, {
235
- name: 'tokenProgram';
236
- address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
237
- }, {
238
- name: 'bundleAccount';
239
- writable: true;
240
- }, {
241
- name: 'bundleTempData';
242
- writable: true;
243
- pda: {
244
- seeds: [{
245
- kind: 'const';
246
- value: [66, 85, 78, 68, 76, 69, 95, 84, 69, 77, 80, 95, 68, 65, 84, 65];
247
- }, {
248
- kind: 'account';
249
- path: 'bundleAccount';
250
- }];
251
- };
252
- }, {
253
- name: 'strategyAccount';
254
- writable: true;
255
- pda: {
256
- seeds: [{
257
- kind: 'const';
258
- value: [83, 84, 82, 65, 84, 69, 71, 89];
259
- }, {
260
- kind: 'account';
261
- path: 'receiverAddress';
262
- }, {
263
- kind: 'account';
264
- path: 'bundleAccount';
265
- }];
266
- };
267
- }];
268
- args: [];
269
- }, {
270
- name: 'enableStrategy';
271
- discriminator: [245, 37, 61, 122, 99, 92, 182, 30];
272
- accounts: [{
273
- name: 'manager';
274
- writable: true;
275
- signer: true;
276
- }, {
277
- name: 'strategyAccount';
278
- writable: true;
279
- pda: {
280
- seeds: [{
281
- kind: 'const';
282
- value: [83, 84, 82, 65, 84, 69, 71, 89];
283
- }, {
284
- kind: 'account';
285
- path: 'receiverAddress';
286
- }, {
287
- kind: 'account';
288
- path: 'bundleAccount';
289
- }];
290
- };
291
- }, {
292
- name: 'bundleAccount';
293
- writable: true;
294
- }, {
295
- name: 'receiverAddress';
296
- writable: true;
297
- }, {
298
- name: 'systemProgram';
299
- address: '11111111111111111111111111111111';
300
- }];
301
- args: [];
302
- }, {
303
- name: 'endDistribution';
304
- discriminator: [201, 74, 167, 103, 102, 125, 0, 236];
305
- accounts: [{
306
- name: 'keeper';
307
- writable: true;
308
- signer: true;
309
- }, {
310
- name: 'bundleAccount';
311
- writable: true;
312
- }, {
313
- name: 'bundleTempData';
314
- writable: true;
315
- pda: {
316
- seeds: [{
317
- kind: 'const';
318
- value: [66, 85, 78, 68, 76, 69, 95, 84, 69, 77, 80, 95, 68, 65, 84, 65];
319
- }, {
320
- kind: 'account';
321
- path: 'bundleAccount';
322
- }];
323
- };
324
- }, {
325
- name: 'oracleData';
326
- writable: true;
327
- pda: {
328
- seeds: [{
329
- kind: 'const';
330
- value: [79, 82, 65, 67, 76, 69];
331
- }, {
332
- kind: 'account';
333
- path: 'bundleAccount';
334
- }];
335
- };
336
- }];
337
- args: [];
338
- }, {
339
- name: 'initializeBundle';
340
- discriminator: [93, 76, 148, 51, 99, 41, 179, 234];
341
- accounts: [{
342
- name: 'creator';
343
- writable: true;
344
- signer: true;
345
- }, {
346
- name: 'bundleCreatorAccount';
347
- pda: {
348
- seeds: [{
349
- kind: 'const';
350
- value: [66, 85, 78, 68, 76, 69, 95, 67, 82, 69, 65, 84, 79, 82];
351
- }, {
352
- kind: 'account';
353
- path: 'creator';
354
- }];
355
- };
356
- }, {
357
- name: 'systemProgram';
358
- address: '11111111111111111111111111111111';
359
- }, {
360
- name: 'treasuryAccount';
361
- writable: true;
362
- }, {
363
- name: 'assetAddress';
364
- writable: true;
365
- }, {
366
- name: 'bundleAccount';
367
- writable: true;
368
- pda: {
369
- seeds: [{
370
- kind: 'const';
371
- value: [66, 85, 78, 68, 76, 69];
372
- }, {
373
- kind: 'arg';
374
- path: 'name';
375
- }];
376
- };
377
- }, {
378
- name: 'bundleTempData';
379
- writable: true;
380
- pda: {
381
- seeds: [{
382
- kind: 'const';
383
- value: [66, 85, 78, 68, 76, 69, 95, 84, 69, 77, 80, 95, 68, 65, 84, 65];
384
- }, {
385
- kind: 'account';
386
- path: 'bundleAccount';
387
- }];
388
- };
389
- }, {
390
- name: 'oracleData';
391
- writable: true;
392
- pda: {
393
- seeds: [{
394
- kind: 'const';
395
- value: [79, 82, 65, 67, 76, 69];
396
- }, {
397
- kind: 'account';
398
- path: 'bundleAccount';
399
- }];
400
- };
401
- }];
402
- args: [{
403
- name: 'name';
404
- type: {
405
- array: ['u8', 32];
406
- };
407
- }, {
408
- name: 'keeper';
409
- type: 'pubkey';
410
- }, {
411
- name: 'depositFee';
412
- type: 'u32';
413
- }, {
414
- name: 'withdrawalFee';
415
- type: 'u32';
416
- }, {
417
- name: 'performanceFee';
418
- type: 'u32';
419
- }, {
420
- name: 'managementFeeBps';
421
- type: 'u32';
422
- }, {
423
- name: 'oracleBuffer';
424
- type: 'u64';
425
- }, {
426
- name: 'maxDepositAmount';
427
- type: 'u64';
428
- }, {
429
- name: 'minDepositAmount';
430
- type: 'u64';
431
- }, {
432
- name: 'withdrawalDelay';
433
- type: 'u64';
434
- }, {
435
- name: 'withdrawalTMin';
436
- type: 'i64';
437
- }, {
438
- name: 'withdrawalTMax';
439
- type: 'i64';
440
- }, {
441
- name: 'withdrawalCurve';
442
- type: 'f32';
443
- }, {
444
- name: 'oracleMaxAge';
445
- type: 'i64';
446
- }, {
447
- name: 'oracleUpdateTimeLimit';
448
- type: 'i64';
449
- }, {
450
- name: 'withdrawalRedemptionRequestCutoffTs';
451
- type: 'i64';
452
- }, {
453
- name: 'withdrawalRedemptionUnlockCurrentCycleTs';
454
- type: 'i64';
455
- }, {
456
- name: 'withdrawalRedemptionUnlockNextCycleTs';
457
- type: 'i64';
458
- }, {
459
- name: 'permissionned';
460
- type: 'bool';
461
- }];
462
- }, {
463
- name: 'initializeBundleDepositor';
464
- discriminator: [126, 6, 242, 36, 22, 209, 35, 2];
465
- accounts: [{
466
- name: 'payer';
467
- writable: true;
468
- signer: true;
469
- }, {
470
- name: 'authority';
471
- writable: true;
472
- signer: true;
473
- }, {
474
- name: 'systemProgram';
475
- address: '11111111111111111111111111111111';
476
- }, {
477
- name: 'bundleAccount';
478
- writable: true;
479
- }, {
480
- name: 'userBundleAccount';
481
- docs: ['each user gets one UserBundleAccount account; it will be created if it doesn\'t exist.'];
482
- writable: true;
483
- pda: {
484
- seeds: [{
485
- kind: 'const';
486
- value: [85, 83, 69, 82, 95, 66, 85, 78, 68, 76, 69];
487
- }, {
488
- kind: 'account';
489
- path: 'authority';
490
- }, {
491
- kind: 'account';
492
- path: 'bundleAccount';
493
- }];
494
- };
495
- }];
496
- args: [];
497
- }, {
498
- name: 'initializeBundleMasterAccount';
499
- discriminator: [125, 166, 190, 35, 73, 169, 140, 206];
500
- accounts: [{
501
- name: 'admin';
502
- writable: true;
503
- signer: true;
504
- }, {
505
- name: 'bundleMasterAccount';
506
- writable: true;
507
- pda: {
508
- seeds: [{
509
- kind: 'const';
510
- value: [66, 85, 78, 68, 76, 69, 95, 77, 65, 83, 84, 69, 82];
511
- }];
512
- };
513
- }, {
514
- name: 'systemProgram';
515
- address: '11111111111111111111111111111111';
516
- }];
517
- args: [];
518
- }, {
519
- name: 'initializePermissionedBundleDepositor';
520
- discriminator: [157, 162, 213, 42, 205, 201, 37, 255];
521
- accounts: [{
522
- name: 'payer';
523
- writable: true;
524
- signer: true;
525
- }, {
526
- name: 'authority';
527
- writable: true;
528
- }, {
529
- name: 'systemProgram';
530
- address: '11111111111111111111111111111111';
531
- }, {
532
- name: 'bundleAccount';
533
- writable: true;
534
- }, {
535
- name: 'userBundleAccount';
536
- docs: ['each user gets one UserBundleAccount account; it will be created if it doesn\'t exist.'];
537
- writable: true;
538
- pda: {
539
- seeds: [{
540
- kind: 'const';
541
- value: [85, 83, 69, 82, 95, 66, 85, 78, 68, 76, 69];
542
- }, {
543
- kind: 'account';
544
- path: 'authority';
545
- }, {
546
- kind: 'account';
547
- path: 'bundleAccount';
548
- }];
549
- };
550
- }];
551
- args: [];
552
- }, {
553
- name: 'managerWithdraw';
554
- discriminator: [201, 248, 190, 143, 86, 43, 183, 254];
555
- accounts: [{
556
- name: 'manager';
557
- writable: true;
558
- signer: true;
559
- }, {
560
- name: 'managerTokenAccount';
561
- writable: true;
562
- }, {
563
- name: 'assetAddress';
564
- writable: true;
565
- }, {
566
- name: 'bundleAssetAccount';
567
- writable: true;
568
- pda: {
569
- seeds: [{
570
- kind: 'account';
571
- path: 'bundleAssetAuthority';
572
- }, {
573
- kind: 'const';
574
- value: [6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169];
575
- }, {
576
- kind: 'account';
577
- path: 'assetAddress';
578
- }];
579
- program: {
580
- kind: 'const';
581
- value: [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
582
- };
583
- };
584
- }, {
585
- name: 'bundleAccount';
586
- writable: true;
587
- }, {
588
- name: 'oracleData';
589
- writable: true;
590
- pda: {
591
- seeds: [{
592
- kind: 'const';
593
- value: [79, 82, 65, 67, 76, 69];
594
- }, {
595
- kind: 'account';
596
- path: 'bundleAccount';
597
- }];
598
- };
599
- }, {
600
- name: 'bundleAssetAuthority';
601
- writable: true;
602
- pda: {
603
- seeds: [{
604
- kind: 'const';
605
- value: [66, 85, 78, 68, 76, 69, 95, 65, 83, 83, 69, 84, 95, 65, 85, 84, 72, 79, 82, 73, 84, 89];
606
- }, {
607
- kind: 'account';
608
- path: 'bundleAccount';
609
- }];
610
- };
611
- }, {
612
- name: 'tokenProgram';
613
- address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
614
- }];
615
- args: [];
616
- }, {
617
- name: 'netPendingTransactions';
618
- discriminator: [44, 219, 50, 19, 246, 252, 37, 163];
619
- accounts: [{
620
- name: 'keeper';
621
- writable: true;
622
- signer: true;
623
- }, {
624
- name: 'bundleAccount';
625
- writable: true;
626
- }, {
627
- name: 'pendingDepositTokenAccount';
628
- writable: true;
629
- pda: {
630
- seeds: [{
631
- kind: 'account';
632
- path: 'pendingBundleAssetAuthority';
633
- }, {
634
- kind: 'const';
635
- value: [6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169];
636
- }, {
637
- kind: 'account';
638
- path: 'assetAddress';
639
- }];
640
- program: {
641
- kind: 'const';
642
- value: [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
643
- };
644
- };
645
- }, {
646
- name: 'bundleAssetAccount';
647
- writable: true;
648
- pda: {
649
- seeds: [{
650
- kind: 'account';
651
- path: 'bundleAssetAuthority';
652
- }, {
653
- kind: 'const';
654
- value: [6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169];
655
- }, {
656
- kind: 'account';
657
- path: 'assetAddress';
658
- }];
659
- program: {
660
- kind: 'const';
661
- value: [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
662
- };
663
- };
664
- }, {
665
- name: 'assetAddress';
666
- writable: true;
667
- }, {
668
- name: 'pendingBundleAssetAuthority';
669
- writable: true;
670
- pda: {
671
- seeds: [{
672
- kind: 'const';
673
- value: [80, 69, 78, 68, 73, 78, 71, 95, 66, 85, 78, 68, 76, 69, 95, 65, 83, 83, 69, 84, 95, 65, 85, 84, 72, 79, 82, 73, 84, 89];
674
- }, {
675
- kind: 'account';
676
- path: 'bundleAccount';
677
- }];
678
- };
679
- }, {
680
- name: 'oracleData';
681
- writable: true;
682
- pda: {
683
- seeds: [{
684
- kind: 'const';
685
- value: [79, 82, 65, 67, 76, 69];
686
- }, {
687
- kind: 'account';
688
- path: 'bundleAccount';
689
- }];
690
- };
691
- }, {
692
- name: 'bundleTempData';
693
- writable: true;
694
- pda: {
695
- seeds: [{
696
- kind: 'const';
697
- value: [66, 85, 78, 68, 76, 69, 95, 84, 69, 77, 80, 95, 68, 65, 84, 65];
698
- }, {
699
- kind: 'account';
700
- path: 'bundleAccount';
701
- }];
702
- };
703
- }, {
704
- name: 'bundleAssetAuthority';
705
- writable: true;
706
- pda: {
707
- seeds: [{
708
- kind: 'const';
709
- value: [66, 85, 78, 68, 76, 69, 95, 65, 83, 83, 69, 84, 95, 65, 85, 84, 72, 79, 82, 73, 84, 89];
710
- }, {
711
- kind: 'account';
712
- path: 'bundleAccount';
713
- }];
714
- };
715
- }, {
716
- name: 'tokenProgram';
717
- address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
718
- }];
719
- args: [];
720
- }, {
721
- name: 'pauseDepositsWithdrawals';
722
- discriminator: [106, 171, 198, 31, 183, 219, 159, 80];
723
- accounts: [{
724
- name: 'keeper';
725
- writable: true;
726
- signer: true;
727
- }, {
728
- name: 'bundleAccount';
729
- writable: true;
730
- }, {
731
- name: 'bundleTempData';
732
- writable: true;
733
- pda: {
734
- seeds: [{
735
- kind: 'const';
736
- value: [66, 85, 78, 68, 76, 69, 95, 84, 69, 77, 80, 95, 68, 65, 84, 65];
737
- }, {
738
- kind: 'account';
739
- path: 'bundleAccount';
740
- }];
741
- };
742
- }, {
743
- name: 'oracleData';
744
- writable: true;
745
- pda: {
746
- seeds: [{
747
- kind: 'const';
748
- value: [79, 82, 65, 67, 76, 69];
749
- }, {
750
- kind: 'account';
751
- path: 'bundleAccount';
752
- }];
753
- };
754
- }];
755
- args: [{
756
- name: 'pause';
757
- type: 'bool';
758
- }];
759
- }, {
760
- name: 'performRefill';
761
- discriminator: [241, 64, 6, 52, 58, 169, 15, 12];
762
- accounts: [{
763
- name: 'receiverAddress';
764
- writable: true;
765
- signer: true;
766
- }, {
767
- name: 'bundleAssetAccount';
768
- writable: true;
769
- pda: {
770
- seeds: [{
771
- kind: 'account';
772
- path: 'bundleAssetAuthority';
773
- }, {
774
- kind: 'const';
775
- value: [6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169];
776
- }, {
777
- kind: 'account';
778
- path: 'assetAddress';
779
- }];
780
- program: {
781
- kind: 'const';
782
- value: [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
783
- };
784
- };
785
- }, {
786
- name: 'receiverAta';
787
- writable: true;
788
- }, {
789
- name: 'assetAddress';
790
- }, {
791
- name: 'bundleAccount';
792
- writable: true;
793
- }, {
794
- name: 'strategyAccount';
795
- writable: true;
796
- pda: {
797
- seeds: [{
798
- kind: 'const';
799
- value: [83, 84, 82, 65, 84, 69, 71, 89];
800
- }, {
801
- kind: 'account';
802
- path: 'receiverAddress';
803
- }, {
804
- kind: 'account';
805
- path: 'bundleAccount';
806
- }];
807
- };
808
- }, {
809
- name: 'oracleData';
810
- writable: true;
811
- pda: {
812
- seeds: [{
813
- kind: 'const';
814
- value: [79, 82, 65, 67, 76, 69];
815
- }, {
816
- kind: 'account';
817
- path: 'bundleAccount';
818
- }];
819
- };
820
- }, {
821
- name: 'bundleAssetAuthority';
822
- writable: true;
823
- pda: {
824
- seeds: [{
825
- kind: 'const';
826
- value: [66, 85, 78, 68, 76, 69, 95, 65, 83, 83, 69, 84, 95, 65, 85, 84, 72, 79, 82, 73, 84, 89];
827
- }, {
828
- kind: 'account';
829
- path: 'bundleAccount';
830
- }];
831
- };
832
- }, {
833
- name: 'tokenProgram';
834
- address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
835
- }];
836
- args: [{
837
- name: 'refillAmount';
838
- type: 'u64';
839
- }];
840
- }, {
841
- name: 'processDeposit';
842
- discriminator: [136, 162, 64, 35, 84, 200, 254, 136];
843
- accounts: [{
844
- name: 'keeper';
845
- writable: true;
846
- signer: true;
847
- }, {
848
- name: 'userBundleAccount';
849
- writable: true;
850
- pda: {
851
- seeds: [{
852
- kind: 'const';
853
- value: [85, 83, 69, 82, 95, 66, 85, 78, 68, 76, 69];
854
- }, {
855
- kind: 'account';
856
- path: 'userBundleAccountOwner';
857
- }, {
858
- kind: 'account';
859
- path: 'bundleAccount';
860
- }];
861
- };
862
- }, {
863
- name: 'pendingDepositTokenAccount';
864
- docs: ['the account holding the user\'s deposited asset before allocation.'];
865
- writable: true;
866
- pda: {
867
- seeds: [{
868
- kind: 'account';
869
- path: 'pendingBundleAssetAuthority';
870
- }, {
871
- kind: 'const';
872
- value: [6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169];
873
- }, {
874
- kind: 'account';
875
- path: 'assetAddress';
876
- }];
877
- program: {
878
- kind: 'const';
879
- value: [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
880
- };
881
- };
882
- }, {
883
- name: 'userBundleAccountOwner';
884
- docs: ['the owner of the pending request (for event purposes).'];
885
- }, {
886
- name: 'assetAddress';
887
- writable: true;
888
- }, {
889
- name: 'bundleAssetAccount';
890
- writable: true;
891
- pda: {
892
- seeds: [{
893
- kind: 'account';
894
- path: 'bundleAssetAuthority';
895
- }, {
896
- kind: 'const';
897
- value: [6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169];
898
- }, {
899
- kind: 'account';
900
- path: 'assetAddress';
901
- }];
902
- program: {
903
- kind: 'const';
904
- value: [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
905
- };
906
- };
907
- }, {
908
- name: 'bundleAccount';
909
- writable: true;
910
- }, {
911
- name: 'bundleTempData';
912
- writable: true;
913
- pda: {
914
- seeds: [{
915
- kind: 'const';
916
- value: [66, 85, 78, 68, 76, 69, 95, 84, 69, 77, 80, 95, 68, 65, 84, 65];
917
- }, {
918
- kind: 'account';
919
- path: 'bundleAccount';
920
- }];
921
- };
922
- }, {
923
- name: 'oracleData';
924
- writable: true;
925
- pda: {
926
- seeds: [{
927
- kind: 'const';
928
- value: [79, 82, 65, 67, 76, 69];
929
- }, {
930
- kind: 'account';
931
- path: 'bundleAccount';
932
- }];
933
- };
934
- }, {
935
- name: 'pendingBundleAssetAuthority';
936
- writable: true;
937
- pda: {
938
- seeds: [{
939
- kind: 'const';
940
- value: [80, 69, 78, 68, 73, 78, 71, 95, 66, 85, 78, 68, 76, 69, 95, 65, 83, 83, 69, 84, 95, 65, 85, 84, 72, 79, 82, 73, 84, 89];
941
- }, {
942
- kind: 'account';
943
- path: 'bundleAccount';
944
- }];
945
- };
946
- }, {
947
- name: 'bundleAssetAuthority';
948
- writable: true;
949
- pda: {
950
- seeds: [{
951
- kind: 'const';
952
- value: [66, 85, 78, 68, 76, 69, 95, 65, 83, 83, 69, 84, 95, 65, 85, 84, 72, 79, 82, 73, 84, 89];
953
- }, {
954
- kind: 'account';
955
- path: 'bundleAccount';
956
- }];
957
- };
958
- }, {
959
- name: 'tokenProgram';
960
- address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
961
- }, {
962
- name: 'systemProgram';
963
- address: '11111111111111111111111111111111';
964
- }];
965
- args: [];
966
- }, {
967
- name: 'processWithdrawal';
968
- discriminator: [51, 97, 236, 17, 37, 33, 196, 64];
969
- accounts: [{
970
- name: 'keeper';
971
- writable: true;
972
- signer: true;
973
- }, {
974
- name: 'userBundleAccountOwner';
975
- }, {
976
- name: 'userTokenAccount';
977
- writable: true;
978
- }, {
979
- name: 'assetAddress';
980
- writable: true;
981
- }, {
982
- name: 'bundleAssetAccount';
983
- writable: true;
984
- pda: {
985
- seeds: [{
986
- kind: 'account';
987
- path: 'bundleAssetAuthority';
988
- }, {
989
- kind: 'const';
990
- value: [6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169];
991
- }, {
992
- kind: 'account';
993
- path: 'assetAddress';
994
- }];
995
- program: {
996
- kind: 'const';
997
- value: [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
998
- };
999
- };
1000
- }, {
1001
- name: 'pendingBundleAssetAuthority';
1002
- writable: true;
1003
- pda: {
1004
- seeds: [{
1005
- kind: 'const';
1006
- value: [80, 69, 78, 68, 73, 78, 71, 95, 66, 85, 78, 68, 76, 69, 95, 65, 83, 83, 69, 84, 95, 65, 85, 84, 72, 79, 82, 73, 84, 89];
1007
- }, {
1008
- kind: 'account';
1009
- path: 'bundleAccount';
1010
- }];
1011
- };
1012
- }, {
1013
- name: 'userBundleAccount';
1014
- writable: true;
1015
- pda: {
1016
- seeds: [{
1017
- kind: 'const';
1018
- value: [85, 83, 69, 82, 95, 66, 85, 78, 68, 76, 69];
1019
- }, {
1020
- kind: 'account';
1021
- path: 'userBundleAccountOwner';
1022
- }, {
1023
- kind: 'account';
1024
- path: 'bundleAccount';
1025
- }];
1026
- };
1027
- }, {
1028
- name: 'treasuryAccount';
1029
- writable: true;
1030
- }, {
1031
- name: 'bundleAssetAuthority';
1032
- writable: true;
1033
- pda: {
1034
- seeds: [{
1035
- kind: 'const';
1036
- value: [66, 85, 78, 68, 76, 69, 95, 65, 83, 83, 69, 84, 95, 65, 85, 84, 72, 79, 82, 73, 84, 89];
1037
- }, {
1038
- kind: 'account';
1039
- path: 'bundleAccount';
1040
- }];
1041
- };
1042
- }, {
1043
- name: 'bundleAccount';
1044
- writable: true;
1045
- }, {
1046
- name: 'bundleTempData';
1047
- writable: true;
1048
- pda: {
1049
- seeds: [{
1050
- kind: 'const';
1051
- value: [66, 85, 78, 68, 76, 69, 95, 84, 69, 77, 80, 95, 68, 65, 84, 65];
1052
- }, {
1053
- kind: 'account';
1054
- path: 'bundleAccount';
1055
- }];
1056
- };
1057
- }, {
1058
- name: 'oracleData';
1059
- writable: true;
1060
- pda: {
1061
- seeds: [{
1062
- kind: 'const';
1063
- value: [79, 82, 65, 67, 76, 69];
1064
- }, {
1065
- kind: 'account';
1066
- path: 'bundleAccount';
1067
- }];
1068
- };
1069
- }, {
1070
- name: 'tokenProgram';
1071
- address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
1072
- }, {
1073
- name: 'systemProgram';
1074
- address: '11111111111111111111111111111111';
1075
- }];
1076
- args: [];
1077
- }, {
1078
- name: 'refundDeposit';
1079
- discriminator: [19, 19, 78, 50, 187, 10, 162, 229];
1080
- accounts: [{
1081
- name: 'keeper';
1082
- writable: true;
1083
- signer: true;
1084
- }, {
1085
- name: 'userBundleAccount';
1086
- writable: true;
1087
- pda: {
1088
- seeds: [{
1089
- kind: 'const';
1090
- value: [85, 83, 69, 82, 95, 66, 85, 78, 68, 76, 69];
1091
- }, {
1092
- kind: 'account';
1093
- path: 'userBundleAccountOwner';
1094
- }, {
1095
- kind: 'account';
1096
- path: 'bundleAccount';
1097
- }];
1098
- };
1099
- }, {
1100
- name: 'userBundleAccountOwner';
1101
- docs: ['the owner of the pending request (for event purposes).'];
1102
- }, {
1103
- name: 'userTokenAccount';
1104
- writable: true;
1105
- }, {
1106
- name: 'assetAddress';
1107
- writable: true;
1108
- }, {
1109
- name: 'bundleAssetAccount';
1110
- writable: true;
1111
- pda: {
1112
- seeds: [{
1113
- kind: 'account';
1114
- path: 'bundleAssetAuthority';
1115
- }, {
1116
- kind: 'const';
1117
- value: [6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169];
1118
- }, {
1119
- kind: 'account';
1120
- path: 'assetAddress';
1121
- }];
1122
- program: {
1123
- kind: 'const';
1124
- value: [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
1125
- };
1126
- };
1127
- }, {
1128
- name: 'bundleAssetAuthority';
1129
- writable: true;
1130
- pda: {
1131
- seeds: [{
1132
- kind: 'const';
1133
- value: [66, 85, 78, 68, 76, 69, 95, 65, 83, 83, 69, 84, 95, 65, 85, 84, 72, 79, 82, 73, 84, 89];
1134
- }, {
1135
- kind: 'account';
1136
- path: 'bundleAccount';
1137
- }];
1138
- };
1139
- }, {
1140
- name: 'bundleAccount';
1141
- writable: true;
1142
- }, {
1143
- name: 'bundleTempData';
1144
- writable: true;
1145
- pda: {
1146
- seeds: [{
1147
- kind: 'const';
1148
- value: [66, 85, 78, 68, 76, 69, 95, 84, 69, 77, 80, 95, 68, 65, 84, 65];
1149
- }, {
1150
- kind: 'account';
1151
- path: 'bundleAccount';
1152
- }];
1153
- };
1154
- }, {
1155
- name: 'tokenProgram';
1156
- address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
1157
- }, {
1158
- name: 'systemProgram';
1159
- address: '11111111111111111111111111111111';
1160
- }];
1161
- args: [];
1162
- }, {
1163
- name: 'removeStrategy';
1164
- discriminator: [185, 238, 33, 91, 134, 210, 97, 26];
1165
- accounts: [{
1166
- name: 'manager';
1167
- writable: true;
1168
- signer: true;
1169
- }, {
1170
- name: 'strategyAccount';
1171
- writable: true;
1172
- pda: {
1173
- seeds: [{
1174
- kind: 'const';
1175
- value: [83, 84, 82, 65, 84, 69, 71, 89];
1176
- }, {
1177
- kind: 'account';
1178
- path: 'receiverAddress';
1179
- }, {
1180
- kind: 'account';
1181
- path: 'bundleAccount';
1182
- }];
1183
- };
1184
- }, {
1185
- name: 'bundleAccount';
1186
- writable: true;
1187
- }, {
1188
- name: 'receiverAddress';
1189
- writable: true;
1190
- }, {
1191
- name: 'systemProgram';
1192
- address: '11111111111111111111111111111111';
1193
- }];
1194
- args: [];
1195
- }, {
1196
- name: 'requestDeposit';
1197
- discriminator: [243, 202, 197, 215, 135, 97, 213, 109];
1198
- accounts: [{
1199
- name: 'user';
1200
- writable: true;
1201
- signer: true;
1202
- }, {
1203
- name: 'userTokenAccount';
1204
- docs: ['user token account (source of funds)'];
1205
- writable: true;
1206
- }, {
1207
- name: 'pendingDepositTokenAccount';
1208
- writable: true;
1209
- pda: {
1210
- seeds: [{
1211
- kind: 'account';
1212
- path: 'pendingBundleAssetAuthority';
1213
- }, {
1214
- kind: 'const';
1215
- value: [6, 221, 246, 225, 215, 101, 161, 147, 217, 203, 225, 70, 206, 235, 121, 172, 28, 180, 133, 237, 95, 91, 55, 145, 58, 140, 245, 133, 126, 255, 0, 169];
1216
- }, {
1217
- kind: 'account';
1218
- path: 'assetAddress';
1219
- }];
1220
- program: {
1221
- kind: 'const';
1222
- value: [140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142, 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216, 219, 233, 248, 89];
1223
- };
1224
- };
1225
- }, {
1226
- name: 'treasuryAccount';
1227
- writable: true;
1228
- }, {
1229
- name: 'userBundleAccount';
1230
- writable: true;
1231
- pda: {
1232
- seeds: [{
1233
- kind: 'const';
1234
- value: [85, 83, 69, 82, 95, 66, 85, 78, 68, 76, 69];
1235
- }, {
1236
- kind: 'account';
1237
- path: 'user';
1238
- }, {
1239
- kind: 'account';
1240
- path: 'bundleAccount';
1241
- }];
1242
- };
1243
- }, {
1244
- name: 'assetAddress';
1245
- writable: true;
1246
- }, {
1247
- name: 'oracleData';
1248
- writable: true;
1249
- pda: {
1250
- seeds: [{
1251
- kind: 'const';
1252
- value: [79, 82, 65, 67, 76, 69];
1253
- }, {
1254
- kind: 'account';
1255
- path: 'bundleAccount';
1256
- }];
1257
- };
1258
- }, {
1259
- name: 'bundleTempData';
1260
- writable: true;
1261
- pda: {
1262
- seeds: [{
1263
- kind: 'const';
1264
- value: [66, 85, 78, 68, 76, 69, 95, 84, 69, 77, 80, 95, 68, 65, 84, 65];
1265
- }, {
1266
- kind: 'account';
1267
- path: 'bundleAccount';
1268
- }];
1269
- };
1270
- }, {
1271
- name: 'bundleAccount';
1272
- writable: true;
1273
- }, {
1274
- name: 'pendingBundleAssetAuthority';
1275
- writable: true;
1276
- pda: {
1277
- seeds: [{
1278
- kind: 'const';
1279
- value: [80, 69, 78, 68, 73, 78, 71, 95, 66, 85, 78, 68, 76, 69, 95, 65, 83, 83, 69, 84, 95, 65, 85, 84, 72, 79, 82, 73, 84, 89];
1280
- }, {
1281
- kind: 'account';
1282
- path: 'bundleAccount';
1283
- }];
1284
- };
1285
- }, {
1286
- name: 'tokenProgram';
1287
- address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
1288
- }, {
1289
- name: 'systemProgram';
1290
- address: '11111111111111111111111111111111';
1291
- }];
1292
- args: [{
1293
- name: 'amount';
1294
- type: 'u64';
1295
- }];
1296
- }, {
1297
- name: 'requestWithdrawal';
1298
- discriminator: [251, 85, 121, 205, 56, 201, 12, 177];
1299
- accounts: [{
1300
- name: 'user';
1301
- writable: true;
1302
- signer: true;
1303
- }, {
1304
- name: 'userBundleAccount';
1305
- writable: true;
1306
- pda: {
1307
- seeds: [{
1308
- kind: 'const';
1309
- value: [85, 83, 69, 82, 95, 66, 85, 78, 68, 76, 69];
1310
- }, {
1311
- kind: 'account';
1312
- path: 'user';
1313
- }, {
1314
- kind: 'account';
1315
- path: 'bundleAccount';
1316
- }];
1317
- };
1318
- }, {
1319
- name: 'bundleAccount';
1320
- writable: true;
1321
- }, {
1322
- name: 'oracleData';
1323
- writable: true;
1324
- pda: {
1325
- seeds: [{
1326
- kind: 'const';
1327
- value: [79, 82, 65, 67, 76, 69];
1328
- }, {
1329
- kind: 'account';
1330
- path: 'bundleAccount';
1331
- }];
1332
- };
1333
- }, {
1334
- name: 'bundleTempData';
1335
- writable: true;
1336
- pda: {
1337
- seeds: [{
1338
- kind: 'const';
1339
- value: [66, 85, 78, 68, 76, 69, 95, 84, 69, 77, 80, 95, 68, 65, 84, 65];
1340
- }, {
1341
- kind: 'account';
1342
- path: 'bundleAccount';
1343
- }];
1344
- };
1345
- }, {
1346
- name: 'tokenProgram';
1347
- address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
1348
- }, {
1349
- name: 'systemProgram';
1350
- address: '11111111111111111111111111111111';
1351
- }, {
1352
- name: 'rent';
1353
- address: 'SysvarRent111111111111111111111111111111111';
1354
- }];
1355
- args: [{
1356
- name: 'sharesAmount';
1357
- type: 'u128';
1358
- }];
1359
- }, {
1360
- name: 'setBundleCreator';
1361
- discriminator: [190, 144, 93, 89, 14, 138, 195, 166];
1362
- accounts: [{
1363
- name: 'admin';
1364
- writable: true;
1365
- signer: true;
1366
- }, {
1367
- name: 'bundleMasterAccount';
1368
- pda: {
1369
- seeds: [{
1370
- kind: 'const';
1371
- value: [66, 85, 78, 68, 76, 69, 95, 77, 65, 83, 84, 69, 82];
1372
- }];
1373
- };
1374
- }, {
1375
- name: 'creator';
1376
- docs: ['CHECK safe as only the pubkey is read'];
1377
- }, {
1378
- name: 'bundleCreatorAccount';
1379
- writable: true;
1380
- pda: {
1381
- seeds: [{
1382
- kind: 'const';
1383
- value: [66, 85, 78, 68, 76, 69, 95, 67, 82, 69, 65, 84, 79, 82];
1384
- }, {
1385
- kind: 'account';
1386
- path: 'creator';
1387
- }];
1388
- };
1389
- }, {
1390
- name: 'systemProgram';
1391
- address: '11111111111111111111111111111111';
1392
- }];
1393
- args: [{
1394
- name: 'allowed';
1395
- type: 'bool';
1396
- }];
1397
- }, {
1398
- name: 'setDelays';
1399
- discriminator: [18, 56, 143, 125, 147, 15, 199, 108];
1400
- accounts: [{
1401
- name: 'manager';
1402
- writable: true;
1403
- signer: true;
1404
- }, {
1405
- name: 'bundleAccount';
1406
- writable: true;
1407
- }];
1408
- args: [{
1409
- name: 'withdrawalDelay';
1410
- type: 'u64';
1411
- }, {
1412
- name: 'withdrawalTMin';
1413
- type: 'i64';
1414
- }, {
1415
- name: 'withdrawalTMax';
1416
- type: 'i64';
1417
- }, {
1418
- name: 'withdrawalCurve';
1419
- type: 'f32';
1420
- }];
1421
- }, {
1422
- name: 'setFees';
1423
- discriminator: [137, 178, 49, 58, 0, 245, 242, 190];
1424
- accounts: [{
1425
- name: 'manager';
1426
- writable: true;
1427
- signer: true;
1428
- }, {
1429
- name: 'bundleAccount';
1430
- writable: true;
1431
- }];
1432
- args: [{
1433
- name: 'treasury';
1434
- type: 'pubkey';
1435
- }, {
1436
- name: 'depositFee';
1437
- type: 'u32';
1438
- }, {
1439
- name: 'withdrawalFee';
1440
- type: 'u32';
1441
- }, {
1442
- name: 'performanceFee';
1443
- type: 'u32';
1444
- }, {
1445
- name: 'managementFeeBps';
1446
- type: 'u32';
1447
- }];
1448
- }, {
1449
- name: 'setKeeper';
1450
- discriminator: [102, 94, 23, 78, 157, 222, 243, 214];
1451
- accounts: [{
1452
- name: 'manager';
1453
- writable: true;
1454
- signer: true;
1455
- }, {
1456
- name: 'bundleAccount';
1457
- writable: true;
1458
- }];
1459
- args: [{
1460
- name: 'newkeeper';
1461
- type: 'pubkey';
1462
- }];
1463
- }, {
1464
- name: 'setMaxDepositAmount';
1465
- discriminator: [29, 66, 217, 12, 80, 248, 214, 9];
1466
- accounts: [{
1467
- name: 'manager';
1468
- writable: true;
1469
- signer: true;
1470
- }, {
1471
- name: 'bundleAccount';
1472
- writable: true;
1473
- }];
1474
- args: [{
1475
- name: 'maxDepositAmount';
1476
- type: 'u64';
1477
- }];
1478
- }, {
1479
- name: 'setMinDepositAmount';
1480
- discriminator: [224, 153, 215, 211, 233, 14, 124, 128];
1481
- accounts: [{
1482
- name: 'manager';
1483
- writable: true;
1484
- signer: true;
1485
- }, {
1486
- name: 'bundleAccount';
1487
- writable: true;
1488
- }];
1489
- args: [{
1490
- name: 'minDepositAmount';
1491
- type: 'u64';
1492
- }];
1493
- }, {
1494
- name: 'setOracleBuffer';
1495
- discriminator: [7, 196, 14, 82, 110, 244, 46, 33];
1496
- accounts: [{
1497
- name: 'manager';
1498
- writable: true;
1499
- signer: true;
1500
- }, {
1501
- name: 'bundleAccount';
1502
- writable: true;
1503
- }];
1504
- args: [{
1505
- name: 'oracleBuffer';
1506
- type: 'u64';
1507
- }];
1508
- }, {
1509
- name: 'setOracleMaxAge';
1510
- discriminator: [75, 127, 254, 84, 122, 23, 122, 82];
1511
- accounts: [{
1512
- name: 'manager';
1513
- writable: true;
1514
- signer: true;
1515
- }, {
1516
- name: 'bundleAccount';
1517
- writable: true;
1518
- }];
1519
- args: [{
1520
- name: 'oracleMaxAge';
1521
- type: 'i64';
1522
- }];
1523
- }, {
1524
- name: 'setOracleUpdateTimeLimit';
1525
- discriminator: [114, 2, 35, 146, 19, 99, 67, 202];
1526
- accounts: [{
1527
- name: 'manager';
1528
- writable: true;
1529
- signer: true;
1530
- }, {
1531
- name: 'bundleAccount';
1532
- writable: true;
1533
- }];
1534
- args: [{
1535
- name: 'oracleUpdateTimeLimit';
1536
- type: 'i64';
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
- }];
1559
- }, {
1560
- name: 'startDistribution';
1561
- discriminator: [118, 230, 215, 75, 83, 2, 163, 35];
1562
- accounts: [{
1563
- name: 'keeper';
1564
- writable: true;
1565
- signer: true;
1566
- }, {
1567
- name: 'bundleAccount';
1568
- writable: true;
1569
- }, {
1570
- name: 'bundleTempData';
1571
- writable: true;
1572
- pda: {
1573
- seeds: [{
1574
- kind: 'const';
1575
- value: [66, 85, 78, 68, 76, 69, 95, 84, 69, 77, 80, 95, 68, 65, 84, 65];
1576
- }, {
1577
- kind: 'account';
1578
- path: 'bundleAccount';
1579
- }];
1580
- };
1581
- }, {
1582
- name: 'oracleData';
1583
- writable: true;
1584
- pda: {
1585
- seeds: [{
1586
- kind: 'const';
1587
- value: [79, 82, 65, 67, 76, 69];
1588
- }, {
1589
- kind: 'account';
1590
- path: 'bundleAccount';
1591
- }];
1592
- };
1593
- }];
1594
- args: [];
1595
- }, {
1596
- name: 'updateAllocations';
1597
- discriminator: [229, 242, 146, 124, 44, 15, 130, 95];
1598
- accounts: [{
1599
- name: 'manager';
1600
- writable: true;
1601
- signer: true;
1602
- }, {
1603
- name: 'receiverAddress';
1604
- writable: true;
1605
- }, {
1606
- name: 'bundleAccount';
1607
- writable: true;
1608
- }, {
1609
- name: 'strategyAccount';
1610
- writable: true;
1611
- pda: {
1612
- seeds: [{
1613
- kind: 'const';
1614
- value: [83, 84, 82, 65, 84, 69, 71, 89];
1615
- }, {
1616
- kind: 'account';
1617
- path: 'receiverAddress';
1618
- }, {
1619
- kind: 'account';
1620
- path: 'bundleAccount';
1621
- }];
1622
- };
1623
- }];
1624
- args: [{
1625
- name: 'newAllocationBps';
1626
- type: 'u32';
1627
- }];
1628
- }, {
1629
- name: 'updateOracle';
1630
- discriminator: [112, 41, 209, 18, 248, 226, 252, 188];
1631
- accounts: [{
1632
- name: 'keeper';
1633
- writable: true;
1634
- signer: true;
1635
- }, {
1636
- name: 'bundleAccount';
1637
- writable: true;
1638
- }, {
1639
- name: 'bundleTempData';
1640
- writable: true;
1641
- pda: {
1642
- seeds: [{
1643
- kind: 'const';
1644
- value: [66, 85, 78, 68, 76, 69, 95, 84, 69, 77, 80, 95, 68, 65, 84, 65];
1645
- }, {
1646
- kind: 'account';
1647
- path: 'bundleAccount';
1648
- }];
1649
- };
1650
- }, {
1651
- name: 'oracleData';
1652
- writable: true;
1653
- pda: {
1654
- seeds: [{
1655
- kind: 'const';
1656
- value: [79, 82, 65, 67, 76, 69];
1657
- }, {
1658
- kind: 'account';
1659
- path: 'bundleAccount';
1660
- }];
1661
- };
1662
- }];
1663
- args: [{
1664
- name: 'newEquity';
1665
- type: 'u64';
1666
- }];
1667
- }];
1668
- accounts: [{
1669
- name: 'bundle';
1670
- discriminator: [15, 82, 167, 230, 37, 214, 82, 80];
1671
- }, {
1672
- name: 'bundleCreatorAccount';
1673
- discriminator: [210, 168, 93, 196, 184, 35, 210, 101];
1674
- }, {
1675
- name: 'bundleMasterAccount';
1676
- discriminator: [252, 50, 148, 252, 178, 231, 4, 149];
1677
- }, {
1678
- name: 'bundleTempData';
1679
- discriminator: [3, 137, 171, 33, 191, 15, 54, 4];
1680
- }, {
1681
- name: 'oracleData';
1682
- discriminator: [26, 131, 25, 110, 6, 141, 10, 37];
1683
- }, {
1684
- name: 'strategy';
1685
- discriminator: [174, 110, 39, 119, 82, 106, 169, 102];
1686
- }, {
1687
- name: 'userBundleAccount';
1688
- discriminator: [32, 181, 106, 26, 67, 130, 185, 241];
1689
- }];
1690
- events: [{
1691
- name: 'allocated';
1692
- discriminator: [146, 11, 194, 76, 4, 220, 226, 43];
1693
- }, {
1694
- name: 'allocationsUpdated';
1695
- discriminator: [97, 171, 21, 101, 243, 48, 182, 32];
1696
- }, {
1697
- name: 'assignedProfitShare';
1698
- discriminator: [13, 208, 181, 192, 192, 238, 120, 197];
1699
- }, {
1700
- name: 'authorizedReceiverAdded';
1701
- discriminator: [185, 19, 240, 219, 194, 25, 19, 234];
1702
- }, {
1703
- name: 'authorizedReceiverRemoved';
1704
- discriminator: [69, 73, 150, 51, 198, 98, 43, 0];
1705
- }, {
1706
- name: 'bundleCreatorAccountChanged';
1707
- discriminator: [82, 51, 169, 242, 101, 205, 39, 52];
1708
- }, {
1709
- name: 'bundleDepositorInitialized';
1710
- discriminator: [136, 231, 96, 201, 187, 244, 121, 42];
1711
- }, {
1712
- name: 'bundleMasterAccountInitialized';
1713
- discriminator: [238, 211, 137, 135, 255, 239, 90, 91];
1714
- }, {
1715
- name: 'bundleMasterAdminChanged';
1716
- discriminator: [220, 192, 90, 93, 19, 132, 73, 208];
1717
- }, {
1718
- name: 'changedCoreParams';
1719
- discriminator: [156, 119, 46, 221, 22, 121, 186, 53];
1720
- }, {
1721
- name: 'chargedFeesToUser';
1722
- discriminator: [201, 63, 172, 93, 230, 105, 127, 255];
1723
- }, {
1724
- name: 'delaysSet';
1725
- discriminator: [241, 35, 245, 242, 188, 53, 99, 208];
1726
- }, {
1727
- name: 'depositRequested';
1728
- discriminator: [35, 33, 229, 138, 116, 238, 192, 22];
1729
- }, {
1730
- name: 'depositedToDriftVault';
1731
- discriminator: [200, 86, 135, 159, 147, 246, 123, 85];
1732
- }, {
1733
- name: 'distributedToReceivers';
1734
- discriminator: [204, 43, 29, 187, 40, 60, 126, 14];
1735
- }, {
1736
- name: 'distributionEnded';
1737
- discriminator: [21, 180, 83, 66, 101, 235, 108, 208];
1738
- }, {
1739
- name: 'distributionStarted';
1740
- discriminator: [148, 231, 87, 211, 194, 167, 104, 6];
1741
- }, {
1742
- name: 'dustSharesBurned';
1743
- discriminator: [166, 218, 110, 236, 33, 135, 162, 139];
1744
- }, {
1745
- name: 'initializedNewVaultDepositor';
1746
- discriminator: [16, 182, 169, 250, 42, 81, 202, 173];
1747
- }, {
1748
- name: 'initializedReceivers';
1749
- discriminator: [52, 175, 118, 72, 108, 236, 162, 134];
1750
- }, {
1751
- name: 'initializedVault';
1752
- discriminator: [123, 23, 51, 180, 138, 156, 172, 91];
1753
- }, {
1754
- name: 'managerWithdrawal';
1755
- discriminator: [167, 6, 24, 193, 128, 74, 94, 207];
1756
- }, {
1757
- name: 'maxDepositAmountSet';
1758
- discriminator: [204, 243, 42, 160, 116, 144, 207, 38];
1759
- }, {
1760
- name: 'minDepositAmountSet';
1761
- discriminator: [143, 114, 126, 18, 32, 207, 22, 19];
1762
- }, {
1763
- name: 'nettingCompleted';
1764
- discriminator: [176, 162, 4, 24, 91, 47, 115, 81];
1765
- }, {
1766
- name: 'newKeeperSet';
1767
- discriminator: [33, 68, 171, 11, 43, 129, 192, 45];
1768
- }, {
1769
- name: 'newManagerSet';
1770
- discriminator: [215, 213, 93, 251, 202, 98, 253, 29];
1771
- }, {
1772
- name: 'oracleBufferSet';
1773
- discriminator: [188, 151, 124, 251, 253, 205, 187, 32];
1774
- }, {
1775
- name: 'oracleMaxAgeSet';
1776
- discriminator: [51, 17, 80, 99, 8, 112, 166, 44];
1777
- }, {
1778
- name: 'oracleUpdateTimeLimitSet';
1779
- discriminator: [196, 182, 75, 225, 80, 5, 111, 103];
1780
- }, {
1781
- name: 'oracleUpdated';
1782
- discriminator: [138, 9, 51, 219, 228, 198, 11, 147];
1783
- }, {
1784
- name: 'pausedDepositsWithdrawals';
1785
- discriminator: [131, 139, 248, 233, 29, 255, 148, 98];
1786
- }, {
1787
- name: 'redeemed';
1788
- discriminator: [14, 29, 183, 71, 31, 165, 107, 38];
1789
- }, {
1790
- name: 'refilled';
1791
- discriminator: [103, 127, 43, 0, 232, 50, 198, 85];
1792
- }, {
1793
- name: 'refundedDeposit';
1794
- discriminator: [193, 61, 203, 180, 250, 38, 151, 31];
1795
- }, {
1796
- name: 'requestedWithdrawalToDriftVault';
1797
- discriminator: [143, 146, 104, 155, 23, 243, 14, 231];
1798
- }, {
1799
- name: 'strategyAdded';
1800
- discriminator: [248, 59, 8, 90, 242, 168, 247, 204];
1801
- }, {
1802
- name: 'strategyEnabled';
1803
- discriminator: [105, 24, 77, 30, 163, 227, 107, 102];
1804
- }, {
1805
- name: 'strategyRemoved';
1806
- discriminator: [118, 162, 92, 185, 73, 29, 245, 144];
1807
- }, {
1808
- name: 'userBundleAccountClosed';
1809
- discriminator: [111, 102, 134, 54, 238, 23, 157, 183];
1810
- }, {
1811
- name: 'vaultNeutralFeeIncrementerSet';
1812
- discriminator: [7, 53, 169, 104, 118, 22, 134, 207];
1813
- }, {
1814
- name: 'withdrawalRedemptionScheduleSet';
1815
- discriminator: [245, 195, 40, 76, 237, 247, 150, 107];
1816
- }, {
1817
- name: 'withdrawalRequested';
1818
- discriminator: [75, 207, 21, 12, 160, 102, 150, 55];
1819
- }, {
1820
- name: 'withdrawnFromDriftVault';
1821
- discriminator: [249, 177, 58, 24, 88, 115, 105, 193];
1822
- }];
1823
- errors: [{
1824
- code: 6000;
1825
- name: 'insufficientFunds';
1826
- msg: 'Insufficient funds to process withdrawal';
1827
- }, {
1828
- code: 6001;
1829
- name: 'allocationAmountZero';
1830
- msg: 'Allocation amount must be > 0';
1831
- }, {
1832
- code: 6002;
1833
- name: 'redemptionAmountExceeded';
1834
- msg: 'Redemption exceeds bundle balance';
1835
- }, {
1836
- code: 6003;
1837
- name: 'refillAmountInvalid';
1838
- msg: 'Refill amount must be > 0';
1839
- }, {
1840
- code: 6004;
1841
- name: 'unauthorizedKeeperAction';
1842
- msg: 'Not bundle keeper';
1843
- }, {
1844
- code: 6005;
1845
- name: 'unauthorizedManagerAction';
1846
- msg: 'Not bundle manager';
1847
- }, {
1848
- code: 6006;
1849
- name: 'unauthorizedAdminAction';
1850
- msg: 'Not bundle admin';
1851
- }, {
1852
- code: 6007;
1853
- name: 'unauthorizedBundleCreator';
1854
- msg: 'Not whitelisted bundle creator';
1855
- }, {
1856
- code: 6008;
1857
- name: 'callerNotNeutralFeeIncrementer';
1858
- msg: 'Not neutral fee incrementer';
1859
- }, {
1860
- code: 6009;
1861
- name: 'amountMustBeBelowMax';
1862
- msg: 'Amount above max limit';
1863
- }, {
1864
- code: 6010;
1865
- name: 'invalidNeutralFeeIncrementer';
1866
- msg: 'Invalid fee incrementer';
1867
- }, {
1868
- code: 6011;
1869
- name: 'invalidReceiver';
1870
- msg: 'Invalid receiver address';
1871
- }, {
1872
- code: 6012;
1873
- name: 'mathError';
1874
- msg: 'Math error';
1875
- }, {
1876
- code: 6013;
1877
- name: 'invalidAllocations';
1878
- msg: 'Invalid allocations';
1879
- }, {
1880
- code: 6014;
1881
- name: 'mustBeInWhitelist';
1882
- msg: 'Not in whitelist';
1883
- }, {
1884
- code: 6015;
1885
- name: 'distributionAlreadyStarted';
1886
- msg: 'Distribution already started';
1887
- }, {
1888
- code: 6016;
1889
- name: 'distributionNotStarted';
1890
- msg: 'Distribution not started';
1891
- }, {
1892
- code: 6017;
1893
- name: 'leftToDistributeNotZero';
1894
- msg: 'Distribution amount not zero';
1895
- }, {
1896
- code: 6018;
1897
- name: 'receiverAlreadyAllocated';
1898
- msg: 'Receiver already allocated';
1899
- }, {
1900
- code: 6019;
1901
- name: 'rawTransferReceiver';
1902
- msg: 'Not a raw transfer receiver';
1903
- }, {
1904
- code: 6020;
1905
- name: 'invalidTwapPeriod';
1906
- msg: 'Invalid twap period';
1907
- }, {
1908
- code: 6021;
1909
- name: 'refillAmountExceeded';
1910
- msg: 'Refill amount exceeded';
1911
- }, {
1912
- code: 6022;
1913
- name: 'podTokenTotalSupplyZero';
1914
- msg: 'Pod token total supply is zero';
1915
- }, {
1916
- code: 6023;
1917
- name: 'allocationBpsGreaterThanGlobalAllocationBps';
1918
- msg: 'Allocation bps greater than global allocation bps';
1919
- }, {
1920
- code: 6024;
1921
- name: 'equityOutOfBufferBound';
1922
- msg: 'Equity out of buffer bound';
1923
- }, {
1924
- code: 6025;
1925
- name: 'redemptionAmountZero';
1926
- msg: 'Redemption amount must be > 0';
1927
- }, {
1928
- code: 6026;
1929
- name: 'pendingDepositExists';
1930
- msg: 'Pending deposit exists';
1931
- }, {
1932
- code: 6027;
1933
- name: 'insufficientSharesBalance';
1934
- msg: 'Insufficient Shares balance';
1935
- }, {
1936
- code: 6028;
1937
- name: 'pendingWithdrawalExists';
1938
- msg: 'Pending withdrawal exists';
1939
- }, {
1940
- code: 6029;
1941
- name: 'pendingDepositOrWithdrawalExists';
1942
- msg: 'Pending deposit or withdrawal exists';
1943
- }, {
1944
- code: 6030;
1945
- name: 'noPendingWithdrawal';
1946
- msg: 'No pending withdrawal';
1947
- }, {
1948
- code: 6031;
1949
- name: 'withdrawalAlreadyProcessed';
1950
- msg: 'Withdrawal already processed';
1951
- }, {
1952
- code: 6032;
1953
- name: 'pendingDepositAmountZero';
1954
- msg: 'Pending deposit amount is zero';
1955
- }, {
1956
- code: 6033;
1957
- name: 'insufficientBundleBalance';
1958
- msg: 'Insufficient bundle balance';
1959
- }, {
1960
- code: 6034;
1961
- name: 'noPendingTransactions';
1962
- msg: 'No pending transactions';
1963
- }, {
1964
- code: 6035;
1965
- name: 'depositsExtraInPendingsNotZero';
1966
- msg: 'Deposits extra in pendings not zero';
1967
- }, {
1968
- code: 6036;
1969
- name: 'pendingTransactionsExist';
1970
- msg: 'Pending transactions exist';
1971
- }, {
1972
- code: 6037;
1973
- name: 'managerSharesZero';
1974
- msg: 'Manager shares is zero';
1975
- }, {
1976
- code: 6038;
1977
- name: 'pausedDepositsWithdrawals';
1978
- msg: 'Paused deposits withdrawals';
1979
- }, {
1980
- code: 6039;
1981
- name: 'unpausedDepositsWithdrawals';
1982
- msg: 'Unpaused deposits withdrawals';
1983
- }, {
1984
- code: 6040;
1985
- name: 'nettingNotDone';
1986
- msg: 'Netting not done';
1987
- }, {
1988
- code: 6041;
1989
- name: 'nettingAlreadyDone';
1990
- msg: 'Netting already done';
1991
- }, {
1992
- code: 6042;
1993
- name: 'oracleNotUpdated';
1994
- msg: 'Oracle not updated';
1995
- }, {
1996
- code: 6043;
1997
- name: 'maxDepositAmountExceeded';
1998
- msg: 'Max deposit amount exceeded';
1999
- }, {
2000
- code: 6044;
2001
- name: 'totalAssetExceedNewMaxDepositAmount';
2002
- msg: 'Total asset exceed new max deposit amount';
2003
- }, {
2004
- code: 6045;
2005
- name: 'allocationBpsIsZero';
2006
- msg: 'Allocation bps is zero';
2007
- }, {
2008
- code: 6046;
2009
- name: 'depositAmountZero';
2010
- msg: 'Deposit amount is zero';
2011
- }, {
2012
- code: 6047;
2013
- name: 'invalidWithdrawalDelay';
2014
- msg: 'Invalid withdrawal delay';
2015
- }, {
2016
- code: 6048;
2017
- name: 'invalidWithdrawalCooldownPeriod';
2018
- msg: 'Invalid withdrawal cooldown period';
2019
- }, {
2020
- code: 6049;
2021
- name: 'invalidOracleBuffer';
2022
- msg: 'Invalid oracle buffer';
2023
- }, {
2024
- code: 6050;
2025
- name: 'excessivePerformanceFee';
2026
- msg: 'Excessive performance fee';
2027
- }, {
2028
- code: 6051;
2029
- name: 'excessiveManagementFee';
2030
- msg: 'Excessive management fee';
2031
- }, {
2032
- code: 6052;
2033
- name: 'excessiveDepositFee';
2034
- msg: 'Excessive deposit fee';
2035
- }, {
2036
- code: 6053;
2037
- name: 'excessiveWithdrawFee';
2038
- msg: 'Excessive withdraw fee';
2039
- }, {
2040
- code: 6054;
2041
- name: 'withdrawalDelayNotMet';
2042
- msg: 'Withdrawal delay not met';
2043
- }, {
2044
- code: 6055;
2045
- name: 'invalidAssetPrecision';
2046
- msg: 'Invalid asset precision';
2047
- }, {
2048
- code: 6056;
2049
- name: 'invalidAssetAddress';
2050
- msg: 'Invalid asset address';
2051
- }, {
2052
- code: 6057;
2053
- name: 'invalidPermissionnedDepositor';
2054
- msg: 'Invalid permissionned depositor';
2055
- }, {
2056
- code: 6058;
2057
- name: 'payerNotAuthority';
2058
- msg: 'Payer is not the authority';
2059
- }, {
2060
- code: 6059;
2061
- name: 'strategyAlreadyEnabled';
2062
- msg: 'Strategy is already enabled';
2063
- }, {
2064
- code: 6060;
2065
- name: 'strategyDisabled';
2066
- msg: 'Strategy is disabled';
2067
- }, {
2068
- code: 6061;
2069
- name: 'invalidWithdrawalAmount';
2070
- msg: 'Invalid withdrawal amount';
2071
- }, {
2072
- code: 6062;
2073
- name: 'bundleNotPermissionned';
2074
- msg: 'Not permissionned';
2075
- }, {
2076
- code: 6063;
2077
- name: 'bundleIsPermissionned';
2078
- msg: 'Bundle is permissionned, use initialize_permissioned_bundle_depositor';
2079
- }, {
2080
- code: 6064;
2081
- name: 'tooManyAllocatedReceivers';
2082
- msg: 'Too many allocated receivers';
2083
- }, {
2084
- code: 6065;
2085
- name: 'oracleUpdateTooFrequent';
2086
- msg: 'Oracle update too frequent';
2087
- }, {
2088
- code: 6066;
2089
- name: 'userBundleAccountNotEmpty';
2090
- msg: 'User bundle account not empty';
2091
- }, {
2092
- code: 6067;
2093
- name: 'minDepositAmountNotMet';
2094
- msg: 'Min deposit amount not met';
2095
- }, {
2096
- code: 6068;
2097
- name: 'invalidOracleMaxAge';
2098
- msg: 'Invalid oracle max age';
2099
- }, {
2100
- code: 6069;
2101
- name: 'invalidOracleUpdateTimeLimit';
2102
- msg: 'Invalid oracle update time limit';
2103
- }, {
2104
- code: 6070;
2105
- name: 'invalidWithdrawalRedemptionSchedule';
2106
- msg: 'Invalid withdrawal redemption schedule';
2107
- }];
2108
- types: [{
2109
- name: 'allocated';
2110
- type: {
2111
- kind: 'struct';
2112
- fields: [{
2113
- name: 'from';
2114
- type: 'pubkey';
2115
- }, {
2116
- name: 'to';
2117
- type: 'pubkey';
2118
- }, {
2119
- name: 'amount';
2120
- type: 'u64';
2121
- }, {
2122
- name: 'timestamp';
2123
- type: 'i64';
2124
- }, {
2125
- name: 'bundleAccountKey';
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';
2142
- }];
2143
- };
2144
- }, {
2145
- name: 'allocationsUpdated';
2146
- type: {
2147
- kind: 'struct';
2148
- fields: [{
2149
- name: 'receiverAddress';
2150
- type: 'pubkey';
2151
- }, {
2152
- name: 'allocationBps';
2153
- type: 'u32';
2154
- }];
2155
- };
2156
- }, {
2157
- name: 'assignedProfitShare';
2158
- type: {
2159
- kind: 'struct';
2160
- fields: [{
2161
- name: 'amount';
2162
- type: 'u128';
2163
- }];
2164
- };
2165
- }, {
2166
- name: 'authorizedReceiverAdded';
2167
- type: {
2168
- kind: 'struct';
2169
- fields: [{
2170
- name: 'allowed';
2171
- type: 'bool';
2172
- }];
2173
- };
2174
- }, {
2175
- name: 'authorizedReceiverRemoved';
2176
- type: {
2177
- kind: 'struct';
2178
- fields: [{
2179
- name: 'allowed';
2180
- type: 'bool';
2181
- }];
2182
- };
2183
- }, {
2184
- name: 'bundle';
2185
- type: {
2186
- kind: 'struct';
2187
- fields: [{
2188
- name: 'name';
2189
- type: {
2190
- array: ['u8', 32];
2191
- };
2192
- }, {
2193
- name: 'manager';
2194
- type: 'pubkey';
2195
- }, {
2196
- name: 'keeper';
2197
- type: 'pubkey';
2198
- }, {
2199
- name: 'treasuryAccount';
2200
- type: 'pubkey';
2201
- }, {
2202
- name: 'allocatedReceivers';
2203
- type: {
2204
- vec: 'pubkey';
2205
- };
2206
- }, {
2207
- name: 'bundleUnderlyingBalance';
2208
- type: 'u64';
2209
- }, {
2210
- name: 'maxDepositAmount';
2211
- type: 'u64';
2212
- }, {
2213
- name: 'withdrawalDelay';
2214
- type: 'u64';
2215
- }, {
2216
- name: 'performanceFee';
2217
- type: 'u32';
2218
- }, {
2219
- name: 'managementFeeBps';
2220
- type: 'u32';
2221
- }, {
2222
- name: 'depositFee';
2223
- type: 'u32';
2224
- }, {
2225
- name: 'withdrawalFee';
2226
- type: 'u32';
2227
- }, {
2228
- name: 'managerPfeeShares';
2229
- type: 'u128';
2230
- }, {
2231
- name: 'currentAllocationBps';
2232
- type: 'u32';
2233
- }, {
2234
- name: 'oracleBuffer';
2235
- type: 'u64';
2236
- }, {
2237
- name: 'totalShares';
2238
- type: 'u128';
2239
- }, {
2240
- name: 'assetPrecision';
2241
- type: 'u64';
2242
- }, {
2243
- name: 'assetAddress';
2244
- type: 'pubkey';
2245
- }, {
2246
- name: 'assetDecimals';
2247
- type: 'u8';
2248
- }, {
2249
- name: 'withdrawalTMin';
2250
- type: 'i64';
2251
- }, {
2252
- name: 'withdrawalTMax';
2253
- type: 'i64';
2254
- }, {
2255
- name: 'withdrawalCurve';
2256
- type: 'f32';
2257
- }, {
2258
- name: 'permissionned';
2259
- type: 'bool';
2260
- }, {
2261
- name: 'managerMfeeShares';
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';
2281
- }, {
2282
- name: 'padding';
2283
- type: {
2284
- array: ['u8', 207];
2285
- };
2286
- }];
2287
- };
2288
- }, {
2289
- name: 'bundleCreatorAccount';
2290
- type: {
2291
- kind: 'struct';
2292
- fields: [{
2293
- name: 'allowed';
2294
- type: 'bool';
2295
- }, {
2296
- name: 'padding';
2297
- type: {
2298
- array: ['u8', 64];
2299
- };
2300
- }];
2301
- };
2302
- }, {
2303
- name: 'bundleCreatorAccountChanged';
2304
- type: {
2305
- kind: 'struct';
2306
- fields: [{
2307
- name: 'creator';
2308
- type: 'pubkey';
2309
- }, {
2310
- name: 'allowed';
2311
- type: 'bool';
2312
- }];
2313
- };
2314
- }, {
2315
- name: 'bundleDepositorInitialized';
2316
- type: {
2317
- kind: 'struct';
2318
- fields: [{
2319
- name: 'bundleDepositor';
2320
- type: 'pubkey';
2321
- }];
2322
- };
2323
- }, {
2324
- name: 'bundleMasterAccount';
2325
- type: {
2326
- kind: 'struct';
2327
- fields: [{
2328
- name: 'admin';
2329
- type: 'pubkey';
2330
- }, {
2331
- name: 'padding';
2332
- type: {
2333
- array: ['u8', 96];
2334
- };
2335
- }];
2336
- };
2337
- }, {
2338
- name: 'bundleMasterAccountInitialized';
2339
- type: {
2340
- kind: 'struct';
2341
- fields: [{
2342
- name: 'admin';
2343
- type: 'pubkey';
2344
- }];
2345
- };
2346
- }, {
2347
- name: 'bundleMasterAdminChanged';
2348
- type: {
2349
- kind: 'struct';
2350
- fields: [{
2351
- name: 'newAdmin';
2352
- type: 'pubkey';
2353
- }];
2354
- };
2355
- }, {
2356
- name: 'bundleTempData';
2357
- type: {
2358
- kind: 'struct';
2359
- fields: [{
2360
- name: 'cumulativePendingDeposits';
2361
- type: 'u64';
2362
- }, {
2363
- name: 'pendingDepositsCounter';
2364
- type: 'u64';
2365
- }, {
2366
- name: 'pendingWithdrawalsCounter';
2367
- type: 'u64';
2368
- }, {
2369
- name: 'pendingLockedWithdrawalsCounter';
2370
- type: 'u64';
2371
- }, {
2372
- name: 'lastTotalSharesMinted';
2373
- type: 'u128';
2374
- }, {
2375
- name: 'lastNettingTimestamp';
2376
- type: 'i64';
2377
- }, {
2378
- name: 'isNettingDone';
2379
- type: 'bool';
2380
- }, {
2381
- name: 'distributionBaseAmount';
2382
- type: 'u64';
2383
- }, {
2384
- name: 'isDistributionStarted';
2385
- type: 'bool';
2386
- }, {
2387
- name: 'pausedDepositsWithdrawals';
2388
- type: 'bool';
2389
- }, {
2390
- name: 'leftToDistribute';
2391
- type: 'u64';
2392
- }, {
2393
- name: 'allocatedShares';
2394
- type: 'u128';
2395
- }, {
2396
- name: 'padding';
2397
- type: {
2398
- array: ['u8', 168];
2399
- };
2400
- }];
2401
- };
2402
- }, {
2403
- name: 'changedCoreParams';
2404
- type: {
2405
- kind: 'struct';
2406
- fields: [{
2407
- name: 'treasury';
2408
- type: 'pubkey';
2409
- }, {
2410
- name: 'depositFee';
2411
- type: 'u32';
2412
- }, {
2413
- name: 'withdrawalFee';
2414
- type: 'u32';
2415
- }, {
2416
- name: 'performanceFee';
2417
- type: 'u32';
2418
- }, {
2419
- name: 'managementFeeBps';
2420
- type: 'u32';
2421
- }];
2422
- };
2423
- }, {
2424
- name: 'chargedFeesToUser';
2425
- type: {
2426
- kind: 'struct';
2427
- fields: [{
2428
- name: 'totalFeeShares';
2429
- type: 'u128';
2430
- }, {
2431
- name: 'totalFeeValue';
2432
- type: 'u64';
2433
- }, {
2434
- name: 'managementFeeShares';
2435
- type: 'u128';
2436
- }, {
2437
- name: 'performanceFeeShares';
2438
- type: 'u128';
2439
- }, {
2440
- name: 'sharePrice';
2441
- type: 'u128';
2442
- }, {
2443
- name: 'bundleAccountKey';
2444
- type: 'pubkey';
2445
- }];
2446
- };
2447
- }, {
2448
- name: 'delaysSet';
2449
- type: {
2450
- kind: 'struct';
2451
- fields: [{
2452
- name: 'withdrawalDelay';
2453
- type: 'u64';
2454
- }, {
2455
- name: 'withdrawalTMin';
2456
- type: 'i64';
2457
- }, {
2458
- name: 'withdrawalTMax';
2459
- type: 'i64';
2460
- }, {
2461
- name: 'withdrawalCurve';
2462
- type: 'f32';
2463
- }];
2464
- };
2465
- }, {
2466
- name: 'depositRequested';
2467
- type: {
2468
- kind: 'struct';
2469
- fields: [{
2470
- name: 'user';
2471
- type: 'pubkey';
2472
- }, {
2473
- name: 'amount';
2474
- type: 'u64';
2475
- }, {
2476
- name: 'timestamp';
2477
- type: 'i64';
2478
- }, {
2479
- name: 'bundleAccountKey';
2480
- type: 'pubkey';
2481
- }, {
2482
- name: 'toppingUp';
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';
2496
- }];
2497
- };
2498
- }, {
2499
- name: 'depositedToDriftVault';
2500
- type: {
2501
- kind: 'struct';
2502
- fields: [{
2503
- name: 'amount';
2504
- type: 'u64';
2505
- }, {
2506
- name: 'from';
2507
- type: 'pubkey';
2508
- }, {
2509
- name: 'to';
2510
- type: 'pubkey';
2511
- }, {
2512
- name: 'timestamp';
2513
- type: 'i64';
2514
- }];
2515
- };
2516
- }, {
2517
- name: 'distributedToReceivers';
2518
- type: {
2519
- kind: 'struct';
2520
- fields: [{
2521
- name: 'amount';
2522
- type: 'u64';
2523
- }, {
2524
- name: 'from';
2525
- type: 'pubkey';
2526
- }, {
2527
- name: 'receiver';
2528
- type: 'pubkey';
2529
- }, {
2530
- name: 'timestamp';
2531
- type: 'i64';
2532
- }];
2533
- };
2534
- }, {
2535
- name: 'distributionEnded';
2536
- type: {
2537
- kind: 'struct';
2538
- fields: [{
2539
- name: 'amount';
2540
- type: 'u64';
2541
- }, {
2542
- name: 'timestamp';
2543
- type: 'i64';
2544
- }];
2545
- };
2546
- }, {
2547
- name: 'distributionStarted';
2548
- type: {
2549
- kind: 'struct';
2550
- fields: [{
2551
- name: 'amount';
2552
- type: 'u64';
2553
- }, {
2554
- name: 'timestamp';
2555
- type: 'i64';
2556
- }];
2557
- };
2558
- }, {
2559
- name: 'dustSharesBurned';
2560
- type: {
2561
- kind: 'struct';
2562
- fields: [{
2563
- name: 'amount';
2564
- type: 'u128';
2565
- }, {
2566
- name: 'timestamp';
2567
- type: 'i64';
2568
- }, {
2569
- name: 'bundleAccountKey';
2570
- type: 'pubkey';
2571
- }];
2572
- };
2573
- }, {
2574
- name: 'initializedNewVaultDepositor';
2575
- type: {
2576
- kind: 'struct';
2577
- fields: [{
2578
- name: 'vault';
2579
- type: 'pubkey';
2580
- }, {
2581
- name: 'vaultDepositor';
2582
- type: 'pubkey';
2583
- }, {
2584
- name: 'keeper';
2585
- type: 'pubkey';
2586
- }];
2587
- };
2588
- }, {
2589
- name: 'initializedReceivers';
2590
- type: {
2591
- kind: 'struct';
2592
- fields: [{
2593
- name: 'manager';
2594
- type: 'pubkey';
2595
- }];
2596
- };
2597
- }, {
2598
- name: 'initializedVault';
2599
- type: {
2600
- kind: 'struct';
2601
- fields: [{
2602
- name: 'manager';
2603
- type: 'pubkey';
2604
- }];
2605
- };
2606
- }, {
2607
- name: 'managerWithdrawal';
2608
- type: {
2609
- kind: 'struct';
2610
- fields: [{
2611
- name: 'managerShares';
2612
- type: 'u128';
2613
- }, {
2614
- name: 'redemptionAmount';
2615
- type: 'u64';
2616
- }];
2617
- };
2618
- }, {
2619
- name: 'maxDepositAmountSet';
2620
- type: {
2621
- kind: 'struct';
2622
- fields: [{
2623
- name: 'maxDepositAmount';
2624
- type: 'u64';
2625
- }];
2626
- };
2627
- }, {
2628
- name: 'minDepositAmountSet';
2629
- type: {
2630
- kind: 'struct';
2631
- fields: [{
2632
- name: 'minDepositAmount';
2633
- type: 'u64';
2634
- }, {
2635
- name: 'bundleAccountKey';
2636
- type: 'pubkey';
2637
- }];
2638
- };
2639
- }, {
2640
- name: 'nettingCompleted';
2641
- type: {
2642
- kind: 'struct';
2643
- fields: [{
2644
- name: 'timestamp';
2645
- type: 'i64';
2646
- }];
2647
- };
2648
- }, {
2649
- name: 'newKeeperSet';
2650
- type: {
2651
- kind: 'struct';
2652
- fields: [{
2653
- name: 'keeper';
2654
- type: 'pubkey';
2655
- }];
2656
- };
2657
- }, {
2658
- name: 'newManagerSet';
2659
- type: {
2660
- kind: 'struct';
2661
- fields: [{
2662
- name: 'manager';
2663
- type: 'pubkey';
2664
- }];
2665
- };
2666
- }, {
2667
- name: 'oracleBufferSet';
2668
- type: {
2669
- kind: 'struct';
2670
- fields: [{
2671
- name: 'oracleBuffer';
2672
- type: 'u64';
2673
- }];
2674
- };
2675
- }, {
2676
- name: 'oracleData';
2677
- type: {
2678
- kind: 'struct';
2679
- fields: [{
2680
- name: 'averageExternalEquity';
2681
- type: 'u64';
2682
- }, {
2683
- name: 'lastUpdateTime';
2684
- type: 'i64';
2685
- }, {
2686
- name: 'padding';
2687
- type: {
2688
- array: ['u8', 64];
2689
- };
2690
- }];
2691
- };
2692
- }, {
2693
- name: 'oracleMaxAgeSet';
2694
- type: {
2695
- kind: 'struct';
2696
- fields: [{
2697
- name: 'oracleMaxAge';
2698
- type: 'i64';
2699
- }];
2700
- };
2701
- }, {
2702
- name: 'oracleUpdateTimeLimitSet';
2703
- type: {
2704
- kind: 'struct';
2705
- fields: [{
2706
- name: 'oracleUpdateTimeLimit';
2707
- type: 'i64';
2708
- }];
2709
- };
2710
- }, {
2711
- name: 'oracleUpdated';
2712
- type: {
2713
- kind: 'struct';
2714
- fields: [{
2715
- name: 'averageExternalEquity';
2716
- type: 'u64';
2717
- }];
2718
- };
2719
- }, {
2720
- name: 'pausedDepositsWithdrawals';
2721
- type: {
2722
- kind: 'struct';
2723
- fields: [{
2724
- name: 'paused';
2725
- type: 'bool';
2726
- }, {
2727
- name: 'bundleAccountKey';
2728
- type: 'pubkey';
2729
- }];
2730
- };
2731
- }, {
2732
- name: 'redeemed';
2733
- type: {
2734
- kind: 'struct';
2735
- fields: [{
2736
- name: 'from';
2737
- type: 'pubkey';
2738
- }, {
2739
- name: 'to';
2740
- type: 'pubkey';
2741
- }, {
2742
- name: 'netAmount';
2743
- type: 'u64';
2744
- }, {
2745
- name: 'feeAmount';
2746
- type: 'u64';
2747
- }, {
2748
- name: 'timestamp';
2749
- type: 'i64';
2750
- }, {
2751
- name: 'bundleAccountKey';
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';
2771
- }];
2772
- };
2773
- }, {
2774
- name: 'refilled';
2775
- type: {
2776
- kind: 'struct';
2777
- fields: [{
2778
- name: 'from';
2779
- type: 'pubkey';
2780
- }, {
2781
- name: 'refillValue';
2782
- type: 'u64';
2783
- }, {
2784
- name: 'timestamp';
2785
- type: 'i64';
2786
- }];
2787
- };
2788
- }, {
2789
- name: 'refundedDeposit';
2790
- type: {
2791
- kind: 'struct';
2792
- fields: [{
2793
- name: 'user';
2794
- type: 'pubkey';
2795
- }, {
2796
- name: 'amount';
2797
- type: 'u64';
2798
- }, {
2799
- name: 'timestamp';
2800
- type: 'i64';
2801
- }, {
2802
- name: 'bundleAccountKey';
2803
- type: 'pubkey';
2804
- }];
2805
- };
2806
- }, {
2807
- name: 'requestedWithdrawalToDriftVault';
2808
- type: {
2809
- kind: 'struct';
2810
- fields: [{
2811
- name: 'amount';
2812
- type: 'u64';
2813
- }, {
2814
- name: 'from';
2815
- type: 'pubkey';
2816
- }, {
2817
- name: 'to';
2818
- type: 'pubkey';
2819
- }, {
2820
- name: 'timestamp';
2821
- type: 'i64';
2822
- }];
2823
- };
2824
- }, {
2825
- name: 'strategy';
2826
- type: {
2827
- kind: 'struct';
2828
- fields: [{
2829
- name: 'receiverAddress';
2830
- type: 'pubkey';
2831
- }, {
2832
- name: 'allocationBps';
2833
- type: 'u32';
2834
- }, {
2835
- name: 'allowed';
2836
- type: 'bool';
2837
- }, {
2838
- name: 'padding';
2839
- type: {
2840
- array: ['u8', 96];
2841
- };
2842
- }];
2843
- };
2844
- }, {
2845
- name: 'strategyAdded';
2846
- type: {
2847
- kind: 'struct';
2848
- fields: [{
2849
- name: 'receiverAddress';
2850
- type: 'pubkey';
2851
- }, {
2852
- name: 'allocationBps';
2853
- type: 'u32';
2854
- }];
2855
- };
2856
- }, {
2857
- name: 'strategyEnabled';
2858
- type: {
2859
- kind: 'struct';
2860
- fields: [{
2861
- name: 'receiverAddress';
2862
- type: 'pubkey';
2863
- }];
2864
- };
2865
- }, {
2866
- name: 'strategyRemoved';
2867
- type: {
2868
- kind: 'struct';
2869
- fields: [{
2870
- name: 'receiverAddress';
2871
- type: 'pubkey';
2872
- }];
2873
- };
2874
- }, {
2875
- name: 'userBundleAccount';
2876
- type: {
2877
- kind: 'struct';
2878
- fields: [{
2879
- name: 'owner';
2880
- type: 'pubkey';
2881
- }, {
2882
- name: 'lastDepositTimestamp';
2883
- type: 'i64';
2884
- }, {
2885
- name: 'shares';
2886
- type: 'u128';
2887
- }, {
2888
- name: 'pendingDeposit';
2889
- type: 'u64';
2890
- }, {
2891
- name: 'pendingShares';
2892
- type: 'u128';
2893
- }, {
2894
- name: 'estimatedPendingWithdrawalValue';
2895
- type: 'u64';
2896
- }, {
2897
- name: 'withdrawalAvailableTimestamp';
2898
- type: 'i64';
2899
- }, {
2900
- name: 'lastWithdrawalProcessTimestamp';
2901
- type: 'i64';
2902
- }, {
2903
- name: 'lastHighWaterMark';
2904
- type: 'u128';
2905
- }, {
2906
- name: 'hwmPerShare';
2907
- type: 'u128';
2908
- }, {
2909
- name: 'lastManagementFeeTimestamp';
2910
- type: 'i64';
2911
- }, {
2912
- name: 'netDeposits';
2913
- type: 'i128';
2914
- }, {
2915
- name: 'totalFeeCharged';
2916
- type: 'u64';
2917
- }, {
2918
- name: 'padding';
2919
- type: {
2920
- array: ['u8', 264];
2921
- };
2922
- }];
2923
- };
2924
- }, {
2925
- name: 'userBundleAccountClosed';
2926
- type: {
2927
- kind: 'struct';
2928
- fields: [{
2929
- name: 'user';
2930
- type: 'pubkey';
2931
- }, {
2932
- name: 'bundleAccountKey';
2933
- type: 'pubkey';
2934
- }, {
2935
- name: 'userBundleAccountKey';
2936
- type: 'pubkey';
2937
- }];
2938
- };
2939
- }, {
2940
- name: 'vaultNeutralFeeIncrementerSet';
2941
- type: {
2942
- kind: 'struct';
2943
- fields: [{
2944
- name: 'neutralFeeIncrementer';
2945
- type: 'pubkey';
2946
- }];
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
- };
2963
- }, {
2964
- name: 'withdrawalRequested';
2965
- type: {
2966
- kind: 'struct';
2967
- fields: [{
2968
- name: 'user';
2969
- type: 'pubkey';
2970
- }, {
2971
- name: 'amount';
2972
- type: 'u128';
2973
- }, {
2974
- name: 'timestamp';
2975
- type: 'i64';
2976
- }, {
2977
- name: 'cooldownPeriod';
2978
- type: 'i64';
2979
- }, {
2980
- name: 'estimatedPendingWithdrawalValue';
2981
- type: 'u64';
2982
- }, {
2983
- name: 'bundleAccountKey';
2984
- type: 'pubkey';
2985
- }, {
2986
- name: 'cooldownEndTimestamp';
2987
- type: 'i64';
2988
- }, {
2989
- name: 'estimatedNetAmount';
2990
- type: 'u64';
2991
- }];
2992
- };
2993
- }, {
2994
- name: 'withdrawnFromDriftVault';
2995
- type: {
2996
- kind: 'struct';
2997
- fields: [{
2998
- name: 'amount';
2999
- type: 'u64';
3000
- }, {
3001
- name: 'from';
3002
- type: 'pubkey';
3003
- }, {
3004
- name: 'to';
3005
- type: 'pubkey';
3006
- }, {
3007
- name: 'timestamp';
3008
- type: 'i64';
3009
- }];
3010
- };
3011
- }];
3012
- }
3013
- //#endregion
3014
- //#region src/constants/programs.d.ts
3015
- type BundleProgram = Program<Ntbundle>;
3016
- type BundleProvider = AnchorProvider;
3017
- type BundleCluster = 'mainnet' | 'devnet';
3018
- declare const DEFAULT_BUNDLE_PROGRAM_ID_MAINNET = "BUNDDh4P5XviMm1f3gCvnq2qKx6TGosAGnoUK12e7cXU";
3019
- /**
3020
- * Secondary mainnet ntbundle program id (used when a vault sets `bundleProgramId` to this value).
3021
- * Kept in sync with `sdk/src/registry/vaults.json` (e.g. vaultId 69 JLP Delta Neutral).
3022
- */
3023
- declare const BUNDLE_PROGRAM_ID_V2_MAINNET = "BUNDeH5A4c47bcEoAjBhN3sCjLgYnRsmt9ibMztqVkC9";
3024
- declare const DEFAULT_BUNDLE_PROGRAM_ID_DEVNET = "CcR9whVnaW3STx6LLYotwy5JJXmnC8KDjtRotA3NCL8v";
3025
- declare function getDefaultBundleProgramIdByCluster(cluster?: BundleCluster): string;
3026
- /**
3027
- * Create Bundle Program client for a specific program id.
3028
- */
3029
- declare function createBundleProgramById(provider: AnchorProvider, programId: string): Program<Ntbundle>;
3030
- //#endregion
3031
9
  //#region src/constants/vault-ids.d.ts
3032
10
  /**
3033
11
  * Vault ID constants (VaultId)
@@ -3206,206 +184,6 @@ declare enum DevnetVaultId {
3206
184
  dev1_100000001 = 100000001,
3207
185
  }
3208
186
  //#endregion
3209
- //#region src/types/tokens.d.ts
3210
- declare enum SupportedChain {
3211
- Solana = "Solana",
3212
- Hyperliquid = "Hyperliquid",
3213
- }
3214
- declare enum SupportedToken {
3215
- USDC = "USDC",
3216
- USDT = "USDT",
3217
- SOL = "SOL",
3218
- WBTC = "WBTC",
3219
- WETH = "WETH",
3220
- JLP = "JLP",
3221
- }
3222
- interface Token {
3223
- name: string;
3224
- symbol: string;
3225
- onChain: { [chain in SupportedChain]: {
3226
- address: string;
3227
- decimals: number;
3228
- } | null };
3229
- }
3230
- declare const tokens: { [name in SupportedToken]: Token };
3231
- /**
3232
- * Solana mint address for a supported token, keyed by bundle cluster.
3233
- * Devnet USDC uses the team mock mint; other tokens use mainnet table until devnet overrides exist.
3234
- */
3235
- declare function getSolanaTokenMint(token: SupportedToken, cluster?: BundleCluster): string;
3236
- /** SPL decimals for `token` (same on mainnet vs devnet for current overrides). */
3237
- declare function getSolanaTokenDecimals(token: SupportedToken): number;
3238
- //#endregion
3239
- //#region src/types/bundle-types.d.ts
3240
- type UserBundleAccount = IdlAccounts<Ntbundle>['userBundleAccount'];
3241
- type UserBundleTempData = IdlAccounts<Ntbundle>['bundleTempData'];
3242
- type OracleData = IdlAccounts<Ntbundle>['oracleData'];
3243
- type BundleAccount = IdlAccounts<Ntbundle>['bundle'];
3244
- //#endregion
3245
- //#region src/types/vault-types.d.ts
3246
- declare enum VaultType {
3247
- Drift = "Drift",
3248
- Bundle = "Bundle",
3249
- Hyperliquid = "Hyperliquid",
3250
- Kamino = "Kamino",
3251
- }
3252
- declare enum VaultCategory {
3253
- marketNeutral = "Market Neutral",
3254
- directional = "Directional",
3255
- etf = "Index",
3256
- bet = "Bet",
3257
- savings = "Savings",
3258
- privateCredit = "Private Credit",
3259
- airdropFarming = "Airdrop Farming",
3260
- yieldEnhancement = "Yield Enhancement",
3261
- fundOfFund = "Master Vault",
3262
- }
3263
- /** Raw vault entry from registry JSON */
3264
- interface VaultRegistryEntry {
3265
- vaultId: number;
3266
- name: string;
3267
- subname?: string;
3268
- type: VaultType;
3269
- category: VaultCategory;
3270
- vaultAddress: string;
3271
- depositToken: SupportedToken;
3272
- /** Optional Drift program ID (only for Drift vaults with non-default program) */
3273
- driftProgramId?: string;
3274
- /** Optional Bundle program ID. If omitted, SDK uses cluster default bundle program ID. */
3275
- bundleProgramId?: string;
3276
- /** Points: eTVL multiplier (default 1) */
3277
- pointsMultiplier?: number;
3278
- /** Points: include in points calculation (default true) */
3279
- pointsEnabled?: boolean;
3280
- }
3281
- /** Vault registry as a record keyed by vaultId */
3282
- type VaultRegistry = Record<number, VaultRegistryEntry>;
3283
- //#endregion
3284
- //#region src/types/index.d.ts
3285
- interface VaultBalanceData {
3286
- balanceToken: number;
3287
- balanceUsd: number;
3288
- netEarnings: number;
3289
- netEarningsUsd: number;
3290
- totalDeposit: number;
3291
- totalDepositUsd: number;
3292
- pendingDeposit?: number;
3293
- requestWithdrawToken?: number;
3294
- highWaterMark?: number;
3295
- /** Total profit share fee paid by the user */
3296
- feesPaid?: number;
3297
- pendingProfitShareFee?: number;
3298
- /** Unpaid / accrued fees in deposit token; null if not applicable. Bundle: mgmt+perf estimate; Drift: pending profit share. */
3299
- pendingFee: number | null;
3300
- pendingFeeUsd: number | null;
3301
- spotPrice: number;
3302
- /** User's vault shares (raw number, not divided by decimals) */
3303
- vaultShares?: number;
3304
- /** User's net deposits in token amount (already divided by decimals) */
3305
- netDeposit?: number;
3306
- asset: SupportedToken;
3307
- }
3308
- type UserBalanceResult = Record<number, VaultBalanceData | null>;
3309
- //#endregion
3310
- //#region src/constants/vaults.d.ts
3311
- /**
3312
- * Get Bundle Program ID for a vault config
3313
- * Uses registry value if present, otherwise falls back to cluster default.
3314
- */
3315
- declare function getBundleProgramId(vault: VaultRegistryEntry, cluster?: BundleCluster): string | undefined;
3316
- /** Mainnet registry (default; backward compatible). */
3317
- declare const vaults: VaultRegistry;
3318
- /** Devnet-only vault registry (fixtures / local testing). */
3319
- declare const vaultsDevnet: VaultRegistry;
3320
- declare function getVaultRegistry(cluster: BundleCluster): VaultRegistry;
3321
- declare function isValidVaultAddress(address: string, cluster?: BundleCluster): boolean;
3322
- declare function getVaultByAddress(address: string, cluster?: BundleCluster): VaultRegistryEntry | undefined;
3323
- declare function getVaultById(vaultId: number, cluster?: BundleCluster): VaultRegistryEntry | undefined;
3324
- //#endregion
3325
- //#region src/NeutralTrade.d.ts
3326
- interface NeutralTradeConfig {
3327
- rpcUrl: string;
3328
- /** Bundle program cluster selector. Defaults to 'mainnet'. */
3329
- bundleCluster?: BundleCluster;
3330
- /** If true, include built-in vault registry for `bundleCluster` (mainnet vs devnet fixtures). Defaults to true. */
3331
- includeBuiltInVaults?: boolean;
3332
- /** Optional local registry entries. Applied after built-in configs and before registryUrl (if provided). */
3333
- registry?: VaultRegistryEntry[];
3334
- /** Optional registry URL to fetch vault configurations from. If provided, fetched vaults override merged built-in/local entries. */
3335
- registryUrl?: string;
3336
- /** Optional fallback prices map. Prices are fetched from Pyth Network first; fallback is used only if Pyth returns incomplete data */
3337
- fallbackPrices?: Partial<Record<SupportedToken, number>>;
3338
- }
3339
- interface NeutralTradeCoreContext {
3340
- connection: Connection;
3341
- bundlePrograms: Record<string, Program<Ntbundle>>;
3342
- vaults: VaultRegistry;
3343
- priceMap: Map<SupportedToken, number>;
3344
- }
3345
- declare class NeutralTrade {
3346
- readonly connection: Connection;
3347
- readonly bundlePrograms: Record<string, Program<Ntbundle>>;
3348
- readonly bundleCluster: BundleCluster;
3349
- /** Vault configurations after merge order: built-in (cluster-specific) < local registry < registryUrl */
3350
- readonly vaults: VaultRegistry;
3351
- /** Price map for deposit tokens */
3352
- readonly priceMap: Map<SupportedToken, number>;
3353
- protected constructor(connection: Connection, bundlePrograms: Record<string, Program<Ntbundle>>, bundleCluster: BundleCluster, vaults: VaultRegistry, priceMap: Map<SupportedToken, number>);
3354
- /**
3355
- * Create a new NeutralTrade instance
3356
- * Merge order: built-in catalog for `bundleCluster` (when allowed) < local registry < registryUrl
3357
- * @throws Error if registry or registryUrl validation fails (or fetch fails for registryUrl)
3358
- */
3359
- protected static initCore(config: NeutralTradeConfig): Promise<NeutralTradeCoreContext>;
3360
- static create(config: NeutralTradeConfig): Promise<NeutralTrade>;
3361
- private getBundleProgramForVault;
3362
- private static parseVaultRegistryEntries;
3363
- /**
3364
- * Fetch vault configurations from a remote registry URL
3365
- * Expects JSON array format and transforms to Record<number, VaultConfig>
3366
- * @throws Error if fetch fails or validation fails
3367
- */
3368
- private static fetchVaultsFromRegistry;
3369
- /**
3370
- * Get user balance for Bundle vaults only.
3371
- * Drift vault IDs are ignored (no keys in the result).
3372
- */
3373
- getUserBalanceByVaultIds({
3374
- vaultIds,
3375
- userAddress
3376
- }: {
3377
- vaultIds: number[];
3378
- userAddress: string;
3379
- }): Promise<UserBalanceResult>;
3380
- /**
3381
- * Build deposit instructions (`initializeBundleDepositor` when needed, then `requestDeposit`).
3382
- * Fetches bundle and user bundle accounts on-chain.
3383
- */
3384
- buildDepositInstructions({
3385
- vaultId,
3386
- userAddress,
3387
- amountRaw
3388
- }: {
3389
- vaultId: number;
3390
- userAddress: string;
3391
- /** Smallest token units (decimal string), same scale as SPL `amount`. */
3392
- amountRaw: string;
3393
- }): Promise<TransactionInstruction[]>;
3394
- /**
3395
- * Build request-withdraw instruction. Fetches vault, oracle, and depositor accounts on-chain.
3396
- */
3397
- buildRequestWithdrawInstruction({
3398
- vaultId,
3399
- userAddress,
3400
- amountRaw
3401
- }: {
3402
- vaultId: number;
3403
- userAddress: string;
3404
- /** Smallest token units (decimal string) to request withdrawing. */
3405
- amountRaw: string;
3406
- }): Promise<TransactionInstruction>;
3407
- }
3408
- //#endregion
3409
187
  //#region src/utils/amount-raw.d.ts
3410
188
  /**
3411
189
  * Parse `amountRaw`: base-10 digits only, smallest token units (same scale as SPL `amount`).
@@ -3419,23 +197,7 @@ declare function parseAmountRawToBigInt(amountRaw: string): bigint;
3419
197
  */
3420
198
  declare function humanFloatToAmountRawString(human: number, decimals: number): string;
3421
199
  //#endregion
3422
- //#region src/utils/bundle-instructions.d.ts
3423
- interface BuildBundleDepositInstructionsParams {
3424
- bundleProgram: Program<Ntbundle>;
3425
- bundleCluster?: BundleCluster;
3426
- vault: VaultRegistryEntry;
3427
- user: PublicKey;
3428
- /** Smallest token units (decimal string), same scale as SPL token `amount`. */
3429
- amountRaw: string;
3430
- }
3431
- interface BuildBundleRequestWithdrawInstructionParams {
3432
- bundleProgram: Program<Ntbundle>;
3433
- bundleCluster?: BundleCluster;
3434
- vault: VaultRegistryEntry;
3435
- user: PublicKey;
3436
- /** Smallest token units (decimal string) to request withdrawing. */
3437
- amountRaw: string;
3438
- }
200
+ //#region src/utils/request-withdraw-shares.d.ts
3439
201
  /**
3440
202
  * Shares to burn for `requestWithdrawal`, from integer token raw and on-chain totals.
3441
203
  * Full position: pass `amountRaw >= userTokenRaw` where `userTokenRaw = (userShares * totalEquity) / totalShares`.
@@ -3451,23 +213,41 @@ declare function computeRequestWithdrawalSharesFromAmountRaw({
3451
213
  totalEquity: bigint;
3452
214
  totalShares: bigint;
3453
215
  }): BN;
216
+ //#endregion
217
+ //#region src/utils/bundle-instructions.d.ts
218
+ interface BuildBundleDepositInstructionsParams {
219
+ connection: Connection;
220
+ bundleCluster?: BundleCluster;
221
+ vaultId: number;
222
+ user: PublicKey;
223
+ /** Smallest token units (decimal string), same scale as SPL token `amount`. */
224
+ amountRaw: string;
225
+ }
226
+ interface BuildBundleRequestWithdrawInstructionParams {
227
+ connection: Connection;
228
+ bundleCluster?: BundleCluster;
229
+ vaultId: number;
230
+ user: PublicKey;
231
+ /** Smallest token units (decimal string) to request withdrawing. */
232
+ amountRaw: string;
233
+ }
3454
234
  /**
3455
- * `initializeBundleDepositor` (when missing) + `requestDeposit`. Fetches bundle + user bundle internally.
235
+ * `initializeBundleDepositor` (when needed) + `requestDeposit` for a built-in registry vault.
3456
236
  */
3457
237
  declare function buildBundleDepositInstructions({
3458
- bundleProgram,
238
+ connection,
3459
239
  bundleCluster,
3460
- vault,
240
+ vaultId,
3461
241
  user,
3462
242
  amountRaw
3463
243
  }: BuildBundleDepositInstructionsParams): Promise<TransactionInstruction[]>;
3464
244
  /**
3465
- * `requestWithdrawal` only. Fetches bundle, oracle, and user bundle internally.
245
+ * `requestWithdrawal` for a built-in registry vault.
3466
246
  */
3467
247
  declare function buildBundleRequestWithdrawInstruction({
3468
- bundleProgram,
248
+ connection,
3469
249
  bundleCluster,
3470
- vault,
250
+ vaultId,
3471
251
  user,
3472
252
  amountRaw
3473
253
  }: BuildBundleRequestWithdrawInstructionParams): Promise<TransactionInstruction>;
@@ -3499,4 +279,4 @@ declare function derivePendingAuthPDA(bundlePDA: PublicKey, programId: PublicKey
3499
279
  */
3500
280
  declare function getVaultDepositorAddressSync(programId: PublicKey, vault: PublicKey, authority: PublicKey): PublicKey;
3501
281
  //#endregion
3502
- export { BUNDLE_PROGRAM_ID_V2_MAINNET, type BuildBundleDepositInstructionsParams, type BuildBundleRequestWithdrawInstructionParams, type BundleAccount, type BundleCluster, type BundleProgram, type BundleProvider, DEFAULT_BUNDLE_PROGRAM_ID_DEVNET, DEFAULT_BUNDLE_PROGRAM_ID_MAINNET, DevnetVaultId, NeutralTrade, type NeutralTradeConfig, type NeutralTradeCoreContext, type OracleData, SEED_ORACLE, SEED_PENDING_AUTH, SEED_TEMP, SEED_USER, SupportedChain, SupportedToken, type Token, type UserBalanceResult, type UserBundleAccount, type UserBundleTempData, type VaultBalanceData, VaultCategory, VaultId, type VaultRegistry, type VaultRegistryEntry, VaultType, buildBundleDepositInstructions, buildBundleRequestWithdrawInstruction, computeRequestWithdrawalSharesFromAmountRaw, createBundleProgramById, createDummyWallet, deriveOraclePDA, derivePendingAuthPDA, deriveTempDataPDA, deriveUserPDA, getBundleProgramId, getDefaultBundleProgramIdByCluster, getSolanaTokenDecimals, getSolanaTokenMint, getVaultByAddress, getVaultById, getVaultDepositorAddressSync, getVaultRegistry, humanFloatToAmountRawString, isValidVaultAddress, parseAmountRawToBigInt, tokens, vaults, vaultsDevnet };
282
+ export { ALLOWLISTED_BUNDLE_PROGRAM_IDS_BY_CLUSTER, BUNDLE_PROGRAM_ID_V2_MAINNET, type BuildBundleDepositInstructionsParams, type BuildBundleRequestWithdrawInstructionParams, type BundleAccount, type BundleCluster, type BundleProgram, type BundleProvider, DEFAULT_BUNDLE_PROGRAM_ID_DEVNET, DEFAULT_BUNDLE_PROGRAM_ID_MAINNET, DevnetVaultId, NeutralTrade, type NeutralTradeConfig, type NeutralTradeCoreContext, type OracleData, SEED_ORACLE, SEED_PENDING_AUTH, SEED_TEMP, SEED_USER, SupportedChain, SupportedToken, type Token, type UserBalanceResult, type UserBundleAccount, type UserBundleTempData, type VaultBalanceData, VaultCategory, VaultId, type VaultRegistry, type VaultRegistryEntry, VaultType, assertAllowlistedBundleProgramId, buildBundleDepositInstructions, buildBundleRequestWithdrawInstruction, computeRequestWithdrawalSharesFromAmountRaw, createAllowlistedBundleProgram, createBundleProgramById, createDummyWallet, deriveOraclePDA, derivePendingAuthPDA, deriveTempDataPDA, deriveUserPDA, getBundleProgramId, getDefaultBundleProgramIdByCluster, getSolanaTokenDecimals, getSolanaTokenMint, getVaultByAddress, getVaultById, getVaultDepositorAddressSync, getVaultRegistry, humanFloatToAmountRawString, isAllowlistedBundleProgramId, isValidVaultAddress, parseAmountRawToBigInt, tokens, vaults, vaultsDevnet };