@triadxyz/triad-protocol 3.1.2-beta → 3.1.3-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.
@@ -288,6 +288,7 @@ export type TriadProtocol = {
288
288
  {
289
289
  name: 'mint';
290
290
  writable: true;
291
+ address: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
291
292
  },
292
293
  {
293
294
  name: 'userAta';
@@ -405,6 +406,7 @@ export type TriadProtocol = {
405
406
  },
406
407
  {
407
408
  name: 'tokenProgram';
409
+ address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
408
410
  },
409
411
  {
410
412
  name: 'associatedTokenProgram';
@@ -1000,6 +1002,36 @@ export type TriadProtocol = {
1000
1002
  name: 'market';
1001
1003
  writable: true;
1002
1004
  },
1005
+ {
1006
+ name: 'stakeVault';
1007
+ writable: true;
1008
+ pda: {
1009
+ seeds: [
1010
+ {
1011
+ kind: 'const';
1012
+ value: [115, 116, 97, 107, 101, 95, 118, 97, 117, 108, 116];
1013
+ },
1014
+ {
1015
+ kind: 'const';
1016
+ value: [
1017
+ 84,
1018
+ 114,
1019
+ 105,
1020
+ 97,
1021
+ 100,
1022
+ 32,
1023
+ 83,
1024
+ 104,
1025
+ 97,
1026
+ 114,
1027
+ 101,
1028
+ 32,
1029
+ 49
1030
+ ];
1031
+ }
1032
+ ];
1033
+ };
1034
+ },
1003
1035
  {
1004
1036
  name: 'customerFeeRecipient';
1005
1037
  writable: true;
@@ -1197,157 +1229,6 @@ export type TriadProtocol = {
1197
1229
  ];
1198
1230
  args: [];
1199
1231
  },
1200
- {
1201
- name: 'collectRemainingLiquidity';
1202
- discriminator: [153, 107, 201, 83, 183, 195, 59, 186];
1203
- accounts: [
1204
- {
1205
- name: 'signer';
1206
- writable: true;
1207
- signer: true;
1208
- },
1209
- {
1210
- name: 'squads';
1211
- writable: true;
1212
- address: 'Hk1r2NUL4LbUhx1agg1w44tyZiNr72mbeLsg6suF5MA4';
1213
- },
1214
- {
1215
- name: 'market';
1216
- writable: true;
1217
- },
1218
- {
1219
- name: 'mint';
1220
- writable: true;
1221
- },
1222
- {
1223
- name: 'marketAta';
1224
- writable: true;
1225
- pda: {
1226
- seeds: [
1227
- {
1228
- kind: 'account';
1229
- path: 'market';
1230
- },
1231
- {
1232
- kind: 'account';
1233
- path: 'tokenProgram';
1234
- },
1235
- {
1236
- kind: 'account';
1237
- path: 'mint';
1238
- }
1239
- ];
1240
- program: {
1241
- kind: 'const';
1242
- value: [
1243
- 140,
1244
- 151,
1245
- 37,
1246
- 143,
1247
- 78,
1248
- 36,
1249
- 137,
1250
- 241,
1251
- 187,
1252
- 61,
1253
- 16,
1254
- 41,
1255
- 20,
1256
- 142,
1257
- 13,
1258
- 131,
1259
- 11,
1260
- 90,
1261
- 19,
1262
- 153,
1263
- 218,
1264
- 255,
1265
- 16,
1266
- 132,
1267
- 4,
1268
- 142,
1269
- 123,
1270
- 216,
1271
- 219,
1272
- 233,
1273
- 248,
1274
- 89
1275
- ];
1276
- };
1277
- };
1278
- },
1279
- {
1280
- name: 'squadsAta';
1281
- writable: true;
1282
- pda: {
1283
- seeds: [
1284
- {
1285
- kind: 'account';
1286
- path: 'squads';
1287
- },
1288
- {
1289
- kind: 'account';
1290
- path: 'tokenProgram';
1291
- },
1292
- {
1293
- kind: 'account';
1294
- path: 'mint';
1295
- }
1296
- ];
1297
- program: {
1298
- kind: 'const';
1299
- value: [
1300
- 140,
1301
- 151,
1302
- 37,
1303
- 143,
1304
- 78,
1305
- 36,
1306
- 137,
1307
- 241,
1308
- 187,
1309
- 61,
1310
- 16,
1311
- 41,
1312
- 20,
1313
- 142,
1314
- 13,
1315
- 131,
1316
- 11,
1317
- 90,
1318
- 19,
1319
- 153,
1320
- 218,
1321
- 255,
1322
- 16,
1323
- 132,
1324
- 4,
1325
- 142,
1326
- 123,
1327
- 216,
1328
- 219,
1329
- 233,
1330
- 248,
1331
- 89
1332
- ];
1333
- };
1334
- };
1335
- },
1336
- {
1337
- name: 'tokenProgram';
1338
- address: 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb';
1339
- },
1340
- {
1341
- name: 'associatedTokenProgram';
1342
- address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
1343
- },
1344
- {
1345
- name: 'systemProgram';
1346
- address: '11111111111111111111111111111111';
1347
- }
1348
- ];
1349
- args: [];
1350
- },
1351
1232
  {
1352
1233
  name: 'collectRoyalty';
1353
1234
  discriminator: [189, 235, 7, 168, 255, 50, 30, 75];
@@ -2014,6 +1895,125 @@ export type TriadProtocol = {
2014
1895
  }
2015
1896
  ];
2016
1897
  },
1898
+ {
1899
+ name: 'marketAskOrderV1';
1900
+ discriminator: [232, 254, 180, 215, 149, 178, 211, 216];
1901
+ accounts: [
1902
+ {
1903
+ name: 'signer';
1904
+ writable: true;
1905
+ signer: true;
1906
+ },
1907
+ {
1908
+ name: 'market';
1909
+ writable: true;
1910
+ },
1911
+ {
1912
+ name: 'orderBook';
1913
+ writable: true;
1914
+ },
1915
+ {
1916
+ name: 'buyerAuthority';
1917
+ writable: true;
1918
+ },
1919
+ {
1920
+ name: 'sellerTrade';
1921
+ writable: true;
1922
+ },
1923
+ {
1924
+ name: 'buyerTrade';
1925
+ writable: true;
1926
+ },
1927
+ {
1928
+ name: 'mint';
1929
+ writable: true;
1930
+ address: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
1931
+ },
1932
+ {
1933
+ name: 'sellerAta';
1934
+ writable: true;
1935
+ pda: {
1936
+ seeds: [
1937
+ {
1938
+ kind: 'account';
1939
+ path: 'signer';
1940
+ },
1941
+ {
1942
+ kind: 'account';
1943
+ path: 'tokenProgram';
1944
+ },
1945
+ {
1946
+ kind: 'account';
1947
+ path: 'mint';
1948
+ }
1949
+ ];
1950
+ program: {
1951
+ kind: 'const';
1952
+ value: [
1953
+ 140,
1954
+ 151,
1955
+ 37,
1956
+ 143,
1957
+ 78,
1958
+ 36,
1959
+ 137,
1960
+ 241,
1961
+ 187,
1962
+ 61,
1963
+ 16,
1964
+ 41,
1965
+ 20,
1966
+ 142,
1967
+ 13,
1968
+ 131,
1969
+ 11,
1970
+ 90,
1971
+ 19,
1972
+ 153,
1973
+ 218,
1974
+ 255,
1975
+ 16,
1976
+ 132,
1977
+ 4,
1978
+ 142,
1979
+ 123,
1980
+ 216,
1981
+ 219,
1982
+ 233,
1983
+ 248,
1984
+ 89
1985
+ ];
1986
+ };
1987
+ };
1988
+ },
1989
+ {
1990
+ name: 'marketAta';
1991
+ writable: true;
1992
+ },
1993
+ {
1994
+ name: 'tokenProgram';
1995
+ address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
1996
+ },
1997
+ {
1998
+ name: 'associatedTokenProgram';
1999
+ address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
2000
+ },
2001
+ {
2002
+ name: 'systemProgram';
2003
+ address: '11111111111111111111111111111111';
2004
+ }
2005
+ ];
2006
+ args: [
2007
+ {
2008
+ name: 'args';
2009
+ type: {
2010
+ defined: {
2011
+ name: 'marketAskOrderArgs';
2012
+ };
2013
+ };
2014
+ }
2015
+ ];
2016
+ },
2017
2017
  {
2018
2018
  name: 'marketBidOrder';
2019
2019
  discriminator: [145, 89, 7, 166, 85, 59, 48, 149];
@@ -2118,11 +2118,130 @@ export type TriadProtocol = {
2118
2118
  writable: true;
2119
2119
  },
2120
2120
  {
2121
- name: 'squadsAta';
2121
+ name: 'tokenProgram';
2122
+ },
2123
+ {
2124
+ name: 'associatedTokenProgram';
2125
+ address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
2126
+ },
2127
+ {
2128
+ name: 'systemProgram';
2129
+ address: '11111111111111111111111111111111';
2130
+ }
2131
+ ];
2132
+ args: [
2133
+ {
2134
+ name: 'args';
2135
+ type: {
2136
+ defined: {
2137
+ name: 'marketBidOrderArgs';
2138
+ };
2139
+ };
2140
+ }
2141
+ ];
2142
+ },
2143
+ {
2144
+ name: 'marketBidOrderV1';
2145
+ discriminator: [217, 128, 204, 203, 203, 240, 236, 136];
2146
+ accounts: [
2147
+ {
2148
+ name: 'signer';
2149
+ writable: true;
2150
+ signer: true;
2151
+ },
2152
+ {
2153
+ name: 'market';
2154
+ writable: true;
2155
+ },
2156
+ {
2157
+ name: 'orderBook';
2158
+ writable: true;
2159
+ },
2160
+ {
2161
+ name: 'sellerAuthority';
2162
+ writable: true;
2163
+ },
2164
+ {
2165
+ name: 'buyerTrade';
2166
+ writable: true;
2167
+ },
2168
+ {
2169
+ name: 'sellerTrade';
2170
+ writable: true;
2171
+ },
2172
+ {
2173
+ name: 'mint';
2174
+ writable: true;
2175
+ address: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
2176
+ },
2177
+ {
2178
+ name: 'buyerAta';
2179
+ writable: true;
2180
+ },
2181
+ {
2182
+ name: 'sellerAta';
2183
+ writable: true;
2184
+ pda: {
2185
+ seeds: [
2186
+ {
2187
+ kind: 'account';
2188
+ path: 'sellerAuthority';
2189
+ },
2190
+ {
2191
+ kind: 'account';
2192
+ path: 'tokenProgram';
2193
+ },
2194
+ {
2195
+ kind: 'account';
2196
+ path: 'mint';
2197
+ }
2198
+ ];
2199
+ program: {
2200
+ kind: 'const';
2201
+ value: [
2202
+ 140,
2203
+ 151,
2204
+ 37,
2205
+ 143,
2206
+ 78,
2207
+ 36,
2208
+ 137,
2209
+ 241,
2210
+ 187,
2211
+ 61,
2212
+ 16,
2213
+ 41,
2214
+ 20,
2215
+ 142,
2216
+ 13,
2217
+ 131,
2218
+ 11,
2219
+ 90,
2220
+ 19,
2221
+ 153,
2222
+ 218,
2223
+ 255,
2224
+ 16,
2225
+ 132,
2226
+ 4,
2227
+ 142,
2228
+ 123,
2229
+ 216,
2230
+ 219,
2231
+ 233,
2232
+ 248,
2233
+ 89
2234
+ ];
2235
+ };
2236
+ };
2237
+ },
2238
+ {
2239
+ name: 'marketAta';
2122
2240
  writable: true;
2123
2241
  },
2124
2242
  {
2125
2243
  name: 'tokenProgram';
2244
+ address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
2126
2245
  },
2127
2246
  {
2128
2247
  name: 'associatedTokenProgram';
@@ -2528,6 +2647,7 @@ export type TriadProtocol = {
2528
2647
  {
2529
2648
  name: 'mint';
2530
2649
  writable: true;
2650
+ address: 'EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v';
2531
2651
  },
2532
2652
  {
2533
2653
  name: 'userAta';
@@ -2645,6 +2765,7 @@ export type TriadProtocol = {
2645
2765
  },
2646
2766
  {
2647
2767
  name: 'tokenProgram';
2768
+ address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
2648
2769
  },
2649
2770
  {
2650
2771
  name: 'associatedTokenProgram';
@@ -3224,8 +3345,8 @@ export type TriadProtocol = {
3224
3345
  args: [];
3225
3346
  },
3226
3347
  {
3227
- name: 'updateIsActiveClaimVault';
3228
- discriminator: [19, 59, 238, 222, 216, 2, 60, 71];
3348
+ name: 'updateClaimVaultIsActive';
3349
+ discriminator: [122, 240, 207, 89, 71, 29, 176, 103];
3229
3350
  accounts: [
3230
3351
  {
3231
3352
  name: 'signer';
@@ -3244,6 +3365,29 @@ export type TriadProtocol = {
3244
3365
  }
3245
3366
  ];
3246
3367
  },
3368
+ {
3369
+ name: 'updateClaimVaultMerkleRoot';
3370
+ discriminator: [83, 209, 102, 81, 118, 44, 157, 23];
3371
+ accounts: [
3372
+ {
3373
+ name: 'signer';
3374
+ writable: true;
3375
+ signer: true;
3376
+ },
3377
+ {
3378
+ name: 'claimVault';
3379
+ writable: true;
3380
+ }
3381
+ ];
3382
+ args: [
3383
+ {
3384
+ name: 'merkleRoot';
3385
+ type: {
3386
+ array: ['u8', 32];
3387
+ };
3388
+ }
3389
+ ];
3390
+ },
3247
3391
  {
3248
3392
  name: 'updateMarketEnd';
3249
3393
  discriminator: [10, 188, 22, 219, 206, 83, 67, 31];
@@ -3662,11 +3806,16 @@ export type TriadProtocol = {
3662
3806
  },
3663
3807
  {
3664
3808
  code: 6024;
3809
+ name: 'invalidMerkleRoot';
3810
+ msg: 'Invalid Merkle Root';
3811
+ },
3812
+ {
3813
+ code: 6025;
3665
3814
  name: 'claimVaultInactive';
3666
3815
  msg: 'Claim Vault Inactive';
3667
3816
  },
3668
3817
  {
3669
- code: 6025;
3818
+ code: 6026;
3670
3819
  name: 'userAlreadyClaimed';
3671
3820
  msg: 'User Already Claimed';
3672
3821
  }
@@ -4077,6 +4226,10 @@ export type TriadProtocol = {
4077
4226
  name: 'triadFee';
4078
4227
  type: 'u64';
4079
4228
  },
4229
+ {
4230
+ name: 'revShareFee';
4231
+ type: 'u64';
4232
+ },
4080
4233
  {
4081
4234
  name: 'customerId';
4082
4235
  type: 'u16';
@@ -4143,10 +4296,6 @@ export type TriadProtocol = {
4143
4296
  name: 'totalUsers';
4144
4297
  type: 'u64';
4145
4298
  },
4146
- {
4147
- name: 'mint';
4148
- type: 'pubkey';
4149
- },
4150
4299
  {
4151
4300
  name: 'name';
4152
4301
  type: 'string';
@@ -4622,10 +4771,18 @@ export type TriadProtocol = {
4622
4771
  name: 'poolId';
4623
4772
  type: 'u64';
4624
4773
  },
4774
+ {
4775
+ name: 'marketOrderFeeAvailable';
4776
+ type: 'u64';
4777
+ },
4778
+ {
4779
+ name: 'marketOrderFeeClaimed';
4780
+ type: 'u64';
4781
+ },
4625
4782
  {
4626
4783
  name: 'padding';
4627
4784
  type: {
4628
- array: ['u8', 48];
4785
+ array: ['u8', 32];
4629
4786
  };
4630
4787
  }
4631
4788
  ];
@@ -5197,10 +5354,22 @@ export type TriadProtocol = {
5197
5354
  name: 'amount';
5198
5355
  type: 'u64';
5199
5356
  },
5357
+ {
5358
+ name: 'revShareCheckedTs';
5359
+ type: 'i64';
5360
+ },
5361
+ {
5362
+ name: 'revShareClaimed';
5363
+ type: 'u64';
5364
+ },
5365
+ {
5366
+ name: 'revShareAvailable';
5367
+ type: 'u64';
5368
+ },
5200
5369
  {
5201
5370
  name: 'padding';
5202
5371
  type: {
5203
- array: ['u8', 32];
5372
+ array: ['u8', 8];
5204
5373
  };
5205
5374
  }
5206
5375
  ];
@@ -5240,11 +5409,11 @@ export type TriadProtocol = {
5240
5409
  type: 'u8';
5241
5410
  },
5242
5411
  {
5243
- name: 'nftStaked';
5412
+ name: 'revShareClaimed';
5244
5413
  type: 'u64';
5245
5414
  },
5246
5415
  {
5247
- name: 'slots';
5416
+ name: 'revShareAvailable';
5248
5417
  type: 'u64';
5249
5418
  },
5250
5419
  {
@@ -5341,15 +5510,19 @@ export type TriadProtocol = {
5341
5510
  type: 'pubkey';
5342
5511
  },
5343
5512
  {
5344
- name: 'totalDeposits';
5345
- type: 'u64';
5513
+ name: 'padding1';
5514
+ type: {
5515
+ array: ['u8', 8];
5516
+ };
5346
5517
  },
5347
5518
  {
5348
- name: 'totalWithdraws';
5349
- type: 'u64';
5519
+ name: 'padding2';
5520
+ type: {
5521
+ array: ['u8', 8];
5522
+ };
5350
5523
  },
5351
5524
  {
5352
- name: 'padding1';
5525
+ name: 'padding3';
5353
5526
  type: {
5354
5527
  array: ['u8', 8];
5355
5528
  };
@@ -1,7 +1,6 @@
1
1
  import { PublicKey } from '@solana/web3.js';
2
2
  import { IdlAccounts } from '@coral-xyz/anchor';
3
- import { OrderDirectionEncoded, OrderTypeEncoded, OrderSideEncoded, OrderStatusEncoded, Stake, StakeVault, Unstake } from './../types';
4
- import { Market, Order, OrderDirection, OrderSide, OrderStatus, OrderType, UserTrade, Pool, BookOrder, Customer } from '../types';
3
+ import { Market, Order, OrderDirection, OrderSide, OrderStatus, OrderType, UserTrade, OrderDirectionEncoded, OrderTypeEncoded, OrderSideEncoded, OrderStatusEncoded, Stake, StakeVault, Unstake, Pool, BookOrder, Customer, ClaimVault, ClaimedUser } from '../types';
5
4
  import { TriadProtocol } from '../types/triad_protocol';
6
5
  export declare const encodeString: (value: string, alloc?: number) => number[];
7
6
  export declare const decodeString: (bytes: number[]) => string;
@@ -10,10 +9,12 @@ export declare const formatStake: (stake: IdlAccounts<TriadProtocol>['stakeV3'])
10
9
  export declare const formatUnstake: (unstake: IdlAccounts<TriadProtocol>['unstake'], address: PublicKey) => Unstake;
11
10
  export declare const formatPool: (account: IdlAccounts<TriadProtocol>['pool'], address: PublicKey) => Pool;
12
11
  export declare const formatMarket: (account: IdlAccounts<TriadProtocol>['marketV2'], address: PublicKey) => Market;
13
- export declare const formatUserTrade: (account: IdlAccounts<TriadProtocol>['userTrade'], publicKey: PublicKey) => UserTrade;
12
+ export declare const formatUserTrade: (account: IdlAccounts<TriadProtocol>['userTrade'], address: PublicKey) => UserTrade;
14
13
  export declare const formatOrder: (order: IdlAccounts<TriadProtocol>['userTrade']['orders'][number], authority?: string) => Order;
15
14
  export declare const formatBookOrder: (order: IdlAccounts<TriadProtocol>['orderBook']['hypeOrders'][number] | IdlAccounts<TriadProtocol>['orderBook']['flopOrders'][number]) => BookOrder;
16
15
  export declare const formatCustomer: (account: IdlAccounts<TriadProtocol>['customer'], publicKey: PublicKey) => Customer;
16
+ export declare const formatClaimVault: (account: IdlAccounts<TriadProtocol>['claimVault'], address: PublicKey) => ClaimVault;
17
+ export declare const formatClaimedUser: (account: IdlAccounts<TriadProtocol>['claimedUser'], address: PublicKey) => ClaimedUser;
17
18
  export declare const calculateStakeRewards: (stake: Stake) => number;
18
19
  export declare const getTokenProgram: (mint: PublicKey) => PublicKey;
19
20
  export declare const getOrderDirection: (orderDirection: OrderDirectionEncoded) => OrderDirection;