@zcomb/programs-sdk 1.7.0 → 1.8.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 (44) hide show
  1. package/dist/futarchy/client.d.ts +113 -1
  2. package/dist/futarchy/client.js +13 -3
  3. package/dist/futarchy/instructions.d.ts +109 -1
  4. package/dist/futarchy/instructions.js +17 -3
  5. package/dist/generated/idls/futarchy.json +112 -0
  6. package/dist/generated/types/futarchy.d.ts +112 -0
  7. package/dist/generated/types/futarchy.js +1 -1
  8. package/package.json +1 -2
  9. package/src/amm/client.ts +0 -485
  10. package/src/amm/constants.ts +0 -31
  11. package/src/amm/index.ts +0 -5
  12. package/src/amm/instructions.ts +0 -139
  13. package/src/amm/types.ts +0 -62
  14. package/src/amm/utils.ts +0 -263
  15. package/src/futarchy/client.ts +0 -1100
  16. package/src/futarchy/constants.ts +0 -28
  17. package/src/futarchy/index.ts +0 -5
  18. package/src/futarchy/instructions.ts +0 -235
  19. package/src/futarchy/types.ts +0 -54
  20. package/src/futarchy/utils.ts +0 -108
  21. package/src/generated/idls/amm.json +0 -1252
  22. package/src/generated/idls/futarchy.json +0 -1763
  23. package/src/generated/idls/index.ts +0 -4
  24. package/src/generated/idls/svault.json +0 -2228
  25. package/src/generated/idls/vault.json +0 -1501
  26. package/src/generated/types/amm.ts +0 -1258
  27. package/src/generated/types/futarchy.ts +0 -1769
  28. package/src/generated/types/index.ts +0 -4
  29. package/src/generated/types/svault.ts +0 -2234
  30. package/src/generated/types/vault.ts +0 -1507
  31. package/src/index.ts +0 -163
  32. package/src/svault/client.ts +0 -401
  33. package/src/svault/constants.ts +0 -23
  34. package/src/svault/index.ts +0 -5
  35. package/src/svault/instructions.ts +0 -258
  36. package/src/svault/types.ts +0 -45
  37. package/src/svault/utils.ts +0 -145
  38. package/src/utils.ts +0 -41
  39. package/src/vault/client.ts +0 -333
  40. package/src/vault/constants.ts +0 -23
  41. package/src/vault/index.ts +0 -5
  42. package/src/vault/instructions.ts +0 -170
  43. package/src/vault/types.ts +0 -54
  44. package/src/vault/utils.ts +0 -70
