@triadxyz/triad-protocol 0.6.9-beta.devnet → 0.7.1-beta.devnet
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 +2 -2
- package/dist/index.js +4 -5
- package/dist/local-test.js +24 -22
- package/dist/stake.d.ts +2 -2
- package/dist/stake.js +21 -16
- package/dist/trade.d.ts +3 -26
- package/dist/trade.js +19 -58
- package/dist/types/idl_triad_protocol.json +181 -175
- package/dist/types/index.d.ts +10 -0
- package/dist/types/stake.d.ts +2 -19
- package/dist/types/stake.js +1 -9
- package/dist/types/trade.d.ts +21 -0
- package/dist/types/trade.js +7 -0
- package/dist/types/triad_protocol.d.ts +177 -231
- package/dist/utils/formatNumber.d.ts +3 -0
- package/dist/utils/formatNumber.js +6 -0
- package/dist/utils/{getRarity.d.ts → getRarityRank.d.ts} +2 -1
- package/dist/utils/{getRarity.js → getRarityRank.js} +1 -2
- package/dist/utils/helpers.d.ts +7 -25
- package/dist/utils/helpers.js +47 -70
- package/dist/utils/pda/index.d.ts +4 -0
- package/dist/utils/pda/index.js +17 -0
- package/dist/utils/pda/stake.d.ts +4 -0
- package/dist/utils/pda/stake.js +16 -0
- package/dist/utils/pda/trade.d.ts +4 -0
- package/dist/utils/pda/trade.js +20 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"address": "
|
|
2
|
+
"address": "D6CzYj9FxGa8HeQeF1JYu9hDakEuEeMJkSG2awGPuCXG",
|
|
3
3
|
"metadata": {
|
|
4
4
|
"name": "triad_protocol",
|
|
5
5
|
"version": "0.1.4",
|
|
@@ -125,19 +125,7 @@
|
|
|
125
125
|
},
|
|
126
126
|
{
|
|
127
127
|
"name": "user_trade",
|
|
128
|
-
"writable": true
|
|
129
|
-
"pda": {
|
|
130
|
-
"seeds": [
|
|
131
|
-
{
|
|
132
|
-
"kind": "const",
|
|
133
|
-
"value": [117, 115, 101, 114, 95, 116, 114, 97, 100, 101]
|
|
134
|
-
},
|
|
135
|
-
{
|
|
136
|
-
"kind": "account",
|
|
137
|
-
"path": "signer"
|
|
138
|
-
}
|
|
139
|
-
]
|
|
140
|
-
}
|
|
128
|
+
"writable": true
|
|
141
129
|
},
|
|
142
130
|
{
|
|
143
131
|
"name": "market",
|
|
@@ -232,11 +220,6 @@
|
|
|
232
220
|
"writable": true,
|
|
233
221
|
"signer": true
|
|
234
222
|
},
|
|
235
|
-
{
|
|
236
|
-
"name": "payer",
|
|
237
|
-
"writable": true,
|
|
238
|
-
"signer": true
|
|
239
|
-
},
|
|
240
223
|
{
|
|
241
224
|
"name": "referral",
|
|
242
225
|
"writable": true
|
|
@@ -257,6 +240,22 @@
|
|
|
257
240
|
]
|
|
258
241
|
}
|
|
259
242
|
},
|
|
243
|
+
{
|
|
244
|
+
"name": "user_trade",
|
|
245
|
+
"writable": true,
|
|
246
|
+
"pda": {
|
|
247
|
+
"seeds": [
|
|
248
|
+
{
|
|
249
|
+
"kind": "const",
|
|
250
|
+
"value": [117, 115, 101, 114, 95, 116, 114, 97, 100, 101]
|
|
251
|
+
},
|
|
252
|
+
{
|
|
253
|
+
"kind": "account",
|
|
254
|
+
"path": "signer"
|
|
255
|
+
}
|
|
256
|
+
]
|
|
257
|
+
}
|
|
258
|
+
},
|
|
260
259
|
{
|
|
261
260
|
"name": "system_program",
|
|
262
261
|
"address": "11111111111111111111111111111111"
|
|
@@ -282,6 +281,10 @@
|
|
|
282
281
|
"writable": true,
|
|
283
282
|
"signer": true
|
|
284
283
|
},
|
|
284
|
+
{
|
|
285
|
+
"name": "user",
|
|
286
|
+
"writable": true
|
|
287
|
+
},
|
|
285
288
|
{
|
|
286
289
|
"name": "user_trade",
|
|
287
290
|
"writable": true,
|
|
@@ -330,6 +333,10 @@
|
|
|
330
333
|
]
|
|
331
334
|
}
|
|
332
335
|
},
|
|
336
|
+
{
|
|
337
|
+
"name": "mint",
|
|
338
|
+
"writable": true
|
|
339
|
+
},
|
|
333
340
|
{
|
|
334
341
|
"name": "fee_vault",
|
|
335
342
|
"writable": true,
|
|
@@ -340,52 +347,16 @@
|
|
|
340
347
|
"value": [102, 101, 101, 95, 118, 97, 117, 108, 116]
|
|
341
348
|
},
|
|
342
349
|
{
|
|
343
|
-
"kind": "
|
|
344
|
-
"path": "
|
|
350
|
+
"kind": "arg",
|
|
351
|
+
"path": "args.market_id"
|
|
345
352
|
}
|
|
346
353
|
]
|
|
347
354
|
}
|
|
348
355
|
},
|
|
349
|
-
{
|
|
350
|
-
"name": "fee_vault_ata",
|
|
351
|
-
"writable": true,
|
|
352
|
-
"pda": {
|
|
353
|
-
"seeds": [
|
|
354
|
-
{
|
|
355
|
-
"kind": "account",
|
|
356
|
-
"path": "fee_vault"
|
|
357
|
-
},
|
|
358
|
-
{
|
|
359
|
-
"kind": "account",
|
|
360
|
-
"path": "token_program"
|
|
361
|
-
},
|
|
362
|
-
{
|
|
363
|
-
"kind": "account",
|
|
364
|
-
"path": "mint"
|
|
365
|
-
}
|
|
366
|
-
],
|
|
367
|
-
"program": {
|
|
368
|
-
"kind": "const",
|
|
369
|
-
"value": [
|
|
370
|
-
140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142,
|
|
371
|
-
13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216,
|
|
372
|
-
219, 233, 248, 89
|
|
373
|
-
]
|
|
374
|
-
}
|
|
375
|
-
}
|
|
376
|
-
},
|
|
377
|
-
{
|
|
378
|
-
"name": "mint",
|
|
379
|
-
"writable": true
|
|
380
|
-
},
|
|
381
356
|
{
|
|
382
357
|
"name": "token_program",
|
|
383
358
|
"address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
|
|
384
359
|
},
|
|
385
|
-
{
|
|
386
|
-
"name": "associated_token_program",
|
|
387
|
-
"address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
|
|
388
|
-
},
|
|
389
360
|
{
|
|
390
361
|
"name": "system_program",
|
|
391
362
|
"address": "11111111111111111111111111111111"
|
|
@@ -413,19 +384,7 @@
|
|
|
413
384
|
},
|
|
414
385
|
{
|
|
415
386
|
"name": "user_trade",
|
|
416
|
-
"writable": true
|
|
417
|
-
"pda": {
|
|
418
|
-
"seeds": [
|
|
419
|
-
{
|
|
420
|
-
"kind": "const",
|
|
421
|
-
"value": [117, 115, 101, 114, 95, 116, 114, 97, 100, 101]
|
|
422
|
-
},
|
|
423
|
-
{
|
|
424
|
-
"kind": "account",
|
|
425
|
-
"path": "signer"
|
|
426
|
-
}
|
|
427
|
-
]
|
|
428
|
-
}
|
|
387
|
+
"writable": true
|
|
429
388
|
},
|
|
430
389
|
{
|
|
431
390
|
"name": "market",
|
|
@@ -433,19 +392,7 @@
|
|
|
433
392
|
},
|
|
434
393
|
{
|
|
435
394
|
"name": "fee_vault",
|
|
436
|
-
"writable": true
|
|
437
|
-
"pda": {
|
|
438
|
-
"seeds": [
|
|
439
|
-
{
|
|
440
|
-
"kind": "const",
|
|
441
|
-
"value": [102, 101, 101, 95, 118, 97, 117, 108, 116]
|
|
442
|
-
},
|
|
443
|
-
{
|
|
444
|
-
"kind": "account",
|
|
445
|
-
"path": "market"
|
|
446
|
-
}
|
|
447
|
-
]
|
|
448
|
-
}
|
|
395
|
+
"writable": true
|
|
449
396
|
},
|
|
450
397
|
{
|
|
451
398
|
"name": "mint",
|
|
@@ -453,31 +400,7 @@
|
|
|
453
400
|
},
|
|
454
401
|
{
|
|
455
402
|
"name": "user_from_ata",
|
|
456
|
-
"writable": true
|
|
457
|
-
"pda": {
|
|
458
|
-
"seeds": [
|
|
459
|
-
{
|
|
460
|
-
"kind": "account",
|
|
461
|
-
"path": "signer"
|
|
462
|
-
},
|
|
463
|
-
{
|
|
464
|
-
"kind": "account",
|
|
465
|
-
"path": "token_program"
|
|
466
|
-
},
|
|
467
|
-
{
|
|
468
|
-
"kind": "account",
|
|
469
|
-
"path": "mint"
|
|
470
|
-
}
|
|
471
|
-
],
|
|
472
|
-
"program": {
|
|
473
|
-
"kind": "const",
|
|
474
|
-
"value": [
|
|
475
|
-
140, 151, 37, 143, 78, 36, 137, 241, 187, 61, 16, 41, 20, 142,
|
|
476
|
-
13, 131, 11, 90, 19, 153, 218, 255, 16, 132, 4, 142, 123, 216,
|
|
477
|
-
219, 233, 248, 89
|
|
478
|
-
]
|
|
479
|
-
}
|
|
480
|
-
}
|
|
403
|
+
"writable": true
|
|
481
404
|
},
|
|
482
405
|
{
|
|
483
406
|
"name": "market_to_ata",
|
|
@@ -1467,7 +1390,7 @@
|
|
|
1467
1390
|
},
|
|
1468
1391
|
{
|
|
1469
1392
|
"name": "total_volume",
|
|
1470
|
-
"docs": ["Total trading volume (in TRD)"],
|
|
1393
|
+
"docs": ["Total trading volume (in TRD) for all resolutions"],
|
|
1471
1394
|
"type": "u64"
|
|
1472
1395
|
},
|
|
1473
1396
|
{
|
|
@@ -1497,7 +1420,7 @@
|
|
|
1497
1420
|
{
|
|
1498
1421
|
"name": "fee_bps",
|
|
1499
1422
|
"docs": [
|
|
1500
|
-
"Fees applied to trades (in basis points, e.g.,
|
|
1423
|
+
"Fees applied to trades (in basis points, e.g., 1.131% fee)"
|
|
1501
1424
|
],
|
|
1502
1425
|
"type": "u16"
|
|
1503
1426
|
},
|
|
@@ -1519,10 +1442,48 @@
|
|
|
1519
1442
|
"name": "market_price",
|
|
1520
1443
|
"type": "u64"
|
|
1521
1444
|
},
|
|
1445
|
+
{
|
|
1446
|
+
"name": "resolved_questions",
|
|
1447
|
+
"type": {
|
|
1448
|
+
"array": [
|
|
1449
|
+
{
|
|
1450
|
+
"defined": {
|
|
1451
|
+
"name": "ResolvedQuestion"
|
|
1452
|
+
}
|
|
1453
|
+
},
|
|
1454
|
+
4
|
|
1455
|
+
]
|
|
1456
|
+
}
|
|
1457
|
+
},
|
|
1458
|
+
{
|
|
1459
|
+
"name": "current_question_id",
|
|
1460
|
+
"docs": [
|
|
1461
|
+
"Index of the current week in the weekly_results array initialized with default values"
|
|
1462
|
+
],
|
|
1463
|
+
"type": "u64"
|
|
1464
|
+
},
|
|
1465
|
+
{
|
|
1466
|
+
"name": "current_question_start",
|
|
1467
|
+
"docs": [
|
|
1468
|
+
"Start timestamp of the current week if 7 days have passed since the start of the week"
|
|
1469
|
+
],
|
|
1470
|
+
"type": "i64"
|
|
1471
|
+
},
|
|
1472
|
+
{
|
|
1473
|
+
"name": "current_question_end",
|
|
1474
|
+
"type": "i64"
|
|
1475
|
+
},
|
|
1476
|
+
{
|
|
1477
|
+
"name": "current_question",
|
|
1478
|
+
"docs": ["The question or prediction topic for the current week"],
|
|
1479
|
+
"type": {
|
|
1480
|
+
"array": ["u8", 120]
|
|
1481
|
+
}
|
|
1482
|
+
},
|
|
1522
1483
|
{
|
|
1523
1484
|
"name": "padding",
|
|
1524
1485
|
"type": {
|
|
1525
|
-
"array": ["u8",
|
|
1486
|
+
"array": ["u8", 232]
|
|
1526
1487
|
}
|
|
1527
1488
|
}
|
|
1528
1489
|
]
|
|
@@ -1545,20 +1506,6 @@
|
|
|
1545
1506
|
}
|
|
1546
1507
|
}
|
|
1547
1508
|
},
|
|
1548
|
-
{
|
|
1549
|
-
"name": "order_type",
|
|
1550
|
-
"type": {
|
|
1551
|
-
"defined": {
|
|
1552
|
-
"name": "OrderType"
|
|
1553
|
-
}
|
|
1554
|
-
}
|
|
1555
|
-
},
|
|
1556
|
-
{
|
|
1557
|
-
"name": "limit_price",
|
|
1558
|
-
"type": {
|
|
1559
|
-
"option": "u64"
|
|
1560
|
-
}
|
|
1561
|
-
},
|
|
1562
1509
|
{
|
|
1563
1510
|
"name": "comment",
|
|
1564
1511
|
"type": {
|
|
@@ -1583,6 +1530,10 @@
|
|
|
1583
1530
|
"name": "order_id",
|
|
1584
1531
|
"type": "u64"
|
|
1585
1532
|
},
|
|
1533
|
+
{
|
|
1534
|
+
"name": "question_id",
|
|
1535
|
+
"type": "u64"
|
|
1536
|
+
},
|
|
1586
1537
|
{
|
|
1587
1538
|
"name": "market_id",
|
|
1588
1539
|
"type": "u64"
|
|
@@ -1605,10 +1556,7 @@
|
|
|
1605
1556
|
},
|
|
1606
1557
|
{
|
|
1607
1558
|
"name": "total_amount",
|
|
1608
|
-
"docs": [
|
|
1609
|
-
"The total amount of TRD committed to this order",
|
|
1610
|
-
"precision: QUOTE_PRECISION"
|
|
1611
|
-
],
|
|
1559
|
+
"docs": ["The total amount of TRD committed to this order"],
|
|
1612
1560
|
"type": "u64"
|
|
1613
1561
|
},
|
|
1614
1562
|
{
|
|
@@ -1616,19 +1564,6 @@
|
|
|
1616
1564
|
"docs": ["The total number of shares to be purchased"],
|
|
1617
1565
|
"type": "u64"
|
|
1618
1566
|
},
|
|
1619
|
-
{
|
|
1620
|
-
"name": "filled_amount",
|
|
1621
|
-
"docs": [
|
|
1622
|
-
"The amount of TRD that has been filled",
|
|
1623
|
-
"precision: QUOTE_PRECISION"
|
|
1624
|
-
],
|
|
1625
|
-
"type": "u64"
|
|
1626
|
-
},
|
|
1627
|
-
{
|
|
1628
|
-
"name": "filled_shares",
|
|
1629
|
-
"docs": ["The number of shares that have been filled"],
|
|
1630
|
-
"type": "u64"
|
|
1631
|
-
},
|
|
1632
1567
|
{
|
|
1633
1568
|
"name": "order_type",
|
|
1634
1569
|
"type": {
|
|
@@ -1646,17 +1581,16 @@
|
|
|
1646
1581
|
}
|
|
1647
1582
|
},
|
|
1648
1583
|
{
|
|
1649
|
-
"name": "
|
|
1584
|
+
"name": "pnl",
|
|
1650
1585
|
"docs": [
|
|
1651
|
-
"The amount of pnl settled in this market since opening the position (in TRD)"
|
|
1652
|
-
"precision: QUOTE_PRECISION"
|
|
1586
|
+
"The amount of pnl settled in this market since opening the position (in TRD)"
|
|
1653
1587
|
],
|
|
1654
1588
|
"type": "i64"
|
|
1655
1589
|
},
|
|
1656
1590
|
{
|
|
1657
1591
|
"name": "padding",
|
|
1658
1592
|
"type": {
|
|
1659
|
-
"array": ["u8",
|
|
1593
|
+
"array": ["u8", 32]
|
|
1660
1594
|
}
|
|
1661
1595
|
}
|
|
1662
1596
|
]
|
|
@@ -1687,12 +1621,6 @@
|
|
|
1687
1621
|
{
|
|
1688
1622
|
"name": "Open"
|
|
1689
1623
|
},
|
|
1690
|
-
{
|
|
1691
|
-
"name": "Filled"
|
|
1692
|
-
},
|
|
1693
|
-
{
|
|
1694
|
-
"name": "Canceled"
|
|
1695
|
-
},
|
|
1696
1624
|
{
|
|
1697
1625
|
"name": "Closed"
|
|
1698
1626
|
}
|
|
@@ -1705,10 +1633,10 @@
|
|
|
1705
1633
|
"kind": "enum",
|
|
1706
1634
|
"variants": [
|
|
1707
1635
|
{
|
|
1708
|
-
"name": "
|
|
1636
|
+
"name": "Market"
|
|
1709
1637
|
},
|
|
1710
1638
|
{
|
|
1711
|
-
"name": "
|
|
1639
|
+
"name": "Limit"
|
|
1712
1640
|
}
|
|
1713
1641
|
]
|
|
1714
1642
|
}
|
|
@@ -1726,6 +1654,10 @@
|
|
|
1726
1654
|
"name": "market_id",
|
|
1727
1655
|
"type": "u64"
|
|
1728
1656
|
},
|
|
1657
|
+
{
|
|
1658
|
+
"name": "question_id",
|
|
1659
|
+
"type": "u64"
|
|
1660
|
+
},
|
|
1729
1661
|
{
|
|
1730
1662
|
"name": "order_id",
|
|
1731
1663
|
"type": "u64"
|
|
@@ -1762,18 +1694,10 @@
|
|
|
1762
1694
|
"name": "total_shares",
|
|
1763
1695
|
"type": "u64"
|
|
1764
1696
|
},
|
|
1765
|
-
{
|
|
1766
|
-
"name": "filled_shares",
|
|
1767
|
-
"type": "u64"
|
|
1768
|
-
},
|
|
1769
1697
|
{
|
|
1770
1698
|
"name": "total_amount",
|
|
1771
1699
|
"type": "u64"
|
|
1772
1700
|
},
|
|
1773
|
-
{
|
|
1774
|
-
"name": "filled_amount",
|
|
1775
|
-
"type": "u64"
|
|
1776
|
-
},
|
|
1777
1701
|
{
|
|
1778
1702
|
"name": "comment",
|
|
1779
1703
|
"type": {
|
|
@@ -1788,9 +1712,19 @@
|
|
|
1788
1712
|
"option": "u64"
|
|
1789
1713
|
}
|
|
1790
1714
|
},
|
|
1715
|
+
{
|
|
1716
|
+
"name": "pnl",
|
|
1717
|
+
"type": "i64"
|
|
1718
|
+
},
|
|
1791
1719
|
{
|
|
1792
1720
|
"name": "timestamp",
|
|
1793
1721
|
"type": "i64"
|
|
1722
|
+
},
|
|
1723
|
+
{
|
|
1724
|
+
"name": "is_question_winner",
|
|
1725
|
+
"type": {
|
|
1726
|
+
"option": "bool"
|
|
1727
|
+
}
|
|
1794
1728
|
}
|
|
1795
1729
|
]
|
|
1796
1730
|
}
|
|
@@ -1839,6 +1773,70 @@
|
|
|
1839
1773
|
]
|
|
1840
1774
|
}
|
|
1841
1775
|
},
|
|
1776
|
+
{
|
|
1777
|
+
"name": "ResolvedQuestion",
|
|
1778
|
+
"type": {
|
|
1779
|
+
"kind": "struct",
|
|
1780
|
+
"fields": [
|
|
1781
|
+
{
|
|
1782
|
+
"name": "question",
|
|
1783
|
+
"docs": ["The question or prediction topic for this week"],
|
|
1784
|
+
"type": {
|
|
1785
|
+
"array": ["u8", 120]
|
|
1786
|
+
}
|
|
1787
|
+
},
|
|
1788
|
+
{
|
|
1789
|
+
"name": "start_time",
|
|
1790
|
+
"docs": ["Start timestamp of the week"],
|
|
1791
|
+
"type": "i64"
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
"name": "end_time",
|
|
1795
|
+
"docs": ["End timestamp of the week"],
|
|
1796
|
+
"type": "i64"
|
|
1797
|
+
},
|
|
1798
|
+
{
|
|
1799
|
+
"name": "hype_liquidity",
|
|
1800
|
+
"docs": ["Total liquidity for Hype (in TRD)"],
|
|
1801
|
+
"type": "u64"
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
"name": "flop_liquidity",
|
|
1805
|
+
"docs": ["Total liquidity for Flop (in TRD)"],
|
|
1806
|
+
"type": "u64"
|
|
1807
|
+
},
|
|
1808
|
+
{
|
|
1809
|
+
"name": "winning_direction",
|
|
1810
|
+
"docs": ["The winning direction (Hype, Flop or None)"],
|
|
1811
|
+
"type": {
|
|
1812
|
+
"defined": {
|
|
1813
|
+
"name": "WinningDirection"
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
},
|
|
1817
|
+
{
|
|
1818
|
+
"name": "market_price",
|
|
1819
|
+
"type": "u64"
|
|
1820
|
+
},
|
|
1821
|
+
{
|
|
1822
|
+
"name": "final_hype_price",
|
|
1823
|
+
"docs": ["Final price for Hype outcome at the end of the week"],
|
|
1824
|
+
"type": "u64"
|
|
1825
|
+
},
|
|
1826
|
+
{
|
|
1827
|
+
"name": "final_flop_price",
|
|
1828
|
+
"docs": ["Final price for Flop outcome at the end of the week"],
|
|
1829
|
+
"type": "u64"
|
|
1830
|
+
},
|
|
1831
|
+
{
|
|
1832
|
+
"name": "padding",
|
|
1833
|
+
"type": {
|
|
1834
|
+
"array": ["u8", 100]
|
|
1835
|
+
}
|
|
1836
|
+
}
|
|
1837
|
+
]
|
|
1838
|
+
}
|
|
1839
|
+
},
|
|
1842
1840
|
{
|
|
1843
1841
|
"name": "StakeNFTArgs",
|
|
1844
1842
|
"type": {
|
|
@@ -2115,14 +2113,9 @@
|
|
|
2115
2113
|
"type": "u64"
|
|
2116
2114
|
},
|
|
2117
2115
|
{
|
|
2118
|
-
"name": "
|
|
2119
|
-
"docs": ["
|
|
2120
|
-
"type": "
|
|
2121
|
-
},
|
|
2122
|
-
{
|
|
2123
|
-
"name": "has_open_order",
|
|
2124
|
-
"docs": ["Whether or not user has open order"],
|
|
2125
|
-
"type": "bool"
|
|
2116
|
+
"name": "opened_orders",
|
|
2117
|
+
"docs": ["The number of orders the user has opened"],
|
|
2118
|
+
"type": "u64"
|
|
2126
2119
|
},
|
|
2127
2120
|
{
|
|
2128
2121
|
"name": "orders",
|
|
@@ -2137,18 +2130,31 @@
|
|
|
2137
2130
|
]
|
|
2138
2131
|
}
|
|
2139
2132
|
},
|
|
2140
|
-
{
|
|
2141
|
-
"name": "position",
|
|
2142
|
-
"type": "i64"
|
|
2143
|
-
},
|
|
2144
2133
|
{
|
|
2145
2134
|
"name": "padding",
|
|
2146
2135
|
"type": {
|
|
2147
|
-
"array": ["u8",
|
|
2136
|
+
"array": ["u8", 32]
|
|
2148
2137
|
}
|
|
2149
2138
|
}
|
|
2150
2139
|
]
|
|
2151
2140
|
}
|
|
2141
|
+
},
|
|
2142
|
+
{
|
|
2143
|
+
"name": "WinningDirection",
|
|
2144
|
+
"type": {
|
|
2145
|
+
"kind": "enum",
|
|
2146
|
+
"variants": [
|
|
2147
|
+
{
|
|
2148
|
+
"name": "Hype"
|
|
2149
|
+
},
|
|
2150
|
+
{
|
|
2151
|
+
"name": "Flop"
|
|
2152
|
+
},
|
|
2153
|
+
{
|
|
2154
|
+
"name": "None"
|
|
2155
|
+
}
|
|
2156
|
+
]
|
|
2157
|
+
}
|
|
2152
2158
|
}
|
|
2153
2159
|
]
|
|
2154
2160
|
}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -8,3 +8,13 @@ export type CreateUserArgs = {
|
|
|
8
8
|
name: string;
|
|
9
9
|
referral?: PublicKey;
|
|
10
10
|
};
|
|
11
|
+
export type User = {
|
|
12
|
+
ts: number;
|
|
13
|
+
authority: string;
|
|
14
|
+
referral: string;
|
|
15
|
+
referred: number;
|
|
16
|
+
name: string;
|
|
17
|
+
swapsMade: number;
|
|
18
|
+
swaps: number;
|
|
19
|
+
staked: number;
|
|
20
|
+
};
|
package/dist/types/stake.d.ts
CHANGED
|
@@ -64,14 +64,7 @@ export declare enum RARITY_WEIGHT {
|
|
|
64
64
|
LEGENDARY = 5,
|
|
65
65
|
MYTHIC = 6
|
|
66
66
|
}
|
|
67
|
-
export
|
|
68
|
-
ALLIGATORS = 1.5,
|
|
69
|
-
COLETA = 1.5,
|
|
70
|
-
UNDEAD = 1.5,
|
|
71
|
-
UNDEAD_TRIADFI = 2.5,
|
|
72
|
-
PYTH = 1.5
|
|
73
|
-
}
|
|
74
|
-
export type StakeVaultResponse = {
|
|
67
|
+
export type StakeVault = {
|
|
75
68
|
name: string;
|
|
76
69
|
collection: string;
|
|
77
70
|
authority: string;
|
|
@@ -87,7 +80,7 @@ export type StakeVaultResponse = {
|
|
|
87
80
|
initTs: number;
|
|
88
81
|
endTs: number;
|
|
89
82
|
};
|
|
90
|
-
export type
|
|
83
|
+
export type Stake = {
|
|
91
84
|
name: string;
|
|
92
85
|
stakeVault: string;
|
|
93
86
|
authority: string;
|
|
@@ -100,13 +93,3 @@ export type StakeResponse = {
|
|
|
100
93
|
available: number;
|
|
101
94
|
amount: number;
|
|
102
95
|
};
|
|
103
|
-
export type UserResponse = {
|
|
104
|
-
ts: number;
|
|
105
|
-
authority: string;
|
|
106
|
-
referral: string;
|
|
107
|
-
referred: number;
|
|
108
|
-
name: string;
|
|
109
|
-
swapsMade: number;
|
|
110
|
-
swaps: number;
|
|
111
|
-
staked: number;
|
|
112
|
-
};
|
package/dist/types/stake.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.RARITY_WEIGHT = void 0;
|
|
4
4
|
var RARITY_WEIGHT;
|
|
5
5
|
(function (RARITY_WEIGHT) {
|
|
6
6
|
RARITY_WEIGHT[RARITY_WEIGHT["COMMON"] = 1] = "COMMON";
|
|
@@ -10,11 +10,3 @@ var RARITY_WEIGHT;
|
|
|
10
10
|
RARITY_WEIGHT[RARITY_WEIGHT["LEGENDARY"] = 5] = "LEGENDARY";
|
|
11
11
|
RARITY_WEIGHT[RARITY_WEIGHT["MYTHIC"] = 6] = "MYTHIC";
|
|
12
12
|
})(RARITY_WEIGHT || (exports.RARITY_WEIGHT = RARITY_WEIGHT = {}));
|
|
13
|
-
var COLLECTION_MUlTIPLIER;
|
|
14
|
-
(function (COLLECTION_MUlTIPLIER) {
|
|
15
|
-
COLLECTION_MUlTIPLIER[COLLECTION_MUlTIPLIER["ALLIGATORS"] = 1.5] = "ALLIGATORS";
|
|
16
|
-
COLLECTION_MUlTIPLIER[COLLECTION_MUlTIPLIER["COLETA"] = 1.5] = "COLETA";
|
|
17
|
-
COLLECTION_MUlTIPLIER[COLLECTION_MUlTIPLIER["UNDEAD"] = 1.5] = "UNDEAD";
|
|
18
|
-
COLLECTION_MUlTIPLIER[COLLECTION_MUlTIPLIER["UNDEAD_TRIADFI"] = 2.5] = "UNDEAD_TRIADFI";
|
|
19
|
-
COLLECTION_MUlTIPLIER[COLLECTION_MUlTIPLIER["PYTH"] = 1.5] = "PYTH";
|
|
20
|
-
})(COLLECTION_MUlTIPLIER || (exports.COLLECTION_MUlTIPLIER = COLLECTION_MUlTIPLIER = {}));
|
package/dist/types/trade.d.ts
CHANGED
|
@@ -21,7 +21,28 @@ export type Market = {
|
|
|
21
21
|
isActive: boolean;
|
|
22
22
|
marketPrice: string;
|
|
23
23
|
isOfficial: boolean;
|
|
24
|
+
resolvedQuestions: ResolvedQuestion[];
|
|
25
|
+
currentQuestionId: string;
|
|
26
|
+
currentQuestionStart: string;
|
|
27
|
+
currentQuestionEnd: string;
|
|
28
|
+
currentQuestion: string;
|
|
24
29
|
};
|
|
30
|
+
export type ResolvedQuestion = {
|
|
31
|
+
question: string;
|
|
32
|
+
startTime: string;
|
|
33
|
+
endTime: string;
|
|
34
|
+
hypeLiquidity: string;
|
|
35
|
+
flopLiquidity: string;
|
|
36
|
+
winningDirection: WinningDirection;
|
|
37
|
+
marketPrice: string;
|
|
38
|
+
finalHypePrice: string;
|
|
39
|
+
finalFlopPrice: string;
|
|
40
|
+
};
|
|
41
|
+
export declare enum WinningDirection {
|
|
42
|
+
Hype = "Hype",
|
|
43
|
+
Flop = "Flop",
|
|
44
|
+
None = "None"
|
|
45
|
+
}
|
|
25
46
|
export type OrderDirection = {
|
|
26
47
|
hype: {};
|
|
27
48
|
} | {
|
package/dist/types/trade.js
CHANGED
|
@@ -1,2 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WinningDirection = void 0;
|
|
4
|
+
var WinningDirection;
|
|
5
|
+
(function (WinningDirection) {
|
|
6
|
+
WinningDirection["Hype"] = "Hype";
|
|
7
|
+
WinningDirection["Flop"] = "Flop";
|
|
8
|
+
WinningDirection["None"] = "None";
|
|
9
|
+
})(WinningDirection || (exports.WinningDirection = WinningDirection = {}));
|