@vercora-protocol/sdk 0.5.0 → 0.5.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/CHANGELOG.md +10 -0
- package/dist/client.d.ts +7 -1
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +63 -0
- package/dist/client.js.map +1 -1
- package/dist/generated/vercora.d.ts +419 -2
- package/dist/generated/vercora.d.ts.map +1 -1
- package/dist/idl/vercora.json +419 -2
- package/dist/pda.d.ts +17 -0
- package/dist/pda.d.ts.map +1 -1
- package/dist/pda.js +43 -1
- package/dist/pda.js.map +1 -1
- package/dist/types.d.ts +15 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1127,6 +1127,14 @@ export type Vercora = {
|
|
|
1127
1127
|
];
|
|
1128
1128
|
};
|
|
1129
1129
|
},
|
|
1130
|
+
{
|
|
1131
|
+
"name": "platformCreator";
|
|
1132
|
+
"docs": [
|
|
1133
|
+
"When `platform_registry.max_allowed_creators > 0`, must be the `PlatformCreator` PDA for `(platform_id, creator)` (verified in handler).",
|
|
1134
|
+
"When `max_allowed_creators == 0`, must be omitted (`None`). No `seeds` constraint here to stay under the SBF `try_accounts` stack limit."
|
|
1135
|
+
];
|
|
1136
|
+
"optional": true;
|
|
1137
|
+
},
|
|
1130
1138
|
{
|
|
1131
1139
|
"name": "collateralTokenProgram";
|
|
1132
1140
|
},
|
|
@@ -1802,6 +1810,127 @@ export type Vercora = {
|
|
|
1802
1810
|
}
|
|
1803
1811
|
];
|
|
1804
1812
|
},
|
|
1813
|
+
{
|
|
1814
|
+
"name": "linkPlatformCreator";
|
|
1815
|
+
"discriminator": [
|
|
1816
|
+
240,
|
|
1817
|
+
145,
|
|
1818
|
+
193,
|
|
1819
|
+
113,
|
|
1820
|
+
122,
|
|
1821
|
+
184,
|
|
1822
|
+
72,
|
|
1823
|
+
34
|
|
1824
|
+
];
|
|
1825
|
+
"accounts": [
|
|
1826
|
+
{
|
|
1827
|
+
"name": "globalConfig";
|
|
1828
|
+
"pda": {
|
|
1829
|
+
"seeds": [
|
|
1830
|
+
{
|
|
1831
|
+
"kind": "const";
|
|
1832
|
+
"value": [
|
|
1833
|
+
103,
|
|
1834
|
+
108,
|
|
1835
|
+
111,
|
|
1836
|
+
98,
|
|
1837
|
+
97,
|
|
1838
|
+
108,
|
|
1839
|
+
45,
|
|
1840
|
+
99,
|
|
1841
|
+
111,
|
|
1842
|
+
110,
|
|
1843
|
+
102,
|
|
1844
|
+
105,
|
|
1845
|
+
103
|
|
1846
|
+
];
|
|
1847
|
+
}
|
|
1848
|
+
];
|
|
1849
|
+
};
|
|
1850
|
+
},
|
|
1851
|
+
{
|
|
1852
|
+
"name": "platformRegistry";
|
|
1853
|
+
"writable": true;
|
|
1854
|
+
"pda": {
|
|
1855
|
+
"seeds": [
|
|
1856
|
+
{
|
|
1857
|
+
"kind": "const";
|
|
1858
|
+
"value": [
|
|
1859
|
+
112,
|
|
1860
|
+
108,
|
|
1861
|
+
97,
|
|
1862
|
+
116,
|
|
1863
|
+
102,
|
|
1864
|
+
111,
|
|
1865
|
+
114,
|
|
1866
|
+
109
|
|
1867
|
+
];
|
|
1868
|
+
},
|
|
1869
|
+
{
|
|
1870
|
+
"kind": "arg";
|
|
1871
|
+
"path": "platformId";
|
|
1872
|
+
}
|
|
1873
|
+
];
|
|
1874
|
+
};
|
|
1875
|
+
},
|
|
1876
|
+
{
|
|
1877
|
+
"name": "platformCreator";
|
|
1878
|
+
"writable": true;
|
|
1879
|
+
"pda": {
|
|
1880
|
+
"seeds": [
|
|
1881
|
+
{
|
|
1882
|
+
"kind": "const";
|
|
1883
|
+
"value": [
|
|
1884
|
+
112,
|
|
1885
|
+
108,
|
|
1886
|
+
97,
|
|
1887
|
+
116,
|
|
1888
|
+
102,
|
|
1889
|
+
111,
|
|
1890
|
+
114,
|
|
1891
|
+
109,
|
|
1892
|
+
45,
|
|
1893
|
+
99,
|
|
1894
|
+
114,
|
|
1895
|
+
101,
|
|
1896
|
+
97,
|
|
1897
|
+
116,
|
|
1898
|
+
111,
|
|
1899
|
+
114
|
|
1900
|
+
];
|
|
1901
|
+
},
|
|
1902
|
+
{
|
|
1903
|
+
"kind": "arg";
|
|
1904
|
+
"path": "platformId";
|
|
1905
|
+
},
|
|
1906
|
+
{
|
|
1907
|
+
"kind": "arg";
|
|
1908
|
+
"path": "wallet";
|
|
1909
|
+
}
|
|
1910
|
+
];
|
|
1911
|
+
};
|
|
1912
|
+
},
|
|
1913
|
+
{
|
|
1914
|
+
"name": "authority";
|
|
1915
|
+
"writable": true;
|
|
1916
|
+
"signer": true;
|
|
1917
|
+
},
|
|
1918
|
+
{
|
|
1919
|
+
"name": "systemProgram";
|
|
1920
|
+
"address": "11111111111111111111111111111111";
|
|
1921
|
+
}
|
|
1922
|
+
];
|
|
1923
|
+
"args": [
|
|
1924
|
+
{
|
|
1925
|
+
"name": "platformId";
|
|
1926
|
+
"type": "u32";
|
|
1927
|
+
},
|
|
1928
|
+
{
|
|
1929
|
+
"name": "wallet";
|
|
1930
|
+
"type": "pubkey";
|
|
1931
|
+
}
|
|
1932
|
+
];
|
|
1933
|
+
},
|
|
1805
1934
|
{
|
|
1806
1935
|
"name": "mintCompleteSet";
|
|
1807
1936
|
"discriminator": [
|
|
@@ -3412,6 +3541,120 @@ export type Vercora = {
|
|
|
3412
3541
|
}
|
|
3413
3542
|
];
|
|
3414
3543
|
},
|
|
3544
|
+
{
|
|
3545
|
+
"name": "unlinkPlatformCreator";
|
|
3546
|
+
"discriminator": [
|
|
3547
|
+
181,
|
|
3548
|
+
177,
|
|
3549
|
+
45,
|
|
3550
|
+
216,
|
|
3551
|
+
242,
|
|
3552
|
+
253,
|
|
3553
|
+
227,
|
|
3554
|
+
14
|
|
3555
|
+
];
|
|
3556
|
+
"accounts": [
|
|
3557
|
+
{
|
|
3558
|
+
"name": "globalConfig";
|
|
3559
|
+
"pda": {
|
|
3560
|
+
"seeds": [
|
|
3561
|
+
{
|
|
3562
|
+
"kind": "const";
|
|
3563
|
+
"value": [
|
|
3564
|
+
103,
|
|
3565
|
+
108,
|
|
3566
|
+
111,
|
|
3567
|
+
98,
|
|
3568
|
+
97,
|
|
3569
|
+
108,
|
|
3570
|
+
45,
|
|
3571
|
+
99,
|
|
3572
|
+
111,
|
|
3573
|
+
110,
|
|
3574
|
+
102,
|
|
3575
|
+
105,
|
|
3576
|
+
103
|
|
3577
|
+
];
|
|
3578
|
+
}
|
|
3579
|
+
];
|
|
3580
|
+
};
|
|
3581
|
+
},
|
|
3582
|
+
{
|
|
3583
|
+
"name": "platformRegistry";
|
|
3584
|
+
"writable": true;
|
|
3585
|
+
"pda": {
|
|
3586
|
+
"seeds": [
|
|
3587
|
+
{
|
|
3588
|
+
"kind": "const";
|
|
3589
|
+
"value": [
|
|
3590
|
+
112,
|
|
3591
|
+
108,
|
|
3592
|
+
97,
|
|
3593
|
+
116,
|
|
3594
|
+
102,
|
|
3595
|
+
111,
|
|
3596
|
+
114,
|
|
3597
|
+
109
|
|
3598
|
+
];
|
|
3599
|
+
},
|
|
3600
|
+
{
|
|
3601
|
+
"kind": "arg";
|
|
3602
|
+
"path": "platformId";
|
|
3603
|
+
}
|
|
3604
|
+
];
|
|
3605
|
+
};
|
|
3606
|
+
},
|
|
3607
|
+
{
|
|
3608
|
+
"name": "platformCreator";
|
|
3609
|
+
"writable": true;
|
|
3610
|
+
"pda": {
|
|
3611
|
+
"seeds": [
|
|
3612
|
+
{
|
|
3613
|
+
"kind": "const";
|
|
3614
|
+
"value": [
|
|
3615
|
+
112,
|
|
3616
|
+
108,
|
|
3617
|
+
97,
|
|
3618
|
+
116,
|
|
3619
|
+
102,
|
|
3620
|
+
111,
|
|
3621
|
+
114,
|
|
3622
|
+
109,
|
|
3623
|
+
45,
|
|
3624
|
+
99,
|
|
3625
|
+
114,
|
|
3626
|
+
101,
|
|
3627
|
+
97,
|
|
3628
|
+
116,
|
|
3629
|
+
111,
|
|
3630
|
+
114
|
|
3631
|
+
];
|
|
3632
|
+
},
|
|
3633
|
+
{
|
|
3634
|
+
"kind": "arg";
|
|
3635
|
+
"path": "platformId";
|
|
3636
|
+
},
|
|
3637
|
+
{
|
|
3638
|
+
"kind": "account";
|
|
3639
|
+
"path": "platform_creator.wallet";
|
|
3640
|
+
"account": "platformCreator";
|
|
3641
|
+
}
|
|
3642
|
+
];
|
|
3643
|
+
};
|
|
3644
|
+
},
|
|
3645
|
+
{
|
|
3646
|
+
"name": "authority";
|
|
3647
|
+
"writable": true;
|
|
3648
|
+
"signer": true;
|
|
3649
|
+
}
|
|
3650
|
+
];
|
|
3651
|
+
"args": [
|
|
3652
|
+
{
|
|
3653
|
+
"name": "platformId";
|
|
3654
|
+
"type": "u32";
|
|
3655
|
+
}
|
|
3656
|
+
];
|
|
3657
|
+
},
|
|
3415
3658
|
{
|
|
3416
3659
|
"name": "updateConfig";
|
|
3417
3660
|
"discriminator": [
|
|
@@ -3672,6 +3915,86 @@ export type Vercora = {
|
|
|
3672
3915
|
}
|
|
3673
3916
|
];
|
|
3674
3917
|
},
|
|
3918
|
+
{
|
|
3919
|
+
"name": "updatePlatformCreatorPolicy";
|
|
3920
|
+
"discriminator": [
|
|
3921
|
+
107,
|
|
3922
|
+
30,
|
|
3923
|
+
75,
|
|
3924
|
+
26,
|
|
3925
|
+
146,
|
|
3926
|
+
54,
|
|
3927
|
+
53,
|
|
3928
|
+
131
|
|
3929
|
+
];
|
|
3930
|
+
"accounts": [
|
|
3931
|
+
{
|
|
3932
|
+
"name": "globalConfig";
|
|
3933
|
+
"pda": {
|
|
3934
|
+
"seeds": [
|
|
3935
|
+
{
|
|
3936
|
+
"kind": "const";
|
|
3937
|
+
"value": [
|
|
3938
|
+
103,
|
|
3939
|
+
108,
|
|
3940
|
+
111,
|
|
3941
|
+
98,
|
|
3942
|
+
97,
|
|
3943
|
+
108,
|
|
3944
|
+
45,
|
|
3945
|
+
99,
|
|
3946
|
+
111,
|
|
3947
|
+
110,
|
|
3948
|
+
102,
|
|
3949
|
+
105,
|
|
3950
|
+
103
|
|
3951
|
+
];
|
|
3952
|
+
}
|
|
3953
|
+
];
|
|
3954
|
+
};
|
|
3955
|
+
},
|
|
3956
|
+
{
|
|
3957
|
+
"name": "platformRegistry";
|
|
3958
|
+
"writable": true;
|
|
3959
|
+
"pda": {
|
|
3960
|
+
"seeds": [
|
|
3961
|
+
{
|
|
3962
|
+
"kind": "const";
|
|
3963
|
+
"value": [
|
|
3964
|
+
112,
|
|
3965
|
+
108,
|
|
3966
|
+
97,
|
|
3967
|
+
116,
|
|
3968
|
+
102,
|
|
3969
|
+
111,
|
|
3970
|
+
114,
|
|
3971
|
+
109
|
|
3972
|
+
];
|
|
3973
|
+
},
|
|
3974
|
+
{
|
|
3975
|
+
"kind": "arg";
|
|
3976
|
+
"path": "platformId";
|
|
3977
|
+
}
|
|
3978
|
+
];
|
|
3979
|
+
};
|
|
3980
|
+
},
|
|
3981
|
+
{
|
|
3982
|
+
"name": "authority";
|
|
3983
|
+
"writable": true;
|
|
3984
|
+
"signer": true;
|
|
3985
|
+
}
|
|
3986
|
+
];
|
|
3987
|
+
"args": [
|
|
3988
|
+
{
|
|
3989
|
+
"name": "platformId";
|
|
3990
|
+
"type": "u32";
|
|
3991
|
+
},
|
|
3992
|
+
{
|
|
3993
|
+
"name": "maxAllowedCreators";
|
|
3994
|
+
"type": "u16";
|
|
3995
|
+
}
|
|
3996
|
+
];
|
|
3997
|
+
},
|
|
3675
3998
|
{
|
|
3676
3999
|
"name": "upsertPlatformProfile";
|
|
3677
4000
|
"discriminator": [
|
|
@@ -4450,6 +4773,19 @@ export type Vercora = {
|
|
|
4450
4773
|
185
|
|
4451
4774
|
];
|
|
4452
4775
|
},
|
|
4776
|
+
{
|
|
4777
|
+
"name": "platformCreator";
|
|
4778
|
+
"discriminator": [
|
|
4779
|
+
255,
|
|
4780
|
+
53,
|
|
4781
|
+
210,
|
|
4782
|
+
208,
|
|
4783
|
+
163,
|
|
4784
|
+
150,
|
|
4785
|
+
177,
|
|
4786
|
+
5
|
|
4787
|
+
];
|
|
4788
|
+
},
|
|
4453
4789
|
{
|
|
4454
4790
|
"name": "platformProfile";
|
|
4455
4791
|
"discriminator": [
|
|
@@ -4869,6 +5205,46 @@ export type Vercora = {
|
|
|
4869
5205
|
"code": 6067;
|
|
4870
5206
|
"name": "cannotVoidWithOpenDispute";
|
|
4871
5207
|
"msg": "Cannot void market while a refute dispute is open — resolve or accept the refute first";
|
|
5208
|
+
},
|
|
5209
|
+
{
|
|
5210
|
+
"code": 6068;
|
|
5211
|
+
"name": "creatorNotAllowlisted";
|
|
5212
|
+
"msg": "Creator is not on this platform's allowlist";
|
|
5213
|
+
},
|
|
5214
|
+
{
|
|
5215
|
+
"code": 6069;
|
|
5216
|
+
"name": "unexpectedPlatformCreatorAccount";
|
|
5217
|
+
"msg": "create_market: platform_creator account must not be passed when max_allowed_creators is 0";
|
|
5218
|
+
},
|
|
5219
|
+
{
|
|
5220
|
+
"code": 6070;
|
|
5221
|
+
"name": "platformHasNoLinkedCreators";
|
|
5222
|
+
"msg": "No linked creators for this platform — link at least one wallet before create_market";
|
|
5223
|
+
},
|
|
5224
|
+
{
|
|
5225
|
+
"code": 6071;
|
|
5226
|
+
"name": "platformCreatorCapReached";
|
|
5227
|
+
"msg": "Platform creator allowlist is full";
|
|
5228
|
+
},
|
|
5229
|
+
{
|
|
5230
|
+
"code": 6072;
|
|
5231
|
+
"name": "platformCreatorPolicyInvalid";
|
|
5232
|
+
"msg": "Invalid platform creator policy update";
|
|
5233
|
+
},
|
|
5234
|
+
{
|
|
5235
|
+
"code": 6073;
|
|
5236
|
+
"name": "platformCreatorCountInvariant";
|
|
5237
|
+
"msg": "Platform linked_creator_count invariant violated";
|
|
5238
|
+
},
|
|
5239
|
+
{
|
|
5240
|
+
"code": 6074;
|
|
5241
|
+
"name": "linkPlatformCreatorDisabled";
|
|
5242
|
+
"msg": "link_platform_creator is disabled while max_allowed_creators is 0";
|
|
5243
|
+
},
|
|
5244
|
+
{
|
|
5245
|
+
"code": 6075;
|
|
5246
|
+
"name": "invalidPlatformCreatorWallet";
|
|
5247
|
+
"msg": "platform-creator wallet must be a non-default pubkey";
|
|
4872
5248
|
}
|
|
4873
5249
|
];
|
|
4874
5250
|
"types": [
|
|
@@ -5793,6 +6169,30 @@ export type Vercora = {
|
|
|
5793
6169
|
];
|
|
5794
6170
|
};
|
|
5795
6171
|
},
|
|
6172
|
+
{
|
|
6173
|
+
"name": "platformCreator";
|
|
6174
|
+
"docs": [
|
|
6175
|
+
"Allowlisted wallet that may call `create_market` for a restricted platform.",
|
|
6176
|
+
"PDA seeds: `[b\"platform-creator\", platform_id.to_le_bytes(), wallet.as_ref()]`."
|
|
6177
|
+
];
|
|
6178
|
+
"type": {
|
|
6179
|
+
"kind": "struct";
|
|
6180
|
+
"fields": [
|
|
6181
|
+
{
|
|
6182
|
+
"name": "platformId";
|
|
6183
|
+
"type": "u32";
|
|
6184
|
+
},
|
|
6185
|
+
{
|
|
6186
|
+
"name": "wallet";
|
|
6187
|
+
"type": "pubkey";
|
|
6188
|
+
},
|
|
6189
|
+
{
|
|
6190
|
+
"name": "bump";
|
|
6191
|
+
"type": "u8";
|
|
6192
|
+
}
|
|
6193
|
+
];
|
|
6194
|
+
};
|
|
6195
|
+
},
|
|
5796
6196
|
{
|
|
5797
6197
|
"name": "platformProfile";
|
|
5798
6198
|
"docs": [
|
|
@@ -5872,7 +6272,9 @@ export type Vercora = {
|
|
|
5872
6272
|
{
|
|
5873
6273
|
"name": "profileAuthority";
|
|
5874
6274
|
"docs": [
|
|
5875
|
-
"Signs `close_platform_profile
|
|
6275
|
+
"Signs `close_platform_profile`, and may sign `link_platform_creator` / `unlink_platform_creator` /",
|
|
6276
|
+
"`update_platform_creator_policy` for this platform (same as global config authority for those ops).",
|
|
6277
|
+
"`upsert_platform_profile` still requires global config authority."
|
|
5876
6278
|
];
|
|
5877
6279
|
"type": "pubkey";
|
|
5878
6280
|
},
|
|
@@ -5880,12 +6282,27 @@ export type Vercora = {
|
|
|
5880
6282
|
"name": "bump";
|
|
5881
6283
|
"type": "u8";
|
|
5882
6284
|
},
|
|
6285
|
+
{
|
|
6286
|
+
"name": "maxAllowedCreators";
|
|
6287
|
+
"docs": [
|
|
6288
|
+
"`0` = any wallet may `create_market` for this platform (no [`PlatformCreator`](super::platform_creator::PlatformCreator) account).",
|
|
6289
|
+
"`> 0` = cap on linked creators; `create_market` requires an initialized `PlatformCreator` PDA for the creator."
|
|
6290
|
+
];
|
|
6291
|
+
"type": "u16";
|
|
6292
|
+
},
|
|
6293
|
+
{
|
|
6294
|
+
"name": "linkedCreatorCount";
|
|
6295
|
+
"docs": [
|
|
6296
|
+
"Number of initialized [`PlatformCreator`](super::platform_creator::PlatformCreator) PDAs (maintained by link/unlink)."
|
|
6297
|
+
];
|
|
6298
|
+
"type": "u16";
|
|
6299
|
+
},
|
|
5883
6300
|
{
|
|
5884
6301
|
"name": "padding";
|
|
5885
6302
|
"type": {
|
|
5886
6303
|
"array": [
|
|
5887
6304
|
"u8",
|
|
5888
|
-
|
|
6305
|
+
60
|
|
5889
6306
|
];
|
|
5890
6307
|
};
|
|
5891
6308
|
}
|