@glamsystems/glam-sdk 1.0.13 → 1.0.14-alpha.1

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 (67) hide show
  1. package/README.md +1 -1
  2. package/index.cjs.js +14513 -21874
  3. package/index.esm.js +14492 -21817
  4. package/package.json +2 -2
  5. package/src/assets.d.ts +6 -15
  6. package/src/client/base.d.ts +24 -5
  7. package/src/client/bridge.d.ts +184 -0
  8. package/src/client/bridgeRegistry.d.ts +32 -0
  9. package/src/client/epi.d.ts +78 -0
  10. package/src/client/fees.d.ts +1 -0
  11. package/src/client/jupiter.d.ts +22 -18
  12. package/src/client/price.d.ts +13 -37
  13. package/src/client.d.ts +6 -5
  14. package/src/constants.d.ts +5 -7
  15. package/src/deser/index.d.ts +0 -1
  16. package/src/deser/integrationPolicies.d.ts +23 -20
  17. package/src/error.d.ts +2 -1
  18. package/src/glamExports.d.ts +2423 -1787
  19. package/src/globalConfig.d.ts +22 -0
  20. package/src/index.d.ts +3 -1
  21. package/src/react/glam.d.ts +0 -4
  22. package/src/react/query-keys.d.ts +1 -3
  23. package/src/utils/accounts.d.ts +4 -1
  24. package/src/utils/common.d.ts +2 -0
  25. package/src/utils/index.d.ts +0 -1
  26. package/src/utils/positionCategorizer.d.ts +3 -21
  27. package/target/idl/ext_cctp.json +1 -1
  28. package/target/idl/ext_kamino-staging.json +1 -1
  29. package/target/idl/ext_kamino.json +109 -1
  30. package/target/idl/ext_spl-staging.json +1 -1
  31. package/target/idl/ext_spl.json +1 -1
  32. package/target/idl/glam_config.json +75 -9
  33. package/target/idl/glam_mint.json +205 -11
  34. package/target/idl/glam_policies.json +2 -7
  35. package/target/idl/glam_protocol-staging.json +118 -522
  36. package/target/idl/glam_protocol.json +204 -121
  37. package/target/types/ext_bridge.d.ts +2398 -0
  38. package/target/types/ext_cctp.d.ts +1 -1
  39. package/target/types/ext_cctp.ts +1 -1
  40. package/target/types/ext_epi.d.ts +2175 -0
  41. package/target/types/ext_kamino-staging.ts +1 -1
  42. package/target/types/ext_kamino.d.ts +109 -1
  43. package/target/types/ext_kamino.ts +109 -1
  44. package/target/types/ext_spl-staging.ts +1 -1
  45. package/target/types/ext_spl.d.ts +1 -1
  46. package/target/types/ext_spl.ts +1 -1
  47. package/target/types/glam_config.d.ts +75 -9
  48. package/target/types/glam_config.ts +75 -9
  49. package/target/types/glam_mint.d.ts +205 -11
  50. package/target/types/glam_mint.ts +205 -11
  51. package/target/types/glam_policies.ts +2 -7
  52. package/target/types/glam_protocol-staging.ts +118 -522
  53. package/target/types/glam_protocol.d.ts +204 -121
  54. package/target/types/glam_protocol.ts +204 -121
  55. package/src/client/drift/index.d.ts +0 -2
  56. package/src/client/drift/protocol-v2.d.ts +0 -130
  57. package/src/client/drift/vaults.d.ts +0 -60
  58. package/src/deser/driftLayouts.d.ts +0 -217
  59. package/src/utils/drift/index.d.ts +0 -2
  60. package/src/utils/drift/orderParams.d.ts +0 -28
  61. package/src/utils/drift/types.d.ts +0 -522
  62. package/target/idl/ext_drift-staging.json +0 -5442
  63. package/target/idl/ext_drift.json +0 -4962
  64. package/target/types/ext_drift-staging.ts +0 -5448
  65. package/target/types/ext_drift.d.ts +0 -4968
  66. package/target/types/ext_drift.ts +0 -4968
  67. package/target/types/ext_offchain.d.ts +0 -1074
