@triadxyz/triad-protocol 1.9.8-beta → 2.0.0-beta

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.
@@ -44,26 +44,6 @@
44
44
  ],
45
45
  "args": []
46
46
  },
47
- {
48
- "name": "allow_market_to_payout",
49
- "discriminator": [193, 227, 109, 171, 110, 177, 47, 251],
50
- "accounts": [
51
- {
52
- "name": "signer",
53
- "writable": true,
54
- "signer": true
55
- },
56
- {
57
- "name": "market",
58
- "writable": true
59
- },
60
- {
61
- "name": "system_program",
62
- "address": "11111111111111111111111111111111"
63
- }
64
- ],
65
- "args": []
66
- },
67
47
  {
68
48
  "name": "cancel_ask_order",
69
49
  "discriminator": [211, 157, 113, 122, 34, 180, 162, 178],
@@ -204,7 +184,21 @@
204
184
  },
205
185
  {
206
186
  "name": "stake_vault",
207
- "writable": true
187
+ "writable": true,
188
+ "pda": {
189
+ "seeds": [
190
+ {
191
+ "kind": "const",
192
+ "value": [115, 116, 97, 107, 101, 95, 118, 97, 117, 108, 116]
193
+ },
194
+ {
195
+ "kind": "const",
196
+ "value": [
197
+ 84, 114, 105, 97, 100, 32, 83, 104, 97, 114, 101, 32, 49
198
+ ]
199
+ }
200
+ ]
201
+ }
208
202
  },
209
203
  {
210
204
  "name": "stake",
@@ -753,7 +747,7 @@
753
747
  "writable": true
754
748
  },
755
749
  {
756
- "name": "user_from_ata",
750
+ "name": "seller_ata",
757
751
  "writable": true,
758
752
  "pda": {
759
753
  "seeds": [
@@ -782,31 +776,7 @@
782
776
  },
783
777
  {
784
778
  "name": "market_ata",
785
- "writable": true,
786
- "pda": {
787
- "seeds": [
788
- {
789
- "kind": "account",
790
- "path": "market"
791
- },
792
- {
793
- "kind": "account",
794
- "path": "token_program"
795
- },
796
- {
797
- "kind": "account",
798
- "path": "mint"
799
- }
800
- ],
801
- "program": {
802
- "kind": "const",
803
- "value": [
804
- 140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142,
805
- 13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216,
806
- 219, 233, 248, 89
807
- ]
808
- }
809
- }
779
+ "writable": true
810
780
  },
811
781
  {
812
782
  "name": "token_program"
@@ -866,15 +836,15 @@
866
836
  "writable": true
867
837
  },
868
838
  {
869
- "name": "user_from_ata",
839
+ "name": "buyer_ata",
870
840
  "writable": true
871
841
  },
872
842
  {
873
- "name": "market_to_ata",
843
+ "name": "market_ata",
874
844
  "writable": true
875
845
  },
876
846
  {
877
- "name": "seller_to_ata",
847
+ "name": "seller_ata",
878
848
  "writable": true,
879
849
  "pda": {
880
850
  "seeds": [
@@ -1335,35 +1305,6 @@
1335
1305
  ],
1336
1306
  "args": []
1337
1307
  },
1338
- {
1339
- "name": "resolve_market",
1340
- "discriminator": [155, 23, 80, 173, 46, 74, 23, 239],
1341
- "accounts": [
1342
- {
1343
- "name": "signer",
1344
- "writable": true,
1345
- "signer": true
1346
- },
1347
- {
1348
- "name": "market",
1349
- "writable": true
1350
- },
1351
- {
1352
- "name": "system_program",
1353
- "address": "11111111111111111111111111111111"
1354
- }
1355
- ],
1356
- "args": [
1357
- {
1358
- "name": "winning_direction",
1359
- "type": {
1360
- "defined": {
1361
- "name": "WinningDirection"
1362
- }
1363
- }
1364
- }
1365
- ]
1366
- },
1367
1308
  {
1368
1309
  "name": "stake_token",
1369
1310
  "discriminator": [191, 127, 193, 101, 37, 96, 87, 211],
@@ -1383,8 +1324,10 @@
1383
1324
  "value": [115, 116, 97, 107, 101, 95, 118, 97, 117, 108, 116]
1384
1325
  },
1385
1326
  {
1386
- "kind": "arg",
1387
- "path": "args.stake_vault"
1327
+ "kind": "const",
1328
+ "value": [
1329
+ 84, 114, 105, 97, 100, 32, 83, 104, 97, 114, 101, 32, 49
1330
+ ]
1388
1331
  }
1389
1332
  ]
1390
1333
  }
@@ -1566,8 +1509,12 @@
1566
1509
  ],
