@theliem/xmarket-sdk 3.2.0 → 3.3.0

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.
@@ -1,663 +0,0 @@
1
- {
2
- "address": "FzLnnbKtQCTKviEbrDYMLZYXNDHQdjSSa4Ybj4jAbrUL",
3
- "metadata": {
4
- "name": "oracle",
5
- "version": "0.1.0",
6
- "spec": "0.1.0",
7
- "description": "Oracle program for XMarket prediction platform"
8
- },
9
- "instructions": [
10
- {
11
- "name": "add_to_whitelist",
12
- "docs": [
13
- "Add an address to the oracle resolver whitelist (admin/owner only)"
14
- ],
15
- "discriminator": [
16
- 157,
17
- 211,
18
- 52,
19
- 54,
20
- 144,
21
- 81,
22
- 5,
23
- 55
24
- ],
25
- "accounts": [
26
- {
27
- "name": "authority",
28
- "signer": true
29
- },
30
- {
31
- "name": "payer",
32
- "writable": true,
33
- "signer": true
34
- },
35
- {
36
- "name": "oracle_config",
37
- "writable": true,
38
- "pda": {
39
- "seeds": [
40
- {
41
- "kind": "const",
42
- "value": [
43
- 99,
44
- 111,
45
- 110,
46
- 102,
47
- 105,
48
- 103
49
- ]
50
- },
51
- {
52
- "kind": "account",
53
- "path": "oracle_config.owner",
54
- "account": "OracleConfig"
55
- }
56
- ]
57
- }
58
- }
59
- ],
60
- "args": [
61
- {
62
- "name": "address",
63
- "type": "pubkey"
64
- }
65
- ]
66
- },
67
- {
68
- "name": "initialize",
69
- "docs": [
70
- "Initialize a new Oracle configuration. Caller becomes owner and is auto-whitelisted."
71
- ],
72
- "discriminator": [
73
- 175,
74
- 175,
75
- 109,
76
- 31,
77
- 13,
78
- 152,
79
- 155,
80
- 237
81
- ],
82
- "accounts": [
83
- {
84
- "name": "owner",
85
- "writable": true,
86
- "signer": true
87
- },
88
- {
89
- "name": "oracle_config",
90
- "writable": true,
91
- "pda": {
92
- "seeds": [
93
- {
94
- "kind": "const",
95
- "value": [
96
- 99,
97
- 111,
98
- 110,
99
- 102,
100
- 105,
101
- 103
102
- ]
103
- },
104
- {
105
- "kind": "account",
106
- "path": "owner"
107
- }
108
- ]
109
- }
110
- },
111
- {
112
- "name": "system_program",
113
- "address": "11111111111111111111111111111111"
114
- }
115
- ],
116
- "args": [
117
- {
118
- "name": "admin",
119
- "type": "pubkey"
120
- }
121
- ]
122
- },
123
- {
124
- "name": "pause",
125
- "docs": [
126
- "Pause or unpause the oracle (admin/owner only)"
127
- ],
128
- "discriminator": [
129
- 211,
130
- 22,
131
- 221,
132
- 251,
133
- 74,
134
- 121,
135
- 193,
136
- 47
137
- ],
138
- "accounts": [
139
- {
140
- "name": "authority",
141
- "docs": [
142
- "Admin or owner who can pause"
143
- ],
144
- "signer": true
145
- },
146
- {
147
- "name": "payer",
148
- "writable": true,
149
- "signer": true
150
- },
151
- {
152
- "name": "oracle_config",
153
- "docs": [
154
- "The oracle configuration"
155
- ],
156
- "writable": true
157
- }
158
- ],
159
- "args": [
160
- {
161
- "name": "paused",
162
- "type": "bool"
163
- }
164
- ]
165
- },
166
- {
167
- "name": "remove_from_whitelist",
168
- "docs": [
169
- "Remove an address from the oracle resolver whitelist (admin/owner only)"
170
- ],
171
- "discriminator": [
172
- 7,
173
- 144,
174
- 216,
175
- 239,
176
- 243,
177
- 236,
178
- 193,
179
- 235
180
- ],
181
- "accounts": [
182
- {
183
- "name": "authority",
184
- "signer": true
185
- },
186
- {
187
- "name": "payer",
188
- "writable": true,
189
- "signer": true
190
- },
191
- {
192
- "name": "oracle_config",
193
- "writable": true,
194
- "pda": {
195
- "seeds": [
196
- {
197
- "kind": "const",
198
- "value": [
199
- 99,
200
- 111,
201
- 110,
202
- 102,
203
- 105,
204
- 103
205
- ]
206
- },
207
- {
208
- "kind": "account",
209
- "path": "oracle_config.owner",
210
- "account": "OracleConfig"
211
- }
212
- ]
213
- }
214
- }
215
- ],
216
- "args": [
217
- {
218
- "name": "address",
219
- "type": "pubkey"
220
- }
221
- ]
222
- },
223
- {
224
- "name": "resolve_question",
225
- "docs": [
226
- "Resolve a question — whitelisted address only.",
227
- "Stores QuestionResult PDA and CPIs to CTF.set_payout in one transaction."
228
- ],
229
- "discriminator": [
230
- 52,
231
- 32,
232
- 224,
233
- 179,
234
- 180,
235
- 8,
236
- 0,
237
- 246
238
- ],
239
- "accounts": [
240
- {
241
- "name": "reporter",
242
- "docs": [
243
- "Whitelisted address that submits the resolution"
244
- ],
245
- "signer": true
246
- },
247
- {
248
- "name": "oracle_config",
249
- "docs": [
250
- "Oracle configuration"
251
- ],
252
- "writable": true,
253
- "pda": {
254
- "seeds": [
255
- {
256
- "kind": "const",
257
- "value": [
258
- 99,
259
- 111,
260
- 110,
261
- 102,
262
- 105,
263
- 103
264
- ]
265
- },
266
- {
267
- "kind": "account",
268
- "path": "oracle_config.owner",
269
- "account": "OracleConfig"
270
- }
271
- ]
272
- }
273
- },
274
- {
275
- "name": "question_result",
276
- "docs": [
277
- "QuestionResult PDA — seeds: [result, oracle_config, question_id]"
278
- ],
279
- "writable": true,
280
- "pda": {
281
- "seeds": [
282
- {
283
- "kind": "const",
284
- "value": [
285
- 114,
286
- 101,
287
- 115,
288
- 117,
289
- 108,
290
- 116
291
- ]
292
- },
293
- {
294
- "kind": "account",
295
- "path": "oracle_config"
296
- },
297
- {
298
- "kind": "arg",
299
- "path": "question_id"
300
- }
301
- ]
302
- }
303
- },
304
- {
305
- "name": "condition",
306
- "docs": [
307
- "Condition PDA in CTF — seeds: [condition, oracle_config, question_id] (CTF program)"
308
- ],
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
- }
340
- },
341
- {
342
- "name": "conditional_tokens_program",
343
- "docs": [
344
- "ConditionalTokens program"
345
- ]
346
- },
347
- {
348
- "name": "payer",
349
- "docs": [
350
- "Payer for QuestionResult account creation"
351
- ],
352
- "writable": true,
353
- "signer": true
354
- },
355
- {
356
- "name": "system_program",
357
- "address": "11111111111111111111111111111111"
358
- }
359
- ],
360
- "args": [
361
- {
362
- "name": "question_id",
363
- "type": {
364
- "array": [
365
- "u8",
366
- 32
367
- ]
368
- }
369
- },
370
- {
371
- "name": "outcome_count",
372
- "type": "u8"
373
- },
374
- {
375
- "name": "payout_numerators",
376
- "type": {
377
- "vec": "u64"
378
- }
379
- }
380
- ]
381
- },
382
- {
383
- "name": "transfer_ownership",
384
- "docs": [
385
- "Transfer ownership of the oracle to a new owner"
386
- ],
387
- "discriminator": [
388
- 65,
389
- 177,
390
- 215,
391
- 73,
392
- 53,
393
- 45,
394
- 99,
395
- 47
396
- ],
397
- "accounts": [
398
- {
399
- "name": "owner",
400
- "docs": [
401
- "Current owner"
402
- ],
403
- "signer": true
404
- },
405
- {
406
- "name": "oracle_config",
407
- "docs": [
408
- "The oracle configuration"
409
- ],
410
- "writable": true
411
- }
412
- ],
413
- "args": [
414
- {
415
- "name": "new_owner",
416
- "type": "pubkey"
417
- }
418
- ]
419
- },
420
- {
421
- "name": "update_admin",
422
- "docs": [
423
- "Update the admin of the oracle (owner only)"
424
- ],
425
- "discriminator": [
426
- 161,
427
- 176,
428
- 40,
429
- 213,
430
- 60,
431
- 184,
432
- 179,
433
- 228
434
- ],
435
- "accounts": [
436
- {
437
- "name": "owner",
438
- "docs": [
439
- "Current owner (only owner can change admin)"
440
- ],
441
- "signer": true
442
- },
443
- {
444
- "name": "payer",
445
- "writable": true,
446
- "signer": true
447
- },
448
- {
449
- "name": "oracle_config",
450
- "docs": [
451
- "The oracle configuration"
452
- ],
453
- "writable": true
454
- }
455
- ],
456
- "args": [
457
- {
458
- "name": "new_admin",
459
- "type": "pubkey"
460
- }
461
- ]
462
- }
463
- ],
464
- "accounts": [
465
- {
466
- "name": "OracleConfig",
467
- "discriminator": [
468
- 133,
469
- 196,
470
- 152,
471
- 50,
472
- 27,
473
- 21,
474
- 145,
475
- 254
476
- ]
477
- },
478
- {
479
- "name": "QuestionResult",
480
- "discriminator": [
481
- 247,
482
- 234,
483
- 174,
484
- 245,
485
- 224,
486
- 25,
487
- 254,
488
- 226
489
- ]
490
- }
491
- ],
492
- "events": [
493
- {
494
- "name": "WhitelistUpdated",
495
- "discriminator": [
496
- 205,
497
- 110,
498
- 205,
499
- 193,
500
- 238,
501
- 237,
502
- 220,
503
- 22
504
- ]
505
- }
506
- ],
507
- "types": [
508
- {
509
- "name": "OracleConfig",
510
- "type": {
511
- "kind": "struct",
512
- "fields": [
513
- {
514
- "name": "version",
515
- "type": "u8"
516
- },
517
- {
518
- "name": "owner",
519
- "type": "pubkey"
520
- },
521
- {
522
- "name": "admin",
523
- "type": "pubkey"
524
- },
525
- {
526
- "name": "question_count",
527
- "type": "u64"
528
- },
529
- {
530
- "name": "whitelist",
531
- "type": {
532
- "array": [
533
- "pubkey",
534
- 10
535
- ]
536
- }
537
- },
538
- {
539
- "name": "whitelist_len",
540
- "type": "u8"
541
- },
542
- {
543
- "name": "is_paused",
544
- "type": "bool"
545
- },
546
- {
547
- "name": "bump",
548
- "type": "u8"
549
- },
550
- {
551
- "name": "_reserved",
552
- "type": {
553
- "array": [
554
- "u8",
555
- 128
556
- ]
557
- }
558
- }
559
- ]
560
- }
561
- },
562
- {
563
- "name": "QuestionResult",
564
- "type": {
565
- "kind": "struct",
566
- "fields": [
567
- {
568
- "name": "version",
569
- "type": "u8"
570
- },
571
- {
572
- "name": "oracle_config",
573
- "type": "pubkey"
574
- },
575
- {
576
- "name": "question_id",
577
- "type": {
578
- "array": [
579
- "u8",
580
- 32
581
- ]
582
- }
583
- },
584
- {
585
- "name": "outcome_index",
586
- "type": "u8"
587
- },
588
- {
589
- "name": "outcome_count",
590
- "type": "u8"
591
- },
592
- {
593
- "name": "payout_numerators",
594
- "docs": [
595
- "Fixed-size payout array. Only [0..outcome_count] slots are meaningful."
596
- ],
597
- "type": {
598
- "array": [
599
- "u64",
600
- 8
601
- ]
602
- }
603
- },
604
- {
605
- "name": "is_resolved",
606
- "type": "bool"
607
- },
608
- {
609
- "name": "resolved_at",
610
- "type": "i64"
611
- },
612
- {
613
- "name": "reporter",
614
- "type": "pubkey"
615
- },
616
- {
617
- "name": "condition",
618
- "type": {
619
- "option": "pubkey"
620
- }
621
- },
622
- {
623
- "name": "bump",
624
- "type": "u8"
625
- },
626
- {
627
- "name": "_reserved",
628
- "type": {
629
- "array": [
630
- "u8",
631
- 64
632
- ]
633
- }
634
- }
635
- ]
636
- }
637
- },
638
- {
639
- "name": "WhitelistUpdated",
640
- "type": {
641
- "kind": "struct",
642
- "fields": [
643
- {
644
- "name": "oracle_config",
645
- "type": "pubkey"
646
- },
647
- {
648
- "name": "address",
649
- "type": "pubkey"
650
- },
651
- {
652
- "name": "added",
653
- "type": "bool"
654
- },
655
- {
656
- "name": "updated_by",
657
- "type": "pubkey"
658
- }
659
- ]
660
- }
661
- }
662
- ]
663
- }