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