1567
1510
  "args": [
1568
1511
  {
1569
- "name": "market_end",
1570
- "type": "i64"
1512
+ "name": "args",
1513
+ "type": {
1514
+ "defined": {
1515
+ "name": "UpdateMarketArgs"
1516
+ }
1517
+ }
1571
1518
  }
1572
1519
  ]
1573
1520
  },
@@ -1590,8 +1537,10 @@
1590
1537
  "value": [115, 116, 97, 107, 101, 95, 118, 97, 117, 108, 116]
1591
1538
  },
1592
1539
  {
1593
- "kind": "arg",
1594
- "path": "args.stake_vault"
1540
+ "kind": "const",
1541
+ "value": [
1542
+ 84, 114, 105, 97, 100, 32, 83, 104, 97, 114, 101, 32, 49
1543
+ ]
1595
1544
  }
1596
1545
  ]
1597
1546
  }
@@ -1727,7 +1676,21 @@
1727
1676
  },
1728
1677
  {
1729
1678
  "name": "stake_vault",
1730
- "writable": true
1679
+ "writable": true,
1680
+ "pda": {
1681
+ "seeds": [
1682
+ {
1683
+ "kind": "const",
1684
+ "value": [115, 116, 97, 107, 101, 95, 118, 97, 117, 108, 116]
1685
+ },
1686
+ {
1687
+ "kind": "const",
1688
+ "value": [
1689
+ 84, 114, 105, 97, 100, 32, 83, 104, 97, 114, 101, 32, 49
1690
+ ]
1691
+ }
1692
+ ]
1693
+ }
1731
1694
  },
1732
1695
  {
1733
1696
  "name": "stake",
@@ -1873,7 +1836,7 @@
1873
1836
  {
1874
1837
  "code": 6000,
1875
1838
  "name": "Unauthorized",
1876
- "msg": "Unauthorized access"
1839
+ "msg": "Unauthorized Instruction"
1877
1840
  },
1878
1841
  {
1879
1842
  "code": 6001,
@@ -1999,6 +1962,11 @@
1999
1962
  "code": 6025,
2000
1963
  "name": "OrderIsFullFilled",
2001
1964
  "msg": "Order is full filled"
1965
+ },
1966
+ {
1967
+ "code": 6026,
1968
+ "name": "Overflow",
1969
+ "msg": "Overflow"
2002
1970
  }
2003
1971
  ],
2004
1972
  "types": [
@@ -2337,6 +2305,14 @@
2337
2305
  "name": "fee_bps",
2338
2306
  "type": "u16"
2339
2307
  },
2308
+ {
2309
+ "name": "payout_fee_available",
2310
+ "type": "u64"
2311
+ },
2312
+ {
2313
+ "name": "payout_fee_claimed",
2314
+ "type": "u64"
2315
+ },
2340
2316
  {
2341
2317
  "name": "market_fee_available",
2342
2318
  "type": "u64"
@@ -2868,14 +2844,6 @@
2868
2844
  "name": "flop_price",
2869
2845
  "type": "u64"
2870
2846
  },
