@triadxyz/triad-protocol 4.0.4 → 4.0.6
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/README.md +99 -12
- package/dist/customer.d.ts +3 -10
- package/dist/customer.js +5 -22
- package/dist/index.d.ts +7 -4
- package/dist/index.js +11 -8
- package/dist/poseidon.d.ts +0 -21
- package/dist/poseidon.js +0 -49
- package/dist/predictor.d.ts +0 -1
- package/dist/stake.d.ts +0 -1
- package/dist/trade.d.ts +0 -1
- package/dist/types/customer.d.ts +0 -6
- package/dist/types/idl_triad_protocol.json +283 -276
- package/dist/types/index.d.ts +2 -1
- package/dist/types/predictor.d.ts +0 -1
- package/dist/types/trade.d.ts +0 -1
- package/dist/types/triad_protocol.d.ts +310 -274
- package/dist/utils/constants.d.ts +0 -3
- package/dist/utils/constants.js +1 -3
- package/dist/utils/pda.d.ts +0 -1
- package/package.json +6 -10
|
@@ -417,14 +417,8 @@
|
|
|
417
417
|
"discriminator": [219, 134, 73, 219, 180, 7, 94, 206],
|
|
418
418
|
"accounts": [
|
|
419
419
|
{
|
|
420
|
-
"name": "
|
|
421
|
-
"writable": true
|
|
422
|
-
"signer": true
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
"name": "squads",
|
|
426
|
-
"writable": true,
|
|
427
|
-
"address": "Hk1r2NUL4LbUhx1agg1w44tyZiNr72mbeLsg6suF5MA4"
|
|
420
|
+
"name": "authority",
|
|
421
|
+
"writable": true
|
|
428
422
|
},
|
|
429
423
|
{
|
|
430
424
|
"name": "market",
|
|
@@ -646,11 +640,6 @@
|
|
|
646
640
|
"writable": true,
|
|
647
641
|
"signer": true
|
|
648
642
|
},
|
|
649
|
-
{
|
|
650
|
-
"name": "squads",
|
|
651
|
-
"writable": true,
|
|
652
|
-
"address": "Hk1r2NUL4LbUhx1agg1w44tyZiNr72mbeLsg6suF5MA4"
|
|
653
|
-
},
|
|
654
643
|
{
|
|
655
644
|
"name": "customer",
|
|
656
645
|
"writable": true
|
|
@@ -732,6 +721,99 @@
|
|
|
732
721
|
}
|
|
733
722
|
]
|
|
734
723
|
},
|
|
724
|
+
{
|
|
725
|
+
"name": "create_market_pyth",
|
|
726
|
+
"discriminator": [52, 27, 109, 132, 239, 101, 96, 44],
|
|
727
|
+
"accounts": [
|
|
728
|
+
{
|
|
729
|
+
"name": "signer",
|
|
730
|
+
"writable": true,
|
|
731
|
+
"signer": true
|
|
732
|
+
},
|
|
733
|
+
{
|
|
734
|
+
"name": "customer",
|
|
735
|
+
"writable": true
|
|
736
|
+
},
|
|
737
|
+
{
|
|
738
|
+
"name": "pool",
|
|
739
|
+
"writable": true
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
"name": "market",
|
|
743
|
+
"writable": true,
|
|
744
|
+
"pda": {
|
|
745
|
+
"seeds": [
|
|
746
|
+
{
|
|
747
|
+
"kind": "const",
|
|
748
|
+
"value": [109, 97, 114, 107, 101, 116]
|
|
749
|
+
},
|
|
750
|
+
{
|
|
751
|
+
"kind": "arg",
|
|
752
|
+
"path": "args.market_id"
|
|
753
|
+
}
|
|
754
|
+
]
|
|
755
|
+
}
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
"name": "mint",
|
|
759
|
+
"writable": true,
|
|
760
|
+
"address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
|
|
761
|
+
},
|
|
762
|
+
{
|
|
763
|
+
"name": "market_to_ata",
|
|
764
|
+
"writable": true,
|
|
765
|
+
"pda": {
|
|
766
|
+
"seeds": [
|
|
767
|
+
{
|
|
768
|
+
"kind": "account",
|
|
769
|
+
"path": "market"
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
"kind": "account",
|
|
773
|
+
"path": "token_program"
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
"kind": "account",
|
|
777
|
+
"path": "mint"
|
|
778
|
+
}
|
|
779
|
+
],
|
|
780
|
+
"program": {
|
|
781
|
+
"kind": "const",
|
|
782
|
+
"value": [
|
|
783
|
+
140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142,
|
|
784
|
+
13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216,
|
|
785
|
+
219, 233, 248, 89
|
|
786
|
+
]
|
|
787
|
+
}
|
|
788
|
+
}
|
|
789
|
+
},
|
|
790
|
+
{
|
|
791
|
+
"name": "price_update",
|
|
792
|
+
"writable": true
|
|
793
|
+
},
|
|
794
|
+
{
|
|
795
|
+
"name": "token_program"
|
|
796
|
+
},
|
|
797
|
+
{
|
|
798
|
+
"name": "associated_token_program",
|
|
799
|
+
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
800
|
+
},
|
|
801
|
+
{
|
|
802
|
+
"name": "system_program",
|
|
803
|
+
"address": "11111111111111111111111111111111"
|
|
804
|
+
}
|
|
805
|
+
],
|
|
806
|
+
"args": [
|
|
807
|
+
{
|
|
808
|
+
"name": "args",
|
|
809
|
+
"type": {
|
|
810
|
+
"defined": {
|
|
811
|
+
"name": "CreateMarketPythArgs"
|
|
812
|
+
}
|
|
813
|
+
}
|
|
814
|
+
}
|
|
815
|
+
]
|
|
816
|
+
},
|
|
735
817
|
{
|
|
736
818
|
"name": "create_order_book",
|
|
737
819
|
"discriminator": [153, 114, 9, 51, 100, 68, 240, 197],
|
|
@@ -802,6 +884,11 @@
|
|
|
802
884
|
]
|
|
803
885
|
}
|
|
804
886
|
},
|
|
887
|
+
{
|
|
888
|
+
"name": "price_update",
|
|
889
|
+
"writable": true,
|
|
890
|
+
"optional": true
|
|
891
|
+
},
|
|
805
892
|
{
|
|
806
893
|
"name": "system_program",
|
|
807
894
|
"address": "11111111111111111111111111111111"
|
|
@@ -910,7 +997,7 @@
|
|
|
910
997
|
"address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
|
|
911
998
|
},
|
|
912
999
|
{
|
|
913
|
-
"name": "
|
|
1000
|
+
"name": "tusd_mint",
|
|
914
1001
|
"writable": true,
|
|
915
1002
|
"address": "75wzVU6j9U6oZVJjQYLtiN7Z5Ah97it1UyWZN29HgE4m"
|
|
916
1003
|
},
|
|
@@ -943,13 +1030,13 @@
|
|
|
943
1030
|
}
|
|
944
1031
|
},
|
|
945
1032
|
{
|
|
946
|
-
"name": "
|
|
1033
|
+
"name": "central_ata",
|
|
947
1034
|
"writable": true,
|
|
948
1035
|
"pda": {
|
|
949
1036
|
"seeds": [
|
|
950
1037
|
{
|
|
951
1038
|
"kind": "account",
|
|
952
|
-
"path": "
|
|
1039
|
+
"path": "central"
|
|
953
1040
|
},
|
|
954
1041
|
{
|
|
955
1042
|
"kind": "account",
|
|
@@ -957,7 +1044,7 @@
|
|
|
957
1044
|
},
|
|
958
1045
|
{
|
|
959
1046
|
"kind": "account",
|
|
960
|
-
"path": "
|
|
1047
|
+
"path": "usdc_mint"
|
|
961
1048
|
}
|
|
962
1049
|
],
|
|
963
1050
|
"program": {
|
|
@@ -971,13 +1058,13 @@
|
|
|
971
1058
|
}
|
|
972
1059
|
},
|
|
973
1060
|
{
|
|
974
|
-
"name": "
|
|
1061
|
+
"name": "predictor_ata",
|
|
975
1062
|
"writable": true,
|
|
976
1063
|
"pda": {
|
|
977
1064
|
"seeds": [
|
|
978
1065
|
{
|
|
979
1066
|
"kind": "account",
|
|
980
|
-
"path": "
|
|
1067
|
+
"path": "predictor"
|
|
981
1068
|
},
|
|
982
1069
|
{
|
|
983
1070
|
"kind": "account",
|
|
@@ -985,7 +1072,7 @@
|
|
|
985
1072
|
},
|
|
986
1073
|
{
|
|
987
1074
|
"kind": "account",
|
|
988
|
-
"path": "
|
|
1075
|
+
"path": "tusd_mint"
|
|
989
1076
|
}
|
|
990
1077
|
],
|
|
991
1078
|
"program": {
|
|
@@ -1756,54 +1843,6 @@
|
|
|
1756
1843
|
}
|
|
1757
1844
|
]
|
|
1758
1845
|
},
|
|
1759
|
-
{
|
|
1760
|
-
"name": "transfer_poseidon",
|
|
1761
|
-
"discriminator": [57, 144, 113, 75, 97, 81, 3, 98],
|
|
1762
|
-
"accounts": [
|
|
1763
|
-
{
|
|
1764
|
-
"name": "signer",
|
|
1765
|
-
"writable": true,
|
|
1766
|
-
"signer": true
|
|
1767
|
-
},
|
|
1768
|
-
{
|
|
1769
|
-
"name": "nft",
|
|
1770
|
-
"writable": true
|
|
1771
|
-
},
|
|
1772
|
-
{
|
|
1773
|
-
"name": "ticket_asset",
|
|
1774
|
-
"writable": true
|
|
1775
|
-
},
|
|
1776
|
-
{
|
|
1777
|
-
"name": "poseidon_asset",
|
|
1778
|
-
"writable": true
|
|
1779
|
-
},
|
|
1780
|
-
{
|
|
1781
|
-
"name": "ticket_collection",
|
|
1782
|
-
"writable": true
|
|
1783
|
-
},
|
|
1784
|
-
{
|
|
1785
|
-
"name": "core_ticket_collection",
|
|
1786
|
-
"writable": true
|
|
1787
|
-
},
|
|
1788
|
-
{
|
|
1789
|
-
"name": "poseidon_collection",
|
|
1790
|
-
"writable": true
|
|
1791
|
-
},
|
|
1792
|
-
{
|
|
1793
|
-
"name": "core_poseidon_collection",
|
|
1794
|
-
"writable": true
|
|
1795
|
-
},
|
|
1796
|
-
{
|
|
1797
|
-
"name": "metaplex_program",
|
|
1798
|
-
"address": "CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d"
|
|
1799
|
-
},
|
|
1800
|
-
{
|
|
1801
|
-
"name": "system_program",
|
|
1802
|
-
"address": "11111111111111111111111111111111"
|
|
1803
|
-
}
|
|
1804
|
-
],
|
|
1805
|
-
"args": []
|
|
1806
|
-
},
|
|
1807
1846
|
{
|
|
1808
1847
|
"name": "unstake_token",
|
|
1809
1848
|
"discriminator": [165, 130, 39, 20, 80, 43, 116, 186],
|
|
@@ -1908,47 +1947,6 @@
|
|
|
1908
1947
|
],
|
|
1909
1948
|
"args": []
|
|
1910
1949
|
},
|
|
1911
|
-
{
|
|
1912
|
-
"name": "update_customer_fee",
|
|
1913
|
-
"discriminator": [218, 240, 1, 38, 34, 166, 40, 25],
|
|
1914
|
-
"accounts": [
|
|
1915
|
-
{
|
|
1916
|
-
"name": "signer",
|
|
1917
|
-
"writable": true,
|
|
1918
|
-
"signer": true
|
|
1919
|
-
},
|
|
1920
|
-
{
|
|
1921
|
-
"name": "customer",
|
|
1922
|
-
"writable": true,
|
|
1923
|
-
"pda": {
|
|
1924
|
-
"seeds": [
|
|
1925
|
-
{
|
|
1926
|
-
"kind": "const",
|
|
1927
|
-
"value": [99, 117, 115, 116, 111, 109, 101, 114]
|
|
1928
|
-
},
|
|
1929
|
-
{
|
|
1930
|
-
"kind": "arg",
|
|
1931
|
-
"path": "args.id"
|
|
1932
|
-
}
|
|
1933
|
-
]
|
|
1934
|
-
}
|
|
1935
|
-
},
|
|
1936
|
-
{
|
|
1937
|
-
"name": "system_program",
|
|
1938
|
-
"address": "11111111111111111111111111111111"
|
|
1939
|
-
}
|
|
1940
|
-
],
|
|
1941
|
-
"args": [
|
|
1942
|
-
{
|
|
1943
|
-
"name": "args",
|
|
1944
|
-
"type": {
|
|
1945
|
-
"defined": {
|
|
1946
|
-
"name": "UpdateCustomerFeeArgs"
|
|
1947
|
-
}
|
|
1948
|
-
}
|
|
1949
|
-
}
|
|
1950
|
-
]
|
|
1951
|
-
},
|
|
1952
1950
|
{
|
|
1953
1951
|
"name": "update_market_end",
|
|
1954
1952
|
"discriminator": [10, 188, 22, 219, 206, 83, 67, 31],
|
|
@@ -2055,43 +2053,6 @@
|
|
|
2055
2053
|
}
|
|
2056
2054
|
]
|
|
2057
2055
|
},
|
|
2058
|
-
{
|
|
2059
|
-
"name": "update_metadata",
|
|
2060
|
-
"discriminator": [170, 182, 43, 239, 97, 78, 225, 186],
|
|
2061
|
-
"accounts": [
|
|
2062
|
-
{
|
|
2063
|
-
"name": "signer",
|
|
2064
|
-
"writable": true,
|
|
2065
|
-
"signer": true
|
|
2066
|
-
},
|
|
2067
|
-
{
|
|
2068
|
-
"name": "poseidon_collection",
|
|
2069
|
-
"writable": true
|
|
2070
|
-
},
|
|
2071
|
-
{
|
|
2072
|
-
"name": "poseidon_asset",
|
|
2073
|
-
"writable": true
|
|
2074
|
-
},
|
|
2075
|
-
{
|
|
2076
|
-
"name": "core_poseidon_collection",
|
|
2077
|
-
"writable": true
|
|
2078
|
-
},
|
|
2079
|
-
{
|
|
2080
|
-
"name": "core_program",
|
|
2081
|
-
"address": "CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d"
|
|
2082
|
-
},
|
|
2083
|
-
{
|
|
2084
|
-
"name": "system_program",
|
|
2085
|
-
"address": "11111111111111111111111111111111"
|
|
2086
|
-
}
|
|
2087
|
-
],
|
|
2088
|
-
"args": [
|
|
2089
|
-
{
|
|
2090
|
-
"name": "uri",
|
|
2091
|
-
"type": "string"
|
|
2092
|
-
}
|
|
2093
|
-
]
|
|
2094
|
-
},
|
|
2095
2056
|
{
|
|
2096
2057
|
"name": "update_pool_question",
|
|
2097
2058
|
"discriminator": [248, 60, 128, 181, 157, 182, 51, 166],
|
|
@@ -2161,7 +2122,7 @@
|
|
|
2161
2122
|
"address": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
|
|
2162
2123
|
},
|
|
2163
2124
|
{
|
|
2164
|
-
"name": "
|
|
2125
|
+
"name": "tusd_mint",
|
|
2165
2126
|
"writable": true,
|
|
2166
2127
|
"address": "75wzVU6j9U6oZVJjQYLtiN7Z5Ah97it1UyWZN29HgE4m"
|
|
2167
2128
|
},
|
|
@@ -2208,7 +2169,7 @@
|
|
|
2208
2169
|
},
|
|
2209
2170
|
{
|
|
2210
2171
|
"kind": "account",
|
|
2211
|
-
"path": "
|
|
2172
|
+
"path": "tusd_mint"
|
|
2212
2173
|
}
|
|
2213
2174
|
],
|
|
2214
2175
|
"program": {
|
|
@@ -2309,11 +2270,11 @@
|
|
|
2309
2270
|
"accounts": [
|
|
2310
2271
|
{
|
|
2311
2272
|
"name": "BaseAssetV1",
|
|
2312
|
-
"discriminator": [
|
|
2273
|
+
"discriminator": [1]
|
|
2313
2274
|
},
|
|
2314
2275
|
{
|
|
2315
2276
|
"name": "BaseCollectionV1",
|
|
2316
|
-
"discriminator": [
|
|
2277
|
+
"discriminator": [5]
|
|
2317
2278
|
},
|
|
2318
2279
|
{
|
|
2319
2280
|
"name": "Central",
|
|
@@ -2351,6 +2312,10 @@
|
|
|
2351
2312
|
"name": "Predictor",
|
|
2352
2313
|
"discriminator": [220, 240, 153, 14, 72, 188, 37, 21]
|
|
2353
2314
|
},
|
|
2315
|
+
{
|
|
2316
|
+
"name": "PriceUpdateV2",
|
|
2317
|
+
"discriminator": [34, 241, 35, 99, 157, 126, 244, 205]
|
|
2318
|
+
},
|
|
2354
2319
|
{
|
|
2355
2320
|
"name": "StakeV3",
|
|
2356
2321
|
"discriminator": [33, 54, 166, 108, 88, 184, 96, 190]
|
|
@@ -2373,14 +2338,6 @@
|
|
|
2373
2338
|
"name": "BookOrderEvent",
|
|
2374
2339
|
"discriminator": [175, 216, 61, 224, 98, 215, 181, 62]
|
|
2375
2340
|
},
|
|
2376
|
-
{
|
|
2377
|
-
"name": "ClaimTokenEvent",
|
|
2378
|
-
"discriminator": [127, 10, 14, 49, 47, 171, 31, 127]
|
|
2379
|
-
},
|
|
2380
|
-
{
|
|
2381
|
-
"name": "ClaimVaultEvent",
|
|
2382
|
-
"discriminator": [106, 57, 180, 175, 87, 6, 132, 91]
|
|
2383
|
-
},
|
|
2384
2341
|
{
|
|
2385
2342
|
"name": "CollectMarketFeeEvent",
|
|
2386
2343
|
"discriminator": [210, 147, 203, 216, 158, 111, 59, 143]
|
|
@@ -2549,6 +2506,11 @@
|
|
|
2549
2506
|
"code": 6026,
|
|
2550
2507
|
"name": "InvalidOrderDirection",
|
|
2551
2508
|
"msg": "Invalid Order Direction"
|
|
2509
|
+
},
|
|
2510
|
+
{
|
|
2511
|
+
"code": 6027,
|
|
2512
|
+
"name": "InvalidQuestion",
|
|
2513
|
+
"msg": "Invalid Question"
|
|
2552
2514
|
}
|
|
2553
2515
|
],
|
|
2554
2516
|
"types": [
|
|
@@ -2846,100 +2808,6 @@
|
|
|
2846
2808
|
]
|
|
2847
2809
|
}
|
|
2848
2810
|
},
|
|
2849
|
-
{
|
|
2850
|
-
"name": "ClaimTokenEvent",
|
|
2851
|
-
"type": {
|
|
2852
|
-
"kind": "struct",
|
|
2853
|
-
"fields": [
|
|
2854
|
-
{
|
|
2855
|
-
"name": "user",
|
|
2856
|
-
"type": "pubkey"
|
|
2857
|
-
},
|
|
2858
|
-
{
|
|
2859
|
-
"name": "claim_vault",
|
|
2860
|
-
"type": "pubkey"
|
|
2861
|
-
},
|
|
2862
|
-
{
|
|
2863
|
-
"name": "mint",
|
|
2864
|
-
"type": "pubkey"
|
|
2865
|
-
},
|
|
2866
|
-
{
|
|
2867
|
-
"name": "amount",
|
|
2868
|
-
"type": "u64"
|
|
2869
|
-
},
|
|
2870
|
-
{
|
|
2871
|
-
"name": "timestamp",
|
|
2872
|
-
"type": "i64"
|
|
2873
|
-
}
|
|
2874
|
-
]
|
|
2875
|
-
}
|
|
2876
|
-
},
|
|
2877
|
-
{
|
|
2878
|
-
"name": "ClaimVaultEvent",
|
|
2879
|
-
"type": {
|
|
2880
|
-
"kind": "struct",
|
|
2881
|
-
"fields": [
|
|
2882
|
-
{
|
|
2883
|
-
"name": "authority",
|
|
2884
|
-
"type": "pubkey"
|
|
2885
|
-
},
|
|
2886
|
-
{
|
|
2887
|
-
"name": "init_ts",
|
|
2888
|
-
"type": "i64"
|
|
2889
|
-
},
|
|
2890
|
-
{
|
|
2891
|
-
"name": "end_ts",
|
|
2892
|
-
"type": "i64"
|
|
2893
|
-
},
|
|
2894
|
-
{
|
|
2895
|
-
"name": "total_amount",
|
|
2896
|
-
"type": "u64"
|
|
2897
|
-
},
|
|
2898
|
-
{
|
|
2899
|
-
"name": "total_claimed",
|
|
2900
|
-
"type": "u64"
|
|
2901
|
-
},
|
|
2902
|
-
{
|
|
2903
|
-
"name": "total_users",
|
|
2904
|
-
"type": "u64"
|
|
2905
|
-
},
|
|
2906
|
-
{
|
|
2907
|
-
"name": "claimed_users",
|
|
2908
|
-
"type": "u64"
|
|
2909
|
-
},
|
|
2910
|
-
{
|
|
2911
|
-
"name": "token_per_user",
|
|
2912
|
-
"type": "u64"
|
|
2913
|
-
},
|
|
2914
|
-
{
|
|
2915
|
-
"name": "mint",
|
|
2916
|
-
"type": "pubkey"
|
|
2917
|
-
},
|
|
2918
|
-
{
|
|
2919
|
-
"name": "is_active",
|
|
2920
|
-
"type": "bool"
|
|
2921
|
-
},
|
|
2922
|
-
{
|
|
2923
|
-
"name": "name",
|
|
2924
|
-
"type": "string"
|
|
2925
|
-
},
|
|
2926
|
-
{
|
|
2927
|
-
"name": "is_first_come_first_served",
|
|
2928
|
-
"type": "bool"
|
|
2929
|
-
},
|
|
2930
|
-
{
|
|
2931
|
-
"name": "timestamp",
|
|
2932
|
-
"type": "i64"
|
|
2933
|
-
},
|
|
2934
|
-
{
|
|
2935
|
-
"name": "merkle_root",
|
|
2936
|
-
"type": {
|
|
2937
|
-
"array": ["u8", 32]
|
|
2938
|
-
}
|
|
2939
|
-
}
|
|
2940
|
-
]
|
|
2941
|
-
}
|
|
2942
|
-
},
|
|
2943
2811
|
{
|
|
2944
2812
|
"name": "CollectMarketFeeEvent",
|
|
2945
2813
|
"type": {
|
|
@@ -3072,6 +2940,22 @@
|
|
|
3072
2940
|
]
|
|
3073
2941
|
}
|
|
3074
2942
|
},
|
|
2943
|
+
{
|
|
2944
|
+
"name": "CreateMarketPythArgs",
|
|
2945
|
+
"type": {
|
|
2946
|
+
"kind": "struct",
|
|
2947
|
+
"fields": [
|
|
2948
|
+
{
|
|
2949
|
+
"name": "market_id",
|
|
2950
|
+
"type": "u64"
|
|
2951
|
+
},
|
|
2952
|
+
{
|
|
2953
|
+
"name": "resolve_in",
|
|
2954
|
+
"type": "i64"
|
|
2955
|
+
}
|
|
2956
|
+
]
|
|
2957
|
+
}
|
|
2958
|
+
},
|
|
3075
2959
|
{
|
|
3076
2960
|
"name": "CreatePoolArgs",
|
|
3077
2961
|
"type": {
|
|
@@ -3084,14 +2968,22 @@
|
|
|
3084
2968
|
{
|
|
3085
2969
|
"name": "question",
|
|
3086
2970
|
"type": {
|
|
3087
|
-
"
|
|
3088
|
-
"array": ["u8", 80]
|
|
3089
|
-
}
|
|
2971
|
+
"array": ["u8", 80]
|
|
3090
2972
|
}
|
|
3091
2973
|
},
|
|
3092
2974
|
{
|
|
3093
2975
|
"name": "is_fast",
|
|
3094
2976
|
"type": "bool"
|
|
2977
|
+
},
|
|
2978
|
+
{
|
|
2979
|
+
"name": "is_pyth",
|
|
2980
|
+
"type": "bool"
|
|
2981
|
+
},
|
|
2982
|
+
{
|
|
2983
|
+
"name": "feed_id",
|
|
2984
|
+
"type": {
|
|
2985
|
+
"option": "pubkey"
|
|
2986
|
+
}
|
|
3095
2987
|
}
|
|
3096
2988
|
]
|
|
3097
2989
|
}
|
|
@@ -3139,7 +3031,6 @@
|
|
|
3139
3031
|
},
|
|
3140
3032
|
{
|
|
3141
3033
|
"name": "fee_bps",
|
|
3142
|
-
"docs": ["Fee in basis points to receive from the market fee"],
|
|
3143
3034
|
"type": "u16"
|
|
3144
3035
|
},
|
|
3145
3036
|
{
|
|
@@ -3830,21 +3721,23 @@
|
|
|
3830
3721
|
"type": "pubkey"
|
|
3831
3722
|
},
|
|
3832
3723
|
{
|
|
3833
|
-
"name": "
|
|
3834
|
-
"type":
|
|
3835
|
-
|
|
3836
|
-
|
|
3724
|
+
"name": "is_fast",
|
|
3725
|
+
"type": "bool"
|
|
3726
|
+
},
|
|
3727
|
+
{
|
|
3728
|
+
"name": "is_pyth",
|
|
3729
|
+
"type": "bool"
|
|
3837
3730
|
},
|
|
3838
3731
|
{
|
|
3839
|
-
"name": "
|
|
3732
|
+
"name": "feed_id",
|
|
3840
3733
|
"type": {
|
|
3841
|
-
"array": ["u8",
|
|
3734
|
+
"array": ["u8", 32]
|
|
3842
3735
|
}
|
|
3843
3736
|
},
|
|
3844
3737
|
{
|
|
3845
3738
|
"name": "padding",
|
|
3846
3739
|
"type": {
|
|
3847
|
-
"array": ["u8",
|
|
3740
|
+
"array": ["u8", 30]
|
|
3848
3741
|
}
|
|
3849
3742
|
}
|
|
3850
3743
|
]
|
|
@@ -3926,6 +3819,109 @@
|
|
|
3926
3819
|
]
|
|
3927
3820
|
}
|
|
3928
3821
|
},
|
|
3822
|
+
{
|
|
3823
|
+
"name": "PriceFeedMessage",
|
|
3824
|
+
"repr": {
|
|
3825
|
+
"kind": "c"
|
|
3826
|
+
},
|
|
3827
|
+
"type": {
|
|
3828
|
+
"kind": "struct",
|
|
3829
|
+
"fields": [
|
|
3830
|
+
{
|
|
3831
|
+
"name": "feed_id",
|
|
3832
|
+
"docs": [
|
|
3833
|
+
"`FeedId` but avoid the type alias because of compatibility issues with Anchor's `idl-build` feature."
|
|
3834
|
+
],
|
|
3835
|
+
"type": {
|
|
3836
|
+
"array": ["u8", 32]
|
|
3837
|
+
}
|
|
3838
|
+
},
|
|
3839
|
+
{
|
|
3840
|
+
"name": "price",
|
|
3841
|
+
"type": "i64"
|
|
3842
|
+
},
|
|
3843
|
+
{
|
|
3844
|
+
"name": "conf",
|
|
3845
|
+
"type": "u64"
|
|
3846
|
+
},
|
|
3847
|
+
{
|
|
3848
|
+
"name": "exponent",
|
|
3849
|
+
"type": "i32"
|
|
3850
|
+
},
|
|
3851
|
+
{
|
|
3852
|
+
"name": "publish_time",
|
|
3853
|
+
"docs": ["The timestamp of this price update in seconds"],
|
|
3854
|
+
"type": "i64"
|
|
3855
|
+
},
|
|
3856
|
+
{
|
|
3857
|
+
"name": "prev_publish_time",
|
|
3858
|
+
"docs": [
|
|
3859
|
+
"The timestamp of the previous price update. This field is intended to allow users to",
|
|
3860
|
+
"identify the single unique price update for any moment in time:",
|
|
3861
|
+
"for any time t, the unique update is the one such that prev_publish_time < t <= publish_time.",
|
|
3862
|
+
"",
|
|
3863
|
+
"Note that there may not be such an update while we are migrating to the new message-sending logic,",
|
|
3864
|
+
"as some price updates on pythnet may not be sent to other chains (because the message-sending",
|
|
3865
|
+
"logic may not have triggered). We can solve this problem by making the message-sending mandatory",
|
|
3866
|
+
"(which we can do once publishers have migrated over).",
|
|
3867
|
+
"",
|
|
3868
|
+
"Additionally, this field may be equal to publish_time if the message is sent on a slot where",
|
|
3869
|
+
"where the aggregation was unsuccesful. This problem will go away once all publishers have",
|
|
3870
|
+
"migrated over to a recent version of pyth-agent."
|
|
3871
|
+
],
|
|
3872
|
+
"type": "i64"
|
|
3873
|
+
},
|
|
3874
|
+
{
|
|
3875
|
+
"name": "ema_price",
|
|
3876
|
+
"type": "i64"
|
|
3877
|
+
},
|
|
3878
|
+
{
|
|
3879
|
+
"name": "ema_conf",
|
|
3880
|
+
"type": "u64"
|
|
3881
|
+
}
|
|
3882
|
+
]
|
|
3883
|
+
}
|
|
3884
|
+
},
|
|
3885
|
+
{
|
|
3886
|
+
"name": "PriceUpdateV2",
|
|
3887
|
+
"docs": [
|
|
3888
|
+
"A price update account. This account is used by the Pyth Receiver program to store a verified price update from a Pyth price feed.",
|
|
3889
|
+
"It contains:",
|
|
3890
|
+
"- `write_authority`: The write authority for this account. This authority can close this account to reclaim rent or update the account to contain a different price update.",
|
|
3891
|
+
"- `verification_level`: The [`VerificationLevel`] of this price update. This represents how many Wormhole guardian signatures have been verified for this price update.",
|
|
3892
|
+
"- `price_message`: The actual price update.",
|
|
3893
|
+
"- `posted_slot`: The slot at which this price update was posted."
|
|
3894
|
+
],
|
|
3895
|
+
"type": {
|
|
3896
|
+
"kind": "struct",
|
|
3897
|
+
"fields": [
|
|
3898
|
+
{
|
|
3899
|
+
"name": "write_authority",
|
|
3900
|
+
"type": "pubkey"
|
|
3901
|
+
},
|
|
3902
|
+
{
|
|
3903
|
+
"name": "verification_level",
|
|
3904
|
+
"type": {
|
|
3905
|
+
"defined": {
|
|
3906
|
+
"name": "VerificationLevel"
|
|
3907
|
+
}
|
|
3908
|
+
}
|
|
3909
|
+
},
|
|
3910
|
+
{
|
|
3911
|
+
"name": "price_message",
|
|
3912
|
+
"type": {
|
|
3913
|
+
"defined": {
|
|
3914
|
+
"name": "PriceFeedMessage"
|
|
3915
|
+
}
|
|
3916
|
+
}
|
|
3917
|
+
},
|
|
3918
|
+
{
|
|
3919
|
+
"name": "posted_slot",
|
|
3920
|
+
"type": "u64"
|
|
3921
|
+
}
|
|
3922
|
+
]
|
|
3923
|
+
}
|
|
3924
|
+
},
|
|
3929
3925
|
{
|
|
3930
3926
|
"name": "RequestUnstakeArgs",
|
|
3931
3927
|
"type": {
|
|
@@ -4158,23 +4154,34 @@
|
|
|
4158
4154
|
}
|
|
4159
4155
|
},
|
|
4160
4156
|
{
|
|
4161
|
-
"name": "
|
|
4157
|
+
"name": "VerificationLevel",
|
|
4158
|
+
"docs": [
|
|
4159
|
+
"Pyth price updates are bridged to all blockchains via Wormhole.",
|
|
4160
|
+
"Using the price updates on another chain requires verifying the signatures of the Wormhole guardians.",
|
|
4161
|
+
"The usual process is to check the signatures for two thirds of the total number of guardians, but this can be cumbersome on Solana because of the transaction size limits,",
|
|
4162
|
+
"so we also allow for partial verification.",
|
|
4163
|
+
"",
|
|
4164
|
+
"This enum represents how much a price update has been verified:",
|
|
4165
|
+
"- If `Full`, we have verified the signatures for two thirds of the current guardians.",
|
|
4166
|
+
"- If `Partial`, only `num_signatures` guardian signatures have been checked.",
|
|
4167
|
+
"",
|
|
4168
|
+
"# Warning",
|
|
4169
|
+
"Using partially verified price updates is dangerous, as it lowers the threshold of guardians that need to collude to produce a malicious price update."
|
|
4170
|
+
],
|
|
4162
4171
|
"type": {
|
|
4163
|
-
"kind": "
|
|
4164
|
-
"
|
|
4165
|
-
{
|
|
4166
|
-
"name": "id",
|
|
4167
|
-
"type": "u16"
|
|
4168
|
-
},
|
|
4172
|
+
"kind": "enum",
|
|
4173
|
+
"variants": [
|
|
4169
4174
|
{
|
|
4170
|
-
"name": "
|
|
4171
|
-
"
|
|
4172
|
-
|
|
4173
|
-
|
|
4175
|
+
"name": "Partial",
|
|
4176
|
+
"fields": [
|
|
4177
|
+
{
|
|
4178
|
+
"name": "num_signatures",
|
|
4179
|
+
"type": "u8"
|
|
4180
|
+
}
|
|
4181
|
+
]
|
|
4174
4182
|
},
|
|
4175
4183
|
{
|
|
4176
|
-
"name": "
|
|
4177
|
-
"type": "u16"
|
|
4184
|
+
"name": "Full"
|
|
4178
4185
|
}
|
|
4179
4186
|
]
|
|
4180
4187
|
}
|