@glamsystems/glam-sdk 1.1.0-alpha.0 → 1.1.0-alpha.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.
Files changed (85) hide show
  1. package/index.cjs.js +4898 -1183
  2. package/index.esm.js +4890 -1172
  3. package/package.json +2 -2
  4. package/target/idl/glam_mint-staging.json +236 -0
  5. package/target/idl/glam_protocol-staging.json +5 -0
  6. package/target/idl/glam_protocol.json +5 -0
  7. package/target/types/glam_mint-staging.ts +236 -0
  8. package/target/types/glam_protocol-staging.ts +5 -0
  9. package/target/types/glam_protocol.ts +5 -0
  10. package/src/assets.d.ts +0 -39
  11. package/src/client/access.d.ts +0 -57
  12. package/src/client/base.d.ts +0 -184
  13. package/src/client/bridge.d.ts +0 -183
  14. package/src/client/bridgeRegistry.d.ts +0 -32
  15. package/src/client/cctp.d.ts +0 -156
  16. package/src/client/epi.d.ts +0 -78
  17. package/src/client/fees.d.ts +0 -33
  18. package/src/client/invest.d.ts +0 -37
  19. package/src/client/jupiter.d.ts +0 -45
  20. package/src/client/kamino/farm.d.ts +0 -39
  21. package/src/client/kamino/index.d.ts +0 -4
  22. package/src/client/kamino/lending.d.ts +0 -86
  23. package/src/client/kamino/types.d.ts +0 -56
  24. package/src/client/kamino/vaults.d.ts +0 -31
  25. package/src/client/loopscale.d.ts +0 -84
  26. package/src/client/marinade.d.ts +0 -42
  27. package/src/client/mint.d.ts +0 -127
  28. package/src/client/neutral.d.ts +0 -111
  29. package/src/client/price.d.ts +0 -137
  30. package/src/client/stake-pool.d.ts +0 -39
  31. package/src/client/stake.d.ts +0 -34
  32. package/src/client/state.d.ts +0 -56
  33. package/src/client/timelock.d.ts +0 -31
  34. package/src/client/vault.d.ts +0 -90
  35. package/src/client.d.ts +0 -68
  36. package/src/clientConfig.d.ts +0 -29
  37. package/src/constants.d.ts +0 -84
  38. package/src/deser/base.d.ts +0 -18
  39. package/src/deser/index.d.ts +0 -3
  40. package/src/deser/integrationPolicies.d.ts +0 -120
  41. package/src/deser/kaminoLayouts.d.ts +0 -264
  42. package/src/deser/tokenAclLayouts.d.ts +0 -67
  43. package/src/error.d.ts +0 -29
  44. package/src/glamExports.d.ts +0 -5116
  45. package/src/globalConfig.d.ts +0 -27
  46. package/src/index.d.ts +0 -20
  47. package/src/models/acl.d.ts +0 -43
  48. package/src/models/index.d.ts +0 -8
  49. package/src/models/mint.d.ts +0 -64
  50. package/src/models/state.d.ts +0 -104
  51. package/src/models/types.d.ts +0 -28
  52. package/src/react/cluster-provider.d.ts +0 -22
  53. package/src/react/glam.d.ts +0 -47
  54. package/src/react/index.d.ts +0 -5
  55. package/src/react/query-keys.d.ts +0 -38
  56. package/src/react/useVaultBalanceSubscription.d.ts +0 -17
  57. package/src/utils/accounts.d.ts +0 -72
  58. package/src/utils/bitmask.d.ts +0 -53
  59. package/src/utils/blockhash.d.ts +0 -11
  60. package/src/utils/common.d.ts +0 -37
  61. package/src/utils/computeBudget.d.ts +0 -15
  62. package/src/utils/evm.d.ts +0 -10
  63. package/src/utils/fraction.d.ts +0 -29
  64. package/src/utils/glamPDAs.d.ts +0 -15
  65. package/src/utils/index.d.ts +0 -16
  66. package/src/utils/jupiterApi.d.ts +0 -89
  67. package/src/utils/lookupTables.d.ts +0 -53
  68. package/src/utils/pkmap.d.ts +0 -87
  69. package/src/utils/pkset.d.ts +0 -73
  70. package/src/utils/positionCategorizer.d.ts +0 -36
  71. package/src/utils/rpc.d.ts +0 -33
  72. package/src/utils/timelock.d.ts +0 -52
  73. package/src/utils/transaction.d.ts +0 -13
  74. package/target/types/ext_bridge.d.ts +0 -2385
  75. package/target/types/ext_cctp.d.ts +0 -1268
  76. package/target/types/ext_epi.d.ts +0 -2175
  77. package/target/types/ext_kamino.d.ts +0 -3433
  78. package/target/types/ext_loopscale.d.ts +0 -3547
  79. package/target/types/ext_marinade.d.ts +0 -1593
  80. package/target/types/ext_neutral.d.ts +0 -1786
  81. package/target/types/ext_spl.d.ts +0 -1274
  82. package/target/types/ext_stake_pool.d.ts +0 -1622
  83. package/target/types/glam_config.d.ts +0 -755
  84. package/target/types/glam_mint.d.ts +0 -6106
  85. package/target/types/glam_protocol.d.ts +0 -2708