2871
- {
2872
- "name": "direction",
2873
- "type": {
2874
- "defined": {
2875
- "name": "OrderDirection"
2876
- }
2877
- }
2878
- },
2879
2847
  {
2880
2848
  "name": "timestamp",
2881
2849
  "type": "i64"
@@ -2916,10 +2884,6 @@
2916
2884
  "type": {
2917
2885
  "kind": "struct",
2918
2886
  "fields": [
2919
- {
2920
- "name": "stake_vault",
2921
- "type": "string"
2922
- },
2923
2887
  {
2924
2888
  "name": "name",
2925
2889
  "type": "string"
@@ -3084,6 +3048,36 @@
3084
3048
  ]
3085
3049
  }
3086
3050
  },
3051
+ {
3052
+ "name": "UpdateMarketArgs",
3053
+ "type": {
3054
+ "kind": "struct",
3055
+ "fields": [
3056
+ {
3057
+ "name": "market_end",
3058
+ "type": {
3059
+ "option": "i64"
3060
+ }
3061
+ },
3062
+ {
3063
+ "name": "winning_direction",
3064
+ "type": {
3065
+ "option": {
3066
+ "defined": {
3067
+ "name": "WinningDirection"
3068
+ }
3069
+ }
3070
+ }
3071
+ },
3072
+ {
3073
+ "name": "allow_payout",
3074
+ "type": {
3075
+ "option": "bool"
3076
+ }
3077
+ }
3078
+ ]
3079
+ }
3080
+ },
3087
3081
  {
3088
3082
  "name": "UpdateStakeVaultArgs",
3089
3083
  "type": {
@@ -3100,10 +3094,6 @@
3100
3094
  "type": {
3101
3095
  "option": "bool"
3102
3096
  }
3103
- },
3104
- {
3105
- "name": "stake_vault",
3106
- "type": "string"
3107
3097
  }
3108
3098
  ]
3109
3099
  }
@@ -50,26 +50,6 @@ export type TriadProtocol = {
50
50
  ];
51
51
  args: [];
52
52
  },
