@theliem/xmarket-sdk 3.0.0 → 3.1.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.
@@ -0,0 +1,699 @@
1
+ {
2
+ "address": "ADWF4J3nCJ2kWnCtycuem2jhu7amUqJWQG3oa5xF67QJ",
3
+ "metadata": {
4
+ "name": "market_oracle",
5
+ "version": "0.1.0",
6
+ "spec": "0.1.0",
7
+ "description": "Market Oracle program for XMarket prediction platform"
8
+ },
9
+ "instructions": [
10
+ {
11
+ "name": "claim_fees_share",
12
+ "discriminator": [
13
+ 252,
14
+ 175,
15
+ 173,
16
+ 207,
17
+ 195,
18
+ 75,
19
+ 96,
20
+ 53
21
+ ],
22
+ "accounts": [
23
+ {
24
+ "name": "user",
25
+ "signer": true
26
+ },
27
+ {
28
+ "name": "payer",
29
+ "writable": true,
30
+ "signer": true
31
+ },
32
+ {
33
+ "name": "market_oracle",
34
+ "writable": true,
35
+ "pda": {
36
+ "seeds": [
37
+ {
38
+ "kind": "const",
39
+ "value": [
40
+ 109,
41
+ 97,
42
+ 114,
43
+ 107,
44
+ 101,
45
+ 116,
46
+ 95,
47
+ 111,
48
+ 114,
49
+ 97,
50
+ 99,
51
+ 108,
52
+ 101
53
+ ]
54
+ },
55
+ {
56
+ "kind": "account",
57
+ "path": "market_oracle.question",
58
+ "account": "MarketOracleAccount"
59
+ }
60
+ ]
61
+ }
62
+ },
63
+ {
64
+ "name": "market_oracle_vault",
65
+ "docs": [
66
+ "Market oracle USDC vault (source of payout)"
67
+ ],
68
+ "writable": true,
69
+ "pda": {
70
+ "seeds": [
71
+ {
72
+ "kind": "account",
73
+ "path": "market_oracle"
74
+ },
75
+ {
76
+ "kind": "account",
77
+ "path": "token_program"
78
+ },
79
+ {
80
+ "kind": "account",
81
+ "path": "currency_mint"
82
+ }
83
+ ],
84
+ "program": {
85
+ "kind": "const",
86
+ "value": [
87
+ 140,
88
+ 151,
89
+ 37,
90
+ 143,
91
+ 78,
92
+ 36,
93
+ 137,
94
+ 241,
95
+ 187,
96
+ 61,
97
+ 16,
98
+ 41,
99
+ 20,
100
+ 142,
101
+ 13,
102
+ 131,
103
+ 11,
104
+ 90,
105
+ 19,
106
+ 153,
107
+ 218,
108
+ 255,
109
+ 16,
110
+ 132,
111
+ 4,
112
+ 142,
113
+ 123,
114
+ 216,
115
+ 219,
116
+ 233,
117
+ 248,
118
+ 89
119
+ ]
120
+ }
121
+ }
122
+ },
123
+ {
124
+ "name": "currency_mint"
125
+ },
126
+ {
127
+ "name": "qt_mint",
128
+ "docs": [
129
+ "QT (MST) mint — for burning"
130
+ ],
131
+ "writable": true
132
+ },
133
+ {
134
+ "name": "user_qt_ata",
135
+ "docs": [
136
+ "User's QT token account (burned)"
137
+ ],
138
+ "writable": true,
139
+ "pda": {
140
+ "seeds": [
141
+ {
142
+ "kind": "account",
143
+ "path": "user"
144
+ },
145
+ {
146
+ "kind": "account",
147
+ "path": "token_program"
148
+ },
149
+ {
150
+ "kind": "account",
151
+ "path": "qt_mint"
152
+ }
153
+ ],
154
+ "program": {
155
+ "kind": "const",
156
+ "value": [
157
+ 140,
158
+ 151,
159
+ 37,
160
+ 143,
161
+ 78,
162
+ 36,
163
+ 137,
164
+ 241,
165
+ 187,
166
+ 61,
167
+ 16,
168
+ 41,
169
+ 20,
170
+ 142,
171
+ 13,
172
+ 131,
173
+ 11,
174
+ 90,
175
+ 19,
176
+ 153,
177
+ 218,
178
+ 255,
179
+ 16,
180
+ 132,
181
+ 4,
182
+ 142,
183
+ 123,
184
+ 216,
185
+ 219,
186
+ 233,
187
+ 248,
188
+ 89
189
+ ]
190
+ }
191
+ }
192
+ },
193
+ {
194
+ "name": "user_currency_ata",
195
+ "docs": [
196
+ "User's USDC token account (receives payout)"
197
+ ],
198
+ "writable": true
199
+ },
200
+ {
201
+ "name": "user_claim_record",
202
+ "writable": true,
203
+ "pda": {
204
+ "seeds": [
205
+ {
206
+ "kind": "const",
207
+ "value": [
208
+ 117,
209
+ 115,
210
+ 101,
211
+ 114,
212
+ 95,
213
+ 99,
214
+ 108,
215
+ 97,
216
+ 105,
217
+ 109
218
+ ]
219
+ },
220
+ {
221
+ "kind": "account",
222
+ "path": "market_oracle"
223
+ },
224
+ {
225
+ "kind": "account",
226
+ "path": "user"
227
+ }
228
+ ]
229
+ }
230
+ },
231
+ {
232
+ "name": "token_program",
233
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
234
+ },
235
+ {
236
+ "name": "associated_token_program",
237
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
238
+ },
239
+ {
240
+ "name": "system_program",
241
+ "address": "11111111111111111111111111111111"
242
+ }
243
+ ],
244
+ "args": []
245
+ },
246
+ {
247
+ "name": "distribute_fees_share",
248
+ "discriminator": [
249
+ 18,
250
+ 122,
251
+ 69,
252
+ 52,
253
+ 253,
254
+ 171,
255
+ 106,
256
+ 233
257
+ ],
258
+ "accounts": [
259
+ {
260
+ "name": "operator",
261
+ "docs": [
262
+ "question_market_config PDA — signs via CPI"
263
+ ],
264
+ "signer": true
265
+ },
266
+ {
267
+ "name": "market_oracle",
268
+ "writable": true,
269
+ "pda": {
270
+ "seeds": [
271
+ {
272
+ "kind": "const",
273
+ "value": [
274
+ 109,
275
+ 97,
276
+ 114,
277
+ 107,
278
+ 101,
279
+ 116,
280
+ 95,
281
+ 111,
282
+ 114,
283
+ 97,
284
+ 99,
285
+ 108,
286
+ 101
287
+ ]
288
+ },
289
+ {
290
+ "kind": "account",
291
+ "path": "market_oracle.question",
292
+ "account": "MarketOracleAccount"
293
+ }
294
+ ]
295
+ }
296
+ },
297
+ {
298
+ "name": "qt_mint",
299
+ "docs": [
300
+ "QT (MST) token mint — supply snapshot taken here"
301
+ ]
302
+ }
303
+ ],
304
+ "args": []
305
+ },
306
+ {
307
+ "name": "initialize_market",
308
+ "discriminator": [
309
+ 35,
310
+ 35,
311
+ 189,
312
+ 193,
313
+ 155,
314
+ 48,
315
+ 170,
316
+ 203
317
+ ],
318
+ "accounts": [
319
+ {
320
+ "name": "operator",
321
+ "docs": [
322
+ "question_market_config PDA — signs via CPI from question-market"
323
+ ],
324
+ "signer": true
325
+ },
326
+ {
327
+ "name": "payer",
328
+ "writable": true,
329
+ "signer": true
330
+ },
331
+ {
332
+ "name": "question"
333
+ },
334
+ {
335
+ "name": "market_oracle",
336
+ "writable": true,
337
+ "pda": {
338
+ "seeds": [
339
+ {
340
+ "kind": "const",
341
+ "value": [
342
+ 109,
343
+ 97,
344
+ 114,
345
+ 107,
346
+ 101,
347
+ 116,
348
+ 95,
349
+ 111,
350
+ 114,
351
+ 97,
352
+ 99,
353
+ 108,
354
+ 101
355
+ ]
356
+ },
357
+ {
358
+ "kind": "account",
359
+ "path": "question"
360
+ }
361
+ ]
362
+ }
363
+ },
364
+ {
365
+ "name": "currency_mint"
366
+ },
367
+ {
368
+ "name": "market_oracle_vault",
369
+ "docs": [
370
+ "Market oracle USDC vault — ATA of market_oracle PDA",
371
+ "This is set as fee_recipient in CLOB config for this market"
372
+ ],
373
+ "writable": true,
374
+ "pda": {
375
+ "seeds": [
376
+ {
377
+ "kind": "account",
378
+ "path": "market_oracle"
379
+ },
380
+ {
381
+ "kind": "account",
382
+ "path": "token_program"
383
+ },
384
+ {
385
+ "kind": "account",
386
+ "path": "currency_mint"
387
+ }
388
+ ],
389
+ "program": {
390
+ "kind": "const",
391
+ "value": [
392
+ 140,
393
+ 151,
394
+ 37,
395
+ 143,
396
+ 78,
397
+ 36,
398
+ 137,
399
+ 241,
400
+ 187,
401
+ 61,
402
+ 16,
403
+ 41,
404
+ 20,
405
+ 142,
406
+ 13,
407
+ 131,
408
+ 11,
409
+ 90,
410
+ 19,
411
+ 153,
412
+ 218,
413
+ 255,
414
+ 16,
415
+ 132,
416
+ 4,
417
+ 142,
418
+ 123,
419
+ 216,
420
+ 219,
421
+ 233,
422
+ 248,
423
+ 89
424
+ ]
425
+ }
426
+ }
427
+ },
428
+ {
429
+ "name": "token_program",
430
+ "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
431
+ },
432
+ {
433
+ "name": "associated_token_program",
434
+ "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
435
+ },
436
+ {
437
+ "name": "system_program",
438
+ "address": "11111111111111111111111111111111"
439
+ },
440
+ {
441
+ "name": "rent",
442
+ "address": "SysvarRent111111111111111111111111111111111"
443
+ }
444
+ ],
445
+ "args": [
446
+ {
447
+ "name": "creator",
448
+ "type": "pubkey"
449
+ }
450
+ ]
451
+ }
452
+ ],
453
+ "accounts": [
454
+ {
455
+ "name": "MarketOracleAccount",
456
+ "discriminator": [
457
+ 94,
458
+ 161,
459
+ 62,
460
+ 46,
461
+ 191,
462
+ 0,
463
+ 214,
464
+ 182
465
+ ]
466
+ },
467
+ {
468
+ "name": "UserClaimRecord",
469
+ "discriminator": [
470
+ 85,
471
+ 4,
472
+ 42,
473
+ 63,
474
+ 186,
475
+ 93,
476
+ 76,
477
+ 140
478
+ ]
479
+ }
480
+ ],
481
+ "events": [
482
+ {
483
+ "name": "FeesShareClaimed",
484
+ "discriminator": [
485
+ 134,
486
+ 23,
487
+ 132,
488
+ 206,
489
+ 108,
490
+ 241,
491
+ 26,
492
+ 120
493
+ ]
494
+ },
495
+ {
496
+ "name": "FeesShareDistributed",
497
+ "discriminator": [
498
+ 99,
499
+ 92,
500
+ 62,
501
+ 91,
502
+ 18,
503
+ 188,
504
+ 164,
505
+ 238
506
+ ]
507
+ },
508
+ {
509
+ "name": "MarketInitialized",
510
+ "discriminator": [
511
+ 134,
512
+ 160,
513
+ 122,
514
+ 87,
515
+ 50,
516
+ 3,
517
+ 255,
518
+ 81
519
+ ]
520
+ }
521
+ ],
522
+ "types": [
523
+ {
524
+ "name": "FeesShareClaimed",
525
+ "type": {
526
+ "kind": "struct",
527
+ "fields": [
528
+ {
529
+ "name": "market_oracle",
530
+ "type": "pubkey"
531
+ },
532
+ {
533
+ "name": "user",
534
+ "type": "pubkey"
535
+ },
536
+ {
537
+ "name": "qt_burned",
538
+ "type": "u64"
539
+ },
540
+ {
541
+ "name": "fees_share",
542
+ "type": "u64"
543
+ }
544
+ ]
545
+ }
546
+ },
547
+ {
548
+ "name": "FeesShareDistributed",
549
+ "type": {
550
+ "kind": "struct",
551
+ "fields": [
552
+ {
553
+ "name": "market_oracle",
554
+ "type": "pubkey"
555
+ },
556
+ {
557
+ "name": "qt_mint",
558
+ "type": "pubkey"
559
+ },
560
+ {
561
+ "name": "qt_total_supply",
562
+ "type": "u64"
563
+ }
564
+ ]
565
+ }
566
+ },
567
+ {
568
+ "name": "MarketInitialized",
569
+ "type": {
570
+ "kind": "struct",
571
+ "fields": [
572
+ {
573
+ "name": "market_oracle",
574
+ "type": "pubkey"
575
+ },
576
+ {
577
+ "name": "question",
578
+ "type": "pubkey"
579
+ },
580
+ {
581
+ "name": "question_market_config",
582
+ "type": "pubkey"
583
+ },
584
+ {
585
+ "name": "currency_mint",
586
+ "type": "pubkey"
587
+ },
588
+ {
589
+ "name": "creator",
590
+ "type": "pubkey"
591
+ },
592
+ {
593
+ "name": "vault",
594
+ "type": "pubkey"
595
+ }
596
+ ]
597
+ }
598
+ },
599
+ {
600
+ "name": "MarketOracleAccount",
601
+ "type": {
602
+ "kind": "struct",
603
+ "fields": [
604
+ {
605
+ "name": "version",
606
+ "type": "u8"
607
+ },
608
+ {
609
+ "name": "question",
610
+ "docs": [
611
+ "The question PDA this oracle is for"
612
+ ],
613
+ "type": "pubkey"
614
+ },
615
+ {
616
+ "name": "question_market_config",
617
+ "docs": [
618
+ "question_market program config — the operator"
619
+ ],
620
+ "type": "pubkey"
621
+ },
622
+ {
623
+ "name": "currency_mint",
624
+ "type": "pubkey"
625
+ },
626
+ {
627
+ "name": "creator",
628
+ "type": "pubkey"
629
+ },
630
+ {
631
+ "name": "qt_mint",
632
+ "docs": [
633
+ "MST token mint — set at distribute_fees_share"
634
+ ],
635
+ "type": "pubkey"
636
+ },
637
+ {
638
+ "name": "fees_distributed",
639
+ "docs": [
640
+ "True after distribute_fees_share is called"
641
+ ],
642
+ "type": "bool"
643
+ },
644
+ {
645
+ "name": "qt_total_supply",
646
+ "docs": [
647
+ "Snapshot of qt total supply at distribution time"
648
+ ],
649
+ "type": "u64"
650
+ },
651
+ {
652
+ "name": "total_claimed",
653
+ "docs": [
654
+ "Running total of USDC paid out to claimers"
655
+ ],
656
+ "type": "u64"
657
+ },
658
+ {
659
+ "name": "bump",
660
+ "type": "u8"
661
+ },
662
+ {
663
+ "name": "_reserved",
664
+ "type": {
665
+ "array": [
666
+ "u8",
667
+ 64
668
+ ]
669
+ }
670
+ }
671
+ ]
672
+ }
673
+ },
674
+ {
675
+ "name": "UserClaimRecord",
676
+ "type": {
677
+ "kind": "struct",
678
+ "fields": [
679
+ {
680
+ "name": "user",
681
+ "type": "pubkey"
682
+ },
683
+ {
684
+ "name": "market_oracle",
685
+ "type": "pubkey"
686
+ },
687
+ {
688
+ "name": "has_claimed",
689
+ "type": "bool"
690
+ },
691
+ {
692
+ "name": "bump",
693
+ "type": "u8"
694
+ }
695
+ ]
696
+ }
697
+ }
698
+ ]
699
+ }
@@ -442,6 +442,11 @@
442
442
  ],
443
443
  "signer": true
444
444
  },
445
+ {
446
+ "name": "payer",
447
+ "writable": true,
448
+ "signer": true
449
+ },
445
450
  {
446
451
  "name": "oracle_config",
447
452
  "docs": [