@@ -1,1786 +0,0 @@
1
- /**
2
- * Program IDL in camelCase format in order to be used in JS/TS.
3
- *
4
- * Note that this is only a type helper and is not the actual IDL. The original
5
- * IDL can be found at `target/idl/ext_neutral.json`.
6
- */
7
- export type ExtNeutral = {
8
- "address": "G1NTNTpbUDVvXHQE6eGgYTBxWpwgLMBBPw4NrZYr5yM5";
9
- "metadata": {
10
- "name": "extNeutral";
11
- "version": "0.1.0";
12
- "spec": "0.1.0";
13
- "description": "Neutral bundle integration for GLAM Protocol";
14
- };
15
- "instructions": [
16
- {
17
- "name": "closeUserBundleAccount";
18
- "docs": [
19
- "Close an empty Neutral user bundle account and remove it from GLAM external positions.",
20
- "",
21
- "- Permission: `CloseUserBundleAccount`.",
22
- "- Policy: `bundle_account` must be present in `NeutralPolicy::bundles_allowlist`."
23
- ];
24
- "discriminator": [
25
- 201,
26
- 195,
27
- 126,
28
- 228,
29
- 9,
30
- 173,
31
- 79,
32
- 215
33
- ];
34
- "accounts": [
35
- {
36
- "name": "glamState";
37
- "writable": true;
38
- },
39
- {
40
- "name": "glamVault";
41
- "writable": true;
42
- "pda": {
43
- "seeds": [
44
- {
45
- "kind": "const";
46
- "value": [
47
- 118,
48
- 97,
49
- 117,
50
- 108,
51
- 116
52
- ];
53
- },
54
- {
55
- "kind": "account";
56
- "path": "glamState";
57
- }
58
- ];
59
- "program": {
60
- "kind": "account";
61
- "path": "glamProtocolProgram";
62
- };
63
- };
64
- },
65
- {
66
- "name": "glamSigner";
67
- "writable": true;
68
- "signer": true;
69
- },
70
- {
71
- "name": "integrationAuthority";
72
- "pda": {
73
- "seeds": [
74
- {
75
- "kind": "const";
76
- "value": [
77
- 105,
78
- 110,
79
- 116,
80
- 101,
81
- 103,
82
- 114,
83
- 97,
84
- 116,
85
- 105,
86
- 111,
87
- 110,
88
- 45,
89
- 97,
90
- 117,
91
- 116,
92
- 104,
93
- 111,
94
- 114,
95
- 105,
96
- 116,
97
- 121
98
- ];
99
- }
100
- ];
101
- };
102
- },
103
- {
104
- "name": "cpiProgram";
105
- "address": "BUNDDh4P5XviMm1f3gCvnq2qKx6TGosAGnoUK12e7cXU";
106
- },
107
- {
108
- "name": "glamProtocolProgram";
109
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz";
110
- },
111
- {
112
- "name": "systemProgram";
113
- "address": "11111111111111111111111111111111";
114
- },
115
- {
116
- "name": "userBundleAccount";
117
- "writable": true;
118
- },
119
- {
120
- "name": "bundleAccount";
121
- }
122
- ];
123
- "args": [];
124
- },
125
- {
126
- "name": "initializeBundleDepositor";
127
- "docs": [
128
- "Initialize a non-permissioned Neutral user bundle account for the GLAM vault.",
129
- "",
130
- "- Permission: `InitializeBundleDepositor`.",
131
- "- Policy: `bundle_account` must be present in `NeutralPolicy::bundles_allowlist`."
132
- ];
133
- "discriminator": [
134
- 126,
135
- 6,
136
- 242,
137
- 36,
138
- 22,
139
- 209,
140
- 35,
141
- 2
142
- ];
143
- "accounts": [
144
- {
145
- "name": "glamState";
146
- "writable": true;
147
- },
148
- {
149
- "name": "glamVault";
150
- "writable": true;
151
- "pda": {
152
- "seeds": [
153
- {
154
- "kind": "const";
155
- "value": [
156
- 118,
157
- 97,
158
- 117,
159
- 108,
160
- 116
161
- ];
162
- },
163
- {
164
- "kind": "account";
165
- "path": "glamState";
166
- }
167
- ];
168
- "program": {
169
- "kind": "account";
170
- "path": "glamProtocolProgram";
171
- };
172
- };
173
- },
174
- {
175
- "name": "glamSigner";
176
- "writable": true;
177
- "signer": true;
178
- },
179
- {
180
- "name": "integrationAuthority";
181
- "pda": {
182
- "seeds": [
183
- {
184
- "kind": "const";
185
- "value": [
186
- 105,
187
- 110,
188
- 116,
189
- 101,
190
- 103,
191
- 114,
192
- 97,
193
- 116,
194
- 105,
195
- 111,
196
- 110,
197
- 45,
198
- 97,
199
- 117,
200
- 116,
201
- 104,
202
- 111,
203
- 114,
204
- 105,
205
- 116,
206
- 121
207
- ];
208
- }
209
- ];
210
- };
211
- },
212
- {
213
- "name": "cpiProgram";
214
- "address": "BUNDDh4P5XviMm1f3gCvnq2qKx6TGosAGnoUK12e7cXU";
215
- },
216
- {
217
- "name": "glamProtocolProgram";
218
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz";
219
- },
220
- {
221
- "name": "systemProgram";
222
- "address": "11111111111111111111111111111111";
223
- },
224
- {
225
- "name": "bundleAccount";
226
- "writable": true;
227
- },
228
- {
229
- "name": "userBundleAccount";
230
- "writable": true;
231
- }
232
- ];
233
- "args": [];
234
- },
235
- {
236
- "name": "initializePermissionedBundleDepositor";
237
- "docs": [
238
- "Initialize a permissioned Neutral user bundle account for the GLAM vault.",
239
- "",
240
- "- Permission: `InitializePermissionedBundleDepositor`.",
241
- "- Policy: `bundle_account` must be present in `NeutralPolicy::bundles_allowlist`."
242
- ];
243
- "discriminator": [
244
- 157,
245
- 162,
246
- 213,
247
- 42,
248
- 205,
249
- 201,
250
- 37,
251
- 255
252
- ];
253
- "accounts": [
254
- {
255
- "name": "glamState";
256
- "writable": true;
257
- },
258
- {
259
- "name": "glamVault";
260
- "writable": true;
261
- "pda": {
262
- "seeds": [
263
- {
264
- "kind": "const";
265
- "value": [
266
- 118,
267
- 97,
268
- 117,
269
- 108,
270
- 116
271
- ];
272
- },
273
- {
274
- "kind": "account";
275
- "path": "glamState";
276
- }
277
- ];
278
- "program": {
279
- "kind": "account";
280
- "path": "glamProtocolProgram";
281
- };
282
- };
283
- },
284
- {
285
- "name": "glamSigner";
286
- "writable": true;
287
- "signer": true;
288
- },
289
- {
290
- "name": "integrationAuthority";
291
- "pda": {
292
- "seeds": [
293
- {
294
- "kind": "const";
295
- "value": [
296
- 105,
297
- 110,
298
- 116,
299
- 101,
300
- 103,
301
- 114,
302
- 97,
303
- 116,
304
- 105,
305
- 111,
306
- 110,
307
- 45,
308
- 97,
309
- 117,
310
- 116,
311
- 104,
312
- 111,
313
- 114,
314
- 105,
315
- 116,
316
- 121
317
- ];
318
- }
319
- ];
320
- };
321
- },
322
- {
323
- "name": "cpiProgram";
324
- "address": "BUNDDh4P5XviMm1f3gCvnq2qKx6TGosAGnoUK12e7cXU";
325
- },
326
- {
327
- "name": "glamProtocolProgram";
328
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz";
329
- },
330
- {
331
- "name": "systemProgram";
332
- "address": "11111111111111111111111111111111";
333
- },
334
- {
335
- "name": "bundleAccount";
336
- "writable": true;
337
- },
338
- {
339
- "name": "userBundleAccount";
340
- "writable": true;
341
- }
342
- ];
343
- "args": [];
344
- },
345
- {
346
- "name": "requestDeposit";
347
- "docs": [
348
- "Request a Neutral bundle deposit from the GLAM vault's token account.",
349
- "",
350
- "- Permission: `RequestDeposit`.",
351
- "- Policy: `bundle_account` must be present in `NeutralPolicy::bundles_allowlist`."
352
- ];
353
- "discriminator": [
354
- 243,
355
- 202,
356
- 197,
357
- 215,
358
- 135,
359
- 97,
360
- 213,
361
- 109
362
- ];
363
- "accounts": [
364
- {
365
- "name": "glamState";
366
- "writable": true;
367
- },
368
- {
369
- "name": "glamVault";
370
- "writable": true;
371
- "pda": {
372
- "seeds": [
373
- {
374
- "kind": "const";
375
- "value": [
376
- 118,
377
- 97,
378
- 117,
379
- 108,
380
- 116
381
- ];
382
- },
383
- {
384
- "kind": "account";
385
- "path": "glamState";
386
- }
387
- ];
388
- "program": {
389
- "kind": "account";
390
- "path": "glamProtocolProgram";
391
- };
392
- };
393
- },
394
- {
395
- "name": "glamSigner";
396
- "writable": true;
397
- "signer": true;
398
- },
399
- {
400
- "name": "integrationAuthority";
401
- "pda": {
402
- "seeds": [
403
- {
404
- "kind": "const";
405
- "value": [
406
- 105,
407
- 110,
408
- 116,
409
- 101,
410
- 103,
411
- 114,
412
- 97,
413
- 116,
414
- 105,
415
- 111,
416
- 110,
417
- 45,
418
- 97,
419
- 117,
420
- 116,
421
- 104,
422
- 111,
423
- 114,
424
- 105,
425
- 116,
426
- 121
427
- ];
428
- }
429
- ];
430
- };
431
- },
432
- {
433
- "name": "cpiProgram";
434
- "address": "BUNDDh4P5XviMm1f3gCvnq2qKx6TGosAGnoUK12e7cXU";
435
- },
436
- {
437
- "name": "glamProtocolProgram";
438
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz";
439
- },
440
- {
441
- "name": "systemProgram";
442
- "address": "11111111111111111111111111111111";
443
- },
444
- {
445
- "name": "userTokenAccount";
446
- "writable": true;
447
- },
448
- {
449
- "name": "pendingDepositTokenAccount";
450
- "writable": true;
451
- },
452
- {
453
- "name": "treasuryAccount";
454
- "writable": true;
455
- },
456
- {
457
- "name": "userBundleAccount";
458
- "writable": true;
459
- },
460
- {
461
- "name": "assetAddress";
462
- "writable": true;
463
- },
464
- {
465
- "name": "oracleData";
466
- "writable": true;
467
- },
468
- {
469
- "name": "bundleTempData";
470
- "writable": true;
471
- },
472
- {
473
- "name": "bundleAccount";
474
- "writable": true;
475
- },
476
- {
477
- "name": "pendingBundleAssetAuthority";
478
- "writable": true;
479
- },
480
- {
481
- "name": "tokenProgram";
482
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
483
- }
484
- ];
485
- "args": [
486
- {
487
- "name": "amount";
488
- "type": "u64";
489
- }
490
- ];
491
- },
492
- {
493
- "name": "requestWithdrawal";
494
- "docs": [
495
- "Request a Neutral bundle withdrawal for the GLAM vault.",
496
- "",
497
- "- Permission: `RequestWithdrawal`.",
498
- "- Policy: `bundle_account` must be present in `NeutralPolicy::bundles_allowlist`."
499
- ];
500
- "discriminator": [
501
- 251,
502
- 85,
503
- 121,
504
- 205,
505
- 56,
506
- 201,
507
- 12,
508
- 177
509
- ];
510
- "accounts": [
511
- {
512
- "name": "glamState";
513
- "writable": true;
514
- },
515
- {
516
- "name": "glamVault";
517
- "writable": true;
518
- "pda": {
519
- "seeds": [
520
- {
521
- "kind": "const";
522
- "value": [
523
- 118,
524
- 97,
525
- 117,
526
- 108,
527
- 116
528
- ];
529
- },
530
- {
531
- "kind": "account";
532
- "path": "glamState";
533
- }
534
- ];
535
- "program": {
536
- "kind": "account";
537
- "path": "glamProtocolProgram";
538
- };
539
- };
540
- },
541
- {
542
- "name": "glamSigner";
543
- "writable": true;
544
- "signer": true;
545
- },
546
- {
547
- "name": "integrationAuthority";
548
- "pda": {
549
- "seeds": [
550
- {
551
- "kind": "const";
552
- "value": [
553
- 105,
554
- 110,
555
- 116,
556
- 101,
557
- 103,
558
- 114,
559
- 97,
560
- 116,
561
- 105,
562
- 111,
563
- 110,
564
- 45,
565
- 97,
566
- 117,
567
- 116,
568
- 104,
569
- 111,
570
- 114,
571
- 105,
572
- 116,
573
- 121
574
- ];
575
- }
576
- ];
577
- };
578
- },
579
- {
580
- "name": "cpiProgram";
581
- "address": "BUNDDh4P5XviMm1f3gCvnq2qKx6TGosAGnoUK12e7cXU";
582
- },
583
- {
584
- "name": "glamProtocolProgram";
585
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz";
586
- },
587
- {
588
- "name": "systemProgram";
589
- "address": "11111111111111111111111111111111";
590
- },
591
- {
592
- "name": "userBundleAccount";
593
- "writable": true;
594
- },
595
- {
596
- "name": "bundleAccount";
597
- "writable": true;
598
- },
599
- {
600
- "name": "oracleData";
601
- "writable": true;
602
- },
603
- {
604
- "name": "bundleTempData";
605
- "writable": true;
606
- },
607
- {
608
- "name": "tokenProgram";
609
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
610
- },
611
- {
612
- "name": "rent";
613
- "address": "SysvarRent111111111111111111111111111111111";
614
- }
615
- ];
616
- "args": [
617
- {
618
- "name": "sharesAmount";
619
- "type": "u128";
620
- },
621
- {
622
- "name": "minEstimatedValue";
623
- "type": "u64";
624
- }
625
- ];
626
- },
627
- {
628
- "name": "setNeutralPolicy";
629
- "docs": [
630
- "Set the Neutral bundle allowlist policy."
631
- ];
632
- "discriminator": [
633
- 82,
634
- 190,
635
- 30,
636
- 24,
637
- 221,
638
- 135,
639
- 158,
640
- 215
641
- ];
642
- "accounts": [
643
- {
644
- "name": "glamState";
645
- "writable": true;
646
- },
647
- {
648
- "name": "glamSigner";
649
- "writable": true;
650
- "signer": true;
651
- },
652
- {
653
- "name": "glamProtocolProgram";
654
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz";
655
- }
656
- ];
657
- "args": [
658
- {
659
- "name": "policy";
660
- "type": {
661
- "defined": {
662
- "name": "neutralPolicy";
663
- };
664
- };
665
- }
666
- ];
667
- }
668
- ];
669
- "accounts": [
670
- {
671
- "name": "stateAccount";
672
- "discriminator": [
673
- 142,
674
- 247,
675
- 54,
676
- 95,
677
- 85,
678
- 133,
679
- 249,
680
- 103
681
- ];
682
- }
683
- ];
684
- "errors": [
685
- {
686
- "code": 6000;
687
- "name": "invalidNeutralAccount";
688
- "msg": "Invalid Neutral account";
689
- },
690
- {
691
- "code": 6001;
692
- "name": "invalidNeutralDiscriminator";
693
- "msg": "Invalid Neutral account discriminator";
694
- },
695
- {
696
- "code": 6002;
697
- "name": "invalidNeutralPda";
698
- "msg": "Invalid Neutral PDA";
699
- },
700
- {
701
- "code": 6003;
702
- "name": "invalidTokenAccount";
703
- "msg": "Invalid token account";
704
- },
705
- {
706
- "code": 6004;
707
- "name": "invalidAmount";
708
- "msg": "Invalid amount";
709
- },
710
- {
711
- "code": 6005;
712
- "name": "bundleAllowlistTooLarge";
713
- "msg": "Neutral bundle allowlist exceeds the maximum length";
714
- },
715
- {
716
- "code": 6006;
717
- "name": "defaultBundleNotAllowed";
718
- "msg": "Neutral bundle allowlist contains the default pubkey";
719
- },
720
- {
721
- "code": 6007;
722
- "name": "duplicateBundle";
723
- "msg": "Neutral bundle allowlist contains a duplicate bundle";
724
- },
725
- {
726
- "code": 6008;
727
- "name": "invalidPermissionMode";
728
- "msg": "Neutral bundle permission mode does not match the instruction";
729
- },
730
- {
731
- "code": 6009;
732
- "name": "unexpectedSigner";
733
- "msg": "Unexpected signer passed to Neutral CPI";
734
- },
735
- {
736
- "code": 6010;
737
- "name": "duplicateAccount";
738
- "msg": "Duplicate account passed to Neutral CPI";
739
- },
740
- {
741
- "code": 6011;
742
- "name": "arithmeticOverflow";
743
- "msg": "Arithmetic overflow during Neutral validation";
744
- },
745
- {
746
- "code": 6012;
747
- "name": "invalidUserBundleAccount";
748
- "msg": "Invalid user bundle account";
749
- },
750
- {
751
- "code": 6013;
752
- "name": "userBundleAccountNotEmpty";
753
- "msg": "User bundle account is not empty";
754
- },
755
- {
756
- "code": 6014;
757
- "name": "userBundleAccountAlreadyInitialized";
758
- "msg": "User bundle account is already initialized";
759
- },
760
- {
761
- "code": 6015;
762
- "name": "userBundleAccountNotClosed";
763
- "msg": "User bundle account was not closed";
764
- },
765
- {
766
- "code": 6016;
767
- "name": "unsupportedTokenProgram";
768
- "msg": "Neutral asset mint must be owned by the legacy SPL Token program";
769
- },
770
- {
771
- "code": 6017;
772
- "name": "estimatedWithdrawalValueTooLow";
773
- "msg": "Estimated withdrawal value is below the caller minimum";
774
- }
775
- ];
776
- "types": [
777
- {
778
- "name": "accountType";
779
- "type": {
780
- "kind": "enum";
781
- "variants": [
782
- {
783
- "name": "vault";
784
- },
785
- {
786
- "name": "tokenizedVault";
787
- },
788
- {
789
- "name": "mint";
790
- },
791
- {
792
- "name": "singleAssetVault";
793
- }
794
- ];
795
- };
796
- },
797
- {
798
- "name": "accruedFees";
799
- "type": {
800
- "kind": "struct";
801
- "fields": [
802
- {
803
- "name": "vaultSubscriptionFee";
804
- "type": "u128";
805
- },
806
- {
807
- "name": "vaultRedemptionFee";
808
- "type": "u128";
809
- },
810
- {
811
- "name": "managerSubscriptionFee";
812
- "type": "u128";
813
- },
814
- {
815
- "name": "managerRedemptionFee";
816
- "type": "u128";
817
- },
818
- {
819
- "name": "managementFee";
820
- "type": "u128";
821
- },
822
- {
823
- "name": "performanceFee";
824
- "type": "u128";
825
- },
826
- {
827
- "name": "protocolBaseFee";
828
- "type": "u128";
829
- },
830
- {
831
- "name": "protocolFlowFee";
832
- "type": "u128";
833
- }
834
- ];
835
- };
836
- },
837
- {
838
- "name": "createdModel";
839
- "type": {
840
- "kind": "struct";
841
- "fields": [
842
- {
843
- "name": "key";
844
- "type": {
845
- "array": [
846
- "u8",
847
- 8
848
- ];
849
- };
850
- },
851
- {
852
- "name": "createdBy";
853
- "type": "pubkey";
854
- },
855
- {
856
- "name": "createdAt";
857
- "type": "i64";
858
- }
859
- ];
860
- };
861
- },
862
- {
863
- "name": "delegateAcl";
864
- "type": {
865
- "kind": "struct";
866
- "fields": [
867
- {
868
- "name": "pubkey";
869
- "type": "pubkey";
870
- },
871
- {
872
- "name": "integrationPermissions";
873
- "type": {
874
- "vec": {
875
- "defined": {
876
- "name": "integrationPermissions";
877
- };
878
- };
879
- };
880
- },
881
- {
882
- "name": "expiresAt";
883
- "type": "i64";
884
- }
885
- ];
886
- };
887
- },
888
- {
889
- "name": "engineField";
890
- "type": {
891
- "kind": "struct";
892
- "fields": [
893
- {
894
- "name": "name";
895
- "type": {
896
- "defined": {
897
- "name": "engineFieldName";
898
- };
899
- };
900
- },
901
- {
902
- "name": "value";
903
- "type": {
904
- "defined": {
905
- "name": "engineFieldValue";
906
- };
907
- };
908
- }
909
- ];
910
- };
911
- },
912
- {
913
- "name": "engineFieldName";
914
- "type": {
915
- "kind": "enum";
916
- "variants": [
917
- {
918
- "name": "owner";
919
- },
920
- {
921
- "name": "portfolioManagerName";
922
- },
923
- {
924
- "name": "name";
925
- },
926
- {
927
- "name": "uri";
928
- },
929
- {
930
- "name": "assets";
931
- },
932
- {
933
- "name": "delegateAcls";
934
- },
935
- {
936
- "name": "integrationAcls";
937
- },
938
- {
939
- "name": "timelockDuration";
940
- },
941
- {
942
- "name": "borrowable";
943
- },
944
- {
945
- "name": "defaultAccountStateFrozen";
946
- },
947
- {
948
- "name": "permanentDelegate";
949
- },
950
- {
951
- "name": "notifyAndSettle";
952
- },
953
- {
954
- "name": "feeStructure";
955
- },
956
- {
957
- "name": "feeParams";
958
- },
959
- {
960
- "name": "claimableFees";
961
- },
962
- {
963
- "name": "claimedFees";
964
- },
965
- {
966
- "name": "oracleConfigs";
967
- }
968
- ];
969
- };
970
- },
971
- {
972
- "name": "engineFieldValue";
973
- "type": {
974
- "kind": "enum";
975
- "variants": [
976
- {
977
- "name": "boolean";
978
- "fields": [
979
- {
980
- "name": "val";
981
- "type": "bool";
982
- }
983
- ];
984
- },
985
- {
986
- "name": "u8";
987
- "fields": [
988
- {
989
- "name": "val";
990
- "type": "u8";
991
- }
992
- ];
993
- },
994
- {
995
- "name": "u32";
996
- "fields": [
997
- {
998
- "name": "val";
999
- "type": "u32";
1000
- }
1001
- ];
1002
- },
1003
- {
1004
- "name": "u64";
1005
- "fields": [
1006
- {
1007
- "name": "val";
1008
- "type": "u64";
1009
- }
1010
- ];
1011
- },
1012
- {
1013
- "name": "string";
1014
- "fields": [
1015
- {
1016
- "name": "val";
1017
- "type": "string";
1018
- }
1019
- ];
1020
- },
1021
- {
1022
- "name": "pubkey";
1023
- "fields": [
1024
- {
1025
- "name": "val";
1026
- "type": "pubkey";
1027
- }
1028
- ];
1029
- },
1030
- {
1031
- "name": "vecPubkey";
1032
- "fields": [
1033
- {
1034
- "name": "val";
1035
- "type": {
1036
- "vec": "pubkey";
1037
- };
1038
- }
1039
- ];
1040
- },
1041
- {
1042
- "name": "vecU8";
1043
- "fields": [
1044
- {
1045
- "name": "val";
1046
- "type": "bytes";
1047
- }
1048
- ];
1049
- },
1050
- {
1051
- "name": "vecU32";
1052
- "fields": [
1053
- {
1054
- "name": "val";
1055
- "type": {
1056
- "vec": "u32";
1057
- };
1058
- }
1059
- ];
1060
- },
1061
- {
1062
- "name": "vecDelegateAcl";
1063
- "fields": [
1064
- {
1065
- "name": "val";
1066
- "type": {
1067
- "vec": {
1068
- "defined": {
1069
- "name": "delegateAcl";
1070
- };
1071
- };
1072
- };
1073
- }
1074
- ];
1075
- },
1076
- {
1077
- "name": "vecIntegrationAcl";
1078
- "fields": [
1079
- {
1080
- "name": "val";
1081
- "type": {
1082
- "vec": {
1083
- "defined": {
1084
- "name": "integrationAcl";
1085
- };
1086
- };
1087
- };
1088
- }
1089
- ];
1090
- },
1091
- {
1092
- "name": "feeStructure";
1093
- "fields": [
1094
- {
1095
- "name": "val";
1096
- "type": {
1097
- "defined": {
1098
- "name": "feeStructure";
1099
- };
1100
- };
1101
- }
1102
- ];
1103
- },
1104
- {
1105
- "name": "feeParams";
1106
- "fields": [
1107
- {
1108
- "name": "val";
1109
- "type": {
1110
- "defined": {
1111
- "name": "feeParams";
1112
- };
1113
- };
1114
- }
1115
- ];
1116
- },
1117
- {
1118
- "name": "accruedFees";
1119
- "fields": [
1120
- {
1121
- "name": "val";
1122
- "type": {
1123
- "defined": {
1124
- "name": "accruedFees";
1125
- };
1126
- };
1127
- }
1128
- ];
1129
- },
1130
- {
1131
- "name": "notifyAndSettle";
1132
- "fields": [
1133
- {
1134
- "name": "val";
1135
- "type": {
1136
- "defined": {
1137
- "name": "notifyAndSettle";
1138
- };
1139
- };
1140
- }
1141
- ];
1142
- },
1143
- {
1144
- "name": "oracleConfigs";
1145
- "fields": [
1146
- {
1147
- "name": "val";
1148
- "type": {
1149
- "defined": {
1150
- "name": "oracleConfigs";
1151
- };
1152
- };
1153
- }
1154
- ];
1155
- }
1156
- ];
1157
- };
1158
- },
1159
- {
1160
- "name": "entryExitFees";
1161
- "type": {
1162
- "kind": "struct";
1163
- "fields": [
1164
- {
1165
- "name": "subscriptionFeeBps";
1166
- "type": "u16";
1167
- },
1168
- {
1169
- "name": "redemptionFeeBps";
1170
- "type": "u16";
1171
- }
1172
- ];
1173
- };
1174
- },
1175
- {
1176
- "name": "feeParams";
1177
- "type": {
1178
- "kind": "struct";
1179
- "fields": [
1180
- {
1181
- "name": "yearInSeconds";
1182
- "type": "u32";
1183
- },
1184
- {
1185
- "name": "paHighWaterMark";
1186
- "type": "i128";
1187
- },
1188
- {
1189
- "name": "paLastNav";
1190
- "type": "i128";
1191
- },
1192
- {
1193
- "name": "lastAum";
1194
- "type": "i128";
1195
- },
1196
- {
1197
- "name": "lastPerformanceFeeCrystallized";
1198
- "type": "i64";
1199
- },
1200
- {
1201
- "name": "lastManagementFeeCrystallized";
1202
- "type": "i64";
1203
- },
1204
- {
1205
- "name": "lastProtocolFeeCrystallized";
1206
- "type": "i64";
1207
- }
1208
- ];
1209
- };
1210
- },
1211
- {
1212
- "name": "feeStructure";
1213
- "type": {
1214
- "kind": "struct";
1215
- "fields": [
1216
- {
1217
- "name": "vault";
1218
- "type": {
1219
- "defined": {
1220
- "name": "entryExitFees";
1221
- };
1222
- };
1223
- },
1224
- {
1225
- "name": "manager";
1226
- "type": {
1227
- "defined": {
1228
- "name": "entryExitFees";
1229
- };
1230
- };
1231
- },
1232
- {
1233
- "name": "management";
1234
- "type": {
1235
- "defined": {
1236
- "name": "managementFee";
1237
- };
1238
- };
1239
- },
1240
- {
1241
- "name": "performance";
1242
- "type": {
1243
- "defined": {
1244
- "name": "performanceFee";
1245
- };
1246
- };
1247
- },
1248
- {
1249
- "name": "protocol";
1250
- "type": {
1251
- "defined": {
1252
- "name": "protocolFees";
1253
- };
1254
- };
1255
- }
1256
- ];
1257
- };
1258
- },
1259
- {
1260
- "name": "hurdleType";
1261
- "type": {
1262
- "kind": "enum";
1263
- "variants": [
1264
- {
1265
- "name": "hard";
1266
- },
1267
- {
1268
- "name": "soft";
1269
- }
1270
- ];
1271
- };
1272
- },
1273
- {
1274
- "name": "integrationAcl";
1275
- "docs": [
1276
- "An integration program can have multiple protocols supported.",
1277
- "Enabled protocols are stored in a bitmask, and each protocol can have its own policy."
1278
- ];
1279
- "type": {
1280
- "kind": "struct";
1281
- "fields": [
1282
- {
1283
- "name": "integrationProgram";
1284
- "type": "pubkey";
1285
- },
1286
- {
1287
- "name": "protocolsBitmask";
1288
- "type": "u16";
1289
- },
1290
- {
1291
- "name": "protocolPolicies";
1292
- "type": {
1293
- "vec": {
1294
- "defined": {
1295
- "name": "protocolPolicy";
1296
- };
1297
- };
1298
- };
1299
- }
1300
- ];
1301
- };
1302
- },
1303
- {
1304
- "name": "integrationPermissions";
1305
- "docs": [
1306
- "Stores delegate permissions for an integration program."
1307
- ];
1308
- "type": {
1309
- "kind": "struct";
1310
- "fields": [
1311
- {
1312
- "name": "integrationProgram";
1313
- "type": "pubkey";
1314
- },
1315
- {
1316
- "name": "protocolPermissions";
1317
- "type": {
1318
- "vec": {
1319
- "defined": {
1320
- "name": "protocolPermissions";
1321
- };
1322
- };
1323
- };
1324
- }
1325
- ];
1326
- };
1327
- },
1328
- {
1329
- "name": "managementFee";
1330
- "type": {
1331
- "kind": "struct";
1332
- "fields": [
1333
- {
1334
- "name": "feeBps";
1335
- "type": "u16";
1336
- }
1337
- ];
1338
- };
1339
- },
1340
- {
1341
- "name": "neutralPolicy";
1342
- "type": {
1343
- "kind": "struct";
1344
- "fields": [
1345
- {
1346
- "name": "bundlesAllowlist";
1347
- "type": {
1348
- "vec": "pubkey";
1349
- };
1350
- }
1351
- ];
1352
- };
1353
- },
1354
- {
1355
- "name": "noticePeriodType";
1356
- "type": {
1357
- "kind": "enum";
1358
- "variants": [
1359
- {
1360
- "name": "hard";
1361
- },
1362
- {
1363
- "name": "soft";
1364
- }
1365
- ];
1366
- };
1367
- },
1368
- {
1369
- "name": "notifyAndSettle";
1370
- "type": {
1371
- "kind": "struct";
1372
- "fields": [
1373
- {
1374
- "name": "model";
1375
- "type": {
1376
- "defined": {
1377
- "name": "valuationModel";
1378
- };
1379
- };
1380
- },
1381
- {
1382
- "name": "permissionlessFulfillment";
1383
- "type": "bool";
1384
- },
1385
- {
1386
- "name": "subscribeNoticePeriodType";
1387
- "type": {
1388
- "defined": {
1389
- "name": "noticePeriodType";
1390
- };
1391
- };
1392
- },
1393
- {
1394
- "name": "subscribeNoticePeriod";
1395
- "type": "u64";
1396
- },
1397
- {
1398
- "name": "subscribeSettlementPeriod";
1399
- "type": "u64";
1400
- },
1401
- {
1402
- "name": "subscribeCancellationWindow";
1403
- "type": "u64";
1404
- },
1405
- {
1406
- "name": "redeemNoticePeriodType";
1407
- "type": {
1408
- "defined": {
1409
- "name": "noticePeriodType";
1410
- };
1411
- };
1412
- },
1413
- {
1414
- "name": "redeemNoticePeriod";
1415
- "type": "u64";
1416
- },
1417
- {
1418
- "name": "redeemSettlementPeriod";
1419
- "type": "u64";
1420
- },
1421
- {
1422
- "name": "redeemCancellationWindow";
1423
- "type": "u64";
1424
- },
1425
- {
1426
- "name": "timeUnit";
1427
- "type": {
1428
- "defined": {
1429
- "name": "timeUnit";
1430
- };
1431
- };
1432
- },
1433
- {
1434
- "name": "padding";
1435
- "type": {
1436
- "array": [
1437
- "u8",
1438
- 3
1439
- ];
1440
- };
1441
- }
1442
- ];
1443
- };
1444
- },
1445
- {
1446
- "name": "oracleConfigs";
1447
- "docs": [
1448
- "Vault-specific oracle configs. If available, these configs are preferred over the global config."
1449
- ];
1450
- "type": {
1451
- "kind": "struct";
1452
- "fields": [
1453
- {
1454
- "name": "maxAgesSeconds";
1455
- "type": {
1456
- "vec": {
1457
- "array": [
1458
- "u16",
1459
- 2
1460
- ];
1461
- };
1462
- };
1463
- },
1464
- {
1465
- "name": "padding";
1466
- "type": {
1467
- "array": [
1468
- "u8",
1469
- 12
1470
- ];
1471
- };
1472
- }
1473
- ];
1474
- };
1475
- },
1476
- {
1477
- "name": "performanceFee";
1478
- "type": {
1479
- "kind": "struct";
1480
- "fields": [
1481
- {
1482
- "name": "feeBps";
1483
- "type": "u16";
1484
- },
1485
- {
1486
- "name": "hurdleRateBps";
1487
- "type": "u16";
1488
- },
1489
- {
1490
- "name": "hurdleType";
1491
- "type": {
1492
- "defined": {
1493
- "name": "hurdleType";
1494
- };
1495
- };
1496
- }
1497
- ];
1498
- };
1499
- },
1500
- {
1501
- "name": "pricedProtocol";
1502
- "type": {
1503
- "kind": "struct";
1504
- "fields": [
1505
- {
1506
- "name": "rent";
1507
- "type": "u64";
1508
- },
1509
- {
1510
- "name": "amount";
1511
- "type": "i128";
1512
- },
1513
- {
1514
- "name": "decimals";
1515
- "type": "u8";
1516
- },
1517
- {
1518
- "name": "lastUpdatedSlot";
1519
- "type": "u64";
1520
- },
1521
- {
1522
- "name": "integrationProgram";
1523
- "type": "pubkey";
1524
- },
1525
- {
1526
- "name": "protocolBitflag";
1527
- "type": "u16";
1528
- },
1529
- {
1530
- "name": "positions";
1531
- "type": {
1532
- "vec": "pubkey";
1533
- };
1534
- }
1535
- ];
1536
- };
1537
- },
1538
- {
1539
- "name": "protocolFees";
1540
- "type": {
1541
- "kind": "struct";
1542
- "fields": [
1543
- {
1544
- "name": "baseFeeBps";
1545
- "type": "u16";
1546
- },
1547
- {
1548
- "name": "flowFeeBps";
1549
- "type": "u16";
1550
- }
1551
- ];
1552
- };
1553
- },
1554
- {
1555
- "name": "protocolPermissions";
1556
- "docs": [
1557
- "Represents a delegate's permissions for a specific protocol"
1558
- ];
1559
- "type": {
1560
- "kind": "struct";
1561
- "fields": [
1562
- {
1563
- "name": "protocolBitflag";
1564
- "type": "u16";
1565
- },
1566
- {
1567
- "name": "permissionsBitmask";
1568
- "type": "u64";
1569
- }
1570
- ];
1571
- };
1572
- },
1573
- {
1574
- "name": "protocolPolicy";
1575
- "docs": [
1576
- "Stores policy data for an integrated protocol.",
1577
- "Integration programs serialize/deserialize this data."
1578
- ];
1579
- "type": {
1580
- "kind": "struct";
1581
- "fields": [
1582
- {
1583
- "name": "protocolBitflag";
1584
- "type": "u16";
1585
- },
1586
- {
1587
- "name": "data";
1588
- "type": "bytes";
1589
- }
1590
- ];
1591
- };
1592
- },
1593
- {
1594
- "name": "stateAccount";
1595
- "type": {
1596
- "kind": "struct";
1597
- "fields": [
1598
- {
1599
- "name": "accountType";
1600
- "type": {
1601
- "defined": {
1602
- "name": "accountType";
1603
- };
1604
- };
1605
- },
1606
- {
1607
- "name": "enabled";
1608
- "type": "bool";
1609
- },
1610
- {
1611
- "name": "vault";
1612
- "type": "pubkey";
1613
- },
1614
- {
1615
- "name": "owner";
1616
- "type": "pubkey";
1617
- },
1618
- {
1619
- "name": "portfolioManagerName";
1620
- "type": {
1621
- "array": [
1622
- "u8",
1623
- 32
1624
- ];
1625
- };
1626
- },
1627
- {
1628
- "name": "created";
1629
- "type": {
1630
- "defined": {
1631
- "name": "createdModel";
1632
- };
1633
- };
1634
- },
1635
- {
1636
- "name": "baseAssetMint";
1637
- "type": "pubkey";
1638
- },
1639
- {
1640
- "name": "baseAssetDecimals";
1641
- "type": "u8";
1642
- },
1643
- {
1644
- "name": "baseAssetTokenProgram";
1645
- "type": "u8";
1646
- },
1647
- {
1648
- "name": "name";
1649
- "type": {
1650
- "array": [
1651
- "u8",
1652
- 32
1653
- ];
1654
- };
1655
- },
1656
- {
1657
- "name": "timelockDuration";
1658
- "type": "u32";
1659
- },
1660
- {
1661
- "name": "timelockExpiresAt";
1662
- "type": "u64";
1663
- },
1664
- {
1665
- "name": "mint";
1666
- "type": "pubkey";
1667
- },
1668
- {
1669
- "name": "assets";
1670
- "type": {
1671
- "vec": "pubkey";
1672
- };
1673
- },
1674
- {
1675
- "name": "integrationAcls";
1676
- "type": {
1677
- "vec": {
1678
- "defined": {
1679
- "name": "integrationAcl";
1680
- };
1681
- };
1682
- };
1683
- },
1684
- {
1685
- "name": "delegateAcls";
1686
- "type": {
1687
- "vec": {
1688
- "defined": {
1689
- "name": "delegateAcl";
1690
- };
1691
- };
1692
- };
1693
- },
1694
- {
1695
- "name": "externalPositions";
1696
- "type": {
1697
- "vec": "pubkey";
1698
- };
1699
- },
1700
- {
1701
- "name": "pricedProtocols";
1702
- "type": {
1703
- "vec": {
1704
- "defined": {
1705
- "name": "pricedProtocol";
1706
- };
1707
- };
1708
- };
1709
- },
1710
- {
1711
- "name": "params";
1712
- "type": {
1713
- "vec": {
1714
- "vec": {
1715
- "defined": {
1716
- "name": "engineField";
1717
- };
1718
- };
1719
- };
1720
- };
1721
- }
1722
- ];
1723
- };
1724
- },
1725
- {
1726
- "name": "timeUnit";
1727
- "type": {
1728
- "kind": "enum";
1729
- "variants": [
1730
- {
1731
- "name": "second";
1732
- },
1733
- {
1734
- "name": "slot";
1735
- }
1736
- ];
1737
- };
1738
- },
1739
- {
1740
- "name": "valuationModel";
1741
- "type": {
1742
- "kind": "enum";
1743
- "variants": [
1744
- {
1745
- "name": "continuous";
1746
- },
1747
- {
1748
- "name": "periodic";
1749
- }
1750
- ];
1751
- };
1752
- }
1753
- ];
1754
- "constants": [
1755
- {
1756
- "name": "protoNeutral";
1757
- "type": "u16";
1758
- "value": "1";
1759
- },
1760
- {
1761
- "name": "protoNeutralPermCloseUserBundleAccount";
1762
- "type": "u64";
1763
- "value": "16";
1764
- },
1765
- {
1766
- "name": "protoNeutralPermInitializeBundleDepositor";
1767
- "type": "u64";
1768
- "value": "1";
1769
- },
1770
- {
1771
- "name": "protoNeutralPermInitializePermissionedBundleDepositor";
1772
- "type": "u64";
1773
- "value": "2";
1774
- },
1775
- {
1776
- "name": "protoNeutralPermRequestDeposit";
1777
- "type": "u64";
1778
- "value": "4";
1779
- },
1780
- {
1781
- "name": "protoNeutralPermRequestWithdrawal";
1782
- "type": "u64";
1783
- "value": "8";
1784
- }
1785
- ];
1786
- };