@glamsystems/glam-sdk 1.0.12 → 1.0.14-alpha.0

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 (75) hide show
  1. package/README.md +1 -1
  2. package/index.cjs.js +23827 -26772
  3. package/index.esm.js +23795 -26716
  4. package/package.json +2 -2
  5. package/src/assets.d.ts +9 -15
  6. package/src/client/access.d.ts +13 -0
  7. package/src/client/base.d.ts +27 -6
  8. package/src/client/bridge.d.ts +184 -0
  9. package/src/client/bridgeRegistry.d.ts +32 -0
  10. package/src/client/epi.d.ts +78 -0
  11. package/src/client/fees.d.ts +4 -0
  12. package/src/client/invest.d.ts +1 -1
  13. package/src/client/jupiter.d.ts +22 -18
  14. package/src/client/mint.d.ts +54 -1
  15. package/src/client/price.d.ts +13 -37
  16. package/src/client.d.ts +6 -5
  17. package/src/constants.d.ts +10 -7
  18. package/src/deser/index.d.ts +1 -1
  19. package/src/deser/integrationPolicies.d.ts +23 -20
  20. package/src/deser/tokenAclLayouts.d.ts +67 -0
  21. package/src/error.d.ts +2 -1
  22. package/src/glamExports.d.ts +2344 -1758
  23. package/src/globalConfig.d.ts +22 -0
  24. package/src/index.d.ts +4 -1
  25. package/src/react/glam.d.ts +0 -4
  26. package/src/react/query-keys.d.ts +1 -3
  27. package/src/utils/accounts.d.ts +9 -1
  28. package/src/utils/bitmask.d.ts +3 -0
  29. package/src/utils/common.d.ts +2 -0
  30. package/src/utils/glamPDAs.d.ts +5 -0
  31. package/src/utils/index.d.ts +0 -1
  32. package/src/utils/positionCategorizer.d.ts +3 -21
  33. package/target/idl/ext_cctp.json +1 -1
  34. package/target/idl/ext_kamino-staging.json +1 -1
  35. package/target/idl/ext_kamino.json +109 -1
  36. package/target/idl/ext_spl-staging.json +1 -1
  37. package/target/idl/ext_spl.json +1 -1
  38. package/target/idl/glam_config.json +78 -9
  39. package/target/idl/glam_mint-staging.json +865 -0
  40. package/target/idl/glam_mint.json +227 -8
  41. package/target/idl/glam_policies.json +2 -7
  42. package/target/idl/glam_protocol-staging.json +176 -275
  43. package/target/idl/glam_protocol.json +212 -114
  44. package/target/types/ext_bridge.d.ts +2397 -0
  45. package/target/types/ext_cctp.d.ts +1 -1
  46. package/target/types/ext_cctp.ts +1 -1
  47. package/target/types/ext_epi.d.ts +2175 -0
  48. package/target/types/ext_kamino-staging.ts +1 -1
  49. package/target/types/ext_kamino.d.ts +109 -1
  50. package/target/types/ext_kamino.ts +109 -1
  51. package/target/types/ext_spl-staging.ts +1 -1
  52. package/target/types/ext_spl.d.ts +1 -1
  53. package/target/types/ext_spl.ts +1 -1
  54. package/target/types/glam_config.d.ts +78 -9
  55. package/target/types/glam_config.ts +78 -9
  56. package/target/types/glam_mint-staging.ts +865 -0
  57. package/target/types/glam_mint.d.ts +227 -8
  58. package/target/types/glam_mint.ts +227 -8
  59. package/target/types/glam_policies.ts +2 -7
  60. package/target/types/glam_protocol-staging.ts +176 -275
  61. package/target/types/glam_protocol.d.ts +212 -114
  62. package/target/types/glam_protocol.ts +212 -114
  63. package/src/client/drift/index.d.ts +0 -2
  64. package/src/client/drift/protocol-v2.d.ts +0 -93
  65. package/src/client/drift/vaults.d.ts +0 -60
  66. package/src/deser/driftLayouts.d.ts +0 -217
  67. package/src/utils/drift/index.d.ts +0 -2
  68. package/src/utils/drift/orderParams.d.ts +0 -28
  69. package/src/utils/drift/types.d.ts +0 -522
  70. package/target/idl/ext_drift-staging.json +0 -3993
  71. package/target/idl/ext_drift.json +0 -3993
  72. package/target/types/ext_drift-staging.ts +0 -3999
  73. package/target/types/ext_drift.d.ts +0 -3999
  74. package/target/types/ext_drift.ts +0 -3999
  75. package/target/types/ext_offchain.d.ts +0 -1074
