@theliem/xmarket-sdk 3.0.1 → 3.1.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.
- package/dist/fee_management-VGF77YXG.json +1337 -0
- package/dist/index.d.mts +262 -17
- package/dist/index.d.ts +262 -17
- package/dist/index.js +859 -75
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +855 -78
- package/dist/index.mjs.map +1 -1
- package/dist/market_oracle-E6UUARGR.json +699 -0
- package/dist/{oracle-FZJJIJGI.json → oracle-O53KMXDK.json} +124 -155
- package/dist/presale-Q4NDVQFN.json +1961 -0
- package/dist/{question_market-CB6ZUZ5E.json → question_market-RP3J3N2M.json} +1485 -429
- package/package.json +1 -1
- package/src/idls/fee_management.json +1337 -0
- package/src/idls/market_oracle.json +699 -0
- package/src/idls/oracle.json +124 -155
- package/src/idls/presale.json +1961 -0
- package/src/idls/question_market.json +1485 -429
|
@@ -8,88 +8,66 @@
|
|
|
8
8
|
},
|
|
9
9
|
"instructions": [
|
|
10
10
|
{
|
|
11
|
-
"name": "
|
|
11
|
+
"name": "add_to_whitelist",
|
|
12
12
|
"docs": [
|
|
13
|
-
"Add
|
|
13
|
+
"Add an address to the oracle resolver whitelist (admin/owner only)"
|
|
14
14
|
],
|
|
15
15
|
"discriminator": [
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
16
|
+
157,
|
|
17
|
+
211,
|
|
18
|
+
52,
|
|
19
|
+
54,
|
|
20
|
+
144,
|
|
21
|
+
81,
|
|
22
|
+
5,
|
|
23
|
+
55
|
|
24
24
|
],
|
|
25
25
|
"accounts": [
|
|
26
26
|
{
|
|
27
27
|
"name": "authority",
|
|
28
|
-
"docs": [
|
|
29
|
-
"Admin or owner who can add reporters"
|
|
30
|
-
],
|
|
31
|
-
"writable": true,
|
|
32
28
|
"signer": true
|
|
33
29
|
},
|
|
34
30
|
{
|
|
35
|
-
"name": "
|
|
36
|
-
"
|
|
37
|
-
|
|
38
|
-
],
|
|
39
|
-
"writable": true
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"name": "reporter_address",
|
|
43
|
-
"docs": [
|
|
44
|
-
"The address being whitelisted as a reporter"
|
|
45
|
-
]
|
|
31
|
+
"name": "payer",
|
|
32
|
+
"writable": true,
|
|
33
|
+
"signer": true
|
|
46
34
|
},
|
|
47
35
|
{
|
|
48
|
-
"name": "
|
|
49
|
-
"docs": [
|
|
50
|
-
"The reporter account (PDA)"
|
|
51
|
-
],
|
|
36
|
+
"name": "oracle_config",
|
|
52
37
|
"writable": true,
|
|
53
38
|
"pda": {
|
|
54
39
|
"seeds": [
|
|
55
40
|
{
|
|
56
41
|
"kind": "const",
|
|
57
42
|
"value": [
|
|
58
|
-
|
|
59
|
-
101,
|
|
60
|
-
112,
|
|
43
|
+
99,
|
|
61
44
|
111,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
45
|
+
110,
|
|
46
|
+
102,
|
|
47
|
+
105,
|
|
48
|
+
103
|
|
66
49
|
]
|
|
67
50
|
},
|
|
68
51
|
{
|
|
69
52
|
"kind": "account",
|
|
70
|
-
"path": "oracle_config"
|
|
71
|
-
|
|
72
|
-
{
|
|
73
|
-
"kind": "account",
|
|
74
|
-
"path": "reporter_address"
|
|
53
|
+
"path": "oracle_config.owner",
|
|
54
|
+
"account": "OracleConfig"
|
|
75
55
|
}
|
|
76
56
|
]
|
|
77
57
|
}
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"name": "system_program",
|
|
81
|
-
"docs": [
|
|
82
|
-
"System program for account creation"
|
|
83
|
-
],
|
|
84
|
-
"address": "11111111111111111111111111111111"
|
|
85
58
|
}
|
|
86
59
|
],
|
|
87
|
-
"args": [
|
|
60
|
+
"args": [
|
|
61
|
+
{
|
|
62
|
+
"name": "address",
|
|
63
|
+
"type": "pubkey"
|
|
64
|
+
}
|
|
65
|
+
]
|
|
88
66
|
},
|
|
89
67
|
{
|
|
90
68
|
"name": "initialize",
|
|
91
69
|
"docs": [
|
|
92
|
-
"Initialize a new Oracle configuration"
|
|
70
|
+
"Initialize a new Oracle configuration. Caller becomes owner and is auto-whitelisted."
|
|
93
71
|
],
|
|
94
72
|
"discriminator": [
|
|
95
73
|
175,
|
|
@@ -145,7 +123,7 @@
|
|
|
145
123
|
{
|
|
146
124
|
"name": "pause",
|
|
147
125
|
"docs": [
|
|
148
|
-
"Pause or unpause the oracle"
|
|
126
|
+
"Pause or unpause the oracle (admin/owner only)"
|
|
149
127
|
],
|
|
150
128
|
"discriminator": [
|
|
151
129
|
211,
|
|
@@ -165,6 +143,11 @@
|
|
|
165
143
|
],
|
|
166
144
|
"signer": true
|
|
167
145
|
},
|
|
146
|
+
{
|
|
147
|
+
"name": "payer",
|
|
148
|
+
"writable": true,
|
|
149
|
+
"signer": true
|
|
150
|
+
},
|
|
168
151
|
{
|
|
169
152
|
"name": "oracle_config",
|
|
170
153
|
"docs": [
|
|
@@ -181,82 +164,67 @@
|
|
|
181
164
|
]
|
|
182
165
|
},
|
|
183
166
|
{
|
|
184
|
-
"name": "
|
|
167
|
+
"name": "remove_from_whitelist",
|
|
185
168
|
"docs": [
|
|
186
|
-
"Remove
|
|
169
|
+
"Remove an address from the oracle resolver whitelist (admin/owner only)"
|
|
187
170
|
],
|
|
188
171
|
"discriminator": [
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
172
|
+
7,
|
|
173
|
+
144,
|
|
174
|
+
216,
|
|
175
|
+
239,
|
|
176
|
+
243,
|
|
177
|
+
236,
|
|
178
|
+
193,
|
|
179
|
+
235
|
|
197
180
|
],
|
|
198
181
|
"accounts": [
|
|
199
182
|
{
|
|
200
183
|
"name": "authority",
|
|
201
|
-
"docs": [
|
|
202
|
-
"Admin or owner who can remove reporters"
|
|
203
|
-
],
|
|
204
184
|
"signer": true
|
|
205
185
|
},
|
|
206
186
|
{
|
|
207
|
-
"name": "
|
|
208
|
-
"
|
|
209
|
-
|
|
210
|
-
],
|
|
211
|
-
"writable": true
|
|
212
|
-
},
|
|
213
|
-
{
|
|
214
|
-
"name": "reporter_address",
|
|
215
|
-
"docs": [
|
|
216
|
-
"The address being removed as a reporter"
|
|
217
|
-
]
|
|
187
|
+
"name": "payer",
|
|
188
|
+
"writable": true,
|
|
189
|
+
"signer": true
|
|
218
190
|
},
|
|
219
191
|
{
|
|
220
|
-
"name": "
|
|
221
|
-
"docs": [
|
|
222
|
-
"The reporter account (PDA)"
|
|
223
|
-
],
|
|
192
|
+
"name": "oracle_config",
|
|
224
193
|
"writable": true,
|
|
225
194
|
"pda": {
|
|
226
195
|
"seeds": [
|
|
227
196
|
{
|
|
228
197
|
"kind": "const",
|
|
229
198
|
"value": [
|
|
230
|
-
|
|
231
|
-
101,
|
|
232
|
-
112,
|
|
199
|
+
99,
|
|
233
200
|
111,
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
201
|
+
110,
|
|
202
|
+
102,
|
|
203
|
+
105,
|
|
204
|
+
103
|
|
238
205
|
]
|
|
239
206
|
},
|
|
240
207
|
{
|
|
241
208
|
"kind": "account",
|
|
242
|
-
"path": "oracle_config"
|
|
243
|
-
|
|
244
|
-
{
|
|
245
|
-
"kind": "account",
|
|
246
|
-
"path": "reporter_address"
|
|
209
|
+
"path": "oracle_config.owner",
|
|
210
|
+
"account": "OracleConfig"
|
|
247
211
|
}
|
|
248
212
|
]
|
|
249
213
|
}
|
|
250
214
|
}
|
|
251
215
|
],
|
|
252
|
-
"args": [
|
|
216
|
+
"args": [
|
|
217
|
+
{
|
|
218
|
+
"name": "address",
|
|
219
|
+
"type": "pubkey"
|
|
220
|
+
}
|
|
221
|
+
]
|
|
253
222
|
},
|
|
254
223
|
{
|
|
255
224
|
"name": "resolve_question",
|
|
256
225
|
"docs": [
|
|
257
|
-
"Resolve a question
|
|
258
|
-
"
|
|
259
|
-
"QuestionMarket reads this to finalize the condition."
|
|
226
|
+
"Resolve a question — whitelisted address only.",
|
|
227
|
+
"Stores QuestionResult PDA and CPIs to CTF.set_payout in one transaction."
|
|
260
228
|
],
|
|
261
229
|
"discriminator": [
|
|
262
230
|
52,
|
|
@@ -279,7 +247,7 @@
|
|
|
279
247
|
{
|
|
280
248
|
"name": "oracle_config",
|
|
281
249
|
"docs": [
|
|
282
|
-
"Oracle configuration
|
|
250
|
+
"Oracle configuration"
|
|
283
251
|
],
|
|
284
252
|
"writable": true,
|
|
285
253
|
"pda": {
|
|
@@ -306,7 +274,7 @@
|
|
|
306
274
|
{
|
|
307
275
|
"name": "question_result",
|
|
308
276
|
"docs": [
|
|
309
|
-
"QuestionResult PDA
|
|
277
|
+
"QuestionResult PDA — seeds: [result, oracle_config, question_id]"
|
|
310
278
|
],
|
|
311
279
|
"writable": true,
|
|
312
280
|
"pda": {
|
|
@@ -336,14 +304,44 @@
|
|
|
336
304
|
{
|
|
337
305
|
"name": "condition",
|
|
338
306
|
"docs": [
|
|
339
|
-
"Condition PDA in CTF
|
|
307
|
+
"Condition PDA in CTF — seeds: [condition, oracle_config, question_id] (CTF program)"
|
|
340
308
|
],
|
|
341
|
-
"writable": true
|
|
309
|
+
"writable": true,
|
|
310
|
+
"pda": {
|
|
311
|
+
"seeds": [
|
|
312
|
+
{
|
|
313
|
+
"kind": "const",
|
|
314
|
+
"value": [
|
|
315
|
+
99,
|
|
316
|
+
111,
|
|
317
|
+
110,
|
|
318
|
+
100,
|
|
319
|
+
105,
|
|
320
|
+
116,
|
|
321
|
+
105,
|
|
322
|
+
111,
|
|
323
|
+
110
|
|
324
|
+
]
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"kind": "account",
|
|
328
|
+
"path": "oracle_config"
|
|
329
|
+
},
|
|
330
|
+
{
|
|
331
|
+
"kind": "arg",
|
|
332
|
+
"path": "question_id"
|
|
333
|
+
}
|
|
334
|
+
],
|
|
335
|
+
"program": {
|
|
336
|
+
"kind": "account",
|
|
337
|
+
"path": "conditional_tokens_program"
|
|
338
|
+
}
|
|
339
|
+
}
|
|
342
340
|
},
|
|
343
341
|
{
|
|
344
342
|
"name": "conditional_tokens_program",
|
|
345
343
|
"docs": [
|
|
346
|
-
"
|
|
344
|
+
"ConditionalTokens program"
|
|
347
345
|
]
|
|
348
346
|
},
|
|
349
347
|
{
|
|
@@ -422,7 +420,7 @@
|
|
|
422
420
|
{
|
|
423
421
|
"name": "update_admin",
|
|
424
422
|
"docs": [
|
|
425
|
-
"Update the admin of the oracle"
|
|
423
|
+
"Update the admin of the oracle (owner only)"
|
|
426
424
|
],
|
|
427
425
|
"discriminator": [
|
|
428
426
|
161,
|
|
@@ -442,6 +440,11 @@
|
|
|
442
440
|
],
|
|
443
441
|
"signer": true
|
|
444
442
|
},
|
|
443
|
+
{
|
|
444
|
+
"name": "payer",
|
|
445
|
+
"writable": true,
|
|
446
|
+
"signer": true
|
|
447
|
+
},
|
|
445
448
|
{
|
|
446
449
|
"name": "oracle_config",
|
|
447
450
|
"docs": [
|
|
@@ -484,27 +487,26 @@
|
|
|
484
487
|
254,
|
|
485
488
|
226
|
|
486
489
|
]
|
|
487
|
-
}
|
|
490
|
+
}
|
|
491
|
+
],
|
|
492
|
+
"events": [
|
|
488
493
|
{
|
|
489
|
-
"name": "
|
|
494
|
+
"name": "WhitelistUpdated",
|
|
490
495
|
"discriminator": [
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
496
|
+
205,
|
|
497
|
+
110,
|
|
498
|
+
205,
|
|
499
|
+
193,
|
|
500
|
+
238,
|
|
501
|
+
237,
|
|
502
|
+
220,
|
|
503
|
+
22
|
|
499
504
|
]
|
|
500
505
|
}
|
|
501
506
|
],
|
|
502
507
|
"types": [
|
|
503
508
|
{
|
|
504
509
|
"name": "OracleConfig",
|
|
505
|
-
"docs": [
|
|
506
|
-
"Global configuration for the Oracle program"
|
|
507
|
-
],
|
|
508
510
|
"type": {
|
|
509
511
|
"kind": "struct",
|
|
510
512
|
"fields": [
|
|
@@ -589,6 +591,9 @@
|
|
|
589
591
|
},
|
|
590
592
|
{
|
|
591
593
|
"name": "payout_numerators",
|
|
594
|
+
"docs": [
|
|
595
|
+
"Fixed-size payout array. Only [0..outcome_count] slots are meaningful."
|
|
596
|
+
],
|
|
592
597
|
"type": {
|
|
593
598
|
"array": [
|
|
594
599
|
"u64",
|
|
@@ -631,61 +636,25 @@
|
|
|
631
636
|
}
|
|
632
637
|
},
|
|
633
638
|
{
|
|
634
|
-
"name": "
|
|
635
|
-
"docs": [
|
|
636
|
-
"Represents a whitelisted reporter who can resolve questions"
|
|
637
|
-
],
|
|
639
|
+
"name": "WhitelistUpdated",
|
|
638
640
|
"type": {
|
|
639
641
|
"kind": "struct",
|
|
640
642
|
"fields": [
|
|
641
643
|
{
|
|
642
644
|
"name": "oracle_config",
|
|
643
|
-
"docs": [
|
|
644
|
-
"The oracle config this reporter belongs to"
|
|
645
|
-
],
|
|
646
645
|
"type": "pubkey"
|
|
647
646
|
},
|
|
648
647
|
{
|
|
649
|
-
"name": "
|
|
650
|
-
"docs": [
|
|
651
|
-
"The reporter's public key"
|
|
652
|
-
],
|
|
648
|
+
"name": "address",
|
|
653
649
|
"type": "pubkey"
|
|
654
650
|
},
|
|
655
651
|
{
|
|
656
|
-
"name": "
|
|
657
|
-
"docs": [
|
|
658
|
-
"Whether the reporter is currently active"
|
|
659
|
-
],
|
|
652
|
+
"name": "added",
|
|
660
653
|
"type": "bool"
|
|
661
654
|
},
|
|
662
655
|
{
|
|
663
|
-
"name": "
|
|
664
|
-
"
|
|
665
|
-
"Number of questions this reporter has resolved"
|
|
666
|
-
],
|
|
667
|
-
"type": "u64"
|
|
668
|
-
},
|
|
669
|
-
{
|
|
670
|
-
"name": "added_at",
|
|
671
|
-
"docs": [
|
|
672
|
-
"Timestamp when the reporter was added"
|
|
673
|
-
],
|
|
674
|
-
"type": "i64"
|
|
675
|
-
},
|
|
676
|
-
{
|
|
677
|
-
"name": "last_updated",
|
|
678
|
-
"docs": [
|
|
679
|
-
"Timestamp when the reporter was last updated"
|
|
680
|
-
],
|
|
681
|
-
"type": "i64"
|
|
682
|
-
},
|
|
683
|
-
{
|
|
684
|
-
"name": "bump",
|
|
685
|
-
"docs": [
|
|
686
|
-
"Bump seed for PDA derivation"
|
|
687
|
-
],
|
|
688
|
-
"type": "u8"
|
|
656
|
+
"name": "updated_by",
|
|
657
|
+
"type": "pubkey"
|
|
689
658
|
}
|
|
690
659
|
]
|
|
691
660
|
}
|