drama-pm-client 0.3.1 → 0.4.2

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.
package/dist/types.d.ts CHANGED
@@ -60,6 +60,115 @@ export type DramaPm = {
60
60
  }
61
61
  ];
62
62
  },
63
+ {
64
+ "name": "burnMarketTokens";
65
+ "docs": [
66
+ "Burn worthless tokens from the losing side of a resolved market.",
67
+ "This allows users to clean up their losing tokens so the market account can be closed."
68
+ ];
69
+ "discriminator": [
70
+ 33,
71
+ 76,
72
+ 200,
73
+ 47,
74
+ 151,
75
+ 59,
76
+ 17,
77
+ 145
78
+ ];
79
+ "accounts": [
80
+ {
81
+ "name": "market";
82
+ "writable": true;
83
+ },
84
+ {
85
+ "name": "yesMint";
86
+ "docs": [
87
+ "YES mint - needed for validation"
88
+ ];
89
+ "pda": {
90
+ "seeds": [
91
+ {
92
+ "kind": "const";
93
+ "value": [
94
+ 121,
95
+ 101,
96
+ 115,
97
+ 95,
98
+ 109,
99
+ 105,
100
+ 110,
101
+ 116
102
+ ];
103
+ },
104
+ {
105
+ "kind": "account";
106
+ "path": "market";
107
+ }
108
+ ];
109
+ };
110
+ },
111
+ {
112
+ "name": "noMint";
113
+ "docs": [
114
+ "NO mint - needed for validation"
115
+ ];
116
+ "pda": {
117
+ "seeds": [
118
+ {
119
+ "kind": "const";
120
+ "value": [
121
+ 110,
122
+ 111,
123
+ 95,
124
+ 109,
125
+ 105,
126
+ 110,
127
+ 116
128
+ ];
129
+ },
130
+ {
131
+ "kind": "account";
132
+ "path": "market";
133
+ }
134
+ ];
135
+ };
136
+ },
137
+ {
138
+ "name": "losingMint";
139
+ "docs": [
140
+ "The mint of the losing outcome token (must be either yes_mint or no_mint)"
141
+ ];
142
+ "writable": true;
143
+ },
144
+ {
145
+ "name": "userLosingToken";
146
+ "docs": [
147
+ "The user's token account for the losing outcome tokens"
148
+ ];
149
+ "writable": true;
150
+ },
151
+ {
152
+ "name": "user";
153
+ "writable": true;
154
+ "signer": true;
155
+ },
156
+ {
157
+ "name": "token2022Program";
158
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
159
+ }
160
+ ];
161
+ "args": [
162
+ {
163
+ "name": "params";
164
+ "type": {
165
+ "defined": {
166
+ "name": "burnMarketTokensParams";
167
+ };
168
+ };
169
+ }
170
+ ];
171
+ },
63
172
  {
64
173
  "name": "claimRewards";
65
174
  "discriminator": [
@@ -76,6 +185,31 @@ export type DramaPm = {
76
185
  {
77
186
  "name": "market";
78
187
  "writable": true;
188
+ "pda": {
189
+ "seeds": [
190
+ {
191
+ "kind": "const";
192
+ "value": [
193
+ 109,
194
+ 97,
195
+ 114,
196
+ 107,
197
+ 101,
198
+ 116
199
+ ];
200
+ },
201
+ {
202
+ "kind": "account";
203
+ "path": "market.admin";
204
+ "account": "market";
205
+ },
206
+ {
207
+ "kind": "account";
208
+ "path": "market.market_id";
209
+ "account": "market";
210
+ }
211
+ ];
212
+ };
79
213
  },
80
214
  {
81
215
  "name": "yesMint";
@@ -163,6 +297,10 @@ export type DramaPm = {
163
297
  {
164
298
  "name": "tokenProgram";
165
299
  "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
300
+ },
301
+ {
302
+ "name": "token2022Program";
303
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
166
304
  }
167
305
  ];
168
306
  "args": [
@@ -222,6 +360,7 @@ export type DramaPm = {
222
360
  },
223
361
  {
224
362
  "name": "yesMint";
363
+ "writable": true;
225
364
  "pda": {
226
365
  "seeds": [
227
366
  {
@@ -246,6 +385,7 @@ export type DramaPm = {
246
385
  },
247
386
  {
248
387
  "name": "noMint";
388
+ "writable": true;
249
389
  "pda": {
250
390
  "seeds": [
251
391
  {
@@ -269,6 +409,7 @@ export type DramaPm = {
269
409
  },
270
410
  {
271
411
  "name": "vault";
412
+ "writable": true;
272
413
  "pda": {
273
414
  "seeds": [
274
415
  {
@@ -299,6 +440,10 @@ export type DramaPm = {
299
440
  {
300
441
  "name": "tokenProgram";
301
442
  "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
443
+ },
444
+ {
445
+ "name": "token2022Program";
446
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
302
447
  }
303
448
  ];
304
449
  "args": [];
@@ -447,6 +592,10 @@ export type DramaPm = {
447
592
  "name": "tokenProgram";
448
593
  "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
449
594
  },
595
+ {
596
+ "name": "token2022Program";
597
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
598
+ },
450
599
  {
451
600
  "name": "systemProgram";
452
601
  "address": "11111111111111111111111111111111";
@@ -507,6 +656,54 @@ export type DramaPm = {
507
656
  ];
508
657
  "args": [];
509
658
  },
659
+ {
660
+ "name": "migrateConfig";
661
+ "docs": [
662
+ "Migrate GlobalConfig to new version with fee_claim_bps field.",
663
+ "Only authority can call this. Should be called once after program upgrade."
664
+ ];
665
+ "discriminator": [
666
+ 92,
667
+ 131,
668
+ 58,
669
+ 105,
670
+ 210,
671
+ 154,
672
+ 224,
673
+ 193
674
+ ];
675
+ "accounts": [
676
+ {
677
+ "name": "globalConfig";
678
+ "writable": true;
679
+ "pda": {
680
+ "seeds": [
681
+ {
682
+ "kind": "const";
683
+ "value": [
684
+ 99,
685
+ 111,
686
+ 110,
687
+ 102,
688
+ 105,
689
+ 103
690
+ ];
691
+ }
692
+ ];
693
+ };
694
+ },
695
+ {
696
+ "name": "authority";
697
+ "writable": true;
698
+ "signer": true;
699
+ },
700
+ {
701
+ "name": "systemProgram";
702
+ "address": "11111111111111111111111111111111";
703
+ }
704
+ ];
705
+ "args": [];
706
+ },
510
707
  {
511
708
  "name": "placeBet";
512
709
  "discriminator": [
@@ -603,6 +800,10 @@ export type DramaPm = {
603
800
  {
604
801
  "name": "tokenProgram";
605
802
  "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
803
+ },
804
+ {
805
+ "name": "token2022Program";
806
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
606
807
  }
607
808
  ];
608
809
  "args": [
@@ -723,6 +924,10 @@ export type DramaPm = {
723
924
  {
724
925
  "name": "tokenProgram";
725
926
  "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
927
+ },
928
+ {
929
+ "name": "token2022Program";
930
+ "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
726
931
  }
727
932
  ];
728
933
  "args": [
@@ -796,16 +1001,96 @@ export type DramaPm = {
796
1001
  239
797
1002
  ];
798
1003
  "accounts": [
1004
+ {
1005
+ "name": "globalConfig";
1006
+ "pda": {
1007
+ "seeds": [
1008
+ {
1009
+ "kind": "const";
1010
+ "value": [
1011
+ 99,
1012
+ 111,
1013
+ 110,
1014
+ 102,
1015
+ 105,
1016
+ 103
1017
+ ];
1018
+ }
1019
+ ];
1020
+ };
1021
+ },
799
1022
  {
800
1023
  "name": "market";
801
1024
  "writable": true;
1025
+ "pda": {
1026
+ "seeds": [
1027
+ {
1028
+ "kind": "const";
1029
+ "value": [
1030
+ 109,
1031
+ 97,
1032
+ 114,
1033
+ 107,
1034
+ 101,
1035
+ 116
1036
+ ];
1037
+ },
1038
+ {
1039
+ "kind": "account";
1040
+ "path": "market.admin";
1041
+ "account": "market";
1042
+ },
1043
+ {
1044
+ "kind": "account";
1045
+ "path": "market.market_id";
1046
+ "account": "market";
1047
+ }
1048
+ ];
1049
+ };
1050
+ },
1051
+ {
1052
+ "name": "vault";
1053
+ "writable": true;
1054
+ "pda": {
1055
+ "seeds": [
1056
+ {
1057
+ "kind": "const";
1058
+ "value": [
1059
+ 118,
1060
+ 97,
1061
+ 117,
1062
+ 108,
1063
+ 116
1064
+ ];
1065
+ },
1066
+ {
1067
+ "kind": "account";
1068
+ "path": "market";
1069
+ }
1070
+ ];
1071
+ };
1072
+ "relations": [
1073
+ "market"
1074
+ ];
1075
+ },
1076
+ {
1077
+ "name": "feeRecipient";
1078
+ "docs": [
1079
+ "手续费接收账户,必须与 global_config.fee_recipient 匹配"
1080
+ ];
1081
+ "writable": true;
802
1082
  },
803
1083
  {
804
1084
  "name": "admin";
1085
+ "writable": true;
805
1086
  "signer": true;
806
1087
  "relations": [
807
1088
  "market"
808
1089
  ];
1090
+ },
1091
+ {
1092
+ "name": "tokenProgram";
1093
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA";
809
1094
  }
810
1095
  ];
811
1096
  "args": [
@@ -866,6 +1151,10 @@ export type DramaPm = {
866
1151
  {
867
1152
  "name": "newFeeRecipient";
868
1153
  "type": "pubkey";
1154
+ },
1155
+ {
1156
+ "name": "newFeeClaimBps";
1157
+ "type": "u16";
869
1158
  }
870
1159
  ];
871
1160
  }
@@ -899,6 +1188,19 @@ export type DramaPm = {
899
1188
  }
900
1189
  ];
901
1190
  "events": [
1191
+ {
1192
+ "name": "burnMarketTokensEvent";
1193
+ "discriminator": [
1194
+ 239,
1195
+ 105,
1196
+ 27,
1197
+ 174,
1198
+ 57,
1199
+ 42,
1200
+ 216,
1201
+ 132
1202
+ ];
1203
+ },
902
1204
  {
903
1205
  "name": "claimRewardsEvent";
904
1206
  "discriminator": [
@@ -1149,6 +1451,55 @@ export type DramaPm = {
1149
1451
  }
1150
1452
  ];
1151
1453
  "types": [
1454
+ {
1455
+ "name": "burnMarketTokensEvent";
1456
+ "type": {
1457
+ "kind": "struct";
1458
+ "fields": [
1459
+ {
1460
+ "name": "market";
1461
+ "type": "pubkey";
1462
+ },
1463
+ {
1464
+ "name": "user";
1465
+ "type": "pubkey";
1466
+ },
1467
+ {
1468
+ "name": "tokensBurned";
1469
+ "type": "u64";
1470
+ },
1471
+ {
1472
+ "name": "timestamp";
1473
+ "type": "i64";
1474
+ }
1475
+ ];
1476
+ };
1477
+ },
1478
+ {
1479
+ "name": "burnMarketTokensParams";
1480
+ "docs": [
1481
+ "Params for burn_market_tokens instruction"
1482
+ ];
1483
+ "type": {
1484
+ "kind": "struct";
1485
+ "fields": [
1486
+ {
1487
+ "name": "tokenAmount";
1488
+ "docs": [
1489
+ "Amount of tokens to burn. 0 means burn all."
1490
+ ];
1491
+ "type": "u64";
1492
+ },
1493
+ {
1494
+ "name": "closeAccount";
1495
+ "docs": [
1496
+ "Whether to close the losing token account after burning all tokens"
1497
+ ];
1498
+ "type": "bool";
1499
+ }
1500
+ ];
1501
+ };
1502
+ },
1152
1503
  {
1153
1504
  "name": "claimRewardsEvent";
1154
1505
  "type": {
@@ -1193,6 +1544,10 @@ export type DramaPm = {
1193
1544
  {
1194
1545
  "name": "tokenAmount";
1195
1546
  "type": "u64";
1547
+ },
1548
+ {
1549
+ "name": "closeAccount";
1550
+ "type": "bool";
1196
1551
  }
1197
1552
  ];
1198
1553
  };
@@ -1287,6 +1642,10 @@ export type DramaPm = {
1287
1642
  {
1288
1643
  "name": "feeRecipient";
1289
1644
  "type": "pubkey";
1645
+ },
1646
+ {
1647
+ "name": "feeClaimBps";
1648
+ "type": "u16";
1290
1649
  }
1291
1650
  ];
1292
1651
  };
@@ -1594,6 +1953,10 @@ export type DramaPm = {
1594
1953
  };
1595
1954
  };
1596
1955
  },
1956
+ {
1957
+ "name": "feeAmount";
1958
+ "type": "u64";
1959
+ },
1597
1960
  {
1598
1961
  "name": "timestamp";
1599
1962
  "type": "i64";