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