@@ -1,4962 +0,0 @@
1
- {
2
- "address": "G1NTdrBmBpW43msRQmsf7qXSw3MFBNaqJcAkGiRmRq2F",
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_order",
12
- "discriminator": [
13
- 95,
14
- 129,
15
- 237,
16
- 240,
17
- 8,
18
- 49,
19
- 223,
20
- 132
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": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
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": "order_id",
114
- "type": {
115
- "option": "u32"
116
- }
117
- }
118
- ]
119
- },
120
- {
121
- "name": "cancel_order_by_user_id",
122
- "discriminator": [
123
- 107,
124
- 211,
125
- 250,
126
- 133,
127
- 18,
128
- 37,
129
- 57,
130
- 100
131
- ],
132
- "accounts": [
133
- {
134
- "name": "glam_state",
135
- "writable": true
136
- },
137
- {
138
- "name": "glam_vault",
139
- "writable": true,
140
- "pda": {
141
- "seeds": [
142
- {
143
- "kind": "const",
144
- "value": [
145
- 118,
146
- 97,
147
- 117,
148
- 108,
149
- 116
150
- ]
151
- },
152
- {
153
- "kind": "account",
154
- "path": "glam_state"
155
- }
156
- ],
157
- "program": {
158
- "kind": "account",
159
- "path": "glam_protocol_program"
160
- }
161
- }
162
- },
163
- {
164
- "name": "glam_signer",
165
- "writable": true,
166
- "signer": true
167
- },
168
- {
169
- "name": "integration_authority",
170
- "pda": {
171
- "seeds": [
172
- {
173
- "kind": "const",
174
- "value": [
175
- 105,
176
- 110,
177
- 116,
178
- 101,
179
- 103,
180
- 114,
181
- 97,
182
- 116,
183
- 105,
184
- 111,
185
- 110,
186
- 45,
187
- 97,
188
- 117,
189
- 116,
190
- 104,
191
- 111,
192
- 114,
193
- 105,
194
- 116,
195
- 121
196
- ]
197
- }
198
- ]
199
- }
200
- },
201
- {
202
- "name": "cpi_program",
203
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
204
- },
205
- {
206
- "name": "glam_protocol_program",
207
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
208
- },
209
- {
210
- "name": "system_program",
211
- "address": "11111111111111111111111111111111"
212
- },
213
- {
214
- "name": "state"
215
- },
216
- {
217
- "name": "user",
218
- "writable": true
219
- }
220
- ],
221
- "args": [
222
- {
223
- "name": "user_order_id",
224
- "type": "u8"
225
- }
226
- ]
227
- },
228
- {
229
- "name": "cancel_orders",
230
- "discriminator": [
231
- 238,
232
- 225,
233
- 95,
234
- 158,
235
- 227,
236
- 103,
237
- 8,
238
- 194
239
- ],
240
- "accounts": [
241
- {
242
- "name": "glam_state",
243
- "writable": true
244
- },
245
- {
246
- "name": "glam_vault",
247
- "writable": true,
248
- "pda": {
249
- "seeds": [
250
- {
251
- "kind": "const",
252
- "value": [
253
- 118,
254
- 97,
255
- 117,
256
- 108,
257
- 116
258
- ]
259
- },
260
- {
261
- "kind": "account",
262
- "path": "glam_state"
263
- }
264
- ],
265
- "program": {
266
- "kind": "account",
267
- "path": "glam_protocol_program"
268
- }
269
- }
270
- },
271
- {
272
- "name": "glam_signer",
273
- "writable": true,
274
- "signer": true
275
- },
276
- {
277
- "name": "integration_authority",
278
- "pda": {
279
- "seeds": [
280
- {
281
- "kind": "const",
282
- "value": [
283
- 105,
284
- 110,
285
- 116,
286
- 101,
287
- 103,
288
- 114,
289
- 97,
290
- 116,
291
- 105,
292
- 111,
293
- 110,
294
- 45,
295
- 97,
296
- 117,
297
- 116,
298
- 104,
299
- 111,
300
- 114,
301
- 105,
302
- 116,
303
- 121
304
- ]
305
- }
306
- ]
307
- }
308
- },
309
- {
310
- "name": "cpi_program",
311
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
312
- },
313
- {
314
- "name": "glam_protocol_program",
315
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
316
- },
317
- {
318
- "name": "system_program",
319
- "address": "11111111111111111111111111111111"
320
- },
321
- {
322
- "name": "state"
323
- },
324
- {
325
- "name": "user",
326
- "writable": true
327
- }
328
- ],
329
- "args": [
330
- {
331
- "name": "market_type",
332
- "type": {
333
- "option": {
334
- "defined": {
335
- "name": "MarketType"
336
- }
337
- }
338
- }
339
- },
340
- {
341
- "name": "market_index",
342
- "type": {
343
- "option": "u16"
344
- }
345
- },
346
- {
347
- "name": "direction",
348
- "type": {
349
- "option": {
350
- "defined": {
351
- "name": "PositionDirection"
352
- }
353
- }
354
- }
355
- }
356
- ]
357
- },
358
- {
359
- "name": "cancel_orders_by_ids",
360
- "discriminator": [
361
- 134,
362
- 19,
363
- 144,
364
- 165,
365
- 94,
366
- 240,
367
- 210,
368
- 94
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": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
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
- "args": [
460
- {
461
- "name": "order_ids",
462
- "type": {
463
- "vec": "u32"
464
- }
465
- }
466
- ]
467
- },
468
- {
469
- "name": "delete_user",
470
- "discriminator": [
471
- 186,
472
- 85,
473
- 17,
474
- 249,
475
- 219,
476
- 231,
477
- 98,
478
- 251
479
- ],
480
- "accounts": [
481
- {
482
- "name": "glam_state",
483
- "writable": true
484
- },
485
- {
486
- "name": "glam_vault",
487
- "writable": true,
488
- "pda": {
489
- "seeds": [
490
- {
491
- "kind": "const",
492
- "value": [
493
- 118,
494
- 97,
495
- 117,
496
- 108,
497
- 116
498
- ]
499
- },
500
- {
501
- "kind": "account",
502
- "path": "glam_state"
503
- }
504
- ],
505
- "program": {
506
- "kind": "account",
507
- "path": "glam_protocol_program"
508
- }
509
- }
510
- },
511
- {
512
- "name": "glam_signer",
513
- "writable": true,
514
- "signer": true
515
- },
516
- {
517
- "name": "integration_authority",
518
- "pda": {
519
- "seeds": [
520
- {
521
- "kind": "const",
522
- "value": [
523
- 105,
524
- 110,
525
- 116,
526
- 101,
527
- 103,
528
- 114,
529
- 97,
530
- 116,
531
- 105,
532
- 111,
533
- 110,
534
- 45,
535
- 97,
536
- 117,
537
- 116,
538
- 104,
539
- 111,
540
- 114,
541
- 105,
542
- 116,
543
- 121
544
- ]
545
- }
546
- ]
547
- }
548
- },
549
- {
550
- "name": "cpi_program",
551
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
552
- },
553
- {
554
- "name": "glam_protocol_program",
555
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
556
- },
557
- {
558
- "name": "system_program",
559
- "address": "11111111111111111111111111111111"
560
- },
561
- {
562
- "name": "user",
563
- "writable": true
564
- },
565
- {
566
- "name": "user_stats",
567
- "writable": true
568
- },
569
- {
570
- "name": "state",
571
- "writable": true
572
- }
573
- ],
574
- "args": []
575
- },
576
- {
577
- "name": "deposit",
578
- "discriminator": [
579
- 242,
580
- 35,
581
- 198,
582
- 137,
583
- 82,
584
- 225,
585
- 242,
586
- 182
587
- ],
588
- "accounts": [
589
- {
590
- "name": "glam_state",
591
- "writable": true
592
- },
593
- {
594
- "name": "glam_vault",
595
- "writable": true,
596
- "pda": {
597
- "seeds": [
598
- {
599
- "kind": "const",
600
- "value": [
601
- 118,
602
- 97,
603
- 117,
604
- 108,
605
- 116
606
- ]
607
- },
608
- {
609
- "kind": "account",
610
- "path": "glam_state"
611
- }
612
- ],
613
- "program": {
614
- "kind": "account",
615
- "path": "glam_protocol_program"
616
- }
617
- }
618
- },
619
- {
620
- "name": "glam_signer",
621
- "writable": true,
622
- "signer": true
623
- },
624
- {
625
- "name": "integration_authority",
626
- "pda": {
627
- "seeds": [
628
- {
629
- "kind": "const",
630
- "value": [
631
- 105,
632
- 110,
633
- 116,
634
- 101,
635
- 103,
636
- 114,
637
- 97,
638
- 116,
639
- 105,
640
- 111,
641
- 110,
642
- 45,
643
- 97,
644
- 117,
645
- 116,
646
- 104,
647
- 111,
648
- 114,
649
- 105,
650
- 116,
651
- 121
652
- ]
653
- }
654
- ]
655
- }
656
- },
657
- {
658
- "name": "cpi_program",
659
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
660
- },
661
- {
662
- "name": "glam_protocol_program",
663
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
664
- },
665
- {
666
- "name": "system_program",
667
- "address": "11111111111111111111111111111111"
668
- },
669
- {
670
- "name": "state"
671
- },
672
- {
673
- "name": "user",
674
- "writable": true
675
- },
676
- {
677
- "name": "user_stats",
678
- "writable": true
679
- },
680
- {
681
- "name": "spot_market_vault",
682
- "writable": true
683
- },
684
- {
685
- "name": "user_token_account",
686
- "writable": true
687
- },
688
- {
689
- "name": "token_program"
690
- }
691
- ],
692
- "args": [
693
- {
694
- "name": "market_index",
695
- "type": "u16"
696
- },
697
- {
698
- "name": "amount",
699
- "type": "u64"
700
- },
701
- {
702
- "name": "reduce_only",
703
- "type": "bool"
704
- }
705
- ]
706
- },
707
- {
708
- "name": "initialize_user",
709
- "discriminator": [
710
- 111,
711
- 17,
712
- 185,
713
- 250,
714
- 60,
715
- 122,
716
- 38,
717
- 254
718
- ],
719
- "accounts": [
720
- {
721
- "name": "glam_state",
722
- "writable": true
723
- },
724
- {
725
- "name": "glam_vault",
726
- "writable": true,
727
- "pda": {
728
- "seeds": [
729
- {
730
- "kind": "const",
731
- "value": [
732
- 118,
733
- 97,
734
- 117,
735
- 108,
736
- 116
737
- ]
738
- },
739
- {
740
- "kind": "account",
741
- "path": "glam_state"
742
- }
743
- ],
744
- "program": {
745
- "kind": "account",
746
- "path": "glam_protocol_program"
747
- }
748
- }
749
- },
750
- {
751
- "name": "glam_signer",
752
- "writable": true,
753
- "signer": true
754
- },
755
- {
756
- "name": "integration_authority",
757
- "pda": {
758
- "seeds": [
759
- {
760
- "kind": "const",
761
- "value": [
762
- 105,
763
- 110,
764
- 116,
765
- 101,
766
- 103,
767
- 114,
768
- 97,
769
- 116,
770
- 105,
771
- 111,
772
- 110,
773
- 45,
774
- 97,
775
- 117,
776
- 116,
777
- 104,
778
- 111,
779
- 114,
780
- 105,
781
- 116,
782
- 121
783
- ]
784
- }
785
- ]
786
- }
787
- },
788
- {
789
- "name": "cpi_program",
790
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
791
- },
792
- {
793
- "name": "glam_protocol_program",
794
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
795
- },
796
- {
797
- "name": "user",
798
- "writable": true
799
- },
800
- {
801
- "name": "user_stats",
802
- "writable": true
803
- },
804
- {
805
- "name": "state",
806
- "writable": true
807
- },
808
- {
809
- "name": "rent",
810
- "address": "SysvarRent111111111111111111111111111111111"
811
- },
812
- {
813
- "name": "system_program",
814
- "address": "11111111111111111111111111111111"
815
- }
816
- ],
817
- "args": [
818
- {
819
- "name": "sub_account_id",
820
- "type": "u16"
821
- },
822
- {
823
- "name": "name",
824
- "type": {
825
- "array": [
826
- "u8",
827
- 32
828
- ]
829
- }
830
- }
831
- ]
832
- },
833
- {
834
- "name": "initialize_user_stats",
835
- "discriminator": [
836
- 254,
837
- 243,
838
- 72,
839
- 98,
840
- 251,
841
- 130,
842
- 168,
843
- 213
844
- ],
845
- "accounts": [
846
- {
847
- "name": "glam_state",
848
- "writable": true
849
- },
850
- {
851
- "name": "glam_vault",
852
- "writable": true,
853
- "pda": {
854
- "seeds": [
855
- {
856
- "kind": "const",
857
- "value": [
858
- 118,
859
- 97,
860
- 117,
861
- 108,
862
- 116
863
- ]
864
- },
865
- {
866
- "kind": "account",
867
- "path": "glam_state"
868
- }
869
- ],
870
- "program": {
871
- "kind": "account",
872
- "path": "glam_protocol_program"
873
- }
874
- }
875
- },
876
- {
877
- "name": "glam_signer",
878
- "writable": true,
879
- "signer": true
880
- },
881
- {
882
- "name": "integration_authority",
883
- "pda": {
884
- "seeds": [
885
- {
886
- "kind": "const",
887
- "value": [
888
- 105,
889
- 110,
890
- 116,
891
- 101,
892
- 103,
893
- 114,
894
- 97,
895
- 116,
896
- 105,
897
- 111,
898
- 110,
899
- 45,
900
- 97,
901
- 117,
902
- 116,
903
- 104,
904
- 111,
905
- 114,
906
- 105,
907
- 116,
908
- 121
909
- ]
910
- }
911
- ]
912
- }
913
- },
914
- {
915
- "name": "cpi_program",
916
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
917
- },
918
- {
919
- "name": "glam_protocol_program",
920
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
921
- },
922
- {
923
- "name": "user_stats",
924
- "writable": true
925
- },
926
- {
927
- "name": "state",
928
- "writable": true
929
- },
930
- {
931
- "name": "rent",
932
- "address": "SysvarRent111111111111111111111111111111111"
933
- },
934
- {
935
- "name": "system_program",
936
- "address": "11111111111111111111111111111111"
937
- }
938
- ],
939
- "args": []
940
- },
941
- {
942
- "name": "liquidate_perp",
943
- "discriminator": [
944
- 75,
945
- 35,
946
- 119,
947
- 247,
948
- 191,
949
- 18,
950
- 139,
951
- 2
952
- ],
953
- "accounts": [
954
- {
955
- "name": "glam_state",
956
- "writable": true
957
- },
958
- {
959
- "name": "glam_vault",
960
- "writable": true,
961
- "pda": {
962
- "seeds": [
963
- {
964
- "kind": "const",
965
- "value": [
966
- 118,
967
- 97,
968
- 117,
969
- 108,
970
- 116
971
- ]
972
- },
973
- {
974
- "kind": "account",
975
- "path": "glam_state"
976
- }
977
- ],
978
- "program": {
979
- "kind": "account",
980
- "path": "glam_protocol_program"
981
- }
982
- }
983
- },
984
- {
985
- "name": "glam_signer",
986
- "writable": true,
987
- "signer": true
988
- },
989
- {
990
- "name": "integration_authority",
991
- "pda": {
992
- "seeds": [
993
- {
994
- "kind": "const",
995
- "value": [
996
- 105,
997
- 110,
998
- 116,
999
- 101,
1000
- 103,
1001
- 114,
1002
- 97,
1003
- 116,
1004
- 105,
1005
- 111,
1006
- 110,
1007
- 45,
1008
- 97,
1009
- 117,
1010
- 116,
1011
- 104,
1012
- 111,
1013
- 114,
1014
- 105,
1015
- 116,
1016
- 121
1017
- ]
1018
- }
1019
- ]
1020
- }
1021
- },
1022
- {
1023
- "name": "cpi_program",
1024
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
1025
- },
1026
- {
1027
- "name": "glam_protocol_program",
1028
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1029
- },
1030
- {
1031
- "name": "system_program",
1032
- "address": "11111111111111111111111111111111"
1033
- },
1034
- {
1035
- "name": "state"
1036
- },
1037
- {
1038
- "name": "liquidator",
1039
- "writable": true
1040
- },
1041
- {
1042
- "name": "liquidator_stats",
1043
- "writable": true
1044
- },
1045
- {
1046
- "name": "user",
1047
- "writable": true
1048
- },
1049
- {
1050
- "name": "user_stats",
1051
- "writable": true
1052
- }
1053
- ],
1054
- "args": [
1055
- {
1056
- "name": "market_index",
1057
- "type": "u16"
1058
- },
1059
- {
1060
- "name": "liquidator_max_base_asset_amount",
1061
- "type": "u64"
1062
- },
1063
- {
1064
- "name": "limit_price",
1065
- "type": {
1066
- "option": "u64"
1067
- }
1068
- }
1069
- ]
1070
- },
1071
- {
1072
- "name": "liquidate_spot",
1073
- "discriminator": [
1074
- 107,
1075
- 0,
1076
- 128,
1077
- 41,
1078
- 35,
1079
- 229,
1080
- 251,
1081
- 18
1082
- ],
1083
- "accounts": [
1084
- {
1085
- "name": "glam_state",
1086
- "writable": true
1087
- },
1088
- {
1089
- "name": "glam_vault",
1090
- "writable": true,
1091
- "pda": {
1092
- "seeds": [
1093
- {
1094
- "kind": "const",
1095
- "value": [
1096
- 118,
1097
- 97,
1098
- 117,
1099
- 108,
1100
- 116
1101
- ]
1102
- },
1103
- {
1104
- "kind": "account",
1105
- "path": "glam_state"
1106
- }
1107
- ],
1108
- "program": {
1109
- "kind": "account",
1110
- "path": "glam_protocol_program"
1111
- }
1112
- }
1113
- },
1114
- {
1115
- "name": "glam_signer",
1116
- "writable": true,
1117
- "signer": true
1118
- },
1119
- {
1120
- "name": "integration_authority",
1121
- "pda": {
1122
- "seeds": [
1123
- {
1124
- "kind": "const",
1125
- "value": [
1126
- 105,
1127
- 110,
1128
- 116,
1129
- 101,
1130
- 103,
1131
- 114,
1132
- 97,
1133
- 116,
1134
- 105,
1135
- 111,
1136
- 110,
1137
- 45,
1138
- 97,
1139
- 117,
1140
- 116,
1141
- 104,
1142
- 111,
1143
- 114,
1144
- 105,
1145
- 116,
1146
- 121
1147
- ]
1148
- }
1149
- ]
1150
- }
1151
- },
1152
- {
1153
- "name": "cpi_program",
1154
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
1155
- },
1156
- {
1157
- "name": "glam_protocol_program",
1158
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1159
- },
1160
- {
1161
- "name": "system_program",
1162
- "address": "11111111111111111111111111111111"
1163
- },
1164
- {
1165
- "name": "state"
1166
- },
1167
- {
1168
- "name": "liquidator",
1169
- "writable": true
1170
- },
1171
- {
1172
- "name": "liquidator_stats",
1173
- "writable": true
1174
- },
1175
- {
1176
- "name": "user",
1177
- "writable": true
1178
- },
1179
- {
1180
- "name": "user_stats",
1181
- "writable": true
1182
- }
1183
- ],
1184
- "args": [
1185
- {
1186
- "name": "asset_market_index",
1187
- "type": "u16"
1188
- },
1189
- {
1190
- "name": "liability_market_index",
1191
- "type": "u16"
1192
- },
1193
- {
1194
- "name": "liquidator_max_liability_transfer",
1195
- "type": "u128"
1196
- },
1197
- {
1198
- "name": "limit_price",
1199
- "type": {
1200
- "option": "u64"
1201
- }
1202
- }
1203
- ]
1204
- },
1205
- {
1206
- "name": "modify_order",
1207
- "discriminator": [
1208
- 47,
1209
- 124,
1210
- 117,
1211
- 255,
1212
- 201,
1213
- 197,
1214
- 130,
1215
- 94
1216
- ],
1217
- "accounts": [
1218
- {
1219
- "name": "glam_state",
1220
- "writable": true
1221
- },
1222
- {
1223
- "name": "glam_vault",
1224
- "writable": true,
1225
- "pda": {
1226
- "seeds": [
1227
- {
1228
- "kind": "const",
1229
- "value": [
1230
- 118,
1231
- 97,
1232
- 117,
1233
- 108,
1234
- 116
1235
- ]
1236
- },
1237
- {
1238
- "kind": "account",
1239
- "path": "glam_state"
1240
- }
1241
- ],
1242
- "program": {
1243
- "kind": "account",
1244
- "path": "glam_protocol_program"
1245
- }
1246
- }
1247
- },
1248
- {
1249
- "name": "glam_signer",
1250
- "writable": true,
1251
- "signer": true
1252
- },
1253
- {
1254
- "name": "integration_authority",
1255
- "pda": {
1256
- "seeds": [
1257
- {
1258
- "kind": "const",
1259
- "value": [
1260
- 105,
1261
- 110,
1262
- 116,
1263
- 101,
1264
- 103,
1265
- 114,
1266
- 97,
1267
- 116,
1268
- 105,
1269
- 111,
1270
- 110,
1271
- 45,
1272
- 97,
1273
- 117,
1274
- 116,
1275
- 104,
1276
- 111,
1277
- 114,
1278
- 105,
1279
- 116,
1280
- 121
1281
- ]
1282
- }
1283
- ]
1284
- }
1285
- },
1286
- {
1287
- "name": "cpi_program",
1288
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
1289
- },
1290
- {
1291
- "name": "glam_protocol_program",
1292
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1293
- },
1294
- {
1295
- "name": "system_program",
1296
- "address": "11111111111111111111111111111111"
1297
- },
1298
- {
1299
- "name": "state"
1300
- },
1301
- {
1302
- "name": "user",
1303
- "writable": true
1304
- }
1305
- ],
1306
- "args": [
1307
- {
1308
- "name": "order_id",
1309
- "type": {
1310
- "option": "u32"
1311
- }
1312
- },
1313
- {
1314
- "name": "modify_order_params",
1315
- "type": {
1316
- "defined": {
1317
- "name": "ModifyOrderParams"
1318
- }
1319
- }
1320
- }
1321
- ]
1322
- },
1323
- {
1324
- "name": "modify_order_by_user_id",
1325
- "discriminator": [
1326
- 158,
1327
- 77,
1328
- 4,
1329
- 253,
1330
- 252,
1331
- 194,
1332
- 161,
1333
- 179
1334
- ],
1335
- "accounts": [
1336
- {
1337
- "name": "glam_state",
1338
- "writable": true
1339
- },
1340
- {
1341
- "name": "glam_vault",
1342
- "writable": true,
1343
- "pda": {
1344
- "seeds": [
1345
- {
1346
- "kind": "const",
1347
- "value": [
1348
- 118,
1349
- 97,
1350
- 117,
1351
- 108,
1352
- 116
1353
- ]
1354
- },
1355
- {
1356
- "kind": "account",
1357
- "path": "glam_state"
1358
- }
1359
- ],
1360
- "program": {
1361
- "kind": "account",
1362
- "path": "glam_protocol_program"
1363
- }
1364
- }
1365
- },
1366
- {
1367
- "name": "glam_signer",
1368
- "writable": true,
1369
- "signer": true
1370
- },
1371
- {
1372
- "name": "integration_authority",
1373
- "pda": {
1374
- "seeds": [
1375
- {
1376
- "kind": "const",
1377
- "value": [
1378
- 105,
1379
- 110,
1380
- 116,
1381
- 101,
1382
- 103,
1383
- 114,
1384
- 97,
1385
- 116,
1386
- 105,
1387
- 111,
1388
- 110,
1389
- 45,
1390
- 97,
1391
- 117,
1392
- 116,
1393
- 104,
1394
- 111,
1395
- 114,
1396
- 105,
1397
- 116,
1398
- 121
1399
- ]
1400
- }
1401
- ]
1402
- }
1403
- },
1404
- {
1405
- "name": "cpi_program",
1406
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
1407
- },
1408
- {
1409
- "name": "glam_protocol_program",
1410
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1411
- },
1412
- {
1413
- "name": "system_program",
1414
- "address": "11111111111111111111111111111111"
1415
- },
1416
- {
1417
- "name": "state"
1418
- },
1419
- {
1420
- "name": "user",
1421
- "writable": true
1422
- }
1423
- ],
1424
- "args": [
1425
- {
1426
- "name": "user_order_id",
1427
- "type": "u8"
1428
- },
1429
- {
1430
- "name": "modify_order_params",
1431
- "type": {
1432
- "defined": {
1433
- "name": "ModifyOrderParams"
1434
- }
1435
- }
1436
- }
1437
- ]
1438
- },
1439
- {
1440
- "name": "place_and_take_perp_order",
1441
- "discriminator": [
1442
- 213,
1443
- 51,
1444
- 1,
1445
- 187,
1446
- 108,
1447
- 220,
1448
- 230,
1449
- 224
1450
- ],
1451
- "accounts": [
1452
- {
1453
- "name": "glam_state",
1454
- "writable": true
1455
- },
1456
- {
1457
- "name": "glam_vault",
1458
- "writable": true,
1459
- "pda": {
1460
- "seeds": [
1461
- {
1462
- "kind": "const",
1463
- "value": [
1464
- 118,
1465
- 97,
1466
- 117,
1467
- 108,
1468
- 116
1469
- ]
1470
- },
1471
- {
1472
- "kind": "account",
1473
- "path": "glam_state"
1474
- }
1475
- ],
1476
- "program": {
1477
- "kind": "account",
1478
- "path": "glam_protocol_program"
1479
- }
1480
- }
1481
- },
1482
- {
1483
- "name": "glam_signer",
1484
- "writable": true,
1485
- "signer": true
1486
- },
1487
- {
1488
- "name": "integration_authority",
1489
- "pda": {
1490
- "seeds": [
1491
- {
1492
- "kind": "const",
1493
- "value": [
1494
- 105,
1495
- 110,
1496
- 116,
1497
- 101,
1498
- 103,
1499
- 114,
1500
- 97,
1501
- 116,
1502
- 105,
1503
- 111,
1504
- 110,
1505
- 45,
1506
- 97,
1507
- 117,
1508
- 116,
1509
- 104,
1510
- 111,
1511
- 114,
1512
- 105,
1513
- 116,
1514
- 121
1515
- ]
1516
- }
1517
- ]
1518
- }
1519
- },
1520
- {
1521
- "name": "cpi_program",
1522
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
1523
- },
1524
- {
1525
- "name": "glam_protocol_program",
1526
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1527
- },
1528
- {
1529
- "name": "system_program",
1530
- "address": "11111111111111111111111111111111"
1531
- },
1532
- {
1533
- "name": "state"
1534
- },
1535
- {
1536
- "name": "user",
1537
- "writable": true
1538
- },
1539
- {
1540
- "name": "user_stats",
1541
- "writable": true
1542
- }
1543
- ],
1544
- "args": [
1545
- {
1546
- "name": "params",
1547
- "type": {
1548
- "defined": {
1549
- "name": "OrderParams"
1550
- }
1551
- }
1552
- },
1553
- {
1554
- "name": "success_condition",
1555
- "type": {
1556
- "option": "u32"
1557
- }
1558
- }
1559
- ]
1560
- },
1561
- {
1562
- "name": "place_orders",
1563
- "discriminator": [
1564
- 60,
1565
- 63,
1566
- 50,
1567
- 123,
1568
- 12,
1569
- 197,
1570
- 60,
1571
- 190
1572
- ],
1573
- "accounts": [
1574
- {
1575
- "name": "glam_state",
1576
- "writable": true
1577
- },
1578
- {
1579
- "name": "glam_vault",
1580
- "writable": true,
1581
- "pda": {
1582
- "seeds": [
1583
- {
1584
- "kind": "const",
1585
- "value": [
1586
- 118,
1587
- 97,
1588
- 117,
1589
- 108,
1590
- 116
1591
- ]
1592
- },
1593
- {
1594
- "kind": "account",
1595
- "path": "glam_state"
1596
- }
1597
- ],
1598
- "program": {
1599
- "kind": "account",
1600
- "path": "glam_protocol_program"
1601
- }
1602
- }
1603
- },
1604
- {
1605
- "name": "glam_signer",
1606
- "writable": true,
1607
- "signer": true
1608
- },
1609
- {
1610
- "name": "integration_authority",
1611
- "pda": {
1612
- "seeds": [
1613
- {
1614
- "kind": "const",
1615
- "value": [
1616
- 105,
1617
- 110,
1618
- 116,
1619
- 101,
1620
- 103,
1621
- 114,
1622
- 97,
1623
- 116,
1624
- 105,
1625
- 111,
1626
- 110,
1627
- 45,
1628
- 97,
1629
- 117,
1630
- 116,
1631
- 104,
1632
- 111,
1633
- 114,
1634
- 105,
1635
- 116,
1636
- 121
1637
- ]
1638
- }
1639
- ]
1640
- }
1641
- },
1642
- {
1643
- "name": "cpi_program",
1644
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
1645
- },
1646
- {
1647
- "name": "glam_protocol_program",
1648
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1649
- },
1650
- {
1651
- "name": "system_program",
1652
- "address": "11111111111111111111111111111111"
1653
- },
1654
- {
1655
- "name": "state"
1656
- },
1657
- {
1658
- "name": "user",
1659
- "writable": true
1660
- }
1661
- ],
1662
- "args": [
1663
- {
1664
- "name": "params",
1665
- "type": {
1666
- "vec": {
1667
- "defined": {
1668
- "name": "OrderParams"
1669
- }
1670
- }
1671
- }
1672
- }
1673
- ]
1674
- },
1675
- {
1676
- "name": "place_perp_order",
1677
- "discriminator": [
1678
- 69,
1679
- 161,
1680
- 93,
1681
- 202,
1682
- 120,
1683
- 126,
1684
- 76,
1685
- 185
1686
- ],
1687
- "accounts": [
1688
- {
1689
- "name": "glam_state",
1690
- "writable": true
1691
- },
1692
- {
1693
- "name": "glam_vault",
1694
- "writable": true,
1695
- "pda": {
1696
- "seeds": [
1697
- {
1698
- "kind": "const",
1699
- "value": [
1700
- 118,
1701
- 97,
1702
- 117,
1703
- 108,
1704
- 116
1705
- ]
1706
- },
1707
- {
1708
- "kind": "account",
1709
- "path": "glam_state"
1710
- }
1711
- ],
1712
- "program": {
1713
- "kind": "account",
1714
- "path": "glam_protocol_program"
1715
- }
1716
- }
1717
- },
1718
- {
1719
- "name": "glam_signer",
1720
- "writable": true,
1721
- "signer": true
1722
- },
1723
- {
1724
- "name": "integration_authority",
1725
- "pda": {
1726
- "seeds": [
1727
- {
1728
- "kind": "const",
1729
- "value": [
1730
- 105,
1731
- 110,
1732
- 116,
1733
- 101,
1734
- 103,
1735
- 114,
1736
- 97,
1737
- 116,
1738
- 105,
1739
- 111,
1740
- 110,
1741
- 45,
1742
- 97,
1743
- 117,
1744
- 116,
1745
- 104,
1746
- 111,
1747
- 114,
1748
- 105,
1749
- 116,
1750
- 121
1751
- ]
1752
- }
1753
- ]
1754
- }
1755
- },
1756
- {
1757
- "name": "cpi_program",
1758
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
1759
- },
1760
- {
1761
- "name": "glam_protocol_program",
1762
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1763
- },
1764
- {
1765
- "name": "system_program",
1766
- "address": "11111111111111111111111111111111"
1767
- },
1768
- {
1769
- "name": "state"
1770
- },
1771
- {
1772
- "name": "user",
1773
- "writable": true
1774
- }
1775
- ],
1776
- "args": [
1777
- {
1778
- "name": "params",
1779
- "type": {
1780
- "defined": {
1781
- "name": "OrderParams"
1782
- }
1783
- }
1784
- }
1785
- ]
1786
- },
1787
- {
1788
- "name": "place_spot_order",
1789
- "discriminator": [
1790
- 45,
1791
- 79,
1792
- 81,
1793
- 160,
1794
- 248,
1795
- 90,
1796
- 91,
1797
- 220
1798
- ],
1799
- "accounts": [
1800
- {
1801
- "name": "glam_state",
1802
- "writable": true
1803
- },
1804
- {
1805
- "name": "glam_vault",
1806
- "writable": true,
1807
- "pda": {
1808
- "seeds": [
1809
- {
1810
- "kind": "const",
1811
- "value": [
1812
- 118,
1813
- 97,
1814
- 117,
1815
- 108,
1816
- 116
1817
- ]
1818
- },
1819
- {
1820
- "kind": "account",
1821
- "path": "glam_state"
1822
- }
1823
- ],
1824
- "program": {
1825
- "kind": "account",
1826
- "path": "glam_protocol_program"
1827
- }
1828
- }
1829
- },
1830
- {
1831
- "name": "glam_signer",
1832
- "writable": true,
1833
- "signer": true
1834
- },
1835
- {
1836
- "name": "integration_authority",
1837
- "pda": {
1838
- "seeds": [
1839
- {
1840
- "kind": "const",
1841
- "value": [
1842
- 105,
1843
- 110,
1844
- 116,
1845
- 101,
1846
- 103,
1847
- 114,
1848
- 97,
1849
- 116,
1850
- 105,
1851
- 111,
1852
- 110,
1853
- 45,
1854
- 97,
1855
- 117,
1856
- 116,
1857
- 104,
1858
- 111,
1859
- 114,
1860
- 105,
1861
- 116,
1862
- 121
1863
- ]
1864
- }
1865
- ]
1866
- }
1867
- },
1868
- {
1869
- "name": "cpi_program",
1870
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
1871
- },
1872
- {
1873
- "name": "glam_protocol_program",
1874
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1875
- },
1876
- {
1877
- "name": "system_program",
1878
- "address": "11111111111111111111111111111111"
1879
- },
1880
- {
1881
- "name": "state"
1882
- },
1883
- {
1884
- "name": "user",
1885
- "writable": true
1886
- }
1887
- ],
1888
- "args": [
1889
- {
1890
- "name": "params",
1891
- "type": {
1892
- "defined": {
1893
- "name": "OrderParams"
1894
- }
1895
- }
1896
- }
1897
- ]
1898
- },
1899
- {
1900
- "name": "reclaim_rent",
1901
- "discriminator": [
1902
- 218,
1903
- 200,
1904
- 19,
1905
- 197,
1906
- 227,
1907
- 89,
1908
- 192,
1909
- 22
1910
- ],
1911
- "accounts": [
1912
- {
1913
- "name": "glam_state",
1914
- "writable": true
1915
- },
1916
- {
1917
- "name": "glam_vault",
1918
- "writable": true,
1919
- "pda": {
1920
- "seeds": [
1921
- {
1922
- "kind": "const",
1923
- "value": [
1924
- 118,
1925
- 97,
1926
- 117,
1927
- 108,
1928
- 116
1929
- ]
1930
- },
1931
- {
1932
- "kind": "account",
1933
- "path": "glam_state"
1934
- }
1935
- ],
1936
- "program": {
1937
- "kind": "account",
1938
- "path": "glam_protocol_program"
1939
- }
1940
- }
1941
- },
1942
- {
1943
- "name": "glam_signer",
1944
- "writable": true,
1945
- "signer": true
1946
- },
1947
- {
1948
- "name": "integration_authority",
1949
- "pda": {
1950
- "seeds": [
1951
- {
1952
- "kind": "const",
1953
- "value": [
1954
- 105,
1955
- 110,
1956
- 116,
1957
- 101,
1958
- 103,
1959
- 114,
1960
- 97,
1961
- 116,
1962
- 105,
1963
- 111,
1964
- 110,
1965
- 45,
1966
- 97,
1967
- 117,
1968
- 116,
1969
- 104,
1970
- 111,
1971
- 114,
1972
- 105,
1973
- 116,
1974
- 121
1975
- ]
1976
- }
1977
- ]
1978
- }
1979
- },
1980
- {
1981
- "name": "cpi_program",
1982
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
1983
- },
1984
- {
1985
- "name": "glam_protocol_program",
1986
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
1987
- },
1988
- {
1989
- "name": "system_program",
1990
- "address": "11111111111111111111111111111111"
1991
- },
1992
- {
1993
- "name": "user",
1994
- "writable": true
1995
- },
1996
- {
1997
- "name": "user_stats",
1998
- "writable": true
1999
- },
2000
- {
2001
- "name": "state"
2002
- },
2003
- {
2004
- "name": "rent",
2005
- "address": "SysvarRent111111111111111111111111111111111"
2006
- }
2007
- ],
2008
- "args": []
2009
- },
2010
- {
2011
- "name": "set_drift_protocol_policy",
2012
- "discriminator": [
2013
- 200,
2014
- 22,
2015
- 110,
2016
- 2,
2017
- 58,
2018
- 22,
2019
- 76,
2020
- 162
2021
- ],
2022
- "accounts": [
2023
- {
2024
- "name": "glam_state",
2025
- "writable": true
2026
- },
2027
- {
2028
- "name": "glam_signer",
2029
- "writable": true,
2030
- "signer": true
2031
- },
2032
- {
2033
- "name": "glam_protocol_program",
2034
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2035
- }
2036
- ],
2037
- "args": [
2038
- {
2039
- "name": "policy",
2040
- "type": {
2041
- "defined": {
2042
- "name": "DriftProtocolPolicy"
2043
- }
2044
- }
2045
- }
2046
- ]
2047
- },
2048
- {
2049
- "name": "set_drift_vaults_policy",
2050
- "discriminator": [
2051
- 168,
2052
- 134,
2053
- 53,
2054
- 33,
2055
- 18,
2056
- 88,
2057
- 142,
2058
- 223
2059
- ],
2060
- "accounts": [
2061
- {
2062
- "name": "glam_state",
2063
- "writable": true
2064
- },
2065
- {
2066
- "name": "glam_signer",
2067
- "writable": true,
2068
- "signer": true
2069
- },
2070
- {
2071
- "name": "glam_protocol_program",
2072
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2073
- }
2074
- ],
2075
- "args": [
2076
- {
2077
- "name": "policy",
2078
- "type": {
2079
- "defined": {
2080
- "name": "DriftVaultsPolicy"
2081
- }
2082
- }
2083
- }
2084
- ]
2085
- },
2086
- {
2087
- "name": "settle_multiple_pnls",
2088
- "discriminator": [
2089
- 127,
2090
- 66,
2091
- 117,
2092
- 57,
2093
- 40,
2094
- 50,
2095
- 152,
2096
- 127
2097
- ],
2098
- "accounts": [
2099
- {
2100
- "name": "glam_state",
2101
- "writable": true
2102
- },
2103
- {
2104
- "name": "glam_vault",
2105
- "writable": true,
2106
- "pda": {
2107
- "seeds": [
2108
- {
2109
- "kind": "const",
2110
- "value": [
2111
- 118,
2112
- 97,
2113
- 117,
2114
- 108,
2115
- 116
2116
- ]
2117
- },
2118
- {
2119
- "kind": "account",
2120
- "path": "glam_state"
2121
- }
2122
- ],
2123
- "program": {
2124
- "kind": "account",
2125
- "path": "glam_protocol_program"
2126
- }
2127
- }
2128
- },
2129
- {
2130
- "name": "glam_signer",
2131
- "writable": true,
2132
- "signer": true
2133
- },
2134
- {
2135
- "name": "integration_authority",
2136
- "pda": {
2137
- "seeds": [
2138
- {
2139
- "kind": "const",
2140
- "value": [
2141
- 105,
2142
- 110,
2143
- 116,
2144
- 101,
2145
- 103,
2146
- 114,
2147
- 97,
2148
- 116,
2149
- 105,
2150
- 111,
2151
- 110,
2152
- 45,
2153
- 97,
2154
- 117,
2155
- 116,
2156
- 104,
2157
- 111,
2158
- 114,
2159
- 105,
2160
- 116,
2161
- 121
2162
- ]
2163
- }
2164
- ]
2165
- }
2166
- },
2167
- {
2168
- "name": "cpi_program",
2169
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
2170
- },
2171
- {
2172
- "name": "glam_protocol_program",
2173
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2174
- },
2175
- {
2176
- "name": "system_program",
2177
- "address": "11111111111111111111111111111111"
2178
- },
2179
- {
2180
- "name": "state"
2181
- },
2182
- {
2183
- "name": "user",
2184
- "writable": true
2185
- },
2186
- {
2187
- "name": "spot_market_vault"
2188
- }
2189
- ],
2190
- "args": [
2191
- {
2192
- "name": "market_indexes",
2193
- "type": {
2194
- "vec": "u16"
2195
- }
2196
- },
2197
- {
2198
- "name": "mode",
2199
- "type": {
2200
- "defined": {
2201
- "name": "SettlePnlMode"
2202
- }
2203
- }
2204
- }
2205
- ]
2206
- },
2207
- {
2208
- "name": "settle_pnl",
2209
- "discriminator": [
2210
- 43,
2211
- 61,
2212
- 234,
2213
- 45,
2214
- 15,
2215
- 95,
2216
- 152,
2217
- 153
2218
- ],
2219
- "accounts": [
2220
- {
2221
- "name": "glam_state",
2222
- "writable": true
2223
- },
2224
- {
2225
- "name": "glam_vault",
2226
- "writable": true,
2227
- "pda": {
2228
- "seeds": [
2229
- {
2230
- "kind": "const",
2231
- "value": [
2232
- 118,
2233
- 97,
2234
- 117,
2235
- 108,
2236
- 116
2237
- ]
2238
- },
2239
- {
2240
- "kind": "account",
2241
- "path": "glam_state"
2242
- }
2243
- ],
2244
- "program": {
2245
- "kind": "account",
2246
- "path": "glam_protocol_program"
2247
- }
2248
- }
2249
- },
2250
- {
2251
- "name": "glam_signer",
2252
- "writable": true,
2253
- "signer": true
2254
- },
2255
- {
2256
- "name": "integration_authority",
2257
- "pda": {
2258
- "seeds": [
2259
- {
2260
- "kind": "const",
2261
- "value": [
2262
- 105,
2263
- 110,
2264
- 116,
2265
- 101,
2266
- 103,
2267
- 114,
2268
- 97,
2269
- 116,
2270
- 105,
2271
- 111,
2272
- 110,
2273
- 45,
2274
- 97,
2275
- 117,
2276
- 116,
2277
- 104,
2278
- 111,
2279
- 114,
2280
- 105,
2281
- 116,
2282
- 121
2283
- ]
2284
- }
2285
- ]
2286
- }
2287
- },
2288
- {
2289
- "name": "cpi_program",
2290
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
2291
- },
2292
- {
2293
- "name": "glam_protocol_program",
2294
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2295
- },
2296
- {
2297
- "name": "system_program",
2298
- "address": "11111111111111111111111111111111"
2299
- },
2300
- {
2301
- "name": "state"
2302
- },
2303
- {
2304
- "name": "user",
2305
- "writable": true
2306
- },
2307
- {
2308
- "name": "spot_market_vault"
2309
- }
2310
- ],
2311
- "args": [
2312
- {
2313
- "name": "market_index",
2314
- "type": "u16"
2315
- }
2316
- ]
2317
- },
2318
- {
2319
- "name": "update_user_custom_margin_ratio",
2320
- "discriminator": [
2321
- 21,
2322
- 221,
2323
- 140,
2324
- 187,
2325
- 32,
2326
- 129,
2327
- 11,
2328
- 123
2329
- ],
2330
- "accounts": [
2331
- {
2332
- "name": "glam_state",
2333
- "writable": true
2334
- },
2335
- {
2336
- "name": "glam_vault",
2337
- "writable": true,
2338
- "pda": {
2339
- "seeds": [
2340
- {
2341
- "kind": "const",
2342
- "value": [
2343
- 118,
2344
- 97,
2345
- 117,
2346
- 108,
2347
- 116
2348
- ]
2349
- },
2350
- {
2351
- "kind": "account",
2352
- "path": "glam_state"
2353
- }
2354
- ],
2355
- "program": {
2356
- "kind": "account",
2357
- "path": "glam_protocol_program"
2358
- }
2359
- }
2360
- },
2361
- {
2362
- "name": "glam_signer",
2363
- "writable": true,
2364
- "signer": true
2365
- },
2366
- {
2367
- "name": "integration_authority",
2368
- "pda": {
2369
- "seeds": [
2370
- {
2371
- "kind": "const",
2372
- "value": [
2373
- 105,
2374
- 110,
2375
- 116,
2376
- 101,
2377
- 103,
2378
- 114,
2379
- 97,
2380
- 116,
2381
- 105,
2382
- 111,
2383
- 110,
2384
- 45,
2385
- 97,
2386
- 117,
2387
- 116,
2388
- 104,
2389
- 111,
2390
- 114,
2391
- 105,
2392
- 116,
2393
- 121
2394
- ]
2395
- }
2396
- ]
2397
- }
2398
- },
2399
- {
2400
- "name": "cpi_program",
2401
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
2402
- },
2403
- {
2404
- "name": "glam_protocol_program",
2405
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2406
- },
2407
- {
2408
- "name": "system_program",
2409
- "address": "11111111111111111111111111111111"
2410
- },
2411
- {
2412
- "name": "user",
2413
- "writable": true
2414
- }
2415
- ],
2416
- "args": [
2417
- {
2418
- "name": "sub_account_id",
2419
- "type": "u16"
2420
- },
2421
- {
2422
- "name": "margin_ratio",
2423
- "type": "u32"
2424
- }
2425
- ]
2426
- },
2427
- {
2428
- "name": "update_user_delegate",
2429
- "discriminator": [
2430
- 139,
2431
- 205,
2432
- 141,
2433
- 141,
2434
- 113,
2435
- 36,
2436
- 94,
2437
- 187
2438
- ],
2439
- "accounts": [
2440
- {
2441
- "name": "glam_state",
2442
- "writable": true
2443
- },
2444
- {
2445
- "name": "glam_vault",
2446
- "writable": true,
2447
- "pda": {
2448
- "seeds": [
2449
- {
2450
- "kind": "const",
2451
- "value": [
2452
- 118,
2453
- 97,
2454
- 117,
2455
- 108,
2456
- 116
2457
- ]
2458
- },
2459
- {
2460
- "kind": "account",
2461
- "path": "glam_state"
2462
- }
2463
- ],
2464
- "program": {
2465
- "kind": "account",
2466
- "path": "glam_protocol_program"
2467
- }
2468
- }
2469
- },
2470
- {
2471
- "name": "glam_signer",
2472
- "writable": true,
2473
- "signer": true
2474
- },
2475
- {
2476
- "name": "integration_authority",
2477
- "pda": {
2478
- "seeds": [
2479
- {
2480
- "kind": "const",
2481
- "value": [
2482
- 105,
2483
- 110,
2484
- 116,
2485
- 101,
2486
- 103,
2487
- 114,
2488
- 97,
2489
- 116,
2490
- 105,
2491
- 111,
2492
- 110,
2493
- 45,
2494
- 97,
2495
- 117,
2496
- 116,
2497
- 104,
2498
- 111,
2499
- 114,
2500
- 105,
2501
- 116,
2502
- 121
2503
- ]
2504
- }
2505
- ]
2506
- }
2507
- },
2508
- {
2509
- "name": "cpi_program",
2510
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
2511
- },
2512
- {
2513
- "name": "glam_protocol_program",
2514
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2515
- },
2516
- {
2517
- "name": "system_program",
2518
- "address": "11111111111111111111111111111111"
2519
- },
2520
- {
2521
- "name": "user",
2522
- "writable": true
2523
- }
2524
- ],
2525
- "args": [
2526
- {
2527
- "name": "sub_account_id",
2528
- "type": "u16"
2529
- },
2530
- {
2531
- "name": "delegate",
2532
- "type": "pubkey"
2533
- }
2534
- ]
2535
- },
2536
- {
2537
- "name": "update_user_margin_trading_enabled",
2538
- "discriminator": [
2539
- 194,
2540
- 92,
2541
- 204,
2542
- 223,
2543
- 246,
2544
- 188,
2545
- 31,
2546
- 203
2547
- ],
2548
- "accounts": [
2549
- {
2550
- "name": "glam_state",
2551
- "writable": true
2552
- },
2553
- {
2554
- "name": "glam_vault",
2555
- "writable": true,
2556
- "pda": {
2557
- "seeds": [
2558
- {
2559
- "kind": "const",
2560
- "value": [
2561
- 118,
2562
- 97,
2563
- 117,
2564
- 108,
2565
- 116
2566
- ]
2567
- },
2568
- {
2569
- "kind": "account",
2570
- "path": "glam_state"
2571
- }
2572
- ],
2573
- "program": {
2574
- "kind": "account",
2575
- "path": "glam_protocol_program"
2576
- }
2577
- }
2578
- },
2579
- {
2580
- "name": "glam_signer",
2581
- "writable": true,
2582
- "signer": true
2583
- },
2584
- {
2585
- "name": "integration_authority",
2586
- "pda": {
2587
- "seeds": [
2588
- {
2589
- "kind": "const",
2590
- "value": [
2591
- 105,
2592
- 110,
2593
- 116,
2594
- 101,
2595
- 103,
2596
- 114,
2597
- 97,
2598
- 116,
2599
- 105,
2600
- 111,
2601
- 110,
2602
- 45,
2603
- 97,
2604
- 117,
2605
- 116,
2606
- 104,
2607
- 111,
2608
- 114,
2609
- 105,
2610
- 116,
2611
- 121
2612
- ]
2613
- }
2614
- ]
2615
- }
2616
- },
2617
- {
2618
- "name": "cpi_program",
2619
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
2620
- },
2621
- {
2622
- "name": "glam_protocol_program",
2623
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2624
- },
2625
- {
2626
- "name": "system_program",
2627
- "address": "11111111111111111111111111111111"
2628
- },
2629
- {
2630
- "name": "user",
2631
- "writable": true
2632
- }
2633
- ],
2634
- "args": [
2635
- {
2636
- "name": "sub_account_id",
2637
- "type": "u16"
2638
- },
2639
- {
2640
- "name": "margin_trading_enabled",
2641
- "type": "bool"
2642
- }
2643
- ]
2644
- },
2645
- {
2646
- "name": "update_user_pool_id",
2647
- "discriminator": [
2648
- 219,
2649
- 86,
2650
- 73,
2651
- 106,
2652
- 56,
2653
- 218,
2654
- 128,
2655
- 109
2656
- ],
2657
- "accounts": [
2658
- {
2659
- "name": "glam_state",
2660
- "writable": true
2661
- },
2662
- {
2663
- "name": "glam_vault",
2664
- "writable": true,
2665
- "pda": {
2666
- "seeds": [
2667
- {
2668
- "kind": "const",
2669
- "value": [
2670
- 118,
2671
- 97,
2672
- 117,
2673
- 108,
2674
- 116
2675
- ]
2676
- },
2677
- {
2678
- "kind": "account",
2679
- "path": "glam_state"
2680
- }
2681
- ],
2682
- "program": {
2683
- "kind": "account",
2684
- "path": "glam_protocol_program"
2685
- }
2686
- }
2687
- },
2688
- {
2689
- "name": "glam_signer",
2690
- "writable": true,
2691
- "signer": true
2692
- },
2693
- {
2694
- "name": "integration_authority",
2695
- "pda": {
2696
- "seeds": [
2697
- {
2698
- "kind": "const",
2699
- "value": [
2700
- 105,
2701
- 110,
2702
- 116,
2703
- 101,
2704
- 103,
2705
- 114,
2706
- 97,
2707
- 116,
2708
- 105,
2709
- 111,
2710
- 110,
2711
- 45,
2712
- 97,
2713
- 117,
2714
- 116,
2715
- 104,
2716
- 111,
2717
- 114,
2718
- 105,
2719
- 116,
2720
- 121
2721
- ]
2722
- }
2723
- ]
2724
- }
2725
- },
2726
- {
2727
- "name": "cpi_program",
2728
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
2729
- },
2730
- {
2731
- "name": "glam_protocol_program",
2732
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2733
- },
2734
- {
2735
- "name": "system_program",
2736
- "address": "11111111111111111111111111111111"
2737
- },
2738
- {
2739
- "name": "user",
2740
- "writable": true
2741
- }
2742
- ],
2743
- "args": [
2744
- {
2745
- "name": "sub_account_id",
2746
- "type": "u16"
2747
- },
2748
- {
2749
- "name": "pool_id",
2750
- "type": "u8"
2751
- }
2752
- ]
2753
- },
2754
- {
2755
- "name": "vaults_cancel_request_withdraw",
2756
- "discriminator": [
2757
- 188,
2758
- 93,
2759
- 159,
2760
- 202,
2761
- 157,
2762
- 47,
2763
- 143,
2764
- 219
2765
- ],
2766
- "accounts": [
2767
- {
2768
- "name": "glam_state",
2769
- "writable": true
2770
- },
2771
- {
2772
- "name": "glam_vault",
2773
- "writable": true,
2774
- "pda": {
2775
- "seeds": [
2776
- {
2777
- "kind": "const",
2778
- "value": [
2779
- 118,
2780
- 97,
2781
- 117,
2782
- 108,
2783
- 116
2784
- ]
2785
- },
2786
- {
2787
- "kind": "account",
2788
- "path": "glam_state"
2789
- }
2790
- ],
2791
- "program": {
2792
- "kind": "account",
2793
- "path": "glam_protocol_program"
2794
- }
2795
- }
2796
- },
2797
- {
2798
- "name": "glam_signer",
2799
- "writable": true,
2800
- "signer": true
2801
- },
2802
- {
2803
- "name": "integration_authority",
2804
- "pda": {
2805
- "seeds": [
2806
- {
2807
- "kind": "const",
2808
- "value": [
2809
- 105,
2810
- 110,
2811
- 116,
2812
- 101,
2813
- 103,
2814
- 114,
2815
- 97,
2816
- 116,
2817
- 105,
2818
- 111,
2819
- 110,
2820
- 45,
2821
- 97,
2822
- 117,
2823
- 116,
2824
- 104,
2825
- 111,
2826
- 114,
2827
- 105,
2828
- 116,
2829
- 121
2830
- ]
2831
- }
2832
- ]
2833
- }
2834
- },
2835
- {
2836
- "name": "cpi_program",
2837
- "address": "vAuLTsyrvSfZRuRB3XgvkPwNGgYSs9YRYymVebLKoxR"
2838
- },
2839
- {
2840
- "name": "glam_protocol_program",
2841
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2842
- },
2843
- {
2844
- "name": "system_program",
2845
- "address": "11111111111111111111111111111111"
2846
- },
2847
- {
2848
- "name": "vault",
2849
- "writable": true
2850
- },
2851
- {
2852
- "name": "vault_depositor",
2853
- "writable": true
2854
- },
2855
- {
2856
- "name": "drift_user_stats"
2857
- },
2858
- {
2859
- "name": "drift_user"
2860
- }
2861
- ],
2862
- "args": []
2863
- },
2864
- {
2865
- "name": "vaults_deposit",
2866
- "discriminator": [
2867
- 124,
2868
- 173,
2869
- 191,
2870
- 223,
2871
- 48,
2872
- 26,
2873
- 84,
2874
- 84
2875
- ],
2876
- "accounts": [
2877
- {
2878
- "name": "glam_state",
2879
- "writable": true
2880
- },
2881
- {
2882
- "name": "glam_vault",
2883
- "writable": true,
2884
- "pda": {
2885
- "seeds": [
2886
- {
2887
- "kind": "const",
2888
- "value": [
2889
- 118,
2890
- 97,
2891
- 117,
2892
- 108,
2893
- 116
2894
- ]
2895
- },
2896
- {
2897
- "kind": "account",
2898
- "path": "glam_state"
2899
- }
2900
- ],
2901
- "program": {
2902
- "kind": "account",
2903
- "path": "glam_protocol_program"
2904
- }
2905
- }
2906
- },
2907
- {
2908
- "name": "glam_signer",
2909
- "writable": true,
2910
- "signer": true
2911
- },
2912
- {
2913
- "name": "integration_authority",
2914
- "pda": {
2915
- "seeds": [
2916
- {
2917
- "kind": "const",
2918
- "value": [
2919
- 105,
2920
- 110,
2921
- 116,
2922
- 101,
2923
- 103,
2924
- 114,
2925
- 97,
2926
- 116,
2927
- 105,
2928
- 111,
2929
- 110,
2930
- 45,
2931
- 97,
2932
- 117,
2933
- 116,
2934
- 104,
2935
- 111,
2936
- 114,
2937
- 105,
2938
- 116,
2939
- 121
2940
- ]
2941
- }
2942
- ]
2943
- }
2944
- },
2945
- {
2946
- "name": "cpi_program",
2947
- "address": "vAuLTsyrvSfZRuRB3XgvkPwNGgYSs9YRYymVebLKoxR"
2948
- },
2949
- {
2950
- "name": "glam_protocol_program",
2951
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
2952
- },
2953
- {
2954
- "name": "system_program",
2955
- "address": "11111111111111111111111111111111"
2956
- },
2957
- {
2958
- "name": "vault",
2959
- "writable": true
2960
- },
2961
- {
2962
- "name": "vault_depositor",
2963
- "writable": true
2964
- },
2965
- {
2966
- "name": "vault_token_account",
2967
- "writable": true
2968
- },
2969
- {
2970
- "name": "drift_user_stats",
2971
- "writable": true
2972
- },
2973
- {
2974
- "name": "drift_user",
2975
- "writable": true
2976
- },
2977
- {
2978
- "name": "drift_state"
2979
- },
2980
- {
2981
- "name": "drift_spot_market_vault",
2982
- "writable": true
2983
- },
2984
- {
2985
- "name": "user_token_account",
2986
- "writable": true
2987
- },
2988
- {
2989
- "name": "drift_program"
2990
- },
2991
- {
2992
- "name": "token_program"
2993
- }
2994
- ],
2995
- "args": [
2996
- {
2997
- "name": "amount",
2998
- "type": "u64"
2999
- }
3000
- ]
3001
- },
3002
- {
3003
- "name": "vaults_initialize_vault_depositor",
3004
- "discriminator": [
3005
- 135,
3006
- 5,
3007
- 41,
3008
- 254,
3009
- 229,
3010
- 75,
3011
- 138,
3012
- 49
3013
- ],
3014
- "accounts": [
3015
- {
3016
- "name": "glam_state",
3017
- "writable": true
3018
- },
3019
- {
3020
- "name": "glam_vault",
3021
- "writable": true,
3022
- "pda": {
3023
- "seeds": [
3024
- {
3025
- "kind": "const",
3026
- "value": [
3027
- 118,
3028
- 97,
3029
- 117,
3030
- 108,
3031
- 116
3032
- ]
3033
- },
3034
- {
3035
- "kind": "account",
3036
- "path": "glam_state"
3037
- }
3038
- ],
3039
- "program": {
3040
- "kind": "account",
3041
- "path": "glam_protocol_program"
3042
- }
3043
- }
3044
- },
3045
- {
3046
- "name": "glam_signer",
3047
- "writable": true,
3048
- "signer": true
3049
- },
3050
- {
3051
- "name": "integration_authority",
3052
- "pda": {
3053
- "seeds": [
3054
- {
3055
- "kind": "const",
3056
- "value": [
3057
- 105,
3058
- 110,
3059
- 116,
3060
- 101,
3061
- 103,
3062
- 114,
3063
- 97,
3064
- 116,
3065
- 105,
3066
- 111,
3067
- 110,
3068
- 45,
3069
- 97,
3070
- 117,
3071
- 116,
3072
- 104,
3073
- 111,
3074
- 114,
3075
- 105,
3076
- 116,
3077
- 121
3078
- ]
3079
- }
3080
- ]
3081
- }
3082
- },
3083
- {
3084
- "name": "cpi_program",
3085
- "address": "vAuLTsyrvSfZRuRB3XgvkPwNGgYSs9YRYymVebLKoxR"
3086
- },
3087
- {
3088
- "name": "glam_protocol_program",
3089
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
3090
- },
3091
- {
3092
- "name": "vault"
3093
- },
3094
- {
3095
- "name": "vault_depositor",
3096
- "writable": true
3097
- },
3098
- {
3099
- "name": "rent",
3100
- "address": "SysvarRent111111111111111111111111111111111"
3101
- },
3102
- {
3103
- "name": "system_program",
3104
- "address": "11111111111111111111111111111111"
3105
- }
3106
- ],
3107
- "args": []
3108
- },
3109
- {
3110
- "name": "vaults_request_withdraw",
3111
- "discriminator": [
3112
- 138,
3113
- 91,
3114
- 50,
3115
- 130,
3116
- 167,
3117
- 165,
3118
- 120,
3119
- 175
3120
- ],
3121
- "accounts": [
3122
- {
3123
- "name": "glam_state",
3124
- "writable": true
3125
- },
3126
- {
3127
- "name": "glam_vault",
3128
- "writable": true,
3129
- "pda": {
3130
- "seeds": [
3131
- {
3132
- "kind": "const",
3133
- "value": [
3134
- 118,
3135
- 97,
3136
- 117,
3137
- 108,
3138
- 116
3139
- ]
3140
- },
3141
- {
3142
- "kind": "account",
3143
- "path": "glam_state"
3144
- }
3145
- ],
3146
- "program": {
3147
- "kind": "account",
3148
- "path": "glam_protocol_program"
3149
- }
3150
- }
3151
- },
3152
- {
3153
- "name": "glam_signer",
3154
- "writable": true,
3155
- "signer": true
3156
- },
3157
- {
3158
- "name": "integration_authority",
3159
- "pda": {
3160
- "seeds": [
3161
- {
3162
- "kind": "const",
3163
- "value": [
3164
- 105,
3165
- 110,
3166
- 116,
3167
- 101,
3168
- 103,
3169
- 114,
3170
- 97,
3171
- 116,
3172
- 105,
3173
- 111,
3174
- 110,
3175
- 45,
3176
- 97,
3177
- 117,
3178
- 116,
3179
- 104,
3180
- 111,
3181
- 114,
3182
- 105,
3183
- 116,
3184
- 121
3185
- ]
3186
- }
3187
- ]
3188
- }
3189
- },
3190
- {
3191
- "name": "cpi_program",
3192
- "address": "vAuLTsyrvSfZRuRB3XgvkPwNGgYSs9YRYymVebLKoxR"
3193
- },
3194
- {
3195
- "name": "glam_protocol_program",
3196
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
3197
- },
3198
- {
3199
- "name": "system_program",
3200
- "address": "11111111111111111111111111111111"
3201
- },
3202
- {
3203
- "name": "vault",
3204
- "writable": true
3205
- },
3206
- {
3207
- "name": "vault_depositor",
3208
- "writable": true
3209
- },
3210
- {
3211
- "name": "drift_user_stats"
3212
- },
3213
- {
3214
- "name": "drift_user"
3215
- }
3216
- ],
3217
- "args": [
3218
- {
3219
- "name": "withdraw_amount",
3220
- "type": "u64"
3221
- },
3222
- {
3223
- "name": "withdraw_unit",
3224
- "type": {
3225
- "defined": {
3226
- "name": "WithdrawUnit"
3227
- }
3228
- }
3229
- }
3230
- ]
3231
- },
3232
- {
3233
- "name": "vaults_withdraw",
3234
- "discriminator": [
3235
- 12,
3236
- 8,
3237
- 236,
3238
- 92,
3239
- 134,
3240
- 144,
3241
- 196,
3242
- 87
3243
- ],
3244
- "accounts": [
3245
- {
3246
- "name": "glam_state",
3247
- "writable": true
3248
- },
3249
- {
3250
- "name": "glam_vault",
3251
- "writable": true,
3252
- "pda": {
3253
- "seeds": [
3254
- {
3255
- "kind": "const",
3256
- "value": [
3257
- 118,
3258
- 97,
3259
- 117,
3260
- 108,
3261
- 116
3262
- ]
3263
- },
3264
- {
3265
- "kind": "account",
3266
- "path": "glam_state"
3267
- }
3268
- ],
3269
- "program": {
3270
- "kind": "account",
3271
- "path": "glam_protocol_program"
3272
- }
3273
- }
3274
- },
3275
- {
3276
- "name": "glam_signer",
3277
- "writable": true,
3278
- "signer": true
3279
- },
3280
- {
3281
- "name": "integration_authority",
3282
- "pda": {
3283
- "seeds": [
3284
- {
3285
- "kind": "const",
3286
- "value": [
3287
- 105,
3288
- 110,
3289
- 116,
3290
- 101,
3291
- 103,
3292
- 114,
3293
- 97,
3294
- 116,
3295
- 105,
3296
- 111,
3297
- 110,
3298
- 45,
3299
- 97,
3300
- 117,
3301
- 116,
3302
- 104,
3303
- 111,
3304
- 114,
3305
- 105,
3306
- 116,
3307
- 121
3308
- ]
3309
- }
3310
- ]
3311
- }
3312
- },
3313
- {
3314
- "name": "cpi_program",
3315
- "address": "vAuLTsyrvSfZRuRB3XgvkPwNGgYSs9YRYymVebLKoxR"
3316
- },
3317
- {
3318
- "name": "glam_protocol_program",
3319
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
3320
- },
3321
- {
3322
- "name": "system_program",
3323
- "address": "11111111111111111111111111111111"
3324
- },
3325
- {
3326
- "name": "vault",
3327
- "writable": true
3328
- },
3329
- {
3330
- "name": "vault_depositor",
3331
- "writable": true
3332
- },
3333
- {
3334
- "name": "vault_token_account",
3335
- "writable": true
3336
- },
3337
- {
3338
- "name": "drift_user_stats",
3339
- "writable": true
3340
- },
3341
- {
3342
- "name": "drift_user",
3343
- "writable": true
3344
- },
3345
- {
3346
- "name": "drift_state"
3347
- },
3348
- {
3349
- "name": "drift_spot_market_vault",
3350
- "writable": true
3351
- },
3352
- {
3353
- "name": "drift_signer"
3354
- },
3355
- {
3356
- "name": "user_token_account",
3357
- "writable": true
3358
- },
3359
- {
3360
- "name": "drift_program"
3361
- },
3362
- {
3363
- "name": "token_program"
3364
- }
3365
- ],
3366
- "args": []
3367
- },
3368
- {
3369
- "name": "withdraw",
3370
- "discriminator": [
3371
- 183,
3372
- 18,
3373
- 70,
3374
- 156,
3375
- 148,
3376
- 109,
3377
- 161,
3378
- 34
3379
- ],
3380
- "accounts": [
3381
- {
3382
- "name": "glam_state",
3383
- "writable": true
3384
- },
3385
- {
3386
- "name": "glam_vault",
3387
- "writable": true,
3388
- "pda": {
3389
- "seeds": [
3390
- {
3391
- "kind": "const",
3392
- "value": [
3393
- 118,
3394
- 97,
3395
- 117,
3396
- 108,
3397
- 116
3398
- ]
3399
- },
3400
- {
3401
- "kind": "account",
3402
- "path": "glam_state"
3403
- }
3404
- ],
3405
- "program": {
3406
- "kind": "account",
3407
- "path": "glam_protocol_program"
3408
- }
3409
- }
3410
- },
3411
- {
3412
- "name": "glam_signer",
3413
- "writable": true,
3414
- "signer": true
3415
- },
3416
- {
3417
- "name": "integration_authority",
3418
- "pda": {
3419
- "seeds": [
3420
- {
3421
- "kind": "const",
3422
- "value": [
3423
- 105,
3424
- 110,
3425
- 116,
3426
- 101,
3427
- 103,
3428
- 114,
3429
- 97,
3430
- 116,
3431
- 105,
3432
- 111,
3433
- 110,
3434
- 45,
3435
- 97,
3436
- 117,
3437
- 116,
3438
- 104,
3439
- 111,
3440
- 114,
3441
- 105,
3442
- 116,
3443
- 121
3444
- ]
3445
- }
3446
- ]
3447
- }
3448
- },
3449
- {
3450
- "name": "cpi_program",
3451
- "address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
3452
- },
3453
- {
3454
- "name": "glam_protocol_program",
3455
- "address": "GLAMpaME8wdTEzxtiYEAa5yD8fZbxZiz2hNtV58RZiEz"
3456
- },
3457
- {
3458
- "name": "system_program",
3459
- "address": "11111111111111111111111111111111"
3460
- },
3461
- {
3462
- "name": "state"
3463
- },
3464
- {
3465
- "name": "user",
3466
- "writable": true
3467
- },
3468
- {
3469
- "name": "user_stats",
3470
- "writable": true
3471
- },
3472
- {
3473
- "name": "spot_market_vault",
3474
- "writable": true
3475
- },
3476
- {
3477
- "name": "drift_signer"
3478
- },
3479
- {
3480
- "name": "user_token_account",
3481
- "writable": true
3482
- },
3483
- {
3484
- "name": "token_program"
3485
- }
3486
- ],
3487
- "args": [
3488
- {
3489
- "name": "market_index",
3490
- "type": "u16"
3491
- },
3492
- {
3493
- "name": "amount",
3494
- "type": "u64"
3495
- },
3496
- {
3497
- "name": "reduce_only",
3498
- "type": "bool"
3499
- }
3500
- ]
3501
- }
3502
- ],
3503
- "accounts": [
3504
- {
3505
- "name": "StateAccount",
3506
- "discriminator": [
3507
- 142,
3508
- 247,
3509
- 54,
3510
- 95,
3511
- 85,
3512
- 133,
3513
- 249,
3514
- 103
3515
- ]
3516
- }
3517
- ],
3518
- "types": [
3519
- {
3520
- "name": "AccountType",
3521
- "type": {
3522
- "kind": "enum",
3523
- "variants": [
3524
- {
3525
- "name": "Vault"
3526
- },
3527
- {
3528
- "name": "TokenizedVault"
3529
- },
3530
- {
3531
- "name": "Mint"
3532
- },
3533
- {
3534
- "name": "SingleAssetVault"
3535
- }
3536
- ]
3537
- }
3538
- },
3539
- {
3540
- "name": "AccruedFees",
3541
- "type": {
3542
- "kind": "struct",
3543
- "fields": [
3544
- {
3545
- "name": "vault_subscription_fee",
3546
- "type": "u128"
3547
- },
3548
- {
3549
- "name": "vault_redemption_fee",
3550
- "type": "u128"
3551
- },
3552
- {
3553
- "name": "manager_subscription_fee",
3554
- "type": "u128"
3555
- },
3556
- {
3557
- "name": "manager_redemption_fee",
3558
- "type": "u128"
3559
- },
3560
- {
3561
- "name": "management_fee",
3562
- "type": "u128"
3563
- },
3564
- {
3565
- "name": "performance_fee",
3566
- "type": "u128"
3567
- },
3568
- {
3569
- "name": "protocol_base_fee",
3570
- "type": "u128"
3571
- },
3572
- {
3573
- "name": "protocol_flow_fee",
3574
- "type": "u128"
3575
- }
3576
- ]
3577
- }
3578
- },
3579
- {
3580
- "name": "CreatedModel",
3581
- "type": {
3582
- "kind": "struct",
3583
- "fields": [
3584
- {
3585
- "name": "key",
3586
- "type": {
3587
- "array": [
3588
- "u8",
3589
- 8
3590
- ]
3591
- }
3592
- },
3593
- {
3594
- "name": "created_by",
3595
- "type": "pubkey"
3596
- },
3597
- {
3598
- "name": "created_at",
3599
- "type": "i64"
3600
- }
3601
- ]
3602
- }
3603
- },
3604
- {
3605
- "name": "DelegateAcl",
3606
- "type": {
3607
- "kind": "struct",
3608
- "fields": [
3609
- {
3610
- "name": "pubkey",
3611
- "type": "pubkey"
3612
- },
3613
- {
3614
- "name": "integration_permissions",
3615
- "type": {
3616
- "vec": {
3617
- "defined": {
3618
- "name": "IntegrationPermissions"
3619
- }
3620
- }
3621
- }
3622
- },
3623
- {
3624
- "name": "expires_at",
3625
- "type": "i64"
3626
- }
3627
- ]
3628
- }
3629
- },
3630
- {
3631
- "name": "DriftProtocolPolicy",
3632
- "type": {
3633
- "kind": "struct",
3634
- "fields": [
3635
- {
3636
- "name": "spot_markets_allowlist",
3637
- "type": {
3638
- "vec": "u16"
3639
- }
3640
- },
3641
- {
3642
- "name": "perp_markets_allowlist",
3643
- "type": {
3644
- "vec": "u16"
3645
- }
3646
- },
3647
- {
3648
- "name": "borrow_allowlist",
3649
- "type": {
3650
- "vec": "pubkey"
3651
- }
3652
- },
3653
- {
3654
- "name": "order_price_tolerance_bps",
3655
- "type": "u16"
3656
- }
3657
- ]
3658
- }
3659
- },
3660
- {
3661
- "name": "DriftVaultsPolicy",
3662
- "type": {
3663
- "kind": "struct",
3664
- "fields": [
3665
- {
3666
- "name": "vaults_allowlist",
3667
- "type": {
3668
- "vec": "pubkey"
3669
- }
3670
- }
3671
- ]
3672
- }
3673
- },
3674
- {
3675
- "name": "EngineField",
3676
- "type": {
3677
- "kind": "struct",
3678
- "fields": [
3679
- {
3680
- "name": "name",
3681
- "type": {
3682
- "defined": {
3683
- "name": "EngineFieldName"
3684
- }
3685
- }
3686
- },
3687
- {
3688
- "name": "value",
3689
- "type": {
3690
- "defined": {
3691
- "name": "EngineFieldValue"
3692
- }
3693
- }
3694
- }
3695
- ]
3696
- }
3697
- },
3698
- {
3699
- "name": "EngineFieldName",
3700
- "type": {
3701
- "kind": "enum",
3702
- "variants": [
3703
- {
3704
- "name": "Owner"
3705
- },
3706
- {
3707
- "name": "PortfolioManagerName"
3708
- },
3709
- {
3710
- "name": "Name"
3711
- },
3712
- {
3713
- "name": "Uri"
3714
- },
3715
- {
3716
- "name": "Assets"
3717
- },
3718
- {
3719
- "name": "DelegateAcls"
3720
- },
3721
- {
3722
- "name": "IntegrationAcls"
3723
- },
3724
- {
3725
- "name": "TimelockDuration"
3726
- },
3727
- {
3728
- "name": "Borrowable"
3729
- },
3730
- {
3731
- "name": "DefaultAccountStateFrozen"
3732
- },
3733
- {
3734
- "name": "PermanentDelegate"
3735
- },
3736
- {
3737
- "name": "NotifyAndSettle"
3738
- },
3739
- {
3740
- "name": "FeeStructure"
3741
- },
3742
- {
3743
- "name": "FeeParams"
3744
- },
3745
- {
3746
- "name": "ClaimableFees"
3747
- },
3748
- {
3749
- "name": "ClaimedFees"
3750
- },
3751
- {
3752
- "name": "OracleConfigs"
3753
- }
3754
- ]
3755
- }
3756
- },
3757
- {
3758
- "name": "EngineFieldValue",
3759
- "type": {
3760
- "kind": "enum",
3761
- "variants": [
3762
- {
3763
- "name": "Boolean",
3764
- "fields": [
3765
- {
3766
- "name": "val",
3767
- "type": "bool"
3768
- }
3769
- ]
3770
- },
3771
- {
3772
- "name": "U8",
3773
- "fields": [
3774
- {
3775
- "name": "val",
3776
- "type": "u8"
3777
- }
3778
- ]
3779
- },
3780
- {
3781
- "name": "U32",
3782
- "fields": [
3783
- {
3784
- "name": "val",
3785
- "type": "u32"
3786
- }
3787
- ]
3788
- },
3789
- {
3790
- "name": "U64",
3791
- "fields": [
3792
- {
3793
- "name": "val",
3794
- "type": "u64"
3795
- }
3796
- ]
3797
- },
3798
- {
3799
- "name": "String",
3800
- "fields": [
3801
- {
3802
- "name": "val",
3803
- "type": "string"
3804
- }
3805
- ]
3806
- },
3807
- {
3808
- "name": "Pubkey",
3809
- "fields": [
3810
- {
3811
- "name": "val",
3812
- "type": "pubkey"
3813
- }
3814
- ]
3815
- },
3816
- {
3817
- "name": "VecPubkey",
3818
- "fields": [
3819
- {
3820
- "name": "val",
3821
- "type": {
3822
- "vec": "pubkey"
3823
- }
3824
- }
3825
- ]
3826
- },
3827
- {
3828
- "name": "VecU8",
3829
- "fields": [
3830
- {
3831
- "name": "val",
3832
- "type": "bytes"
3833
- }
3834
- ]
3835
- },
3836
- {
3837
- "name": "VecU32",
3838
- "fields": [
3839
- {
3840
- "name": "val",
3841
- "type": {
3842
- "vec": "u32"
3843
- }
3844
- }
3845
- ]
3846
- },
3847
- {
3848
- "name": "VecDelegateAcl",
3849
- "fields": [
3850
- {
3851
- "name": "val",
3852
- "type": {
3853
- "vec": {
3854
- "defined": {
3855
- "name": "DelegateAcl"
3856
- }
3857
- }
3858
- }
3859
- }
3860
- ]
3861
- },
3862
- {
3863
- "name": "VecIntegrationAcl",
3864
- "fields": [
3865
- {
3866
- "name": "val",
3867
- "type": {
3868
- "vec": {
3869
- "defined": {
3870
- "name": "IntegrationAcl"
3871
- }
3872
- }
3873
- }
3874
- }
3875
- ]
3876
- },
3877
- {
3878
- "name": "FeeStructure",
3879
- "fields": [
3880
- {
3881
- "name": "val",
3882
- "type": {
3883
- "defined": {
3884
- "name": "FeeStructure"
3885
- }
3886
- }
3887
- }
3888
- ]
3889
- },
3890
- {
3891
- "name": "FeeParams",
3892
- "fields": [
3893
- {
3894
- "name": "val",
3895
- "type": {
3896
- "defined": {
3897
- "name": "FeeParams"
3898
- }
3899
- }
3900
- }
3901
- ]
3902
- },
3903
- {
3904
- "name": "AccruedFees",
3905
- "fields": [
3906
- {
3907
- "name": "val",
3908
- "type": {
3909
- "defined": {
3910
- "name": "AccruedFees"
3911
- }
3912
- }
3913
- }
3914
- ]
3915
- },
3916
- {
3917
- "name": "NotifyAndSettle",
3918
- "fields": [
3919
- {
3920
- "name": "val",
3921
- "type": {
3922
- "defined": {
3923
- "name": "NotifyAndSettle"
3924
- }
3925
- }
3926
- }
3927
- ]
3928
- },
3929
- {
3930
- "name": "OracleConfigs",
3931
- "fields": [
3932
- {
3933
- "name": "val",
3934
- "type": {
3935
- "defined": {
3936
- "name": "OracleConfigs"
3937
- }
3938
- }
3939
- }
3940
- ]
3941
- }
3942
- ]
3943
- }
3944
- },
3945
- {
3946
- "name": "EntryExitFees",
3947
- "type": {
3948
- "kind": "struct",
3949
- "fields": [
3950
- {
3951
- "name": "subscription_fee_bps",
3952
- "type": "u16"
3953
- },
3954
- {
3955
- "name": "redemption_fee_bps",
3956
- "type": "u16"
3957
- }
3958
- ]
3959
- }
3960
- },
3961
- {
3962
- "name": "FeeParams",
3963
- "type": {
3964
- "kind": "struct",
3965
- "fields": [
3966
- {
3967
- "name": "year_in_seconds",
3968
- "type": "u32"
3969
- },
3970
- {
3971
- "name": "pa_high_water_mark",
3972
- "type": "i128"
3973
- },
3974
- {
3975
- "name": "pa_last_nav",
3976
- "type": "i128"
3977
- },
3978
- {
3979
- "name": "last_aum",
3980
- "type": "i128"
3981
- },
3982
- {
3983
- "name": "last_performance_fee_crystallized",
3984
- "type": "i64"
3985
- },
3986
- {
3987
- "name": "last_management_fee_crystallized",
3988
- "type": "i64"
3989
- },
3990
- {
3991
- "name": "last_protocol_fee_crystallized",
3992
- "type": "i64"
3993
- }
3994
- ]
3995
- }
3996
- },
3997
- {
3998
- "name": "FeeStructure",
3999
- "type": {
4000
- "kind": "struct",
4001
- "fields": [
4002
- {
4003
- "name": "vault",
4004
- "type": {
4005
- "defined": {
4006
- "name": "EntryExitFees"
4007
- }
4008
- }
4009
- },
4010
- {
4011
- "name": "manager",
4012
- "type": {
4013
- "defined": {
4014
- "name": "EntryExitFees"
4015
- }
4016
- }
4017
- },
4018
- {
4019
- "name": "management",
4020
- "type": {
4021
- "defined": {
4022
- "name": "ManagementFee"
4023
- }
4024
- }
4025
- },
4026
- {
4027
- "name": "performance",
4028
- "type": {
4029
- "defined": {
4030
- "name": "PerformanceFee"
4031
- }
4032
- }
4033
- },
4034
- {
4035
- "name": "protocol",
4036
- "type": {
4037
- "defined": {
4038
- "name": "ProtocolFees"
4039
- }
4040
- }
4041
- }
4042
- ]
4043
- }
4044
- },
4045
- {
4046
- "name": "HurdleType",
4047
- "type": {
4048
- "kind": "enum",
4049
- "variants": [
4050
- {
4051
- "name": "Hard"
4052
- },
4053
- {
4054
- "name": "Soft"
4055
- }
4056
- ]
4057
- }
4058
- },
4059
- {
4060
- "name": "IntegrationAcl",
4061
- "docs": [
4062
- "An integration program can have multiple protocols supported.",
4063
- "Enabled protocols are stored in a bitmask, and each protocol can have its own policy."
4064
- ],
4065
- "type": {
4066
- "kind": "struct",
4067
- "fields": [
4068
- {
4069
- "name": "integration_program",
4070
- "type": "pubkey"
4071
- },
4072
- {
4073
- "name": "protocols_bitmask",
4074
- "type": "u16"
4075
- },
4076
- {
4077
- "name": "protocol_policies",
4078
- "type": {
4079
- "vec": {
4080
- "defined": {
4081
- "name": "ProtocolPolicy"
4082
- }
4083
- }
4084
- }
4085
- }
4086
- ]
4087
- }
4088
- },
4089
- {
4090
- "name": "IntegrationPermissions",
4091
- "docs": [
4092
- "Stores delegate permissions for an integration program."
4093
- ],
4094
- "type": {
4095
- "kind": "struct",
4096
- "fields": [
4097
- {
4098
- "name": "integration_program",
4099
- "type": "pubkey"
4100
- },
4101
- {
4102
- "name": "protocol_permissions",
4103
- "type": {
4104
- "vec": {
4105
- "defined": {
4106
- "name": "ProtocolPermissions"
4107
- }
4108
- }
4109
- }
4110
- }
4111
- ]
4112
- }
4113
- },
4114
- {
4115
- "name": "ManagementFee",
4116
- "type": {
4117
- "kind": "struct",
4118
- "fields": [
4119
- {
4120
- "name": "fee_bps",
4121
- "type": "u16"
4122
- }
4123
- ]
4124
- }
4125
- },
4126
- {
4127
- "name": "MarketType",
4128
- "type": {
4129
- "kind": "enum",
4130
- "variants": [
4131
- {
4132
- "name": "Spot"
4133
- },
4134
- {
4135
- "name": "Perp"
4136
- }
4137
- ]
4138
- }
4139
- },
4140
- {
4141
- "name": "ModifyOrderParams",
4142
- "type": {
4143
- "kind": "struct",
4144
- "fields": [
4145
- {
4146
- "name": "direction",
4147
- "type": {
4148
- "option": {
4149
- "defined": {
4150
- "name": "PositionDirection"
4151
- }
4152
- }
4153
- }
4154
- },
4155
- {
4156
- "name": "base_asset_amount",
4157
- "type": {
4158
- "option": "u64"
4159
- }
4160
- },
4161
- {
4162
- "name": "price",
4163
- "type": {
4164
- "option": "u64"
4165
- }
4166
- },
4167
- {
4168
- "name": "reduce_only",
4169
- "type": {
4170
- "option": "bool"
4171
- }
4172
- },
4173
- {
4174
- "name": "post_only",
4175
- "type": {
4176
- "option": {
4177
- "defined": {
4178
- "name": "PostOnlyParam"
4179
- }
4180
- }
4181
- }
4182
- },
4183
- {
4184
- "name": "bit_flags",
4185
- "type": {
4186
- "option": "u8"
4187
- }
4188
- },
4189
- {
4190
- "name": "max_ts",
4191
- "type": {
4192
- "option": "i64"
4193
- }
4194
- },
4195
- {
4196
- "name": "trigger_price",
4197
- "type": {
4198
- "option": "u64"
4199
- }
4200
- },
4201
- {
4202
- "name": "trigger_condition",
4203
- "type": {
4204
- "option": {
4205
- "defined": {
4206
- "name": "OrderTriggerCondition"
4207
- }
4208
- }
4209
- }
4210
- },
4211
- {
4212
- "name": "oracle_price_offset",
4213
- "type": {
4214
- "option": "i32"
4215
- }
4216
- },
4217
- {
4218
- "name": "auction_duration",
4219
- "type": {
4220
- "option": "u8"
4221
- }
4222
- },
4223
- {
4224
- "name": "auction_start_price",
4225
- "type": {
4226
- "option": "i64"
4227
- }
4228
- },
4229
- {
4230
- "name": "auction_end_price",
4231
- "type": {
4232
- "option": "i64"
4233
- }
4234
- },
4235
- {
4236
- "name": "policy",
4237
- "type": {
4238
- "option": "u8"
4239
- }
4240
- }
4241
- ]
4242
- }
4243
- },
4244
- {
4245
- "name": "NoticePeriodType",
4246
- "type": {
4247
- "kind": "enum",
4248
- "variants": [
4249
- {
4250
- "name": "Hard"
4251
- },
4252
- {
4253
- "name": "Soft"
4254
- }
4255
- ]
4256
- }
4257
- },
4258
- {
4259
- "name": "NotifyAndSettle",
4260
- "type": {
4261
- "kind": "struct",
4262
- "fields": [
4263
- {
4264
- "name": "model",
4265
- "type": {
4266
- "defined": {
4267
- "name": "ValuationModel"
4268
- }
4269
- }
4270
- },
4271
- {
4272
- "name": "permissionless_fulfillment",
4273
- "type": "bool"
4274
- },
4275
- {
4276
- "name": "subscribe_notice_period_type",
4277
- "type": {
4278
- "defined": {
4279
- "name": "NoticePeriodType"
4280
- }
4281
- }
4282
- },
4283
- {
4284
- "name": "subscribe_notice_period",
4285
- "type": "u64"
4286
- },
4287
- {
4288
- "name": "subscribe_settlement_period",
4289
- "type": "u64"
4290
- },
4291
- {
4292
- "name": "subscribe_cancellation_window",
4293
- "type": "u64"
4294
- },
4295
- {
4296
- "name": "redeem_notice_period_type",
4297
- "type": {
4298
- "defined": {
4299
- "name": "NoticePeriodType"
4300
- }
4301
- }
4302
- },
4303
- {
4304
- "name": "redeem_notice_period",
4305
- "type": "u64"
4306
- },
4307
- {
4308
- "name": "redeem_settlement_period",
4309
- "type": "u64"
4310
- },
4311
- {
4312
- "name": "redeem_cancellation_window",
4313
- "type": "u64"
4314
- },
4315
- {
4316
- "name": "time_unit",
4317
- "type": {
4318
- "defined": {
4319
- "name": "TimeUnit"
4320
- }
4321
- }
4322
- },
4323
- {
4324
- "name": "_padding",
4325
- "type": {
4326
- "array": [
4327
- "u8",
4328
- 3
4329
- ]
4330
- }
4331
- }
4332
- ]
4333
- }
4334
- },
4335
- {
4336
- "name": "OracleConfigs",
4337
- "docs": [
4338
- "Vault-specific oracle configs. If available, these configs are preferred over the global config."
4339
- ],
4340
- "type": {
4341
- "kind": "struct",
4342
- "fields": [
4343
- {
4344
- "name": "max_ages_seconds",
4345
- "type": {
4346
- "vec": {
4347
- "array": [
4348
- "u16",
4349
- 2
4350
- ]
4351
- }
4352
- }
4353
- },
4354
- {
4355
- "name": "padding",
4356
- "type": {
4357
- "array": [
4358
- "u8",
4359
- 12
4360
- ]
4361
- }
4362
- }
4363
- ]
4364
- }
4365
- },
4366
- {
4367
- "name": "OrderParams",
4368
- "type": {
4369
- "kind": "struct",
4370
- "fields": [
4371
- {
4372
- "name": "order_type",
4373
- "type": {
4374
- "defined": {
4375
- "name": "OrderType"
4376
- }
4377
- }
4378
- },
4379
- {
4380
- "name": "market_type",
4381
- "type": {
4382
- "defined": {
4383
- "name": "MarketType"
4384
- }
4385
- }
4386
- },
4387
- {
4388
- "name": "direction",
4389
- "type": {
4390
- "defined": {
4391
- "name": "PositionDirection"
4392
- }
4393
- }
4394
- },
4395
- {
4396
- "name": "user_order_id",
4397
- "type": "u8"
4398
- },
4399
- {
4400
- "name": "base_asset_amount",
4401
- "type": "u64"
4402
- },
4403
- {
4404
- "name": "price",
4405
- "type": "u64"
4406
- },
4407
- {
4408
- "name": "market_index",
4409
- "type": "u16"
4410
- },
4411
- {
4412
- "name": "reduce_only",
4413
- "type": "bool"
4414
- },
4415
- {
4416
- "name": "post_only",
4417
- "type": {
4418
- "defined": {
4419
- "name": "PostOnlyParam"
4420
- }
4421
- }
4422
- },
4423
- {
4424
- "name": "bit_flags",
4425
- "type": "u8"
4426
- },
4427
- {
4428
- "name": "max_ts",
4429
- "type": {
4430
- "option": "i64"
4431
- }
4432
- },
4433
- {
4434
- "name": "trigger_price",
4435
- "type": {
4436
- "option": "u64"
4437
- }
4438
- },
4439
- {
4440
- "name": "trigger_condition",
4441
- "type": {
4442
- "defined": {
4443
- "name": "OrderTriggerCondition"
4444
- }
4445
- }
4446
- },
4447
- {
4448
- "name": "oracle_price_offset",
4449
- "type": {
4450
- "option": "i32"
4451
- }
4452
- },
4453
- {
4454
- "name": "auction_duration",
4455
- "type": {
4456
- "option": "u8"
4457
- }
4458
- },
4459
- {
4460
- "name": "auction_start_price",
4461
- "type": {
4462
- "option": "i64"
4463
- }
4464
- },
4465
- {
4466
- "name": "auction_end_price",
4467
- "type": {
4468
- "option": "i64"
4469
- }
4470
- }
4471
- ]
4472
- }
4473
- },
4474
- {
4475
- "name": "OrderTriggerCondition",
4476
- "type": {
4477
- "kind": "enum",
4478
- "variants": [
4479
- {
4480
- "name": "Above"
4481
- },
4482
- {
4483
- "name": "Below"
4484
- },
4485
- {
4486
- "name": "TriggeredAbove"
4487
- },
4488
- {
4489
- "name": "TriggeredBelow"
4490
- }
4491
- ]
4492
- }
4493
- },
4494
- {
4495
- "name": "OrderType",
4496
- "type": {
4497
- "kind": "enum",
4498
- "variants": [
4499
- {
4500
- "name": "Market"
4501
- },
4502
- {
4503
- "name": "Limit"
4504
- },
4505
- {
4506
- "name": "TriggerMarket"
4507
- },
4508
- {
4509
- "name": "TriggerLimit"
4510
- },
4511
- {
4512
- "name": "Oracle"
4513
- }
4514
- ]
4515
- }
4516
- },
4517
- {
4518
- "name": "PerformanceFee",
4519
- "type": {
4520
- "kind": "struct",
4521
- "fields": [
4522
- {
4523
- "name": "fee_bps",
4524
- "type": "u16"
4525
- },
4526
- {
4527
- "name": "hurdle_rate_bps",
4528
- "type": "u16"
4529
- },
4530
- {
4531
- "name": "hurdle_type",
4532
- "type": {
4533
- "defined": {
4534
- "name": "HurdleType"
4535
- }
4536
- }
4537
- }
4538
- ]
4539
- }
4540
- },
4541
- {
4542
- "name": "PositionDirection",
4543
- "type": {
4544
- "kind": "enum",
4545
- "variants": [
4546
- {
4547
- "name": "Long"
4548
- },
4549
- {
4550
- "name": "Short"
4551
- }
4552
- ]
4553
- }
4554
- },
4555
- {
4556
- "name": "PostOnlyParam",
4557
- "type": {
4558
- "kind": "enum",
4559
- "variants": [
4560
- {
4561
- "name": "None"
4562
- },
4563
- {
4564
- "name": "MustPostOnly"
4565
- },
4566
- {
4567
- "name": "TryPostOnly"
4568
- },
4569
- {
4570
- "name": "Slide"
4571
- }
4572
- ]
4573
- }
4574
- },
4575
- {
4576
- "name": "PricedProtocol",
4577
- "type": {
4578
- "kind": "struct",
4579
- "fields": [
4580
- {
4581
- "name": "rent",
4582
- "type": "u64"
4583
- },
4584
- {
4585
- "name": "amount",
4586
- "type": "i128"
4587
- },
4588
- {
4589
- "name": "decimals",
4590
- "type": "u8"
4591
- },
4592
- {
4593
- "name": "last_updated_slot",
4594
- "type": "u64"
4595
- },
4596
- {
4597
- "name": "integration_program",
4598
- "type": "pubkey"
4599
- },
4600
- {
4601
- "name": "protocol_bitflag",
4602
- "type": "u16"
4603
- },
4604
- {
4605
- "name": "positions",
4606
- "type": {
4607
- "vec": "pubkey"
4608
- }
4609
- }
4610
- ]
4611
- }
4612
- },
4613
- {
4614
- "name": "ProtocolFees",
4615
- "type": {
4616
- "kind": "struct",
4617
- "fields": [
4618
- {
4619
- "name": "base_fee_bps",
4620
- "type": "u16"
4621
- },
4622
- {
4623
- "name": "flow_fee_bps",
4624
- "type": "u16"
4625
- }
4626
- ]
4627
- }
4628
- },
4629
- {
4630
- "name": "ProtocolPermissions",
4631
- "docs": [
4632
- "Represents a delegate's permissions for a specific protocol"
4633
- ],
4634
- "type": {
4635
- "kind": "struct",
4636
- "fields": [
4637
- {
4638
- "name": "protocol_bitflag",
4639
- "type": "u16"
4640
- },
4641
- {
4642
- "name": "permissions_bitmask",
4643
- "type": "u64"
4644
- }
4645
- ]
4646
- }
4647
- },
4648
- {
4649
- "name": "ProtocolPolicy",
4650
- "docs": [
4651
- "Stores policy data for an integrated protocol.",
4652
- "Integration programs serialize/deserialize this data."
4653
- ],
4654
- "type": {
4655
- "kind": "struct",
4656
- "fields": [
4657
- {
4658
- "name": "protocol_bitflag",
4659
- "type": "u16"
4660
- },
4661
- {
4662
- "name": "data",
4663
- "type": "bytes"
4664
- }
4665
- ]
4666
- }
4667
- },
4668
- {
4669
- "name": "SettlePnlMode",
4670
- "type": {
4671
- "kind": "enum",
4672
- "variants": [
4673
- {
4674
- "name": "MustSettle"
4675
- },
4676
- {
4677
- "name": "TrySettle"
4678
- }
4679
- ]
4680
- }
4681
- },
4682
- {
4683
- "name": "SpotFulfillmentType",
4684
- "type": {
4685
- "kind": "enum",
4686
- "variants": [
4687
- {
4688
- "name": "SerumV3"
4689
- },
4690
- {
4691
- "name": "Match"
4692
- },
4693
- {
4694
- "name": "PhoenixV1"
4695
- },
4696
- {
4697
- "name": "OpenbookV2"
4698
- }
4699
- ]
4700
- }
4701
- },
4702
- {
4703
- "name": "StateAccount",
4704
- "type": {
4705
- "kind": "struct",
4706
- "fields": [
4707
- {
4708
- "name": "account_type",
4709
- "type": {
4710
- "defined": {
4711
- "name": "AccountType"
4712
- }
4713
- }
4714
- },
4715
- {
4716
- "name": "enabled",
4717
- "type": "bool"
4718
- },
4719
- {
4720
- "name": "vault",
4721
- "type": "pubkey"
4722
- },
4723
- {
4724
- "name": "owner",
4725
- "type": "pubkey"
4726
- },
4727
- {
4728
- "name": "portfolio_manager_name",
4729
- "type": {
4730
- "array": [
4731
- "u8",
4732
- 32
4733
- ]
4734
- }
4735
- },
4736
- {
4737
- "name": "created",
4738
- "type": {
4739
- "defined": {
4740
- "name": "CreatedModel"
4741
- }
4742
- }
4743
- },
4744
- {
4745
- "name": "base_asset_mint",
4746
- "type": "pubkey"
4747
- },
4748
- {
4749
- "name": "base_asset_decimals",
4750
- "type": "u8"
4751
- },
4752
- {
4753
- "name": "base_asset_token_program",
4754
- "type": "u8"
4755
- },
4756
- {
4757
- "name": "name",
4758
- "type": {
4759
- "array": [
4760
- "u8",
4761
- 32
4762
- ]
4763
- }
4764
- },
4765
- {
4766
- "name": "timelock_duration",
4767
- "type": "u32"
4768
- },
4769
- {
4770
- "name": "timelock_expires_at",
4771
- "type": "u64"
4772
- },
4773
- {
4774
- "name": "mint",
4775
- "type": "pubkey"
4776
- },
4777
- {
4778
- "name": "assets",
4779
- "type": {
4780
- "vec": "pubkey"
4781
- }
4782
- },
4783
- {
4784
- "name": "integration_acls",
4785
- "type": {
4786
- "vec": {
4787
- "defined": {
4788
- "name": "IntegrationAcl"
4789
- }
4790
- }
4791
- }
4792
- },
4793
- {
4794
- "name": "delegate_acls",
4795
- "type": {
4796
- "vec": {
4797
- "defined": {
4798
- "name": "DelegateAcl"
4799
- }
4800
- }
4801
- }
4802
- },
4803
- {
4804
- "name": "external_positions",
4805
- "type": {
4806
- "vec": "pubkey"
4807
- }
4808
- },
4809
- {
4810
- "name": "priced_protocols",
4811
- "type": {
4812
- "vec": {
4813
- "defined": {
4814
- "name": "PricedProtocol"
4815
- }
4816
- }
4817
- }
4818
- },
4819
- {
4820
- "name": "params",
4821
- "type": {
4822
- "vec": {
4823
- "vec": {
4824
- "defined": {
4825
- "name": "EngineField"
4826
- }
4827
- }
4828
- }
4829
- }
4830
- }
4831
- ]
4832
- }
4833
- },
4834
- {
4835
- "name": "TimeUnit",
4836
- "type": {
4837
- "kind": "enum",
4838
- "variants": [
4839
- {
4840
- "name": "Second"
4841
- },
4842
- {
4843
- "name": "Slot"
4844
- }
4845
- ]
4846
- }
4847
- },
4848
- {
4849
- "name": "ValuationModel",
4850
- "type": {
4851
- "kind": "enum",
4852
- "variants": [
4853
- {
4854
- "name": "Continuous"
4855
- },
4856
- {
4857
- "name": "Periodic"
4858
- }
4859
- ]
4860
- }
4861
- },
4862
- {
4863
- "name": "WithdrawUnit",
4864
- "type": {
4865
- "kind": "enum",
4866
- "variants": [
4867
- {
4868
- "name": "Shares"
4869
- },
4870
- {
4871
- "name": "Token"
4872
- },
4873
- {
4874
- "name": "SharesPercent"
4875
- }
4876
- ]
4877
- }
4878
- }
4879
- ],
4880
- "constants": [
4881
- {
4882
- "name": "PROTO_DRIFT_PROTOCOL",
4883
- "type": "u16",
4884
- "value": "1"
4885
- },
4886
- {
4887
- "name": "PROTO_DRIFT_PROTOCOL_PERM_BORROW",
4888
- "type": "u64",
4889
- "value": "32"
4890
- },
4891
- {
4892
- "name": "PROTO_DRIFT_PROTOCOL_PERM_CANCEL_ORDERS",
4893
- "type": "u64",
4894
- "value": "256"
4895
- },
4896
- {
4897
- "name": "PROTO_DRIFT_PROTOCOL_PERM_CREATE_MODIFY_ORDERS",
4898
- "type": "u64",
4899
- "value": "128"
4900
- },
4901
- {
4902
- "name": "PROTO_DRIFT_PROTOCOL_PERM_DELETE_USER",
4903
- "type": "u64",
4904
- "value": "4"
4905
- },
4906
- {
4907
- "name": "PROTO_DRIFT_PROTOCOL_PERM_DEPOSIT",
4908
- "type": "u64",
4909
- "value": "8"
4910
- },
4911
- {
4912
- "name": "PROTO_DRIFT_PROTOCOL_PERM_INIT_USER",
4913
- "type": "u64",
4914
- "value": "1"
4915
- },
4916
- {
4917
- "name": "PROTO_DRIFT_PROTOCOL_PERM_LIQUIDATE",
4918
- "type": "u64",
4919
- "value": "2048"
4920
- },
4921
- {
4922
- "name": "PROTO_DRIFT_PROTOCOL_PERM_PERP_MARKETS",
4923
- "type": "u64",
4924
- "value": "512"
4925
- },
4926
- {
4927
- "name": "PROTO_DRIFT_PROTOCOL_PERM_REPAY",
4928
- "type": "u64",
4929
- "value": "64"
4930
- },
4931
- {
4932
- "name": "PROTO_DRIFT_PROTOCOL_PERM_SPOT_MARKETS",
4933
- "type": "u64",
4934
- "value": "1024"
4935
- },
4936
- {
4937
- "name": "PROTO_DRIFT_PROTOCOL_PERM_UPDATE_USER",
4938
- "type": "u64",
4939
- "value": "2"
4940
- },
4941
- {
4942
- "name": "PROTO_DRIFT_PROTOCOL_PERM_WITHDRAW",
4943
- "type": "u64",
4944
- "value": "16"
4945
- },
4946
- {
4947
- "name": "PROTO_DRIFT_VAULTS",
4948
- "type": "u16",
4949
- "value": "2"
4950
- },
4951
- {
4952
- "name": "PROTO_DRIFT_VAULTS_PERM_DEPOSIT",
4953
- "type": "u64",
4954
- "value": "1"
4955
- },
4956
- {
4957
- "name": "PROTO_DRIFT_VAULTS_PERM_WITHDRAW",
4958
- "type": "u64",
4959
- "value": "2"
4960
- }
4961
- ]
4962
- }