@@ -1,3999 +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_drift.json`.
6
- */
7
- export type ExtDrift = {
8
- "address": "G1NTdrBmBpW43msRQmsf7qXSw3MFBNaqJcAkGiRmRq2F",
9
- "metadata": {
10
- "name": "extDrift",
11
- "version": "1.0.0",
12
- "spec": "0.1.0",
13
- "description": "Drift integration for GLAM Protocol"
14
- },
15
- "instructions": [
16
- {
17
- "name": "cancelOrders",
18
- "discriminator": [
19
- 238,
20
- 225,
21
- 95,
22
- 158,
23
- 227,
24
- 103,
25
- 8,
26
- 194
27
- ],
28
- "accounts": [
29
- {
30
- "name": "glamState",
31
- "writable": true
32
- },
33
- {
34
- "name": "glamVault",
35
- "writable": true,
36
- "pda": {
37
- "seeds": [
38
- {
39
- "kind": "const",
40
- "value": [
41
- 118,
42
- 97,
43
- 117,
44
- 108,
45
- 116
46
- ]
47
- },
48
- {
49
- "kind": "account",
50
- "path": "glamState"
51
- }
52
- ],
53
- "program": {
54
- "kind": "account",
55
- "path": "glamProtocolProgram"
56
- }
57
- }
58
- },
59
- {
60
- "name": "glamSigner",
61
- "writable": true,
62
- "signer": true
63
- },
64
- {
65
- "name": "integrationAuthority",
66
- "pda": {
67
- "seeds": [
68
- {
69
- "kind": "const",
70
- "value": [
71
- 105,
72
- 110,
73
- 116,
74
- 101,
75
- 103,
76
- 114,
77
- 97,
78
- 116,
79
- 105,
80
- 111,
81
- 110,
82
- 45,
83
- 97,
84
- 117,
85
- 116,
86
- 104,
87
- 111,
88
- 114,
89
- 105,
90
- 116,
91
- 121
92
- ]
93
- }
94
- ]
95
- }
96
- },
97
- {
98
- "name": "cpiProgram",
99
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
100
- },
101
- {
102
- "name": "glamProtocolProgram",
103
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
104
- },
105
- {
106
- "name": "systemProgram",
107
- "address": "11111111111111111111111111111111"
108
- },
109
- {
110
- "name": "state"
111
- },
112
- {
113
- "name": "user",
114
- "writable": true
115
- }
116
- ],
117
- "args": [
118
- {
119
- "name": "marketType",
120
- "type": {
121
- "option": {
122
- "defined": {
123
- "name": "marketType"
124
- }
125
- }
126
- }
127
- },
128
- {
129
- "name": "marketIndex",
130
- "type": {
131
- "option": "u16"
132
- }
133
- },
134
- {
135
- "name": "direction",
136
- "type": {
137
- "option": {
138
- "defined": {
139
- "name": "positionDirection"
140
- }
141
- }
142
- }
143
- }
144
- ]
145
- },
146
- {
147
- "name": "cancelOrdersByIds",
148
- "discriminator": [
149
- 134,
150
- 19,
151
- 144,
152
- 165,
153
- 94,
154
- 240,
155
- 210,
156
- 94
157
- ],
158
- "accounts": [
159
- {
160
- "name": "glamState",
161
- "writable": true
162
- },
163
- {
164
- "name": "glamVault",
165
- "writable": true,
166
- "pda": {
167
- "seeds": [
168
- {
169
- "kind": "const",
170
- "value": [
171
- 118,
172
- 97,
173
- 117,
174
- 108,
175
- 116
176
- ]
177
- },
178
- {
179
- "kind": "account",
180
- "path": "glamState"
181
- }
182
- ],
183
- "program": {
184
- "kind": "account",
185
- "path": "glamProtocolProgram"
186
- }
187
- }
188
- },
189
- {
190
- "name": "glamSigner",
191
- "writable": true,
192
- "signer": true
193
- },
194
- {
195
- "name": "integrationAuthority",
196
- "pda": {
197
- "seeds": [
198
- {
199
- "kind": "const",
200
- "value": [
201
- 105,
202
- 110,
203
- 116,
204
- 101,
205
- 103,
206
- 114,
207
- 97,
208
- 116,
209
- 105,
210
- 111,
211
- 110,
212
- 45,
213
- 97,
214
- 117,
215
- 116,
216
- 104,
217
- 111,
218
- 114,
219
- 105,
220
- 116,
221
- 121
222
- ]
223
- }
224
- ]
225
- }
226
- },
227
- {
228
- "name": "cpiProgram",
229
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
230
- },
231
- {
232
- "name": "glamProtocolProgram",
233
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
234
- },
235
- {
236
- "name": "systemProgram",
237
- "address": "11111111111111111111111111111111"
238
- },
239
- {
240
- "name": "state"
241
- },
242
- {
243
- "name": "user",
244
- "writable": true
245
- }
246
- ],
247
- "args": [
248
- {
249
- "name": "orderIds",
250
- "type": {
251
- "vec": "u32"
252
- }
253
- }
254
- ]
255
- },
256
- {
257
- "name": "deleteUser",
258
- "discriminator": [
259
- 186,
260
- 85,
261
- 17,
262
- 249,
263
- 219,
264
- 231,
265
- 98,
266
- 251
267
- ],
268
- "accounts": [
269
- {
270
- "name": "glamState",
271
- "writable": true
272
- },
273
- {
274
- "name": "glamVault",
275
- "writable": true,
276
- "pda": {
277
- "seeds": [
278
- {
279
- "kind": "const",
280
- "value": [
281
- 118,
282
- 97,
283
- 117,
284
- 108,
285
- 116
286
- ]
287
- },
288
- {
289
- "kind": "account",
290
- "path": "glamState"
291
- }
292
- ],
293
- "program": {
294
- "kind": "account",
295
- "path": "glamProtocolProgram"
296
- }
297
- }
298
- },
299
- {
300
- "name": "glamSigner",
301
- "writable": true,
302
- "signer": true
303
- },
304
- {
305
- "name": "integrationAuthority",
306
- "pda": {
307
- "seeds": [
308
- {
309
- "kind": "const",
310
- "value": [
311
- 105,
312
- 110,
313
- 116,
314
- 101,
315
- 103,
316
- 114,
317
- 97,
318
- 116,
319
- 105,
320
- 111,
321
- 110,
322
- 45,
323
- 97,
324
- 117,
325
- 116,
326
- 104,
327
- 111,
328
- 114,
329
- 105,
330
- 116,
331
- 121
332
- ]
333
- }
334
- ]
335
- }
336
- },
337
- {
338
- "name": "cpiProgram",
339
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
340
- },
341
- {
342
- "name": "glamProtocolProgram",
343
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
344
- },
345
- {
346
- "name": "systemProgram",
347
- "address": "11111111111111111111111111111111"
348
- },
349
- {
350
- "name": "user",
351
- "writable": true
352
- },
353
- {
354
- "name": "userStats",
355
- "writable": true
356
- },
357
- {
358
- "name": "state",
359
- "writable": true
360
- }
361
- ],
362
- "args": []
363
- },
364
- {
365
- "name": "deposit",
366
- "discriminator": [
367
- 242,
368
- 35,
369
- 198,
370
- 137,
371
- 82,
372
- 225,
373
- 242,
374
- 182
375
- ],
376
- "accounts": [
377
- {
378
- "name": "glamState",
379
- "writable": true
380
- },
381
- {
382
- "name": "glamVault",
383
- "writable": true,
384
- "pda": {
385
- "seeds": [
386
- {
387
- "kind": "const",
388
- "value": [
389
- 118,
390
- 97,
391
- 117,
392
- 108,
393
- 116
394
- ]
395
- },
396
- {
397
- "kind": "account",
398
- "path": "glamState"
399
- }
400
- ],
401
- "program": {
402
- "kind": "account",
403
- "path": "glamProtocolProgram"
404
- }
405
- }
406
- },
407
- {
408
- "name": "glamSigner",
409
- "writable": true,
410
- "signer": true
411
- },
412
- {
413
- "name": "integrationAuthority",
414
- "pda": {
415
- "seeds": [
416
- {
417
- "kind": "const",
418
- "value": [
419
- 105,
420
- 110,
421
- 116,
422
- 101,
423
- 103,
424
- 114,
425
- 97,
426
- 116,
427
- 105,
428
- 111,
429
- 110,
430
- 45,
431
- 97,
432
- 117,
433
- 116,
434
- 104,
435
- 111,
436
- 114,
437
- 105,
438
- 116,
439
- 121
440
- ]
441
- }
442
- ]
443
- }
444
- },
445
- {
446
- "name": "cpiProgram",
447
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
448
- },
449
- {
450
- "name": "glamProtocolProgram",
451
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
452
- },
453
- {
454
- "name": "systemProgram",
455
- "address": "11111111111111111111111111111111"
456
- },
457
- {
458
- "name": "state"
459
- },
460
- {
461
- "name": "user",
462
- "writable": true
463
- },
464
- {
465
- "name": "userStats",
466
- "writable": true
467
- },
468
- {
469
- "name": "spotMarketVault",
470
- "writable": true
471
- },
472
- {
473
- "name": "userTokenAccount",
474
- "writable": true
475
- },
476
- {
477
- "name": "tokenProgram"
478
- }
479
- ],
480
- "args": [
481
- {
482
- "name": "marketIndex",
483
- "type": "u16"
484
- },
485
- {
486
- "name": "amount",
487
- "type": "u64"
488
- },
489
- {
490
- "name": "reduceOnly",
491
- "type": "bool"
492
- }
493
- ]
494
- },
495
- {
496
- "name": "initializeUser",
497
- "discriminator": [
498
- 111,
499
- 17,
500
- 185,
501
- 250,
502
- 60,
503
- 122,
504
- 38,
505
- 254
506
- ],
507
- "accounts": [
508
- {
509
- "name": "glamState",
510
- "writable": true
511
- },
512
- {
513
- "name": "glamVault",
514
- "writable": true,
515
- "pda": {
516
- "seeds": [
517
- {
518
- "kind": "const",
519
- "value": [
520
- 118,
521
- 97,
522
- 117,
523
- 108,
524
- 116
525
- ]
526
- },
527
- {
528
- "kind": "account",
529
- "path": "glamState"
530
- }
531
- ],
532
- "program": {
533
- "kind": "account",
534
- "path": "glamProtocolProgram"
535
- }
536
- }
537
- },
538
- {
539
- "name": "glamSigner",
540
- "writable": true,
541
- "signer": true
542
- },
543
- {
544
- "name": "integrationAuthority",
545
- "pda": {
546
- "seeds": [
547
- {
548
- "kind": "const",
549
- "value": [
550
- 105,
551
- 110,
552
- 116,
553
- 101,
554
- 103,
555
- 114,
556
- 97,
557
- 116,
558
- 105,
559
- 111,
560
- 110,
561
- 45,
562
- 97,
563
- 117,
564
- 116,
565
- 104,
566
- 111,
567
- 114,
568
- 105,
569
- 116,
570
- 121
571
- ]
572
- }
573
- ]
574
- }
575
- },
576
- {
577
- "name": "cpiProgram",
578
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
579
- },
580
- {
581
- "name": "glamProtocolProgram",
582
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
583
- },
584
- {
585
- "name": "user",
586
- "writable": true
587
- },
588
- {
589
- "name": "userStats",
590
- "writable": true
591
- },
592
- {
593
- "name": "state",
594
- "writable": true
595
- },
596
- {
597
- "name": "rent",
598
- "address": "SysvarRent111111111111111111111111111111111"
599
- },
600
- {
601
- "name": "systemProgram",
602
- "address": "11111111111111111111111111111111"
603
- }
604
- ],
605
- "args": [
606
- {
607
- "name": "subAccountId",
608
- "type": "u16"
609
- },
610
- {
611
- "name": "name",
612
- "type": {
613
- "array": [
614
- "u8",
615
- 32
616
- ]
617
- }
618
- }
619
- ]
620
- },
621
- {
622
- "name": "initializeUserStats",
623
- "discriminator": [
624
- 254,
625
- 243,
626
- 72,
627
- 98,
628
- 251,
629
- 130,
630
- 168,
631
- 213
632
- ],
633
- "accounts": [
634
- {
635
- "name": "glamState",
636
- "writable": true
637
- },
638
- {
639
- "name": "glamVault",
640
- "writable": true,
641
- "pda": {
642
- "seeds": [
643
- {
644
- "kind": "const",
645
- "value": [
646
- 118,
647
- 97,
648
- 117,
649
- 108,
650
- 116
651
- ]
652
- },
653
- {
654
- "kind": "account",
655
- "path": "glamState"
656
- }
657
- ],
658
- "program": {
659
- "kind": "account",
660
- "path": "glamProtocolProgram"
661
- }
662
- }
663
- },
664
- {
665
- "name": "glamSigner",
666
- "writable": true,
667
- "signer": true
668
- },
669
- {
670
- "name": "integrationAuthority",
671
- "pda": {
672
- "seeds": [
673
- {
674
- "kind": "const",
675
- "value": [
676
- 105,
677
- 110,
678
- 116,
679
- 101,
680
- 103,
681
- 114,
682
- 97,
683
- 116,
684
- 105,
685
- 111,
686
- 110,
687
- 45,
688
- 97,
689
- 117,
690
- 116,
691
- 104,
692
- 111,
693
- 114,
694
- 105,
695
- 116,
696
- 121
697
- ]
698
- }
699
- ]
700
- }
701
- },
702
- {
703
- "name": "cpiProgram",
704
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
705
- },
706
- {
707
- "name": "glamProtocolProgram",
708
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
709
- },
710
- {
711
- "name": "userStats",
712
- "writable": true
713
- },
714
- {
715
- "name": "state",
716
- "writable": true
717
- },
718
- {
719
- "name": "rent",
720
- "address": "SysvarRent111111111111111111111111111111111"
721
- },
722
- {
723
- "name": "systemProgram",
724
- "address": "11111111111111111111111111111111"
725
- }
726
- ],
727
- "args": []
728
- },
729
- {
730
- "name": "modifyOrder",
731
- "discriminator": [
732
- 47,
733
- 124,
734
- 117,
735
- 255,
736
- 201,
737
- 197,
738
- 130,
739
- 94
740
- ],
741
- "accounts": [
742
- {
743
- "name": "glamState",
744
- "writable": true
745
- },
746
- {
747
- "name": "glamVault",
748
- "writable": true,
749
- "pda": {
750
- "seeds": [
751
- {
752
- "kind": "const",
753
- "value": [
754
- 118,
755
- 97,
756
- 117,
757
- 108,
758
- 116
759
- ]
760
- },
761
- {
762
- "kind": "account",
763
- "path": "glamState"
764
- }
765
- ],
766
- "program": {
767
- "kind": "account",
768
- "path": "glamProtocolProgram"
769
- }
770
- }
771
- },
772
- {
773
- "name": "glamSigner",
774
- "writable": true,
775
- "signer": true
776
- },
777
- {
778
- "name": "integrationAuthority",
779
- "pda": {
780
- "seeds": [
781
- {
782
- "kind": "const",
783
- "value": [
784
- 105,
785
- 110,
786
- 116,
787
- 101,
788
- 103,
789
- 114,
790
- 97,
791
- 116,
792
- 105,
793
- 111,
794
- 110,
795
- 45,
796
- 97,
797
- 117,
798
- 116,
799
- 104,
800
- 111,
801
- 114,
802
- 105,
803
- 116,
804
- 121
805
- ]
806
- }
807
- ]
808
- }
809
- },
810
- {
811
- "name": "cpiProgram",
812
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
813
- },
814
- {
815
- "name": "glamProtocolProgram",
816
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
817
- },
818
- {
819
- "name": "systemProgram",
820
- "address": "11111111111111111111111111111111"
821
- },
822
- {
823
- "name": "state"
824
- },
825
- {
826
- "name": "user",
827
- "writable": true
828
- }
829
- ],
830
- "args": [
831
- {
832
- "name": "orderId",
833
- "type": {
834
- "option": "u32"
835
- }
836
- },
837
- {
838
- "name": "modifyOrderParams",
839
- "type": {
840
- "defined": {
841
- "name": "modifyOrderParams"
842
- }
843
- }
844
- }
845
- ]
846
- },
847
- {
848
- "name": "placeOrders",
849
- "discriminator": [
850
- 60,
851
- 63,
852
- 50,
853
- 123,
854
- 12,
855
- 197,
856
- 60,
857
- 190
858
- ],
859
- "accounts": [
860
- {
861
- "name": "glamState",
862
- "writable": true
863
- },
864
- {
865
- "name": "glamVault",
866
- "writable": true,
867
- "pda": {
868
- "seeds": [
869
- {
870
- "kind": "const",
871
- "value": [
872
- 118,
873
- 97,
874
- 117,
875
- 108,
876
- 116
877
- ]
878
- },
879
- {
880
- "kind": "account",
881
- "path": "glamState"
882
- }
883
- ],
884
- "program": {
885
- "kind": "account",
886
- "path": "glamProtocolProgram"
887
- }
888
- }
889
- },
890
- {
891
- "name": "glamSigner",
892
- "writable": true,
893
- "signer": true
894
- },
895
- {
896
- "name": "integrationAuthority",
897
- "pda": {
898
- "seeds": [
899
- {
900
- "kind": "const",
901
- "value": [
902
- 105,
903
- 110,
904
- 116,
905
- 101,
906
- 103,
907
- 114,
908
- 97,
909
- 116,
910
- 105,
911
- 111,
912
- 110,
913
- 45,
914
- 97,
915
- 117,
916
- 116,
917
- 104,
918
- 111,
919
- 114,
920
- 105,
921
- 116,
922
- 121
923
- ]
924
- }
925
- ]
926
- }
927
- },
928
- {
929
- "name": "cpiProgram",
930
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
931
- },
932
- {
933
- "name": "glamProtocolProgram",
934
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
935
- },
936
- {
937
- "name": "systemProgram",
938
- "address": "11111111111111111111111111111111"
939
- },
940
- {
941
- "name": "state"
942
- },
943
- {
944
- "name": "user",
945
- "writable": true
946
- }
947
- ],
948
- "args": [
949
- {
950
- "name": "params",
951
- "type": {
952
- "vec": {
953
- "defined": {
954
- "name": "orderParams"
955
- }
956
- }
957
- }
958
- }
959
- ]
960
- },
961
- {
962
- "name": "reclaimRent",
963
- "discriminator": [
964
- 218,
965
- 200,
966
- 19,
967
- 197,
968
- 227,
969
- 89,
970
- 192,
971
- 22
972
- ],
973
- "accounts": [
974
- {
975
- "name": "glamState",
976
- "writable": true
977
- },
978
- {
979
- "name": "glamVault",
980
- "writable": true,
981
- "pda": {
982
- "seeds": [
983
- {
984
- "kind": "const",
985
- "value": [
986
- 118,
987
- 97,
988
- 117,
989
- 108,
990
- 116
991
- ]
992
- },
993
- {
994
- "kind": "account",
995
- "path": "glamState"
996
- }
997
- ],
998
- "program": {
999
- "kind": "account",
1000
- "path": "glamProtocolProgram"
1001
- }
1002
- }
1003
- },
1004
- {
1005
- "name": "glamSigner",
1006
- "writable": true,
1007
- "signer": true
1008
- },
1009
- {
1010
- "name": "integrationAuthority",
1011
- "pda": {
1012
- "seeds": [
1013
- {
1014
- "kind": "const",
1015
- "value": [
1016
- 105,
1017
- 110,
1018
- 116,
1019
- 101,
1020
- 103,
1021
- 114,
1022
- 97,
1023
- 116,
1024
- 105,
1025
- 111,
1026
- 110,
1027
- 45,
1028
- 97,
1029
- 117,
1030
- 116,
1031
- 104,
1032
- 111,
1033
- 114,
1034
- 105,
1035
- 116,
1036
- 121
1037
- ]
1038
- }
1039
- ]
1040
- }
1041
- },
1042
- {
1043
- "name": "cpiProgram",
1044
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
1045
- },
1046
- {
1047
- "name": "glamProtocolProgram",
1048
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1049
- },
1050
- {
1051
- "name": "systemProgram",
1052
- "address": "11111111111111111111111111111111"
1053
- },
1054
- {
1055
- "name": "user",
1056
- "writable": true
1057
- },
1058
- {
1059
- "name": "userStats",
1060
- "writable": true
1061
- },
1062
- {
1063
- "name": "state"
1064
- },
1065
- {
1066
- "name": "rent",
1067
- "address": "SysvarRent111111111111111111111111111111111"
1068
- }
1069
- ],
1070
- "args": []
1071
- },
1072
- {
1073
- "name": "setDriftProtocolPolicy",
1074
- "discriminator": [
1075
- 200,
1076
- 22,
1077
- 110,
1078
- 2,
1079
- 58,
1080
- 22,
1081
- 76,
1082
- 162
1083
- ],
1084
- "accounts": [
1085
- {
1086
- "name": "glamState",
1087
- "writable": true
1088
- },
1089
- {
1090
- "name": "glamSigner",
1091
- "writable": true,
1092
- "signer": true
1093
- },
1094
- {
1095
- "name": "glamProtocolProgram",
1096
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1097
- }
1098
- ],
1099
- "args": [
1100
- {
1101
- "name": "policy",
1102
- "type": {
1103
- "defined": {
1104
- "name": "driftProtocolPolicy"
1105
- }
1106
- }
1107
- }
1108
- ]
1109
- },
1110
- {
1111
- "name": "setDriftVaultsPolicy",
1112
- "discriminator": [
1113
- 168,
1114
- 134,
1115
- 53,
1116
- 33,
1117
- 18,
1118
- 88,
1119
- 142,
1120
- 223
1121
- ],
1122
- "accounts": [
1123
- {
1124
- "name": "glamState",
1125
- "writable": true
1126
- },
1127
- {
1128
- "name": "glamSigner",
1129
- "writable": true,
1130
- "signer": true
1131
- },
1132
- {
1133
- "name": "glamProtocolProgram",
1134
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1135
- }
1136
- ],
1137
- "args": [
1138
- {
1139
- "name": "policy",
1140
- "type": {
1141
- "defined": {
1142
- "name": "driftVaultsPolicy"
1143
- }
1144
- }
1145
- }
1146
- ]
1147
- },
1148
- {
1149
- "name": "settleMultiplePnls",
1150
- "discriminator": [
1151
- 127,
1152
- 66,
1153
- 117,
1154
- 57,
1155
- 40,
1156
- 50,
1157
- 152,
1158
- 127
1159
- ],
1160
- "accounts": [
1161
- {
1162
- "name": "glamState",
1163
- "writable": true
1164
- },
1165
- {
1166
- "name": "glamVault",
1167
- "writable": true,
1168
- "pda": {
1169
- "seeds": [
1170
- {
1171
- "kind": "const",
1172
- "value": [
1173
- 118,
1174
- 97,
1175
- 117,
1176
- 108,
1177
- 116
1178
- ]
1179
- },
1180
- {
1181
- "kind": "account",
1182
- "path": "glamState"
1183
- }
1184
- ],
1185
- "program": {
1186
- "kind": "account",
1187
- "path": "glamProtocolProgram"
1188
- }
1189
- }
1190
- },
1191
- {
1192
- "name": "glamSigner",
1193
- "writable": true,
1194
- "signer": true
1195
- },
1196
- {
1197
- "name": "integrationAuthority",
1198
- "pda": {
1199
- "seeds": [
1200
- {
1201
- "kind": "const",
1202
- "value": [
1203
- 105,
1204
- 110,
1205
- 116,
1206
- 101,
1207
- 103,
1208
- 114,
1209
- 97,
1210
- 116,
1211
- 105,
1212
- 111,
1213
- 110,
1214
- 45,
1215
- 97,
1216
- 117,
1217
- 116,
1218
- 104,
1219
- 111,
1220
- 114,
1221
- 105,
1222
- 116,
1223
- 121
1224
- ]
1225
- }
1226
- ]
1227
- }
1228
- },
1229
- {
1230
- "name": "cpiProgram",
1231
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
1232
- },
1233
- {
1234
- "name": "glamProtocolProgram",
1235
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1236
- },
1237
- {
1238
- "name": "systemProgram",
1239
- "address": "11111111111111111111111111111111"
1240
- },
1241
- {
1242
- "name": "state"
1243
- },
1244
- {
1245
- "name": "user",
1246
- "writable": true
1247
- },
1248
- {
1249
- "name": "spotMarketVault"
1250
- }
1251
- ],
1252
- "args": [
1253
- {
1254
- "name": "marketIndexes",
1255
- "type": {
1256
- "vec": "u16"
1257
- }
1258
- },
1259
- {
1260
- "name": "mode",
1261
- "type": {
1262
- "defined": {
1263
- "name": "settlePnlMode"
1264
- }
1265
- }
1266
- }
1267
- ]
1268
- },
1269
- {
1270
- "name": "settlePnl",
1271
- "discriminator": [
1272
- 43,
1273
- 61,
1274
- 234,
1275
- 45,
1276
- 15,
1277
- 95,
1278
- 152,
1279
- 153
1280
- ],
1281
- "accounts": [
1282
- {
1283
- "name": "glamState",
1284
- "writable": true
1285
- },
1286
- {
1287
- "name": "glamVault",
1288
- "writable": true,
1289
- "pda": {
1290
- "seeds": [
1291
- {
1292
- "kind": "const",
1293
- "value": [
1294
- 118,
1295
- 97,
1296
- 117,
1297
- 108,
1298
- 116
1299
- ]
1300
- },
1301
- {
1302
- "kind": "account",
1303
- "path": "glamState"
1304
- }
1305
- ],
1306
- "program": {
1307
- "kind": "account",
1308
- "path": "glamProtocolProgram"
1309
- }
1310
- }
1311
- },
1312
- {
1313
- "name": "glamSigner",
1314
- "writable": true,
1315
- "signer": true
1316
- },
1317
- {
1318
- "name": "integrationAuthority",
1319
- "pda": {
1320
- "seeds": [
1321
- {
1322
- "kind": "const",
1323
- "value": [
1324
- 105,
1325
- 110,
1326
- 116,
1327
- 101,
1328
- 103,
1329
- 114,
1330
- 97,
1331
- 116,
1332
- 105,
1333
- 111,
1334
- 110,
1335
- 45,
1336
- 97,
1337
- 117,
1338
- 116,
1339
- 104,
1340
- 111,
1341
- 114,
1342
- 105,
1343
- 116,
1344
- 121
1345
- ]
1346
- }
1347
- ]
1348
- }
1349
- },
1350
- {
1351
- "name": "cpiProgram",
1352
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
1353
- },
1354
- {
1355
- "name": "glamProtocolProgram",
1356
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1357
- },
1358
- {
1359
- "name": "systemProgram",
1360
- "address": "11111111111111111111111111111111"
1361
- },
1362
- {
1363
- "name": "state"
1364
- },
1365
- {
1366
- "name": "user",
1367
- "writable": true
1368
- },
1369
- {
1370
- "name": "spotMarketVault"
1371
- }
1372
- ],
1373
- "args": [
1374
- {
1375
- "name": "marketIndex",
1376
- "type": "u16"
1377
- }
1378
- ]
1379
- },
1380
- {
1381
- "name": "updateUserCustomMarginRatio",
1382
- "discriminator": [
1383
- 21,
1384
- 221,
1385
- 140,
1386
- 187,
1387
- 32,
1388
- 129,
1389
- 11,
1390
- 123
1391
- ],
1392
- "accounts": [
1393
- {
1394
- "name": "glamState",
1395
- "writable": true
1396
- },
1397
- {
1398
- "name": "glamVault",
1399
- "writable": true,
1400
- "pda": {
1401
- "seeds": [
1402
- {
1403
- "kind": "const",
1404
- "value": [
1405
- 118,
1406
- 97,
1407
- 117,
1408
- 108,
1409
- 116
1410
- ]
1411
- },
1412
- {
1413
- "kind": "account",
1414
- "path": "glamState"
1415
- }
1416
- ],
1417
- "program": {
1418
- "kind": "account",
1419
- "path": "glamProtocolProgram"
1420
- }
1421
- }
1422
- },
1423
- {
1424
- "name": "glamSigner",
1425
- "writable": true,
1426
- "signer": true
1427
- },
1428
- {
1429
- "name": "integrationAuthority",
1430
- "pda": {
1431
- "seeds": [
1432
- {
1433
- "kind": "const",
1434
- "value": [
1435
- 105,
1436
- 110,
1437
- 116,
1438
- 101,
1439
- 103,
1440
- 114,
1441
- 97,
1442
- 116,
1443
- 105,
1444
- 111,
1445
- 110,
1446
- 45,
1447
- 97,
1448
- 117,
1449
- 116,
1450
- 104,
1451
- 111,
1452
- 114,
1453
- 105,
1454
- 116,
1455
- 121
1456
- ]
1457
- }
1458
- ]
1459
- }
1460
- },
1461
- {
1462
- "name": "cpiProgram",
1463
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
1464
- },
1465
- {
1466
- "name": "glamProtocolProgram",
1467
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1468
- },
1469
- {
1470
- "name": "systemProgram",
1471
- "address": "11111111111111111111111111111111"
1472
- },
1473
- {
1474
- "name": "user",
1475
- "writable": true
1476
- }
1477
- ],
1478
- "args": [
1479
- {
1480
- "name": "subAccountId",
1481
- "type": "u16"
1482
- },
1483
- {
1484
- "name": "marginRatio",
1485
- "type": "u32"
1486
- }
1487
- ]
1488
- },
1489
- {
1490
- "name": "updateUserDelegate",
1491
- "discriminator": [
1492
- 139,
1493
- 205,
1494
- 141,
1495
- 141,
1496
- 113,
1497
- 36,
1498
- 94,
1499
- 187
1500
- ],
1501
- "accounts": [
1502
- {
1503
- "name": "glamState",
1504
- "writable": true
1505
- },
1506
- {
1507
- "name": "glamVault",
1508
- "writable": true,
1509
- "pda": {
1510
- "seeds": [
1511
- {
1512
- "kind": "const",
1513
- "value": [
1514
- 118,
1515
- 97,
1516
- 117,
1517
- 108,
1518
- 116
1519
- ]
1520
- },
1521
- {
1522
- "kind": "account",
1523
- "path": "glamState"
1524
- }
1525
- ],
1526
- "program": {
1527
- "kind": "account",
1528
- "path": "glamProtocolProgram"
1529
- }
1530
- }
1531
- },
1532
- {
1533
- "name": "glamSigner",
1534
- "writable": true,
1535
- "signer": true
1536
- },
1537
- {
1538
- "name": "integrationAuthority",
1539
- "pda": {
1540
- "seeds": [
1541
- {
1542
- "kind": "const",
1543
- "value": [
1544
- 105,
1545
- 110,
1546
- 116,
1547
- 101,
1548
- 103,
1549
- 114,
1550
- 97,
1551
- 116,
1552
- 105,
1553
- 111,
1554
- 110,
1555
- 45,
1556
- 97,
1557
- 117,
1558
- 116,
1559
- 104,
1560
- 111,
1561
- 114,
1562
- 105,
1563
- 116,
1564
- 121
1565
- ]
1566
- }
1567
- ]
1568
- }
1569
- },
1570
- {
1571
- "name": "cpiProgram",
1572
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
1573
- },
1574
- {
1575
- "name": "glamProtocolProgram",
1576
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1577
- },
1578
- {
1579
- "name": "systemProgram",
1580
- "address": "11111111111111111111111111111111"
1581
- },
1582
- {
1583
- "name": "user",
1584
- "writable": true
1585
- }
1586
- ],
1587
- "args": [
1588
- {
1589
- "name": "subAccountId",
1590
- "type": "u16"
1591
- },
1592
- {
1593
- "name": "delegate",
1594
- "type": "pubkey"
1595
- }
1596
- ]
1597
- },
1598
- {
1599
- "name": "updateUserMarginTradingEnabled",
1600
- "discriminator": [
1601
- 194,
1602
- 92,
1603
- 204,
1604
- 223,
1605
- 246,
1606
- 188,
1607
- 31,
1608
- 203
1609
- ],
1610
- "accounts": [
1611
- {
1612
- "name": "glamState",
1613
- "writable": true
1614
- },
1615
- {
1616
- "name": "glamVault",
1617
- "writable": true,
1618
- "pda": {
1619
- "seeds": [
1620
- {
1621
- "kind": "const",
1622
- "value": [
1623
- 118,
1624
- 97,
1625
- 117,
1626
- 108,
1627
- 116
1628
- ]
1629
- },
1630
- {
1631
- "kind": "account",
1632
- "path": "glamState"
1633
- }
1634
- ],
1635
- "program": {
1636
- "kind": "account",
1637
- "path": "glamProtocolProgram"
1638
- }
1639
- }
1640
- },
1641
- {
1642
- "name": "glamSigner",
1643
- "writable": true,
1644
- "signer": true
1645
- },
1646
- {
1647
- "name": "integrationAuthority",
1648
- "pda": {
1649
- "seeds": [
1650
- {
1651
- "kind": "const",
1652
- "value": [
1653
- 105,
1654
- 110,
1655
- 116,
1656
- 101,
1657
- 103,
1658
- 114,
1659
- 97,
1660
- 116,
1661
- 105,
1662
- 111,
1663
- 110,
1664
- 45,
1665
- 97,
1666
- 117,
1667
- 116,
1668
- 104,
1669
- 111,
1670
- 114,
1671
- 105,
1672
- 116,
1673
- 121
1674
- ]
1675
- }
1676
- ]
1677
- }
1678
- },
1679
- {
1680
- "name": "cpiProgram",
1681
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
1682
- },
1683
- {
1684
- "name": "glamProtocolProgram",
1685
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1686
- },
1687
- {
1688
- "name": "systemProgram",
1689
- "address": "11111111111111111111111111111111"
1690
- },
1691
- {
1692
- "name": "user",
1693
- "writable": true
1694
- }
1695
- ],
1696
- "args": [
1697
- {
1698
- "name": "subAccountId",
1699
- "type": "u16"
1700
- },
1701
- {
1702
- "name": "marginTradingEnabled",
1703
- "type": "bool"
1704
- }
1705
- ]
1706
- },
1707
- {
1708
- "name": "updateUserPoolId",
1709
- "discriminator": [
1710
- 219,
1711
- 86,
1712
- 73,
1713
- 106,
1714
- 56,
1715
- 218,
1716
- 128,
1717
- 109
1718
- ],
1719
- "accounts": [
1720
- {
1721
- "name": "glamState",
1722
- "writable": true
1723
- },
1724
- {
1725
- "name": "glamVault",
1726
- "writable": true,
1727
- "pda": {
1728
- "seeds": [
1729
- {
1730
- "kind": "const",
1731
- "value": [
1732
- 118,
1733
- 97,
1734
- 117,
1735
- 108,
1736
- 116
1737
- ]
1738
- },
1739
- {
1740
- "kind": "account",
1741
- "path": "glamState"
1742
- }
1743
- ],
1744
- "program": {
1745
- "kind": "account",
1746
- "path": "glamProtocolProgram"
1747
- }
1748
- }
1749
- },
1750
- {
1751
- "name": "glamSigner",
1752
- "writable": true,
1753
- "signer": true
1754
- },
1755
- {
1756
- "name": "integrationAuthority",
1757
- "pda": {
1758
- "seeds": [
1759
- {
1760
- "kind": "const",
1761
- "value": [
1762
- 105,
1763
- 110,
1764
- 116,
1765
- 101,
1766
- 103,
1767
- 114,
1768
- 97,
1769
- 116,
1770
- 105,
1771
- 111,
1772
- 110,
1773
- 45,
1774
- 97,
1775
- 117,
1776
- 116,
1777
- 104,
1778
- 111,
1779
- 114,
1780
- 105,
1781
- 116,
1782
- 121
1783
- ]
1784
- }
1785
- ]
1786
- }
1787
- },
1788
- {
1789
- "name": "cpiProgram",
1790
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
1791
- },
1792
- {
1793
- "name": "glamProtocolProgram",
1794
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1795
- },
1796
- {
1797
- "name": "systemProgram",
1798
- "address": "11111111111111111111111111111111"
1799
- },
1800
- {
1801
- "name": "user",
1802
- "writable": true
1803
- }
1804
- ],
1805
- "args": [
1806
- {
1807
- "name": "subAccountId",
1808
- "type": "u16"
1809
- },
1810
- {
1811
- "name": "poolId",
1812
- "type": "u8"
1813
- }
1814
- ]
1815
- },
1816
- {
1817
- "name": "vaultsCancelRequestWithdraw",
1818
- "discriminator": [
1819
- 188,
1820
- 93,
1821
- 159,
1822
- 202,
1823
- 157,
1824
- 47,
1825
- 143,
1826
- 219
1827
- ],
1828
- "accounts": [
1829
- {
1830
- "name": "glamState",
1831
- "writable": true
1832
- },
1833
- {
1834
- "name": "glamVault",
1835
- "writable": true,
1836
- "pda": {
1837
- "seeds": [
1838
- {
1839
- "kind": "const",
1840
- "value": [
1841
- 118,
1842
- 97,
1843
- 117,
1844
- 108,
1845
- 116
1846
- ]
1847
- },
1848
- {
1849
- "kind": "account",
1850
- "path": "glamState"
1851
- }
1852
- ],
1853
- "program": {
1854
- "kind": "account",
1855
- "path": "glamProtocolProgram"
1856
- }
1857
- }
1858
- },
1859
- {
1860
- "name": "glamSigner",
1861
- "writable": true,
1862
- "signer": true
1863
- },
1864
- {
1865
- "name": "integrationAuthority",
1866
- "pda": {
1867
- "seeds": [
1868
- {
1869
- "kind": "const",
1870
- "value": [
1871
- 105,
1872
- 110,
1873
- 116,
1874
- 101,
1875
- 103,
1876
- 114,
1877
- 97,
1878
- 116,
1879
- 105,
1880
- 111,
1881
- 110,
1882
- 45,
1883
- 97,
1884
- 117,
1885
- 116,
1886
- 104,
1887
- 111,
1888
- 114,
1889
- 105,
1890
- 116,
1891
- 121
1892
- ]
1893
- }
1894
- ]
1895
- }
1896
- },
1897
- {
1898
- "name": "cpiProgram",
1899
- "address": "vAuLTsyrvSfZRuRB3XgvkPwNGgYSs9YRYymVebLKoxR"
1900
- },
1901
- {
1902
- "name": "glamProtocolProgram",
1903
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1904
- },
1905
- {
1906
- "name": "systemProgram",
1907
- "address": "11111111111111111111111111111111"
1908
- },
1909
- {
1910
- "name": "vault",
1911
- "writable": true
1912
- },
1913
- {
1914
- "name": "vaultDepositor",
1915
- "writable": true
1916
- },
1917
- {
1918
- "name": "driftUserStats"
1919
- },
1920
- {
1921
- "name": "driftUser"
1922
- }
1923
- ],
1924
- "args": []
1925
- },
1926
- {
1927
- "name": "vaultsDeposit",
1928
- "discriminator": [
1929
- 124,
1930
- 173,
1931
- 191,
1932
- 223,
1933
- 48,
1934
- 26,
1935
- 84,
1936
- 84
1937
- ],
1938
- "accounts": [
1939
- {
1940
- "name": "glamState",
1941
- "writable": true
1942
- },
1943
- {
1944
- "name": "glamVault",
1945
- "writable": true,
1946
- "pda": {
1947
- "seeds": [
1948
- {
1949
- "kind": "const",
1950
- "value": [
1951
- 118,
1952
- 97,
1953
- 117,
1954
- 108,
1955
- 116
1956
- ]
1957
- },
1958
- {
1959
- "kind": "account",
1960
- "path": "glamState"
1961
- }
1962
- ],
1963
- "program": {
1964
- "kind": "account",
1965
- "path": "glamProtocolProgram"
1966
- }
1967
- }
1968
- },
1969
- {
1970
- "name": "glamSigner",
1971
- "writable": true,
1972
- "signer": true
1973
- },
1974
- {
1975
- "name": "integrationAuthority",
1976
- "pda": {
1977
- "seeds": [
1978
- {
1979
- "kind": "const",
1980
- "value": [
1981
- 105,
1982
- 110,
1983
- 116,
1984
- 101,
1985
- 103,
1986
- 114,
1987
- 97,
1988
- 116,
1989
- 105,
1990
- 111,
1991
- 110,
1992
- 45,
1993
- 97,
1994
- 117,
1995
- 116,
1996
- 104,
1997
- 111,
1998
- 114,
1999
- 105,
2000
- 116,
2001
- 121
2002
- ]
2003
- }
2004
- ]
2005
- }
2006
- },
2007
- {
2008
- "name": "cpiProgram",
2009
- "address": "vAuLTsyrvSfZRuRB3XgvkPwNGgYSs9YRYymVebLKoxR"
2010
- },
2011
- {
2012
- "name": "glamProtocolProgram",
2013
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2014
- },
2015
- {
2016
- "name": "systemProgram",
2017
- "address": "11111111111111111111111111111111"
2018
- },
2019
- {
2020
- "name": "vault",
2021
- "writable": true
2022
- },
2023
- {
2024
- "name": "vaultDepositor",
2025
- "writable": true
2026
- },
2027
- {
2028
- "name": "vaultTokenAccount",
2029
- "writable": true
2030
- },
2031
- {
2032
- "name": "driftUserStats",
2033
- "writable": true
2034
- },
2035
- {
2036
- "name": "driftUser",
2037
- "writable": true
2038
- },
2039
- {
2040
- "name": "driftState"
2041
- },
2042
- {
2043
- "name": "driftSpotMarketVault",
2044
- "writable": true
2045
- },
2046
- {
2047
- "name": "userTokenAccount",
2048
- "writable": true
2049
- },
2050
- {
2051
- "name": "driftProgram"
2052
- },
2053
- {
2054
- "name": "tokenProgram"
2055
- }
2056
- ],
2057
- "args": [
2058
- {
2059
- "name": "amount",
2060
- "type": "u64"
2061
- }
2062
- ]
2063
- },
2064
- {
2065
- "name": "vaultsInitializeVaultDepositor",
2066
- "discriminator": [
2067
- 135,
2068
- 5,
2069
- 41,
2070
- 254,
2071
- 229,
2072
- 75,
2073
- 138,
2074
- 49
2075
- ],
2076
- "accounts": [
2077
- {
2078
- "name": "glamState",
2079
- "writable": true
2080
- },
2081
- {
2082
- "name": "glamVault",
2083
- "writable": true,
2084
- "pda": {
2085
- "seeds": [
2086
- {
2087
- "kind": "const",
2088
- "value": [
2089
- 118,
2090
- 97,
2091
- 117,
2092
- 108,
2093
- 116
2094
- ]
2095
- },
2096
- {
2097
- "kind": "account",
2098
- "path": "glamState"
2099
- }
2100
- ],
2101
- "program": {
2102
- "kind": "account",
2103
- "path": "glamProtocolProgram"
2104
- }
2105
- }
2106
- },
2107
- {
2108
- "name": "glamSigner",
2109
- "writable": true,
2110
- "signer": true
2111
- },
2112
- {
2113
- "name": "integrationAuthority",
2114
- "pda": {
2115
- "seeds": [
2116
- {
2117
- "kind": "const",
2118
- "value": [
2119
- 105,
2120
- 110,
2121
- 116,
2122
- 101,
2123
- 103,
2124
- 114,
2125
- 97,
2126
- 116,
2127
- 105,
2128
- 111,
2129
- 110,
2130
- 45,
2131
- 97,
2132
- 117,
2133
- 116,
2134
- 104,
2135
- 111,
2136
- 114,
2137
- 105,
2138
- 116,
2139
- 121
2140
- ]
2141
- }
2142
- ]
2143
- }
2144
- },
2145
- {
2146
- "name": "cpiProgram",
2147
- "address": "vAuLTsyrvSfZRuRB3XgvkPwNGgYSs9YRYymVebLKoxR"
2148
- },
2149
- {
2150
- "name": "glamProtocolProgram",
2151
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2152
- },
2153
- {
2154
- "name": "vault"
2155
- },
2156
- {
2157
- "name": "vaultDepositor",
2158
- "writable": true
2159
- },
2160
- {
2161
- "name": "rent",
2162
- "address": "SysvarRent111111111111111111111111111111111"
2163
- },
2164
- {
2165
- "name": "systemProgram",
2166
- "address": "11111111111111111111111111111111"
2167
- }
2168
- ],
2169
- "args": []
2170
- },
2171
- {
2172
- "name": "vaultsRequestWithdraw",
2173
- "discriminator": [
2174
- 138,
2175
- 91,
2176
- 50,
2177
- 130,
2178
- 167,
2179
- 165,
2180
- 120,
2181
- 175
2182
- ],
2183
- "accounts": [
2184
- {
2185
- "name": "glamState",
2186
- "writable": true
2187
- },
2188
- {
2189
- "name": "glamVault",
2190
- "writable": true,
2191
- "pda": {
2192
- "seeds": [
2193
- {
2194
- "kind": "const",
2195
- "value": [
2196
- 118,
2197
- 97,
2198
- 117,
2199
- 108,
2200
- 116
2201
- ]
2202
- },
2203
- {
2204
- "kind": "account",
2205
- "path": "glamState"
2206
- }
2207
- ],
2208
- "program": {
2209
- "kind": "account",
2210
- "path": "glamProtocolProgram"
2211
- }
2212
- }
2213
- },
2214
- {
2215
- "name": "glamSigner",
2216
- "writable": true,
2217
- "signer": true
2218
- },
2219
- {
2220
- "name": "integrationAuthority",
2221
- "pda": {
2222
- "seeds": [
2223
- {
2224
- "kind": "const",
2225
- "value": [
2226
- 105,
2227
- 110,
2228
- 116,
2229
- 101,
2230
- 103,
2231
- 114,
2232
- 97,
2233
- 116,
2234
- 105,
2235
- 111,
2236
- 110,
2237
- 45,
2238
- 97,
2239
- 117,
2240
- 116,
2241
- 104,
2242
- 111,
2243
- 114,
2244
- 105,
2245
- 116,
2246
- 121
2247
- ]
2248
- }
2249
- ]
2250
- }
2251
- },
2252
- {
2253
- "name": "cpiProgram",
2254
- "address": "vAuLTsyrvSfZRuRB3XgvkPwNGgYSs9YRYymVebLKoxR"
2255
- },
2256
- {
2257
- "name": "glamProtocolProgram",
2258
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2259
- },
2260
- {
2261
- "name": "systemProgram",
2262
- "address": "11111111111111111111111111111111"
2263
- },
2264
- {
2265
- "name": "vault",
2266
- "writable": true
2267
- },
2268
- {
2269
- "name": "vaultDepositor",
2270
- "writable": true
2271
- },
2272
- {
2273
- "name": "driftUserStats"
2274
- },
2275
- {
2276
- "name": "driftUser"
2277
- }
2278
- ],
2279
- "args": [
2280
- {
2281
- "name": "withdrawAmount",
2282
- "type": "u64"
2283
- },
2284
- {
2285
- "name": "withdrawUnit",
2286
- "type": {
2287
- "defined": {
2288
- "name": "withdrawUnit"
2289
- }
2290
- }
2291
- }
2292
- ]
2293
- },
2294
- {
2295
- "name": "vaultsWithdraw",
2296
- "discriminator": [
2297
- 12,
2298
- 8,
2299
- 236,
2300
- 92,
2301
- 134,
2302
- 144,
2303
- 196,
2304
- 87
2305
- ],
2306
- "accounts": [
2307
- {
2308
- "name": "glamState",
2309
- "writable": true
2310
- },
2311
- {
2312
- "name": "glamVault",
2313
- "writable": true,
2314
- "pda": {
2315
- "seeds": [
2316
- {
2317
- "kind": "const",
2318
- "value": [
2319
- 118,
2320
- 97,
2321
- 117,
2322
- 108,
2323
- 116
2324
- ]
2325
- },
2326
- {
2327
- "kind": "account",
2328
- "path": "glamState"
2329
- }
2330
- ],
2331
- "program": {
2332
- "kind": "account",
2333
- "path": "glamProtocolProgram"
2334
- }
2335
- }
2336
- },
2337
- {
2338
- "name": "glamSigner",
2339
- "writable": true,
2340
- "signer": true
2341
- },
2342
- {
2343
- "name": "integrationAuthority",
2344
- "pda": {
2345
- "seeds": [
2346
- {
2347
- "kind": "const",
2348
- "value": [
2349
- 105,
2350
- 110,
2351
- 116,
2352
- 101,
2353
- 103,
2354
- 114,
2355
- 97,
2356
- 116,
2357
- 105,
2358
- 111,
2359
- 110,
2360
- 45,
2361
- 97,
2362
- 117,
2363
- 116,
2364
- 104,
2365
- 111,
2366
- 114,
2367
- 105,
2368
- 116,
2369
- 121
2370
- ]
2371
- }
2372
- ]
2373
- }
2374
- },
2375
- {
2376
- "name": "cpiProgram",
2377
- "address": "vAuLTsyrvSfZRuRB3XgvkPwNGgYSs9YRYymVebLKoxR"
2378
- },
2379
- {
2380
- "name": "glamProtocolProgram",
2381
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2382
- },
2383
- {
2384
- "name": "systemProgram",
2385
- "address": "11111111111111111111111111111111"
2386
- },
2387
- {
2388
- "name": "vault",
2389
- "writable": true
2390
- },
2391
- {
2392
- "name": "vaultDepositor",
2393
- "writable": true
2394
- },
2395
- {
2396
- "name": "vaultTokenAccount",
2397
- "writable": true
2398
- },
2399
- {
2400
- "name": "driftUserStats",
2401
- "writable": true
2402
- },
2403
- {
2404
- "name": "driftUser",
2405
- "writable": true
2406
- },
2407
- {
2408
- "name": "driftState"
2409
- },
2410
- {
2411
- "name": "driftSpotMarketVault",
2412
- "writable": true
2413
- },
2414
- {
2415
- "name": "driftSigner"
2416
- },
2417
- {
2418
- "name": "userTokenAccount",
2419
- "writable": true
2420
- },
2421
- {
2422
- "name": "driftProgram"
2423
- },
2424
- {
2425
- "name": "tokenProgram"
2426
- }
2427
- ],
2428
- "args": []
2429
- },
2430
- {
2431
- "name": "withdraw",
2432
- "discriminator": [
2433
- 183,
2434
- 18,
2435
- 70,
2436
- 156,
2437
- 148,
2438
- 109,
2439
- 161,
2440
- 34
2441
- ],
2442
- "accounts": [
2443
- {
2444
- "name": "glamState",
2445
- "writable": true
2446
- },
2447
- {
2448
- "name": "glamVault",
2449
- "writable": true,
2450
- "pda": {
2451
- "seeds": [
2452
- {
2453
- "kind": "const",
2454
- "value": [
2455
- 118,
2456
- 97,
2457
- 117,
2458
- 108,
2459
- 116
2460
- ]
2461
- },
2462
- {
2463
- "kind": "account",
2464
- "path": "glamState"
2465
- }
2466
- ],
2467
- "program": {
2468
- "kind": "account",
2469
- "path": "glamProtocolProgram"
2470
- }
2471
- }
2472
- },
2473
- {
2474
- "name": "glamSigner",
2475
- "writable": true,
2476
- "signer": true
2477
- },
2478
- {
2479
- "name": "integrationAuthority",
2480
- "pda": {
2481
- "seeds": [
2482
- {
2483
- "kind": "const",
2484
- "value": [
2485
- 105,
2486
- 110,
2487
- 116,
2488
- 101,
2489
- 103,
2490
- 114,
2491
- 97,
2492
- 116,
2493
- 105,
2494
- 111,
2495
- 110,
2496
- 45,
2497
- 97,
2498
- 117,
2499
- 116,
2500
- 104,
2501
- 111,
2502
- 114,
2503
- 105,
2504
- 116,
2505
- 121
2506
- ]
2507
- }
2508
- ]
2509
- }
2510
- },
2511
- {
2512
- "name": "cpiProgram",
2513
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
2514
- },
2515
- {
2516
- "name": "glamProtocolProgram",
2517
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2518
- },
2519
- {
2520
- "name": "systemProgram",
2521
- "address": "11111111111111111111111111111111"
2522
- },
2523
- {
2524
- "name": "state"
2525
- },
2526
- {
2527
- "name": "user",
2528
- "writable": true
2529
- },
2530
- {
2531
- "name": "userStats",
2532
- "writable": true
2533
- },
2534
- {
2535
- "name": "spotMarketVault",
2536
- "writable": true
2537
- },
2538
- {
2539
- "name": "driftSigner"
2540
- },
2541
- {
2542
- "name": "userTokenAccount",
2543
- "writable": true
2544
- },
2545
- {
2546
- "name": "tokenProgram"
2547
- }
2548
- ],
2549
- "args": [
2550
- {
2551
- "name": "marketIndex",
2552
- "type": "u16"
2553
- },
2554
- {
2555
- "name": "amount",
2556
- "type": "u64"
2557
- },
2558
- {
2559
- "name": "reduceOnly",
2560
- "type": "bool"
2561
- }
2562
- ]
2563
- }
2564
- ],
2565
- "accounts": [
2566
- {
2567
- "name": "stateAccount",
2568
- "discriminator": [
2569
- 142,
2570
- 247,
2571
- 54,
2572
- 95,
2573
- 85,
2574
- 133,
2575
- 249,
2576
- 103
2577
- ]
2578
- }
2579
- ],
2580
- "types": [
2581
- {
2582
- "name": "accountType",
2583
- "type": {
2584
- "kind": "enum",
2585
- "variants": [
2586
- {
2587
- "name": "vault"
2588
- },
2589
- {
2590
- "name": "tokenizedVault"
2591
- },
2592
- {
2593
- "name": "mint"
2594
- },
2595
- {
2596
- "name": "singleAssetVault"
2597
- }
2598
- ]
2599
- }
2600
- },
2601
- {
2602
- "name": "accruedFees",
2603
- "type": {
2604
- "kind": "struct",
2605
- "fields": [
2606
- {
2607
- "name": "vaultSubscriptionFee",
2608
- "type": "u128"
2609
- },
2610
- {
2611
- "name": "vaultRedemptionFee",
2612
- "type": "u128"
2613
- },
2614
- {
2615
- "name": "managerSubscriptionFee",
2616
- "type": "u128"
2617
- },
2618
- {
2619
- "name": "managerRedemptionFee",
2620
- "type": "u128"
2621
- },
2622
- {
2623
- "name": "managementFee",
2624
- "type": "u128"
2625
- },
2626
- {
2627
- "name": "performanceFee",
2628
- "type": "u128"
2629
- },
2630
- {
2631
- "name": "protocolBaseFee",
2632
- "type": "u128"
2633
- },
2634
- {
2635
- "name": "protocolFlowFee",
2636
- "type": "u128"
2637
- }
2638
- ]
2639
- }
2640
- },
2641
- {
2642
- "name": "createdModel",
2643
- "type": {
2644
- "kind": "struct",
2645
- "fields": [
2646
- {
2647
- "name": "key",
2648
- "type": {
2649
- "array": [
2650
- "u8",
2651
- 8
2652
- ]
2653
- }
2654
- },
2655
- {
2656
- "name": "createdBy",
2657
- "type": "pubkey"
2658
- },
2659
- {
2660
- "name": "createdAt",
2661
- "type": "i64"
2662
- }
2663
- ]
2664
- }
2665
- },
2666
- {
2667
- "name": "delegateAcl",
2668
- "type": {
2669
- "kind": "struct",
2670
- "fields": [
2671
- {
2672
- "name": "pubkey",
2673
- "type": "pubkey"
2674
- },
2675
- {
2676
- "name": "integrationPermissions",
2677
- "type": {
2678
- "vec": {
2679
- "defined": {
2680
- "name": "integrationPermissions"
2681
- }
2682
- }
2683
- }
2684
- },
2685
- {
2686
- "name": "expiresAt",
2687
- "type": "i64"
2688
- }
2689
- ]
2690
- }
2691
- },
2692
- {
2693
- "name": "driftProtocolPolicy",
2694
- "type": {
2695
- "kind": "struct",
2696
- "fields": [
2697
- {
2698
- "name": "spotMarketsAllowlist",
2699
- "type": {
2700
- "vec": "u16"
2701
- }
2702
- },
2703
- {
2704
- "name": "perpMarketsAllowlist",
2705
- "type": {
2706
- "vec": "u16"
2707
- }
2708
- },
2709
- {
2710
- "name": "borrowAllowlist",
2711
- "type": {
2712
- "vec": "pubkey"
2713
- }
2714
- },
2715
- {
2716
- "name": "orderPriceToleranceBps",
2717
- "type": "u16"
2718
- }
2719
- ]
2720
- }
2721
- },
2722
- {
2723
- "name": "driftVaultsPolicy",
2724
- "type": {
2725
- "kind": "struct",
2726
- "fields": [
2727
- {
2728
- "name": "vaultsAllowlist",
2729
- "type": {
2730
- "vec": "pubkey"
2731
- }
2732
- }
2733
- ]
2734
- }
2735
- },
2736
- {
2737
- "name": "engineField",
2738
- "type": {
2739
- "kind": "struct",
2740
- "fields": [
2741
- {
2742
- "name": "name",
2743
- "type": {
2744
- "defined": {
2745
- "name": "engineFieldName"
2746
- }
2747
- }
2748
- },
2749
- {
2750
- "name": "value",
2751
- "type": {
2752
- "defined": {
2753
- "name": "engineFieldValue"
2754
- }
2755
- }
2756
- }
2757
- ]
2758
- }
2759
- },
2760
- {
2761
- "name": "engineFieldName",
2762
- "type": {
2763
- "kind": "enum",
2764
- "variants": [
2765
- {
2766
- "name": "owner"
2767
- },
2768
- {
2769
- "name": "portfolioManagerName"
2770
- },
2771
- {
2772
- "name": "name"
2773
- },
2774
- {
2775
- "name": "uri"
2776
- },
2777
- {
2778
- "name": "assets"
2779
- },
2780
- {
2781
- "name": "delegateAcls"
2782
- },
2783
- {
2784
- "name": "integrationAcls"
2785
- },
2786
- {
2787
- "name": "timelockDuration"
2788
- },
2789
- {
2790
- "name": "borrowable"
2791
- },
2792
- {
2793
- "name": "defaultAccountStateFrozen"
2794
- },
2795
- {
2796
- "name": "permanentDelegate"
2797
- },
2798
- {
2799
- "name": "notifyAndSettle"
2800
- },
2801
- {
2802
- "name": "feeStructure"
2803
- },
2804
- {
2805
- "name": "feeParams"
2806
- },
2807
- {
2808
- "name": "claimableFees"
2809
- },
2810
- {
2811
- "name": "claimedFees"
2812
- },
2813
- {
2814
- "name": "oracleConfigs"
2815
- }
2816
- ]
2817
- }
2818
- },
2819
- {
2820
- "name": "engineFieldValue",
2821
- "type": {
2822
- "kind": "enum",
2823
- "variants": [
2824
- {
2825
- "name": "boolean",
2826
- "fields": [
2827
- {
2828
- "name": "val",
2829
- "type": "bool"
2830
- }
2831
- ]
2832
- },
2833
- {
2834
- "name": "u8",
2835
- "fields": [
2836
- {
2837
- "name": "val",
2838
- "type": "u8"
2839
- }
2840
- ]
2841
- },
2842
- {
2843
- "name": "u32",
2844
- "fields": [
2845
- {
2846
- "name": "val",
2847
- "type": "u32"
2848
- }
2849
- ]
2850
- },
2851
- {
2852
- "name": "u64",
2853
- "fields": [
2854
- {
2855
- "name": "val",
2856
- "type": "u64"
2857
- }
2858
- ]
2859
- },
2860
- {
2861
- "name": "string",
2862
- "fields": [
2863
- {
2864
- "name": "val",
2865
- "type": "string"
2866
- }
2867
- ]
2868
- },
2869
- {
2870
- "name": "pubkey",
2871
- "fields": [
2872
- {
2873
- "name": "val",
2874
- "type": "pubkey"
2875
- }
2876
- ]
2877
- },
2878
- {
2879
- "name": "vecPubkey",
2880
- "fields": [
2881
- {
2882
- "name": "val",
2883
- "type": {
2884
- "vec": "pubkey"
2885
- }
2886
- }
2887
- ]
2888
- },
2889
- {
2890
- "name": "vecU8",
2891
- "fields": [
2892
- {
2893
- "name": "val",
2894
- "type": "bytes"
2895
- }
2896
- ]
2897
- },
2898
- {
2899
- "name": "vecU32",
2900
- "fields": [
2901
- {
2902
- "name": "val",
2903
- "type": {
2904
- "vec": "u32"
2905
- }
2906
- }
2907
- ]
2908
- },
2909
- {
2910
- "name": "vecDelegateAcl",
2911
- "fields": [
2912
- {
2913
- "name": "val",
2914
- "type": {
2915
- "vec": {
2916
- "defined": {
2917
- "name": "delegateAcl"
2918
- }
2919
- }
2920
- }
2921
- }
2922
- ]
2923
- },
2924
- {
2925
- "name": "vecIntegrationAcl",
2926
- "fields": [
2927
- {
2928
- "name": "val",
2929
- "type": {
2930
- "vec": {
2931
- "defined": {
2932
- "name": "integrationAcl"
2933
- }
2934
- }
2935
- }
2936
- }
2937
- ]
2938
- },
2939
- {
2940
- "name": "feeStructure",
2941
- "fields": [
2942
- {
2943
- "name": "val",
2944
- "type": {
2945
- "defined": {
2946
- "name": "feeStructure"
2947
- }
2948
- }
2949
- }
2950
- ]
2951
- },
2952
- {
2953
- "name": "feeParams",
2954
- "fields": [
2955
- {
2956
- "name": "val",
2957
- "type": {
2958
- "defined": {
2959
- "name": "feeParams"
2960
- }
2961
- }
2962
- }
2963
- ]
2964
- },
2965
- {
2966
- "name": "accruedFees",
2967
- "fields": [
2968
- {
2969
- "name": "val",
2970
- "type": {
2971
- "defined": {
2972
- "name": "accruedFees"
2973
- }
2974
- }
2975
- }
2976
- ]
2977
- },
2978
- {
2979
- "name": "notifyAndSettle",
2980
- "fields": [
2981
- {
2982
- "name": "val",
2983
- "type": {
2984
- "defined": {
2985
- "name": "notifyAndSettle"
2986
- }
2987
- }
2988
- }
2989
- ]
2990
- },
2991
- {
2992
- "name": "oracleConfigs",
2993
- "fields": [
2994
- {
2995
- "name": "val",
2996
- "type": {
2997
- "defined": {
2998
- "name": "oracleConfigs"
2999
- }
3000
- }
3001
- }
3002
- ]
3003
- }
3004
- ]
3005
- }
3006
- },
3007
- {
3008
- "name": "entryExitFees",
3009
- "type": {
3010
- "kind": "struct",
3011
- "fields": [
3012
- {
3013
- "name": "subscriptionFeeBps",
3014
- "type": "u16"
3015
- },
3016
- {
3017
- "name": "redemptionFeeBps",
3018
- "type": "u16"
3019
- }
3020
- ]
3021
- }
3022
- },
3023
- {
3024
- "name": "feeParams",
3025
- "type": {
3026
- "kind": "struct",
3027
- "fields": [
3028
- {
3029
- "name": "yearInSeconds",
3030
- "type": "u32"
3031
- },
3032
- {
3033
- "name": "paHighWaterMark",
3034
- "type": "i128"
3035
- },
3036
- {
3037
- "name": "paLastNav",
3038
- "type": "i128"
3039
- },
3040
- {
3041
- "name": "lastAum",
3042
- "type": "i128"
3043
- },
3044
- {
3045
- "name": "lastPerformanceFeeCrystallized",
3046
- "type": "i64"
3047
- },
3048
- {
3049
- "name": "lastManagementFeeCrystallized",
3050
- "type": "i64"
3051
- },
3052
- {
3053
- "name": "lastProtocolFeeCrystallized",
3054
- "type": "i64"
3055
- }
3056
- ]
3057
- }
3058
- },
3059
- {
3060
- "name": "feeStructure",
3061
- "type": {
3062
- "kind": "struct",
3063
- "fields": [
3064
- {
3065
- "name": "vault",
3066
- "type": {
3067
- "defined": {
3068
- "name": "entryExitFees"
3069
- }
3070
- }
3071
- },
3072
- {
3073
- "name": "manager",
3074
- "type": {
3075
- "defined": {
3076
- "name": "entryExitFees"
3077
- }
3078
- }
3079
- },
3080
- {
3081
- "name": "management",
3082
- "type": {
3083
- "defined": {
3084
- "name": "managementFee"
3085
- }
3086
- }
3087
- },
3088
- {
3089
- "name": "performance",
3090
- "type": {
3091
- "defined": {
3092
- "name": "performanceFee"
3093
- }
3094
- }
3095
- },
3096
- {
3097
- "name": "protocol",
3098
- "type": {
3099
- "defined": {
3100
- "name": "protocolFees"
3101
- }
3102
- }
3103
- }
3104
- ]
3105
- }
3106
- },
3107
- {
3108
- "name": "hurdleType",
3109
- "type": {
3110
- "kind": "enum",
3111
- "variants": [
3112
- {
3113
- "name": "hard"
3114
- },
3115
- {
3116
- "name": "soft"
3117
- }
3118
- ]
3119
- }
3120
- },
3121
- {
3122
- "name": "integrationAcl",
3123
- "docs": [
3124
- "An integration program can have multiple protocols supported.",
3125
- "Enabled protocols are stored in a bitmask, and each protocol can have its own policy."
3126
- ],
3127
- "type": {
3128
- "kind": "struct",
3129
- "fields": [
3130
- {
3131
- "name": "integrationProgram",
3132
- "type": "pubkey"
3133
- },
3134
- {
3135
- "name": "protocolsBitmask",
3136
- "type": "u16"
3137
- },
3138
- {
3139
- "name": "protocolPolicies",
3140
- "type": {
3141
- "vec": {
3142
- "defined": {
3143
- "name": "protocolPolicy"
3144
- }
3145
- }
3146
- }
3147
- }
3148
- ]
3149
- }
3150
- },
3151
- {
3152
- "name": "integrationPermissions",
3153
- "docs": [
3154
- "Stores delegate permissions for an integration program."
3155
- ],
3156
- "type": {
3157
- "kind": "struct",
3158
- "fields": [
3159
- {
3160
- "name": "integrationProgram",
3161
- "type": "pubkey"
3162
- },
3163
- {
3164
- "name": "protocolPermissions",
3165
- "type": {
3166
- "vec": {
3167
- "defined": {
3168
- "name": "protocolPermissions"
3169
- }
3170
- }
3171
- }
3172
- }
3173
- ]
3174
- }
3175
- },
3176
- {
3177
- "name": "managementFee",
3178
- "type": {
3179
- "kind": "struct",
3180
- "fields": [
3181
- {
3182
- "name": "feeBps",
3183
- "type": "u16"
3184
- }
3185
- ]
3186
- }
3187
- },
3188
- {
3189
- "name": "marketType",
3190
- "type": {
3191
- "kind": "enum",
3192
- "variants": [
3193
- {
3194
- "name": "spot"
3195
- },
3196
- {
3197
- "name": "perp"
3198
- }
3199
- ]
3200
- }
3201
- },
3202
- {
3203
- "name": "modifyOrderParams",
3204
- "type": {
3205
- "kind": "struct",
3206
- "fields": [
3207
- {
3208
- "name": "direction",
3209
- "type": {
3210
- "option": {
3211
- "defined": {
3212
- "name": "positionDirection"
3213
- }
3214
- }
3215
- }
3216
- },
3217
- {
3218
- "name": "baseAssetAmount",
3219
- "type": {
3220
- "option": "u64"
3221
- }
3222
- },
3223
- {
3224
- "name": "price",
3225
- "type": {
3226
- "option": "u64"
3227
- }
3228
- },
3229
- {
3230
- "name": "reduceOnly",
3231
- "type": {
3232
- "option": "bool"
3233
- }
3234
- },
3235
- {
3236
- "name": "postOnly",
3237
- "type": {
3238
- "option": {
3239
- "defined": {
3240
- "name": "postOnlyParam"
3241
- }
3242
- }
3243
- }
3244
- },
3245
- {
3246
- "name": "bitFlags",
3247
- "type": {
3248
- "option": "u8"
3249
- }
3250
- },
3251
- {
3252
- "name": "maxTs",
3253
- "type": {
3254
- "option": "i64"
3255
- }
3256
- },
3257
- {
3258
- "name": "triggerPrice",
3259
- "type": {
3260
- "option": "u64"
3261
- }
3262
- },
3263
- {
3264
- "name": "triggerCondition",
3265
- "type": {
3266
- "option": {
3267
- "defined": {
3268
- "name": "orderTriggerCondition"
3269
- }
3270
- }
3271
- }
3272
- },
3273
- {
3274
- "name": "oraclePriceOffset",
3275
- "type": {
3276
- "option": "i32"
3277
- }
3278
- },
3279
- {
3280
- "name": "auctionDuration",
3281
- "type": {
3282
- "option": "u8"
3283
- }
3284
- },
3285
- {
3286
- "name": "auctionStartPrice",
3287
- "type": {
3288
- "option": "i64"
3289
- }
3290
- },
3291
- {
3292
- "name": "auctionEndPrice",
3293
- "type": {
3294
- "option": "i64"
3295
- }
3296
- },
3297
- {
3298
- "name": "policy",
3299
- "type": {
3300
- "option": "u8"
3301
- }
3302
- }
3303
- ]
3304
- }
3305
- },
3306
- {
3307
- "name": "noticePeriodType",
3308
- "type": {
3309
- "kind": "enum",
3310
- "variants": [
3311
- {
3312
- "name": "hard"
3313
- },
3314
- {
3315
- "name": "soft"
3316
- }
3317
- ]
3318
- }
3319
- },
3320
- {
3321
- "name": "notifyAndSettle",
3322
- "type": {
3323
- "kind": "struct",
3324
- "fields": [
3325
- {
3326
- "name": "model",
3327
- "type": {
3328
- "defined": {
3329
- "name": "valuationModel"
3330
- }
3331
- }
3332
- },
3333
- {
3334
- "name": "permissionlessFulfillment",
3335
- "type": "bool"
3336
- },
3337
- {
3338
- "name": "subscribeNoticePeriodType",
3339
- "type": {
3340
- "defined": {
3341
- "name": "noticePeriodType"
3342
- }
3343
- }
3344
- },
3345
- {
3346
- "name": "subscribeNoticePeriod",
3347
- "type": "u64"
3348
- },
3349
- {
3350
- "name": "subscribeSettlementPeriod",
3351
- "type": "u64"
3352
- },
3353
- {
3354
- "name": "subscribeCancellationWindow",
3355
- "type": "u64"
3356
- },
3357
- {
3358
- "name": "redeemNoticePeriodType",
3359
- "type": {
3360
- "defined": {
3361
- "name": "noticePeriodType"
3362
- }
3363
- }
3364
- },
3365
- {
3366
- "name": "redeemNoticePeriod",
3367
- "type": "u64"
3368
- },
3369
- {
3370
- "name": "redeemSettlementPeriod",
3371
- "type": "u64"
3372
- },
3373
- {
3374
- "name": "redeemCancellationWindow",
3375
- "type": "u64"
3376
- },
3377
- {
3378
- "name": "timeUnit",
3379
- "type": {
3380
- "defined": {
3381
- "name": "timeUnit"
3382
- }
3383
- }
3384
- },
3385
- {
3386
- "name": "padding",
3387
- "type": {
3388
- "array": [
3389
- "u8",
3390
- 3
3391
- ]
3392
- }
3393
- }
3394
- ]
3395
- }
3396
- },
3397
- {
3398
- "name": "oracleConfigs",
3399
- "docs": [
3400
- "Vault-specific oracle configs. If available, these configs are preferred over the global config."
3401
- ],
3402
- "type": {
3403
- "kind": "struct",
3404
- "fields": [
3405
- {
3406
- "name": "maxAgesSeconds",
3407
- "type": {
3408
- "vec": {
3409
- "array": [
3410
- "u16",
3411
- 2
3412
- ]
3413
- }
3414
- }
3415
- },
3416
- {
3417
- "name": "padding",
3418
- "type": {
3419
- "array": [
3420
- "u8",
3421
- 12
3422
- ]
3423
- }
3424
- }
3425
- ]
3426
- }
3427
- },
3428
- {
3429
- "name": "orderParams",
3430
- "type": {
3431
- "kind": "struct",
3432
- "fields": [
3433
- {
3434
- "name": "orderType",
3435
- "type": {
3436
- "defined": {
3437
- "name": "orderType"
3438
- }
3439
- }
3440
- },
3441
- {
3442
- "name": "marketType",
3443
- "type": {
3444
- "defined": {
3445
- "name": "marketType"
3446
- }
3447
- }
3448
- },
3449
- {
3450
- "name": "direction",
3451
- "type": {
3452
- "defined": {
3453
- "name": "positionDirection"
3454
- }
3455
- }
3456
- },
3457
- {
3458
- "name": "userOrderId",
3459
- "type": "u8"
3460
- },
3461
- {
3462
- "name": "baseAssetAmount",
3463
- "type": "u64"
3464
- },
3465
- {
3466
- "name": "price",
3467
- "type": "u64"
3468
- },
3469
- {
3470
- "name": "marketIndex",
3471
- "type": "u16"
3472
- },
3473
- {
3474
- "name": "reduceOnly",
3475
- "type": "bool"
3476
- },
3477
- {
3478
- "name": "postOnly",
3479
- "type": {
3480
- "defined": {
3481
- "name": "postOnlyParam"
3482
- }
3483
- }
3484
- },
3485
- {
3486
- "name": "bitFlags",
3487
- "type": "u8"
3488
- },
3489
- {
3490
- "name": "maxTs",
3491
- "type": {
3492
- "option": "i64"
3493
- }
3494
- },
3495
- {
3496
- "name": "triggerPrice",
3497
- "type": {
3498
- "option": "u64"
3499
- }
3500
- },
3501
- {
3502
- "name": "triggerCondition",
3503
- "type": {
3504
- "defined": {
3505
- "name": "orderTriggerCondition"
3506
- }
3507
- }
3508
- },
3509
- {
3510
- "name": "oraclePriceOffset",
3511
- "type": {
3512
- "option": "i32"
3513
- }
3514
- },
3515
- {
3516
- "name": "auctionDuration",
3517
- "type": {
3518
- "option": "u8"
3519
- }
3520
- },
3521
- {
3522
- "name": "auctionStartPrice",
3523
- "type": {
3524
- "option": "i64"
3525
- }
3526
- },
3527
- {
3528
- "name": "auctionEndPrice",
3529
- "type": {
3530
- "option": "i64"
3531
- }
3532
- }
3533
- ]
3534
- }
3535
- },
3536
- {
3537
- "name": "orderTriggerCondition",
3538
- "type": {
3539
- "kind": "enum",
3540
- "variants": [
3541
- {
3542
- "name": "above"
3543
- },
3544
- {
3545
- "name": "below"
3546
- },
3547
- {
3548
- "name": "triggeredAbove"
3549
- },
3550
- {
3551
- "name": "triggeredBelow"
3552
- }
3553
- ]
3554
- }
3555
- },
3556
- {
3557
- "name": "orderType",
3558
- "type": {
3559
- "kind": "enum",
3560
- "variants": [
3561
- {
3562
- "name": "market"
3563
- },
3564
- {
3565
- "name": "limit"
3566
- },
3567
- {
3568
- "name": "triggerMarket"
3569
- },
3570
- {
3571
- "name": "triggerLimit"
3572
- },
3573
- {
3574
- "name": "oracle"
3575
- }
3576
- ]
3577
- }
3578
- },
3579
- {
3580
- "name": "performanceFee",
3581
- "type": {
3582
- "kind": "struct",
3583
- "fields": [
3584
- {
3585
- "name": "feeBps",
3586
- "type": "u16"
3587
- },
3588
- {
3589
- "name": "hurdleRateBps",
3590
- "type": "u16"
3591
- },
3592
- {
3593
- "name": "hurdleType",
3594
- "type": {
3595
- "defined": {
3596
- "name": "hurdleType"
3597
- }
3598
- }
3599
- }
3600
- ]
3601
- }
3602
- },
3603
- {
3604
- "name": "positionDirection",
3605
- "type": {
3606
- "kind": "enum",
3607
- "variants": [
3608
- {
3609
- "name": "long"
3610
- },
3611
- {
3612
- "name": "short"
3613
- }
3614
- ]
3615
- }
3616
- },
3617
- {
3618
- "name": "postOnlyParam",
3619
- "type": {
3620
- "kind": "enum",
3621
- "variants": [
3622
- {
3623
- "name": "none"
3624
- },
3625
- {
3626
- "name": "mustPostOnly"
3627
- },
3628
- {
3629
- "name": "tryPostOnly"
3630
- },
3631
- {
3632
- "name": "slide"
3633
- }
3634
- ]
3635
- }
3636
- },
3637
- {
3638
- "name": "pricedProtocol",
3639
- "type": {
3640
- "kind": "struct",
3641
- "fields": [
3642
- {
3643
- "name": "rent",
3644
- "type": "u64"
3645
- },
3646
- {
3647
- "name": "amount",
3648
- "type": "i128"
3649
- },
3650
- {
3651
- "name": "decimals",
3652
- "type": "u8"
3653
- },
3654
- {
3655
- "name": "lastUpdatedSlot",
3656
- "type": "u64"
3657
- },
3658
- {
3659
- "name": "integrationProgram",
3660
- "type": "pubkey"
3661
- },
3662
- {
3663
- "name": "protocolBitflag",
3664
- "type": "u16"
3665
- },
3666
- {
3667
- "name": "positions",
3668
- "type": {
3669
- "vec": "pubkey"
3670
- }
3671
- }
3672
- ]
3673
- }
3674
- },
3675
- {
3676
- "name": "protocolFees",
3677
- "type": {
3678
- "kind": "struct",
3679
- "fields": [
3680
- {
3681
- "name": "baseFeeBps",
3682
- "type": "u16"
3683
- },
3684
- {
3685
- "name": "flowFeeBps",
3686
- "type": "u16"
3687
- }
3688
- ]
3689
- }
3690
- },
3691
- {
3692
- "name": "protocolPermissions",
3693
- "docs": [
3694
- "Represents a delegate's permissions for a specific protocol"
3695
- ],
3696
- "type": {
3697
- "kind": "struct",
3698
- "fields": [
3699
- {
3700
- "name": "protocolBitflag",
3701
- "type": "u16"
3702
- },
3703
- {
3704
- "name": "permissionsBitmask",
3705
- "type": "u64"
3706
- }
3707
- ]
3708
- }
3709
- },
3710
- {
3711
- "name": "protocolPolicy",
3712
- "docs": [
3713
- "Stores policy data for an integrated protocol.",
3714
- "Integration programs serialize/deserialize this data."
3715
- ],
3716
- "type": {
3717
- "kind": "struct",
3718
- "fields": [
3719
- {
3720
- "name": "protocolBitflag",
3721
- "type": "u16"
3722
- },
3723
- {
3724
- "name": "data",
3725
- "type": "bytes"
3726
- }
3727
- ]
3728
- }
3729
- },
3730
- {
3731
- "name": "settlePnlMode",
3732
- "type": {
3733
- "kind": "enum",
3734
- "variants": [
3735
- {
3736
- "name": "mustSettle"
3737
- },
3738
- {
3739
- "name": "trySettle"
3740
- }
3741
- ]
3742
- }
3743
- },
3744
- {
3745
- "name": "stateAccount",
3746
- "type": {
3747
- "kind": "struct",
3748
- "fields": [
3749
- {
3750
- "name": "accountType",
3751
- "type": {
3752
- "defined": {
3753
- "name": "accountType"
3754
- }
3755
- }
3756
- },
3757
- {
3758
- "name": "enabled",
3759
- "type": "bool"
3760
- },
3761
- {
3762
- "name": "vault",
3763
- "type": "pubkey"
3764
- },
3765
- {
3766
- "name": "owner",
3767
- "type": "pubkey"
3768
- },
3769
- {
3770
- "name": "portfolioManagerName",
3771
- "type": {
3772
- "array": [
3773
- "u8",
3774
- 32
3775
- ]
3776
- }
3777
- },
3778
- {
3779
- "name": "created",
3780
- "type": {
3781
- "defined": {
3782
- "name": "createdModel"
3783
- }
3784
- }
3785
- },
3786
- {
3787
- "name": "baseAssetMint",
3788
- "type": "pubkey"
3789
- },
3790
- {
3791
- "name": "baseAssetDecimals",
3792
- "type": "u8"
3793
- },
3794
- {
3795
- "name": "baseAssetTokenProgram",
3796
- "type": "u8"
3797
- },
3798
- {
3799
- "name": "name",
3800
- "type": {
3801
- "array": [
3802
- "u8",
3803
- 32
3804
- ]
3805
- }
3806
- },
3807
- {
3808
- "name": "timelockDuration",
3809
- "type": "u32"
3810
- },
3811
- {
3812
- "name": "timelockExpiresAt",
3813
- "type": "u64"
3814
- },
3815
- {
3816
- "name": "mint",
3817
- "type": "pubkey"
3818
- },
3819
- {
3820
- "name": "assets",
3821
- "type": {
3822
- "vec": "pubkey"
3823
- }
3824
- },
3825
- {
3826
- "name": "integrationAcls",
3827
- "type": {
3828
- "vec": {
3829
- "defined": {
3830
- "name": "integrationAcl"
3831
- }
3832
- }
3833
- }
3834
- },
3835
- {
3836
- "name": "delegateAcls",
3837
- "type": {
3838
- "vec": {
3839
- "defined": {
3840
- "name": "delegateAcl"
3841
- }
3842
- }
3843
- }
3844
- },
3845
- {
3846
- "name": "externalPositions",
3847
- "type": {
3848
- "vec": "pubkey"
3849
- }
3850
- },
3851
- {
3852
- "name": "pricedProtocols",
3853
- "type": {
3854
- "vec": {
3855
- "defined": {
3856
- "name": "pricedProtocol"
3857
- }
3858
- }
3859
- }
3860
- },
3861
- {
3862
- "name": "params",
3863
- "type": {
3864
- "vec": {
3865
- "vec": {
3866
- "defined": {
3867
- "name": "engineField"
3868
- }
3869
- }
3870
- }
3871
- }
3872
- }
3873
- ]
3874
- }
3875
- },
3876
- {
3877
- "name": "timeUnit",
3878
- "type": {
3879
- "kind": "enum",
3880
- "variants": [
3881
- {
3882
- "name": "second"
3883
- },
3884
- {
3885
- "name": "slot"
3886
- }
3887
- ]
3888
- }
3889
- },
3890
- {
3891
- "name": "valuationModel",
3892
- "type": {
3893
- "kind": "enum",
3894
- "variants": [
3895
- {
3896
- "name": "continuous"
3897
- },
3898
- {
3899
- "name": "periodic"
3900
- }
3901
- ]
3902
- }
3903
- },
3904
- {
3905
- "name": "withdrawUnit",
3906
- "type": {
3907
- "kind": "enum",
3908
- "variants": [
3909
- {
3910
- "name": "shares"
3911
- },
3912
- {
3913
- "name": "token"
3914
- },
3915
- {
3916
- "name": "sharesPercent"
3917
- }
3918
- ]
3919
- }
3920
- }
3921
- ],
3922
- "constants": [
3923
- {
3924
- "name": "protoDriftProtocol",
3925
- "type": "u16",
3926
- "value": "1"
3927
- },
3928
- {
3929
- "name": "protoDriftProtocolPermBorrow",
3930
- "type": "u64",
3931
- "value": "32"
3932
- },
3933
- {
3934
- "name": "protoDriftProtocolPermCancelOrders",
3935
- "type": "u64",
3936
- "value": "256"
3937
- },
3938
- {
3939
- "name": "protoDriftProtocolPermCreateModifyOrders",
3940
- "type": "u64",
3941
- "value": "128"
3942
- },
3943
- {
3944
- "name": "protoDriftProtocolPermDeleteUser",
3945
- "type": "u64",
3946
- "value": "4"
3947
- },
3948
- {
3949
- "name": "protoDriftProtocolPermDeposit",
3950
- "type": "u64",
3951
- "value": "8"
3952
- },
3953
- {
3954
- "name": "protoDriftProtocolPermInitUser",
3955
- "type": "u64",
3956
- "value": "1"
3957
- },
3958
- {
3959
- "name": "protoDriftProtocolPermPerpMarkets",
3960
- "type": "u64",
3961
- "value": "512"
3962
- },
3963
- {
3964
- "name": "protoDriftProtocolPermRepay",
3965
- "type": "u64",
3966
- "value": "64"
3967
- },
3968
- {
3969
- "name": "protoDriftProtocolPermSpotMarkets",
3970
- "type": "u64",
3971
- "value": "1024"
3972
- },
3973
- {
3974
- "name": "protoDriftProtocolPermUpdateUser",
3975
- "type": "u64",
3976
- "value": "2"
3977
- },
3978
- {
3979
- "name": "protoDriftProtocolPermWithdraw",
3980
- "type": "u64",
3981
- "value": "16"
3982
- },
3983
- {
3984
- "name": "protoDriftVaults",
3985
- "type": "u16",
3986
- "value": "2"
3987
- },
3988
- {
3989
- "name": "protoDriftVaultsPermDeposit",
3990
- "type": "u64",
3991
- "value": "1"
3992
- },
3993
- {
3994
- "name": "protoDriftVaultsPermWithdraw",
3995
- "type": "u64",
3996
- "value": "2"
3997
- }
3998
- ]
3999
- };