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