53
- {
54
- name: 'allowMarketToPayout';
55
- discriminator: [193, 227, 109, 171, 110, 177, 47, 251];
56
- accounts: [
57
- {
58
- name: 'signer';
59
- writable: true;
60
- signer: true;
61
- },
62
- {
63
- name: 'market';
64
- writable: true;
65
- },
66
- {
67
- name: 'systemProgram';
68
- address: '11111111111111111111111111111111';
69
- }
70
- ];
71
- args: [];
72
- },
73
53
  {
74
54
  name: 'cancelAskOrder';
75
55
  discriminator: [211, 157, 113, 122, 34, 180, 162, 178];
@@ -269,6 +249,32 @@ export type TriadProtocol = {
269
249
  {
270
250
  name: 'stakeVault';
271
251
  writable: true;
252
+ pda: {
253
+ seeds: [
254
+ {
255
+ kind: 'const';
256
+ value: [115, 116, 97, 107, 101, 95, 118, 97, 117, 108, 116];
257
+ },
258
+ {
259
+ kind: 'const';
260
+ value: [
261
+ 84,
262
+ 114,
263
+ 105,
264
+ 97,
265
+ 100,
266
+ 32,
267
+ 83,
268
+ 104,
269
+ 97,
270
+ 114,
271
+ 101,
272
+ 32,
273
+ 49
274
+ ];
275
+ }
276
+ ];
277
+ };
272
278
  },
273
279
  {
274
280
  name: 'stake';
@@ -1020,7 +1026,7 @@ export type TriadProtocol = {
1020
1026
  writable: true;
1021
1027
  },
1022
1028
  {
1023
- name: 'userFromAta';
1029
+ name: 'sellerAta';
1024
1030
  writable: true;
1025
1031
  pda: {
1026
1032
  seeds: [
@@ -1079,59 +1085,6 @@ export type TriadProtocol = {
1079
1085
  {
1080
1086
  name: 'marketAta';
1081
1087
  writable: true;
1082
- pda: {
1083
- seeds: [
1084
- {
1085
- kind: 'account';
1086
- path: 'market';
1087
- },
1088
- {
1089
- kind: 'account';
1090
- path: 'tokenProgram';
1091
- },
1092
- {
1093
- kind: 'account';
1094
- path: 'mint';
1095
- }
1096
- ];
1097
- program: {
1098
- kind: 'const';
1099
- value: [
1100
- 140,
1101
- 151,
1102
- 37,
1103
- 143,
1104
- 78,
1105
- 36,
1106
- 137,
1107
- 241,
1108
- 187,
1109
- 61,
1110
- 16,
1111
- 41,
1112
- 20,
1113
- 142,
1114
- 13,
1115
- 131,
1116
- 11,
1117
- 90,
1118
- 19,
1119
- 153,
1120
- 218,
1121
- 255,
1122
- 16,
1123
- 132,
1124
- 4,
1125
- 142,
1126
- 123,
1127
- 216,
1128
- 219,
1129
- 233,
1130
- 248,
1131
- 89
1132
- ];
1133
- };
1134
- };
1135
1088
  },
1136
1089
  {
1137
1090
  name: 'tokenProgram';
@@ -1191,15 +1144,15 @@ export type TriadProtocol = {
1191
1144
  writable: true;
1192
1145
  },
1193
1146
  {
1194
- name: 'userFromAta';
1147
+ name: 'buyerAta';
1195
1148
  writable: true;
1196
1149
  },
1197
1150
  {
1198
- name: 'marketToAta';
1151
+ name: 'marketAta';
1199
1152
  writable: true;
1200
1153
  },
1201
1154
  {
1202
- name: 'sellerToAta';
1155
+ name: 'sellerAta';
1203
1156
  writable: true;
1204
1157
  pda: {
1205
1158
  seeds: [
@@ -1863,35 +1816,6 @@ export type TriadProtocol = {
1863
1816
  ];
1864
1817
  args: [];
1865
1818
  },
1866
- {
1867
- name: 'resolveMarket';
1868
- discriminator: [155, 23, 80, 173, 46, 74, 23, 239];
1869
- accounts: [
1870
- {
1871
- name: 'signer';
1872
- writable: true;
1873
- signer: true;
1874
- },
1875
- {
1876
- name: 'market';
1877
- writable: true;
1878
- },
1879
- {
1880
- name: 'systemProgram';
1881
- address: '11111111111111111111111111111111';
1882
- }
1883
- ];
1884
- args: [
1885
- {
1886
- name: 'winningDirection';
1887
- type: {
1888
- defined: {
1889
- name: 'winningDirection';
1890
- };
1891
- };
1892
- }
1893
- ];
1894
- },
1895
1819
  {
1896
1820
  name: 'stakeToken';
1897
1821
  discriminator: [191, 127, 193, 101, 37, 96, 87, 211];
@@ -1911,8 +1835,22 @@ export type TriadProtocol = {
1911
1835
  value: [115, 116, 97, 107, 101, 95, 118, 97, 117, 108, 116];
1912
1836
  },
1913
1837
  {
1914
- kind: 'arg';
1915
- path: 'args.stake_vault';
1838
+ kind: 'const';
1839
+ value: [
1840
+ 84,
1841
+ 114,
1842
+ 105,
1843
+ 97,
1844
+ 100,
1845
+ 32,
1846
+ 83,
1847
+ 104,
1848
+ 97,
1849
+ 114,
1850
+ 101,
1851
+ 32,
1852
+ 49
1853
+ ];
1916
1854
  }
1917
1855
  ];
1918
1856
  };
@@ -2152,8 +2090,12 @@ export type TriadProtocol = {
2152
2090
  ];
2153
2091
  args: [
2154
2092
  {
2155
- name: 'marketEnd';
2156
- type: 'i64';
2093
+ name: 'args';
2094
+ type: {
2095
+ defined: {
2096
+ name: 'updateMarketArgs';
2097
+ };
2098
+ };
2157
2099
  }
2158
2100
  ];
2159
2101
  },
@@ -2176,8 +2118,22 @@ export type TriadProtocol = {
2176
2118
  value: [115, 116, 97, 107, 101, 95, 118, 97, 117, 108, 116];
2177
2119
  },
2178
2120
  {
2179
- kind: 'arg';
2180
- path: 'args.stake_vault';
2121
+ kind: 'const';
2122
+ value: [
2123
+ 84,
2124
+ 114,
2125
+ 105,
2126
+ 97,
2127
+ 100,
2128
+ 32,
2129
+ 83,
2130
+ 104,
2131
+ 97,
2132
+ 114,
2133
+ 101,
2134
+ 32,
2135
+ 49
2136
+ ];
2181
2137
  }
2182
2138
  ];
2183
2139
  };
@@ -2372,6 +2328,32 @@ export type TriadProtocol = {
2372
2328
  {
2373
2329
  name: 'stakeVault';
2374
2330
  writable: true;
2331
+ pda: {
2332
+ seeds: [
2333
+ {
2334
+ kind: 'const';
2335
+ value: [115, 116, 97, 107, 101, 95, 118, 97, 117, 108, 116];
2336
+ },
2337
+ {
2338
+ kind: 'const';
2339
+ value: [
2340
+ 84,
2341
+ 114,
2342
+ 105,
2343
+ 97,
2344
+ 100,
2345
+ 32,
2346
+ 83,
2347
+ 104,
2348
+ 97,
2349
+ 114,
2350
+ 101,
2351
+ 32,
2352
+ 49
2353
+ ];
2354
+ }
2355
+ ];
2356
+ };
2375
2357
  },
2376
2358
  {
2377
2359
  name: 'stake';
@@ -2575,7 +2557,7 @@ export type TriadProtocol = {
2575
2557
  {
2576
2558
  code: 6000;
2577
2559
  name: 'unauthorized';
2578
- msg: 'Unauthorized access';
2560
+ msg: 'Unauthorized Instruction';
2579
2561
  },
2580
2562
  {
2581
2563
  code: 6001;
@@ -2701,6 +2683,11 @@ export type TriadProtocol = {
2701
2683
  code: 6025;
2702
2684
  name: 'orderIsFullFilled';
2703
2685
  msg: 'Order is full filled';
2686
+ },
2687
+ {
2688
+ code: 6026;
2689
+ name: 'overflow';
2690
+ msg: 'overflow';
2704
2691
  }
2705
2692
  ];
2706
2693
  types: [
@@ -3039,6 +3026,14 @@ export type TriadProtocol = {
3039
3026
  name: 'feeBps';
3040
3027
  type: 'u16';
3041
3028
  },
3029
+ {
3030
+ name: 'payoutFeeAvailable';
3031
+ type: 'u64';
3032
+ },
3033
+ {
3034
+ name: 'payoutFeeClaimed';
3035
+ type: 'u64';
3036
+ },
3042
3037
  {
3043
3038
  name: 'marketFeeAvailable';
3044
3039
  type: 'u64';
@@ -3570,14 +3565,6 @@ export type TriadProtocol = {
3570
3565
  name: 'flopPrice';
3571
3566
  type: 'u64';
3572
3567
  },
3573
- {
3574
- name: 'direction';
3575
- type: {
3576
- defined: {
3577
- name: 'orderDirection';
3578
- };
3579
- };
3580
- },
3581
3568
  {
3582
3569
  name: 'timestamp';
3583
3570
  type: 'i64';
@@ -3618,10 +3605,6 @@ export type TriadProtocol = {
3618
3605
  type: {
3619
3606
  kind: 'struct';
3620
3607
  fields: [
3621
- {
3622
- name: 'stakeVault';
3623
- type: 'string';
3624
- },
3625
3608
  {
3626
3609
  name: 'name';
3627
3610
  type: 'string';
@@ -3786,6 +3769,36 @@ export type TriadProtocol = {
3786
3769
  ];
3787
3770
  };
3788
3771
  },
3772
+ {
3773
+ name: 'updateMarketArgs';
3774
+ type: {
3775
+ kind: 'struct';
3776
+ fields: [
3777
+ {
3778
+ name: 'marketEnd';
3779
+ type: {
3780
+ option: 'i64';
3781
+ };
3782
+ },
3783
+ {
3784
+ name: 'winningDirection';
3785
+ type: {
3786
+ option: {
3787
+ defined: {
3788
+ name: 'winningDirection';
3789
+ };
3790
+ };
3791
+ };
3792
+ },
3793
+ {
3794
+ name: 'allowPayout';
3795
+ type: {
3796
+ option: 'bool';
3797
+ };
3798
+ }
3799
+ ];
3800
+ };
3801
+ },
3789
3802
  {
3790
3803
  name: 'updateStakeVaultArgs';
3791
3804
  type: {
@@ -3802,10 +3815,6 @@ export type TriadProtocol = {
3802
3815
  type: {
3803
3816
  option: 'bool';
3804
3817
  };
3805
- },
3806
- {
3807
- name: 'stakeVault';
3808
- type: 'string';
3809
3818
  }
3810
3819
  ];
3811
3820
  };