@vercora-protocol/sdk 0.0.1 → 0.0.4
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/client.d.ts +55 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +195 -30
- package/dist/client.js.map +1 -1
- package/dist/generated/vercora.d.ts +469 -109
- package/dist/generated/vercora.d.ts.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/pda.d.ts +9 -2
- package/dist/pda.d.ts.map +1 -1
- package/dist/pda.js +14 -7
- package/dist/pda.js.map +1 -1
- package/dist/types.d.ts +75 -24
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
|
@@ -13,6 +13,98 @@ export type Vercora = {
|
|
|
13
13
|
"description": "Vercora prediction market program (Anchor)";
|
|
14
14
|
};
|
|
15
15
|
"instructions": [
|
|
16
|
+
{
|
|
17
|
+
"name": "abandonMarket";
|
|
18
|
+
"discriminator": [
|
|
19
|
+
49,
|
|
20
|
+
244,
|
|
21
|
+
193,
|
|
22
|
+
21,
|
|
23
|
+
128,
|
|
24
|
+
114,
|
|
25
|
+
96,
|
|
26
|
+
65
|
|
27
|
+
];
|
|
28
|
+
"accounts": [
|
|
29
|
+
{
|
|
30
|
+
"name": "creator";
|
|
31
|
+
"writable": true;
|
|
32
|
+
"signer": true;
|
|
33
|
+
"relations": [
|
|
34
|
+
"market"
|
|
35
|
+
];
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
"name": "market";
|
|
39
|
+
"writable": true;
|
|
40
|
+
"pda": {
|
|
41
|
+
"seeds": [
|
|
42
|
+
{
|
|
43
|
+
"kind": "const";
|
|
44
|
+
"value": [
|
|
45
|
+
109,
|
|
46
|
+
97,
|
|
47
|
+
114,
|
|
48
|
+
107,
|
|
49
|
+
101,
|
|
50
|
+
116
|
|
51
|
+
];
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
"kind": "account";
|
|
55
|
+
"path": "creator";
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"kind": "arg";
|
|
59
|
+
"path": "args.market_id";
|
|
60
|
+
}
|
|
61
|
+
];
|
|
62
|
+
};
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"name": "vault";
|
|
66
|
+
"writable": true;
|
|
67
|
+
"pda": {
|
|
68
|
+
"seeds": [
|
|
69
|
+
{
|
|
70
|
+
"kind": "account";
|
|
71
|
+
"path": "market";
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"kind": "const";
|
|
75
|
+
"value": [
|
|
76
|
+
118,
|
|
77
|
+
97,
|
|
78
|
+
117,
|
|
79
|
+
108,
|
|
80
|
+
116
|
|
81
|
+
];
|
|
82
|
+
}
|
|
83
|
+
];
|
|
84
|
+
};
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "collateralMint";
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
"name": "collateralTokenProgram";
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"name": "systemProgram";
|
|
94
|
+
"address": "11111111111111111111111111111111";
|
|
95
|
+
}
|
|
96
|
+
];
|
|
97
|
+
"args": [
|
|
98
|
+
{
|
|
99
|
+
"name": "args";
|
|
100
|
+
"type": {
|
|
101
|
+
"defined": {
|
|
102
|
+
"name": "abandonMarketArgs";
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
];
|
|
107
|
+
},
|
|
16
108
|
{
|
|
17
109
|
"name": "addAllowedCollateralMint";
|
|
18
110
|
"discriminator": [
|
|
@@ -525,35 +617,35 @@ export type Vercora = {
|
|
|
525
617
|
};
|
|
526
618
|
},
|
|
527
619
|
{
|
|
528
|
-
"name": "
|
|
620
|
+
"name": "marketOutcome0";
|
|
529
621
|
"optional": true;
|
|
530
622
|
},
|
|
531
623
|
{
|
|
532
|
-
"name": "
|
|
624
|
+
"name": "marketOutcome1";
|
|
533
625
|
"optional": true;
|
|
534
626
|
},
|
|
535
627
|
{
|
|
536
|
-
"name": "
|
|
628
|
+
"name": "marketOutcome2";
|
|
537
629
|
"optional": true;
|
|
538
630
|
},
|
|
539
631
|
{
|
|
540
|
-
"name": "
|
|
632
|
+
"name": "marketOutcome3";
|
|
541
633
|
"optional": true;
|
|
542
634
|
},
|
|
543
635
|
{
|
|
544
|
-
"name": "
|
|
636
|
+
"name": "marketOutcome4";
|
|
545
637
|
"optional": true;
|
|
546
638
|
},
|
|
547
639
|
{
|
|
548
|
-
"name": "
|
|
640
|
+
"name": "marketOutcome5";
|
|
549
641
|
"optional": true;
|
|
550
642
|
},
|
|
551
643
|
{
|
|
552
|
-
"name": "
|
|
644
|
+
"name": "marketOutcome6";
|
|
553
645
|
"optional": true;
|
|
554
646
|
},
|
|
555
647
|
{
|
|
556
|
-
"name": "
|
|
648
|
+
"name": "marketOutcome7";
|
|
557
649
|
"optional": true;
|
|
558
650
|
}
|
|
559
651
|
];
|
|
@@ -644,10 +736,6 @@ export type Vercora = {
|
|
|
644
736
|
"name": "platformFeeLamports";
|
|
645
737
|
"type": "u64";
|
|
646
738
|
},
|
|
647
|
-
{
|
|
648
|
-
"name": "parimutuelPenaltyProtocolShareBps";
|
|
649
|
-
"type": "u16";
|
|
650
|
-
},
|
|
651
739
|
{
|
|
652
740
|
"name": "parimutuelWithdrawPlatformFeeBps";
|
|
653
741
|
"type": "u16";
|
|
@@ -751,6 +839,71 @@ export type Vercora = {
|
|
|
751
839
|
}
|
|
752
840
|
];
|
|
753
841
|
},
|
|
842
|
+
{
|
|
843
|
+
"name": "initializeMarketOutcome";
|
|
844
|
+
"discriminator": [
|
|
845
|
+
24,
|
|
846
|
+
119,
|
|
847
|
+
180,
|
|
848
|
+
59,
|
|
849
|
+
123,
|
|
850
|
+
232,
|
|
851
|
+
13,
|
|
852
|
+
187
|
|
853
|
+
];
|
|
854
|
+
"accounts": [
|
|
855
|
+
{
|
|
856
|
+
"name": "payer";
|
|
857
|
+
"writable": true;
|
|
858
|
+
"signer": true;
|
|
859
|
+
},
|
|
860
|
+
{
|
|
861
|
+
"name": "market";
|
|
862
|
+
"pda": {
|
|
863
|
+
"seeds": [
|
|
864
|
+
{
|
|
865
|
+
"kind": "const";
|
|
866
|
+
"value": [
|
|
867
|
+
109,
|
|
868
|
+
97,
|
|
869
|
+
114,
|
|
870
|
+
107,
|
|
871
|
+
101,
|
|
872
|
+
116
|
|
873
|
+
];
|
|
874
|
+
},
|
|
875
|
+
{
|
|
876
|
+
"kind": "account";
|
|
877
|
+
"path": "market.creator";
|
|
878
|
+
"account": "market";
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
"kind": "arg";
|
|
882
|
+
"path": "args.market_id";
|
|
883
|
+
}
|
|
884
|
+
];
|
|
885
|
+
};
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"name": "systemProgram";
|
|
889
|
+
"address": "11111111111111111111111111111111";
|
|
890
|
+
},
|
|
891
|
+
{
|
|
892
|
+
"name": "marketOutcome";
|
|
893
|
+
"writable": true;
|
|
894
|
+
}
|
|
895
|
+
];
|
|
896
|
+
"args": [
|
|
897
|
+
{
|
|
898
|
+
"name": "args";
|
|
899
|
+
"type": {
|
|
900
|
+
"defined": {
|
|
901
|
+
"name": "initializeMarketOutcomeArgs";
|
|
902
|
+
};
|
|
903
|
+
};
|
|
904
|
+
}
|
|
905
|
+
];
|
|
906
|
+
},
|
|
754
907
|
{
|
|
755
908
|
"name": "initializeMarketResolver";
|
|
756
909
|
"discriminator": [
|
|
@@ -2015,7 +2168,7 @@ export type Vercora = {
|
|
|
2015
2168
|
"writable": true;
|
|
2016
2169
|
},
|
|
2017
2170
|
{
|
|
2018
|
-
"name": "
|
|
2171
|
+
"name": "marketOutcome";
|
|
2019
2172
|
"writable": true;
|
|
2020
2173
|
}
|
|
2021
2174
|
];
|
|
@@ -2101,10 +2254,6 @@ export type Vercora = {
|
|
|
2101
2254
|
"name": "platformFeeLamports";
|
|
2102
2255
|
"type": "u64";
|
|
2103
2256
|
},
|
|
2104
|
-
{
|
|
2105
|
-
"name": "parimutuelPenaltyProtocolShareBps";
|
|
2106
|
-
"type": "u16";
|
|
2107
|
-
},
|
|
2108
2257
|
{
|
|
2109
2258
|
"name": "parimutuelWithdrawPlatformFeeBps";
|
|
2110
2259
|
"type": "u16";
|
|
@@ -2198,6 +2347,96 @@ export type Vercora = {
|
|
|
2198
2347
|
}
|
|
2199
2348
|
];
|
|
2200
2349
|
},
|
|
2350
|
+
{
|
|
2351
|
+
"name": "updateParimutuelState";
|
|
2352
|
+
"discriminator": [
|
|
2353
|
+
253,
|
|
2354
|
+
174,
|
|
2355
|
+
237,
|
|
2356
|
+
38,
|
|
2357
|
+
172,
|
|
2358
|
+
145,
|
|
2359
|
+
202,
|
|
2360
|
+
192
|
|
2361
|
+
];
|
|
2362
|
+
"accounts": [
|
|
2363
|
+
{
|
|
2364
|
+
"name": "creator";
|
|
2365
|
+
"docs": [
|
|
2366
|
+
"Must be the market creator — enforced by constraint on `market`."
|
|
2367
|
+
];
|
|
2368
|
+
"writable": true;
|
|
2369
|
+
"signer": true;
|
|
2370
|
+
"relations": [
|
|
2371
|
+
"market"
|
|
2372
|
+
];
|
|
2373
|
+
},
|
|
2374
|
+
{
|
|
2375
|
+
"name": "market";
|
|
2376
|
+
"docs": [
|
|
2377
|
+
"PDA is derived from the *on-chain* `market.creator` field so that the address",
|
|
2378
|
+
"validation passes regardless of who the caller is. Authorization is then enforced",
|
|
2379
|
+
"by `has_one = creator`, which checks `market.creator == creator.key()` and",
|
|
2380
|
+
"returns `ConfigUnauthorized` when it fails."
|
|
2381
|
+
];
|
|
2382
|
+
"pda": {
|
|
2383
|
+
"seeds": [
|
|
2384
|
+
{
|
|
2385
|
+
"kind": "const";
|
|
2386
|
+
"value": [
|
|
2387
|
+
109,
|
|
2388
|
+
97,
|
|
2389
|
+
114,
|
|
2390
|
+
107,
|
|
2391
|
+
101,
|
|
2392
|
+
116
|
|
2393
|
+
];
|
|
2394
|
+
},
|
|
2395
|
+
{
|
|
2396
|
+
"kind": "account";
|
|
2397
|
+
"path": "market.creator";
|
|
2398
|
+
"account": "market";
|
|
2399
|
+
},
|
|
2400
|
+
{
|
|
2401
|
+
"kind": "arg";
|
|
2402
|
+
"path": "args.market_id";
|
|
2403
|
+
}
|
|
2404
|
+
];
|
|
2405
|
+
};
|
|
2406
|
+
},
|
|
2407
|
+
{
|
|
2408
|
+
"name": "parimutuelState";
|
|
2409
|
+
"writable": true;
|
|
2410
|
+
"pda": {
|
|
2411
|
+
"seeds": [
|
|
2412
|
+
{
|
|
2413
|
+
"kind": "const";
|
|
2414
|
+
"value": [
|
|
2415
|
+
112,
|
|
2416
|
+
97,
|
|
2417
|
+
114,
|
|
2418
|
+
105
|
|
2419
|
+
];
|
|
2420
|
+
},
|
|
2421
|
+
{
|
|
2422
|
+
"kind": "account";
|
|
2423
|
+
"path": "market";
|
|
2424
|
+
}
|
|
2425
|
+
];
|
|
2426
|
+
};
|
|
2427
|
+
}
|
|
2428
|
+
];
|
|
2429
|
+
"args": [
|
|
2430
|
+
{
|
|
2431
|
+
"name": "args";
|
|
2432
|
+
"type": {
|
|
2433
|
+
"defined": {
|
|
2434
|
+
"name": "updateParimutuelStateArgs";
|
|
2435
|
+
};
|
|
2436
|
+
};
|
|
2437
|
+
}
|
|
2438
|
+
];
|
|
2439
|
+
},
|
|
2201
2440
|
{
|
|
2202
2441
|
"name": "upsertUserProfile";
|
|
2203
2442
|
"discriminator": [
|
|
@@ -2493,7 +2732,10 @@ export type Vercora = {
|
|
|
2493
2732
|
"writable": true;
|
|
2494
2733
|
},
|
|
2495
2734
|
{
|
|
2496
|
-
"name": "
|
|
2735
|
+
"name": "marketOutcome";
|
|
2736
|
+
"docs": [
|
|
2737
|
+
"for invalid `outcome_index` (handler returns `InvalidOutcomeIndex` before touching data)."
|
|
2738
|
+
];
|
|
2497
2739
|
"writable": true;
|
|
2498
2740
|
},
|
|
2499
2741
|
{
|
|
@@ -2567,16 +2809,16 @@ export type Vercora = {
|
|
|
2567
2809
|
];
|
|
2568
2810
|
},
|
|
2569
2811
|
{
|
|
2570
|
-
"name": "
|
|
2812
|
+
"name": "marketOutcome";
|
|
2571
2813
|
"discriminator": [
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2814
|
+
131,
|
|
2815
|
+
12,
|
|
2816
|
+
34,
|
|
2817
|
+
52,
|
|
2818
|
+
115,
|
|
2819
|
+
137,
|
|
2820
|
+
62,
|
|
2821
|
+
114
|
|
2580
2822
|
];
|
|
2581
2823
|
},
|
|
2582
2824
|
{
|
|
@@ -2744,95 +2986,140 @@ export type Vercora = {
|
|
|
2744
2986
|
{
|
|
2745
2987
|
"code": 6019;
|
|
2746
2988
|
"name": "outcomeTallyOverflow";
|
|
2747
|
-
"msg": "
|
|
2989
|
+
"msg": "Arithmetic overflow in market math";
|
|
2748
2990
|
},
|
|
2749
2991
|
{
|
|
2750
2992
|
"code": 6020;
|
|
2751
2993
|
"name": "outcomeTallyEmpty";
|
|
2752
|
-
"msg": "
|
|
2994
|
+
"msg": "Resolution vote count for this outcome is zero";
|
|
2753
2995
|
},
|
|
2754
2996
|
{
|
|
2755
2997
|
"code": 6021;
|
|
2998
|
+
"name": "outcomeLabelEmpty";
|
|
2999
|
+
"msg": "Outcome label cannot be empty";
|
|
3000
|
+
},
|
|
3001
|
+
{
|
|
3002
|
+
"code": 6022;
|
|
3003
|
+
"name": "outcomeLabelTooLong";
|
|
3004
|
+
"msg": "Outcome label exceeds max length";
|
|
3005
|
+
},
|
|
3006
|
+
{
|
|
3007
|
+
"code": 6023;
|
|
3008
|
+
"name": "outcomeInvestmentCapExceeded";
|
|
3009
|
+
"msg": "Stake or mint would exceed max_outcome_investment for this outcome";
|
|
3010
|
+
},
|
|
3011
|
+
{
|
|
3012
|
+
"code": 6024;
|
|
3013
|
+
"name": "outcomeNotInitialized";
|
|
3014
|
+
"msg": "Market outcome PDA not initialized — call initialize_market_outcome first";
|
|
3015
|
+
},
|
|
3016
|
+
{
|
|
3017
|
+
"code": 6025;
|
|
2756
3018
|
"name": "invalidMintCompleteSetRemainingAccounts";
|
|
2757
3019
|
"msg": "mint_complete_set: remaining accounts must be [outcome_mint_i, user_ata_i] pairs; len = 2 * outcome_count";
|
|
2758
3020
|
},
|
|
2759
3021
|
{
|
|
2760
|
-
"code":
|
|
3022
|
+
"code": 6026;
|
|
2761
3023
|
"name": "displayNameTooLong";
|
|
2762
3024
|
"msg": "Display name exceeds 50 bytes";
|
|
2763
3025
|
},
|
|
2764
3026
|
{
|
|
2765
|
-
"code":
|
|
3027
|
+
"code": 6027;
|
|
2766
3028
|
"name": "urlTooLong";
|
|
2767
3029
|
"msg": "URL exceeds 100 bytes";
|
|
2768
3030
|
},
|
|
2769
3031
|
{
|
|
2770
|
-
"code":
|
|
3032
|
+
"code": 6028;
|
|
2771
3033
|
"name": "emptyTitle";
|
|
2772
3034
|
"msg": "Market title cannot be empty";
|
|
2773
3035
|
},
|
|
2774
3036
|
{
|
|
2775
|
-
"code":
|
|
3037
|
+
"code": 6029;
|
|
2776
3038
|
"name": "titleTooLong";
|
|
2777
3039
|
"msg": "Market title exceeds 128 bytes";
|
|
2778
3040
|
},
|
|
2779
3041
|
{
|
|
2780
|
-
"code":
|
|
3042
|
+
"code": 6030;
|
|
2781
3043
|
"name": "marketCategoryInactive";
|
|
2782
3044
|
"msg": "Market category is inactive";
|
|
2783
3045
|
},
|
|
2784
3046
|
{
|
|
2785
|
-
"code":
|
|
3047
|
+
"code": 6031;
|
|
2786
3048
|
"name": "marketCategoryNameEmpty";
|
|
2787
3049
|
"msg": "Market category name cannot be empty";
|
|
2788
3050
|
},
|
|
2789
3051
|
{
|
|
2790
|
-
"code":
|
|
3052
|
+
"code": 6032;
|
|
2791
3053
|
"name": "marketCategoryNameTooLong";
|
|
2792
3054
|
"msg": "Market category name exceeds max length";
|
|
2793
3055
|
},
|
|
2794
3056
|
{
|
|
2795
|
-
"code":
|
|
3057
|
+
"code": 6033;
|
|
2796
3058
|
"name": "invalidCategoryId";
|
|
2797
3059
|
"msg": "category_id must match global_config.next_category_id";
|
|
2798
3060
|
},
|
|
2799
3061
|
{
|
|
2800
|
-
"code":
|
|
3062
|
+
"code": 6034;
|
|
2801
3063
|
"name": "wrongMarketType";
|
|
2802
3064
|
"msg": "This instruction requires a different market type";
|
|
2803
3065
|
},
|
|
2804
3066
|
{
|
|
2805
|
-
"code":
|
|
3067
|
+
"code": 6035;
|
|
2806
3068
|
"name": "invalidParimutuelPenalty";
|
|
2807
3069
|
"msg": "Parimutuel penalty or split parameters are invalid";
|
|
2808
3070
|
},
|
|
2809
3071
|
{
|
|
2810
|
-
"code":
|
|
3072
|
+
"code": 6036;
|
|
2811
3073
|
"name": "parimutuelNotInitialized";
|
|
2812
3074
|
"msg": "Parimutuel state not initialized for this market";
|
|
2813
3075
|
},
|
|
2814
3076
|
{
|
|
2815
|
-
"code":
|
|
3077
|
+
"code": 6037;
|
|
2816
3078
|
"name": "parimutuelInsufficientStake";
|
|
2817
3079
|
"msg": "Stake or withdrawal amount exceeds balance";
|
|
2818
3080
|
},
|
|
2819
3081
|
{
|
|
2820
|
-
"code":
|
|
3082
|
+
"code": 6038;
|
|
2821
3083
|
"name": "parimutuelEmptyWinningPool";
|
|
2822
3084
|
"msg": "Winning outcome pool is empty — cannot claim";
|
|
2823
3085
|
},
|
|
2824
3086
|
{
|
|
2825
|
-
"code":
|
|
3087
|
+
"code": 6039;
|
|
2826
3088
|
"name": "parimutuelAlreadyClaimed";
|
|
2827
3089
|
"msg": "Position already claimed";
|
|
2828
3090
|
},
|
|
2829
3091
|
{
|
|
2830
|
-
"code":
|
|
3092
|
+
"code": 6040;
|
|
2831
3093
|
"name": "onlyMarketCreator";
|
|
2832
3094
|
"msg": "Only the market creator may initialize resolver accounts";
|
|
3095
|
+
},
|
|
3096
|
+
{
|
|
3097
|
+
"code": 6041;
|
|
3098
|
+
"name": "vaultNotEmpty";
|
|
3099
|
+
"msg": "Vault must be empty before abandoning the market";
|
|
2833
3100
|
}
|
|
2834
3101
|
];
|
|
2835
3102
|
"types": [
|
|
3103
|
+
{
|
|
3104
|
+
"name": "abandonMarketArgs";
|
|
3105
|
+
"docs": [
|
|
3106
|
+
"Abandon an incomplete market and recover all rent.",
|
|
3107
|
+
"",
|
|
3108
|
+
"Only the market creator may call this, and only while the vault is empty",
|
|
3109
|
+
"(i.e. no user funds have ever been deposited). This is the primary",
|
|
3110
|
+
"recovery path for markets whose second setup transaction (resolver PDAs /",
|
|
3111
|
+
"pari-mutuel pool) never landed."
|
|
3112
|
+
];
|
|
3113
|
+
"type": {
|
|
3114
|
+
"kind": "struct";
|
|
3115
|
+
"fields": [
|
|
3116
|
+
{
|
|
3117
|
+
"name": "marketId";
|
|
3118
|
+
"type": "u64";
|
|
3119
|
+
}
|
|
3120
|
+
];
|
|
3121
|
+
};
|
|
3122
|
+
},
|
|
2836
3123
|
{
|
|
2837
3124
|
"name": "allowedMint";
|
|
2838
3125
|
"docs": [
|
|
@@ -2911,6 +3198,13 @@ export type Vercora = {
|
|
|
2911
3198
|
];
|
|
2912
3199
|
"type": "u8";
|
|
2913
3200
|
},
|
|
3201
|
+
{
|
|
3202
|
+
"name": "maxOutcomeInvestment";
|
|
3203
|
+
"docs": [
|
|
3204
|
+
"Max net collateral per outcome in mint **base units**; `0` = unlimited."
|
|
3205
|
+
];
|
|
3206
|
+
"type": "u64";
|
|
3207
|
+
},
|
|
2914
3208
|
{
|
|
2915
3209
|
"name": "title";
|
|
2916
3210
|
"docs": [
|
|
@@ -2994,15 +3288,6 @@ export type Vercora = {
|
|
|
2994
3288
|
];
|
|
2995
3289
|
"type": "u64";
|
|
2996
3290
|
},
|
|
2997
|
-
{
|
|
2998
|
-
"name": "parimutuelPenaltyProtocolShareBps";
|
|
2999
|
-
"docs": [
|
|
3000
|
-
"Default **protocol** share of the **penalty surplus** on pari-mutuel early withdraw (after the",
|
|
3001
|
-
"pool keeps its slice). The creator chooses the complementary share at `initialize_parimutuel_state`;",
|
|
3002
|
-
"the two must sum to 10000 bps. Stored in `ParimutuelState` at pool init."
|
|
3003
|
-
];
|
|
3004
|
-
"type": "u16";
|
|
3005
|
-
},
|
|
3006
3291
|
{
|
|
3007
3292
|
"name": "parimutuelWithdrawPlatformFeeBps";
|
|
3008
3293
|
"docs": [
|
|
@@ -3041,6 +3326,30 @@ export type Vercora = {
|
|
|
3041
3326
|
];
|
|
3042
3327
|
};
|
|
3043
3328
|
},
|
|
3329
|
+
{
|
|
3330
|
+
"name": "initializeMarketOutcomeArgs";
|
|
3331
|
+
"docs": [
|
|
3332
|
+
"Initializes **one** outcome PDA at `outcome_index` (0..`market.outcome_count`).",
|
|
3333
|
+
"Only `market.creator` may sign as payer."
|
|
3334
|
+
];
|
|
3335
|
+
"type": {
|
|
3336
|
+
"kind": "struct";
|
|
3337
|
+
"fields": [
|
|
3338
|
+
{
|
|
3339
|
+
"name": "marketId";
|
|
3340
|
+
"type": "u64";
|
|
3341
|
+
},
|
|
3342
|
+
{
|
|
3343
|
+
"name": "outcomeIndex";
|
|
3344
|
+
"type": "u8";
|
|
3345
|
+
},
|
|
3346
|
+
{
|
|
3347
|
+
"name": "label";
|
|
3348
|
+
"type": "string";
|
|
3349
|
+
}
|
|
3350
|
+
];
|
|
3351
|
+
};
|
|
3352
|
+
},
|
|
3044
3353
|
{
|
|
3045
3354
|
"name": "initializeMarketResolverArgs";
|
|
3046
3355
|
"docs": [
|
|
@@ -3089,15 +3398,8 @@ export type Vercora = {
|
|
|
3089
3398
|
{
|
|
3090
3399
|
"name": "penaltyKeptInPoolBps";
|
|
3091
3400
|
"docs": [
|
|
3092
|
-
"Of the withheld penalty, bps that stay in the outcome pool
|
|
3093
|
-
|
|
3094
|
-
"type": "u16";
|
|
3095
|
-
},
|
|
3096
|
-
{
|
|
3097
|
-
"name": "penaltySurplusCreatorShareBps";
|
|
3098
|
-
"docs": [
|
|
3099
|
-
"Share of penalty surplus to creator — must sum with",
|
|
3100
|
-
"`global_config.parimutuel_penalty_protocol_share_bps` to 10000."
|
|
3401
|
+
"Of the withheld penalty, bps that stay in the outcome pool as a bonus for remaining stakers.",
|
|
3402
|
+
"The rest (`penalty_surplus`) goes entirely to the creator fee account."
|
|
3101
3403
|
];
|
|
3102
3404
|
"type": "u16";
|
|
3103
3405
|
}
|
|
@@ -3199,12 +3501,37 @@ export type Vercora = {
|
|
|
3199
3501
|
};
|
|
3200
3502
|
};
|
|
3201
3503
|
},
|
|
3504
|
+
{
|
|
3505
|
+
"name": "marketId";
|
|
3506
|
+
"docs": [
|
|
3507
|
+
"Stored at creation so the UI can always recover the PDA seed without",
|
|
3508
|
+
"requiring the creator to remember the random u64."
|
|
3509
|
+
];
|
|
3510
|
+
"type": "u64";
|
|
3511
|
+
},
|
|
3512
|
+
{
|
|
3513
|
+
"name": "maxOutcomeInvestment";
|
|
3514
|
+
"docs": [
|
|
3515
|
+
"Max net collateral per outcome in **smallest units** of `collateral_mint` (same as vault).",
|
|
3516
|
+
"`0` = unlimited. Pari-mutuel: enforced against `ParimutuelState.outcome_pools[i]`.",
|
|
3517
|
+
"Complete-set: enforced against `complete_set_per_outcome_outstanding` (each outcome minted equally)."
|
|
3518
|
+
];
|
|
3519
|
+
"type": "u64";
|
|
3520
|
+
},
|
|
3521
|
+
{
|
|
3522
|
+
"name": "completeSetPerOutcomeOutstanding";
|
|
3523
|
+
"docs": [
|
|
3524
|
+
"Complete-set markets only: current net amount minted per outcome index (all indices equal).",
|
|
3525
|
+
"Unused (stays 0) for pari-mutuel markets."
|
|
3526
|
+
];
|
|
3527
|
+
"type": "u64";
|
|
3528
|
+
},
|
|
3202
3529
|
{
|
|
3203
3530
|
"name": "padding";
|
|
3204
3531
|
"type": {
|
|
3205
3532
|
"array": [
|
|
3206
3533
|
"u8",
|
|
3207
|
-
|
|
3534
|
+
40
|
|
3208
3535
|
];
|
|
3209
3536
|
};
|
|
3210
3537
|
}
|
|
@@ -3250,6 +3577,45 @@ export type Vercora = {
|
|
|
3250
3577
|
];
|
|
3251
3578
|
};
|
|
3252
3579
|
},
|
|
3580
|
+
{
|
|
3581
|
+
"name": "marketOutcome";
|
|
3582
|
+
"docs": [
|
|
3583
|
+
"Per-outcome metadata and resolution vote tally. PDA seeds:",
|
|
3584
|
+
"`[market, b\"outcome\", outcome_index]`."
|
|
3585
|
+
];
|
|
3586
|
+
"type": {
|
|
3587
|
+
"kind": "struct";
|
|
3588
|
+
"fields": [
|
|
3589
|
+
{
|
|
3590
|
+
"name": "resolutionVoteCount";
|
|
3591
|
+
"docs": [
|
|
3592
|
+
"Resolver votes currently counting toward this outcome (M-of-N)."
|
|
3593
|
+
];
|
|
3594
|
+
"type": "u8";
|
|
3595
|
+
},
|
|
3596
|
+
{
|
|
3597
|
+
"name": "bump";
|
|
3598
|
+
"type": "u8";
|
|
3599
|
+
},
|
|
3600
|
+
{
|
|
3601
|
+
"name": "label";
|
|
3602
|
+
"docs": [
|
|
3603
|
+
"UTF-8 label for UIs (max 64 bytes)."
|
|
3604
|
+
];
|
|
3605
|
+
"type": "string";
|
|
3606
|
+
},
|
|
3607
|
+
{
|
|
3608
|
+
"name": "padding";
|
|
3609
|
+
"type": {
|
|
3610
|
+
"array": [
|
|
3611
|
+
"u8",
|
|
3612
|
+
32
|
|
3613
|
+
];
|
|
3614
|
+
};
|
|
3615
|
+
}
|
|
3616
|
+
];
|
|
3617
|
+
};
|
|
3618
|
+
},
|
|
3253
3619
|
{
|
|
3254
3620
|
"name": "marketType";
|
|
3255
3621
|
"docs": [
|
|
@@ -3289,31 +3655,6 @@ export type Vercora = {
|
|
|
3289
3655
|
];
|
|
3290
3656
|
};
|
|
3291
3657
|
},
|
|
3292
|
-
{
|
|
3293
|
-
"name": "outcomeTally";
|
|
3294
|
-
"docs": [
|
|
3295
|
-
"Per-outcome vote counter for resolution (M-of-N). PDA seeds:",
|
|
3296
|
-
"`[market, b\"outcome-tally\", outcome_index]`."
|
|
3297
|
-
];
|
|
3298
|
-
"type": {
|
|
3299
|
-
"kind": "struct";
|
|
3300
|
-
"fields": [
|
|
3301
|
-
{
|
|
3302
|
-
"name": "count";
|
|
3303
|
-
"type": "u8";
|
|
3304
|
-
},
|
|
3305
|
-
{
|
|
3306
|
-
"name": "padding";
|
|
3307
|
-
"type": {
|
|
3308
|
-
"array": [
|
|
3309
|
-
"u8",
|
|
3310
|
-
64
|
|
3311
|
-
];
|
|
3312
|
-
};
|
|
3313
|
-
}
|
|
3314
|
-
];
|
|
3315
|
-
};
|
|
3316
|
-
},
|
|
3317
3658
|
{
|
|
3318
3659
|
"name": "parimutuelClaimArgs";
|
|
3319
3660
|
"type": {
|
|
@@ -3424,14 +3765,16 @@ export type Vercora = {
|
|
|
3424
3765
|
{
|
|
3425
3766
|
"name": "totalPool";
|
|
3426
3767
|
"docs": [
|
|
3427
|
-
"Sum of `outcome_pools`
|
|
3768
|
+
"Sum of `outcome_pools` **plus any unattributed pool-keep bonus** from early exits.",
|
|
3769
|
+
"May exceed `sum(outcome_pools)` once withdrawals with `penalty_kept_in_pool_bps > 0` occur."
|
|
3428
3770
|
];
|
|
3429
3771
|
"type": "u64";
|
|
3430
3772
|
},
|
|
3431
3773
|
{
|
|
3432
3774
|
"name": "outcomePools";
|
|
3433
3775
|
"docs": [
|
|
3434
|
-
"Collateral per outcome bucket; index `i < outcome_count` is used."
|
|
3776
|
+
"Collateral per outcome bucket; index `i < outcome_count` is used.",
|
|
3777
|
+
"Stays aligned with the sum of `active_stake` on side `i`."
|
|
3435
3778
|
];
|
|
3436
3779
|
"type": {
|
|
3437
3780
|
"array": [
|
|
@@ -3450,24 +3793,8 @@ export type Vercora = {
|
|
|
3450
3793
|
{
|
|
3451
3794
|
"name": "penaltyKeptInPoolBps";
|
|
3452
3795
|
"docs": [
|
|
3453
|
-
"Of
|
|
3454
|
-
"
|
|
3455
|
-
"`penalty_surplus_protocol_share_bps`. Neither slice remains in the outcome pool (keeps",
|
|
3456
|
-
"`outcome_pools[i]` aligned with the sum of `active_stake` on side `i`)."
|
|
3457
|
-
];
|
|
3458
|
-
"type": "u16";
|
|
3459
|
-
},
|
|
3460
|
-
{
|
|
3461
|
-
"name": "penaltySurplusProtocolShareBps";
|
|
3462
|
-
"docs": [
|
|
3463
|
-
"Snapshot at pool init: protocol share (bps of 10000) of each penalty slice (`pool_keep` and surplus)."
|
|
3464
|
-
];
|
|
3465
|
-
"type": "u16";
|
|
3466
|
-
},
|
|
3467
|
-
{
|
|
3468
|
-
"name": "penaltySurplusCreatorShareBps";
|
|
3469
|
-
"docs": [
|
|
3470
|
-
"Snapshot at pool init: creator share of each penalty slice (must sum to 10000 with protocol)."
|
|
3796
|
+
"Of the withheld penalty, basis points (of 10 000) that stay in the pool as a bonus for",
|
|
3797
|
+
"remaining stakers / winners. The rest (`penalty_surplus`) goes to the creator fee account."
|
|
3471
3798
|
];
|
|
3472
3799
|
"type": "u16";
|
|
3473
3800
|
},
|
|
@@ -3631,6 +3958,38 @@ export type Vercora = {
|
|
|
3631
3958
|
];
|
|
3632
3959
|
};
|
|
3633
3960
|
},
|
|
3961
|
+
{
|
|
3962
|
+
"name": "updateParimutuelStateArgs";
|
|
3963
|
+
"docs": [
|
|
3964
|
+
"Update the penalty parameters of a pari-mutuel pool. Only the market creator can call this.",
|
|
3965
|
+
"The market must not be resolved or voided (post-resolution withdrawals are impossible anyway,",
|
|
3966
|
+
"but we guard here to keep state changes predictable)."
|
|
3967
|
+
];
|
|
3968
|
+
"type": {
|
|
3969
|
+
"kind": "struct";
|
|
3970
|
+
"fields": [
|
|
3971
|
+
{
|
|
3972
|
+
"name": "marketId";
|
|
3973
|
+
"type": "u64";
|
|
3974
|
+
},
|
|
3975
|
+
{
|
|
3976
|
+
"name": "earlyWithdrawPenaltyBps";
|
|
3977
|
+
"docs": [
|
|
3978
|
+
"New early-exit penalty rate (bps of gross withdrawn amount)."
|
|
3979
|
+
];
|
|
3980
|
+
"type": "u16";
|
|
3981
|
+
},
|
|
3982
|
+
{
|
|
3983
|
+
"name": "penaltyKeptInPoolBps";
|
|
3984
|
+
"docs": [
|
|
3985
|
+
"New fraction of the penalty that stays in the pool as a winner bonus (bps of penalty).",
|
|
3986
|
+
"The remainder goes to the creator fee account."
|
|
3987
|
+
];
|
|
3988
|
+
"type": "u16";
|
|
3989
|
+
}
|
|
3990
|
+
];
|
|
3991
|
+
};
|
|
3992
|
+
},
|
|
3634
3993
|
{
|
|
3635
3994
|
"name": "userProfile";
|
|
3636
3995
|
"type": {
|
|
@@ -3689,7 +4048,8 @@ export type Vercora = {
|
|
|
3689
4048
|
"name": "voteResolutionArgs";
|
|
3690
4049
|
"docs": [
|
|
3691
4050
|
"A resolver casts a vote for an outcome. Requires `has_voted == false` on the vote PDA",
|
|
3692
|
-
"(first vote or after `revoke_resolution_vote`). Increments
|
|
4051
|
+
"(first vote or after `revoke_resolution_vote`). Increments `MarketOutcome.resolution_vote_count`.",
|
|
4052
|
+
"The `MarketOutcome` PDA must exist (`initialize_market_outcome`)."
|
|
3693
4053
|
];
|
|
3694
4054
|
"type": {
|
|
3695
4055
|
"kind": "struct";
|