@triadxyz/triad-protocol 1.2.3-beta → 1.2.6-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.
- package/dist/index.d.ts +16 -10
- package/dist/index.js +45 -0
- package/dist/local-test.js +36 -9
- package/dist/trade.d.ts +12 -0
- package/dist/trade.js +20 -0
- package/dist/types/idl_triad_protocol.json +505 -0
- package/dist/types/index.d.ts +15 -0
- package/dist/types/trade.d.ts +1 -0
- package/dist/types/triad_protocol.d.ts +592 -0
- package/dist/utils/constants.d.ts +1 -0
- package/dist/utils/constants.js +2 -1
- package/dist/utils/helpers.js +6 -2
- package/dist/utils/jup-swap.js +1 -1
- package/dist/utils/sendVersionedTransaction.d.ts +1 -1
- package/dist/utils/sendVersionedTransaction.js +8 -2
- package/package.json +1 -1
|
@@ -634,6 +634,64 @@ export type TriadProtocol = {
|
|
|
634
634
|
];
|
|
635
635
|
args: [];
|
|
636
636
|
},
|
|
637
|
+
{
|
|
638
|
+
name: 'createCollection';
|
|
639
|
+
discriminator: [156, 251, 92, 54, 233, 2, 16, 82];
|
|
640
|
+
accounts: [
|
|
641
|
+
{
|
|
642
|
+
name: 'signer';
|
|
643
|
+
writable: true;
|
|
644
|
+
signer: true;
|
|
645
|
+
},
|
|
646
|
+
{
|
|
647
|
+
name: 'coreCollection';
|
|
648
|
+
writable: true;
|
|
649
|
+
signer: true;
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
name: 'collection';
|
|
653
|
+
writable: true;
|
|
654
|
+
pda: {
|
|
655
|
+
seeds: [
|
|
656
|
+
{
|
|
657
|
+
kind: 'const';
|
|
658
|
+
value: [99, 111, 108, 108, 101, 99, 116, 105, 111, 110];
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
kind: 'arg';
|
|
662
|
+
path: 'args.symbol';
|
|
663
|
+
}
|
|
664
|
+
];
|
|
665
|
+
};
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
name: 'metaplexProgram';
|
|
669
|
+
address: 'CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d';
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
name: 'tokenProgram';
|
|
673
|
+
address: 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA';
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
name: 'associatedTokenProgram';
|
|
677
|
+
address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
name: 'systemProgram';
|
|
681
|
+
address: '11111111111111111111111111111111';
|
|
682
|
+
}
|
|
683
|
+
];
|
|
684
|
+
args: [
|
|
685
|
+
{
|
|
686
|
+
name: 'args';
|
|
687
|
+
type: {
|
|
688
|
+
defined: {
|
|
689
|
+
name: 'createCollectionArgs';
|
|
690
|
+
};
|
|
691
|
+
};
|
|
692
|
+
}
|
|
693
|
+
];
|
|
694
|
+
},
|
|
637
695
|
{
|
|
638
696
|
name: 'createUser';
|
|
639
697
|
discriminator: [108, 227, 130, 130, 252, 109, 75, 218];
|
|
@@ -825,6 +883,158 @@ export type TriadProtocol = {
|
|
|
825
883
|
}
|
|
826
884
|
];
|
|
827
885
|
},
|
|
886
|
+
{
|
|
887
|
+
name: 'mintTicket';
|
|
888
|
+
discriminator: [159, 167, 223, 60, 138, 6, 23, 29];
|
|
889
|
+
accounts: [
|
|
890
|
+
{
|
|
891
|
+
name: 'signer';
|
|
892
|
+
writable: true;
|
|
893
|
+
signer: true;
|
|
894
|
+
},
|
|
895
|
+
{
|
|
896
|
+
name: 'nft';
|
|
897
|
+
writable: true;
|
|
898
|
+
pda: {
|
|
899
|
+
seeds: [
|
|
900
|
+
{
|
|
901
|
+
kind: 'const';
|
|
902
|
+
value: [110, 102, 116];
|
|
903
|
+
},
|
|
904
|
+
{
|
|
905
|
+
kind: 'arg';
|
|
906
|
+
path: 'args.number';
|
|
907
|
+
}
|
|
908
|
+
];
|
|
909
|
+
};
|
|
910
|
+
},
|
|
911
|
+
{
|
|
912
|
+
name: 'verifier';
|
|
913
|
+
writable: true;
|
|
914
|
+
signer: true;
|
|
915
|
+
},
|
|
916
|
+
{
|
|
917
|
+
name: 'asset';
|
|
918
|
+
writable: true;
|
|
919
|
+
signer: true;
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
name: 'nftMint';
|
|
923
|
+
writable: true;
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
name: 'collection';
|
|
927
|
+
writable: true;
|
|
928
|
+
pda: {
|
|
929
|
+
seeds: [
|
|
930
|
+
{
|
|
931
|
+
kind: 'const';
|
|
932
|
+
value: [99, 111, 108, 108, 101, 99, 116, 105, 111, 110];
|
|
933
|
+
},
|
|
934
|
+
{
|
|
935
|
+
kind: 'arg';
|
|
936
|
+
path: 'args.collection_symbol';
|
|
937
|
+
}
|
|
938
|
+
];
|
|
939
|
+
};
|
|
940
|
+
},
|
|
941
|
+
{
|
|
942
|
+
name: 'coreCollection';
|
|
943
|
+
writable: true;
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
name: 'trdMint';
|
|
947
|
+
writable: true;
|
|
948
|
+
},
|
|
949
|
+
{
|
|
950
|
+
name: 'userTrdAta';
|
|
951
|
+
writable: true;
|
|
952
|
+
pda: {
|
|
953
|
+
seeds: [
|
|
954
|
+
{
|
|
955
|
+
kind: 'account';
|
|
956
|
+
path: 'signer';
|
|
957
|
+
},
|
|
958
|
+
{
|
|
959
|
+
kind: 'account';
|
|
960
|
+
path: 'tokenProgram';
|
|
961
|
+
},
|
|
962
|
+
{
|
|
963
|
+
kind: 'account';
|
|
964
|
+
path: 'trdMint';
|
|
965
|
+
}
|
|
966
|
+
];
|
|
967
|
+
program: {
|
|
968
|
+
kind: 'const';
|
|
969
|
+
value: [
|
|
970
|
+
140,
|
|
971
|
+
151,
|
|
972
|
+
37,
|
|
973
|
+
143,
|
|
974
|
+
78,
|
|
975
|
+
36,
|
|
976
|
+
137,
|
|
977
|
+
241,
|
|
978
|
+
187,
|
|
979
|
+
61,
|
|
980
|
+
16,
|
|
981
|
+
41,
|
|
982
|
+
20,
|
|
983
|
+
142,
|
|
984
|
+
13,
|
|
985
|
+
131,
|
|
986
|
+
11,
|
|
987
|
+
90,
|
|
988
|
+
19,
|
|
989
|
+
153,
|
|
990
|
+
218,
|
|
991
|
+
255,
|
|
992
|
+
16,
|
|
993
|
+
132,
|
|
994
|
+
4,
|
|
995
|
+
142,
|
|
996
|
+
123,
|
|
997
|
+
216,
|
|
998
|
+
219,
|
|
999
|
+
233,
|
|
1000
|
+
248,
|
|
1001
|
+
89
|
|
1002
|
+
];
|
|
1003
|
+
};
|
|
1004
|
+
};
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
name: 'userNftAta';
|
|
1008
|
+
writable: true;
|
|
1009
|
+
},
|
|
1010
|
+
{
|
|
1011
|
+
name: 'metaplexProgram';
|
|
1012
|
+
address: 'CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d';
|
|
1013
|
+
},
|
|
1014
|
+
{
|
|
1015
|
+
name: 'tokenProgram';
|
|
1016
|
+
address: 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb';
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
name: 'associatedTokenProgram';
|
|
1020
|
+
address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
|
|
1021
|
+
},
|
|
1022
|
+
{
|
|
1023
|
+
name: 'systemProgram';
|
|
1024
|
+
address: '11111111111111111111111111111111';
|
|
1025
|
+
}
|
|
1026
|
+
];
|
|
1027
|
+
args: [
|
|
1028
|
+
{
|
|
1029
|
+
name: 'args';
|
|
1030
|
+
type: {
|
|
1031
|
+
defined: {
|
|
1032
|
+
name: 'mintTicketArgs';
|
|
1033
|
+
};
|
|
1034
|
+
};
|
|
1035
|
+
}
|
|
1036
|
+
];
|
|
1037
|
+
},
|
|
828
1038
|
{
|
|
829
1039
|
name: 'openOrder';
|
|
830
1040
|
discriminator: [206, 88, 88, 143, 38, 136, 50, 224];
|
|
@@ -984,6 +1194,161 @@ export type TriadProtocol = {
|
|
|
984
1194
|
}
|
|
985
1195
|
];
|
|
986
1196
|
},
|
|
1197
|
+
{
|
|
1198
|
+
name: 'payoutOrder';
|
|
1199
|
+
discriminator: [247, 233, 158, 228, 63, 32, 236, 113];
|
|
1200
|
+
accounts: [
|
|
1201
|
+
{
|
|
1202
|
+
name: 'signer';
|
|
1203
|
+
writable: true;
|
|
1204
|
+
signer: true;
|
|
1205
|
+
},
|
|
1206
|
+
{
|
|
1207
|
+
name: 'userTrade';
|
|
1208
|
+
writable: true;
|
|
1209
|
+
},
|
|
1210
|
+
{
|
|
1211
|
+
name: 'market';
|
|
1212
|
+
writable: true;
|
|
1213
|
+
},
|
|
1214
|
+
{
|
|
1215
|
+
name: 'mint';
|
|
1216
|
+
writable: true;
|
|
1217
|
+
},
|
|
1218
|
+
{
|
|
1219
|
+
name: 'userAta';
|
|
1220
|
+
writable: true;
|
|
1221
|
+
pda: {
|
|
1222
|
+
seeds: [
|
|
1223
|
+
{
|
|
1224
|
+
kind: 'account';
|
|
1225
|
+
path: 'signer';
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
kind: 'account';
|
|
1229
|
+
path: 'tokenProgram';
|
|
1230
|
+
},
|
|
1231
|
+
{
|
|
1232
|
+
kind: 'account';
|
|
1233
|
+
path: 'mint';
|
|
1234
|
+
}
|
|
1235
|
+
];
|
|
1236
|
+
program: {
|
|
1237
|
+
kind: 'const';
|
|
1238
|
+
value: [
|
|
1239
|
+
140,
|
|
1240
|
+
151,
|
|
1241
|
+
37,
|
|
1242
|
+
143,
|
|
1243
|
+
78,
|
|
1244
|
+
36,
|
|
1245
|
+
137,
|
|
1246
|
+
241,
|
|
1247
|
+
187,
|
|
1248
|
+
61,
|
|
1249
|
+
16,
|
|
1250
|
+
41,
|
|
1251
|
+
20,
|
|
1252
|
+
142,
|
|
1253
|
+
13,
|
|
1254
|
+
131,
|
|
1255
|
+
11,
|
|
1256
|
+
90,
|
|
1257
|
+
19,
|
|
1258
|
+
153,
|
|
1259
|
+
218,
|
|
1260
|
+
255,
|
|
1261
|
+
16,
|
|
1262
|
+
132,
|
|
1263
|
+
4,
|
|
1264
|
+
142,
|
|
1265
|
+
123,
|
|
1266
|
+
216,
|
|
1267
|
+
219,
|
|
1268
|
+
233,
|
|
1269
|
+
248,
|
|
1270
|
+
89
|
|
1271
|
+
];
|
|
1272
|
+
};
|
|
1273
|
+
};
|
|
1274
|
+
},
|
|
1275
|
+
{
|
|
1276
|
+
name: 'marketVault';
|
|
1277
|
+
writable: true;
|
|
1278
|
+
pda: {
|
|
1279
|
+
seeds: [
|
|
1280
|
+
{
|
|
1281
|
+
kind: 'account';
|
|
1282
|
+
path: 'market';
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
kind: 'account';
|
|
1286
|
+
path: 'tokenProgram';
|
|
1287
|
+
},
|
|
1288
|
+
{
|
|
1289
|
+
kind: 'account';
|
|
1290
|
+
path: 'mint';
|
|
1291
|
+
}
|
|
1292
|
+
];
|
|
1293
|
+
program: {
|
|
1294
|
+
kind: 'const';
|
|
1295
|
+
value: [
|
|
1296
|
+
140,
|
|
1297
|
+
151,
|
|
1298
|
+
37,
|
|
1299
|
+
143,
|
|
1300
|
+
78,
|
|
1301
|
+
36,
|
|
1302
|
+
137,
|
|
1303
|
+
241,
|
|
1304
|
+
187,
|
|
1305
|
+
61,
|
|
1306
|
+
16,
|
|
1307
|
+
41,
|
|
1308
|
+
20,
|
|
1309
|
+
142,
|
|
1310
|
+
13,
|
|
1311
|
+
131,
|
|
1312
|
+
11,
|
|
1313
|
+
90,
|
|
1314
|
+
19,
|
|
1315
|
+
153,
|
|
1316
|
+
218,
|
|
1317
|
+
255,
|
|
1318
|
+
16,
|
|
1319
|
+
132,
|
|
1320
|
+
4,
|
|
1321
|
+
142,
|
|
1322
|
+
123,
|
|
1323
|
+
216,
|
|
1324
|
+
219,
|
|
1325
|
+
233,
|
|
1326
|
+
248,
|
|
1327
|
+
89
|
|
1328
|
+
];
|
|
1329
|
+
};
|
|
1330
|
+
};
|
|
1331
|
+
},
|
|
1332
|
+
{
|
|
1333
|
+
name: 'tokenProgram';
|
|
1334
|
+
address: 'TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb';
|
|
1335
|
+
},
|
|
1336
|
+
{
|
|
1337
|
+
name: 'associatedTokenProgram';
|
|
1338
|
+
address: 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL';
|
|
1339
|
+
},
|
|
1340
|
+
{
|
|
1341
|
+
name: 'systemProgram';
|
|
1342
|
+
address: '11111111111111111111111111111111';
|
|
1343
|
+
}
|
|
1344
|
+
];
|
|
1345
|
+
args: [
|
|
1346
|
+
{
|
|
1347
|
+
name: 'orderId';
|
|
1348
|
+
type: 'u64';
|
|
1349
|
+
}
|
|
1350
|
+
];
|
|
1351
|
+
},
|
|
987
1352
|
{
|
|
988
1353
|
name: 'requestWithdrawStake';
|
|
989
1354
|
discriminator: [175, 9, 77, 31, 145, 136, 30, 207];
|
|
@@ -1049,6 +1414,35 @@ export type TriadProtocol = {
|
|
|
1049
1414
|
}
|
|
1050
1415
|
];
|
|
1051
1416
|
},
|
|
1417
|
+
{
|
|
1418
|
+
name: 'resolveMarketV1';
|
|
1419
|
+
discriminator: [67, 202, 40, 49, 111, 136, 234, 183];
|
|
1420
|
+
accounts: [
|
|
1421
|
+
{
|
|
1422
|
+
name: 'signer';
|
|
1423
|
+
writable: true;
|
|
1424
|
+
signer: true;
|
|
1425
|
+
},
|
|
1426
|
+
{
|
|
1427
|
+
name: 'market';
|
|
1428
|
+
writable: true;
|
|
1429
|
+
},
|
|
1430
|
+
{
|
|
1431
|
+
name: 'systemProgram';
|
|
1432
|
+
address: '11111111111111111111111111111111';
|
|
1433
|
+
}
|
|
1434
|
+
];
|
|
1435
|
+
args: [
|
|
1436
|
+
{
|
|
1437
|
+
name: 'winningDirection';
|
|
1438
|
+
type: {
|
|
1439
|
+
defined: {
|
|
1440
|
+
name: 'winningDirection';
|
|
1441
|
+
};
|
|
1442
|
+
};
|
|
1443
|
+
}
|
|
1444
|
+
];
|
|
1445
|
+
},
|
|
1052
1446
|
{
|
|
1053
1447
|
name: 'settleOrder';
|
|
1054
1448
|
discriminator: [80, 74, 204, 34, 12, 183, 66, 66];
|
|
@@ -1787,6 +2181,14 @@ export type TriadProtocol = {
|
|
|
1787
2181
|
}
|
|
1788
2182
|
];
|
|
1789
2183
|
accounts: [
|
|
2184
|
+
{
|
|
2185
|
+
name: 'baseCollectionV1';
|
|
2186
|
+
discriminator: [0, 0, 0, 0, 0, 0, 0, 0];
|
|
2187
|
+
},
|
|
2188
|
+
{
|
|
2189
|
+
name: 'collection';
|
|
2190
|
+
discriminator: [48, 160, 232, 205, 191, 207, 26, 141];
|
|
2191
|
+
},
|
|
1790
2192
|
{
|
|
1791
2193
|
name: 'market';
|
|
1792
2194
|
discriminator: [219, 190, 213, 55, 0, 227, 198, 154];
|
|
@@ -1795,6 +2197,10 @@ export type TriadProtocol = {
|
|
|
1795
2197
|
name: 'marketV2';
|
|
1796
2198
|
discriminator: [27, 60, 50, 75, 191, 193, 86, 227];
|
|
1797
2199
|
},
|
|
2200
|
+
{
|
|
2201
|
+
name: 'nft';
|
|
2202
|
+
discriminator: [88, 10, 146, 176, 101, 11, 40, 217];
|
|
2203
|
+
},
|
|
1798
2204
|
{
|
|
1799
2205
|
name: 'stakeV2';
|
|
1800
2206
|
discriminator: [207, 98, 130, 13, 118, 181, 238, 47];
|
|
@@ -1938,6 +2344,11 @@ export type TriadProtocol = {
|
|
|
1938
2344
|
code: 6019;
|
|
1939
2345
|
name: 'concurrentTransaction';
|
|
1940
2346
|
msg: 'Concurrent transaction';
|
|
2347
|
+
},
|
|
2348
|
+
{
|
|
2349
|
+
code: 6020;
|
|
2350
|
+
name: 'collectionFull';
|
|
2351
|
+
msg: 'Collection is full';
|
|
1941
2352
|
}
|
|
1942
2353
|
];
|
|
1943
2354
|
types: [
|
|
@@ -1961,6 +2372,42 @@ export type TriadProtocol = {
|
|
|
1961
2372
|
];
|
|
1962
2373
|
};
|
|
1963
2374
|
},
|
|
2375
|
+
{
|
|
2376
|
+
name: 'baseCollectionV1';
|
|
2377
|
+
type: {
|
|
2378
|
+
kind: 'struct';
|
|
2379
|
+
fields: [
|
|
2380
|
+
{
|
|
2381
|
+
name: 'key';
|
|
2382
|
+
type: {
|
|
2383
|
+
defined: {
|
|
2384
|
+
name: 'key';
|
|
2385
|
+
};
|
|
2386
|
+
};
|
|
2387
|
+
},
|
|
2388
|
+
{
|
|
2389
|
+
name: 'updateAuthority';
|
|
2390
|
+
type: 'pubkey';
|
|
2391
|
+
},
|
|
2392
|
+
{
|
|
2393
|
+
name: 'name';
|
|
2394
|
+
type: 'string';
|
|
2395
|
+
},
|
|
2396
|
+
{
|
|
2397
|
+
name: 'uri';
|
|
2398
|
+
type: 'string';
|
|
2399
|
+
},
|
|
2400
|
+
{
|
|
2401
|
+
name: 'numMinted';
|
|
2402
|
+
type: 'u32';
|
|
2403
|
+
},
|
|
2404
|
+
{
|
|
2405
|
+
name: 'currentSize';
|
|
2406
|
+
type: 'u32';
|
|
2407
|
+
}
|
|
2408
|
+
];
|
|
2409
|
+
};
|
|
2410
|
+
},
|
|
1964
2411
|
{
|
|
1965
2412
|
name: 'claimStakeRewardsArgs';
|
|
1966
2413
|
type: {
|
|
@@ -1977,6 +2424,60 @@ export type TriadProtocol = {
|
|
|
1977
2424
|
];
|
|
1978
2425
|
};
|
|
1979
2426
|
},
|
|
2427
|
+
{
|
|
2428
|
+
name: 'collection';
|
|
2429
|
+
type: {
|
|
2430
|
+
kind: 'struct';
|
|
2431
|
+
fields: [
|
|
2432
|
+
{
|
|
2433
|
+
name: 'authority';
|
|
2434
|
+
type: 'pubkey';
|
|
2435
|
+
},
|
|
2436
|
+
{
|
|
2437
|
+
name: 'bump';
|
|
2438
|
+
type: 'u8';
|
|
2439
|
+
},
|
|
2440
|
+
{
|
|
2441
|
+
name: 'symbol';
|
|
2442
|
+
type: 'string';
|
|
2443
|
+
},
|
|
2444
|
+
{
|
|
2445
|
+
name: 'minted';
|
|
2446
|
+
type: 'u64';
|
|
2447
|
+
},
|
|
2448
|
+
{
|
|
2449
|
+
name: 'supply';
|
|
2450
|
+
type: 'u64';
|
|
2451
|
+
},
|
|
2452
|
+
{
|
|
2453
|
+
name: 'padding';
|
|
2454
|
+
type: {
|
|
2455
|
+
array: ['u8', 64];
|
|
2456
|
+
};
|
|
2457
|
+
}
|
|
2458
|
+
];
|
|
2459
|
+
};
|
|
2460
|
+
},
|
|
2461
|
+
{
|
|
2462
|
+
name: 'createCollectionArgs';
|
|
2463
|
+
type: {
|
|
2464
|
+
kind: 'struct';
|
|
2465
|
+
fields: [
|
|
2466
|
+
{
|
|
2467
|
+
name: 'name';
|
|
2468
|
+
type: 'string';
|
|
2469
|
+
},
|
|
2470
|
+
{
|
|
2471
|
+
name: 'symbol';
|
|
2472
|
+
type: 'string';
|
|
2473
|
+
},
|
|
2474
|
+
{
|
|
2475
|
+
name: 'supply';
|
|
2476
|
+
type: 'u64';
|
|
2477
|
+
}
|
|
2478
|
+
];
|
|
2479
|
+
};
|
|
2480
|
+
},
|
|
1980
2481
|
{
|
|
1981
2482
|
name: 'createUserArgs';
|
|
1982
2483
|
type: {
|
|
@@ -2019,6 +2520,32 @@ export type TriadProtocol = {
|
|
|
2019
2520
|
];
|
|
2020
2521
|
};
|
|
2021
2522
|
},
|
|
2523
|
+
{
|
|
2524
|
+
name: 'key';
|
|
2525
|
+
type: {
|
|
2526
|
+
kind: 'enum';
|
|
2527
|
+
variants: [
|
|
2528
|
+
{
|
|
2529
|
+
name: 'uninitialized';
|
|
2530
|
+
},
|
|
2531
|
+
{
|
|
2532
|
+
name: 'assetV1';
|
|
2533
|
+
},
|
|
2534
|
+
{
|
|
2535
|
+
name: 'hashedAssetV1';
|
|
2536
|
+
},
|
|
2537
|
+
{
|
|
2538
|
+
name: 'pluginHeaderV1';
|
|
2539
|
+
},
|
|
2540
|
+
{
|
|
2541
|
+
name: 'pluginRegistryV1';
|
|
2542
|
+
},
|
|
2543
|
+
{
|
|
2544
|
+
name: 'collectionV1';
|
|
2545
|
+
}
|
|
2546
|
+
];
|
|
2547
|
+
};
|
|
2548
|
+
},
|
|
2022
2549
|
{
|
|
2023
2550
|
name: 'market';
|
|
2024
2551
|
type: {
|
|
@@ -2363,6 +2890,45 @@ export type TriadProtocol = {
|
|
|
2363
2890
|
];
|
|
2364
2891
|
};
|
|
2365
2892
|
},
|
|
2893
|
+
{
|
|
2894
|
+
name: 'mintTicketArgs';
|
|
2895
|
+
type: {
|
|
2896
|
+
kind: 'struct';
|
|
2897
|
+
fields: [
|
|
2898
|
+
{
|
|
2899
|
+
name: 'collectionSymbol';
|
|
2900
|
+
type: 'string';
|
|
2901
|
+
},
|
|
2902
|
+
{
|
|
2903
|
+
name: 'discount';
|
|
2904
|
+
type: 'u64';
|
|
2905
|
+
},
|
|
2906
|
+
{
|
|
2907
|
+
name: 'isBoosted';
|
|
2908
|
+
type: 'bool';
|
|
2909
|
+
},
|
|
2910
|
+
{
|
|
2911
|
+
name: 'number';
|
|
2912
|
+
type: 'u64';
|
|
2913
|
+
},
|
|
2914
|
+
{
|
|
2915
|
+
name: 'rarity';
|
|
2916
|
+
type: {
|
|
2917
|
+
defined: {
|
|
2918
|
+
name: 'rarity';
|
|
2919
|
+
};
|
|
2920
|
+
};
|
|
2921
|
+
}
|
|
2922
|
+
];
|
|
2923
|
+
};
|
|
2924
|
+
},
|
|
2925
|
+
{
|
|
2926
|
+
name: 'nft';
|
|
2927
|
+
type: {
|
|
2928
|
+
kind: 'struct';
|
|
2929
|
+
fields: [];
|
|
2930
|
+
};
|
|
2931
|
+
},
|
|
2366
2932
|
{
|
|
2367
2933
|
name: 'openOrderArgs';
|
|
2368
2934
|
type: {
|
|
@@ -2647,6 +3213,32 @@ export type TriadProtocol = {
|
|
|
2647
3213
|
];
|
|
2648
3214
|
};
|
|
2649
3215
|
},
|
|
3216
|
+
{
|
|
3217
|
+
name: 'rarity';
|
|
3218
|
+
type: {
|
|
3219
|
+
kind: 'enum';
|
|
3220
|
+
variants: [
|
|
3221
|
+
{
|
|
3222
|
+
name: 'common';
|
|
3223
|
+
},
|
|
3224
|
+
{
|
|
3225
|
+
name: 'uncommon';
|
|
3226
|
+
},
|
|
3227
|
+
{
|
|
3228
|
+
name: 'rare';
|
|
3229
|
+
},
|
|
3230
|
+
{
|
|
3231
|
+
name: 'epic';
|
|
3232
|
+
},
|
|
3233
|
+
{
|
|
3234
|
+
name: 'legendary';
|
|
3235
|
+
},
|
|
3236
|
+
{
|
|
3237
|
+
name: 'mythic';
|
|
3238
|
+
}
|
|
3239
|
+
];
|
|
3240
|
+
};
|
|
3241
|
+
},
|
|
2650
3242
|
{
|
|
2651
3243
|
name: 'resolvedQuestion';
|
|
2652
3244
|
type: {
|
package/dist/utils/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SOL_MINT = exports.TRIAD_ADMIN = exports.TRD_MINT = exports.VERIFIER = exports.TRD_DECIMALS = exports.STAKE_VAULT_NAME = void 0;
|
|
3
|
+
exports.TICKET_CORE_COLLECTION = exports.SOL_MINT = exports.TRIAD_ADMIN = exports.TRD_MINT = exports.VERIFIER = exports.TRD_DECIMALS = exports.STAKE_VAULT_NAME = void 0;
|
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
|
5
5
|
exports.STAKE_VAULT_NAME = 'Triad Share 1';
|
|
6
6
|
exports.TRD_DECIMALS = 6;
|
|
@@ -8,3 +8,4 @@ exports.VERIFIER = new web3_js_1.PublicKey('42n6BHufivUKrb5Bi6tXbMZvM8NHovrDLX1R
|
|
|
8
8
|
exports.TRD_MINT = new web3_js_1.PublicKey('t3DohmswhKk94PPbPYwA6ZKACyY3y5kbcqeQerAJjmV');
|
|
9
9
|
exports.TRIAD_ADMIN = new web3_js_1.PublicKey('82ppCojm3yrEKgdpH8B5AmBJTU1r1uAWXFWhxvPs9UCR');
|
|
10
10
|
exports.SOL_MINT = new web3_js_1.PublicKey('So11111111111111111111111111111111111111112');
|
|
11
|
+
exports.TICKET_CORE_COLLECTION = new web3_js_1.PublicKey('BaqopH1VXYUCT6VsojbTibVcd3k5jpGGT6296HFb6fVa');
|
package/dist/utils/helpers.js
CHANGED
|
@@ -89,7 +89,10 @@ const formatMarket = (account, address) => {
|
|
|
89
89
|
nftHoldersFeeClaimed: account.nftHoldersFeeClaimed.toString(),
|
|
90
90
|
marketFeeAvailable: account.marketFeeAvailable.toString(),
|
|
91
91
|
marketFeeClaimed: account.marketFeeClaimed.toString(),
|
|
92
|
-
winningDirection: trade_1.WinningDirection[Object.keys(account.winningDirection)[0].toUpperCase()]
|
|
92
|
+
winningDirection: trade_1.WinningDirection[Object.keys(account.winningDirection)[0].toUpperCase()],
|
|
93
|
+
marketLiquidityAtStart: account.marketLiquidityAtStart.toString() > 0
|
|
94
|
+
? account.marketLiquidityAtStart.toString()
|
|
95
|
+
: '500000000'
|
|
93
96
|
};
|
|
94
97
|
};
|
|
95
98
|
exports.formatMarket = formatMarket;
|
|
@@ -121,7 +124,8 @@ const accountToMarketV1 = (account, address) => {
|
|
|
121
124
|
nftHoldersFeeClaimed: '0',
|
|
122
125
|
marketFeeAvailable: '0',
|
|
123
126
|
marketFeeClaimed: '0',
|
|
124
|
-
winningDirection: trade_1.WinningDirection[Object.keys(account.previousResolvedQuestion.winningDirection)[0].toUpperCase()]
|
|
127
|
+
winningDirection: trade_1.WinningDirection[Object.keys(account.previousResolvedQuestion.winningDirection)[0].toUpperCase()],
|
|
128
|
+
marketLiquidityAtStart: '0'
|
|
125
129
|
};
|
|
126
130
|
};
|
|
127
131
|
exports.accountToMarketV1 = accountToMarketV1;
|