@@ -1,1769 +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/futarchy.json`.
6
- */
7
- export type Futarchy = {
8
- "address": "FUTKPrt66uGGCTpk6f9tmRX2325cWgXzGCwvWhyyzjea",
9
- "metadata": {
10
- "name": "futarchy",
11
- "version": "0.1.0",
12
- "spec": "0.1.0",
13
- "description": "Created with Anchor"
14
- },
15
- "instructions": [
16
- {
17
- "name": "addHistoricalProposal",
18
- "discriminator": [
19
- 125,
20
- 119,
21
- 66,
22
- 65,
23
- 159,
24
- 52,
25
- 65,
26
- 160
27
- ],
28
- "accounts": [
29
- {
30
- "name": "admin",
31
- "writable": true,
32
- "signer": true
33
- },
34
- {
35
- "name": "moderator",
36
- "writable": true,
37
- "pda": {
38
- "seeds": [
39
- {
40
- "kind": "const",
41
- "value": [
42
- 109,
43
- 111,
44
- 100,
45
- 101,
46
- 114,
47
- 97,
48
- 116,
49
- 111,
50
- 114
51
- ]
52
- },
53
- {
54
- "kind": "account",
55
- "path": "moderator.name",
56
- "account": "moderatorAccount"
57
- }
58
- ]
59
- }
60
- },
61
- {
62
- "name": "proposal",
63
- "writable": true,
64
- "pda": {
65
- "seeds": [
66
- {
67
- "kind": "const",
68
- "value": [
69
- 112,
70
- 114,
71
- 111,
72
- 112,
73
- 111,
74
- 115,
75
- 97,
76
- 108
77
- ]
78
- },
79
- {
80
- "kind": "account",
81
- "path": "moderator"
82
- },
83
- {
84
- "kind": "account",
85
- "path": "moderator.proposal_id_counter",
86
- "account": "moderatorAccount"
87
- }
88
- ]
89
- }
90
- },
91
- {
92
- "name": "systemProgram",
93
- "address": "11111111111111111111111111111111"
94
- }
95
- ],
96
- "args": [
97
- {
98
- "name": "numOptions",
99
- "type": "u8"
100
- },
101
- {
102
- "name": "winningIdx",
103
- "type": "u8"
104
- },
105
- {
106
- "name": "length",
107
- "type": "u16"
108
- },
109
- {
110
- "name": "createdAt",
111
- "type": "i64"
112
- }
113
- ],
114
- "returns": "u16"
115
- },
116
- {
117
- "name": "addOption",
118
- "discriminator": [
119
- 229,
120
- 150,
121
- 102,
122
- 127,
123
- 99,
124
- 5,
125
- 34,
126
- 196
127
- ],
128
- "accounts": [
129
- {
130
- "name": "creator",
131
- "writable": true,
132
- "signer": true
133
- },
134
- {
135
- "name": "proposal",
136
- "writable": true,
137
- "pda": {
138
- "seeds": [
139
- {
140
- "kind": "const",
141
- "value": [
142
- 112,
143
- 114,
144
- 111,
145
- 112,
146
- 111,
147
- 115,
148
- 97,
149
- 108
150
- ]
151
- },
152
- {
153
- "kind": "account",
154
- "path": "proposal.moderator",
155
- "account": "proposalAccount"
156
- },
157
- {
158
- "kind": "account",
159
- "path": "proposal.id",
160
- "account": "proposalAccount"
161
- }
162
- ]
163
- }
164
- },
165
- {
166
- "name": "systemProgram",
167
- "address": "11111111111111111111111111111111"
168
- },
169
- {
170
- "name": "vaultProgram",
171
- "address": "VLTEetGyPKtffi1u3Jr8btWATv33NeDyUuRsPENFPTU"
172
- },
173
- {
174
- "name": "ammProgram",
175
- "address": "AMMSgtnttAKx5Ad2Y1socKJ3CcQYCB2ctg8U2SAHcVEx"
176
- },
177
- {
178
- "name": "tokenProgram",
179
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
180
- },
181
- {
182
- "name": "associatedTokenProgram",
183
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
184
- }
185
- ],
186
- "args": []
187
- },
188
- {
189
- "name": "finalizeProposal",
190
- "discriminator": [
191
- 23,
192
- 68,
193
- 51,
194
- 167,
195
- 109,
196
- 173,
197
- 187,
198
- 164
199
- ],
200
- "accounts": [
201
- {
202
- "name": "signer",
203
- "signer": true
204
- },
205
- {
206
- "name": "proposal",
207
- "writable": true,
208
- "pda": {
209
- "seeds": [
210
- {
211
- "kind": "const",
212
- "value": [
213
- 112,
214
- 114,
215
- 111,
216
- 112,
217
- 111,
218
- 115,
219
- 97,
220
- 108
221
- ]
222
- },
223
- {
224
- "kind": "account",
225
- "path": "proposal.moderator",
226
- "account": "proposalAccount"
227
- },
228
- {
229
- "kind": "account",
230
- "path": "proposal.id",
231
- "account": "proposalAccount"
232
- }
233
- ]
234
- }
235
- },
236
- {
237
- "name": "vault",
238
- "writable": true,
239
- "relations": [
240
- "proposal"
241
- ]
242
- },
243
- {
244
- "name": "vaultProgram",
245
- "address": "VLTEetGyPKtffi1u3Jr8btWATv33NeDyUuRsPENFPTU"
246
- },
247
- {
248
- "name": "ammProgram",
249
- "address": "AMMSgtnttAKx5Ad2Y1socKJ3CcQYCB2ctg8U2SAHcVEx"
250
- }
251
- ],
252
- "args": []
253
- },
254
- {
255
- "name": "initializeChildDao",
256
- "discriminator": [
257
- 241,
258
- 144,
259
- 136,
260
- 34,
261
- 152,
262
- 26,
263
- 21,
264
- 190
265
- ],
266
- "accounts": [
267
- {
268
- "name": "admin",
269
- "writable": true,
270
- "signer": true
271
- },
272
- {
273
- "name": "parentAdmin",
274
- "signer": true
275
- },
276
- {
277
- "name": "dao",
278
- "writable": true,
279
- "pda": {
280
- "seeds": [
281
- {
282
- "kind": "const",
283
- "value": [
284
- 100,
285
- 97,
286
- 111
287
- ]
288
- },
289
- {
290
- "kind": "arg",
291
- "path": "name"
292
- }
293
- ]
294
- }
295
- },
296
- {
297
- "name": "parentDao",
298
- "pda": {
299
- "seeds": [
300
- {
301
- "kind": "const",
302
- "value": [
303
- 100,
304
- 97,
305
- 111
306
- ]
307
- },
308
- {
309
- "kind": "account",
310
- "path": "parent_dao.name",
311
- "account": "daoAccount"
312
- }
313
- ]
314
- }
315
- },
316
- {
317
- "name": "tokenMint"
318
- },
319
- {
320
- "name": "programConfig"
321
- },
322
- {
323
- "name": "programConfigTreasury",
324
- "writable": true
325
- },
326
- {
327
- "name": "treasuryMultisig",
328
- "writable": true
329
- },
330
- {
331
- "name": "mintMultisig",
332
- "writable": true
333
- },
334
- {
335
- "name": "mintCreateKey",
336
- "pda": {
337
- "seeds": [
338
- {
339
- "kind": "account",
340
- "path": "dao"
341
- },
342
- {
343
- "kind": "const",
344
- "value": [
345
- 109,
346
- 105,
347
- 110,
348
- 116,
349
- 95,
350
- 107,
351
- 101,
352
- 121
353
- ]
354
- },
355
- {
356
- "kind": "arg",
357
- "path": "name"
358
- }
359
- ]
360
- }
361
- },
362
- {
363
- "name": "squadsProgram"
364
- },
365
- {
366
- "name": "systemProgram",
367
- "address": "11111111111111111111111111111111"
368
- }
369
- ],
370
- "args": [
371
- {
372
- "name": "name",
373
- "type": "string"
374
- },
375
- {
376
- "name": "treasuryCosigner",
377
- "type": "pubkey"
378
- }
379
- ]
380
- },
381
- {
382
- "name": "initializeModerator",
383
- "discriminator": [
384
- 142,
385
- 175,
386
- 48,
387
- 111,
388
- 170,
389
- 41,
390
- 76,
391
- 51
392
- ],
393
- "accounts": [
394
- {
395
- "name": "admin",
396
- "writable": true,
397
- "signer": true
398
- },
399
- {
400
- "name": "baseMint"
401
- },
402
- {
403
- "name": "quoteMint"
404
- },
405
- {
406
- "name": "moderator",
407
- "writable": true,
408
- "pda": {
409
- "seeds": [
410
- {
411
- "kind": "const",
412
- "value": [
413
- 109,
414
- 111,
415
- 100,
416
- 101,
417
- 114,
418
- 97,
419
- 116,
420
- 111,
421
- 114
422
- ]
423
- },
424
- {
425
- "kind": "arg",
426
- "path": "name"
427
- }
428
- ]
429
- }
430
- },
431
- {
432
- "name": "systemProgram",
433
- "address": "11111111111111111111111111111111"
434
- }
435
- ],
436
- "args": [
437
- {
438
- "name": "name",
439
- "type": "string"
440
- }
441
- ]
442
- },
443
- {
444
- "name": "initializeParentDao",
445
- "discriminator": [
446
- 188,
447
- 86,
448
- 227,
449
- 249,
450
- 221,
451
- 148,
452
- 66,
453
- 241
454
- ],
455
- "accounts": [
456
- {
457
- "name": "admin",
458
- "writable": true,
459
- "signer": true
460
- },
461
- {
462
- "name": "parentAdmin",
463
- "signer": true
464
- },
465
- {
466
- "name": "dao",
467
- "writable": true,
468
- "pda": {
469
- "seeds": [
470
- {
471
- "kind": "const",
472
- "value": [
473
- 100,
474
- 97,
475
- 111
476
- ]
477
- },
478
- {
479
- "kind": "arg",
480
- "path": "name"
481
- }
482
- ]
483
- }
484
- },
485
- {
486
- "name": "moderator",
487
- "writable": true,
488
- "pda": {
489
- "seeds": [
490
- {
491
- "kind": "const",
492
- "value": [
493
- 109,
494
- 111,
495
- 100,
496
- 101,
497
- 114,
498
- 97,
499
- 116,
500
- 111,
501
- 114
502
- ]
503
- },
504
- {
505
- "kind": "arg",
506
- "path": "name"
507
- }
508
- ]
509
- }
510
- },
511
- {
512
- "name": "baseMint"
513
- },
514
- {
515
- "name": "quoteMint"
516
- },
517
- {
518
- "name": "programConfig"
519
- },
520
- {
521
- "name": "programConfigTreasury",
522
- "writable": true
523
- },
524
- {
525
- "name": "treasuryMultisig",
526
- "writable": true
527
- },
528
- {
529
- "name": "mintMultisig",
530
- "writable": true
531
- },
532
- {
533
- "name": "mintCreateKey",
534
- "pda": {
535
- "seeds": [
536
- {
537
- "kind": "account",
538
- "path": "dao"
539
- },
540
- {
541
- "kind": "const",
542
- "value": [
543
- 109,
544
- 105,
545
- 110,
546
- 116,
547
- 95,
548
- 107,
549
- 101,
550
- 121
551
- ]
552
- },
553
- {
554
- "kind": "arg",
555
- "path": "name"
556
- }
557
- ]
558
- }
559
- },
560
- {
561
- "name": "squadsProgram"
562
- },
563
- {
564
- "name": "systemProgram",
565
- "address": "11111111111111111111111111111111"
566
- }
567
- ],
568
- "args": [
569
- {
570
- "name": "name",
571
- "type": "string"
572
- },
573
- {
574
- "name": "treasuryCosigner",
575
- "type": "pubkey"
576
- },
577
- {
578
- "name": "pool",
579
- "type": "pubkey"
580
- },
581
- {
582
- "name": "poolType",
583
- "type": {
584
- "defined": {
585
- "name": "poolType"
586
- }
587
- }
588
- }
589
- ]
590
- },
591
- {
592
- "name": "initializeProposal",
593
- "discriminator": [
594
- 50,
595
- 73,
596
- 156,
597
- 98,
598
- 129,
599
- 149,
600
- 21,
601
- 158
602
- ],
603
- "accounts": [
604
- {
605
- "name": "creator",
606
- "writable": true,
607
- "signer": true
608
- },
609
- {
610
- "name": "moderator",
611
- "writable": true,
612
- "pda": {
613
- "seeds": [
614
- {
615
- "kind": "const",
616
- "value": [
617
- 109,
618
- 111,
619
- 100,
620
- 101,
621
- 114,
622
- 97,
623
- 116,
624
- 111,
625
- 114
626
- ]
627
- },
628
- {
629
- "kind": "account",
630
- "path": "moderator.name",
631
- "account": "moderatorAccount"
632
- }
633
- ]
634
- }
635
- },
636
- {
637
- "name": "proposal",
638
- "writable": true,
639
- "pda": {
640
- "seeds": [
641
- {
642
- "kind": "const",
643
- "value": [
644
- 112,
645
- 114,
646
- 111,
647
- 112,
648
- 111,
649
- 115,
650
- 97,
651
- 108
652
- ]
653
- },
654
- {
655
- "kind": "account",
656
- "path": "moderator"
657
- },
658
- {
659
- "kind": "account",
660
- "path": "moderator.proposal_id_counter",
661
- "account": "moderatorAccount"
662
- }
663
- ]
664
- }
665
- },
666
- {
667
- "name": "systemProgram",
668
- "address": "11111111111111111111111111111111"
669
- },
670
- {
671
- "name": "vaultProgram",
672
- "address": "VLTEetGyPKtffi1u3Jr8btWATv33NeDyUuRsPENFPTU"
673
- },
674
- {
675
- "name": "ammProgram",
676
- "address": "AMMSgtnttAKx5Ad2Y1socKJ3CcQYCB2ctg8U2SAHcVEx"
677
- },
678
- {
679
- "name": "tokenProgram",
680
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
681
- },
682
- {
683
- "name": "associatedTokenProgram",
684
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
685
- }
686
- ],
687
- "args": [
688
- {
689
- "name": "proposalParams",
690
- "type": {
691
- "defined": {
692
- "name": "proposalParams"
693
- }
694
- }
695
- },
696
- {
697
- "name": "metadata",
698
- "type": {
699
- "option": "string"
700
- }
701
- }
702
- ],
703
- "returns": "u16"
704
- },
705
- {
706
- "name": "launchProposal",
707
- "discriminator": [
708
- 16,
709
- 211,
710
- 189,
711
- 119,
712
- 245,
713
- 72,
714
- 0,
715
- 229
716
- ],
717
- "accounts": [
718
- {
719
- "name": "creator",
720
- "writable": true,
721
- "signer": true
722
- },
723
- {
724
- "name": "proposal",
725
- "writable": true,
726
- "pda": {
727
- "seeds": [
728
- {
729
- "kind": "const",
730
- "value": [
731
- 112,
732
- 114,
733
- 111,
734
- 112,
735
- 111,
736
- 115,
737
- 97,
738
- 108
739
- ]
740
- },
741
- {
742
- "kind": "account",
743
- "path": "proposal.moderator",
744
- "account": "proposalAccount"
745
- },
746
- {
747
- "kind": "account",
748
- "path": "proposal.id",
749
- "account": "proposalAccount"
750
- }
751
- ]
752
- }
753
- },
754
- {
755
- "name": "vault",
756
- "writable": true,
757
- "relations": [
758
- "proposal"
759
- ]
760
- },
761
- {
762
- "name": "systemProgram",
763
- "address": "11111111111111111111111111111111"
764
- },
765
- {
766
- "name": "vaultProgram",
767
- "address": "VLTEetGyPKtffi1u3Jr8btWATv33NeDyUuRsPENFPTU"
768
- },
769
- {
770
- "name": "ammProgram",
771
- "address": "AMMSgtnttAKx5Ad2Y1socKJ3CcQYCB2ctg8U2SAHcVEx"
772
- },
773
- {
774
- "name": "tokenProgram",
775
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
776
- },
777
- {
778
- "name": "associatedTokenProgram",
779
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
780
- }
781
- ],
782
- "args": [
783
- {
784
- "name": "baseAmount",
785
- "type": "u64"
786
- },
787
- {
788
- "name": "quoteAmount",
789
- "type": "u64"
790
- }
791
- ]
792
- },
793
- {
794
- "name": "redeemLiquidity",
795
- "discriminator": [
796
- 180,
797
- 117,
798
- 142,
799
- 137,
800
- 227,
801
- 225,
802
- 97,
803
- 211
804
- ],
805
- "accounts": [
806
- {
807
- "name": "creator",
808
- "writable": true,
809
- "signer": true
810
- },
811
- {
812
- "name": "proposal",
813
- "pda": {
814
- "seeds": [
815
- {
816
- "kind": "const",
817
- "value": [
818
- 112,
819
- 114,
820
- 111,
821
- 112,
822
- 111,
823
- 115,
824
- 97,
825
- 108
826
- ]
827
- },
828
- {
829
- "kind": "account",
830
- "path": "proposal.moderator",
831
- "account": "proposalAccount"
832
- },
833
- {
834
- "kind": "account",
835
- "path": "proposal.id",
836
- "account": "proposalAccount"
837
- }
838
- ]
839
- }
840
- },
841
- {
842
- "name": "vault",
843
- "writable": true,
844
- "relations": [
845
- "proposal"
846
- ]
847
- },
848
- {
849
- "name": "pool",
850
- "writable": true
851
- },
852
- {
853
- "name": "vaultProgram",
854
- "address": "VLTEetGyPKtffi1u3Jr8btWATv33NeDyUuRsPENFPTU"
855
- },
856
- {
857
- "name": "ammProgram",
858
- "address": "AMMSgtnttAKx5Ad2Y1socKJ3CcQYCB2ctg8U2SAHcVEx"
859
- },
860
- {
861
- "name": "tokenProgram",
862
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
863
- },
864
- {
865
- "name": "associatedTokenProgram",
866
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
867
- },
868
- {
869
- "name": "systemProgram",
870
- "address": "11111111111111111111111111111111"
871
- }
872
- ],
873
- "args": []
874
- },
875
- {
876
- "name": "upgradeDao",
877
- "discriminator": [
878
- 81,
879
- 178,
880
- 57,
881
- 196,
882
- 156,
883
- 38,
884
- 145,
885
- 93
886
- ],
887
- "accounts": [
888
- {
889
- "name": "admin",
890
- "writable": true,
891
- "signer": true
892
- },
893
- {
894
- "name": "parentAdmin",
895
- "signer": true
896
- },
897
- {
898
- "name": "dao",
899
- "pda": {
900
- "seeds": [
901
- {
902
- "kind": "const",
903
- "value": [
904
- 100,
905
- 97,
906
- 111
907
- ]
908
- },
909
- {
910
- "kind": "account",
911
- "path": "dao.name",
912
- "account": "daoAccount"
913
- }
914
- ]
915
- }
916
- },
917
- {
918
- "name": "parentDao",
919
- "pda": {
920
- "seeds": [
921
- {
922
- "kind": "const",
923
- "value": [
924
- 100,
925
- 97,
926
- 111
927
- ]
928
- },
929
- {
930
- "kind": "account",
931
- "path": "parent_dao.name",
932
- "account": "daoAccount"
933
- }
934
- ]
935
- }
936
- },
937
- {
938
- "name": "moderator",
939
- "writable": true,
940
- "pda": {
941
- "seeds": [
942
- {
943
- "kind": "const",
944
- "value": [
945
- 109,
946
- 111,
947
- 100,
948
- 101,
949
- 114,
950
- 97,
951
- 116,
952
- 111,
953
- 114
954
- ]
955
- },
956
- {
957
- "kind": "account",
958
- "path": "dao.name",
959
- "account": "daoAccount"
960
- }
961
- ]
962
- }
963
- },
964
- {
965
- "name": "baseMint"
966
- },
967
- {
968
- "name": "quoteMint"
969
- },
970
- {
971
- "name": "systemProgram",
972
- "address": "11111111111111111111111111111111"
973
- }
974
- ],
975
- "args": [
976
- {
977
- "name": "pool",
978
- "type": "pubkey"
979
- },
980
- {
981
- "name": "poolType",
982
- "type": {
983
- "defined": {
984
- "name": "poolType"
985
- }
986
- }
987
- }
988
- ]
989
- }
990
- ],
991
- "accounts": [
992
- {
993
- "name": "daoAccount",
994
- "discriminator": [
995
- 204,
996
- 10,
997
- 113,
998
- 79,
999
- 232,
1000
- 184,
1001
- 83,
1002
- 201
1003
- ]
1004
- },
1005
- {
1006
- "name": "moderatorAccount",
1007
- "discriminator": [
1008
- 129,
1009
- 208,
1010
- 190,
1011
- 35,
1012
- 9,
1013
- 28,
1014
- 249,
1015
- 53
1016
- ]
1017
- },
1018
- {
1019
- "name": "proposalAccount",
1020
- "discriminator": [
1021
- 164,
1022
- 190,
1023
- 4,
1024
- 248,
1025
- 203,
1026
- 124,
1027
- 243,
1028
- 64
1029
- ]
1030
- }
1031
- ],
1032
- "events": [
1033
- {
1034
- "name": "daoInitialized",
1035
- "discriminator": [
1036
- 17,
1037
- 212,
1038
- 203,
1039
- 144,
1040
- 165,
1041
- 153,
1042
- 118,
1043
- 92
1044
- ]
1045
- },
1046
- {
1047
- "name": "daoUpgraded",
1048
- "discriminator": [
1049
- 8,
1050
- 62,
1051
- 51,
1052
- 188,
1053
- 195,
1054
- 69,
1055
- 78,
1056
- 7
1057
- ]
1058
- },
1059
- {
1060
- "name": "liquidityRedeemed",
1061
- "discriminator": [
1062
- 78,
1063
- 81,
1064
- 213,
1065
- 176,
1066
- 1,
1067
- 84,
1068
- 138,
1069
- 65
1070
- ]
1071
- },
1072
- {
1073
- "name": "moderatorInitialized",
1074
- "discriminator": [
1075
- 28,
1076
- 29,
1077
- 85,
1078
- 133,
1079
- 161,
1080
- 89,
1081
- 54,
1082
- 108
1083
- ]
1084
- },
1085
- {
1086
- "name": "optionAdded",
1087
- "discriminator": [
1088
- 136,
1089
- 202,
1090
- 18,
1091
- 117,
1092
- 144,
1093
- 187,
1094
- 122,
1095
- 249
1096
- ]
1097
- },
1098
- {
1099
- "name": "proposalFinalized",
1100
- "discriminator": [
1101
- 159,
1102
- 104,
1103
- 210,
1104
- 220,
1105
- 86,
1106
- 209,
1107
- 61,
1108
- 51
1109
- ]
1110
- },
1111
- {
1112
- "name": "proposalInitialized",
1113
- "discriminator": [
1114
- 148,
1115
- 198,
1116
- 58,
1117
- 182,
1118
- 198,
1119
- 50,
1120
- 13,
1121
- 60
1122
- ]
1123
- },
1124
- {
1125
- "name": "proposalLaunched",
1126
- "discriminator": [
1127
- 39,
1128
- 113,
1129
- 126,
1130
- 109,
1131
- 167,
1132
- 203,
1133
- 187,
1134
- 47
1135
- ]
1136
- }
1137
- ],
1138
- "errors": [
1139
- {
1140
- "code": 6000,
1141
- "name": "invalidVault",
1142
- "msg": "Vault account mismatch"
1143
- },
1144
- {
1145
- "code": 6001,
1146
- "name": "invalidPools",
1147
- "msg": "Pool account mismatch"
1148
- },
1149
- {
1150
- "code": 6002,
1151
- "name": "invalidMint",
1152
- "msg": "Mint mismatch"
1153
- },
1154
- {
1155
- "code": 6003,
1156
- "name": "invalidPoolProgram",
1157
- "msg": "Invalid Pool Program"
1158
- },
1159
- {
1160
- "code": 6004,
1161
- "name": "notEnoughOptions",
1162
- "msg": "Minimum 2 options required"
1163
- },
1164
- {
1165
- "code": 6005,
1166
- "name": "tooManyOptions",
1167
- "msg": "Too many options"
1168
- },
1169
- {
1170
- "code": 6006,
1171
- "name": "invalidRemainingAccounts",
1172
- "msg": "Invalid remaining accounts"
1173
- },
1174
- {
1175
- "code": 6007,
1176
- "name": "invalidState",
1177
- "msg": "Invalid proposal state"
1178
- },
1179
- {
1180
- "code": 6008,
1181
- "name": "unauthorized",
1182
- "msg": "unauthorized"
1183
- },
1184
- {
1185
- "code": 6009,
1186
- "name": "proposalNotExpired",
1187
- "msg": "Proposal has not expired yet"
1188
- },
1189
- {
1190
- "code": 6010,
1191
- "name": "twapNotReady",
1192
- "msg": "TWAP not ready"
1193
- },
1194
- {
1195
- "code": 6011,
1196
- "name": "counterOverflow",
1197
- "msg": "Counter overflow"
1198
- },
1199
- {
1200
- "code": 6012,
1201
- "name": "invalidWinningIndex",
1202
- "msg": "Winning index exceeds number of options"
1203
- },
1204
- {
1205
- "code": 6013,
1206
- "name": "invalidVersion",
1207
- "msg": "Invalid account version"
1208
- },
1209
- {
1210
- "code": 6014,
1211
- "name": "nameTooLong",
1212
- "msg": "Name exceeds 32 bytes"
1213
- },
1214
- {
1215
- "code": 6015,
1216
- "name": "metadataTooLong",
1217
- "msg": "Metadata CID exceeds 64 bytes"
1218
- },
1219
- {
1220
- "code": 6016,
1221
- "name": "invalidDao",
1222
- "msg": "Invalid DAO account"
1223
- },
1224
- {
1225
- "code": 6017,
1226
- "name": "mathOverflow",
1227
- "msg": "Math overflow"
1228
- },
1229
- {
1230
- "code": 6018,
1231
- "name": "invalidProposalParams",
1232
- "msg": "Invalid proposal parameters"
1233
- }
1234
- ],
1235
- "types": [
1236
- {
1237
- "name": "daoAccount",
1238
- "docs": [
1239
- "Seeds: [DAO_SEED, &dao_id.to_le_bytes()]"
1240
- ],
1241
- "type": {
1242
- "kind": "struct",
1243
- "fields": [
1244
- {
1245
- "name": "version",
1246
- "type": "u8"
1247
- },
1248
- {
1249
- "name": "bump",
1250
- "type": "u8"
1251
- },
1252
- {
1253
- "name": "name",
1254
- "type": "string"
1255
- },
1256
- {
1257
- "name": "admin",
1258
- "type": "pubkey"
1259
- },
1260
- {
1261
- "name": "tokenMint",
1262
- "type": "pubkey"
1263
- },
1264
- {
1265
- "name": "cosigner",
1266
- "type": "pubkey"
1267
- },
1268
- {
1269
- "name": "treasuryMultisig",
1270
- "type": "pubkey"
1271
- },
1272
- {
1273
- "name": "mintAuthMultisig",
1274
- "type": "pubkey"
1275
- },
1276
- {
1277
- "name": "daoType",
1278
- "type": {
1279
- "defined": {
1280
- "name": "daoType"
1281
- }
1282
- }
1283
- }
1284
- ]
1285
- }
1286
- },
1287
- {
1288
- "name": "daoInitialized",
1289
- "type": {
1290
- "kind": "struct",
1291
- "fields": [
1292
- {
1293
- "name": "version",
1294
- "type": "u8"
1295
- },
1296
- {
1297
- "name": "name",
1298
- "type": "string"
1299
- },
1300
- {
1301
- "name": "admin",
1302
- "type": "pubkey"
1303
- },
1304
- {
1305
- "name": "treasuryMultisig",
1306
- "type": "pubkey"
1307
- },
1308
- {
1309
- "name": "mintMultisig",
1310
- "type": "pubkey"
1311
- },
1312
- {
1313
- "name": "daoType",
1314
- "type": {
1315
- "defined": {
1316
- "name": "daoType"
1317
- }
1318
- }
1319
- }
1320
- ]
1321
- }
1322
- },
1323
- {
1324
- "name": "daoType",
1325
- "type": {
1326
- "kind": "enum",
1327
- "variants": [
1328
- {
1329
- "name": "parent",
1330
- "fields": [
1331
- {
1332
- "name": "moderator",
1333
- "type": "pubkey"
1334
- },
1335
- {
1336
- "name": "pool",
1337
- "type": "pubkey"
1338
- },
1339
- {
1340
- "name": "poolType",
1341
- "type": {
1342
- "defined": {
1343
- "name": "poolType"
1344
- }
1345
- }
1346
- }
1347
- ]
1348
- },
1349
- {
1350
- "name": "child",
1351
- "fields": [
1352
- {
1353
- "name": "parentDao",
1354
- "type": "pubkey"
1355
- }
1356
- ]
1357
- }
1358
- ]
1359
- }
1360
- },
1361
- {
1362
- "name": "daoUpgraded",
1363
- "type": {
1364
- "kind": "struct",
1365
- "fields": [
1366
- {
1367
- "name": "dao",
1368
- "type": "pubkey"
1369
- },
1370
- {
1371
- "name": "parentDao",
1372
- "type": "pubkey"
1373
- },
1374
- {
1375
- "name": "daoType",
1376
- "type": {
1377
- "defined": {
1378
- "name": "daoType"
1379
- }
1380
- }
1381
- },
1382
- {
1383
- "name": "tokenMint",
1384
- "type": "pubkey"
1385
- }
1386
- ]
1387
- }
1388
- },
1389
- {
1390
- "name": "liquidityRedeemed",
1391
- "type": {
1392
- "kind": "struct",
1393
- "fields": [
1394
- {
1395
- "name": "proposalId",
1396
- "type": "u16"
1397
- },
1398
- {
1399
- "name": "proposal",
1400
- "type": "pubkey"
1401
- },
1402
- {
1403
- "name": "redeemer",
1404
- "type": "pubkey"
1405
- },
1406
- {
1407
- "name": "winningIdx",
1408
- "type": "u8"
1409
- }
1410
- ]
1411
- }
1412
- },
1413
- {
1414
- "name": "moderatorAccount",
1415
- "docs": [
1416
- "Seeds: [MODERATOR_SEED, &id.to_le_bytes()]"
1417
- ],
1418
- "type": {
1419
- "kind": "struct",
1420
- "fields": [
1421
- {
1422
- "name": "version",
1423
- "type": "u8"
1424
- },
1425
- {
1426
- "name": "bump",
1427
- "type": "u8"
1428
- },
1429
- {
1430
- "name": "name",
1431
- "type": "string"
1432
- },
1433
- {
1434
- "name": "quoteMint",
1435
- "type": "pubkey"
1436
- },
1437
- {
1438
- "name": "baseMint",
1439
- "type": "pubkey"
1440
- },
1441
- {
1442
- "name": "proposalIdCounter",
1443
- "type": "u16"
1444
- },
1445
- {
1446
- "name": "admin",
1447
- "type": "pubkey"
1448
- }
1449
- ]
1450
- }
1451
- },
1452
- {
1453
- "name": "moderatorInitialized",
1454
- "type": {
1455
- "kind": "struct",
1456
- "fields": [
1457
- {
1458
- "name": "version",
1459
- "type": "u8"
1460
- },
1461
- {
1462
- "name": "moderator",
1463
- "type": "pubkey"
1464
- },
1465
- {
1466
- "name": "name",
1467
- "type": "string"
1468
- },
1469
- {
1470
- "name": "baseMint",
1471
- "type": "pubkey"
1472
- },
1473
- {
1474
- "name": "quoteMint",
1475
- "type": "pubkey"
1476
- },
1477
- {
1478
- "name": "admin",
1479
- "type": "pubkey"
1480
- }
1481
- ]
1482
- }
1483
- },
1484
- {
1485
- "name": "optionAdded",
1486
- "type": {
1487
- "kind": "struct",
1488
- "fields": [
1489
- {
1490
- "name": "proposalId",
1491
- "type": "u16"
1492
- },
1493
- {
1494
- "name": "proposal",
1495
- "type": "pubkey"
1496
- },
1497
- {
1498
- "name": "optionIndex",
1499
- "type": "u8"
1500
- }
1501
- ]
1502
- }
1503
- },
1504
- {
1505
- "name": "poolType",
1506
- "type": {
1507
- "kind": "enum",
1508
- "variants": [
1509
- {
1510
- "name": "damm"
1511
- },
1512
- {
1513
- "name": "dlmm"
1514
- }
1515
- ]
1516
- }
1517
- },
1518
- {
1519
- "name": "proposalAccount",
1520
- "docs": [
1521
- "Seeds: [PROPOSAL_SEED, moderator.key(), &id.to_le_bytes()]"
1522
- ],
1523
- "type": {
1524
- "kind": "struct",
1525
- "fields": [
1526
- {
1527
- "name": "version",
1528
- "type": "u8"
1529
- },
1530
- {
1531
- "name": "bump",
1532
- "type": "u8"
1533
- },
1534
- {
1535
- "name": "moderator",
1536
- "type": "pubkey"
1537
- },
1538
- {
1539
- "name": "id",
1540
- "type": "u16"
1541
- },
1542
- {
1543
- "name": "numOptions",
1544
- "type": "u8"
1545
- },
1546
- {
1547
- "name": "state",
1548
- "type": {
1549
- "defined": {
1550
- "name": "proposalState"
1551
- }
1552
- }
1553
- },
1554
- {
1555
- "name": "createdAt",
1556
- "type": "i64"
1557
- },
1558
- {
1559
- "name": "creator",
1560
- "type": "pubkey"
1561
- },
1562
- {
1563
- "name": "baseMint",
1564
- "type": "pubkey"
1565
- },
1566
- {
1567
- "name": "quoteMint",
1568
- "type": "pubkey"
1569
- },
1570
- {
1571
- "name": "vault",
1572
- "type": "pubkey"
1573
- },
1574
- {
1575
- "name": "pools",
1576
- "type": {
1577
- "array": [
1578
- "pubkey",
1579
- 6
1580
- ]
1581
- }
1582
- },
1583
- {
1584
- "name": "config",
1585
- "type": {
1586
- "defined": {
1587
- "name": "proposalParams"
1588
- }
1589
- }
1590
- },
1591
- {
1592
- "name": "metadata",
1593
- "type": {
1594
- "option": "string"
1595
- }
1596
- }
1597
- ]
1598
- }
1599
- },
1600
- {
1601
- "name": "proposalFinalized",
1602
- "type": {
1603
- "kind": "struct",
1604
- "fields": [
1605
- {
1606
- "name": "proposalId",
1607
- "type": "u16"
1608
- },
1609
- {
1610
- "name": "proposal",
1611
- "type": "pubkey"
1612
- },
1613
- {
1614
- "name": "winningIdx",
1615
- "type": "u8"
1616
- }
1617
- ]
1618
- }
1619
- },
1620
- {
1621
- "name": "proposalInitialized",
1622
- "type": {
1623
- "kind": "struct",
1624
- "fields": [
1625
- {
1626
- "name": "version",
1627
- "type": "u8"
1628
- },
1629
- {
1630
- "name": "proposalId",
1631
- "type": "u16"
1632
- },
1633
- {
1634
- "name": "proposal",
1635
- "type": "pubkey"
1636
- },
1637
- {
1638
- "name": "moderator",
1639
- "type": "pubkey"
1640
- },
1641
- {
1642
- "name": "length",
1643
- "type": "u16"
1644
- },
1645
- {
1646
- "name": "creator",
1647
- "type": "pubkey"
1648
- }
1649
- ]
1650
- }
1651
- },
1652
- {
1653
- "name": "proposalLaunched",
1654
- "type": {
1655
- "kind": "struct",
1656
- "fields": [
1657
- {
1658
- "name": "proposalId",
1659
- "type": "u16"
1660
- },
1661
- {
1662
- "name": "proposal",
1663
- "type": "pubkey"
1664
- },
1665
- {
1666
- "name": "numOptions",
1667
- "type": "u8"
1668
- },
1669
- {
1670
- "name": "baseAmount",
1671
- "type": "u64"
1672
- },
1673
- {
1674
- "name": "quoteAmount",
1675
- "type": "u64"
1676
- },
1677
- {
1678
- "name": "createdAt",
1679
- "type": "i64"
1680
- }
1681
- ]
1682
- }
1683
- },
1684
- {
1685
- "name": "proposalParams",
1686
- "type": {
1687
- "kind": "struct",
1688
- "fields": [
1689
- {
1690
- "name": "length",
1691
- "type": "u16"
1692
- },
1693
- {
1694
- "name": "startingObservation",
1695
- "type": "u128"
1696
- },
1697
- {
1698
- "name": "maxObservationDelta",
1699
- "type": "u128"
1700
- },
1701
- {
1702
- "name": "warmupDuration",
1703
- "type": "u32"
1704
- },
1705
- {
1706
- "name": "marketBias",
1707
- "type": "u16"
1708
- },
1709
- {
1710
- "name": "fee",
1711
- "type": "u16"
1712
- }
1713
- ]
1714
- }
1715
- },
1716
- {
1717
- "name": "proposalState",
1718
- "type": {
1719
- "kind": "enum",
1720
- "variants": [
1721
- {
1722
- "name": "setup"
1723
- },
1724
- {
1725
- "name": "pending"
1726
- },
1727
- {
1728
- "name": "resolved",
1729
- "fields": [
1730
- "u8"
1731
- ]
1732
- }
1733
- ]
1734
- }
1735
- }
1736
- ],
1737
- "constants": [
1738
- {
1739
- "name": "daoSeed",
1740
- "type": "bytes",
1741
- "value": "[100, 97, 111]"
1742
- },
1743
- {
1744
- "name": "maxOptions",
1745
- "type": "u8",
1746
- "value": "6"
1747
- },
1748
- {
1749
- "name": "mintCreateKeySeed",
1750
- "type": "bytes",
1751
- "value": "[109, 105, 110, 116, 95, 107, 101, 121]"
1752
- },
1753
- {
1754
- "name": "minOptions",
1755
- "type": "u8",
1756
- "value": "2"
1757
- },
1758
- {
1759
- "name": "moderatorSeed",
1760
- "type": "bytes",
1761
- "value": "[109, 111, 100, 101, 114, 97, 116, 111, 114]"
1762
- },
1763
- {
1764
- "name": "proposalSeed",
1765
- "type": "bytes",
1766
- "value": "[112, 114, 111, 112, 111, 115, 97, 108]"
1767
- }
1768
- ]
1769
- };