@bench.games/opportunity-markets 0.3.4 → 0.4.3
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/browser/index.js +1530 -1523
- package/dist/index.cjs +1483 -1476
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +780 -776
- package/dist/index.d.ts +780 -776
- package/dist/index.js +1530 -1523
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -623,7 +623,7 @@ function getCreateMarketParametersEncoder() {
|
|
|
623
623
|
["authorizedReaderPubkey", getArrayEncoder5(getU8Encoder7(), { size: 32 })],
|
|
624
624
|
["earlinessCutoffSeconds", getU64Encoder4()],
|
|
625
625
|
["earlinessMultiplier", getU16Encoder2()],
|
|
626
|
-
["
|
|
626
|
+
["minVouchAmount", getU64Encoder4()],
|
|
627
627
|
["creatorFeeClaimer", getAddressEncoder4()]
|
|
628
628
|
]);
|
|
629
629
|
}
|
|
@@ -634,7 +634,7 @@ function getCreateMarketParametersDecoder() {
|
|
|
634
634
|
["authorizedReaderPubkey", getArrayDecoder5(getU8Decoder7(), { size: 32 })],
|
|
635
635
|
["earlinessCutoffSeconds", getU64Decoder4()],
|
|
636
636
|
["earlinessMultiplier", getU16Decoder2()],
|
|
637
|
-
["
|
|
637
|
+
["minVouchAmount", getU64Decoder4()],
|
|
638
638
|
["creatorFeeClaimer", getAddressDecoder4()]
|
|
639
639
|
]);
|
|
640
640
|
}
|
|
@@ -844,7 +844,7 @@ function getInitPlatformParametersEncoder() {
|
|
|
844
844
|
["creatorFeeBp", getU16Encoder4()],
|
|
845
845
|
["feeClaimAuthority", getAddressEncoder8()],
|
|
846
846
|
["revealAuthority", getAddressEncoder8()],
|
|
847
|
-
["
|
|
847
|
+
["minTimeToVouchSeconds", getU64Encoder8()],
|
|
848
848
|
["revealPeriodSeconds", getU64Encoder8()],
|
|
849
849
|
["marketResolutionDeadlineSeconds", getU64Encoder8()]
|
|
850
850
|
]);
|
|
@@ -857,7 +857,7 @@ function getInitPlatformParametersDecoder() {
|
|
|
857
857
|
["creatorFeeBp", getU16Decoder4()],
|
|
858
858
|
["feeClaimAuthority", getAddressDecoder8()],
|
|
859
859
|
["revealAuthority", getAddressDecoder8()],
|
|
860
|
-
["
|
|
860
|
+
["minTimeToVouchSeconds", getU64Decoder8()],
|
|
861
861
|
["revealPeriodSeconds", getU64Decoder8()],
|
|
862
862
|
["marketResolutionDeadlineSeconds", getU64Decoder8()]
|
|
863
863
|
]);
|
|
@@ -923,7 +923,7 @@ function getMarketCreatedEventEncoder() {
|
|
|
923
923
|
["earlinessMultiplier", getU16Encoder5()],
|
|
924
924
|
["marketAuthority", getAddressEncoder9()],
|
|
925
925
|
["authorizedReaderPubkey", getArrayEncoder6(getU8Encoder9(), { size: 32 })],
|
|
926
|
-
["
|
|
926
|
+
["minVouchAmount", getU64Encoder9()],
|
|
927
927
|
["feeRates", getFeeRatesEncoder()],
|
|
928
928
|
["creatorFeeClaimer", getAddressEncoder9()],
|
|
929
929
|
["marketResolutionDeadlineSeconds", getU64Encoder9()],
|
|
@@ -942,7 +942,7 @@ function getMarketCreatedEventDecoder() {
|
|
|
942
942
|
["earlinessMultiplier", getU16Decoder5()],
|
|
943
943
|
["marketAuthority", getAddressDecoder9()],
|
|
944
944
|
["authorizedReaderPubkey", getArrayDecoder6(getU8Decoder9(), { size: 32 })],
|
|
945
|
-
["
|
|
945
|
+
["minVouchAmount", getU64Decoder9()],
|
|
946
946
|
["feeRates", getFeeRatesDecoder()],
|
|
947
947
|
["creatorFeeClaimer", getAddressDecoder9()],
|
|
948
948
|
["marketResolutionDeadlineSeconds", getU64Decoder9()],
|
|
@@ -973,7 +973,7 @@ function getMarketOpenedEventEncoder() {
|
|
|
973
973
|
return getStructEncoder20([
|
|
974
974
|
["market", getAddressEncoder10()],
|
|
975
975
|
["creator", getAddressEncoder10()],
|
|
976
|
-
["
|
|
976
|
+
["vouchingWindowEnd", getU64Encoder10()],
|
|
977
977
|
["timestamp", getI64Encoder6()]
|
|
978
978
|
]);
|
|
979
979
|
}
|
|
@@ -981,7 +981,7 @@ function getMarketOpenedEventDecoder() {
|
|
|
981
981
|
return getStructDecoder20([
|
|
982
982
|
["market", getAddressDecoder10()],
|
|
983
983
|
["creator", getAddressDecoder10()],
|
|
984
|
-
["
|
|
984
|
+
["vouchingWindowEnd", getU64Decoder10()],
|
|
985
985
|
["timestamp", getI64Decoder6()]
|
|
986
986
|
]);
|
|
987
987
|
}
|
|
@@ -1444,7 +1444,7 @@ function getRevealPeriodEndedEventCodec() {
|
|
|
1444
1444
|
);
|
|
1445
1445
|
}
|
|
1446
1446
|
|
|
1447
|
-
// src/generated/types/
|
|
1447
|
+
// src/generated/types/revealVouchFinalizedEvent.ts
|
|
1448
1448
|
import {
|
|
1449
1449
|
combineCodec as combineCodec36,
|
|
1450
1450
|
getAddressDecoder as getAddressDecoder17,
|
|
@@ -1460,42 +1460,42 @@ import {
|
|
|
1460
1460
|
getU64Decoder as getU64Decoder15,
|
|
1461
1461
|
getU64Encoder as getU64Encoder15
|
|
1462
1462
|
} from "@solana/kit";
|
|
1463
|
-
function
|
|
1463
|
+
function getRevealVouchFinalizedEventEncoder() {
|
|
1464
1464
|
return getStructEncoder30([
|
|
1465
1465
|
["owner", getAddressEncoder17()],
|
|
1466
1466
|
["market", getAddressEncoder17()],
|
|
1467
|
-
["
|
|
1468
|
-
["
|
|
1467
|
+
["vouchAccount", getAddressEncoder17()],
|
|
1468
|
+
["vouchAccountId", getU32Encoder7()],
|
|
1469
1469
|
["optionId", getU64Encoder15()],
|
|
1470
|
-
["
|
|
1470
|
+
["userVouch", getU64Encoder15()],
|
|
1471
1471
|
["userScore", getU64Encoder15()],
|
|
1472
1472
|
["totalScore", getU128Encoder()],
|
|
1473
|
-
["
|
|
1473
|
+
["totalVouch", getU64Encoder15()],
|
|
1474
1474
|
["timestamp", getI64Encoder11()]
|
|
1475
1475
|
]);
|
|
1476
1476
|
}
|
|
1477
|
-
function
|
|
1477
|
+
function getRevealVouchFinalizedEventDecoder() {
|
|
1478
1478
|
return getStructDecoder30([
|
|
1479
1479
|
["owner", getAddressDecoder17()],
|
|
1480
1480
|
["market", getAddressDecoder17()],
|
|
1481
|
-
["
|
|
1482
|
-
["
|
|
1481
|
+
["vouchAccount", getAddressDecoder17()],
|
|
1482
|
+
["vouchAccountId", getU32Decoder7()],
|
|
1483
1483
|
["optionId", getU64Decoder15()],
|
|
1484
|
-
["
|
|
1484
|
+
["userVouch", getU64Decoder15()],
|
|
1485
1485
|
["userScore", getU64Decoder15()],
|
|
1486
1486
|
["totalScore", getU128Decoder()],
|
|
1487
|
-
["
|
|
1487
|
+
["totalVouch", getU64Decoder15()],
|
|
1488
1488
|
["timestamp", getI64Decoder11()]
|
|
1489
1489
|
]);
|
|
1490
1490
|
}
|
|
1491
|
-
function
|
|
1491
|
+
function getRevealVouchFinalizedEventCodec() {
|
|
1492
1492
|
return combineCodec36(
|
|
1493
|
-
|
|
1494
|
-
|
|
1493
|
+
getRevealVouchFinalizedEventEncoder(),
|
|
1494
|
+
getRevealVouchFinalizedEventDecoder()
|
|
1495
1495
|
);
|
|
1496
1496
|
}
|
|
1497
1497
|
|
|
1498
|
-
// src/generated/types/
|
|
1498
|
+
// src/generated/types/revealVouchOutput.ts
|
|
1499
1499
|
import {
|
|
1500
1500
|
combineCodec as combineCodec37,
|
|
1501
1501
|
getStructDecoder as getStructDecoder31,
|
|
@@ -1503,16 +1503,16 @@ import {
|
|
|
1503
1503
|
getU64Decoder as getU64Decoder16,
|
|
1504
1504
|
getU64Encoder as getU64Encoder16
|
|
1505
1505
|
} from "@solana/kit";
|
|
1506
|
-
function
|
|
1506
|
+
function getRevealVouchOutputEncoder() {
|
|
1507
1507
|
return getStructEncoder31([["field0", getU64Encoder16()]]);
|
|
1508
1508
|
}
|
|
1509
|
-
function
|
|
1509
|
+
function getRevealVouchOutputDecoder() {
|
|
1510
1510
|
return getStructDecoder31([["field0", getU64Decoder16()]]);
|
|
1511
1511
|
}
|
|
1512
|
-
function
|
|
1512
|
+
function getRevealVouchOutputCodec() {
|
|
1513
1513
|
return combineCodec37(
|
|
1514
|
-
|
|
1515
|
-
|
|
1514
|
+
getRevealVouchOutputEncoder(),
|
|
1515
|
+
getRevealVouchOutputDecoder()
|
|
1516
1516
|
);
|
|
1517
1517
|
}
|
|
1518
1518
|
|
|
@@ -1571,8 +1571,8 @@ function getRewardsClaimedEventEncoder() {
|
|
|
1571
1571
|
return getStructEncoder33([
|
|
1572
1572
|
["owner", getAddressEncoder19()],
|
|
1573
1573
|
["market", getAddressEncoder19()],
|
|
1574
|
-
["
|
|
1575
|
-
["
|
|
1574
|
+
["vouchAccount", getAddressEncoder19()],
|
|
1575
|
+
["vouchAccountId", getU32Encoder8()],
|
|
1576
1576
|
["optionId", getU64Encoder18()],
|
|
1577
1577
|
["rewardAmount", getU64Encoder18()],
|
|
1578
1578
|
["score", getU64Encoder18()],
|
|
@@ -1583,8 +1583,8 @@ function getRewardsClaimedEventDecoder() {
|
|
|
1583
1583
|
return getStructDecoder33([
|
|
1584
1584
|
["owner", getAddressDecoder19()],
|
|
1585
1585
|
["market", getAddressDecoder19()],
|
|
1586
|
-
["
|
|
1587
|
-
["
|
|
1586
|
+
["vouchAccount", getAddressDecoder19()],
|
|
1587
|
+
["vouchAccountId", getU32Decoder8()],
|
|
1588
1588
|
["optionId", getU64Decoder18()],
|
|
1589
1589
|
["rewardAmount", getU64Decoder18()],
|
|
1590
1590
|
["score", getU64Decoder18()],
|
|
@@ -1635,15 +1635,13 @@ function getRewardWithdrawnEventCodec() {
|
|
|
1635
1635
|
);
|
|
1636
1636
|
}
|
|
1637
1637
|
|
|
1638
|
-
// src/generated/types/
|
|
1638
|
+
// src/generated/types/stuckVouchClosedEvent.ts
|
|
1639
1639
|
import {
|
|
1640
1640
|
combineCodec as combineCodec41,
|
|
1641
1641
|
getAddressDecoder as getAddressDecoder21,
|
|
1642
1642
|
getAddressEncoder as getAddressEncoder21,
|
|
1643
1643
|
getI64Decoder as getI64Decoder15,
|
|
1644
1644
|
getI64Encoder as getI64Encoder15,
|
|
1645
|
-
getOptionDecoder as getOptionDecoder4,
|
|
1646
|
-
getOptionEncoder as getOptionEncoder4,
|
|
1647
1645
|
getStructDecoder as getStructDecoder35,
|
|
1648
1646
|
getStructEncoder as getStructEncoder35,
|
|
1649
1647
|
getU32Decoder as getU32Decoder9,
|
|
@@ -1651,176 +1649,349 @@ import {
|
|
|
1651
1649
|
getU64Decoder as getU64Decoder20,
|
|
1652
1650
|
getU64Encoder as getU64Encoder20
|
|
1653
1651
|
} from "@solana/kit";
|
|
1654
|
-
function
|
|
1652
|
+
function getStuckVouchClosedEventEncoder() {
|
|
1655
1653
|
return getStructEncoder35([
|
|
1656
1654
|
["owner", getAddressEncoder21()],
|
|
1657
1655
|
["market", getAddressEncoder21()],
|
|
1658
|
-
["
|
|
1659
|
-
["
|
|
1660
|
-
["
|
|
1661
|
-
["
|
|
1662
|
-
["
|
|
1663
|
-
["
|
|
1664
|
-
["stakingWindowEnd", getU64Encoder20()],
|
|
1665
|
-
["score", getU64Encoder20()],
|
|
1656
|
+
["vouchAccount", getAddressEncoder21()],
|
|
1657
|
+
["vouchAccountId", getU32Encoder9()],
|
|
1658
|
+
["refundedAmount", getU64Encoder20()],
|
|
1659
|
+
["refundedPlatformFee", getU64Encoder20()],
|
|
1660
|
+
["refundedRewardPoolFee", getU64Encoder20()],
|
|
1661
|
+
["refundedCreatorFee", getU64Encoder20()],
|
|
1666
1662
|
["timestamp", getI64Encoder15()]
|
|
1667
1663
|
]);
|
|
1668
1664
|
}
|
|
1669
|
-
function
|
|
1665
|
+
function getStuckVouchClosedEventDecoder() {
|
|
1670
1666
|
return getStructDecoder35([
|
|
1671
1667
|
["owner", getAddressDecoder21()],
|
|
1672
1668
|
["market", getAddressDecoder21()],
|
|
1673
|
-
["
|
|
1674
|
-
["
|
|
1675
|
-
["
|
|
1676
|
-
["
|
|
1677
|
-
["
|
|
1678
|
-
["
|
|
1679
|
-
["stakingWindowEnd", getU64Decoder20()],
|
|
1680
|
-
["score", getU64Decoder20()],
|
|
1669
|
+
["vouchAccount", getAddressDecoder21()],
|
|
1670
|
+
["vouchAccountId", getU32Decoder9()],
|
|
1671
|
+
["refundedAmount", getU64Decoder20()],
|
|
1672
|
+
["refundedPlatformFee", getU64Decoder20()],
|
|
1673
|
+
["refundedRewardPoolFee", getU64Decoder20()],
|
|
1674
|
+
["refundedCreatorFee", getU64Decoder20()],
|
|
1681
1675
|
["timestamp", getI64Decoder15()]
|
|
1682
1676
|
]);
|
|
1683
1677
|
}
|
|
1684
|
-
function
|
|
1678
|
+
function getStuckVouchClosedEventCodec() {
|
|
1685
1679
|
return combineCodec41(
|
|
1686
|
-
|
|
1687
|
-
|
|
1680
|
+
getStuckVouchClosedEventEncoder(),
|
|
1681
|
+
getStuckVouchClosedEventDecoder()
|
|
1688
1682
|
);
|
|
1689
1683
|
}
|
|
1690
1684
|
|
|
1691
|
-
// src/generated/types/
|
|
1685
|
+
// src/generated/types/timestamp.ts
|
|
1692
1686
|
import {
|
|
1693
1687
|
combineCodec as combineCodec42,
|
|
1688
|
+
getStructDecoder as getStructDecoder36,
|
|
1689
|
+
getStructEncoder as getStructEncoder36,
|
|
1690
|
+
getU64Decoder as getU64Decoder21,
|
|
1691
|
+
getU64Encoder as getU64Encoder21
|
|
1692
|
+
} from "@solana/kit";
|
|
1693
|
+
function getTimestampEncoder() {
|
|
1694
|
+
return getStructEncoder36([["timestamp", getU64Encoder21()]]);
|
|
1695
|
+
}
|
|
1696
|
+
function getTimestampDecoder() {
|
|
1697
|
+
return getStructDecoder36([["timestamp", getU64Decoder21()]]);
|
|
1698
|
+
}
|
|
1699
|
+
function getTimestampCodec() {
|
|
1700
|
+
return combineCodec42(getTimestampEncoder(), getTimestampDecoder());
|
|
1701
|
+
}
|
|
1702
|
+
|
|
1703
|
+
// src/generated/types/updateAuthorityChangedEvent.ts
|
|
1704
|
+
import {
|
|
1705
|
+
combineCodec as combineCodec43,
|
|
1694
1706
|
getAddressDecoder as getAddressDecoder22,
|
|
1695
1707
|
getAddressEncoder as getAddressEncoder22,
|
|
1696
1708
|
getI64Decoder as getI64Decoder16,
|
|
1697
1709
|
getI64Encoder as getI64Encoder16,
|
|
1698
|
-
getStructDecoder as
|
|
1699
|
-
getStructEncoder as
|
|
1700
|
-
getU32Decoder as getU32Decoder10,
|
|
1701
|
-
getU32Encoder as getU32Encoder10
|
|
1710
|
+
getStructDecoder as getStructDecoder37,
|
|
1711
|
+
getStructEncoder as getStructEncoder37
|
|
1702
1712
|
} from "@solana/kit";
|
|
1703
|
-
function
|
|
1704
|
-
return
|
|
1705
|
-
["
|
|
1706
|
-
["
|
|
1707
|
-
["
|
|
1708
|
-
["accountId", getU32Encoder10()],
|
|
1713
|
+
function getUpdateAuthorityChangedEventEncoder() {
|
|
1714
|
+
return getStructEncoder37([
|
|
1715
|
+
["platformConfig", getAddressEncoder22()],
|
|
1716
|
+
["oldValue", getAddressEncoder22()],
|
|
1717
|
+
["newValue", getAddressEncoder22()],
|
|
1709
1718
|
["timestamp", getI64Encoder16()]
|
|
1710
1719
|
]);
|
|
1711
1720
|
}
|
|
1712
|
-
function
|
|
1713
|
-
return
|
|
1714
|
-
["
|
|
1715
|
-
["
|
|
1716
|
-
["
|
|
1717
|
-
["accountId", getU32Decoder10()],
|
|
1721
|
+
function getUpdateAuthorityChangedEventDecoder() {
|
|
1722
|
+
return getStructDecoder37([
|
|
1723
|
+
["platformConfig", getAddressDecoder22()],
|
|
1724
|
+
["oldValue", getAddressDecoder22()],
|
|
1725
|
+
["newValue", getAddressDecoder22()],
|
|
1718
1726
|
["timestamp", getI64Decoder16()]
|
|
1719
1727
|
]);
|
|
1720
1728
|
}
|
|
1721
|
-
function
|
|
1722
|
-
return
|
|
1723
|
-
|
|
1724
|
-
|
|
1729
|
+
function getUpdateAuthorityChangedEventCodec() {
|
|
1730
|
+
return combineCodec43(
|
|
1731
|
+
getUpdateAuthorityChangedEventEncoder(),
|
|
1732
|
+
getUpdateAuthorityChangedEventDecoder()
|
|
1725
1733
|
);
|
|
1726
1734
|
}
|
|
1727
1735
|
|
|
1728
|
-
// src/generated/types/
|
|
1736
|
+
// src/generated/types/updatePlatformParameters.ts
|
|
1729
1737
|
import {
|
|
1730
|
-
combineCodec as
|
|
1738
|
+
combineCodec as combineCodec44,
|
|
1731
1739
|
getAddressDecoder as getAddressDecoder23,
|
|
1732
1740
|
getAddressEncoder as getAddressEncoder23,
|
|
1741
|
+
getOptionDecoder as getOptionDecoder4,
|
|
1742
|
+
getOptionEncoder as getOptionEncoder4,
|
|
1743
|
+
getStructDecoder as getStructDecoder38,
|
|
1744
|
+
getStructEncoder as getStructEncoder38,
|
|
1745
|
+
getU16Decoder as getU16Decoder6,
|
|
1746
|
+
getU16Encoder as getU16Encoder6,
|
|
1747
|
+
getU64Decoder as getU64Decoder22,
|
|
1748
|
+
getU64Encoder as getU64Encoder22
|
|
1749
|
+
} from "@solana/kit";
|
|
1750
|
+
function getUpdatePlatformParametersEncoder() {
|
|
1751
|
+
return getStructEncoder38([
|
|
1752
|
+
["platformFeeBp", getOptionEncoder4(getU16Encoder6())],
|
|
1753
|
+
["rewardPoolFeeBp", getOptionEncoder4(getU16Encoder6())],
|
|
1754
|
+
["creatorFeeBp", getOptionEncoder4(getU16Encoder6())],
|
|
1755
|
+
["revealAuthority", getOptionEncoder4(getAddressEncoder23())],
|
|
1756
|
+
["minTimeToVouchSeconds", getOptionEncoder4(getU64Encoder22())],
|
|
1757
|
+
["revealPeriodSeconds", getOptionEncoder4(getU64Encoder22())],
|
|
1758
|
+
["marketResolutionDeadlineSeconds", getOptionEncoder4(getU64Encoder22())]
|
|
1759
|
+
]);
|
|
1760
|
+
}
|
|
1761
|
+
function getUpdatePlatformParametersDecoder() {
|
|
1762
|
+
return getStructDecoder38([
|
|
1763
|
+
["platformFeeBp", getOptionDecoder4(getU16Decoder6())],
|
|
1764
|
+
["rewardPoolFeeBp", getOptionDecoder4(getU16Decoder6())],
|
|
1765
|
+
["creatorFeeBp", getOptionDecoder4(getU16Decoder6())],
|
|
1766
|
+
["revealAuthority", getOptionDecoder4(getAddressDecoder23())],
|
|
1767
|
+
["minTimeToVouchSeconds", getOptionDecoder4(getU64Decoder22())],
|
|
1768
|
+
["revealPeriodSeconds", getOptionDecoder4(getU64Decoder22())],
|
|
1769
|
+
["marketResolutionDeadlineSeconds", getOptionDecoder4(getU64Decoder22())]
|
|
1770
|
+
]);
|
|
1771
|
+
}
|
|
1772
|
+
function getUpdatePlatformParametersCodec() {
|
|
1773
|
+
return combineCodec44(
|
|
1774
|
+
getUpdatePlatformParametersEncoder(),
|
|
1775
|
+
getUpdatePlatformParametersDecoder()
|
|
1776
|
+
);
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
// src/generated/types/utilityPubkeys.ts
|
|
1780
|
+
import {
|
|
1781
|
+
combineCodec as combineCodec45,
|
|
1733
1782
|
getArrayDecoder as getArrayDecoder10,
|
|
1734
1783
|
getArrayEncoder as getArrayEncoder10,
|
|
1784
|
+
getStructDecoder as getStructDecoder39,
|
|
1785
|
+
getStructEncoder as getStructEncoder39,
|
|
1786
|
+
getU8Decoder as getU8Decoder14,
|
|
1787
|
+
getU8Encoder as getU8Encoder14
|
|
1788
|
+
} from "@solana/kit";
|
|
1789
|
+
function getUtilityPubkeysEncoder() {
|
|
1790
|
+
return getStructEncoder39([
|
|
1791
|
+
["x25519Pubkey", getArrayEncoder10(getU8Encoder14(), { size: 32 })],
|
|
1792
|
+
["ed25519VerifyingKey", getArrayEncoder10(getU8Encoder14(), { size: 32 })],
|
|
1793
|
+
["elgamalPubkey", getArrayEncoder10(getU8Encoder14(), { size: 32 })],
|
|
1794
|
+
["pubkeyValidityProof", getArrayEncoder10(getU8Encoder14(), { size: 64 })]
|
|
1795
|
+
]);
|
|
1796
|
+
}
|
|
1797
|
+
function getUtilityPubkeysDecoder() {
|
|
1798
|
+
return getStructDecoder39([
|
|
1799
|
+
["x25519Pubkey", getArrayDecoder10(getU8Decoder14(), { size: 32 })],
|
|
1800
|
+
["ed25519VerifyingKey", getArrayDecoder10(getU8Decoder14(), { size: 32 })],
|
|
1801
|
+
["elgamalPubkey", getArrayDecoder10(getU8Decoder14(), { size: 32 })],
|
|
1802
|
+
["pubkeyValidityProof", getArrayDecoder10(getU8Decoder14(), { size: 64 })]
|
|
1803
|
+
]);
|
|
1804
|
+
}
|
|
1805
|
+
function getUtilityPubkeysCodec() {
|
|
1806
|
+
return combineCodec45(getUtilityPubkeysEncoder(), getUtilityPubkeysDecoder());
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
// src/generated/types/vouchAccountClosedEvent.ts
|
|
1810
|
+
import {
|
|
1811
|
+
combineCodec as combineCodec46,
|
|
1812
|
+
getAddressDecoder as getAddressDecoder24,
|
|
1813
|
+
getAddressEncoder as getAddressEncoder24,
|
|
1735
1814
|
getI64Decoder as getI64Decoder17,
|
|
1736
1815
|
getI64Encoder as getI64Encoder17,
|
|
1737
|
-
|
|
1738
|
-
|
|
1816
|
+
getOptionDecoder as getOptionDecoder5,
|
|
1817
|
+
getOptionEncoder as getOptionEncoder5,
|
|
1818
|
+
getStructDecoder as getStructDecoder40,
|
|
1819
|
+
getStructEncoder as getStructEncoder40,
|
|
1820
|
+
getU32Decoder as getU32Decoder10,
|
|
1821
|
+
getU32Encoder as getU32Encoder10,
|
|
1822
|
+
getU64Decoder as getU64Decoder23,
|
|
1823
|
+
getU64Encoder as getU64Encoder23
|
|
1824
|
+
} from "@solana/kit";
|
|
1825
|
+
function getVouchAccountClosedEventEncoder() {
|
|
1826
|
+
return getStructEncoder40([
|
|
1827
|
+
["owner", getAddressEncoder24()],
|
|
1828
|
+
["market", getAddressEncoder24()],
|
|
1829
|
+
["vouchAccount", getAddressEncoder24()],
|
|
1830
|
+
["vouchAccountId", getU32Encoder10()],
|
|
1831
|
+
["optionId", getOptionEncoder5(getU64Encoder23())],
|
|
1832
|
+
["vouchAmount", getU64Encoder23()],
|
|
1833
|
+
["feeRefund", getU64Encoder23()],
|
|
1834
|
+
["vouchedAtTimestamp", getU64Encoder23()],
|
|
1835
|
+
["vouchingWindowEnd", getU64Encoder23()],
|
|
1836
|
+
["score", getU64Encoder23()],
|
|
1837
|
+
["timestamp", getI64Encoder17()]
|
|
1838
|
+
]);
|
|
1839
|
+
}
|
|
1840
|
+
function getVouchAccountClosedEventDecoder() {
|
|
1841
|
+
return getStructDecoder40([
|
|
1842
|
+
["owner", getAddressDecoder24()],
|
|
1843
|
+
["market", getAddressDecoder24()],
|
|
1844
|
+
["vouchAccount", getAddressDecoder24()],
|
|
1845
|
+
["vouchAccountId", getU32Decoder10()],
|
|
1846
|
+
["optionId", getOptionDecoder5(getU64Decoder23())],
|
|
1847
|
+
["vouchAmount", getU64Decoder23()],
|
|
1848
|
+
["feeRefund", getU64Decoder23()],
|
|
1849
|
+
["vouchedAtTimestamp", getU64Decoder23()],
|
|
1850
|
+
["vouchingWindowEnd", getU64Decoder23()],
|
|
1851
|
+
["score", getU64Decoder23()],
|
|
1852
|
+
["timestamp", getI64Decoder17()]
|
|
1853
|
+
]);
|
|
1854
|
+
}
|
|
1855
|
+
function getVouchAccountClosedEventCodec() {
|
|
1856
|
+
return combineCodec46(
|
|
1857
|
+
getVouchAccountClosedEventEncoder(),
|
|
1858
|
+
getVouchAccountClosedEventDecoder()
|
|
1859
|
+
);
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
// src/generated/types/vouchAccountInitializedEvent.ts
|
|
1863
|
+
import {
|
|
1864
|
+
combineCodec as combineCodec47,
|
|
1865
|
+
getAddressDecoder as getAddressDecoder25,
|
|
1866
|
+
getAddressEncoder as getAddressEncoder25,
|
|
1867
|
+
getI64Decoder as getI64Decoder18,
|
|
1868
|
+
getI64Encoder as getI64Encoder18,
|
|
1869
|
+
getStructDecoder as getStructDecoder41,
|
|
1870
|
+
getStructEncoder as getStructEncoder41,
|
|
1871
|
+
getU32Decoder as getU32Decoder11,
|
|
1872
|
+
getU32Encoder as getU32Encoder11
|
|
1873
|
+
} from "@solana/kit";
|
|
1874
|
+
function getVouchAccountInitializedEventEncoder() {
|
|
1875
|
+
return getStructEncoder41([
|
|
1876
|
+
["vouchAccount", getAddressEncoder25()],
|
|
1877
|
+
["owner", getAddressEncoder25()],
|
|
1878
|
+
["market", getAddressEncoder25()],
|
|
1879
|
+
["accountId", getU32Encoder11()],
|
|
1880
|
+
["timestamp", getI64Encoder18()]
|
|
1881
|
+
]);
|
|
1882
|
+
}
|
|
1883
|
+
function getVouchAccountInitializedEventDecoder() {
|
|
1884
|
+
return getStructDecoder41([
|
|
1885
|
+
["vouchAccount", getAddressDecoder25()],
|
|
1886
|
+
["owner", getAddressDecoder25()],
|
|
1887
|
+
["market", getAddressDecoder25()],
|
|
1888
|
+
["accountId", getU32Decoder11()],
|
|
1889
|
+
["timestamp", getI64Decoder18()]
|
|
1890
|
+
]);
|
|
1891
|
+
}
|
|
1892
|
+
function getVouchAccountInitializedEventCodec() {
|
|
1893
|
+
return combineCodec47(
|
|
1894
|
+
getVouchAccountInitializedEventEncoder(),
|
|
1895
|
+
getVouchAccountInitializedEventDecoder()
|
|
1896
|
+
);
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
// src/generated/types/vouchedEvent.ts
|
|
1900
|
+
import {
|
|
1901
|
+
combineCodec as combineCodec48,
|
|
1902
|
+
getAddressDecoder as getAddressDecoder26,
|
|
1903
|
+
getAddressEncoder as getAddressEncoder26,
|
|
1904
|
+
getArrayDecoder as getArrayDecoder11,
|
|
1905
|
+
getArrayEncoder as getArrayEncoder11,
|
|
1906
|
+
getI64Decoder as getI64Decoder19,
|
|
1907
|
+
getI64Encoder as getI64Encoder19,
|
|
1908
|
+
getStructDecoder as getStructDecoder42,
|
|
1909
|
+
getStructEncoder as getStructEncoder42,
|
|
1739
1910
|
getU128Decoder as getU128Decoder2,
|
|
1740
1911
|
getU128Encoder as getU128Encoder2,
|
|
1741
|
-
getU32Decoder as
|
|
1742
|
-
getU32Encoder as
|
|
1743
|
-
getU64Decoder as
|
|
1744
|
-
getU64Encoder as
|
|
1745
|
-
getU8Decoder as
|
|
1746
|
-
getU8Encoder as
|
|
1912
|
+
getU32Decoder as getU32Decoder12,
|
|
1913
|
+
getU32Encoder as getU32Encoder12,
|
|
1914
|
+
getU64Decoder as getU64Decoder24,
|
|
1915
|
+
getU64Encoder as getU64Encoder24,
|
|
1916
|
+
getU8Decoder as getU8Decoder15,
|
|
1917
|
+
getU8Encoder as getU8Encoder15
|
|
1747
1918
|
} from "@solana/kit";
|
|
1748
|
-
function
|
|
1749
|
-
return
|
|
1750
|
-
["user",
|
|
1751
|
-
["market",
|
|
1752
|
-
["
|
|
1753
|
-
["
|
|
1754
|
-
["
|
|
1755
|
-
["
|
|
1919
|
+
function getVouchedEventEncoder() {
|
|
1920
|
+
return getStructEncoder42([
|
|
1921
|
+
["user", getAddressEncoder26()],
|
|
1922
|
+
["market", getAddressEncoder26()],
|
|
1923
|
+
["vouchAccount", getAddressEncoder26()],
|
|
1924
|
+
["vouchAccountId", getU32Encoder12()],
|
|
1925
|
+
["vouchEncryptedOption", getArrayEncoder11(getU8Encoder15(), { size: 32 })],
|
|
1926
|
+
["vouchStateNonce", getU128Encoder2()],
|
|
1756
1927
|
[
|
|
1757
|
-
"
|
|
1758
|
-
|
|
1928
|
+
"vouchEncryptedOptionDisclosure",
|
|
1929
|
+
getArrayEncoder11(getU8Encoder15(), { size: 32 })
|
|
1759
1930
|
],
|
|
1760
|
-
["
|
|
1761
|
-
["amount",
|
|
1762
|
-
["timestamp",
|
|
1931
|
+
["vouchStateDisclosureNonce", getU128Encoder2()],
|
|
1932
|
+
["amount", getU64Encoder24()],
|
|
1933
|
+
["timestamp", getI64Encoder19()]
|
|
1763
1934
|
]);
|
|
1764
1935
|
}
|
|
1765
|
-
function
|
|
1766
|
-
return
|
|
1767
|
-
["user",
|
|
1768
|
-
["market",
|
|
1769
|
-
["
|
|
1770
|
-
["
|
|
1771
|
-
["
|
|
1772
|
-
["
|
|
1936
|
+
function getVouchedEventDecoder() {
|
|
1937
|
+
return getStructDecoder42([
|
|
1938
|
+
["user", getAddressDecoder26()],
|
|
1939
|
+
["market", getAddressDecoder26()],
|
|
1940
|
+
["vouchAccount", getAddressDecoder26()],
|
|
1941
|
+
["vouchAccountId", getU32Decoder12()],
|
|
1942
|
+
["vouchEncryptedOption", getArrayDecoder11(getU8Decoder15(), { size: 32 })],
|
|
1943
|
+
["vouchStateNonce", getU128Decoder2()],
|
|
1773
1944
|
[
|
|
1774
|
-
"
|
|
1775
|
-
|
|
1945
|
+
"vouchEncryptedOptionDisclosure",
|
|
1946
|
+
getArrayDecoder11(getU8Decoder15(), { size: 32 })
|
|
1776
1947
|
],
|
|
1777
|
-
["
|
|
1778
|
-
["amount",
|
|
1779
|
-
["timestamp",
|
|
1948
|
+
["vouchStateDisclosureNonce", getU128Decoder2()],
|
|
1949
|
+
["amount", getU64Decoder24()],
|
|
1950
|
+
["timestamp", getI64Decoder19()]
|
|
1780
1951
|
]);
|
|
1781
1952
|
}
|
|
1782
|
-
function
|
|
1783
|
-
return
|
|
1953
|
+
function getVouchedEventCodec() {
|
|
1954
|
+
return combineCodec48(getVouchedEventEncoder(), getVouchedEventDecoder());
|
|
1784
1955
|
}
|
|
1785
1956
|
|
|
1786
|
-
// src/generated/types/
|
|
1957
|
+
// src/generated/types/vouchOutput.ts
|
|
1787
1958
|
import {
|
|
1788
|
-
combineCodec as
|
|
1789
|
-
getStructDecoder as
|
|
1790
|
-
getStructEncoder as
|
|
1959
|
+
combineCodec as combineCodec49,
|
|
1960
|
+
getStructDecoder as getStructDecoder43,
|
|
1961
|
+
getStructEncoder as getStructEncoder43
|
|
1791
1962
|
} from "@solana/kit";
|
|
1792
|
-
function
|
|
1793
|
-
return
|
|
1963
|
+
function getVouchOutputEncoder() {
|
|
1964
|
+
return getStructEncoder43([["field0", getVouchOutputStruct0Encoder()]]);
|
|
1794
1965
|
}
|
|
1795
|
-
function
|
|
1796
|
-
return
|
|
1966
|
+
function getVouchOutputDecoder() {
|
|
1967
|
+
return getStructDecoder43([["field0", getVouchOutputStruct0Decoder()]]);
|
|
1797
1968
|
}
|
|
1798
|
-
function
|
|
1799
|
-
return
|
|
1969
|
+
function getVouchOutputCodec() {
|
|
1970
|
+
return combineCodec49(getVouchOutputEncoder(), getVouchOutputDecoder());
|
|
1800
1971
|
}
|
|
1801
1972
|
|
|
1802
|
-
// src/generated/types/
|
|
1973
|
+
// src/generated/types/vouchOutputStruct0.ts
|
|
1803
1974
|
import {
|
|
1804
|
-
combineCodec as
|
|
1805
|
-
getArrayDecoder as
|
|
1806
|
-
getArrayEncoder as
|
|
1807
|
-
getStructDecoder as
|
|
1808
|
-
getStructEncoder as
|
|
1975
|
+
combineCodec as combineCodec50,
|
|
1976
|
+
getArrayDecoder as getArrayDecoder12,
|
|
1977
|
+
getArrayEncoder as getArrayEncoder12,
|
|
1978
|
+
getStructDecoder as getStructDecoder44,
|
|
1979
|
+
getStructEncoder as getStructEncoder44,
|
|
1809
1980
|
getU128Decoder as getU128Decoder3,
|
|
1810
1981
|
getU128Encoder as getU128Encoder3,
|
|
1811
|
-
getU8Decoder as
|
|
1812
|
-
getU8Encoder as
|
|
1982
|
+
getU8Decoder as getU8Decoder16,
|
|
1983
|
+
getU8Encoder as getU8Encoder16
|
|
1813
1984
|
} from "@solana/kit";
|
|
1814
|
-
function
|
|
1815
|
-
return
|
|
1985
|
+
function getVouchOutputStruct0Encoder() {
|
|
1986
|
+
return getStructEncoder44([
|
|
1816
1987
|
[
|
|
1817
1988
|
"field0",
|
|
1818
|
-
|
|
1819
|
-
["encryptionKey",
|
|
1989
|
+
getStructEncoder44([
|
|
1990
|
+
["encryptionKey", getArrayEncoder12(getU8Encoder16(), { size: 32 })],
|
|
1820
1991
|
["nonce", getU128Encoder3()],
|
|
1821
1992
|
[
|
|
1822
1993
|
"ciphertexts",
|
|
1823
|
-
|
|
1994
|
+
getArrayEncoder12(getArrayEncoder12(getU8Encoder16(), { size: 32 }), {
|
|
1824
1995
|
size: 1
|
|
1825
1996
|
})
|
|
1826
1997
|
]
|
|
@@ -1828,12 +1999,12 @@ function getStakeOutputStruct0Encoder() {
|
|
|
1828
1999
|
],
|
|
1829
2000
|
[
|
|
1830
2001
|
"field1",
|
|
1831
|
-
|
|
1832
|
-
["encryptionKey",
|
|
2002
|
+
getStructEncoder44([
|
|
2003
|
+
["encryptionKey", getArrayEncoder12(getU8Encoder16(), { size: 32 })],
|
|
1833
2004
|
["nonce", getU128Encoder3()],
|
|
1834
2005
|
[
|
|
1835
2006
|
"ciphertexts",
|
|
1836
|
-
|
|
2007
|
+
getArrayEncoder12(getArrayEncoder12(getU8Encoder16(), { size: 32 }), {
|
|
1837
2008
|
size: 1
|
|
1838
2009
|
})
|
|
1839
2010
|
]
|
|
@@ -1841,16 +2012,16 @@ function getStakeOutputStruct0Encoder() {
|
|
|
1841
2012
|
]
|
|
1842
2013
|
]);
|
|
1843
2014
|
}
|
|
1844
|
-
function
|
|
1845
|
-
return
|
|
2015
|
+
function getVouchOutputStruct0Decoder() {
|
|
2016
|
+
return getStructDecoder44([
|
|
1846
2017
|
[
|
|
1847
2018
|
"field0",
|
|
1848
|
-
|
|
1849
|
-
["encryptionKey",
|
|
2019
|
+
getStructDecoder44([
|
|
2020
|
+
["encryptionKey", getArrayDecoder12(getU8Decoder16(), { size: 32 })],
|
|
1850
2021
|
["nonce", getU128Decoder3()],
|
|
1851
2022
|
[
|
|
1852
2023
|
"ciphertexts",
|
|
1853
|
-
|
|
2024
|
+
getArrayDecoder12(getArrayDecoder12(getU8Decoder16(), { size: 32 }), {
|
|
1854
2025
|
size: 1
|
|
1855
2026
|
})
|
|
1856
2027
|
]
|
|
@@ -1858,12 +2029,12 @@ function getStakeOutputStruct0Decoder() {
|
|
|
1858
2029
|
],
|
|
1859
2030
|
[
|
|
1860
2031
|
"field1",
|
|
1861
|
-
|
|
1862
|
-
["encryptionKey",
|
|
2032
|
+
getStructDecoder44([
|
|
2033
|
+
["encryptionKey", getArrayDecoder12(getU8Decoder16(), { size: 32 })],
|
|
1863
2034
|
["nonce", getU128Decoder3()],
|
|
1864
2035
|
[
|
|
1865
2036
|
"ciphertexts",
|
|
1866
|
-
|
|
2037
|
+
getArrayDecoder12(getArrayDecoder12(getU8Decoder16(), { size: 32 }), {
|
|
1867
2038
|
size: 1
|
|
1868
2039
|
})
|
|
1869
2040
|
]
|
|
@@ -1871,309 +2042,141 @@ function getStakeOutputStruct0Decoder() {
|
|
|
1871
2042
|
]
|
|
1872
2043
|
]);
|
|
1873
2044
|
}
|
|
1874
|
-
function
|
|
1875
|
-
return
|
|
1876
|
-
|
|
1877
|
-
|
|
2045
|
+
function getVouchOutputStruct0Codec() {
|
|
2046
|
+
return combineCodec50(
|
|
2047
|
+
getVouchOutputStruct0Encoder(),
|
|
2048
|
+
getVouchOutputStruct0Decoder()
|
|
1878
2049
|
);
|
|
1879
2050
|
}
|
|
1880
2051
|
|
|
1881
|
-
// src/generated/types/
|
|
2052
|
+
// src/generated/types/vouchParameters.ts
|
|
1882
2053
|
import {
|
|
1883
|
-
combineCodec as
|
|
1884
|
-
getArrayDecoder as
|
|
1885
|
-
getArrayEncoder as
|
|
1886
|
-
getStructDecoder as
|
|
1887
|
-
getStructEncoder as
|
|
2054
|
+
combineCodec as combineCodec51,
|
|
2055
|
+
getArrayDecoder as getArrayDecoder13,
|
|
2056
|
+
getArrayEncoder as getArrayEncoder13,
|
|
2057
|
+
getStructDecoder as getStructDecoder45,
|
|
2058
|
+
getStructEncoder as getStructEncoder45,
|
|
1888
2059
|
getU128Decoder as getU128Decoder4,
|
|
1889
2060
|
getU128Encoder as getU128Encoder4,
|
|
1890
|
-
getU32Decoder as
|
|
1891
|
-
getU32Encoder as
|
|
1892
|
-
getU64Decoder as
|
|
1893
|
-
getU64Encoder as
|
|
1894
|
-
getU8Decoder as
|
|
1895
|
-
getU8Encoder as
|
|
2061
|
+
getU32Decoder as getU32Decoder13,
|
|
2062
|
+
getU32Encoder as getU32Encoder13,
|
|
2063
|
+
getU64Decoder as getU64Decoder25,
|
|
2064
|
+
getU64Encoder as getU64Encoder25,
|
|
2065
|
+
getU8Decoder as getU8Decoder17,
|
|
2066
|
+
getU8Encoder as getU8Encoder17
|
|
1896
2067
|
} from "@solana/kit";
|
|
1897
|
-
function
|
|
1898
|
-
return
|
|
1899
|
-
["computationOffset",
|
|
1900
|
-
["
|
|
1901
|
-
["amount",
|
|
1902
|
-
["selectedOptionCiphertext",
|
|
2068
|
+
function getVouchParametersEncoder() {
|
|
2069
|
+
return getStructEncoder45([
|
|
2070
|
+
["computationOffset", getU64Encoder25()],
|
|
2071
|
+
["vouchAccountId", getU32Encoder13()],
|
|
2072
|
+
["amount", getU64Encoder25()],
|
|
2073
|
+
["selectedOptionCiphertext", getArrayEncoder13(getU8Encoder17(), { size: 32 })],
|
|
1903
2074
|
["inputNonce", getU128Encoder4()],
|
|
1904
2075
|
["authorizedReaderNonce", getU128Encoder4()],
|
|
1905
|
-
["userPubkey",
|
|
2076
|
+
["userPubkey", getArrayEncoder13(getU8Encoder17(), { size: 32 })],
|
|
1906
2077
|
["stateNonce", getU128Encoder4()]
|
|
1907
2078
|
]);
|
|
1908
2079
|
}
|
|
1909
|
-
function
|
|
1910
|
-
return
|
|
1911
|
-
["computationOffset",
|
|
1912
|
-
["
|
|
1913
|
-
["amount",
|
|
1914
|
-
["selectedOptionCiphertext",
|
|
2080
|
+
function getVouchParametersDecoder() {
|
|
2081
|
+
return getStructDecoder45([
|
|
2082
|
+
["computationOffset", getU64Decoder25()],
|
|
2083
|
+
["vouchAccountId", getU32Decoder13()],
|
|
2084
|
+
["amount", getU64Decoder25()],
|
|
2085
|
+
["selectedOptionCiphertext", getArrayDecoder13(getU8Decoder17(), { size: 32 })],
|
|
1915
2086
|
["inputNonce", getU128Decoder4()],
|
|
1916
2087
|
["authorizedReaderNonce", getU128Decoder4()],
|
|
1917
|
-
["userPubkey",
|
|
2088
|
+
["userPubkey", getArrayDecoder13(getU8Decoder17(), { size: 32 })],
|
|
1918
2089
|
["stateNonce", getU128Decoder4()]
|
|
1919
2090
|
]);
|
|
1920
2091
|
}
|
|
1921
|
-
function
|
|
1922
|
-
return
|
|
2092
|
+
function getVouchParametersCodec() {
|
|
2093
|
+
return combineCodec51(getVouchParametersEncoder(), getVouchParametersDecoder());
|
|
1923
2094
|
}
|
|
1924
2095
|
|
|
1925
|
-
// src/generated/types/
|
|
2096
|
+
// src/generated/types/vouchRevealedEvent.ts
|
|
1926
2097
|
import {
|
|
1927
|
-
combineCodec as
|
|
1928
|
-
getAddressDecoder as
|
|
1929
|
-
getAddressEncoder as
|
|
1930
|
-
getI64Decoder as
|
|
1931
|
-
getI64Encoder as
|
|
1932
|
-
getStructDecoder as
|
|
1933
|
-
getStructEncoder as
|
|
1934
|
-
getU32Decoder as
|
|
1935
|
-
getU32Encoder as
|
|
1936
|
-
getU64Decoder as
|
|
1937
|
-
getU64Encoder as
|
|
2098
|
+
combineCodec as combineCodec52,
|
|
2099
|
+
getAddressDecoder as getAddressDecoder27,
|
|
2100
|
+
getAddressEncoder as getAddressEncoder27,
|
|
2101
|
+
getI64Decoder as getI64Decoder20,
|
|
2102
|
+
getI64Encoder as getI64Encoder20,
|
|
2103
|
+
getStructDecoder as getStructDecoder46,
|
|
2104
|
+
getStructEncoder as getStructEncoder46,
|
|
2105
|
+
getU32Decoder as getU32Decoder14,
|
|
2106
|
+
getU32Encoder as getU32Encoder14,
|
|
2107
|
+
getU64Decoder as getU64Decoder26,
|
|
2108
|
+
getU64Encoder as getU64Encoder26
|
|
1938
2109
|
} from "@solana/kit";
|
|
1939
|
-
function
|
|
1940
|
-
return
|
|
1941
|
-
["user",
|
|
1942
|
-
["market",
|
|
1943
|
-
["
|
|
1944
|
-
["
|
|
1945
|
-
["
|
|
1946
|
-
["selectedOption",
|
|
1947
|
-
["timestamp",
|
|
2110
|
+
function getVouchRevealedEventEncoder() {
|
|
2111
|
+
return getStructEncoder46([
|
|
2112
|
+
["user", getAddressEncoder27()],
|
|
2113
|
+
["market", getAddressEncoder27()],
|
|
2114
|
+
["vouchAccount", getAddressEncoder27()],
|
|
2115
|
+
["vouchAccountId", getU32Encoder14()],
|
|
2116
|
+
["vouchAmount", getU64Encoder26()],
|
|
2117
|
+
["selectedOption", getU64Encoder26()],
|
|
2118
|
+
["timestamp", getI64Encoder20()]
|
|
1948
2119
|
]);
|
|
1949
2120
|
}
|
|
1950
|
-
function
|
|
1951
|
-
return
|
|
1952
|
-
["user",
|
|
1953
|
-
["market",
|
|
1954
|
-
["
|
|
1955
|
-
["
|
|
1956
|
-
["
|
|
1957
|
-
["selectedOption",
|
|
1958
|
-
["timestamp",
|
|
2121
|
+
function getVouchRevealedEventDecoder() {
|
|
2122
|
+
return getStructDecoder46([
|
|
2123
|
+
["user", getAddressDecoder27()],
|
|
2124
|
+
["market", getAddressDecoder27()],
|
|
2125
|
+
["vouchAccount", getAddressDecoder27()],
|
|
2126
|
+
["vouchAccountId", getU32Decoder14()],
|
|
2127
|
+
["vouchAmount", getU64Decoder26()],
|
|
2128
|
+
["selectedOption", getU64Decoder26()],
|
|
2129
|
+
["timestamp", getI64Decoder20()]
|
|
1959
2130
|
]);
|
|
1960
2131
|
}
|
|
1961
|
-
function
|
|
1962
|
-
return
|
|
1963
|
-
|
|
1964
|
-
|
|
2132
|
+
function getVouchRevealedEventCodec() {
|
|
2133
|
+
return combineCodec52(
|
|
2134
|
+
getVouchRevealedEventEncoder(),
|
|
2135
|
+
getVouchRevealedEventDecoder()
|
|
1965
2136
|
);
|
|
1966
2137
|
}
|
|
1967
2138
|
|
|
1968
|
-
// src/generated/types/
|
|
2139
|
+
// src/generated/types/vouchWithdrawnEvent.ts
|
|
1969
2140
|
import {
|
|
1970
|
-
combineCodec as
|
|
1971
|
-
getAddressDecoder as
|
|
1972
|
-
getAddressEncoder as
|
|
1973
|
-
getI64Decoder as
|
|
1974
|
-
getI64Encoder as
|
|
1975
|
-
getStructDecoder as
|
|
1976
|
-
getStructEncoder as
|
|
1977
|
-
getU32Decoder as
|
|
1978
|
-
getU32Encoder as
|
|
1979
|
-
getU64Decoder as
|
|
1980
|
-
getU64Encoder as
|
|
2141
|
+
combineCodec as combineCodec53,
|
|
2142
|
+
getAddressDecoder as getAddressDecoder28,
|
|
2143
|
+
getAddressEncoder as getAddressEncoder28,
|
|
2144
|
+
getI64Decoder as getI64Decoder21,
|
|
2145
|
+
getI64Encoder as getI64Encoder21,
|
|
2146
|
+
getStructDecoder as getStructDecoder47,
|
|
2147
|
+
getStructEncoder as getStructEncoder47,
|
|
2148
|
+
getU32Decoder as getU32Decoder15,
|
|
2149
|
+
getU32Encoder as getU32Encoder15,
|
|
2150
|
+
getU64Decoder as getU64Decoder27,
|
|
2151
|
+
getU64Encoder as getU64Encoder27
|
|
1981
2152
|
} from "@solana/kit";
|
|
1982
|
-
function
|
|
1983
|
-
return
|
|
1984
|
-
["owner",
|
|
1985
|
-
["market",
|
|
1986
|
-
["
|
|
1987
|
-
["
|
|
1988
|
-
["
|
|
1989
|
-
["
|
|
1990
|
-
["refundedRewardPoolFee", getU64Encoder24()],
|
|
1991
|
-
["refundedCreatorFee", getU64Encoder24()],
|
|
1992
|
-
["timestamp", getI64Encoder19()]
|
|
2153
|
+
function getVouchWithdrawnEventEncoder() {
|
|
2154
|
+
return getStructEncoder47([
|
|
2155
|
+
["owner", getAddressEncoder28()],
|
|
2156
|
+
["market", getAddressEncoder28()],
|
|
2157
|
+
["vouchAccount", getAddressEncoder28()],
|
|
2158
|
+
["vouchAccountId", getU32Encoder15()],
|
|
2159
|
+
["amount", getU64Encoder27()],
|
|
2160
|
+
["timestamp", getI64Encoder21()]
|
|
1993
2161
|
]);
|
|
1994
2162
|
}
|
|
1995
|
-
function
|
|
1996
|
-
return
|
|
1997
|
-
["owner",
|
|
1998
|
-
["market",
|
|
1999
|
-
["
|
|
2000
|
-
["
|
|
2001
|
-
["
|
|
2002
|
-
["refundedPlatformFee", getU64Decoder24()],
|
|
2003
|
-
["refundedRewardPoolFee", getU64Decoder24()],
|
|
2004
|
-
["refundedCreatorFee", getU64Decoder24()],
|
|
2005
|
-
["timestamp", getI64Decoder19()]
|
|
2006
|
-
]);
|
|
2007
|
-
}
|
|
2008
|
-
function getStuckStakeClosedEventCodec() {
|
|
2009
|
-
return combineCodec48(
|
|
2010
|
-
getStuckStakeClosedEventEncoder(),
|
|
2011
|
-
getStuckStakeClosedEventDecoder()
|
|
2012
|
-
);
|
|
2013
|
-
}
|
|
2014
|
-
|
|
2015
|
-
// src/generated/types/timestamp.ts
|
|
2016
|
-
import {
|
|
2017
|
-
combineCodec as combineCodec49,
|
|
2018
|
-
getStructDecoder as getStructDecoder43,
|
|
2019
|
-
getStructEncoder as getStructEncoder43,
|
|
2020
|
-
getU64Decoder as getU64Decoder25,
|
|
2021
|
-
getU64Encoder as getU64Encoder25
|
|
2022
|
-
} from "@solana/kit";
|
|
2023
|
-
function getTimestampEncoder() {
|
|
2024
|
-
return getStructEncoder43([["timestamp", getU64Encoder25()]]);
|
|
2025
|
-
}
|
|
2026
|
-
function getTimestampDecoder() {
|
|
2027
|
-
return getStructDecoder43([["timestamp", getU64Decoder25()]]);
|
|
2028
|
-
}
|
|
2029
|
-
function getTimestampCodec() {
|
|
2030
|
-
return combineCodec49(getTimestampEncoder(), getTimestampDecoder());
|
|
2031
|
-
}
|
|
2032
|
-
|
|
2033
|
-
// src/generated/types/unstakedEvent.ts
|
|
2034
|
-
import {
|
|
2035
|
-
combineCodec as combineCodec50,
|
|
2036
|
-
getAddressDecoder as getAddressDecoder26,
|
|
2037
|
-
getAddressEncoder as getAddressEncoder26,
|
|
2038
|
-
getI64Decoder as getI64Decoder20,
|
|
2039
|
-
getI64Encoder as getI64Encoder20,
|
|
2040
|
-
getStructDecoder as getStructDecoder44,
|
|
2041
|
-
getStructEncoder as getStructEncoder44,
|
|
2042
|
-
getU32Decoder as getU32Decoder15,
|
|
2043
|
-
getU32Encoder as getU32Encoder15,
|
|
2044
|
-
getU64Decoder as getU64Decoder26,
|
|
2045
|
-
getU64Encoder as getU64Encoder26
|
|
2046
|
-
} from "@solana/kit";
|
|
2047
|
-
function getUnstakedEventEncoder() {
|
|
2048
|
-
return getStructEncoder44([
|
|
2049
|
-
["owner", getAddressEncoder26()],
|
|
2050
|
-
["market", getAddressEncoder26()],
|
|
2051
|
-
["stakeAccount", getAddressEncoder26()],
|
|
2052
|
-
["stakeAccountId", getU32Encoder15()],
|
|
2053
|
-
["amount", getU64Encoder26()],
|
|
2054
|
-
["timestamp", getI64Encoder20()]
|
|
2055
|
-
]);
|
|
2056
|
-
}
|
|
2057
|
-
function getUnstakedEventDecoder() {
|
|
2058
|
-
return getStructDecoder44([
|
|
2059
|
-
["owner", getAddressDecoder26()],
|
|
2060
|
-
["market", getAddressDecoder26()],
|
|
2061
|
-
["stakeAccount", getAddressDecoder26()],
|
|
2062
|
-
["stakeAccountId", getU32Decoder15()],
|
|
2063
|
-
["amount", getU64Decoder26()],
|
|
2064
|
-
["timestamp", getI64Decoder20()]
|
|
2065
|
-
]);
|
|
2066
|
-
}
|
|
2067
|
-
function getUnstakedEventCodec() {
|
|
2068
|
-
return combineCodec50(getUnstakedEventEncoder(), getUnstakedEventDecoder());
|
|
2069
|
-
}
|
|
2070
|
-
|
|
2071
|
-
// src/generated/types/updateAuthorityChangedEvent.ts
|
|
2072
|
-
import {
|
|
2073
|
-
combineCodec as combineCodec51,
|
|
2074
|
-
getAddressDecoder as getAddressDecoder27,
|
|
2075
|
-
getAddressEncoder as getAddressEncoder27,
|
|
2076
|
-
getI64Decoder as getI64Decoder21,
|
|
2077
|
-
getI64Encoder as getI64Encoder21,
|
|
2078
|
-
getStructDecoder as getStructDecoder45,
|
|
2079
|
-
getStructEncoder as getStructEncoder45
|
|
2080
|
-
} from "@solana/kit";
|
|
2081
|
-
function getUpdateAuthorityChangedEventEncoder() {
|
|
2082
|
-
return getStructEncoder45([
|
|
2083
|
-
["platformConfig", getAddressEncoder27()],
|
|
2084
|
-
["oldValue", getAddressEncoder27()],
|
|
2085
|
-
["newValue", getAddressEncoder27()],
|
|
2086
|
-
["timestamp", getI64Encoder21()]
|
|
2087
|
-
]);
|
|
2088
|
-
}
|
|
2089
|
-
function getUpdateAuthorityChangedEventDecoder() {
|
|
2090
|
-
return getStructDecoder45([
|
|
2091
|
-
["platformConfig", getAddressDecoder27()],
|
|
2092
|
-
["oldValue", getAddressDecoder27()],
|
|
2093
|
-
["newValue", getAddressDecoder27()],
|
|
2163
|
+
function getVouchWithdrawnEventDecoder() {
|
|
2164
|
+
return getStructDecoder47([
|
|
2165
|
+
["owner", getAddressDecoder28()],
|
|
2166
|
+
["market", getAddressDecoder28()],
|
|
2167
|
+
["vouchAccount", getAddressDecoder28()],
|
|
2168
|
+
["vouchAccountId", getU32Decoder15()],
|
|
2169
|
+
["amount", getU64Decoder27()],
|
|
2094
2170
|
["timestamp", getI64Decoder21()]
|
|
2095
2171
|
]);
|
|
2096
2172
|
}
|
|
2097
|
-
function
|
|
2098
|
-
return
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
);
|
|
2102
|
-
}
|
|
2103
|
-
|
|
2104
|
-
// src/generated/types/updatePlatformParameters.ts
|
|
2105
|
-
import {
|
|
2106
|
-
combineCodec as combineCodec52,
|
|
2107
|
-
getAddressDecoder as getAddressDecoder28,
|
|
2108
|
-
getAddressEncoder as getAddressEncoder28,
|
|
2109
|
-
getOptionDecoder as getOptionDecoder5,
|
|
2110
|
-
getOptionEncoder as getOptionEncoder5,
|
|
2111
|
-
getStructDecoder as getStructDecoder46,
|
|
2112
|
-
getStructEncoder as getStructEncoder46,
|
|
2113
|
-
getU16Decoder as getU16Decoder6,
|
|
2114
|
-
getU16Encoder as getU16Encoder6,
|
|
2115
|
-
getU64Decoder as getU64Decoder27,
|
|
2116
|
-
getU64Encoder as getU64Encoder27
|
|
2117
|
-
} from "@solana/kit";
|
|
2118
|
-
function getUpdatePlatformParametersEncoder() {
|
|
2119
|
-
return getStructEncoder46([
|
|
2120
|
-
["platformFeeBp", getOptionEncoder5(getU16Encoder6())],
|
|
2121
|
-
["rewardPoolFeeBp", getOptionEncoder5(getU16Encoder6())],
|
|
2122
|
-
["creatorFeeBp", getOptionEncoder5(getU16Encoder6())],
|
|
2123
|
-
["revealAuthority", getOptionEncoder5(getAddressEncoder28())],
|
|
2124
|
-
["minTimeToStakeSeconds", getOptionEncoder5(getU64Encoder27())],
|
|
2125
|
-
["revealPeriodSeconds", getOptionEncoder5(getU64Encoder27())],
|
|
2126
|
-
["marketResolutionDeadlineSeconds", getOptionEncoder5(getU64Encoder27())]
|
|
2127
|
-
]);
|
|
2128
|
-
}
|
|
2129
|
-
function getUpdatePlatformParametersDecoder() {
|
|
2130
|
-
return getStructDecoder46([
|
|
2131
|
-
["platformFeeBp", getOptionDecoder5(getU16Decoder6())],
|
|
2132
|
-
["rewardPoolFeeBp", getOptionDecoder5(getU16Decoder6())],
|
|
2133
|
-
["creatorFeeBp", getOptionDecoder5(getU16Decoder6())],
|
|
2134
|
-
["revealAuthority", getOptionDecoder5(getAddressDecoder28())],
|
|
2135
|
-
["minTimeToStakeSeconds", getOptionDecoder5(getU64Decoder27())],
|
|
2136
|
-
["revealPeriodSeconds", getOptionDecoder5(getU64Decoder27())],
|
|
2137
|
-
["marketResolutionDeadlineSeconds", getOptionDecoder5(getU64Decoder27())]
|
|
2138
|
-
]);
|
|
2139
|
-
}
|
|
2140
|
-
function getUpdatePlatformParametersCodec() {
|
|
2141
|
-
return combineCodec52(
|
|
2142
|
-
getUpdatePlatformParametersEncoder(),
|
|
2143
|
-
getUpdatePlatformParametersDecoder()
|
|
2173
|
+
function getVouchWithdrawnEventCodec() {
|
|
2174
|
+
return combineCodec53(
|
|
2175
|
+
getVouchWithdrawnEventEncoder(),
|
|
2176
|
+
getVouchWithdrawnEventDecoder()
|
|
2144
2177
|
);
|
|
2145
2178
|
}
|
|
2146
2179
|
|
|
2147
|
-
// src/generated/types/utilityPubkeys.ts
|
|
2148
|
-
import {
|
|
2149
|
-
combineCodec as combineCodec53,
|
|
2150
|
-
getArrayDecoder as getArrayDecoder13,
|
|
2151
|
-
getArrayEncoder as getArrayEncoder13,
|
|
2152
|
-
getStructDecoder as getStructDecoder47,
|
|
2153
|
-
getStructEncoder as getStructEncoder47,
|
|
2154
|
-
getU8Decoder as getU8Decoder17,
|
|
2155
|
-
getU8Encoder as getU8Encoder17
|
|
2156
|
-
} from "@solana/kit";
|
|
2157
|
-
function getUtilityPubkeysEncoder() {
|
|
2158
|
-
return getStructEncoder47([
|
|
2159
|
-
["x25519Pubkey", getArrayEncoder13(getU8Encoder17(), { size: 32 })],
|
|
2160
|
-
["ed25519VerifyingKey", getArrayEncoder13(getU8Encoder17(), { size: 32 })],
|
|
2161
|
-
["elgamalPubkey", getArrayEncoder13(getU8Encoder17(), { size: 32 })],
|
|
2162
|
-
["pubkeyValidityProof", getArrayEncoder13(getU8Encoder17(), { size: 64 })]
|
|
2163
|
-
]);
|
|
2164
|
-
}
|
|
2165
|
-
function getUtilityPubkeysDecoder() {
|
|
2166
|
-
return getStructDecoder47([
|
|
2167
|
-
["x25519Pubkey", getArrayDecoder13(getU8Decoder17(), { size: 32 })],
|
|
2168
|
-
["ed25519VerifyingKey", getArrayDecoder13(getU8Decoder17(), { size: 32 })],
|
|
2169
|
-
["elgamalPubkey", getArrayDecoder13(getU8Decoder17(), { size: 32 })],
|
|
2170
|
-
["pubkeyValidityProof", getArrayDecoder13(getU8Decoder17(), { size: 64 })]
|
|
2171
|
-
]);
|
|
2172
|
-
}
|
|
2173
|
-
function getUtilityPubkeysCodec() {
|
|
2174
|
-
return combineCodec53(getUtilityPubkeysEncoder(), getUtilityPubkeysDecoder());
|
|
2175
|
-
}
|
|
2176
|
-
|
|
2177
2180
|
// src/generated/types/winningOptionSetEvent.ts
|
|
2178
2181
|
import {
|
|
2179
2182
|
combineCodec as combineCodec54,
|
|
@@ -2242,7 +2245,7 @@ function getOpportunityMarketEncoder() {
|
|
|
2242
2245
|
["index", getU64Encoder29()],
|
|
2243
2246
|
["totalOptions", getU64Encoder29()],
|
|
2244
2247
|
["platform", getAddressEncoder30()],
|
|
2245
|
-
["
|
|
2248
|
+
["vouchingWindowEnd", getOptionEncoder6(getU64Encoder29())],
|
|
2246
2249
|
["resolvedAtTimestamp", getOptionEncoder6(getU64Encoder29())],
|
|
2247
2250
|
["winningOptionAllocation", getU16Encoder8()],
|
|
2248
2251
|
["winningOptionActiveBp", getU16Encoder8()],
|
|
@@ -2259,7 +2262,7 @@ function getOpportunityMarketEncoder() {
|
|
|
2259
2262
|
["marketResolutionDeadlineSeconds", getU64Encoder29()],
|
|
2260
2263
|
["revealPeriodSeconds", getU64Encoder29()],
|
|
2261
2264
|
["revealEnded", getBooleanEncoder4()],
|
|
2262
|
-
["
|
|
2265
|
+
["minVouchAmount", getU64Encoder29()]
|
|
2263
2266
|
]),
|
|
2264
2267
|
(value) => ({ ...value, discriminator: OPPORTUNITY_MARKET_DISCRIMINATOR })
|
|
2265
2268
|
);
|
|
@@ -2272,7 +2275,7 @@ function getOpportunityMarketDecoder() {
|
|
|
2272
2275
|
["index", getU64Decoder29()],
|
|
2273
2276
|
["totalOptions", getU64Decoder29()],
|
|
2274
2277
|
["platform", getAddressDecoder30()],
|
|
2275
|
-
["
|
|
2278
|
+
["vouchingWindowEnd", getOptionDecoder6(getU64Decoder29())],
|
|
2276
2279
|
["resolvedAtTimestamp", getOptionDecoder6(getU64Decoder29())],
|
|
2277
2280
|
["winningOptionAllocation", getU16Decoder8()],
|
|
2278
2281
|
["winningOptionActiveBp", getU16Decoder8()],
|
|
@@ -2289,7 +2292,7 @@ function getOpportunityMarketDecoder() {
|
|
|
2289
2292
|
["marketResolutionDeadlineSeconds", getU64Decoder29()],
|
|
2290
2293
|
["revealPeriodSeconds", getU64Decoder29()],
|
|
2291
2294
|
["revealEnded", getBooleanDecoder4()],
|
|
2292
|
-
["
|
|
2295
|
+
["minVouchAmount", getU64Decoder29()]
|
|
2293
2296
|
]);
|
|
2294
2297
|
}
|
|
2295
2298
|
function getOpportunityMarketCodec() {
|
|
@@ -2380,7 +2383,7 @@ function getOpportunityMarketOptionEncoder() {
|
|
|
2380
2383
|
["id", getU64Encoder30()],
|
|
2381
2384
|
["creator", getAddressEncoder31()],
|
|
2382
2385
|
["createdAt", getU64Encoder30()],
|
|
2383
|
-
["
|
|
2386
|
+
["unclaimedGrossVouch", getU64Encoder30()],
|
|
2384
2387
|
["totalScore", getU128Encoder5()],
|
|
2385
2388
|
["rewardBp", getU16Encoder9()],
|
|
2386
2389
|
["includedInActiveBp", getBooleanEncoder5()]
|
|
@@ -2398,7 +2401,7 @@ function getOpportunityMarketOptionDecoder() {
|
|
|
2398
2401
|
["id", getU64Decoder30()],
|
|
2399
2402
|
["creator", getAddressDecoder31()],
|
|
2400
2403
|
["createdAt", getU64Decoder30()],
|
|
2401
|
-
["
|
|
2404
|
+
["unclaimedGrossVouch", getU64Decoder30()],
|
|
2402
2405
|
["totalScore", getU128Decoder5()],
|
|
2403
2406
|
["rewardBp", getU16Decoder9()],
|
|
2404
2407
|
["includedInActiveBp", getBooleanDecoder5()]
|
|
@@ -2600,7 +2603,7 @@ function getPlatformConfigEncoder() {
|
|
|
2600
2603
|
["feeClaimAuthority", getAddressEncoder33()],
|
|
2601
2604
|
["feeRates", getFeeRatesEncoder()],
|
|
2602
2605
|
["marketResolutionDeadlineSeconds", getU64Encoder32()],
|
|
2603
|
-
["
|
|
2606
|
+
["minTimeToVouchSeconds", getU64Encoder32()],
|
|
2604
2607
|
["revealAuthority", getAddressEncoder33()],
|
|
2605
2608
|
["revealPeriodSeconds", getU64Encoder32()]
|
|
2606
2609
|
]),
|
|
@@ -2616,7 +2619,7 @@ function getPlatformConfigDecoder() {
|
|
|
2616
2619
|
["feeClaimAuthority", getAddressDecoder33()],
|
|
2617
2620
|
["feeRates", getFeeRatesDecoder()],
|
|
2618
2621
|
["marketResolutionDeadlineSeconds", getU64Decoder32()],
|
|
2619
|
-
["
|
|
2622
|
+
["minTimeToVouchSeconds", getU64Decoder32()],
|
|
2620
2623
|
["revealAuthority", getAddressDecoder33()],
|
|
2621
2624
|
["revealPeriodSeconds", getU64Decoder32()]
|
|
2622
2625
|
]);
|
|
@@ -2655,7 +2658,7 @@ async function fetchAllMaybePlatformConfig(rpc, addresses, config) {
|
|
|
2655
2658
|
);
|
|
2656
2659
|
}
|
|
2657
2660
|
|
|
2658
|
-
// src/generated/accounts/
|
|
2661
|
+
// src/generated/accounts/vouchAccount.ts
|
|
2659
2662
|
import {
|
|
2660
2663
|
assertAccountExists as assertAccountExists7,
|
|
2661
2664
|
assertAccountsExist as assertAccountsExist7,
|
|
@@ -2687,22 +2690,22 @@ import {
|
|
|
2687
2690
|
getU8Encoder as getU8Encoder22,
|
|
2688
2691
|
transformEncoder as transformEncoder7
|
|
2689
2692
|
} from "@solana/kit";
|
|
2690
|
-
var
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2693
|
+
var VOUCH_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
2694
|
+
165,
|
|
2695
|
+
230,
|
|
2696
|
+
131,
|
|
2697
|
+
136,
|
|
2698
|
+
184,
|
|
2699
|
+
203,
|
|
2700
|
+
66,
|
|
2701
|
+
136
|
|
2699
2702
|
]);
|
|
2700
|
-
function
|
|
2703
|
+
function getVouchAccountDiscriminatorBytes() {
|
|
2701
2704
|
return fixEncoderSize7(getBytesEncoder7(), 8).encode(
|
|
2702
|
-
|
|
2705
|
+
VOUCH_ACCOUNT_DISCRIMINATOR
|
|
2703
2706
|
);
|
|
2704
2707
|
}
|
|
2705
|
-
function
|
|
2708
|
+
function getVouchAccountEncoder() {
|
|
2706
2709
|
return transformEncoder7(
|
|
2707
2710
|
getStructEncoder53([
|
|
2708
2711
|
["discriminator", fixEncoderSize7(getBytesEncoder7(), 8)],
|
|
@@ -2717,21 +2720,22 @@ function getStakeAccountEncoder() {
|
|
|
2717
2720
|
getArrayEncoder15(getU8Encoder22(), { size: 32 })
|
|
2718
2721
|
],
|
|
2719
2722
|
["stateNonceDisclosure", getU128Encoder6()],
|
|
2720
|
-
["
|
|
2721
|
-
["
|
|
2723
|
+
["vouchedAtTimestamp", getOptionEncoder7(getU64Encoder33())],
|
|
2724
|
+
["vouchWithdrawnAtTimestamp", getOptionEncoder7(getU64Encoder33())],
|
|
2722
2725
|
["amount", getU64Encoder33()],
|
|
2723
2726
|
["collectedFees", getCollectedFeesEncoder()],
|
|
2724
2727
|
["revealedOption", getOptionEncoder7(getU64Encoder33())],
|
|
2725
2728
|
["score", getOptionEncoder7(getU64Encoder33())],
|
|
2726
2729
|
["rewardsClaimed", getBooleanEncoder6()],
|
|
2727
2730
|
["id", getU32Encoder17()],
|
|
2728
|
-
["
|
|
2729
|
-
["pendingRevealComputation", getOptionEncoder7(getAddressEncoder34())]
|
|
2731
|
+
["pendingVouchComputation", getOptionEncoder7(getAddressEncoder34())],
|
|
2732
|
+
["pendingRevealComputation", getOptionEncoder7(getAddressEncoder34())],
|
|
2733
|
+
["lastRevealVouchAt", getU64Encoder33()]
|
|
2730
2734
|
]),
|
|
2731
|
-
(value) => ({ ...value, discriminator:
|
|
2735
|
+
(value) => ({ ...value, discriminator: VOUCH_ACCOUNT_DISCRIMINATOR })
|
|
2732
2736
|
);
|
|
2733
2737
|
}
|
|
2734
|
-
function
|
|
2738
|
+
function getVouchAccountDecoder() {
|
|
2735
2739
|
return getStructDecoder53([
|
|
2736
2740
|
["discriminator", fixDecoderSize7(getBytesDecoder7(), 8)],
|
|
2737
2741
|
["encryptedOption", getArrayDecoder15(getU8Decoder22(), { size: 32 })],
|
|
@@ -2745,44 +2749,45 @@ function getStakeAccountDecoder() {
|
|
|
2745
2749
|
getArrayDecoder15(getU8Decoder22(), { size: 32 })
|
|
2746
2750
|
],
|
|
2747
2751
|
["stateNonceDisclosure", getU128Decoder6()],
|
|
2748
|
-
["
|
|
2749
|
-
["
|
|
2752
|
+
["vouchedAtTimestamp", getOptionDecoder7(getU64Decoder33())],
|
|
2753
|
+
["vouchWithdrawnAtTimestamp", getOptionDecoder7(getU64Decoder33())],
|
|
2750
2754
|
["amount", getU64Decoder33()],
|
|
2751
2755
|
["collectedFees", getCollectedFeesDecoder()],
|
|
2752
2756
|
["revealedOption", getOptionDecoder7(getU64Decoder33())],
|
|
2753
2757
|
["score", getOptionDecoder7(getU64Decoder33())],
|
|
2754
2758
|
["rewardsClaimed", getBooleanDecoder6()],
|
|
2755
2759
|
["id", getU32Decoder17()],
|
|
2756
|
-
["
|
|
2757
|
-
["pendingRevealComputation", getOptionDecoder7(getAddressDecoder34())]
|
|
2760
|
+
["pendingVouchComputation", getOptionDecoder7(getAddressDecoder34())],
|
|
2761
|
+
["pendingRevealComputation", getOptionDecoder7(getAddressDecoder34())],
|
|
2762
|
+
["lastRevealVouchAt", getU64Decoder33()]
|
|
2758
2763
|
]);
|
|
2759
2764
|
}
|
|
2760
|
-
function
|
|
2761
|
-
return combineCodec59(
|
|
2765
|
+
function getVouchAccountCodec() {
|
|
2766
|
+
return combineCodec59(getVouchAccountEncoder(), getVouchAccountDecoder());
|
|
2762
2767
|
}
|
|
2763
|
-
function
|
|
2768
|
+
function decodeVouchAccount(encodedAccount) {
|
|
2764
2769
|
return decodeAccount7(
|
|
2765
2770
|
encodedAccount,
|
|
2766
|
-
|
|
2771
|
+
getVouchAccountDecoder()
|
|
2767
2772
|
);
|
|
2768
2773
|
}
|
|
2769
|
-
async function
|
|
2770
|
-
const maybeAccount = await
|
|
2774
|
+
async function fetchVouchAccount(rpc, address3, config) {
|
|
2775
|
+
const maybeAccount = await fetchMaybeVouchAccount(rpc, address3, config);
|
|
2771
2776
|
assertAccountExists7(maybeAccount);
|
|
2772
2777
|
return maybeAccount;
|
|
2773
2778
|
}
|
|
2774
|
-
async function
|
|
2779
|
+
async function fetchMaybeVouchAccount(rpc, address3, config) {
|
|
2775
2780
|
const maybeAccount = await fetchEncodedAccount7(rpc, address3, config);
|
|
2776
|
-
return
|
|
2781
|
+
return decodeVouchAccount(maybeAccount);
|
|
2777
2782
|
}
|
|
2778
|
-
async function
|
|
2779
|
-
const maybeAccounts = await
|
|
2783
|
+
async function fetchAllVouchAccount(rpc, addresses, config) {
|
|
2784
|
+
const maybeAccounts = await fetchAllMaybeVouchAccount(rpc, addresses, config);
|
|
2780
2785
|
assertAccountsExist7(maybeAccounts);
|
|
2781
2786
|
return maybeAccounts;
|
|
2782
2787
|
}
|
|
2783
|
-
async function
|
|
2788
|
+
async function fetchAllMaybeVouchAccount(rpc, addresses, config) {
|
|
2784
2789
|
const maybeAccounts = await fetchEncodedAccounts7(rpc, addresses, config);
|
|
2785
|
-
return maybeAccounts.map((maybeAccount) =>
|
|
2790
|
+
return maybeAccounts.map((maybeAccount) => decodeVouchAccount(maybeAccount));
|
|
2786
2791
|
}
|
|
2787
2792
|
|
|
2788
2793
|
// src/generated/errors/opportunityMarket.ts
|
|
@@ -2804,7 +2809,7 @@ var OpportunityMarketAccount = /* @__PURE__ */ ((OpportunityMarketAccount2) => {
|
|
|
2804
2809
|
OpportunityMarketAccount2[OpportunityMarketAccount2["OpportunityMarketOption"] = 3] = "OpportunityMarketOption";
|
|
2805
2810
|
OpportunityMarketAccount2[OpportunityMarketAccount2["OpportunityMarketSponsor"] = 4] = "OpportunityMarketSponsor";
|
|
2806
2811
|
OpportunityMarketAccount2[OpportunityMarketAccount2["PlatformConfig"] = 5] = "PlatformConfig";
|
|
2807
|
-
OpportunityMarketAccount2[OpportunityMarketAccount2["
|
|
2812
|
+
OpportunityMarketAccount2[OpportunityMarketAccount2["VouchAccount"] = 6] = "VouchAccount";
|
|
2808
2813
|
return OpportunityMarketAccount2;
|
|
2809
2814
|
})(OpportunityMarketAccount || {});
|
|
2810
2815
|
function identifyOpportunityMarketAccount(account) {
|
|
@@ -2866,11 +2871,11 @@ function identifyOpportunityMarketAccount(account) {
|
|
|
2866
2871
|
if (containsBytes(
|
|
2867
2872
|
data,
|
|
2868
2873
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2869
|
-
new Uint8Array([
|
|
2874
|
+
new Uint8Array([165, 230, 131, 136, 184, 203, 66, 136])
|
|
2870
2875
|
),
|
|
2871
2876
|
0
|
|
2872
2877
|
)) {
|
|
2873
|
-
return 6 /*
|
|
2878
|
+
return 6 /* VouchAccount */;
|
|
2874
2879
|
}
|
|
2875
2880
|
throw new Error(
|
|
2876
2881
|
"The provided account could not be identified as a opportunityMarket account."
|
|
@@ -2883,29 +2888,29 @@ var OpportunityMarketInstruction = /* @__PURE__ */ ((OpportunityMarketInstructio
|
|
|
2883
2888
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["ClaimFees"] = 3] = "ClaimFees";
|
|
2884
2889
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["ClaimRewards"] = 4] = "ClaimRewards";
|
|
2885
2890
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["CloseOptionAccount"] = 5] = "CloseOptionAccount";
|
|
2886
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2887
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2888
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2891
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["CloseStuckVouchAccount"] = 6] = "CloseStuckVouchAccount";
|
|
2892
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["CloseUnrevealedVouchAccount"] = 7] = "CloseUnrevealedVouchAccount";
|
|
2893
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["CloseVouchAccount"] = 8] = "CloseVouchAccount";
|
|
2889
2894
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["CreateMarket"] = 9] = "CreateMarket";
|
|
2890
2895
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["EndRevealPeriod"] = 10] = "EndRevealPeriod";
|
|
2891
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2896
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["FinalizeRevealVouch"] = 11] = "FinalizeRevealVouch";
|
|
2892
2897
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["InitAllowedMint"] = 12] = "InitAllowedMint";
|
|
2893
2898
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["InitPlatformConfig"] = 13] = "InitPlatformConfig";
|
|
2894
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2899
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["InitVouchAccount"] = 14] = "InitVouchAccount";
|
|
2895
2900
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["OpenMarket"] = 15] = "OpenMarket";
|
|
2896
2901
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["ResolveMarket"] = 16] = "ResolveMarket";
|
|
2897
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2898
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2899
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2902
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["RevealVouch"] = 17] = "RevealVouch";
|
|
2903
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["RevealVouchCallback"] = 18] = "RevealVouchCallback";
|
|
2904
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["RevealVouchCompDef"] = 19] = "RevealVouchCompDef";
|
|
2900
2905
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["SetFeeClaimAuthority"] = 20] = "SetFeeClaimAuthority";
|
|
2901
2906
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["SetUpdateAuthority"] = 21] = "SetUpdateAuthority";
|
|
2902
2907
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["SetWinningOption"] = 22] = "SetWinningOption";
|
|
2903
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2904
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2905
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2906
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2907
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2908
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2908
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["UpdatePlatformConfig"] = 23] = "UpdatePlatformConfig";
|
|
2909
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["Vouch"] = 24] = "Vouch";
|
|
2910
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["VouchCallback"] = 25] = "VouchCallback";
|
|
2911
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["VouchCompDef"] = 26] = "VouchCompDef";
|
|
2912
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["WithdrawReward"] = 27] = "WithdrawReward";
|
|
2913
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["WithdrawVouch"] = 28] = "WithdrawVouch";
|
|
2909
2914
|
return OpportunityMarketInstruction2;
|
|
2910
2915
|
})(OpportunityMarketInstruction || {});
|
|
2911
2916
|
function identifyOpportunityMarketInstruction(instruction) {
|
|
@@ -2967,29 +2972,29 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2967
2972
|
if (containsBytes(
|
|
2968
2973
|
data,
|
|
2969
2974
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2970
|
-
new Uint8Array([
|
|
2975
|
+
new Uint8Array([27, 238, 197, 24, 57, 59, 252, 18])
|
|
2971
2976
|
),
|
|
2972
2977
|
0
|
|
2973
2978
|
)) {
|
|
2974
|
-
return 6 /*
|
|
2979
|
+
return 6 /* CloseStuckVouchAccount */;
|
|
2975
2980
|
}
|
|
2976
2981
|
if (containsBytes(
|
|
2977
2982
|
data,
|
|
2978
2983
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2979
|
-
new Uint8Array([
|
|
2984
|
+
new Uint8Array([192, 236, 224, 245, 5, 49, 188, 11])
|
|
2980
2985
|
),
|
|
2981
2986
|
0
|
|
2982
2987
|
)) {
|
|
2983
|
-
return 7 /*
|
|
2988
|
+
return 7 /* CloseUnrevealedVouchAccount */;
|
|
2984
2989
|
}
|
|
2985
2990
|
if (containsBytes(
|
|
2986
2991
|
data,
|
|
2987
2992
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2988
|
-
new Uint8Array([
|
|
2993
|
+
new Uint8Array([107, 196, 52, 68, 9, 214, 207, 109])
|
|
2989
2994
|
),
|
|
2990
2995
|
0
|
|
2991
2996
|
)) {
|
|
2992
|
-
return 8 /*
|
|
2997
|
+
return 8 /* CloseVouchAccount */;
|
|
2993
2998
|
}
|
|
2994
2999
|
if (containsBytes(
|
|
2995
3000
|
data,
|
|
@@ -3012,11 +3017,11 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
3012
3017
|
if (containsBytes(
|
|
3013
3018
|
data,
|
|
3014
3019
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
3015
|
-
new Uint8Array([
|
|
3020
|
+
new Uint8Array([1, 34, 40, 131, 236, 85, 1, 25])
|
|
3016
3021
|
),
|
|
3017
3022
|
0
|
|
3018
3023
|
)) {
|
|
3019
|
-
return 11 /*
|
|
3024
|
+
return 11 /* FinalizeRevealVouch */;
|
|
3020
3025
|
}
|
|
3021
3026
|
if (containsBytes(
|
|
3022
3027
|
data,
|
|
@@ -3039,11 +3044,11 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
3039
3044
|
if (containsBytes(
|
|
3040
3045
|
data,
|
|
3041
3046
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
3042
|
-
new Uint8Array([
|
|
3047
|
+
new Uint8Array([170, 190, 149, 246, 116, 216, 171, 230])
|
|
3043
3048
|
),
|
|
3044
3049
|
0
|
|
3045
3050
|
)) {
|
|
3046
|
-
return 14 /*
|
|
3051
|
+
return 14 /* InitVouchAccount */;
|
|
3047
3052
|
}
|
|
3048
3053
|
if (containsBytes(
|
|
3049
3054
|
data,
|
|
@@ -3066,29 +3071,29 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
3066
3071
|
if (containsBytes(
|
|
3067
3072
|
data,
|
|
3068
3073
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
3069
|
-
new Uint8Array([
|
|
3074
|
+
new Uint8Array([137, 238, 214, 30, 51, 142, 141, 105])
|
|
3070
3075
|
),
|
|
3071
3076
|
0
|
|
3072
3077
|
)) {
|
|
3073
|
-
return 17 /*
|
|
3078
|
+
return 17 /* RevealVouch */;
|
|
3074
3079
|
}
|
|
3075
3080
|
if (containsBytes(
|
|
3076
3081
|
data,
|
|
3077
3082
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
3078
|
-
new Uint8Array([
|
|
3083
|
+
new Uint8Array([251, 246, 6, 118, 139, 46, 136, 190])
|
|
3079
3084
|
),
|
|
3080
3085
|
0
|
|
3081
3086
|
)) {
|
|
3082
|
-
return 18 /*
|
|
3087
|
+
return 18 /* RevealVouchCallback */;
|
|
3083
3088
|
}
|
|
3084
3089
|
if (containsBytes(
|
|
3085
3090
|
data,
|
|
3086
3091
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
3087
|
-
new Uint8Array([
|
|
3092
|
+
new Uint8Array([176, 228, 5, 47, 19, 6, 243, 236])
|
|
3088
3093
|
),
|
|
3089
3094
|
0
|
|
3090
3095
|
)) {
|
|
3091
|
-
return 19 /*
|
|
3096
|
+
return 19 /* RevealVouchCompDef */;
|
|
3092
3097
|
}
|
|
3093
3098
|
if (containsBytes(
|
|
3094
3099
|
data,
|
|
@@ -3120,56 +3125,56 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
3120
3125
|
if (containsBytes(
|
|
3121
3126
|
data,
|
|
3122
3127
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
3123
|
-
new Uint8Array([
|
|
3128
|
+
new Uint8Array([195, 60, 76, 129, 146, 45, 67, 143])
|
|
3124
3129
|
),
|
|
3125
3130
|
0
|
|
3126
3131
|
)) {
|
|
3127
|
-
return 23 /*
|
|
3132
|
+
return 23 /* UpdatePlatformConfig */;
|
|
3128
3133
|
}
|
|
3129
3134
|
if (containsBytes(
|
|
3130
3135
|
data,
|
|
3131
3136
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
3132
|
-
new Uint8Array([
|
|
3137
|
+
new Uint8Array([87, 240, 8, 21, 219, 179, 242, 177])
|
|
3133
3138
|
),
|
|
3134
3139
|
0
|
|
3135
3140
|
)) {
|
|
3136
|
-
return 24 /*
|
|
3141
|
+
return 24 /* Vouch */;
|
|
3137
3142
|
}
|
|
3138
3143
|
if (containsBytes(
|
|
3139
3144
|
data,
|
|
3140
3145
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
3141
|
-
new Uint8Array([
|
|
3146
|
+
new Uint8Array([10, 0, 52, 15, 179, 148, 194, 135])
|
|
3142
3147
|
),
|
|
3143
3148
|
0
|
|
3144
3149
|
)) {
|
|
3145
|
-
return 25 /*
|
|
3150
|
+
return 25 /* VouchCallback */;
|
|
3146
3151
|
}
|
|
3147
3152
|
if (containsBytes(
|
|
3148
3153
|
data,
|
|
3149
3154
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
3150
|
-
new Uint8Array([
|
|
3155
|
+
new Uint8Array([138, 27, 95, 181, 9, 219, 232, 219])
|
|
3151
3156
|
),
|
|
3152
3157
|
0
|
|
3153
3158
|
)) {
|
|
3154
|
-
return 26 /*
|
|
3159
|
+
return 26 /* VouchCompDef */;
|
|
3155
3160
|
}
|
|
3156
3161
|
if (containsBytes(
|
|
3157
3162
|
data,
|
|
3158
3163
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
3159
|
-
new Uint8Array([
|
|
3164
|
+
new Uint8Array([191, 187, 176, 137, 9, 25, 187, 244])
|
|
3160
3165
|
),
|
|
3161
3166
|
0
|
|
3162
3167
|
)) {
|
|
3163
|
-
return 27 /*
|
|
3168
|
+
return 27 /* WithdrawReward */;
|
|
3164
3169
|
}
|
|
3165
3170
|
if (containsBytes(
|
|
3166
3171
|
data,
|
|
3167
3172
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
3168
|
-
new Uint8Array([
|
|
3173
|
+
new Uint8Array([201, 33, 64, 226, 252, 193, 27, 83])
|
|
3169
3174
|
),
|
|
3170
3175
|
0
|
|
3171
3176
|
)) {
|
|
3172
|
-
return 28 /*
|
|
3177
|
+
return 28 /* WithdrawVouch */;
|
|
3173
3178
|
}
|
|
3174
3179
|
throw new Error(
|
|
3175
3180
|
"The provided instruction could not be identified as a opportunityMarket instruction."
|
|
@@ -3182,20 +3187,20 @@ var OPPORTUNITY_MARKET_ERROR__INSUFFICIENT_BALANCE = 6001;
|
|
|
3182
3187
|
var OPPORTUNITY_MARKET_ERROR__INSUFFICIENT_REWARD_FUNDING = 6002;
|
|
3183
3188
|
var OPPORTUNITY_MARKET_ERROR__INVALID_PARAMETERS = 6003;
|
|
3184
3189
|
var OPPORTUNITY_MARKET_ERROR__INVALID_OPTION_ID = 6004;
|
|
3185
|
-
var
|
|
3190
|
+
var OPPORTUNITY_MARKET_ERROR__NO_VOUCH = 6005;
|
|
3186
3191
|
var OPPORTUNITY_MARKET_ERROR__WINNER_ALREADY_SELECTED = 6006;
|
|
3187
3192
|
var OPPORTUNITY_MARKET_ERROR__ALREADY_REVEALED = 6007;
|
|
3188
3193
|
var OPPORTUNITY_MARKET_ERROR__NOT_REVEALED = 6008;
|
|
3189
3194
|
var OPPORTUNITY_MARKET_ERROR__TALLY_ALREADY_INCREMENTED = 6009;
|
|
3190
3195
|
var OPPORTUNITY_MARKET_ERROR__OVERFLOW = 6010;
|
|
3191
3196
|
var OPPORTUNITY_MARKET_ERROR__INVALID_MINT = 6011;
|
|
3192
|
-
var
|
|
3193
|
-
var
|
|
3197
|
+
var OPPORTUNITY_MARKET_ERROR__ALREADY_VOUCH_WITHDRAWN = 6012;
|
|
3198
|
+
var OPPORTUNITY_MARKET_ERROR__ALREADY_VOUCHED = 6013;
|
|
3194
3199
|
var OPPORTUNITY_MARKET_ERROR__LOCKED = 6014;
|
|
3195
3200
|
var OPPORTUNITY_MARKET_ERROR__INVALID_ACCOUNT_STATE = 6015;
|
|
3196
3201
|
var OPPORTUNITY_MARKET_ERROR__NO_FEES_TO_CLAIM = 6016;
|
|
3197
|
-
var
|
|
3198
|
-
var
|
|
3202
|
+
var OPPORTUNITY_MARKET_ERROR__VOUCH_NOT_STUCK = 6017;
|
|
3203
|
+
var OPPORTUNITY_MARKET_ERROR__VOUCH_BELOW_MINIMUM = 6018;
|
|
3199
3204
|
var OPPORTUNITY_MARKET_ERROR__INVALID_FEE_RATES = 6019;
|
|
3200
3205
|
var OPPORTUNITY_MARKET_ERROR__OPTION_STILL_NEEDED = 6020;
|
|
3201
3206
|
var OPPORTUNITY_MARKET_ERROR__CREATOR_MISMATCH = 6021;
|
|
@@ -3206,9 +3211,9 @@ var OPPORTUNITY_MARKET_ERROR__WRONG_MARKET_PHASE = 6025;
|
|
|
3206
3211
|
var opportunityMarketErrorMessages;
|
|
3207
3212
|
if (true) {
|
|
3208
3213
|
opportunityMarketErrorMessages = {
|
|
3209
|
-
[OPPORTUNITY_MARKET_ERROR__ALREADY_REVEALED]: `
|
|
3210
|
-
[
|
|
3211
|
-
[
|
|
3214
|
+
[OPPORTUNITY_MARKET_ERROR__ALREADY_REVEALED]: `Vouch already revealed`,
|
|
3215
|
+
[OPPORTUNITY_MARKET_ERROR__ALREADY_VOUCHED]: `Already vouched for this vouch account`,
|
|
3216
|
+
[OPPORTUNITY_MARKET_ERROR__ALREADY_VOUCH_WITHDRAWN]: `Vouch already withdrawn`,
|
|
3212
3217
|
[OPPORTUNITY_MARKET_ERROR__CREATOR_MISMATCH]: `Creator mismatch`,
|
|
3213
3218
|
[OPPORTUNITY_MARKET_ERROR__INSUFFICIENT_BALANCE]: `Insufficient balance`,
|
|
3214
3219
|
[OPPORTUNITY_MARKET_ERROR__INSUFFICIENT_REWARD_FUNDING]: `Insufficient reward funding`,
|
|
@@ -3219,17 +3224,17 @@ if (true) {
|
|
|
3219
3224
|
[OPPORTUNITY_MARKET_ERROR__INVALID_PARAMETERS]: `Invalid parameters`,
|
|
3220
3225
|
[OPPORTUNITY_MARKET_ERROR__LOCKED]: `Account is locked`,
|
|
3221
3226
|
[OPPORTUNITY_MARKET_ERROR__NO_FEES_TO_CLAIM]: `No fees to claim`,
|
|
3222
|
-
[OPPORTUNITY_MARKET_ERROR__NO_FINALIZED_WINNING_OPTION]: `No winning option has a finalized
|
|
3227
|
+
[OPPORTUNITY_MARKET_ERROR__NO_FINALIZED_WINNING_OPTION]: `No winning option has a finalized vouch`,
|
|
3223
3228
|
[OPPORTUNITY_MARKET_ERROR__NO_REWARD_TO_CLAIM]: `No reward to claim`,
|
|
3224
|
-
[
|
|
3225
|
-
[
|
|
3229
|
+
[OPPORTUNITY_MARKET_ERROR__NOT_REVEALED]: `Vouch not yet revealed`,
|
|
3230
|
+
[OPPORTUNITY_MARKET_ERROR__NO_VOUCH]: `Vouch account has no recorded vouch`,
|
|
3226
3231
|
[OPPORTUNITY_MARKET_ERROR__OPTION_STILL_NEEDED]: `Option still needed`,
|
|
3227
3232
|
[OPPORTUNITY_MARKET_ERROR__OVERFLOW]: `Arithmetic overflow`,
|
|
3228
3233
|
[OPPORTUNITY_MARKET_ERROR__REWARD_ALREADY_CLAIMED]: `Reward already claimed`,
|
|
3229
|
-
[
|
|
3230
|
-
[OPPORTUNITY_MARKET_ERROR__STAKE_NOT_STUCK]: `Stake account is not in a stuck or failed state`,
|
|
3231
|
-
[OPPORTUNITY_MARKET_ERROR__TALLY_ALREADY_INCREMENTED]: `Tally already incremented for this stake account`,
|
|
3234
|
+
[OPPORTUNITY_MARKET_ERROR__TALLY_ALREADY_INCREMENTED]: `Tally already incremented for this vouch account`,
|
|
3232
3235
|
[OPPORTUNITY_MARKET_ERROR__UNAUTHORIZED]: `Unauthorized`,
|
|
3236
|
+
[OPPORTUNITY_MARKET_ERROR__VOUCH_BELOW_MINIMUM]: `Vouch amount is below the market minimum`,
|
|
3237
|
+
[OPPORTUNITY_MARKET_ERROR__VOUCH_NOT_STUCK]: `Vouch account is not in a stuck or failed state`,
|
|
3233
3238
|
[OPPORTUNITY_MARKET_ERROR__WINNER_ALREADY_SELECTED]: `Market winner already selected`,
|
|
3234
3239
|
[OPPORTUNITY_MARKET_ERROR__WRONG_MARKET_PHASE]: `Operation is not permitted in the current market phase`
|
|
3235
3240
|
};
|
|
@@ -3932,7 +3937,7 @@ async function getClaimRewardsInstructionAsync(input, config) {
|
|
|
3932
3937
|
const originalAccounts = {
|
|
3933
3938
|
owner: { value: input.owner ?? null, isWritable: true },
|
|
3934
3939
|
market: { value: input.market ?? null, isWritable: true },
|
|
3935
|
-
|
|
3940
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true },
|
|
3936
3941
|
option: { value: input.option ?? null, isWritable: true },
|
|
3937
3942
|
tokenMint: { value: input.tokenMint ?? null, isWritable: false },
|
|
3938
3943
|
marketTokenAta: { value: input.marketTokenAta ?? null, isWritable: true },
|
|
@@ -3958,7 +3963,7 @@ async function getClaimRewardsInstructionAsync(input, config) {
|
|
|
3958
3963
|
accounts: [
|
|
3959
3964
|
getAccountMeta(accounts.owner),
|
|
3960
3965
|
getAccountMeta(accounts.market),
|
|
3961
|
-
getAccountMeta(accounts.
|
|
3966
|
+
getAccountMeta(accounts.vouchAccount),
|
|
3962
3967
|
getAccountMeta(accounts.option),
|
|
3963
3968
|
getAccountMeta(accounts.tokenMint),
|
|
3964
3969
|
getAccountMeta(accounts.marketTokenAta),
|
|
@@ -3974,7 +3979,7 @@ function getClaimRewardsInstruction(input, config) {
|
|
|
3974
3979
|
const originalAccounts = {
|
|
3975
3980
|
owner: { value: input.owner ?? null, isWritable: true },
|
|
3976
3981
|
market: { value: input.market ?? null, isWritable: true },
|
|
3977
|
-
|
|
3982
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true },
|
|
3978
3983
|
option: { value: input.option ?? null, isWritable: true },
|
|
3979
3984
|
tokenMint: { value: input.tokenMint ?? null, isWritable: false },
|
|
3980
3985
|
marketTokenAta: { value: input.marketTokenAta ?? null, isWritable: true },
|
|
@@ -3990,7 +3995,7 @@ function getClaimRewardsInstruction(input, config) {
|
|
|
3990
3995
|
accounts: [
|
|
3991
3996
|
getAccountMeta(accounts.owner),
|
|
3992
3997
|
getAccountMeta(accounts.market),
|
|
3993
|
-
getAccountMeta(accounts.
|
|
3998
|
+
getAccountMeta(accounts.vouchAccount),
|
|
3994
3999
|
getAccountMeta(accounts.option),
|
|
3995
4000
|
getAccountMeta(accounts.tokenMint),
|
|
3996
4001
|
getAccountMeta(accounts.marketTokenAta),
|
|
@@ -4016,7 +4021,7 @@ function parseClaimRewardsInstruction(instruction) {
|
|
|
4016
4021
|
accounts: {
|
|
4017
4022
|
owner: getNextAccount(),
|
|
4018
4023
|
market: getNextAccount(),
|
|
4019
|
-
|
|
4024
|
+
vouchAccount: getNextAccount(),
|
|
4020
4025
|
option: getNextAccount(),
|
|
4021
4026
|
tokenMint: getNextAccount(),
|
|
4022
4027
|
marketTokenAta: getNextAccount(),
|
|
@@ -4173,7 +4178,7 @@ function parseCloseOptionAccountInstruction(instruction) {
|
|
|
4173
4178
|
};
|
|
4174
4179
|
}
|
|
4175
4180
|
|
|
4176
|
-
// src/generated/instructions/
|
|
4181
|
+
// src/generated/instructions/closeStuckVouchAccount.ts
|
|
4177
4182
|
import {
|
|
4178
4183
|
combineCodec as combineCodec66,
|
|
4179
4184
|
fixDecoderSize as fixDecoderSize14,
|
|
@@ -4184,57 +4189,93 @@ import {
|
|
|
4184
4189
|
getProgramDerivedAddress as getProgramDerivedAddress7,
|
|
4185
4190
|
getStructDecoder as getStructDecoder60,
|
|
4186
4191
|
getStructEncoder as getStructEncoder60,
|
|
4192
|
+
getU32Decoder as getU32Decoder18,
|
|
4193
|
+
getU32Encoder as getU32Encoder18,
|
|
4187
4194
|
transformEncoder as transformEncoder14
|
|
4188
4195
|
} from "@solana/kit";
|
|
4189
|
-
var
|
|
4190
|
-
|
|
4191
|
-
|
|
4196
|
+
var CLOSE_STUCK_VOUCH_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
4197
|
+
27,
|
|
4198
|
+
238,
|
|
4199
|
+
197,
|
|
4200
|
+
24,
|
|
4201
|
+
57,
|
|
4192
4202
|
59,
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
135,
|
|
4196
|
-
122,
|
|
4197
|
-
12
|
|
4203
|
+
252,
|
|
4204
|
+
18
|
|
4198
4205
|
]);
|
|
4199
|
-
function
|
|
4206
|
+
function getCloseStuckVouchAccountDiscriminatorBytes() {
|
|
4200
4207
|
return fixEncoderSize15(getBytesEncoder15(), 8).encode(
|
|
4201
|
-
|
|
4208
|
+
CLOSE_STUCK_VOUCH_ACCOUNT_DISCRIMINATOR
|
|
4202
4209
|
);
|
|
4203
4210
|
}
|
|
4204
|
-
function
|
|
4211
|
+
function getCloseStuckVouchAccountInstructionDataEncoder() {
|
|
4205
4212
|
return transformEncoder14(
|
|
4206
|
-
getStructEncoder60([
|
|
4207
|
-
|
|
4213
|
+
getStructEncoder60([
|
|
4214
|
+
["discriminator", fixEncoderSize15(getBytesEncoder15(), 8)],
|
|
4215
|
+
["vouchAccountId", getU32Encoder18()]
|
|
4216
|
+
]),
|
|
4217
|
+
(value) => ({
|
|
4218
|
+
...value,
|
|
4219
|
+
discriminator: CLOSE_STUCK_VOUCH_ACCOUNT_DISCRIMINATOR
|
|
4220
|
+
})
|
|
4208
4221
|
);
|
|
4209
4222
|
}
|
|
4210
|
-
function
|
|
4223
|
+
function getCloseStuckVouchAccountInstructionDataDecoder() {
|
|
4211
4224
|
return getStructDecoder60([
|
|
4212
|
-
["discriminator", fixDecoderSize14(getBytesDecoder14(), 8)]
|
|
4225
|
+
["discriminator", fixDecoderSize14(getBytesDecoder14(), 8)],
|
|
4226
|
+
["vouchAccountId", getU32Decoder18()]
|
|
4213
4227
|
]);
|
|
4214
4228
|
}
|
|
4215
|
-
function
|
|
4229
|
+
function getCloseStuckVouchAccountInstructionDataCodec() {
|
|
4216
4230
|
return combineCodec66(
|
|
4217
|
-
|
|
4218
|
-
|
|
4231
|
+
getCloseStuckVouchAccountInstructionDataEncoder(),
|
|
4232
|
+
getCloseStuckVouchAccountInstructionDataDecoder()
|
|
4219
4233
|
);
|
|
4220
4234
|
}
|
|
4221
|
-
async function
|
|
4235
|
+
async function getCloseStuckVouchAccountInstructionAsync(input, config) {
|
|
4222
4236
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
4223
4237
|
const originalAccounts = {
|
|
4224
|
-
|
|
4225
|
-
market: { value: input.market ?? null, isWritable:
|
|
4226
|
-
|
|
4227
|
-
option: { value: input.option ?? null, isWritable: true },
|
|
4238
|
+
signer: { value: input.signer ?? null, isWritable: true },
|
|
4239
|
+
market: { value: input.market ?? null, isWritable: false },
|
|
4240
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true },
|
|
4228
4241
|
tokenMint: { value: input.tokenMint ?? null, isWritable: false },
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
value: input.ownerTokenAccount ?? null,
|
|
4242
|
+
signerTokenAccount: {
|
|
4243
|
+
value: input.signerTokenAccount ?? null,
|
|
4232
4244
|
isWritable: true
|
|
4233
4245
|
},
|
|
4246
|
+
marketTokenAta: { value: input.marketTokenAta ?? null, isWritable: true },
|
|
4234
4247
|
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
4235
4248
|
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
4236
4249
|
};
|
|
4237
4250
|
const accounts = originalAccounts;
|
|
4251
|
+
const args = { ...input };
|
|
4252
|
+
if (!accounts.vouchAccount.value) {
|
|
4253
|
+
accounts.vouchAccount.value = await getProgramDerivedAddress7({
|
|
4254
|
+
programAddress,
|
|
4255
|
+
seeds: [
|
|
4256
|
+
getBytesEncoder15().encode(
|
|
4257
|
+
new Uint8Array([
|
|
4258
|
+
118,
|
|
4259
|
+
111,
|
|
4260
|
+
117,
|
|
4261
|
+
99,
|
|
4262
|
+
104,
|
|
4263
|
+
95,
|
|
4264
|
+
97,
|
|
4265
|
+
99,
|
|
4266
|
+
99,
|
|
4267
|
+
111,
|
|
4268
|
+
117,
|
|
4269
|
+
110,
|
|
4270
|
+
116
|
|
4271
|
+
])
|
|
4272
|
+
),
|
|
4273
|
+
getAddressEncoder41().encode(expectAddress(accounts.signer.value)),
|
|
4274
|
+
getAddressEncoder41().encode(expectAddress(accounts.market.value)),
|
|
4275
|
+
getU32Encoder18().encode(expectSome(args.vouchAccountId))
|
|
4276
|
+
]
|
|
4277
|
+
});
|
|
4278
|
+
}
|
|
4238
4279
|
if (!accounts.marketTokenAta.value) {
|
|
4239
4280
|
accounts.marketTokenAta.value = await getProgramDerivedAddress7({
|
|
4240
4281
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
@@ -4251,59 +4292,61 @@ async function getCloseStakeAccountInstructionAsync(input, config) {
|
|
|
4251
4292
|
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
4252
4293
|
return Object.freeze({
|
|
4253
4294
|
accounts: [
|
|
4254
|
-
getAccountMeta(accounts.
|
|
4295
|
+
getAccountMeta(accounts.signer),
|
|
4255
4296
|
getAccountMeta(accounts.market),
|
|
4256
|
-
getAccountMeta(accounts.
|
|
4257
|
-
getAccountMeta(accounts.option),
|
|
4297
|
+
getAccountMeta(accounts.vouchAccount),
|
|
4258
4298
|
getAccountMeta(accounts.tokenMint),
|
|
4299
|
+
getAccountMeta(accounts.signerTokenAccount),
|
|
4259
4300
|
getAccountMeta(accounts.marketTokenAta),
|
|
4260
|
-
getAccountMeta(accounts.ownerTokenAccount),
|
|
4261
4301
|
getAccountMeta(accounts.tokenProgram),
|
|
4262
4302
|
getAccountMeta(accounts.systemProgram)
|
|
4263
4303
|
],
|
|
4264
|
-
data:
|
|
4304
|
+
data: getCloseStuckVouchAccountInstructionDataEncoder().encode(
|
|
4305
|
+
args
|
|
4306
|
+
),
|
|
4265
4307
|
programAddress
|
|
4266
4308
|
});
|
|
4267
4309
|
}
|
|
4268
|
-
function
|
|
4310
|
+
function getCloseStuckVouchAccountInstruction(input, config) {
|
|
4269
4311
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
4270
4312
|
const originalAccounts = {
|
|
4271
|
-
|
|
4272
|
-
market: { value: input.market ?? null, isWritable:
|
|
4273
|
-
|
|
4274
|
-
option: { value: input.option ?? null, isWritable: true },
|
|
4313
|
+
signer: { value: input.signer ?? null, isWritable: true },
|
|
4314
|
+
market: { value: input.market ?? null, isWritable: false },
|
|
4315
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true },
|
|
4275
4316
|
tokenMint: { value: input.tokenMint ?? null, isWritable: false },
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
value: input.ownerTokenAccount ?? null,
|
|
4317
|
+
signerTokenAccount: {
|
|
4318
|
+
value: input.signerTokenAccount ?? null,
|
|
4279
4319
|
isWritable: true
|
|
4280
4320
|
},
|
|
4321
|
+
marketTokenAta: { value: input.marketTokenAta ?? null, isWritable: true },
|
|
4281
4322
|
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
4282
4323
|
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
4283
4324
|
};
|
|
4284
4325
|
const accounts = originalAccounts;
|
|
4326
|
+
const args = { ...input };
|
|
4285
4327
|
if (!accounts.systemProgram.value) {
|
|
4286
4328
|
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
4287
4329
|
}
|
|
4288
4330
|
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
4289
4331
|
return Object.freeze({
|
|
4290
4332
|
accounts: [
|
|
4291
|
-
getAccountMeta(accounts.
|
|
4333
|
+
getAccountMeta(accounts.signer),
|
|
4292
4334
|
getAccountMeta(accounts.market),
|
|
4293
|
-
getAccountMeta(accounts.
|
|
4294
|
-
getAccountMeta(accounts.option),
|
|
4335
|
+
getAccountMeta(accounts.vouchAccount),
|
|
4295
4336
|
getAccountMeta(accounts.tokenMint),
|
|
4337
|
+
getAccountMeta(accounts.signerTokenAccount),
|
|
4296
4338
|
getAccountMeta(accounts.marketTokenAta),
|
|
4297
|
-
getAccountMeta(accounts.ownerTokenAccount),
|
|
4298
4339
|
getAccountMeta(accounts.tokenProgram),
|
|
4299
4340
|
getAccountMeta(accounts.systemProgram)
|
|
4300
4341
|
],
|
|
4301
|
-
data:
|
|
4342
|
+
data: getCloseStuckVouchAccountInstructionDataEncoder().encode(
|
|
4343
|
+
args
|
|
4344
|
+
),
|
|
4302
4345
|
programAddress
|
|
4303
4346
|
});
|
|
4304
4347
|
}
|
|
4305
|
-
function
|
|
4306
|
-
if (instruction.accounts.length <
|
|
4348
|
+
function parseCloseStuckVouchAccountInstruction(instruction) {
|
|
4349
|
+
if (instruction.accounts.length < 8) {
|
|
4307
4350
|
throw new Error("Not enough accounts");
|
|
4308
4351
|
}
|
|
4309
4352
|
let accountIndex = 0;
|
|
@@ -4315,21 +4358,22 @@ function parseCloseStakeAccountInstruction(instruction) {
|
|
|
4315
4358
|
return {
|
|
4316
4359
|
programAddress: instruction.programAddress,
|
|
4317
4360
|
accounts: {
|
|
4318
|
-
|
|
4361
|
+
signer: getNextAccount(),
|
|
4319
4362
|
market: getNextAccount(),
|
|
4320
|
-
|
|
4321
|
-
option: getNextAccount(),
|
|
4363
|
+
vouchAccount: getNextAccount(),
|
|
4322
4364
|
tokenMint: getNextAccount(),
|
|
4365
|
+
signerTokenAccount: getNextAccount(),
|
|
4323
4366
|
marketTokenAta: getNextAccount(),
|
|
4324
|
-
ownerTokenAccount: getNextAccount(),
|
|
4325
4367
|
tokenProgram: getNextAccount(),
|
|
4326
4368
|
systemProgram: getNextAccount()
|
|
4327
4369
|
},
|
|
4328
|
-
data:
|
|
4370
|
+
data: getCloseStuckVouchAccountInstructionDataDecoder().decode(
|
|
4371
|
+
instruction.data
|
|
4372
|
+
)
|
|
4329
4373
|
};
|
|
4330
4374
|
}
|
|
4331
4375
|
|
|
4332
|
-
// src/generated/instructions/
|
|
4376
|
+
// src/generated/instructions/closeUnrevealedVouchAccount.ts
|
|
4333
4377
|
import {
|
|
4334
4378
|
combineCodec as combineCodec67,
|
|
4335
4379
|
fixDecoderSize as fixDecoderSize15,
|
|
@@ -4340,93 +4384,59 @@ import {
|
|
|
4340
4384
|
getProgramDerivedAddress as getProgramDerivedAddress8,
|
|
4341
4385
|
getStructDecoder as getStructDecoder61,
|
|
4342
4386
|
getStructEncoder as getStructEncoder61,
|
|
4343
|
-
getU32Decoder as getU32Decoder18,
|
|
4344
|
-
getU32Encoder as getU32Encoder18,
|
|
4345
4387
|
transformEncoder as transformEncoder15
|
|
4346
4388
|
} from "@solana/kit";
|
|
4347
|
-
var
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4389
|
+
var CLOSE_UNREVEALED_VOUCH_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
4390
|
+
192,
|
|
4391
|
+
236,
|
|
4392
|
+
224,
|
|
4393
|
+
245,
|
|
4394
|
+
5,
|
|
4395
|
+
49,
|
|
4396
|
+
188,
|
|
4397
|
+
11
|
|
4356
4398
|
]);
|
|
4357
|
-
function
|
|
4399
|
+
function getCloseUnrevealedVouchAccountDiscriminatorBytes() {
|
|
4358
4400
|
return fixEncoderSize16(getBytesEncoder16(), 8).encode(
|
|
4359
|
-
|
|
4401
|
+
CLOSE_UNREVEALED_VOUCH_ACCOUNT_DISCRIMINATOR
|
|
4360
4402
|
);
|
|
4361
4403
|
}
|
|
4362
|
-
function
|
|
4404
|
+
function getCloseUnrevealedVouchAccountInstructionDataEncoder() {
|
|
4363
4405
|
return transformEncoder15(
|
|
4364
|
-
getStructEncoder61([
|
|
4365
|
-
["discriminator", fixEncoderSize16(getBytesEncoder16(), 8)],
|
|
4366
|
-
["stakeAccountId", getU32Encoder18()]
|
|
4367
|
-
]),
|
|
4406
|
+
getStructEncoder61([["discriminator", fixEncoderSize16(getBytesEncoder16(), 8)]]),
|
|
4368
4407
|
(value) => ({
|
|
4369
4408
|
...value,
|
|
4370
|
-
discriminator:
|
|
4409
|
+
discriminator: CLOSE_UNREVEALED_VOUCH_ACCOUNT_DISCRIMINATOR
|
|
4371
4410
|
})
|
|
4372
4411
|
);
|
|
4373
4412
|
}
|
|
4374
|
-
function
|
|
4413
|
+
function getCloseUnrevealedVouchAccountInstructionDataDecoder() {
|
|
4375
4414
|
return getStructDecoder61([
|
|
4376
|
-
["discriminator", fixDecoderSize15(getBytesDecoder15(), 8)]
|
|
4377
|
-
["stakeAccountId", getU32Decoder18()]
|
|
4415
|
+
["discriminator", fixDecoderSize15(getBytesDecoder15(), 8)]
|
|
4378
4416
|
]);
|
|
4379
4417
|
}
|
|
4380
|
-
function
|
|
4418
|
+
function getCloseUnrevealedVouchAccountInstructionDataCodec() {
|
|
4381
4419
|
return combineCodec67(
|
|
4382
|
-
|
|
4383
|
-
|
|
4420
|
+
getCloseUnrevealedVouchAccountInstructionDataEncoder(),
|
|
4421
|
+
getCloseUnrevealedVouchAccountInstructionDataDecoder()
|
|
4384
4422
|
);
|
|
4385
4423
|
}
|
|
4386
|
-
async function
|
|
4424
|
+
async function getCloseUnrevealedVouchAccountInstructionAsync(input, config) {
|
|
4387
4425
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
4388
4426
|
const originalAccounts = {
|
|
4389
|
-
|
|
4390
|
-
market: { value: input.market ?? null, isWritable:
|
|
4391
|
-
|
|
4427
|
+
owner: { value: input.owner ?? null, isWritable: true },
|
|
4428
|
+
market: { value: input.market ?? null, isWritable: true },
|
|
4429
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true },
|
|
4392
4430
|
tokenMint: { value: input.tokenMint ?? null, isWritable: false },
|
|
4393
|
-
|
|
4394
|
-
|
|
4431
|
+
marketTokenAta: { value: input.marketTokenAta ?? null, isWritable: true },
|
|
4432
|
+
ownerTokenAccount: {
|
|
4433
|
+
value: input.ownerTokenAccount ?? null,
|
|
4395
4434
|
isWritable: true
|
|
4396
4435
|
},
|
|
4397
|
-
marketTokenAta: { value: input.marketTokenAta ?? null, isWritable: true },
|
|
4398
4436
|
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
4399
4437
|
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
4400
4438
|
};
|
|
4401
4439
|
const accounts = originalAccounts;
|
|
4402
|
-
const args = { ...input };
|
|
4403
|
-
if (!accounts.stakeAccount.value) {
|
|
4404
|
-
accounts.stakeAccount.value = await getProgramDerivedAddress8({
|
|
4405
|
-
programAddress,
|
|
4406
|
-
seeds: [
|
|
4407
|
-
getBytesEncoder16().encode(
|
|
4408
|
-
new Uint8Array([
|
|
4409
|
-
115,
|
|
4410
|
-
116,
|
|
4411
|
-
97,
|
|
4412
|
-
107,
|
|
4413
|
-
101,
|
|
4414
|
-
95,
|
|
4415
|
-
97,
|
|
4416
|
-
99,
|
|
4417
|
-
99,
|
|
4418
|
-
111,
|
|
4419
|
-
117,
|
|
4420
|
-
110,
|
|
4421
|
-
116
|
|
4422
|
-
])
|
|
4423
|
-
),
|
|
4424
|
-
getAddressEncoder42().encode(expectAddress(accounts.signer.value)),
|
|
4425
|
-
getAddressEncoder42().encode(expectAddress(accounts.market.value)),
|
|
4426
|
-
getU32Encoder18().encode(expectSome(args.stakeAccountId))
|
|
4427
|
-
]
|
|
4428
|
-
});
|
|
4429
|
-
}
|
|
4430
4440
|
if (!accounts.marketTokenAta.value) {
|
|
4431
4441
|
accounts.marketTokenAta.value = await getProgramDerivedAddress8({
|
|
4432
4442
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
@@ -4443,60 +4453,55 @@ async function getCloseStuckStakeAccountInstructionAsync(input, config) {
|
|
|
4443
4453
|
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
4444
4454
|
return Object.freeze({
|
|
4445
4455
|
accounts: [
|
|
4446
|
-
getAccountMeta(accounts.
|
|
4456
|
+
getAccountMeta(accounts.owner),
|
|
4447
4457
|
getAccountMeta(accounts.market),
|
|
4448
|
-
getAccountMeta(accounts.
|
|
4458
|
+
getAccountMeta(accounts.vouchAccount),
|
|
4449
4459
|
getAccountMeta(accounts.tokenMint),
|
|
4450
|
-
getAccountMeta(accounts.signerTokenAccount),
|
|
4451
4460
|
getAccountMeta(accounts.marketTokenAta),
|
|
4461
|
+
getAccountMeta(accounts.ownerTokenAccount),
|
|
4452
4462
|
getAccountMeta(accounts.tokenProgram),
|
|
4453
4463
|
getAccountMeta(accounts.systemProgram)
|
|
4454
4464
|
],
|
|
4455
|
-
data:
|
|
4456
|
-
args
|
|
4457
|
-
),
|
|
4465
|
+
data: getCloseUnrevealedVouchAccountInstructionDataEncoder().encode({}),
|
|
4458
4466
|
programAddress
|
|
4459
4467
|
});
|
|
4460
4468
|
}
|
|
4461
|
-
function
|
|
4469
|
+
function getCloseUnrevealedVouchAccountInstruction(input, config) {
|
|
4462
4470
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
4463
4471
|
const originalAccounts = {
|
|
4464
|
-
|
|
4465
|
-
market: { value: input.market ?? null, isWritable:
|
|
4466
|
-
|
|
4472
|
+
owner: { value: input.owner ?? null, isWritable: true },
|
|
4473
|
+
market: { value: input.market ?? null, isWritable: true },
|
|
4474
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true },
|
|
4467
4475
|
tokenMint: { value: input.tokenMint ?? null, isWritable: false },
|
|
4468
|
-
|
|
4469
|
-
|
|
4476
|
+
marketTokenAta: { value: input.marketTokenAta ?? null, isWritable: true },
|
|
4477
|
+
ownerTokenAccount: {
|
|
4478
|
+
value: input.ownerTokenAccount ?? null,
|
|
4470
4479
|
isWritable: true
|
|
4471
4480
|
},
|
|
4472
|
-
marketTokenAta: { value: input.marketTokenAta ?? null, isWritable: true },
|
|
4473
4481
|
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
4474
4482
|
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
4475
4483
|
};
|
|
4476
4484
|
const accounts = originalAccounts;
|
|
4477
|
-
const args = { ...input };
|
|
4478
4485
|
if (!accounts.systemProgram.value) {
|
|
4479
4486
|
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
4480
4487
|
}
|
|
4481
4488
|
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
4482
4489
|
return Object.freeze({
|
|
4483
4490
|
accounts: [
|
|
4484
|
-
getAccountMeta(accounts.
|
|
4491
|
+
getAccountMeta(accounts.owner),
|
|
4485
4492
|
getAccountMeta(accounts.market),
|
|
4486
|
-
getAccountMeta(accounts.
|
|
4493
|
+
getAccountMeta(accounts.vouchAccount),
|
|
4487
4494
|
getAccountMeta(accounts.tokenMint),
|
|
4488
|
-
getAccountMeta(accounts.signerTokenAccount),
|
|
4489
4495
|
getAccountMeta(accounts.marketTokenAta),
|
|
4496
|
+
getAccountMeta(accounts.ownerTokenAccount),
|
|
4490
4497
|
getAccountMeta(accounts.tokenProgram),
|
|
4491
4498
|
getAccountMeta(accounts.systemProgram)
|
|
4492
4499
|
],
|
|
4493
|
-
data:
|
|
4494
|
-
args
|
|
4495
|
-
),
|
|
4500
|
+
data: getCloseUnrevealedVouchAccountInstructionDataEncoder().encode({}),
|
|
4496
4501
|
programAddress
|
|
4497
4502
|
});
|
|
4498
4503
|
}
|
|
4499
|
-
function
|
|
4504
|
+
function parseCloseUnrevealedVouchAccountInstruction(instruction) {
|
|
4500
4505
|
if (instruction.accounts.length < 8) {
|
|
4501
4506
|
throw new Error("Not enough accounts");
|
|
4502
4507
|
}
|
|
@@ -4509,22 +4514,22 @@ function parseCloseStuckStakeAccountInstruction(instruction) {
|
|
|
4509
4514
|
return {
|
|
4510
4515
|
programAddress: instruction.programAddress,
|
|
4511
4516
|
accounts: {
|
|
4512
|
-
|
|
4517
|
+
owner: getNextAccount(),
|
|
4513
4518
|
market: getNextAccount(),
|
|
4514
|
-
|
|
4519
|
+
vouchAccount: getNextAccount(),
|
|
4515
4520
|
tokenMint: getNextAccount(),
|
|
4516
|
-
signerTokenAccount: getNextAccount(),
|
|
4517
4521
|
marketTokenAta: getNextAccount(),
|
|
4522
|
+
ownerTokenAccount: getNextAccount(),
|
|
4518
4523
|
tokenProgram: getNextAccount(),
|
|
4519
4524
|
systemProgram: getNextAccount()
|
|
4520
4525
|
},
|
|
4521
|
-
data:
|
|
4526
|
+
data: getCloseUnrevealedVouchAccountInstructionDataDecoder().decode(
|
|
4522
4527
|
instruction.data
|
|
4523
4528
|
)
|
|
4524
4529
|
};
|
|
4525
4530
|
}
|
|
4526
4531
|
|
|
4527
|
-
// src/generated/instructions/
|
|
4532
|
+
// src/generated/instructions/closeVouchAccount.ts
|
|
4528
4533
|
import {
|
|
4529
4534
|
combineCodec as combineCodec68,
|
|
4530
4535
|
fixDecoderSize as fixDecoderSize16,
|
|
@@ -4537,47 +4542,45 @@ import {
|
|
|
4537
4542
|
getStructEncoder as getStructEncoder62,
|
|
4538
4543
|
transformEncoder as transformEncoder16
|
|
4539
4544
|
} from "@solana/kit";
|
|
4540
|
-
var
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4545
|
+
var CLOSE_VOUCH_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
4546
|
+
107,
|
|
4547
|
+
196,
|
|
4548
|
+
52,
|
|
4549
|
+
68,
|
|
4550
|
+
9,
|
|
4551
|
+
214,
|
|
4552
|
+
207,
|
|
4553
|
+
109
|
|
4549
4554
|
]);
|
|
4550
|
-
function
|
|
4555
|
+
function getCloseVouchAccountDiscriminatorBytes() {
|
|
4551
4556
|
return fixEncoderSize17(getBytesEncoder17(), 8).encode(
|
|
4552
|
-
|
|
4557
|
+
CLOSE_VOUCH_ACCOUNT_DISCRIMINATOR
|
|
4553
4558
|
);
|
|
4554
4559
|
}
|
|
4555
|
-
function
|
|
4560
|
+
function getCloseVouchAccountInstructionDataEncoder() {
|
|
4556
4561
|
return transformEncoder16(
|
|
4557
4562
|
getStructEncoder62([["discriminator", fixEncoderSize17(getBytesEncoder17(), 8)]]),
|
|
4558
|
-
(value) => ({
|
|
4559
|
-
...value,
|
|
4560
|
-
discriminator: CLOSE_UNREVEALED_STAKE_ACCOUNT_DISCRIMINATOR
|
|
4561
|
-
})
|
|
4563
|
+
(value) => ({ ...value, discriminator: CLOSE_VOUCH_ACCOUNT_DISCRIMINATOR })
|
|
4562
4564
|
);
|
|
4563
4565
|
}
|
|
4564
|
-
function
|
|
4566
|
+
function getCloseVouchAccountInstructionDataDecoder() {
|
|
4565
4567
|
return getStructDecoder62([
|
|
4566
4568
|
["discriminator", fixDecoderSize16(getBytesDecoder16(), 8)]
|
|
4567
4569
|
]);
|
|
4568
4570
|
}
|
|
4569
|
-
function
|
|
4571
|
+
function getCloseVouchAccountInstructionDataCodec() {
|
|
4570
4572
|
return combineCodec68(
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
+
getCloseVouchAccountInstructionDataEncoder(),
|
|
4574
|
+
getCloseVouchAccountInstructionDataDecoder()
|
|
4573
4575
|
);
|
|
4574
4576
|
}
|
|
4575
|
-
async function
|
|
4577
|
+
async function getCloseVouchAccountInstructionAsync(input, config) {
|
|
4576
4578
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
4577
4579
|
const originalAccounts = {
|
|
4578
4580
|
owner: { value: input.owner ?? null, isWritable: true },
|
|
4579
4581
|
market: { value: input.market ?? null, isWritable: true },
|
|
4580
|
-
|
|
4582
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true },
|
|
4583
|
+
option: { value: input.option ?? null, isWritable: true },
|
|
4581
4584
|
tokenMint: { value: input.tokenMint ?? null, isWritable: false },
|
|
4582
4585
|
marketTokenAta: { value: input.marketTokenAta ?? null, isWritable: true },
|
|
4583
4586
|
ownerTokenAccount: {
|
|
@@ -4606,23 +4609,25 @@ async function getCloseUnrevealedStakeAccountInstructionAsync(input, config) {
|
|
|
4606
4609
|
accounts: [
|
|
4607
4610
|
getAccountMeta(accounts.owner),
|
|
4608
4611
|
getAccountMeta(accounts.market),
|
|
4609
|
-
getAccountMeta(accounts.
|
|
4612
|
+
getAccountMeta(accounts.vouchAccount),
|
|
4613
|
+
getAccountMeta(accounts.option),
|
|
4610
4614
|
getAccountMeta(accounts.tokenMint),
|
|
4611
4615
|
getAccountMeta(accounts.marketTokenAta),
|
|
4612
4616
|
getAccountMeta(accounts.ownerTokenAccount),
|
|
4613
4617
|
getAccountMeta(accounts.tokenProgram),
|
|
4614
4618
|
getAccountMeta(accounts.systemProgram)
|
|
4615
4619
|
],
|
|
4616
|
-
data:
|
|
4620
|
+
data: getCloseVouchAccountInstructionDataEncoder().encode({}),
|
|
4617
4621
|
programAddress
|
|
4618
4622
|
});
|
|
4619
4623
|
}
|
|
4620
|
-
function
|
|
4624
|
+
function getCloseVouchAccountInstruction(input, config) {
|
|
4621
4625
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
4622
4626
|
const originalAccounts = {
|
|
4623
4627
|
owner: { value: input.owner ?? null, isWritable: true },
|
|
4624
4628
|
market: { value: input.market ?? null, isWritable: true },
|
|
4625
|
-
|
|
4629
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true },
|
|
4630
|
+
option: { value: input.option ?? null, isWritable: true },
|
|
4626
4631
|
tokenMint: { value: input.tokenMint ?? null, isWritable: false },
|
|
4627
4632
|
marketTokenAta: { value: input.marketTokenAta ?? null, isWritable: true },
|
|
4628
4633
|
ownerTokenAccount: {
|
|
@@ -4641,19 +4646,20 @@ function getCloseUnrevealedStakeAccountInstruction(input, config) {
|
|
|
4641
4646
|
accounts: [
|
|
4642
4647
|
getAccountMeta(accounts.owner),
|
|
4643
4648
|
getAccountMeta(accounts.market),
|
|
4644
|
-
getAccountMeta(accounts.
|
|
4649
|
+
getAccountMeta(accounts.vouchAccount),
|
|
4650
|
+
getAccountMeta(accounts.option),
|
|
4645
4651
|
getAccountMeta(accounts.tokenMint),
|
|
4646
4652
|
getAccountMeta(accounts.marketTokenAta),
|
|
4647
4653
|
getAccountMeta(accounts.ownerTokenAccount),
|
|
4648
4654
|
getAccountMeta(accounts.tokenProgram),
|
|
4649
4655
|
getAccountMeta(accounts.systemProgram)
|
|
4650
4656
|
],
|
|
4651
|
-
data:
|
|
4657
|
+
data: getCloseVouchAccountInstructionDataEncoder().encode({}),
|
|
4652
4658
|
programAddress
|
|
4653
4659
|
});
|
|
4654
4660
|
}
|
|
4655
|
-
function
|
|
4656
|
-
if (instruction.accounts.length <
|
|
4661
|
+
function parseCloseVouchAccountInstruction(instruction) {
|
|
4662
|
+
if (instruction.accounts.length < 9) {
|
|
4657
4663
|
throw new Error("Not enough accounts");
|
|
4658
4664
|
}
|
|
4659
4665
|
let accountIndex = 0;
|
|
@@ -4667,16 +4673,15 @@ function parseCloseUnrevealedStakeAccountInstruction(instruction) {
|
|
|
4667
4673
|
accounts: {
|
|
4668
4674
|
owner: getNextAccount(),
|
|
4669
4675
|
market: getNextAccount(),
|
|
4670
|
-
|
|
4676
|
+
vouchAccount: getNextAccount(),
|
|
4677
|
+
option: getNextAccount(),
|
|
4671
4678
|
tokenMint: getNextAccount(),
|
|
4672
4679
|
marketTokenAta: getNextAccount(),
|
|
4673
4680
|
ownerTokenAccount: getNextAccount(),
|
|
4674
4681
|
tokenProgram: getNextAccount(),
|
|
4675
4682
|
systemProgram: getNextAccount()
|
|
4676
4683
|
},
|
|
4677
|
-
data:
|
|
4678
|
-
instruction.data
|
|
4679
|
-
)
|
|
4684
|
+
data: getCloseVouchAccountInstructionDataDecoder().decode(instruction.data)
|
|
4680
4685
|
};
|
|
4681
4686
|
}
|
|
4682
4687
|
|
|
@@ -4962,7 +4967,7 @@ function parseEndRevealPeriodInstruction(instruction) {
|
|
|
4962
4967
|
};
|
|
4963
4968
|
}
|
|
4964
4969
|
|
|
4965
|
-
// src/generated/instructions/
|
|
4970
|
+
// src/generated/instructions/finalizeRevealVouch.ts
|
|
4966
4971
|
import {
|
|
4967
4972
|
combineCodec as combineCodec71,
|
|
4968
4973
|
fixDecoderSize as fixDecoderSize19,
|
|
@@ -4979,70 +4984,70 @@ import {
|
|
|
4979
4984
|
getU64Encoder as getU64Encoder37,
|
|
4980
4985
|
transformEncoder as transformEncoder19
|
|
4981
4986
|
} from "@solana/kit";
|
|
4982
|
-
var
|
|
4983
|
-
|
|
4984
|
-
|
|
4985
|
-
|
|
4986
|
-
|
|
4987
|
-
|
|
4988
|
-
|
|
4989
|
-
|
|
4990
|
-
|
|
4987
|
+
var FINALIZE_REVEAL_VOUCH_DISCRIMINATOR = new Uint8Array([
|
|
4988
|
+
1,
|
|
4989
|
+
34,
|
|
4990
|
+
40,
|
|
4991
|
+
131,
|
|
4992
|
+
236,
|
|
4993
|
+
85,
|
|
4994
|
+
1,
|
|
4995
|
+
25
|
|
4991
4996
|
]);
|
|
4992
|
-
function
|
|
4997
|
+
function getFinalizeRevealVouchDiscriminatorBytes() {
|
|
4993
4998
|
return fixEncoderSize20(getBytesEncoder20(), 8).encode(
|
|
4994
|
-
|
|
4999
|
+
FINALIZE_REVEAL_VOUCH_DISCRIMINATOR
|
|
4995
5000
|
);
|
|
4996
5001
|
}
|
|
4997
|
-
function
|
|
5002
|
+
function getFinalizeRevealVouchInstructionDataEncoder() {
|
|
4998
5003
|
return transformEncoder19(
|
|
4999
5004
|
getStructEncoder65([
|
|
5000
5005
|
["discriminator", fixEncoderSize20(getBytesEncoder20(), 8)],
|
|
5001
5006
|
["optionId", getU64Encoder37()],
|
|
5002
|
-
["
|
|
5007
|
+
["vouchAccountId", getU32Encoder19()]
|
|
5003
5008
|
]),
|
|
5004
5009
|
(value) => ({
|
|
5005
5010
|
...value,
|
|
5006
|
-
discriminator:
|
|
5011
|
+
discriminator: FINALIZE_REVEAL_VOUCH_DISCRIMINATOR
|
|
5007
5012
|
})
|
|
5008
5013
|
);
|
|
5009
5014
|
}
|
|
5010
|
-
function
|
|
5015
|
+
function getFinalizeRevealVouchInstructionDataDecoder() {
|
|
5011
5016
|
return getStructDecoder65([
|
|
5012
5017
|
["discriminator", fixDecoderSize19(getBytesDecoder19(), 8)],
|
|
5013
5018
|
["optionId", getU64Decoder37()],
|
|
5014
|
-
["
|
|
5019
|
+
["vouchAccountId", getU32Decoder19()]
|
|
5015
5020
|
]);
|
|
5016
5021
|
}
|
|
5017
|
-
function
|
|
5022
|
+
function getFinalizeRevealVouchInstructionDataCodec() {
|
|
5018
5023
|
return combineCodec71(
|
|
5019
|
-
|
|
5020
|
-
|
|
5024
|
+
getFinalizeRevealVouchInstructionDataEncoder(),
|
|
5025
|
+
getFinalizeRevealVouchInstructionDataDecoder()
|
|
5021
5026
|
);
|
|
5022
5027
|
}
|
|
5023
|
-
async function
|
|
5028
|
+
async function getFinalizeRevealVouchInstructionAsync(input, config) {
|
|
5024
5029
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
5025
5030
|
const originalAccounts = {
|
|
5026
5031
|
signer: { value: input.signer ?? null, isWritable: true },
|
|
5027
5032
|
owner: { value: input.owner ?? null, isWritable: false },
|
|
5028
5033
|
market: { value: input.market ?? null, isWritable: true },
|
|
5029
|
-
|
|
5034
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true },
|
|
5030
5035
|
option: { value: input.option ?? null, isWritable: true },
|
|
5031
5036
|
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
5032
5037
|
};
|
|
5033
5038
|
const accounts = originalAccounts;
|
|
5034
5039
|
const args = { ...input };
|
|
5035
|
-
if (!accounts.
|
|
5036
|
-
accounts.
|
|
5040
|
+
if (!accounts.vouchAccount.value) {
|
|
5041
|
+
accounts.vouchAccount.value = await getProgramDerivedAddress11({
|
|
5037
5042
|
programAddress,
|
|
5038
5043
|
seeds: [
|
|
5039
5044
|
getBytesEncoder20().encode(
|
|
5040
5045
|
new Uint8Array([
|
|
5041
|
-
|
|
5042
|
-
|
|
5043
|
-
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
+
118,
|
|
5047
|
+
111,
|
|
5048
|
+
117,
|
|
5049
|
+
99,
|
|
5050
|
+
104,
|
|
5046
5051
|
95,
|
|
5047
5052
|
97,
|
|
5048
5053
|
99,
|
|
@@ -5055,7 +5060,7 @@ async function getFinalizeRevealStakeInstructionAsync(input, config) {
|
|
|
5055
5060
|
),
|
|
5056
5061
|
getAddressEncoder45().encode(expectAddress(accounts.owner.value)),
|
|
5057
5062
|
getAddressEncoder45().encode(expectAddress(accounts.market.value)),
|
|
5058
|
-
getU32Encoder19().encode(expectSome(args.
|
|
5063
|
+
getU32Encoder19().encode(expectSome(args.vouchAccountId))
|
|
5059
5064
|
]
|
|
5060
5065
|
});
|
|
5061
5066
|
}
|
|
@@ -5080,23 +5085,23 @@ async function getFinalizeRevealStakeInstructionAsync(input, config) {
|
|
|
5080
5085
|
getAccountMeta(accounts.signer),
|
|
5081
5086
|
getAccountMeta(accounts.owner),
|
|
5082
5087
|
getAccountMeta(accounts.market),
|
|
5083
|
-
getAccountMeta(accounts.
|
|
5088
|
+
getAccountMeta(accounts.vouchAccount),
|
|
5084
5089
|
getAccountMeta(accounts.option),
|
|
5085
5090
|
getAccountMeta(accounts.systemProgram)
|
|
5086
5091
|
],
|
|
5087
|
-
data:
|
|
5092
|
+
data: getFinalizeRevealVouchInstructionDataEncoder().encode(
|
|
5088
5093
|
args
|
|
5089
5094
|
),
|
|
5090
5095
|
programAddress
|
|
5091
5096
|
});
|
|
5092
5097
|
}
|
|
5093
|
-
function
|
|
5098
|
+
function getFinalizeRevealVouchInstruction(input, config) {
|
|
5094
5099
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
5095
5100
|
const originalAccounts = {
|
|
5096
5101
|
signer: { value: input.signer ?? null, isWritable: true },
|
|
5097
5102
|
owner: { value: input.owner ?? null, isWritable: false },
|
|
5098
5103
|
market: { value: input.market ?? null, isWritable: true },
|
|
5099
|
-
|
|
5104
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true },
|
|
5100
5105
|
option: { value: input.option ?? null, isWritable: true },
|
|
5101
5106
|
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
5102
5107
|
};
|
|
@@ -5111,17 +5116,17 @@ function getFinalizeRevealStakeInstruction(input, config) {
|
|
|
5111
5116
|
getAccountMeta(accounts.signer),
|
|
5112
5117
|
getAccountMeta(accounts.owner),
|
|
5113
5118
|
getAccountMeta(accounts.market),
|
|
5114
|
-
getAccountMeta(accounts.
|
|
5119
|
+
getAccountMeta(accounts.vouchAccount),
|
|
5115
5120
|
getAccountMeta(accounts.option),
|
|
5116
5121
|
getAccountMeta(accounts.systemProgram)
|
|
5117
5122
|
],
|
|
5118
|
-
data:
|
|
5123
|
+
data: getFinalizeRevealVouchInstructionDataEncoder().encode(
|
|
5119
5124
|
args
|
|
5120
5125
|
),
|
|
5121
5126
|
programAddress
|
|
5122
5127
|
});
|
|
5123
5128
|
}
|
|
5124
|
-
function
|
|
5129
|
+
function parseFinalizeRevealVouchInstruction(instruction) {
|
|
5125
5130
|
if (instruction.accounts.length < 6) {
|
|
5126
5131
|
throw new Error("Not enough accounts");
|
|
5127
5132
|
}
|
|
@@ -5137,11 +5142,11 @@ function parseFinalizeRevealStakeInstruction(instruction) {
|
|
|
5137
5142
|
signer: getNextAccount(),
|
|
5138
5143
|
owner: getNextAccount(),
|
|
5139
5144
|
market: getNextAccount(),
|
|
5140
|
-
|
|
5145
|
+
vouchAccount: getNextAccount(),
|
|
5141
5146
|
option: getNextAccount(),
|
|
5142
5147
|
systemProgram: getNextAccount()
|
|
5143
5148
|
},
|
|
5144
|
-
data:
|
|
5149
|
+
data: getFinalizeRevealVouchInstructionDataDecoder().decode(
|
|
5145
5150
|
instruction.data
|
|
5146
5151
|
)
|
|
5147
5152
|
};
|
|
@@ -5389,7 +5394,7 @@ function parseInitPlatformConfigInstruction(instruction) {
|
|
|
5389
5394
|
};
|
|
5390
5395
|
}
|
|
5391
5396
|
|
|
5392
|
-
// src/generated/instructions/
|
|
5397
|
+
// src/generated/instructions/initVouchAccount.ts
|
|
5393
5398
|
import {
|
|
5394
5399
|
combineCodec as combineCodec74,
|
|
5395
5400
|
fixDecoderSize as fixDecoderSize22,
|
|
@@ -5404,64 +5409,64 @@ import {
|
|
|
5404
5409
|
getU32Encoder as getU32Encoder20,
|
|
5405
5410
|
transformEncoder as transformEncoder22
|
|
5406
5411
|
} from "@solana/kit";
|
|
5407
|
-
var
|
|
5408
|
-
|
|
5409
|
-
|
|
5410
|
-
255,
|
|
5412
|
+
var INIT_VOUCH_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
5413
|
+
170,
|
|
5414
|
+
190,
|
|
5411
5415
|
149,
|
|
5412
|
-
|
|
5413
|
-
|
|
5414
|
-
|
|
5415
|
-
|
|
5416
|
+
246,
|
|
5417
|
+
116,
|
|
5418
|
+
216,
|
|
5419
|
+
171,
|
|
5420
|
+
230
|
|
5416
5421
|
]);
|
|
5417
|
-
function
|
|
5422
|
+
function getInitVouchAccountDiscriminatorBytes() {
|
|
5418
5423
|
return fixEncoderSize23(getBytesEncoder23(), 8).encode(
|
|
5419
|
-
|
|
5424
|
+
INIT_VOUCH_ACCOUNT_DISCRIMINATOR
|
|
5420
5425
|
);
|
|
5421
5426
|
}
|
|
5422
|
-
function
|
|
5427
|
+
function getInitVouchAccountInstructionDataEncoder() {
|
|
5423
5428
|
return transformEncoder22(
|
|
5424
5429
|
getStructEncoder68([
|
|
5425
5430
|
["discriminator", fixEncoderSize23(getBytesEncoder23(), 8)],
|
|
5426
|
-
["
|
|
5431
|
+
["vouchAccountId", getU32Encoder20()]
|
|
5427
5432
|
]),
|
|
5428
|
-
(value) => ({ ...value, discriminator:
|
|
5433
|
+
(value) => ({ ...value, discriminator: INIT_VOUCH_ACCOUNT_DISCRIMINATOR })
|
|
5429
5434
|
);
|
|
5430
5435
|
}
|
|
5431
|
-
function
|
|
5436
|
+
function getInitVouchAccountInstructionDataDecoder() {
|
|
5432
5437
|
return getStructDecoder68([
|
|
5433
5438
|
["discriminator", fixDecoderSize22(getBytesDecoder22(), 8)],
|
|
5434
|
-
["
|
|
5439
|
+
["vouchAccountId", getU32Decoder20()]
|
|
5435
5440
|
]);
|
|
5436
5441
|
}
|
|
5437
|
-
function
|
|
5442
|
+
function getInitVouchAccountInstructionDataCodec() {
|
|
5438
5443
|
return combineCodec74(
|
|
5439
|
-
|
|
5440
|
-
|
|
5444
|
+
getInitVouchAccountInstructionDataEncoder(),
|
|
5445
|
+
getInitVouchAccountInstructionDataDecoder()
|
|
5441
5446
|
);
|
|
5442
5447
|
}
|
|
5443
|
-
async function
|
|
5448
|
+
async function getInitVouchAccountInstructionAsync(input, config) {
|
|
5444
5449
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
5445
5450
|
const originalAccounts = {
|
|
5446
5451
|
payer: { value: input.payer ?? null, isWritable: true },
|
|
5447
5452
|
owner: { value: input.owner ?? null, isWritable: false },
|
|
5448
5453
|
market: { value: input.market ?? null, isWritable: false },
|
|
5449
|
-
|
|
5454
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true },
|
|
5450
5455
|
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
5451
5456
|
};
|
|
5452
5457
|
const accounts = originalAccounts;
|
|
5453
5458
|
const args = { ...input };
|
|
5454
|
-
if (!accounts.
|
|
5455
|
-
accounts.
|
|
5459
|
+
if (!accounts.vouchAccount.value) {
|
|
5460
|
+
accounts.vouchAccount.value = await getProgramDerivedAddress13({
|
|
5456
5461
|
programAddress,
|
|
5457
5462
|
seeds: [
|
|
5458
5463
|
getBytesEncoder23().encode(
|
|
5459
5464
|
new Uint8Array([
|
|
5460
|
-
|
|
5461
|
-
|
|
5462
|
-
|
|
5463
|
-
|
|
5464
|
-
|
|
5465
|
+
118,
|
|
5466
|
+
111,
|
|
5467
|
+
117,
|
|
5468
|
+
99,
|
|
5469
|
+
104,
|
|
5465
5470
|
95,
|
|
5466
5471
|
97,
|
|
5467
5472
|
99,
|
|
@@ -5474,7 +5479,7 @@ async function getInitStakeAccountInstructionAsync(input, config) {
|
|
|
5474
5479
|
),
|
|
5475
5480
|
getAddressEncoder47().encode(expectAddress(accounts.owner.value)),
|
|
5476
5481
|
getAddressEncoder47().encode(expectAddress(accounts.market.value)),
|
|
5477
|
-
getU32Encoder20().encode(expectSome(args.
|
|
5482
|
+
getU32Encoder20().encode(expectSome(args.vouchAccountId))
|
|
5478
5483
|
]
|
|
5479
5484
|
});
|
|
5480
5485
|
}
|
|
@@ -5487,22 +5492,22 @@ async function getInitStakeAccountInstructionAsync(input, config) {
|
|
|
5487
5492
|
getAccountMeta(accounts.payer),
|
|
5488
5493
|
getAccountMeta(accounts.owner),
|
|
5489
5494
|
getAccountMeta(accounts.market),
|
|
5490
|
-
getAccountMeta(accounts.
|
|
5495
|
+
getAccountMeta(accounts.vouchAccount),
|
|
5491
5496
|
getAccountMeta(accounts.systemProgram)
|
|
5492
5497
|
],
|
|
5493
|
-
data:
|
|
5498
|
+
data: getInitVouchAccountInstructionDataEncoder().encode(
|
|
5494
5499
|
args
|
|
5495
5500
|
),
|
|
5496
5501
|
programAddress
|
|
5497
5502
|
});
|
|
5498
5503
|
}
|
|
5499
|
-
function
|
|
5504
|
+
function getInitVouchAccountInstruction(input, config) {
|
|
5500
5505
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
5501
5506
|
const originalAccounts = {
|
|
5502
5507
|
payer: { value: input.payer ?? null, isWritable: true },
|
|
5503
5508
|
owner: { value: input.owner ?? null, isWritable: false },
|
|
5504
5509
|
market: { value: input.market ?? null, isWritable: false },
|
|
5505
|
-
|
|
5510
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true },
|
|
5506
5511
|
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
5507
5512
|
};
|
|
5508
5513
|
const accounts = originalAccounts;
|
|
@@ -5516,16 +5521,16 @@ function getInitStakeAccountInstruction(input, config) {
|
|
|
5516
5521
|
getAccountMeta(accounts.payer),
|
|
5517
5522
|
getAccountMeta(accounts.owner),
|
|
5518
5523
|
getAccountMeta(accounts.market),
|
|
5519
|
-
getAccountMeta(accounts.
|
|
5524
|
+
getAccountMeta(accounts.vouchAccount),
|
|
5520
5525
|
getAccountMeta(accounts.systemProgram)
|
|
5521
5526
|
],
|
|
5522
|
-
data:
|
|
5527
|
+
data: getInitVouchAccountInstructionDataEncoder().encode(
|
|
5523
5528
|
args
|
|
5524
5529
|
),
|
|
5525
5530
|
programAddress
|
|
5526
5531
|
});
|
|
5527
5532
|
}
|
|
5528
|
-
function
|
|
5533
|
+
function parseInitVouchAccountInstruction(instruction) {
|
|
5529
5534
|
if (instruction.accounts.length < 5) {
|
|
5530
5535
|
throw new Error("Not enough accounts");
|
|
5531
5536
|
}
|
|
@@ -5541,10 +5546,10 @@ function parseInitStakeAccountInstruction(instruction) {
|
|
|
5541
5546
|
payer: getNextAccount(),
|
|
5542
5547
|
owner: getNextAccount(),
|
|
5543
5548
|
market: getNextAccount(),
|
|
5544
|
-
|
|
5549
|
+
vouchAccount: getNextAccount(),
|
|
5545
5550
|
systemProgram: getNextAccount()
|
|
5546
5551
|
},
|
|
5547
|
-
data:
|
|
5552
|
+
data: getInitVouchAccountInstructionDataDecoder().decode(instruction.data)
|
|
5548
5553
|
};
|
|
5549
5554
|
}
|
|
5550
5555
|
|
|
@@ -5578,7 +5583,7 @@ function getOpenMarketInstructionDataEncoder() {
|
|
|
5578
5583
|
return transformEncoder23(
|
|
5579
5584
|
getStructEncoder69([
|
|
5580
5585
|
["discriminator", fixEncoderSize24(getBytesEncoder24(), 8)],
|
|
5581
|
-
["
|
|
5586
|
+
["timeToVouch", getU64Encoder38()]
|
|
5582
5587
|
]),
|
|
5583
5588
|
(value) => ({ ...value, discriminator: OPEN_MARKET_DISCRIMINATOR })
|
|
5584
5589
|
);
|
|
@@ -5586,7 +5591,7 @@ function getOpenMarketInstructionDataEncoder() {
|
|
|
5586
5591
|
function getOpenMarketInstructionDataDecoder() {
|
|
5587
5592
|
return getStructDecoder69([
|
|
5588
5593
|
["discriminator", fixDecoderSize23(getBytesDecoder23(), 8)],
|
|
5589
|
-
["
|
|
5594
|
+
["timeToVouch", getU64Decoder38()]
|
|
5590
5595
|
]);
|
|
5591
5596
|
}
|
|
5592
5597
|
function getOpenMarketInstructionDataCodec() {
|
|
@@ -5721,7 +5726,7 @@ function parseResolveMarketInstruction(instruction) {
|
|
|
5721
5726
|
};
|
|
5722
5727
|
}
|
|
5723
5728
|
|
|
5724
|
-
// src/generated/instructions/
|
|
5729
|
+
// src/generated/instructions/revealVouch.ts
|
|
5725
5730
|
import {
|
|
5726
5731
|
combineCodec as combineCodec77,
|
|
5727
5732
|
fixDecoderSize as fixDecoderSize25,
|
|
@@ -5738,51 +5743,51 @@ import {
|
|
|
5738
5743
|
getU64Encoder as getU64Encoder39,
|
|
5739
5744
|
transformEncoder as transformEncoder25
|
|
5740
5745
|
} from "@solana/kit";
|
|
5741
|
-
var
|
|
5742
|
-
|
|
5743
|
-
|
|
5744
|
-
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
|
|
5746
|
+
var REVEAL_VOUCH_DISCRIMINATOR = new Uint8Array([
|
|
5747
|
+
137,
|
|
5748
|
+
238,
|
|
5749
|
+
214,
|
|
5750
|
+
30,
|
|
5751
|
+
51,
|
|
5752
|
+
142,
|
|
5753
|
+
141,
|
|
5754
|
+
105
|
|
5750
5755
|
]);
|
|
5751
|
-
function
|
|
5756
|
+
function getRevealVouchDiscriminatorBytes() {
|
|
5752
5757
|
return fixEncoderSize26(getBytesEncoder26(), 8).encode(
|
|
5753
|
-
|
|
5758
|
+
REVEAL_VOUCH_DISCRIMINATOR
|
|
5754
5759
|
);
|
|
5755
5760
|
}
|
|
5756
|
-
function
|
|
5761
|
+
function getRevealVouchInstructionDataEncoder() {
|
|
5757
5762
|
return transformEncoder25(
|
|
5758
5763
|
getStructEncoder71([
|
|
5759
5764
|
["discriminator", fixEncoderSize26(getBytesEncoder26(), 8)],
|
|
5760
5765
|
["computationOffset", getU64Encoder39()],
|
|
5761
|
-
["
|
|
5766
|
+
["vouchAccountId", getU32Encoder21()]
|
|
5762
5767
|
]),
|
|
5763
|
-
(value) => ({ ...value, discriminator:
|
|
5768
|
+
(value) => ({ ...value, discriminator: REVEAL_VOUCH_DISCRIMINATOR })
|
|
5764
5769
|
);
|
|
5765
5770
|
}
|
|
5766
|
-
function
|
|
5771
|
+
function getRevealVouchInstructionDataDecoder() {
|
|
5767
5772
|
return getStructDecoder71([
|
|
5768
5773
|
["discriminator", fixDecoderSize25(getBytesDecoder25(), 8)],
|
|
5769
5774
|
["computationOffset", getU64Decoder39()],
|
|
5770
|
-
["
|
|
5775
|
+
["vouchAccountId", getU32Decoder21()]
|
|
5771
5776
|
]);
|
|
5772
5777
|
}
|
|
5773
|
-
function
|
|
5778
|
+
function getRevealVouchInstructionDataCodec() {
|
|
5774
5779
|
return combineCodec77(
|
|
5775
|
-
|
|
5776
|
-
|
|
5780
|
+
getRevealVouchInstructionDataEncoder(),
|
|
5781
|
+
getRevealVouchInstructionDataDecoder()
|
|
5777
5782
|
);
|
|
5778
5783
|
}
|
|
5779
|
-
async function
|
|
5784
|
+
async function getRevealVouchInstructionAsync(input, config) {
|
|
5780
5785
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
5781
5786
|
const originalAccounts = {
|
|
5782
5787
|
signer: { value: input.signer ?? null, isWritable: true },
|
|
5783
5788
|
owner: { value: input.owner ?? null, isWritable: false },
|
|
5784
5789
|
market: { value: input.market ?? null, isWritable: false },
|
|
5785
|
-
|
|
5790
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true },
|
|
5786
5791
|
signPdaAccount: { value: input.signPdaAccount ?? null, isWritable: true },
|
|
5787
5792
|
mxeAccount: { value: input.mxeAccount ?? null, isWritable: false },
|
|
5788
5793
|
mempoolAccount: { value: input.mempoolAccount ?? null, isWritable: true },
|
|
@@ -5800,17 +5805,17 @@ async function getRevealStakeInstructionAsync(input, config) {
|
|
|
5800
5805
|
};
|
|
5801
5806
|
const accounts = originalAccounts;
|
|
5802
5807
|
const args = { ...input };
|
|
5803
|
-
if (!accounts.
|
|
5804
|
-
accounts.
|
|
5808
|
+
if (!accounts.vouchAccount.value) {
|
|
5809
|
+
accounts.vouchAccount.value = await getProgramDerivedAddress14({
|
|
5805
5810
|
programAddress,
|
|
5806
5811
|
seeds: [
|
|
5807
5812
|
getBytesEncoder26().encode(
|
|
5808
5813
|
new Uint8Array([
|
|
5809
|
-
|
|
5810
|
-
|
|
5811
|
-
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
+
118,
|
|
5815
|
+
111,
|
|
5816
|
+
117,
|
|
5817
|
+
99,
|
|
5818
|
+
104,
|
|
5814
5819
|
95,
|
|
5815
5820
|
97,
|
|
5816
5821
|
99,
|
|
@@ -5823,7 +5828,7 @@ async function getRevealStakeInstructionAsync(input, config) {
|
|
|
5823
5828
|
),
|
|
5824
5829
|
getAddressEncoder48().encode(expectAddress(accounts.owner.value)),
|
|
5825
5830
|
getAddressEncoder48().encode(expectAddress(accounts.market.value)),
|
|
5826
|
-
getU32Encoder21().encode(expectSome(args.
|
|
5831
|
+
getU32Encoder21().encode(expectSome(args.vouchAccountId))
|
|
5827
5832
|
]
|
|
5828
5833
|
});
|
|
5829
5834
|
}
|
|
@@ -5875,7 +5880,7 @@ async function getRevealStakeInstructionAsync(input, config) {
|
|
|
5875
5880
|
getAccountMeta(accounts.signer),
|
|
5876
5881
|
getAccountMeta(accounts.owner),
|
|
5877
5882
|
getAccountMeta(accounts.market),
|
|
5878
|
-
getAccountMeta(accounts.
|
|
5883
|
+
getAccountMeta(accounts.vouchAccount),
|
|
5879
5884
|
getAccountMeta(accounts.signPdaAccount),
|
|
5880
5885
|
getAccountMeta(accounts.mxeAccount),
|
|
5881
5886
|
getAccountMeta(accounts.mempoolAccount),
|
|
@@ -5888,19 +5893,19 @@ async function getRevealStakeInstructionAsync(input, config) {
|
|
|
5888
5893
|
getAccountMeta(accounts.systemProgram),
|
|
5889
5894
|
getAccountMeta(accounts.arciumProgram)
|
|
5890
5895
|
],
|
|
5891
|
-
data:
|
|
5896
|
+
data: getRevealVouchInstructionDataEncoder().encode(
|
|
5892
5897
|
args
|
|
5893
5898
|
),
|
|
5894
5899
|
programAddress
|
|
5895
5900
|
});
|
|
5896
5901
|
}
|
|
5897
|
-
function
|
|
5902
|
+
function getRevealVouchInstruction(input, config) {
|
|
5898
5903
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
5899
5904
|
const originalAccounts = {
|
|
5900
5905
|
signer: { value: input.signer ?? null, isWritable: true },
|
|
5901
5906
|
owner: { value: input.owner ?? null, isWritable: false },
|
|
5902
5907
|
market: { value: input.market ?? null, isWritable: false },
|
|
5903
|
-
|
|
5908
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true },
|
|
5904
5909
|
signPdaAccount: { value: input.signPdaAccount ?? null, isWritable: true },
|
|
5905
5910
|
mxeAccount: { value: input.mxeAccount ?? null, isWritable: false },
|
|
5906
5911
|
mempoolAccount: { value: input.mempoolAccount ?? null, isWritable: true },
|
|
@@ -5936,7 +5941,7 @@ function getRevealStakeInstruction(input, config) {
|
|
|
5936
5941
|
getAccountMeta(accounts.signer),
|
|
5937
5942
|
getAccountMeta(accounts.owner),
|
|
5938
5943
|
getAccountMeta(accounts.market),
|
|
5939
|
-
getAccountMeta(accounts.
|
|
5944
|
+
getAccountMeta(accounts.vouchAccount),
|
|
5940
5945
|
getAccountMeta(accounts.signPdaAccount),
|
|
5941
5946
|
getAccountMeta(accounts.mxeAccount),
|
|
5942
5947
|
getAccountMeta(accounts.mempoolAccount),
|
|
@@ -5949,13 +5954,13 @@ function getRevealStakeInstruction(input, config) {
|
|
|
5949
5954
|
getAccountMeta(accounts.systemProgram),
|
|
5950
5955
|
getAccountMeta(accounts.arciumProgram)
|
|
5951
5956
|
],
|
|
5952
|
-
data:
|
|
5957
|
+
data: getRevealVouchInstructionDataEncoder().encode(
|
|
5953
5958
|
args
|
|
5954
5959
|
),
|
|
5955
5960
|
programAddress
|
|
5956
5961
|
});
|
|
5957
5962
|
}
|
|
5958
|
-
function
|
|
5963
|
+
function parseRevealVouchInstruction(instruction) {
|
|
5959
5964
|
if (instruction.accounts.length < 15) {
|
|
5960
5965
|
throw new Error("Not enough accounts");
|
|
5961
5966
|
}
|
|
@@ -5971,7 +5976,7 @@ function parseRevealStakeInstruction(instruction) {
|
|
|
5971
5976
|
signer: getNextAccount(),
|
|
5972
5977
|
owner: getNextAccount(),
|
|
5973
5978
|
market: getNextAccount(),
|
|
5974
|
-
|
|
5979
|
+
vouchAccount: getNextAccount(),
|
|
5975
5980
|
signPdaAccount: getNextAccount(),
|
|
5976
5981
|
mxeAccount: getNextAccount(),
|
|
5977
5982
|
mempoolAccount: getNextAccount(),
|
|
@@ -5984,11 +5989,11 @@ function parseRevealStakeInstruction(instruction) {
|
|
|
5984
5989
|
systemProgram: getNextAccount(),
|
|
5985
5990
|
arciumProgram: getNextAccount()
|
|
5986
5991
|
},
|
|
5987
|
-
data:
|
|
5992
|
+
data: getRevealVouchInstructionDataDecoder().decode(instruction.data)
|
|
5988
5993
|
};
|
|
5989
5994
|
}
|
|
5990
5995
|
|
|
5991
|
-
// src/generated/instructions/
|
|
5996
|
+
// src/generated/instructions/revealVouchCallback.ts
|
|
5992
5997
|
import {
|
|
5993
5998
|
combineCodec as combineCodec78,
|
|
5994
5999
|
fixDecoderSize as fixDecoderSize26,
|
|
@@ -6009,22 +6014,22 @@ import {
|
|
|
6009
6014
|
getUnitEncoder,
|
|
6010
6015
|
transformEncoder as transformEncoder26
|
|
6011
6016
|
} from "@solana/kit";
|
|
6012
|
-
var
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6017
|
+
var REVEAL_VOUCH_CALLBACK_DISCRIMINATOR = new Uint8Array([
|
|
6018
|
+
251,
|
|
6019
|
+
246,
|
|
6020
|
+
6,
|
|
6021
|
+
118,
|
|
6022
|
+
139,
|
|
6023
|
+
46,
|
|
6024
|
+
136,
|
|
6025
|
+
190
|
|
6021
6026
|
]);
|
|
6022
|
-
function
|
|
6027
|
+
function getRevealVouchCallbackDiscriminatorBytes() {
|
|
6023
6028
|
return fixEncoderSize27(getBytesEncoder27(), 8).encode(
|
|
6024
|
-
|
|
6029
|
+
REVEAL_VOUCH_CALLBACK_DISCRIMINATOR
|
|
6025
6030
|
);
|
|
6026
6031
|
}
|
|
6027
|
-
function
|
|
6032
|
+
function getRevealVouchCallbackInstructionDataEncoder() {
|
|
6028
6033
|
return transformEncoder26(
|
|
6029
6034
|
getStructEncoder72([
|
|
6030
6035
|
["discriminator", fixEncoderSize27(getBytesEncoder27(), 8)],
|
|
@@ -6037,7 +6042,7 @@ function getRevealStakeCallbackInstructionDataEncoder() {
|
|
|
6037
6042
|
[
|
|
6038
6043
|
"fields",
|
|
6039
6044
|
getTupleEncoder6([
|
|
6040
|
-
|
|
6045
|
+
getRevealVouchOutputEncoder(),
|
|
6041
6046
|
getArrayEncoder16(getU8Encoder23(), { size: 64 })
|
|
6042
6047
|
])
|
|
6043
6048
|
]
|
|
@@ -6047,7 +6052,7 @@ function getRevealStakeCallbackInstructionDataEncoder() {
|
|
|
6047
6052
|
[
|
|
6048
6053
|
"MarkerForIdlBuildDoNotUseThis",
|
|
6049
6054
|
getStructEncoder72([
|
|
6050
|
-
["fields", getTupleEncoder6([
|
|
6055
|
+
["fields", getTupleEncoder6([getRevealVouchOutputEncoder()])]
|
|
6051
6056
|
])
|
|
6052
6057
|
]
|
|
6053
6058
|
])
|
|
@@ -6055,11 +6060,11 @@ function getRevealStakeCallbackInstructionDataEncoder() {
|
|
|
6055
6060
|
]),
|
|
6056
6061
|
(value) => ({
|
|
6057
6062
|
...value,
|
|
6058
|
-
discriminator:
|
|
6063
|
+
discriminator: REVEAL_VOUCH_CALLBACK_DISCRIMINATOR
|
|
6059
6064
|
})
|
|
6060
6065
|
);
|
|
6061
6066
|
}
|
|
6062
|
-
function
|
|
6067
|
+
function getRevealVouchCallbackInstructionDataDecoder() {
|
|
6063
6068
|
return getStructDecoder72([
|
|
6064
6069
|
["discriminator", fixDecoderSize26(getBytesDecoder26(), 8)],
|
|
6065
6070
|
[
|
|
@@ -6071,7 +6076,7 @@ function getRevealStakeCallbackInstructionDataDecoder() {
|
|
|
6071
6076
|
[
|
|
6072
6077
|
"fields",
|
|
6073
6078
|
getTupleDecoder6([
|
|
6074
|
-
|
|
6079
|
+
getRevealVouchOutputDecoder(),
|
|
6075
6080
|
getArrayDecoder16(getU8Decoder23(), { size: 64 })
|
|
6076
6081
|
])
|
|
6077
6082
|
]
|
|
@@ -6081,20 +6086,20 @@ function getRevealStakeCallbackInstructionDataDecoder() {
|
|
|
6081
6086
|
[
|
|
6082
6087
|
"MarkerForIdlBuildDoNotUseThis",
|
|
6083
6088
|
getStructDecoder72([
|
|
6084
|
-
["fields", getTupleDecoder6([
|
|
6089
|
+
["fields", getTupleDecoder6([getRevealVouchOutputDecoder()])]
|
|
6085
6090
|
])
|
|
6086
6091
|
]
|
|
6087
6092
|
])
|
|
6088
6093
|
]
|
|
6089
6094
|
]);
|
|
6090
6095
|
}
|
|
6091
|
-
function
|
|
6096
|
+
function getRevealVouchCallbackInstructionDataCodec() {
|
|
6092
6097
|
return combineCodec78(
|
|
6093
|
-
|
|
6094
|
-
|
|
6098
|
+
getRevealVouchCallbackInstructionDataEncoder(),
|
|
6099
|
+
getRevealVouchCallbackInstructionDataDecoder()
|
|
6095
6100
|
);
|
|
6096
6101
|
}
|
|
6097
|
-
function
|
|
6102
|
+
function getRevealVouchCallbackInstruction(input, config) {
|
|
6098
6103
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
6099
6104
|
const originalAccounts = {
|
|
6100
6105
|
arciumProgram: { value: input.arciumProgram ?? null, isWritable: false },
|
|
@@ -6109,7 +6114,7 @@ function getRevealStakeCallbackInstruction(input, config) {
|
|
|
6109
6114
|
value: input.instructionsSysvar ?? null,
|
|
6110
6115
|
isWritable: false
|
|
6111
6116
|
},
|
|
6112
|
-
|
|
6117
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true }
|
|
6113
6118
|
};
|
|
6114
6119
|
const accounts = originalAccounts;
|
|
6115
6120
|
const args = { ...input };
|
|
@@ -6128,15 +6133,15 @@ function getRevealStakeCallbackInstruction(input, config) {
|
|
|
6128
6133
|
getAccountMeta(accounts.computationAccount),
|
|
6129
6134
|
getAccountMeta(accounts.clusterAccount),
|
|
6130
6135
|
getAccountMeta(accounts.instructionsSysvar),
|
|
6131
|
-
getAccountMeta(accounts.
|
|
6136
|
+
getAccountMeta(accounts.vouchAccount)
|
|
6132
6137
|
],
|
|
6133
|
-
data:
|
|
6138
|
+
data: getRevealVouchCallbackInstructionDataEncoder().encode(
|
|
6134
6139
|
args
|
|
6135
6140
|
),
|
|
6136
6141
|
programAddress
|
|
6137
6142
|
});
|
|
6138
6143
|
}
|
|
6139
|
-
function
|
|
6144
|
+
function parseRevealVouchCallbackInstruction(instruction) {
|
|
6140
6145
|
if (instruction.accounts.length < 7) {
|
|
6141
6146
|
throw new Error("Not enough accounts");
|
|
6142
6147
|
}
|
|
@@ -6155,15 +6160,15 @@ function parseRevealStakeCallbackInstruction(instruction) {
|
|
|
6155
6160
|
computationAccount: getNextAccount(),
|
|
6156
6161
|
clusterAccount: getNextAccount(),
|
|
6157
6162
|
instructionsSysvar: getNextAccount(),
|
|
6158
|
-
|
|
6163
|
+
vouchAccount: getNextAccount()
|
|
6159
6164
|
},
|
|
6160
|
-
data:
|
|
6165
|
+
data: getRevealVouchCallbackInstructionDataDecoder().decode(
|
|
6161
6166
|
instruction.data
|
|
6162
6167
|
)
|
|
6163
6168
|
};
|
|
6164
6169
|
}
|
|
6165
6170
|
|
|
6166
|
-
// src/generated/instructions/
|
|
6171
|
+
// src/generated/instructions/revealVouchCompDef.ts
|
|
6167
6172
|
import {
|
|
6168
6173
|
combineCodec as combineCodec79,
|
|
6169
6174
|
fixDecoderSize as fixDecoderSize27,
|
|
@@ -6174,42 +6179,42 @@ import {
|
|
|
6174
6179
|
getStructEncoder as getStructEncoder73,
|
|
6175
6180
|
transformEncoder as transformEncoder27
|
|
6176
6181
|
} from "@solana/kit";
|
|
6177
|
-
var
|
|
6178
|
-
|
|
6179
|
-
|
|
6180
|
-
|
|
6181
|
-
|
|
6182
|
-
|
|
6183
|
-
|
|
6184
|
-
|
|
6185
|
-
|
|
6182
|
+
var REVEAL_VOUCH_COMP_DEF_DISCRIMINATOR = new Uint8Array([
|
|
6183
|
+
176,
|
|
6184
|
+
228,
|
|
6185
|
+
5,
|
|
6186
|
+
47,
|
|
6187
|
+
19,
|
|
6188
|
+
6,
|
|
6189
|
+
243,
|
|
6190
|
+
236
|
|
6186
6191
|
]);
|
|
6187
|
-
function
|
|
6192
|
+
function getRevealVouchCompDefDiscriminatorBytes() {
|
|
6188
6193
|
return fixEncoderSize28(getBytesEncoder28(), 8).encode(
|
|
6189
|
-
|
|
6194
|
+
REVEAL_VOUCH_COMP_DEF_DISCRIMINATOR
|
|
6190
6195
|
);
|
|
6191
6196
|
}
|
|
6192
|
-
function
|
|
6197
|
+
function getRevealVouchCompDefInstructionDataEncoder() {
|
|
6193
6198
|
return transformEncoder27(
|
|
6194
6199
|
getStructEncoder73([["discriminator", fixEncoderSize28(getBytesEncoder28(), 8)]]),
|
|
6195
6200
|
(value) => ({
|
|
6196
6201
|
...value,
|
|
6197
|
-
discriminator:
|
|
6202
|
+
discriminator: REVEAL_VOUCH_COMP_DEF_DISCRIMINATOR
|
|
6198
6203
|
})
|
|
6199
6204
|
);
|
|
6200
6205
|
}
|
|
6201
|
-
function
|
|
6206
|
+
function getRevealVouchCompDefInstructionDataDecoder() {
|
|
6202
6207
|
return getStructDecoder73([
|
|
6203
6208
|
["discriminator", fixDecoderSize27(getBytesDecoder27(), 8)]
|
|
6204
6209
|
]);
|
|
6205
6210
|
}
|
|
6206
|
-
function
|
|
6211
|
+
function getRevealVouchCompDefInstructionDataCodec() {
|
|
6207
6212
|
return combineCodec79(
|
|
6208
|
-
|
|
6209
|
-
|
|
6213
|
+
getRevealVouchCompDefInstructionDataEncoder(),
|
|
6214
|
+
getRevealVouchCompDefInstructionDataDecoder()
|
|
6210
6215
|
);
|
|
6211
6216
|
}
|
|
6212
|
-
function
|
|
6217
|
+
function getRevealVouchCompDefInstruction(input, config) {
|
|
6213
6218
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
6214
6219
|
const originalAccounts = {
|
|
6215
6220
|
payer: { value: input.payer ?? null, isWritable: true },
|
|
@@ -6244,11 +6249,11 @@ function getRevealStakeCompDefInstruction(input, config) {
|
|
|
6244
6249
|
getAccountMeta(accounts.arciumProgram),
|
|
6245
6250
|
getAccountMeta(accounts.systemProgram)
|
|
6246
6251
|
],
|
|
6247
|
-
data:
|
|
6252
|
+
data: getRevealVouchCompDefInstructionDataEncoder().encode({}),
|
|
6248
6253
|
programAddress
|
|
6249
6254
|
});
|
|
6250
6255
|
}
|
|
6251
|
-
function
|
|
6256
|
+
function parseRevealVouchCompDefInstruction(instruction) {
|
|
6252
6257
|
if (instruction.accounts.length < 7) {
|
|
6253
6258
|
throw new Error("Not enough accounts");
|
|
6254
6259
|
}
|
|
@@ -6269,7 +6274,7 @@ function parseRevealStakeCompDefInstruction(instruction) {
|
|
|
6269
6274
|
arciumProgram: getNextAccount(),
|
|
6270
6275
|
systemProgram: getNextAccount()
|
|
6271
6276
|
},
|
|
6272
|
-
data:
|
|
6277
|
+
data: getRevealVouchCompDefInstructionDataDecoder().decode(
|
|
6273
6278
|
instruction.data
|
|
6274
6279
|
)
|
|
6275
6280
|
};
|
|
@@ -6595,60 +6600,155 @@ function parseSetWinningOptionInstruction(instruction) {
|
|
|
6595
6600
|
};
|
|
6596
6601
|
}
|
|
6597
6602
|
|
|
6598
|
-
// src/generated/instructions/
|
|
6603
|
+
// src/generated/instructions/updatePlatformConfig.ts
|
|
6599
6604
|
import {
|
|
6600
6605
|
combineCodec as combineCodec83,
|
|
6601
6606
|
fixDecoderSize as fixDecoderSize31,
|
|
6602
6607
|
fixEncoderSize as fixEncoderSize32,
|
|
6603
|
-
getAddressEncoder as getAddressEncoder50,
|
|
6604
6608
|
getBytesDecoder as getBytesDecoder31,
|
|
6605
6609
|
getBytesEncoder as getBytesEncoder32,
|
|
6606
|
-
getProgramDerivedAddress as getProgramDerivedAddress16,
|
|
6607
6610
|
getStructDecoder as getStructDecoder77,
|
|
6608
6611
|
getStructEncoder as getStructEncoder77,
|
|
6609
6612
|
transformEncoder as transformEncoder31
|
|
6610
6613
|
} from "@solana/kit";
|
|
6611
|
-
var
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
|
|
6617
|
-
|
|
6618
|
-
|
|
6619
|
-
|
|
6614
|
+
var UPDATE_PLATFORM_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
6615
|
+
195,
|
|
6616
|
+
60,
|
|
6617
|
+
76,
|
|
6618
|
+
129,
|
|
6619
|
+
146,
|
|
6620
|
+
45,
|
|
6621
|
+
67,
|
|
6622
|
+
143
|
|
6620
6623
|
]);
|
|
6621
|
-
function
|
|
6622
|
-
return fixEncoderSize32(getBytesEncoder32(), 8).encode(
|
|
6624
|
+
function getUpdatePlatformConfigDiscriminatorBytes() {
|
|
6625
|
+
return fixEncoderSize32(getBytesEncoder32(), 8).encode(
|
|
6626
|
+
UPDATE_PLATFORM_CONFIG_DISCRIMINATOR
|
|
6627
|
+
);
|
|
6623
6628
|
}
|
|
6624
|
-
function
|
|
6629
|
+
function getUpdatePlatformConfigInstructionDataEncoder() {
|
|
6625
6630
|
return transformEncoder31(
|
|
6626
6631
|
getStructEncoder77([
|
|
6627
6632
|
["discriminator", fixEncoderSize32(getBytesEncoder32(), 8)],
|
|
6628
|
-
["params",
|
|
6633
|
+
["params", getUpdatePlatformParametersEncoder()]
|
|
6629
6634
|
]),
|
|
6630
|
-
(value) => ({
|
|
6635
|
+
(value) => ({
|
|
6636
|
+
...value,
|
|
6637
|
+
discriminator: UPDATE_PLATFORM_CONFIG_DISCRIMINATOR
|
|
6638
|
+
})
|
|
6631
6639
|
);
|
|
6632
6640
|
}
|
|
6633
|
-
function
|
|
6641
|
+
function getUpdatePlatformConfigInstructionDataDecoder() {
|
|
6634
6642
|
return getStructDecoder77([
|
|
6635
6643
|
["discriminator", fixDecoderSize31(getBytesDecoder31(), 8)],
|
|
6636
|
-
["params",
|
|
6644
|
+
["params", getUpdatePlatformParametersDecoder()]
|
|
6637
6645
|
]);
|
|
6638
6646
|
}
|
|
6639
|
-
function
|
|
6647
|
+
function getUpdatePlatformConfigInstructionDataCodec() {
|
|
6640
6648
|
return combineCodec83(
|
|
6641
|
-
|
|
6642
|
-
|
|
6649
|
+
getUpdatePlatformConfigInstructionDataEncoder(),
|
|
6650
|
+
getUpdatePlatformConfigInstructionDataDecoder()
|
|
6651
|
+
);
|
|
6652
|
+
}
|
|
6653
|
+
function getUpdatePlatformConfigInstruction(input, config) {
|
|
6654
|
+
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
6655
|
+
const originalAccounts = {
|
|
6656
|
+
updateAuthority: {
|
|
6657
|
+
value: input.updateAuthority ?? null,
|
|
6658
|
+
isWritable: false
|
|
6659
|
+
},
|
|
6660
|
+
platformConfig: { value: input.platformConfig ?? null, isWritable: true }
|
|
6661
|
+
};
|
|
6662
|
+
const accounts = originalAccounts;
|
|
6663
|
+
const args = { ...input };
|
|
6664
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
6665
|
+
return Object.freeze({
|
|
6666
|
+
accounts: [
|
|
6667
|
+
getAccountMeta(accounts.updateAuthority),
|
|
6668
|
+
getAccountMeta(accounts.platformConfig)
|
|
6669
|
+
],
|
|
6670
|
+
data: getUpdatePlatformConfigInstructionDataEncoder().encode(
|
|
6671
|
+
args
|
|
6672
|
+
),
|
|
6673
|
+
programAddress
|
|
6674
|
+
});
|
|
6675
|
+
}
|
|
6676
|
+
function parseUpdatePlatformConfigInstruction(instruction) {
|
|
6677
|
+
if (instruction.accounts.length < 2) {
|
|
6678
|
+
throw new Error("Not enough accounts");
|
|
6679
|
+
}
|
|
6680
|
+
let accountIndex = 0;
|
|
6681
|
+
const getNextAccount = () => {
|
|
6682
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
6683
|
+
accountIndex += 1;
|
|
6684
|
+
return accountMeta;
|
|
6685
|
+
};
|
|
6686
|
+
return {
|
|
6687
|
+
programAddress: instruction.programAddress,
|
|
6688
|
+
accounts: {
|
|
6689
|
+
updateAuthority: getNextAccount(),
|
|
6690
|
+
platformConfig: getNextAccount()
|
|
6691
|
+
},
|
|
6692
|
+
data: getUpdatePlatformConfigInstructionDataDecoder().decode(
|
|
6693
|
+
instruction.data
|
|
6694
|
+
)
|
|
6695
|
+
};
|
|
6696
|
+
}
|
|
6697
|
+
|
|
6698
|
+
// src/generated/instructions/vouch.ts
|
|
6699
|
+
import {
|
|
6700
|
+
combineCodec as combineCodec84,
|
|
6701
|
+
fixDecoderSize as fixDecoderSize32,
|
|
6702
|
+
fixEncoderSize as fixEncoderSize33,
|
|
6703
|
+
getAddressEncoder as getAddressEncoder50,
|
|
6704
|
+
getBytesDecoder as getBytesDecoder32,
|
|
6705
|
+
getBytesEncoder as getBytesEncoder33,
|
|
6706
|
+
getProgramDerivedAddress as getProgramDerivedAddress16,
|
|
6707
|
+
getStructDecoder as getStructDecoder78,
|
|
6708
|
+
getStructEncoder as getStructEncoder78,
|
|
6709
|
+
transformEncoder as transformEncoder32
|
|
6710
|
+
} from "@solana/kit";
|
|
6711
|
+
var VOUCH_DISCRIMINATOR = new Uint8Array([
|
|
6712
|
+
87,
|
|
6713
|
+
240,
|
|
6714
|
+
8,
|
|
6715
|
+
21,
|
|
6716
|
+
219,
|
|
6717
|
+
179,
|
|
6718
|
+
242,
|
|
6719
|
+
177
|
|
6720
|
+
]);
|
|
6721
|
+
function getVouchDiscriminatorBytes() {
|
|
6722
|
+
return fixEncoderSize33(getBytesEncoder33(), 8).encode(VOUCH_DISCRIMINATOR);
|
|
6723
|
+
}
|
|
6724
|
+
function getVouchInstructionDataEncoder() {
|
|
6725
|
+
return transformEncoder32(
|
|
6726
|
+
getStructEncoder78([
|
|
6727
|
+
["discriminator", fixEncoderSize33(getBytesEncoder33(), 8)],
|
|
6728
|
+
["params", getVouchParametersEncoder()]
|
|
6729
|
+
]),
|
|
6730
|
+
(value) => ({ ...value, discriminator: VOUCH_DISCRIMINATOR })
|
|
6731
|
+
);
|
|
6732
|
+
}
|
|
6733
|
+
function getVouchInstructionDataDecoder() {
|
|
6734
|
+
return getStructDecoder78([
|
|
6735
|
+
["discriminator", fixDecoderSize32(getBytesDecoder32(), 8)],
|
|
6736
|
+
["params", getVouchParametersDecoder()]
|
|
6737
|
+
]);
|
|
6738
|
+
}
|
|
6739
|
+
function getVouchInstructionDataCodec() {
|
|
6740
|
+
return combineCodec84(
|
|
6741
|
+
getVouchInstructionDataEncoder(),
|
|
6742
|
+
getVouchInstructionDataDecoder()
|
|
6643
6743
|
);
|
|
6644
6744
|
}
|
|
6645
|
-
async function
|
|
6745
|
+
async function getVouchInstructionAsync(input, config) {
|
|
6646
6746
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
6647
6747
|
const originalAccounts = {
|
|
6648
6748
|
signer: { value: input.signer ?? null, isWritable: false },
|
|
6649
6749
|
payer: { value: input.payer ?? null, isWritable: true },
|
|
6650
6750
|
market: { value: input.market ?? null, isWritable: true },
|
|
6651
|
-
|
|
6751
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true },
|
|
6652
6752
|
tokenMint: { value: input.tokenMint ?? null, isWritable: false },
|
|
6653
6753
|
signerTokenAccount: {
|
|
6654
6754
|
value: input.signerTokenAccount ?? null,
|
|
@@ -6687,7 +6787,7 @@ async function getStakeInstructionAsync(input, config) {
|
|
|
6687
6787
|
accounts.signPdaAccount.value = await getProgramDerivedAddress16({
|
|
6688
6788
|
programAddress,
|
|
6689
6789
|
seeds: [
|
|
6690
|
-
|
|
6790
|
+
getBytesEncoder33().encode(
|
|
6691
6791
|
new Uint8Array([
|
|
6692
6792
|
65,
|
|
6693
6793
|
114,
|
|
@@ -6731,7 +6831,7 @@ async function getStakeInstructionAsync(input, config) {
|
|
|
6731
6831
|
getAccountMeta(accounts.signer),
|
|
6732
6832
|
getAccountMeta(accounts.payer),
|
|
6733
6833
|
getAccountMeta(accounts.market),
|
|
6734
|
-
getAccountMeta(accounts.
|
|
6834
|
+
getAccountMeta(accounts.vouchAccount),
|
|
6735
6835
|
getAccountMeta(accounts.tokenMint),
|
|
6736
6836
|
getAccountMeta(accounts.signerTokenAccount),
|
|
6737
6837
|
getAccountMeta(accounts.marketTokenAta),
|
|
@@ -6748,19 +6848,19 @@ async function getStakeInstructionAsync(input, config) {
|
|
|
6748
6848
|
getAccountMeta(accounts.systemProgram),
|
|
6749
6849
|
getAccountMeta(accounts.arciumProgram)
|
|
6750
6850
|
],
|
|
6751
|
-
data:
|
|
6851
|
+
data: getVouchInstructionDataEncoder().encode(
|
|
6752
6852
|
args
|
|
6753
6853
|
),
|
|
6754
6854
|
programAddress
|
|
6755
6855
|
});
|
|
6756
6856
|
}
|
|
6757
|
-
function
|
|
6857
|
+
function getVouchInstruction(input, config) {
|
|
6758
6858
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
6759
6859
|
const originalAccounts = {
|
|
6760
6860
|
signer: { value: input.signer ?? null, isWritable: false },
|
|
6761
6861
|
payer: { value: input.payer ?? null, isWritable: true },
|
|
6762
6862
|
market: { value: input.market ?? null, isWritable: true },
|
|
6763
|
-
|
|
6863
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true },
|
|
6764
6864
|
tokenMint: { value: input.tokenMint ?? null, isWritable: false },
|
|
6765
6865
|
signerTokenAccount: {
|
|
6766
6866
|
value: input.signerTokenAccount ?? null,
|
|
@@ -6803,7 +6903,7 @@ function getStakeInstruction(input, config) {
|
|
|
6803
6903
|
getAccountMeta(accounts.signer),
|
|
6804
6904
|
getAccountMeta(accounts.payer),
|
|
6805
6905
|
getAccountMeta(accounts.market),
|
|
6806
|
-
getAccountMeta(accounts.
|
|
6906
|
+
getAccountMeta(accounts.vouchAccount),
|
|
6807
6907
|
getAccountMeta(accounts.tokenMint),
|
|
6808
6908
|
getAccountMeta(accounts.signerTokenAccount),
|
|
6809
6909
|
getAccountMeta(accounts.marketTokenAta),
|
|
@@ -6820,13 +6920,13 @@ function getStakeInstruction(input, config) {
|
|
|
6820
6920
|
getAccountMeta(accounts.systemProgram),
|
|
6821
6921
|
getAccountMeta(accounts.arciumProgram)
|
|
6822
6922
|
],
|
|
6823
|
-
data:
|
|
6923
|
+
data: getVouchInstructionDataEncoder().encode(
|
|
6824
6924
|
args
|
|
6825
6925
|
),
|
|
6826
6926
|
programAddress
|
|
6827
6927
|
});
|
|
6828
6928
|
}
|
|
6829
|
-
function
|
|
6929
|
+
function parseVouchInstruction(instruction) {
|
|
6830
6930
|
if (instruction.accounts.length < 19) {
|
|
6831
6931
|
throw new Error("Not enough accounts");
|
|
6832
6932
|
}
|
|
@@ -6842,7 +6942,7 @@ function parseStakeInstruction(instruction) {
|
|
|
6842
6942
|
signer: getNextAccount(),
|
|
6843
6943
|
payer: getNextAccount(),
|
|
6844
6944
|
market: getNextAccount(),
|
|
6845
|
-
|
|
6945
|
+
vouchAccount: getNextAccount(),
|
|
6846
6946
|
tokenMint: getNextAccount(),
|
|
6847
6947
|
signerTokenAccount: getNextAccount(),
|
|
6848
6948
|
marketTokenAta: getNextAccount(),
|
|
@@ -6859,60 +6959,60 @@ function parseStakeInstruction(instruction) {
|
|
|
6859
6959
|
systemProgram: getNextAccount(),
|
|
6860
6960
|
arciumProgram: getNextAccount()
|
|
6861
6961
|
},
|
|
6862
|
-
data:
|
|
6962
|
+
data: getVouchInstructionDataDecoder().decode(instruction.data)
|
|
6863
6963
|
};
|
|
6864
6964
|
}
|
|
6865
6965
|
|
|
6866
|
-
// src/generated/instructions/
|
|
6966
|
+
// src/generated/instructions/vouchCallback.ts
|
|
6867
6967
|
import {
|
|
6868
|
-
combineCodec as
|
|
6869
|
-
fixDecoderSize as
|
|
6870
|
-
fixEncoderSize as
|
|
6968
|
+
combineCodec as combineCodec85,
|
|
6969
|
+
fixDecoderSize as fixDecoderSize33,
|
|
6970
|
+
fixEncoderSize as fixEncoderSize34,
|
|
6871
6971
|
getArrayDecoder as getArrayDecoder17,
|
|
6872
6972
|
getArrayEncoder as getArrayEncoder17,
|
|
6873
|
-
getBytesDecoder as
|
|
6874
|
-
getBytesEncoder as
|
|
6973
|
+
getBytesDecoder as getBytesDecoder33,
|
|
6974
|
+
getBytesEncoder as getBytesEncoder34,
|
|
6875
6975
|
getDiscriminatedUnionDecoder as getDiscriminatedUnionDecoder5,
|
|
6876
6976
|
getDiscriminatedUnionEncoder as getDiscriminatedUnionEncoder5,
|
|
6877
|
-
getStructDecoder as
|
|
6878
|
-
getStructEncoder as
|
|
6977
|
+
getStructDecoder as getStructDecoder79,
|
|
6978
|
+
getStructEncoder as getStructEncoder79,
|
|
6879
6979
|
getTupleDecoder as getTupleDecoder7,
|
|
6880
6980
|
getTupleEncoder as getTupleEncoder7,
|
|
6881
6981
|
getU8Decoder as getU8Decoder24,
|
|
6882
6982
|
getU8Encoder as getU8Encoder24,
|
|
6883
6983
|
getUnitDecoder as getUnitDecoder2,
|
|
6884
6984
|
getUnitEncoder as getUnitEncoder2,
|
|
6885
|
-
transformEncoder as
|
|
6985
|
+
transformEncoder as transformEncoder33
|
|
6886
6986
|
} from "@solana/kit";
|
|
6887
|
-
var
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
|
|
6895
|
-
|
|
6987
|
+
var VOUCH_CALLBACK_DISCRIMINATOR = new Uint8Array([
|
|
6988
|
+
10,
|
|
6989
|
+
0,
|
|
6990
|
+
52,
|
|
6991
|
+
15,
|
|
6992
|
+
179,
|
|
6993
|
+
148,
|
|
6994
|
+
194,
|
|
6995
|
+
135
|
|
6896
6996
|
]);
|
|
6897
|
-
function
|
|
6898
|
-
return
|
|
6899
|
-
|
|
6997
|
+
function getVouchCallbackDiscriminatorBytes() {
|
|
6998
|
+
return fixEncoderSize34(getBytesEncoder34(), 8).encode(
|
|
6999
|
+
VOUCH_CALLBACK_DISCRIMINATOR
|
|
6900
7000
|
);
|
|
6901
7001
|
}
|
|
6902
|
-
function
|
|
6903
|
-
return
|
|
6904
|
-
|
|
6905
|
-
["discriminator",
|
|
7002
|
+
function getVouchCallbackInstructionDataEncoder() {
|
|
7003
|
+
return transformEncoder33(
|
|
7004
|
+
getStructEncoder79([
|
|
7005
|
+
["discriminator", fixEncoderSize34(getBytesEncoder34(), 8)],
|
|
6906
7006
|
[
|
|
6907
7007
|
"output",
|
|
6908
7008
|
getDiscriminatedUnionEncoder5([
|
|
6909
7009
|
[
|
|
6910
7010
|
"Success",
|
|
6911
|
-
|
|
7011
|
+
getStructEncoder79([
|
|
6912
7012
|
[
|
|
6913
7013
|
"fields",
|
|
6914
7014
|
getTupleEncoder7([
|
|
6915
|
-
|
|
7015
|
+
getVouchOutputEncoder(),
|
|
6916
7016
|
getArrayEncoder17(getU8Encoder24(), { size: 64 })
|
|
6917
7017
|
])
|
|
6918
7018
|
]
|
|
@@ -6921,29 +7021,29 @@ function getStakeCallbackInstructionDataEncoder() {
|
|
|
6921
7021
|
["Failure", getUnitEncoder2()],
|
|
6922
7022
|
[
|
|
6923
7023
|
"MarkerForIdlBuildDoNotUseThis",
|
|
6924
|
-
|
|
6925
|
-
["fields", getTupleEncoder7([
|
|
7024
|
+
getStructEncoder79([
|
|
7025
|
+
["fields", getTupleEncoder7([getVouchOutputEncoder()])]
|
|
6926
7026
|
])
|
|
6927
7027
|
]
|
|
6928
7028
|
])
|
|
6929
7029
|
]
|
|
6930
7030
|
]),
|
|
6931
|
-
(value) => ({ ...value, discriminator:
|
|
7031
|
+
(value) => ({ ...value, discriminator: VOUCH_CALLBACK_DISCRIMINATOR })
|
|
6932
7032
|
);
|
|
6933
7033
|
}
|
|
6934
|
-
function
|
|
6935
|
-
return
|
|
6936
|
-
["discriminator",
|
|
7034
|
+
function getVouchCallbackInstructionDataDecoder() {
|
|
7035
|
+
return getStructDecoder79([
|
|
7036
|
+
["discriminator", fixDecoderSize33(getBytesDecoder33(), 8)],
|
|
6937
7037
|
[
|
|
6938
7038
|
"output",
|
|
6939
7039
|
getDiscriminatedUnionDecoder5([
|
|
6940
7040
|
[
|
|
6941
7041
|
"Success",
|
|
6942
|
-
|
|
7042
|
+
getStructDecoder79([
|
|
6943
7043
|
[
|
|
6944
7044
|
"fields",
|
|
6945
7045
|
getTupleDecoder7([
|
|
6946
|
-
|
|
7046
|
+
getVouchOutputDecoder(),
|
|
6947
7047
|
getArrayDecoder17(getU8Decoder24(), { size: 64 })
|
|
6948
7048
|
])
|
|
6949
7049
|
]
|
|
@@ -6952,21 +7052,21 @@ function getStakeCallbackInstructionDataDecoder() {
|
|
|
6952
7052
|
["Failure", getUnitDecoder2()],
|
|
6953
7053
|
[
|
|
6954
7054
|
"MarkerForIdlBuildDoNotUseThis",
|
|
6955
|
-
|
|
6956
|
-
["fields", getTupleDecoder7([
|
|
7055
|
+
getStructDecoder79([
|
|
7056
|
+
["fields", getTupleDecoder7([getVouchOutputDecoder()])]
|
|
6957
7057
|
])
|
|
6958
7058
|
]
|
|
6959
7059
|
])
|
|
6960
7060
|
]
|
|
6961
7061
|
]);
|
|
6962
7062
|
}
|
|
6963
|
-
function
|
|
6964
|
-
return
|
|
6965
|
-
|
|
6966
|
-
|
|
7063
|
+
function getVouchCallbackInstructionDataCodec() {
|
|
7064
|
+
return combineCodec85(
|
|
7065
|
+
getVouchCallbackInstructionDataEncoder(),
|
|
7066
|
+
getVouchCallbackInstructionDataDecoder()
|
|
6967
7067
|
);
|
|
6968
7068
|
}
|
|
6969
|
-
function
|
|
7069
|
+
function getVouchCallbackInstruction(input, config) {
|
|
6970
7070
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
6971
7071
|
const originalAccounts = {
|
|
6972
7072
|
arciumProgram: { value: input.arciumProgram ?? null, isWritable: false },
|
|
@@ -6981,7 +7081,7 @@ function getStakeCallbackInstruction(input, config) {
|
|
|
6981
7081
|
value: input.instructionsSysvar ?? null,
|
|
6982
7082
|
isWritable: false
|
|
6983
7083
|
},
|
|
6984
|
-
|
|
7084
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true },
|
|
6985
7085
|
market: { value: input.market ?? null, isWritable: true }
|
|
6986
7086
|
};
|
|
6987
7087
|
const accounts = originalAccounts;
|
|
@@ -7001,16 +7101,16 @@ function getStakeCallbackInstruction(input, config) {
|
|
|
7001
7101
|
getAccountMeta(accounts.computationAccount),
|
|
7002
7102
|
getAccountMeta(accounts.clusterAccount),
|
|
7003
7103
|
getAccountMeta(accounts.instructionsSysvar),
|
|
7004
|
-
getAccountMeta(accounts.
|
|
7104
|
+
getAccountMeta(accounts.vouchAccount),
|
|
7005
7105
|
getAccountMeta(accounts.market)
|
|
7006
7106
|
],
|
|
7007
|
-
data:
|
|
7107
|
+
data: getVouchCallbackInstructionDataEncoder().encode(
|
|
7008
7108
|
args
|
|
7009
7109
|
),
|
|
7010
7110
|
programAddress
|
|
7011
7111
|
});
|
|
7012
7112
|
}
|
|
7013
|
-
function
|
|
7113
|
+
function parseVouchCallbackInstruction(instruction) {
|
|
7014
7114
|
if (instruction.accounts.length < 8) {
|
|
7015
7115
|
throw new Error("Not enough accounts");
|
|
7016
7116
|
}
|
|
@@ -7029,388 +7129,97 @@ function parseStakeCallbackInstruction(instruction) {
|
|
|
7029
7129
|
computationAccount: getNextAccount(),
|
|
7030
7130
|
clusterAccount: getNextAccount(),
|
|
7031
7131
|
instructionsSysvar: getNextAccount(),
|
|
7032
|
-
|
|
7132
|
+
vouchAccount: getNextAccount(),
|
|
7033
7133
|
market: getNextAccount()
|
|
7034
7134
|
},
|
|
7035
|
-
data:
|
|
7135
|
+
data: getVouchCallbackInstructionDataDecoder().decode(instruction.data)
|
|
7036
7136
|
};
|
|
7037
7137
|
}
|
|
7038
7138
|
|
|
7039
|
-
// src/generated/instructions/
|
|
7040
|
-
import {
|
|
7041
|
-
combineCodec as combineCodec85,
|
|
7042
|
-
fixDecoderSize as fixDecoderSize33,
|
|
7043
|
-
fixEncoderSize as fixEncoderSize34,
|
|
7044
|
-
getBytesDecoder as getBytesDecoder33,
|
|
7045
|
-
getBytesEncoder as getBytesEncoder34,
|
|
7046
|
-
getStructDecoder as getStructDecoder79,
|
|
7047
|
-
getStructEncoder as getStructEncoder79,
|
|
7048
|
-
transformEncoder as transformEncoder33
|
|
7049
|
-
} from "@solana/kit";
|
|
7050
|
-
var STAKE_COMP_DEF_DISCRIMINATOR = new Uint8Array([
|
|
7051
|
-
156,
|
|
7052
|
-
5,
|
|
7053
|
-
60,
|
|
7054
|
-
126,
|
|
7055
|
-
142,
|
|
7056
|
-
149,
|
|
7057
|
-
1,
|
|
7058
|
-
130
|
|
7059
|
-
]);
|
|
7060
|
-
function getStakeCompDefDiscriminatorBytes() {
|
|
7061
|
-
return fixEncoderSize34(getBytesEncoder34(), 8).encode(
|
|
7062
|
-
STAKE_COMP_DEF_DISCRIMINATOR
|
|
7063
|
-
);
|
|
7064
|
-
}
|
|
7065
|
-
function getStakeCompDefInstructionDataEncoder() {
|
|
7066
|
-
return transformEncoder33(
|
|
7067
|
-
getStructEncoder79([["discriminator", fixEncoderSize34(getBytesEncoder34(), 8)]]),
|
|
7068
|
-
(value) => ({ ...value, discriminator: STAKE_COMP_DEF_DISCRIMINATOR })
|
|
7069
|
-
);
|
|
7070
|
-
}
|
|
7071
|
-
function getStakeCompDefInstructionDataDecoder() {
|
|
7072
|
-
return getStructDecoder79([
|
|
7073
|
-
["discriminator", fixDecoderSize33(getBytesDecoder33(), 8)]
|
|
7074
|
-
]);
|
|
7075
|
-
}
|
|
7076
|
-
function getStakeCompDefInstructionDataCodec() {
|
|
7077
|
-
return combineCodec85(
|
|
7078
|
-
getStakeCompDefInstructionDataEncoder(),
|
|
7079
|
-
getStakeCompDefInstructionDataDecoder()
|
|
7080
|
-
);
|
|
7081
|
-
}
|
|
7082
|
-
function getStakeCompDefInstruction(input, config) {
|
|
7083
|
-
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
7084
|
-
const originalAccounts = {
|
|
7085
|
-
payer: { value: input.payer ?? null, isWritable: true },
|
|
7086
|
-
mxeAccount: { value: input.mxeAccount ?? null, isWritable: true },
|
|
7087
|
-
compDefAccount: { value: input.compDefAccount ?? null, isWritable: true },
|
|
7088
|
-
addressLookupTable: {
|
|
7089
|
-
value: input.addressLookupTable ?? null,
|
|
7090
|
-
isWritable: true
|
|
7091
|
-
},
|
|
7092
|
-
lutProgram: { value: input.lutProgram ?? null, isWritable: false },
|
|
7093
|
-
arciumProgram: { value: input.arciumProgram ?? null, isWritable: false },
|
|
7094
|
-
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
7095
|
-
};
|
|
7096
|
-
const accounts = originalAccounts;
|
|
7097
|
-
if (!accounts.lutProgram.value) {
|
|
7098
|
-
accounts.lutProgram.value = "AddressLookupTab1e1111111111111111111111111";
|
|
7099
|
-
}
|
|
7100
|
-
if (!accounts.arciumProgram.value) {
|
|
7101
|
-
accounts.arciumProgram.value = "Arcj82pX7HxYKLR92qvgZUAd7vGS1k4hQvAFcPATFdEQ";
|
|
7102
|
-
}
|
|
7103
|
-
if (!accounts.systemProgram.value) {
|
|
7104
|
-
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
7105
|
-
}
|
|
7106
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
7107
|
-
return Object.freeze({
|
|
7108
|
-
accounts: [
|
|
7109
|
-
getAccountMeta(accounts.payer),
|
|
7110
|
-
getAccountMeta(accounts.mxeAccount),
|
|
7111
|
-
getAccountMeta(accounts.compDefAccount),
|
|
7112
|
-
getAccountMeta(accounts.addressLookupTable),
|
|
7113
|
-
getAccountMeta(accounts.lutProgram),
|
|
7114
|
-
getAccountMeta(accounts.arciumProgram),
|
|
7115
|
-
getAccountMeta(accounts.systemProgram)
|
|
7116
|
-
],
|
|
7117
|
-
data: getStakeCompDefInstructionDataEncoder().encode({}),
|
|
7118
|
-
programAddress
|
|
7119
|
-
});
|
|
7120
|
-
}
|
|
7121
|
-
function parseStakeCompDefInstruction(instruction) {
|
|
7122
|
-
if (instruction.accounts.length < 7) {
|
|
7123
|
-
throw new Error("Not enough accounts");
|
|
7124
|
-
}
|
|
7125
|
-
let accountIndex = 0;
|
|
7126
|
-
const getNextAccount = () => {
|
|
7127
|
-
const accountMeta = instruction.accounts[accountIndex];
|
|
7128
|
-
accountIndex += 1;
|
|
7129
|
-
return accountMeta;
|
|
7130
|
-
};
|
|
7131
|
-
return {
|
|
7132
|
-
programAddress: instruction.programAddress,
|
|
7133
|
-
accounts: {
|
|
7134
|
-
payer: getNextAccount(),
|
|
7135
|
-
mxeAccount: getNextAccount(),
|
|
7136
|
-
compDefAccount: getNextAccount(),
|
|
7137
|
-
addressLookupTable: getNextAccount(),
|
|
7138
|
-
lutProgram: getNextAccount(),
|
|
7139
|
-
arciumProgram: getNextAccount(),
|
|
7140
|
-
systemProgram: getNextAccount()
|
|
7141
|
-
},
|
|
7142
|
-
data: getStakeCompDefInstructionDataDecoder().decode(instruction.data)
|
|
7143
|
-
};
|
|
7144
|
-
}
|
|
7145
|
-
|
|
7146
|
-
// src/generated/instructions/unstake.ts
|
|
7139
|
+
// src/generated/instructions/vouchCompDef.ts
|
|
7147
7140
|
import {
|
|
7148
7141
|
combineCodec as combineCodec86,
|
|
7149
7142
|
fixDecoderSize as fixDecoderSize34,
|
|
7150
7143
|
fixEncoderSize as fixEncoderSize35,
|
|
7151
|
-
getAddressEncoder as getAddressEncoder51,
|
|
7152
7144
|
getBytesDecoder as getBytesDecoder34,
|
|
7153
7145
|
getBytesEncoder as getBytesEncoder35,
|
|
7154
|
-
getProgramDerivedAddress as getProgramDerivedAddress17,
|
|
7155
7146
|
getStructDecoder as getStructDecoder80,
|
|
7156
7147
|
getStructEncoder as getStructEncoder80,
|
|
7157
|
-
getU32Decoder as getU32Decoder22,
|
|
7158
|
-
getU32Encoder as getU32Encoder22,
|
|
7159
7148
|
transformEncoder as transformEncoder34
|
|
7160
7149
|
} from "@solana/kit";
|
|
7161
|
-
var
|
|
7162
|
-
|
|
7150
|
+
var VOUCH_COMP_DEF_DISCRIMINATOR = new Uint8Array([
|
|
7151
|
+
138,
|
|
7152
|
+
27,
|
|
7163
7153
|
95,
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7168
|
-
|
|
7169
|
-
225
|
|
7170
|
-
]);
|
|
7171
|
-
function getUnstakeDiscriminatorBytes() {
|
|
7172
|
-
return fixEncoderSize35(getBytesEncoder35(), 8).encode(UNSTAKE_DISCRIMINATOR);
|
|
7173
|
-
}
|
|
7174
|
-
function getUnstakeInstructionDataEncoder() {
|
|
7175
|
-
return transformEncoder34(
|
|
7176
|
-
getStructEncoder80([
|
|
7177
|
-
["discriminator", fixEncoderSize35(getBytesEncoder35(), 8)],
|
|
7178
|
-
["stakeAccountId", getU32Encoder22()]
|
|
7179
|
-
]),
|
|
7180
|
-
(value) => ({ ...value, discriminator: UNSTAKE_DISCRIMINATOR })
|
|
7181
|
-
);
|
|
7182
|
-
}
|
|
7183
|
-
function getUnstakeInstructionDataDecoder() {
|
|
7184
|
-
return getStructDecoder80([
|
|
7185
|
-
["discriminator", fixDecoderSize34(getBytesDecoder34(), 8)],
|
|
7186
|
-
["stakeAccountId", getU32Decoder22()]
|
|
7187
|
-
]);
|
|
7188
|
-
}
|
|
7189
|
-
function getUnstakeInstructionDataCodec() {
|
|
7190
|
-
return combineCodec86(
|
|
7191
|
-
getUnstakeInstructionDataEncoder(),
|
|
7192
|
-
getUnstakeInstructionDataDecoder()
|
|
7193
|
-
);
|
|
7194
|
-
}
|
|
7195
|
-
async function getUnstakeInstructionAsync(input, config) {
|
|
7196
|
-
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
7197
|
-
const originalAccounts = {
|
|
7198
|
-
signer: { value: input.signer ?? null, isWritable: true },
|
|
7199
|
-
owner: { value: input.owner ?? null, isWritable: false },
|
|
7200
|
-
market: { value: input.market ?? null, isWritable: false },
|
|
7201
|
-
stakeAccount: { value: input.stakeAccount ?? null, isWritable: true },
|
|
7202
|
-
tokenMint: { value: input.tokenMint ?? null, isWritable: false },
|
|
7203
|
-
marketTokenAta: { value: input.marketTokenAta ?? null, isWritable: true },
|
|
7204
|
-
ownerTokenAccount: {
|
|
7205
|
-
value: input.ownerTokenAccount ?? null,
|
|
7206
|
-
isWritable: true
|
|
7207
|
-
},
|
|
7208
|
-
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
7209
|
-
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
7210
|
-
};
|
|
7211
|
-
const accounts = originalAccounts;
|
|
7212
|
-
const args = { ...input };
|
|
7213
|
-
if (!accounts.stakeAccount.value) {
|
|
7214
|
-
accounts.stakeAccount.value = await getProgramDerivedAddress17({
|
|
7215
|
-
programAddress,
|
|
7216
|
-
seeds: [
|
|
7217
|
-
getBytesEncoder35().encode(
|
|
7218
|
-
new Uint8Array([
|
|
7219
|
-
115,
|
|
7220
|
-
116,
|
|
7221
|
-
97,
|
|
7222
|
-
107,
|
|
7223
|
-
101,
|
|
7224
|
-
95,
|
|
7225
|
-
97,
|
|
7226
|
-
99,
|
|
7227
|
-
99,
|
|
7228
|
-
111,
|
|
7229
|
-
117,
|
|
7230
|
-
110,
|
|
7231
|
-
116
|
|
7232
|
-
])
|
|
7233
|
-
),
|
|
7234
|
-
getAddressEncoder51().encode(expectAddress(accounts.owner.value)),
|
|
7235
|
-
getAddressEncoder51().encode(expectAddress(accounts.market.value)),
|
|
7236
|
-
getU32Encoder22().encode(expectSome(args.stakeAccountId))
|
|
7237
|
-
]
|
|
7238
|
-
});
|
|
7239
|
-
}
|
|
7240
|
-
if (!accounts.marketTokenAta.value) {
|
|
7241
|
-
accounts.marketTokenAta.value = await getProgramDerivedAddress17({
|
|
7242
|
-
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
7243
|
-
seeds: [
|
|
7244
|
-
getAddressEncoder51().encode(expectAddress(accounts.market.value)),
|
|
7245
|
-
getAddressEncoder51().encode(expectAddress(accounts.tokenProgram.value)),
|
|
7246
|
-
getAddressEncoder51().encode(expectAddress(accounts.tokenMint.value))
|
|
7247
|
-
]
|
|
7248
|
-
});
|
|
7249
|
-
}
|
|
7250
|
-
if (!accounts.systemProgram.value) {
|
|
7251
|
-
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
7252
|
-
}
|
|
7253
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
7254
|
-
return Object.freeze({
|
|
7255
|
-
accounts: [
|
|
7256
|
-
getAccountMeta(accounts.signer),
|
|
7257
|
-
getAccountMeta(accounts.owner),
|
|
7258
|
-
getAccountMeta(accounts.market),
|
|
7259
|
-
getAccountMeta(accounts.stakeAccount),
|
|
7260
|
-
getAccountMeta(accounts.tokenMint),
|
|
7261
|
-
getAccountMeta(accounts.marketTokenAta),
|
|
7262
|
-
getAccountMeta(accounts.ownerTokenAccount),
|
|
7263
|
-
getAccountMeta(accounts.tokenProgram),
|
|
7264
|
-
getAccountMeta(accounts.systemProgram)
|
|
7265
|
-
],
|
|
7266
|
-
data: getUnstakeInstructionDataEncoder().encode(
|
|
7267
|
-
args
|
|
7268
|
-
),
|
|
7269
|
-
programAddress
|
|
7270
|
-
});
|
|
7271
|
-
}
|
|
7272
|
-
function getUnstakeInstruction(input, config) {
|
|
7273
|
-
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
7274
|
-
const originalAccounts = {
|
|
7275
|
-
signer: { value: input.signer ?? null, isWritable: true },
|
|
7276
|
-
owner: { value: input.owner ?? null, isWritable: false },
|
|
7277
|
-
market: { value: input.market ?? null, isWritable: false },
|
|
7278
|
-
stakeAccount: { value: input.stakeAccount ?? null, isWritable: true },
|
|
7279
|
-
tokenMint: { value: input.tokenMint ?? null, isWritable: false },
|
|
7280
|
-
marketTokenAta: { value: input.marketTokenAta ?? null, isWritable: true },
|
|
7281
|
-
ownerTokenAccount: {
|
|
7282
|
-
value: input.ownerTokenAccount ?? null,
|
|
7283
|
-
isWritable: true
|
|
7284
|
-
},
|
|
7285
|
-
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
7286
|
-
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
7287
|
-
};
|
|
7288
|
-
const accounts = originalAccounts;
|
|
7289
|
-
const args = { ...input };
|
|
7290
|
-
if (!accounts.systemProgram.value) {
|
|
7291
|
-
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
7292
|
-
}
|
|
7293
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
7294
|
-
return Object.freeze({
|
|
7295
|
-
accounts: [
|
|
7296
|
-
getAccountMeta(accounts.signer),
|
|
7297
|
-
getAccountMeta(accounts.owner),
|
|
7298
|
-
getAccountMeta(accounts.market),
|
|
7299
|
-
getAccountMeta(accounts.stakeAccount),
|
|
7300
|
-
getAccountMeta(accounts.tokenMint),
|
|
7301
|
-
getAccountMeta(accounts.marketTokenAta),
|
|
7302
|
-
getAccountMeta(accounts.ownerTokenAccount),
|
|
7303
|
-
getAccountMeta(accounts.tokenProgram),
|
|
7304
|
-
getAccountMeta(accounts.systemProgram)
|
|
7305
|
-
],
|
|
7306
|
-
data: getUnstakeInstructionDataEncoder().encode(
|
|
7307
|
-
args
|
|
7308
|
-
),
|
|
7309
|
-
programAddress
|
|
7310
|
-
});
|
|
7311
|
-
}
|
|
7312
|
-
function parseUnstakeInstruction(instruction) {
|
|
7313
|
-
if (instruction.accounts.length < 9) {
|
|
7314
|
-
throw new Error("Not enough accounts");
|
|
7315
|
-
}
|
|
7316
|
-
let accountIndex = 0;
|
|
7317
|
-
const getNextAccount = () => {
|
|
7318
|
-
const accountMeta = instruction.accounts[accountIndex];
|
|
7319
|
-
accountIndex += 1;
|
|
7320
|
-
return accountMeta;
|
|
7321
|
-
};
|
|
7322
|
-
return {
|
|
7323
|
-
programAddress: instruction.programAddress,
|
|
7324
|
-
accounts: {
|
|
7325
|
-
signer: getNextAccount(),
|
|
7326
|
-
owner: getNextAccount(),
|
|
7327
|
-
market: getNextAccount(),
|
|
7328
|
-
stakeAccount: getNextAccount(),
|
|
7329
|
-
tokenMint: getNextAccount(),
|
|
7330
|
-
marketTokenAta: getNextAccount(),
|
|
7331
|
-
ownerTokenAccount: getNextAccount(),
|
|
7332
|
-
tokenProgram: getNextAccount(),
|
|
7333
|
-
systemProgram: getNextAccount()
|
|
7334
|
-
},
|
|
7335
|
-
data: getUnstakeInstructionDataDecoder().decode(instruction.data)
|
|
7336
|
-
};
|
|
7337
|
-
}
|
|
7338
|
-
|
|
7339
|
-
// src/generated/instructions/updatePlatformConfig.ts
|
|
7340
|
-
import {
|
|
7341
|
-
combineCodec as combineCodec87,
|
|
7342
|
-
fixDecoderSize as fixDecoderSize35,
|
|
7343
|
-
fixEncoderSize as fixEncoderSize36,
|
|
7344
|
-
getBytesDecoder as getBytesDecoder35,
|
|
7345
|
-
getBytesEncoder as getBytesEncoder36,
|
|
7346
|
-
getStructDecoder as getStructDecoder81,
|
|
7347
|
-
getStructEncoder as getStructEncoder81,
|
|
7348
|
-
transformEncoder as transformEncoder35
|
|
7349
|
-
} from "@solana/kit";
|
|
7350
|
-
var UPDATE_PLATFORM_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
7351
|
-
195,
|
|
7352
|
-
60,
|
|
7353
|
-
76,
|
|
7354
|
-
129,
|
|
7355
|
-
146,
|
|
7356
|
-
45,
|
|
7357
|
-
67,
|
|
7358
|
-
143
|
|
7154
|
+
181,
|
|
7155
|
+
9,
|
|
7156
|
+
219,
|
|
7157
|
+
232,
|
|
7158
|
+
219
|
|
7359
7159
|
]);
|
|
7360
|
-
function
|
|
7361
|
-
return
|
|
7362
|
-
|
|
7160
|
+
function getVouchCompDefDiscriminatorBytes() {
|
|
7161
|
+
return fixEncoderSize35(getBytesEncoder35(), 8).encode(
|
|
7162
|
+
VOUCH_COMP_DEF_DISCRIMINATOR
|
|
7363
7163
|
);
|
|
7364
7164
|
}
|
|
7365
|
-
function
|
|
7366
|
-
return
|
|
7367
|
-
|
|
7368
|
-
|
|
7369
|
-
["params", getUpdatePlatformParametersEncoder()]
|
|
7370
|
-
]),
|
|
7371
|
-
(value) => ({
|
|
7372
|
-
...value,
|
|
7373
|
-
discriminator: UPDATE_PLATFORM_CONFIG_DISCRIMINATOR
|
|
7374
|
-
})
|
|
7165
|
+
function getVouchCompDefInstructionDataEncoder() {
|
|
7166
|
+
return transformEncoder34(
|
|
7167
|
+
getStructEncoder80([["discriminator", fixEncoderSize35(getBytesEncoder35(), 8)]]),
|
|
7168
|
+
(value) => ({ ...value, discriminator: VOUCH_COMP_DEF_DISCRIMINATOR })
|
|
7375
7169
|
);
|
|
7376
7170
|
}
|
|
7377
|
-
function
|
|
7378
|
-
return
|
|
7379
|
-
["discriminator",
|
|
7380
|
-
["params", getUpdatePlatformParametersDecoder()]
|
|
7171
|
+
function getVouchCompDefInstructionDataDecoder() {
|
|
7172
|
+
return getStructDecoder80([
|
|
7173
|
+
["discriminator", fixDecoderSize34(getBytesDecoder34(), 8)]
|
|
7381
7174
|
]);
|
|
7382
7175
|
}
|
|
7383
|
-
function
|
|
7384
|
-
return
|
|
7385
|
-
|
|
7386
|
-
|
|
7176
|
+
function getVouchCompDefInstructionDataCodec() {
|
|
7177
|
+
return combineCodec86(
|
|
7178
|
+
getVouchCompDefInstructionDataEncoder(),
|
|
7179
|
+
getVouchCompDefInstructionDataDecoder()
|
|
7387
7180
|
);
|
|
7388
7181
|
}
|
|
7389
|
-
function
|
|
7182
|
+
function getVouchCompDefInstruction(input, config) {
|
|
7390
7183
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
7391
7184
|
const originalAccounts = {
|
|
7392
|
-
|
|
7393
|
-
|
|
7394
|
-
|
|
7185
|
+
payer: { value: input.payer ?? null, isWritable: true },
|
|
7186
|
+
mxeAccount: { value: input.mxeAccount ?? null, isWritable: true },
|
|
7187
|
+
compDefAccount: { value: input.compDefAccount ?? null, isWritable: true },
|
|
7188
|
+
addressLookupTable: {
|
|
7189
|
+
value: input.addressLookupTable ?? null,
|
|
7190
|
+
isWritable: true
|
|
7395
7191
|
},
|
|
7396
|
-
|
|
7192
|
+
lutProgram: { value: input.lutProgram ?? null, isWritable: false },
|
|
7193
|
+
arciumProgram: { value: input.arciumProgram ?? null, isWritable: false },
|
|
7194
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
7397
7195
|
};
|
|
7398
7196
|
const accounts = originalAccounts;
|
|
7399
|
-
|
|
7197
|
+
if (!accounts.lutProgram.value) {
|
|
7198
|
+
accounts.lutProgram.value = "AddressLookupTab1e1111111111111111111111111";
|
|
7199
|
+
}
|
|
7200
|
+
if (!accounts.arciumProgram.value) {
|
|
7201
|
+
accounts.arciumProgram.value = "Arcj82pX7HxYKLR92qvgZUAd7vGS1k4hQvAFcPATFdEQ";
|
|
7202
|
+
}
|
|
7203
|
+
if (!accounts.systemProgram.value) {
|
|
7204
|
+
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
7205
|
+
}
|
|
7400
7206
|
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
7401
7207
|
return Object.freeze({
|
|
7402
7208
|
accounts: [
|
|
7403
|
-
getAccountMeta(accounts.
|
|
7404
|
-
getAccountMeta(accounts.
|
|
7209
|
+
getAccountMeta(accounts.payer),
|
|
7210
|
+
getAccountMeta(accounts.mxeAccount),
|
|
7211
|
+
getAccountMeta(accounts.compDefAccount),
|
|
7212
|
+
getAccountMeta(accounts.addressLookupTable),
|
|
7213
|
+
getAccountMeta(accounts.lutProgram),
|
|
7214
|
+
getAccountMeta(accounts.arciumProgram),
|
|
7215
|
+
getAccountMeta(accounts.systemProgram)
|
|
7405
7216
|
],
|
|
7406
|
-
data:
|
|
7407
|
-
args
|
|
7408
|
-
),
|
|
7217
|
+
data: getVouchCompDefInstructionDataEncoder().encode({}),
|
|
7409
7218
|
programAddress
|
|
7410
7219
|
});
|
|
7411
7220
|
}
|
|
7412
|
-
function
|
|
7413
|
-
if (instruction.accounts.length <
|
|
7221
|
+
function parseVouchCompDefInstruction(instruction) {
|
|
7222
|
+
if (instruction.accounts.length < 7) {
|
|
7414
7223
|
throw new Error("Not enough accounts");
|
|
7415
7224
|
}
|
|
7416
7225
|
let accountIndex = 0;
|
|
@@ -7422,27 +7231,30 @@ function parseUpdatePlatformConfigInstruction(instruction) {
|
|
|
7422
7231
|
return {
|
|
7423
7232
|
programAddress: instruction.programAddress,
|
|
7424
7233
|
accounts: {
|
|
7425
|
-
|
|
7426
|
-
|
|
7234
|
+
payer: getNextAccount(),
|
|
7235
|
+
mxeAccount: getNextAccount(),
|
|
7236
|
+
compDefAccount: getNextAccount(),
|
|
7237
|
+
addressLookupTable: getNextAccount(),
|
|
7238
|
+
lutProgram: getNextAccount(),
|
|
7239
|
+
arciumProgram: getNextAccount(),
|
|
7240
|
+
systemProgram: getNextAccount()
|
|
7427
7241
|
},
|
|
7428
|
-
data:
|
|
7429
|
-
instruction.data
|
|
7430
|
-
)
|
|
7242
|
+
data: getVouchCompDefInstructionDataDecoder().decode(instruction.data)
|
|
7431
7243
|
};
|
|
7432
7244
|
}
|
|
7433
7245
|
|
|
7434
7246
|
// src/generated/instructions/withdrawReward.ts
|
|
7435
7247
|
import {
|
|
7436
|
-
combineCodec as
|
|
7437
|
-
fixDecoderSize as
|
|
7438
|
-
fixEncoderSize as
|
|
7439
|
-
getAddressEncoder as
|
|
7440
|
-
getBytesDecoder as
|
|
7441
|
-
getBytesEncoder as
|
|
7442
|
-
getProgramDerivedAddress as
|
|
7443
|
-
getStructDecoder as
|
|
7444
|
-
getStructEncoder as
|
|
7445
|
-
transformEncoder as
|
|
7248
|
+
combineCodec as combineCodec87,
|
|
7249
|
+
fixDecoderSize as fixDecoderSize35,
|
|
7250
|
+
fixEncoderSize as fixEncoderSize36,
|
|
7251
|
+
getAddressEncoder as getAddressEncoder51,
|
|
7252
|
+
getBytesDecoder as getBytesDecoder35,
|
|
7253
|
+
getBytesEncoder as getBytesEncoder36,
|
|
7254
|
+
getProgramDerivedAddress as getProgramDerivedAddress17,
|
|
7255
|
+
getStructDecoder as getStructDecoder81,
|
|
7256
|
+
getStructEncoder as getStructEncoder81,
|
|
7257
|
+
transformEncoder as transformEncoder35
|
|
7446
7258
|
} from "@solana/kit";
|
|
7447
7259
|
var WITHDRAW_REWARD_DISCRIMINATOR = new Uint8Array([
|
|
7448
7260
|
191,
|
|
@@ -7455,23 +7267,23 @@ var WITHDRAW_REWARD_DISCRIMINATOR = new Uint8Array([
|
|
|
7455
7267
|
244
|
|
7456
7268
|
]);
|
|
7457
7269
|
function getWithdrawRewardDiscriminatorBytes() {
|
|
7458
|
-
return
|
|
7270
|
+
return fixEncoderSize36(getBytesEncoder36(), 8).encode(
|
|
7459
7271
|
WITHDRAW_REWARD_DISCRIMINATOR
|
|
7460
7272
|
);
|
|
7461
7273
|
}
|
|
7462
7274
|
function getWithdrawRewardInstructionDataEncoder() {
|
|
7463
|
-
return
|
|
7464
|
-
|
|
7275
|
+
return transformEncoder35(
|
|
7276
|
+
getStructEncoder81([["discriminator", fixEncoderSize36(getBytesEncoder36(), 8)]]),
|
|
7465
7277
|
(value) => ({ ...value, discriminator: WITHDRAW_REWARD_DISCRIMINATOR })
|
|
7466
7278
|
);
|
|
7467
7279
|
}
|
|
7468
7280
|
function getWithdrawRewardInstructionDataDecoder() {
|
|
7469
|
-
return
|
|
7470
|
-
["discriminator",
|
|
7281
|
+
return getStructDecoder81([
|
|
7282
|
+
["discriminator", fixDecoderSize35(getBytesDecoder35(), 8)]
|
|
7471
7283
|
]);
|
|
7472
7284
|
}
|
|
7473
7285
|
function getWithdrawRewardInstructionDataCodec() {
|
|
7474
|
-
return
|
|
7286
|
+
return combineCodec87(
|
|
7475
7287
|
getWithdrawRewardInstructionDataEncoder(),
|
|
7476
7288
|
getWithdrawRewardInstructionDataDecoder()
|
|
7477
7289
|
);
|
|
@@ -7492,24 +7304,24 @@ async function getWithdrawRewardInstructionAsync(input, config) {
|
|
|
7492
7304
|
};
|
|
7493
7305
|
const accounts = originalAccounts;
|
|
7494
7306
|
if (!accounts.sponsorAccount.value) {
|
|
7495
|
-
accounts.sponsorAccount.value = await
|
|
7307
|
+
accounts.sponsorAccount.value = await getProgramDerivedAddress17({
|
|
7496
7308
|
programAddress,
|
|
7497
7309
|
seeds: [
|
|
7498
|
-
|
|
7310
|
+
getBytesEncoder36().encode(
|
|
7499
7311
|
new Uint8Array([115, 112, 111, 110, 115, 111, 114])
|
|
7500
7312
|
),
|
|
7501
|
-
|
|
7502
|
-
|
|
7313
|
+
getAddressEncoder51().encode(expectAddress(accounts.sponsor.value)),
|
|
7314
|
+
getAddressEncoder51().encode(expectAddress(accounts.market.value))
|
|
7503
7315
|
]
|
|
7504
7316
|
});
|
|
7505
7317
|
}
|
|
7506
7318
|
if (!accounts.marketTokenAta.value) {
|
|
7507
|
-
accounts.marketTokenAta.value = await
|
|
7319
|
+
accounts.marketTokenAta.value = await getProgramDerivedAddress17({
|
|
7508
7320
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
7509
7321
|
seeds: [
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7322
|
+
getAddressEncoder51().encode(expectAddress(accounts.market.value)),
|
|
7323
|
+
getAddressEncoder51().encode(expectAddress(accounts.tokenProgram.value)),
|
|
7324
|
+
getAddressEncoder51().encode(expectAddress(accounts.tokenMint.value))
|
|
7513
7325
|
]
|
|
7514
7326
|
});
|
|
7515
7327
|
}
|
|
@@ -7583,6 +7395,201 @@ function parseWithdrawRewardInstruction(instruction) {
|
|
|
7583
7395
|
};
|
|
7584
7396
|
}
|
|
7585
7397
|
|
|
7398
|
+
// src/generated/instructions/withdrawVouch.ts
|
|
7399
|
+
import {
|
|
7400
|
+
combineCodec as combineCodec88,
|
|
7401
|
+
fixDecoderSize as fixDecoderSize36,
|
|
7402
|
+
fixEncoderSize as fixEncoderSize37,
|
|
7403
|
+
getAddressEncoder as getAddressEncoder52,
|
|
7404
|
+
getBytesDecoder as getBytesDecoder36,
|
|
7405
|
+
getBytesEncoder as getBytesEncoder37,
|
|
7406
|
+
getProgramDerivedAddress as getProgramDerivedAddress18,
|
|
7407
|
+
getStructDecoder as getStructDecoder82,
|
|
7408
|
+
getStructEncoder as getStructEncoder82,
|
|
7409
|
+
getU32Decoder as getU32Decoder22,
|
|
7410
|
+
getU32Encoder as getU32Encoder22,
|
|
7411
|
+
transformEncoder as transformEncoder36
|
|
7412
|
+
} from "@solana/kit";
|
|
7413
|
+
var WITHDRAW_VOUCH_DISCRIMINATOR = new Uint8Array([
|
|
7414
|
+
201,
|
|
7415
|
+
33,
|
|
7416
|
+
64,
|
|
7417
|
+
226,
|
|
7418
|
+
252,
|
|
7419
|
+
193,
|
|
7420
|
+
27,
|
|
7421
|
+
83
|
|
7422
|
+
]);
|
|
7423
|
+
function getWithdrawVouchDiscriminatorBytes() {
|
|
7424
|
+
return fixEncoderSize37(getBytesEncoder37(), 8).encode(
|
|
7425
|
+
WITHDRAW_VOUCH_DISCRIMINATOR
|
|
7426
|
+
);
|
|
7427
|
+
}
|
|
7428
|
+
function getWithdrawVouchInstructionDataEncoder() {
|
|
7429
|
+
return transformEncoder36(
|
|
7430
|
+
getStructEncoder82([
|
|
7431
|
+
["discriminator", fixEncoderSize37(getBytesEncoder37(), 8)],
|
|
7432
|
+
["vouchAccountId", getU32Encoder22()]
|
|
7433
|
+
]),
|
|
7434
|
+
(value) => ({ ...value, discriminator: WITHDRAW_VOUCH_DISCRIMINATOR })
|
|
7435
|
+
);
|
|
7436
|
+
}
|
|
7437
|
+
function getWithdrawVouchInstructionDataDecoder() {
|
|
7438
|
+
return getStructDecoder82([
|
|
7439
|
+
["discriminator", fixDecoderSize36(getBytesDecoder36(), 8)],
|
|
7440
|
+
["vouchAccountId", getU32Decoder22()]
|
|
7441
|
+
]);
|
|
7442
|
+
}
|
|
7443
|
+
function getWithdrawVouchInstructionDataCodec() {
|
|
7444
|
+
return combineCodec88(
|
|
7445
|
+
getWithdrawVouchInstructionDataEncoder(),
|
|
7446
|
+
getWithdrawVouchInstructionDataDecoder()
|
|
7447
|
+
);
|
|
7448
|
+
}
|
|
7449
|
+
async function getWithdrawVouchInstructionAsync(input, config) {
|
|
7450
|
+
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
7451
|
+
const originalAccounts = {
|
|
7452
|
+
signer: { value: input.signer ?? null, isWritable: true },
|
|
7453
|
+
owner: { value: input.owner ?? null, isWritable: false },
|
|
7454
|
+
market: { value: input.market ?? null, isWritable: false },
|
|
7455
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true },
|
|
7456
|
+
tokenMint: { value: input.tokenMint ?? null, isWritable: false },
|
|
7457
|
+
marketTokenAta: { value: input.marketTokenAta ?? null, isWritable: true },
|
|
7458
|
+
ownerTokenAccount: {
|
|
7459
|
+
value: input.ownerTokenAccount ?? null,
|
|
7460
|
+
isWritable: true
|
|
7461
|
+
},
|
|
7462
|
+
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
7463
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
7464
|
+
};
|
|
7465
|
+
const accounts = originalAccounts;
|
|
7466
|
+
const args = { ...input };
|
|
7467
|
+
if (!accounts.vouchAccount.value) {
|
|
7468
|
+
accounts.vouchAccount.value = await getProgramDerivedAddress18({
|
|
7469
|
+
programAddress,
|
|
7470
|
+
seeds: [
|
|
7471
|
+
getBytesEncoder37().encode(
|
|
7472
|
+
new Uint8Array([
|
|
7473
|
+
118,
|
|
7474
|
+
111,
|
|
7475
|
+
117,
|
|
7476
|
+
99,
|
|
7477
|
+
104,
|
|
7478
|
+
95,
|
|
7479
|
+
97,
|
|
7480
|
+
99,
|
|
7481
|
+
99,
|
|
7482
|
+
111,
|
|
7483
|
+
117,
|
|
7484
|
+
110,
|
|
7485
|
+
116
|
|
7486
|
+
])
|
|
7487
|
+
),
|
|
7488
|
+
getAddressEncoder52().encode(expectAddress(accounts.owner.value)),
|
|
7489
|
+
getAddressEncoder52().encode(expectAddress(accounts.market.value)),
|
|
7490
|
+
getU32Encoder22().encode(expectSome(args.vouchAccountId))
|
|
7491
|
+
]
|
|
7492
|
+
});
|
|
7493
|
+
}
|
|
7494
|
+
if (!accounts.marketTokenAta.value) {
|
|
7495
|
+
accounts.marketTokenAta.value = await getProgramDerivedAddress18({
|
|
7496
|
+
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
7497
|
+
seeds: [
|
|
7498
|
+
getAddressEncoder52().encode(expectAddress(accounts.market.value)),
|
|
7499
|
+
getAddressEncoder52().encode(expectAddress(accounts.tokenProgram.value)),
|
|
7500
|
+
getAddressEncoder52().encode(expectAddress(accounts.tokenMint.value))
|
|
7501
|
+
]
|
|
7502
|
+
});
|
|
7503
|
+
}
|
|
7504
|
+
if (!accounts.systemProgram.value) {
|
|
7505
|
+
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
7506
|
+
}
|
|
7507
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
7508
|
+
return Object.freeze({
|
|
7509
|
+
accounts: [
|
|
7510
|
+
getAccountMeta(accounts.signer),
|
|
7511
|
+
getAccountMeta(accounts.owner),
|
|
7512
|
+
getAccountMeta(accounts.market),
|
|
7513
|
+
getAccountMeta(accounts.vouchAccount),
|
|
7514
|
+
getAccountMeta(accounts.tokenMint),
|
|
7515
|
+
getAccountMeta(accounts.marketTokenAta),
|
|
7516
|
+
getAccountMeta(accounts.ownerTokenAccount),
|
|
7517
|
+
getAccountMeta(accounts.tokenProgram),
|
|
7518
|
+
getAccountMeta(accounts.systemProgram)
|
|
7519
|
+
],
|
|
7520
|
+
data: getWithdrawVouchInstructionDataEncoder().encode(
|
|
7521
|
+
args
|
|
7522
|
+
),
|
|
7523
|
+
programAddress
|
|
7524
|
+
});
|
|
7525
|
+
}
|
|
7526
|
+
function getWithdrawVouchInstruction(input, config) {
|
|
7527
|
+
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
7528
|
+
const originalAccounts = {
|
|
7529
|
+
signer: { value: input.signer ?? null, isWritable: true },
|
|
7530
|
+
owner: { value: input.owner ?? null, isWritable: false },
|
|
7531
|
+
market: { value: input.market ?? null, isWritable: false },
|
|
7532
|
+
vouchAccount: { value: input.vouchAccount ?? null, isWritable: true },
|
|
7533
|
+
tokenMint: { value: input.tokenMint ?? null, isWritable: false },
|
|
7534
|
+
marketTokenAta: { value: input.marketTokenAta ?? null, isWritable: true },
|
|
7535
|
+
ownerTokenAccount: {
|
|
7536
|
+
value: input.ownerTokenAccount ?? null,
|
|
7537
|
+
isWritable: true
|
|
7538
|
+
},
|
|
7539
|
+
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
7540
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
7541
|
+
};
|
|
7542
|
+
const accounts = originalAccounts;
|
|
7543
|
+
const args = { ...input };
|
|
7544
|
+
if (!accounts.systemProgram.value) {
|
|
7545
|
+
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
7546
|
+
}
|
|
7547
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
7548
|
+
return Object.freeze({
|
|
7549
|
+
accounts: [
|
|
7550
|
+
getAccountMeta(accounts.signer),
|
|
7551
|
+
getAccountMeta(accounts.owner),
|
|
7552
|
+
getAccountMeta(accounts.market),
|
|
7553
|
+
getAccountMeta(accounts.vouchAccount),
|
|
7554
|
+
getAccountMeta(accounts.tokenMint),
|
|
7555
|
+
getAccountMeta(accounts.marketTokenAta),
|
|
7556
|
+
getAccountMeta(accounts.ownerTokenAccount),
|
|
7557
|
+
getAccountMeta(accounts.tokenProgram),
|
|
7558
|
+
getAccountMeta(accounts.systemProgram)
|
|
7559
|
+
],
|
|
7560
|
+
data: getWithdrawVouchInstructionDataEncoder().encode(
|
|
7561
|
+
args
|
|
7562
|
+
),
|
|
7563
|
+
programAddress
|
|
7564
|
+
});
|
|
7565
|
+
}
|
|
7566
|
+
function parseWithdrawVouchInstruction(instruction) {
|
|
7567
|
+
if (instruction.accounts.length < 9) {
|
|
7568
|
+
throw new Error("Not enough accounts");
|
|
7569
|
+
}
|
|
7570
|
+
let accountIndex = 0;
|
|
7571
|
+
const getNextAccount = () => {
|
|
7572
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
7573
|
+
accountIndex += 1;
|
|
7574
|
+
return accountMeta;
|
|
7575
|
+
};
|
|
7576
|
+
return {
|
|
7577
|
+
programAddress: instruction.programAddress,
|
|
7578
|
+
accounts: {
|
|
7579
|
+
signer: getNextAccount(),
|
|
7580
|
+
owner: getNextAccount(),
|
|
7581
|
+
market: getNextAccount(),
|
|
7582
|
+
vouchAccount: getNextAccount(),
|
|
7583
|
+
tokenMint: getNextAccount(),
|
|
7584
|
+
marketTokenAta: getNextAccount(),
|
|
7585
|
+
ownerTokenAccount: getNextAccount(),
|
|
7586
|
+
tokenProgram: getNextAccount(),
|
|
7587
|
+
systemProgram: getNextAccount()
|
|
7588
|
+
},
|
|
7589
|
+
data: getWithdrawVouchInstructionDataDecoder().decode(instruction.data)
|
|
7590
|
+
};
|
|
7591
|
+
}
|
|
7592
|
+
|
|
7586
7593
|
// src/accounts/opportunityMarket.ts
|
|
7587
7594
|
import {
|
|
7588
7595
|
getAddressEncoder as getAddressEncoder53,
|
|
@@ -7630,7 +7637,7 @@ async function createMarket(input) {
|
|
|
7630
7637
|
authorizedReaderPubkey,
|
|
7631
7638
|
earlinessCutoffSeconds,
|
|
7632
7639
|
earlinessMultiplier,
|
|
7633
|
-
|
|
7640
|
+
minVouchAmount,
|
|
7634
7641
|
creatorFeeClaimer
|
|
7635
7642
|
} = input;
|
|
7636
7643
|
const resolvedProgramAddress = programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
@@ -7653,7 +7660,7 @@ async function createMarket(input) {
|
|
|
7653
7660
|
authorizedReaderPubkey: toNumberArray(authorizedReaderPubkey),
|
|
7654
7661
|
earlinessCutoffSeconds,
|
|
7655
7662
|
earlinessMultiplier,
|
|
7656
|
-
|
|
7663
|
+
minVouchAmount,
|
|
7657
7664
|
creatorFeeClaimer
|
|
7658
7665
|
}
|
|
7659
7666
|
},
|
|
@@ -7676,8 +7683,8 @@ import {
|
|
|
7676
7683
|
import { PublicKey } from "@solana/web3.js";
|
|
7677
7684
|
import { BN } from "bn.js";
|
|
7678
7685
|
var ALL_COMP_DEF_CIRCUITS = [
|
|
7679
|
-
"
|
|
7680
|
-
"
|
|
7686
|
+
"vouch",
|
|
7687
|
+
"reveal_vouch"
|
|
7681
7688
|
];
|
|
7682
7689
|
function toAddress(pubkey) {
|
|
7683
7690
|
return address(pubkey.toBase58());
|
|
@@ -7716,10 +7723,10 @@ async function getInitCompDefInstruction(rpc, payer, circuitName, config = {}) {
|
|
|
7716
7723
|
addressLookupTable: toAddress(lutAddress)
|
|
7717
7724
|
};
|
|
7718
7725
|
switch (circuitName) {
|
|
7719
|
-
case "
|
|
7720
|
-
return
|
|
7721
|
-
case "
|
|
7722
|
-
return
|
|
7726
|
+
case "vouch":
|
|
7727
|
+
return getVouchCompDefInstruction(baseInput, { programAddress: programId });
|
|
7728
|
+
case "reveal_vouch":
|
|
7729
|
+
return getRevealVouchCompDefInstruction(baseInput, { programAddress: programId });
|
|
7723
7730
|
default:
|
|
7724
7731
|
throw new Error(`Unknown circuit: ${circuitName}`);
|
|
7725
7732
|
}
|
|
@@ -7808,15 +7815,15 @@ var awaitComputationFinalization = async (rpc, computationAccount, invocationSig
|
|
|
7808
7815
|
}
|
|
7809
7816
|
};
|
|
7810
7817
|
|
|
7811
|
-
// src/instructions/
|
|
7812
|
-
async function
|
|
7818
|
+
// src/instructions/vouch.ts
|
|
7819
|
+
async function vouch(input, config) {
|
|
7813
7820
|
const {
|
|
7814
7821
|
programAddress,
|
|
7815
7822
|
signer,
|
|
7816
7823
|
payer,
|
|
7817
7824
|
market,
|
|
7818
|
-
|
|
7819
|
-
|
|
7825
|
+
vouchAccount,
|
|
7826
|
+
vouchAccountId,
|
|
7820
7827
|
tokenMint,
|
|
7821
7828
|
signerTokenAccount,
|
|
7822
7829
|
tokenProgram,
|
|
@@ -7827,20 +7834,20 @@ async function stake(input, config) {
|
|
|
7827
7834
|
userPubkey,
|
|
7828
7835
|
stateNonce
|
|
7829
7836
|
} = input;
|
|
7830
|
-
const { computationOffset, ...computeAccounts } = getComputeAccounts("
|
|
7831
|
-
return
|
|
7837
|
+
const { computationOffset, ...computeAccounts } = getComputeAccounts("vouch", config);
|
|
7838
|
+
return getVouchInstructionAsync(
|
|
7832
7839
|
{
|
|
7833
7840
|
...computeAccounts,
|
|
7834
7841
|
signer,
|
|
7835
7842
|
payer,
|
|
7836
7843
|
market,
|
|
7837
|
-
|
|
7844
|
+
vouchAccount,
|
|
7838
7845
|
tokenMint,
|
|
7839
7846
|
signerTokenAccount,
|
|
7840
7847
|
tokenProgram,
|
|
7841
7848
|
params: {
|
|
7842
7849
|
computationOffset,
|
|
7843
|
-
|
|
7850
|
+
vouchAccountId,
|
|
7844
7851
|
amount,
|
|
7845
7852
|
selectedOptionCiphertext: toNumberArray(selectedOptionCiphertext),
|
|
7846
7853
|
inputNonce,
|
|
@@ -7852,27 +7859,27 @@ async function stake(input, config) {
|
|
|
7852
7859
|
programAddress ? { programAddress } : void 0
|
|
7853
7860
|
);
|
|
7854
7861
|
}
|
|
7855
|
-
async function
|
|
7856
|
-
const { computationAccount } = getComputeAccounts("
|
|
7862
|
+
async function awaitVouchFinalization(rpc, txSignature, config, options) {
|
|
7863
|
+
const { computationAccount } = getComputeAccounts("vouch", config);
|
|
7857
7864
|
return awaitComputationFinalization(rpc, computationAccount, txSignature, options);
|
|
7858
7865
|
}
|
|
7859
7866
|
|
|
7860
|
-
// src/instructions/
|
|
7861
|
-
async function
|
|
7862
|
-
const { programAddress, signer, owner, market,
|
|
7863
|
-
return
|
|
7867
|
+
// src/instructions/revealVouch.ts
|
|
7868
|
+
async function revealVouch(input, config) {
|
|
7869
|
+
const { programAddress, signer, owner, market, vouchAccountId } = input;
|
|
7870
|
+
return getRevealVouchInstructionAsync(
|
|
7864
7871
|
{
|
|
7865
|
-
...getComputeAccounts("
|
|
7872
|
+
...getComputeAccounts("reveal_vouch", config),
|
|
7866
7873
|
signer,
|
|
7867
7874
|
owner,
|
|
7868
7875
|
market,
|
|
7869
|
-
|
|
7876
|
+
vouchAccountId
|
|
7870
7877
|
},
|
|
7871
7878
|
programAddress ? { programAddress } : void 0
|
|
7872
7879
|
);
|
|
7873
7880
|
}
|
|
7874
|
-
async function
|
|
7875
|
-
const { computationAccount } = getComputeAccounts("
|
|
7881
|
+
async function awaitRevealVouchFinalization(rpc, txSignature, config, options) {
|
|
7882
|
+
const { computationAccount } = getComputeAccounts("reveal_vouch", config);
|
|
7876
7883
|
return awaitComputationFinalization(rpc, computationAccount, txSignature, options);
|
|
7877
7884
|
}
|
|
7878
7885
|
|
|
@@ -7930,10 +7937,10 @@ async function addReward(input) {
|
|
|
7930
7937
|
);
|
|
7931
7938
|
}
|
|
7932
7939
|
|
|
7933
|
-
// src/instructions/
|
|
7934
|
-
async function
|
|
7940
|
+
// src/instructions/initVouchAccount.ts
|
|
7941
|
+
async function initVouchAccount(input) {
|
|
7935
7942
|
const { programAddress, ...params } = input;
|
|
7936
|
-
return
|
|
7943
|
+
return getInitVouchAccountInstructionAsync(
|
|
7937
7944
|
params,
|
|
7938
7945
|
programAddress ? { programAddress } : void 0
|
|
7939
7946
|
);
|
|
@@ -7957,28 +7964,28 @@ async function claimRewards(input) {
|
|
|
7957
7964
|
);
|
|
7958
7965
|
}
|
|
7959
7966
|
|
|
7960
|
-
// src/instructions/
|
|
7961
|
-
async function
|
|
7967
|
+
// src/instructions/closeVouchAccount.ts
|
|
7968
|
+
async function closeVouchAccount(input) {
|
|
7962
7969
|
const { programAddress, ...params } = input;
|
|
7963
|
-
return
|
|
7970
|
+
return getCloseVouchAccountInstructionAsync(
|
|
7964
7971
|
params,
|
|
7965
7972
|
programAddress ? { programAddress } : void 0
|
|
7966
7973
|
);
|
|
7967
7974
|
}
|
|
7968
7975
|
|
|
7969
|
-
// src/instructions/
|
|
7970
|
-
async function
|
|
7976
|
+
// src/instructions/closeUnrevealedVouchAccount.ts
|
|
7977
|
+
async function closeUnrevealedVouchAccount(input) {
|
|
7971
7978
|
const { programAddress, ...params } = input;
|
|
7972
|
-
return
|
|
7979
|
+
return getCloseUnrevealedVouchAccountInstructionAsync(
|
|
7973
7980
|
params,
|
|
7974
7981
|
programAddress ? { programAddress } : void 0
|
|
7975
7982
|
);
|
|
7976
7983
|
}
|
|
7977
7984
|
|
|
7978
|
-
// src/instructions/
|
|
7979
|
-
async function
|
|
7985
|
+
// src/instructions/closeStuckVouchAccount.ts
|
|
7986
|
+
async function closeStuckVouchAccount(input) {
|
|
7980
7987
|
const { programAddress, ...params } = input;
|
|
7981
|
-
return
|
|
7988
|
+
return getCloseStuckVouchAccountInstructionAsync(
|
|
7982
7989
|
params,
|
|
7983
7990
|
programAddress ? { programAddress } : void 0
|
|
7984
7991
|
);
|
|
@@ -7993,19 +8000,19 @@ async function closeOptionAccount(input) {
|
|
|
7993
8000
|
);
|
|
7994
8001
|
}
|
|
7995
8002
|
|
|
7996
|
-
// src/instructions/
|
|
7997
|
-
async function
|
|
8003
|
+
// src/instructions/withdrawVouch.ts
|
|
8004
|
+
async function withdrawVouch(input) {
|
|
7998
8005
|
const { programAddress, ...params } = input;
|
|
7999
|
-
return
|
|
8006
|
+
return getWithdrawVouchInstructionAsync(
|
|
8000
8007
|
params,
|
|
8001
8008
|
programAddress ? { programAddress } : void 0
|
|
8002
8009
|
);
|
|
8003
8010
|
}
|
|
8004
8011
|
|
|
8005
|
-
// src/instructions/
|
|
8006
|
-
async function
|
|
8012
|
+
// src/instructions/finalizeRevealVouch.ts
|
|
8013
|
+
async function finalizeRevealVouch(input) {
|
|
8007
8014
|
const { programAddress, ...params } = input;
|
|
8008
|
-
return
|
|
8015
|
+
return getFinalizeRevealVouchInstructionAsync(
|
|
8009
8016
|
params,
|
|
8010
8017
|
programAddress ? { programAddress } : void 0
|
|
8011
8018
|
);
|
|
@@ -8040,7 +8047,7 @@ async function createPlatformConfig(rpc, params) {
|
|
|
8040
8047
|
creatorFeeBp,
|
|
8041
8048
|
feeClaimAuthority,
|
|
8042
8049
|
revealAuthority,
|
|
8043
|
-
|
|
8050
|
+
minTimeToVouchSeconds,
|
|
8044
8051
|
revealPeriodSeconds,
|
|
8045
8052
|
marketResolutionDeadlineSeconds
|
|
8046
8053
|
} = params;
|
|
@@ -8066,7 +8073,7 @@ async function createPlatformConfig(rpc, params) {
|
|
|
8066
8073
|
creatorFeeBp,
|
|
8067
8074
|
feeClaimAuthority,
|
|
8068
8075
|
revealAuthority,
|
|
8069
|
-
|
|
8076
|
+
minTimeToVouchSeconds,
|
|
8070
8077
|
revealPeriodSeconds,
|
|
8071
8078
|
marketResolutionDeadlineSeconds
|
|
8072
8079
|
}
|
|
@@ -8085,7 +8092,7 @@ async function updatePlatformConfig(rpc, params) {
|
|
|
8085
8092
|
rewardPoolFeeBp,
|
|
8086
8093
|
creatorFeeBp,
|
|
8087
8094
|
revealAuthority,
|
|
8088
|
-
|
|
8095
|
+
minTimeToVouchSeconds,
|
|
8089
8096
|
revealPeriodSeconds,
|
|
8090
8097
|
marketResolutionDeadlineSeconds
|
|
8091
8098
|
} = params;
|
|
@@ -8109,7 +8116,7 @@ async function updatePlatformConfig(rpc, params) {
|
|
|
8109
8116
|
rewardPoolFeeBp,
|
|
8110
8117
|
creatorFeeBp,
|
|
8111
8118
|
revealAuthority,
|
|
8112
|
-
|
|
8119
|
+
minTimeToVouchSeconds,
|
|
8113
8120
|
revealPeriodSeconds,
|
|
8114
8121
|
marketResolutionDeadlineSeconds
|
|
8115
8122
|
}
|
|
@@ -8213,20 +8220,20 @@ async function getOpportunityMarketSponsorAddress(sponsor, market, programId = O
|
|
|
8213
8220
|
});
|
|
8214
8221
|
}
|
|
8215
8222
|
|
|
8216
|
-
// src/accounts/
|
|
8223
|
+
// src/accounts/vouchAccount.ts
|
|
8217
8224
|
import {
|
|
8218
8225
|
getAddressEncoder as getAddressEncoder58,
|
|
8219
8226
|
getProgramDerivedAddress as getProgramDerivedAddress24
|
|
8220
8227
|
} from "@solana/kit";
|
|
8221
|
-
var
|
|
8222
|
-
async function
|
|
8228
|
+
var VOUCH_ACCOUNT_SEED = "vouch_account";
|
|
8229
|
+
async function getVouchAccountAddress(owner, market, vouchAccountId, programId = OPPORTUNITY_MARKET_PROGRAM_ADDRESS) {
|
|
8223
8230
|
const addressEncoder = getAddressEncoder58();
|
|
8224
8231
|
const idBytes = new Uint8Array(4);
|
|
8225
|
-
new DataView(idBytes.buffer).setUint32(0,
|
|
8232
|
+
new DataView(idBytes.buffer).setUint32(0, vouchAccountId, true);
|
|
8226
8233
|
return getProgramDerivedAddress24({
|
|
8227
8234
|
programAddress: programId,
|
|
8228
8235
|
seeds: [
|
|
8229
|
-
|
|
8236
|
+
VOUCH_ACCOUNT_SEED,
|
|
8230
8237
|
addressEncoder.encode(owner),
|
|
8231
8238
|
addressEncoder.encode(market),
|
|
8232
8239
|
idBytes
|
|
@@ -8269,22 +8276,22 @@ export {
|
|
|
8269
8276
|
CLAIM_FEES_DISCRIMINATOR,
|
|
8270
8277
|
CLAIM_REWARDS_DISCRIMINATOR,
|
|
8271
8278
|
CLOSE_OPTION_ACCOUNT_DISCRIMINATOR,
|
|
8272
|
-
|
|
8273
|
-
|
|
8274
|
-
|
|
8279
|
+
CLOSE_STUCK_VOUCH_ACCOUNT_DISCRIMINATOR,
|
|
8280
|
+
CLOSE_UNREVEALED_VOUCH_ACCOUNT_DISCRIMINATOR,
|
|
8281
|
+
CLOSE_VOUCH_ACCOUNT_DISCRIMINATOR,
|
|
8275
8282
|
CREATE_MARKET_DISCRIMINATOR,
|
|
8276
8283
|
END_REVEAL_PERIOD_DISCRIMINATOR,
|
|
8277
|
-
|
|
8284
|
+
FINALIZE_REVEAL_VOUCH_DISCRIMINATOR,
|
|
8278
8285
|
INIT_ALLOWED_MINT_DISCRIMINATOR,
|
|
8279
8286
|
INIT_PLATFORM_CONFIG_DISCRIMINATOR,
|
|
8280
|
-
|
|
8287
|
+
INIT_VOUCH_ACCOUNT_DISCRIMINATOR,
|
|
8281
8288
|
LocalCircuitSource,
|
|
8282
8289
|
MxeStatus,
|
|
8283
8290
|
OPEN_MARKET_DISCRIMINATOR,
|
|
8284
8291
|
OPPORTUNITY_MARKET_DISCRIMINATOR,
|
|
8285
8292
|
OPPORTUNITY_MARKET_ERROR__ALREADY_REVEALED,
|
|
8286
|
-
|
|
8287
|
-
|
|
8293
|
+
OPPORTUNITY_MARKET_ERROR__ALREADY_VOUCHED,
|
|
8294
|
+
OPPORTUNITY_MARKET_ERROR__ALREADY_VOUCH_WITHDRAWN,
|
|
8288
8295
|
OPPORTUNITY_MARKET_ERROR__CREATOR_MISMATCH,
|
|
8289
8296
|
OPPORTUNITY_MARKET_ERROR__INSUFFICIENT_BALANCE,
|
|
8290
8297
|
OPPORTUNITY_MARKET_ERROR__INSUFFICIENT_REWARD_FUNDING,
|
|
@@ -8298,14 +8305,14 @@ export {
|
|
|
8298
8305
|
OPPORTUNITY_MARKET_ERROR__NO_FEES_TO_CLAIM,
|
|
8299
8306
|
OPPORTUNITY_MARKET_ERROR__NO_FINALIZED_WINNING_OPTION,
|
|
8300
8307
|
OPPORTUNITY_MARKET_ERROR__NO_REWARD_TO_CLAIM,
|
|
8301
|
-
|
|
8308
|
+
OPPORTUNITY_MARKET_ERROR__NO_VOUCH,
|
|
8302
8309
|
OPPORTUNITY_MARKET_ERROR__OPTION_STILL_NEEDED,
|
|
8303
8310
|
OPPORTUNITY_MARKET_ERROR__OVERFLOW,
|
|
8304
8311
|
OPPORTUNITY_MARKET_ERROR__REWARD_ALREADY_CLAIMED,
|
|
8305
|
-
OPPORTUNITY_MARKET_ERROR__STAKE_BELOW_MINIMUM,
|
|
8306
|
-
OPPORTUNITY_MARKET_ERROR__STAKE_NOT_STUCK,
|
|
8307
8312
|
OPPORTUNITY_MARKET_ERROR__TALLY_ALREADY_INCREMENTED,
|
|
8308
8313
|
OPPORTUNITY_MARKET_ERROR__UNAUTHORIZED,
|
|
8314
|
+
OPPORTUNITY_MARKET_ERROR__VOUCH_BELOW_MINIMUM,
|
|
8315
|
+
OPPORTUNITY_MARKET_ERROR__VOUCH_NOT_STUCK,
|
|
8309
8316
|
OPPORTUNITY_MARKET_ERROR__WINNER_ALREADY_SELECTED,
|
|
8310
8317
|
OPPORTUNITY_MARKET_ERROR__WRONG_MARKET_PHASE,
|
|
8311
8318
|
OPPORTUNITY_MARKET_OPTION_DISCRIMINATOR,
|
|
@@ -8320,34 +8327,34 @@ export {
|
|
|
8320
8327
|
PLATFORM_CONFIG_SEED,
|
|
8321
8328
|
Parameter,
|
|
8322
8329
|
RESOLVE_MARKET_DISCRIMINATOR,
|
|
8323
|
-
|
|
8324
|
-
|
|
8325
|
-
|
|
8330
|
+
REVEAL_VOUCH_CALLBACK_DISCRIMINATOR,
|
|
8331
|
+
REVEAL_VOUCH_COMP_DEF_DISCRIMINATOR,
|
|
8332
|
+
REVEAL_VOUCH_DISCRIMINATOR,
|
|
8326
8333
|
SET_FEE_CLAIM_AUTHORITY_DISCRIMINATOR,
|
|
8327
8334
|
SET_UPDATE_AUTHORITY_DISCRIMINATOR,
|
|
8328
8335
|
SET_WINNING_OPTION_DISCRIMINATOR,
|
|
8329
8336
|
SPONSOR_SEED,
|
|
8330
|
-
STAKE_ACCOUNT_DISCRIMINATOR,
|
|
8331
|
-
STAKE_ACCOUNT_SEED,
|
|
8332
|
-
STAKE_CALLBACK_DISCRIMINATOR,
|
|
8333
|
-
STAKE_COMP_DEF_DISCRIMINATOR,
|
|
8334
|
-
STAKE_DISCRIMINATOR,
|
|
8335
|
-
UNSTAKE_DISCRIMINATOR,
|
|
8336
8337
|
UPDATE_PLATFORM_CONFIG_DISCRIMINATOR,
|
|
8338
|
+
VOUCH_ACCOUNT_DISCRIMINATOR,
|
|
8339
|
+
VOUCH_ACCOUNT_SEED,
|
|
8340
|
+
VOUCH_CALLBACK_DISCRIMINATOR,
|
|
8341
|
+
VOUCH_COMP_DEF_DISCRIMINATOR,
|
|
8342
|
+
VOUCH_DISCRIMINATOR,
|
|
8337
8343
|
WITHDRAW_REWARD_DISCRIMINATOR,
|
|
8344
|
+
WITHDRAW_VOUCH_DISCRIMINATOR,
|
|
8338
8345
|
addMarketOption,
|
|
8339
8346
|
addReward,
|
|
8340
8347
|
awaitComputationFinalization,
|
|
8341
|
-
|
|
8342
|
-
|
|
8348
|
+
awaitRevealVouchFinalization,
|
|
8349
|
+
awaitVouchFinalization,
|
|
8343
8350
|
circuitSource,
|
|
8344
8351
|
claimCreatorFees,
|
|
8345
8352
|
claimFees,
|
|
8346
8353
|
claimRewards,
|
|
8347
8354
|
closeOptionAccount,
|
|
8348
|
-
|
|
8349
|
-
|
|
8350
|
-
|
|
8355
|
+
closeStuckVouchAccount,
|
|
8356
|
+
closeUnrevealedVouchAccount,
|
|
8357
|
+
closeVouchAccount,
|
|
8351
8358
|
createCipher,
|
|
8352
8359
|
createMarket,
|
|
8353
8360
|
createPlatformConfig,
|
|
@@ -8357,7 +8364,7 @@ export {
|
|
|
8357
8364
|
decodeOpportunityMarketOption,
|
|
8358
8365
|
decodeOpportunityMarketSponsor,
|
|
8359
8366
|
decodePlatformConfig,
|
|
8360
|
-
|
|
8367
|
+
decodeVouchAccount,
|
|
8361
8368
|
deriveSharedSecret,
|
|
8362
8369
|
deriveX25519KeypairFromSignature,
|
|
8363
8370
|
endRevealPeriod,
|
|
@@ -8369,12 +8376,12 @@ export {
|
|
|
8369
8376
|
fetchAllMaybeOpportunityMarketOption,
|
|
8370
8377
|
fetchAllMaybeOpportunityMarketSponsor,
|
|
8371
8378
|
fetchAllMaybePlatformConfig,
|
|
8372
|
-
|
|
8379
|
+
fetchAllMaybeVouchAccount,
|
|
8373
8380
|
fetchAllOpportunityMarket,
|
|
8374
8381
|
fetchAllOpportunityMarketOption,
|
|
8375
8382
|
fetchAllOpportunityMarketSponsor,
|
|
8376
8383
|
fetchAllPlatformConfig,
|
|
8377
|
-
|
|
8384
|
+
fetchAllVouchAccount,
|
|
8378
8385
|
fetchAllowedMint,
|
|
8379
8386
|
fetchArciumSignerAccount,
|
|
8380
8387
|
fetchMaybeAllowedMint,
|
|
@@ -8383,13 +8390,13 @@ export {
|
|
|
8383
8390
|
fetchMaybeOpportunityMarketOption,
|
|
8384
8391
|
fetchMaybeOpportunityMarketSponsor,
|
|
8385
8392
|
fetchMaybePlatformConfig,
|
|
8386
|
-
|
|
8393
|
+
fetchMaybeVouchAccount,
|
|
8387
8394
|
fetchOpportunityMarket,
|
|
8388
8395
|
fetchOpportunityMarketOption,
|
|
8389
8396
|
fetchOpportunityMarketSponsor,
|
|
8390
8397
|
fetchPlatformConfig,
|
|
8391
|
-
|
|
8392
|
-
|
|
8398
|
+
fetchVouchAccount,
|
|
8399
|
+
finalizeRevealVouch,
|
|
8393
8400
|
generateX25519Keypair,
|
|
8394
8401
|
getActivationCodec,
|
|
8395
8402
|
getActivationDecoder,
|
|
@@ -8451,24 +8458,24 @@ export {
|
|
|
8451
8458
|
getCloseOptionAccountInstructionDataCodec,
|
|
8452
8459
|
getCloseOptionAccountInstructionDataDecoder,
|
|
8453
8460
|
getCloseOptionAccountInstructionDataEncoder,
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
|
|
8461
|
+
getCloseStuckVouchAccountDiscriminatorBytes,
|
|
8462
|
+
getCloseStuckVouchAccountInstruction,
|
|
8463
|
+
getCloseStuckVouchAccountInstructionAsync,
|
|
8464
|
+
getCloseStuckVouchAccountInstructionDataCodec,
|
|
8465
|
+
getCloseStuckVouchAccountInstructionDataDecoder,
|
|
8466
|
+
getCloseStuckVouchAccountInstructionDataEncoder,
|
|
8467
|
+
getCloseUnrevealedVouchAccountDiscriminatorBytes,
|
|
8468
|
+
getCloseUnrevealedVouchAccountInstruction,
|
|
8469
|
+
getCloseUnrevealedVouchAccountInstructionAsync,
|
|
8470
|
+
getCloseUnrevealedVouchAccountInstructionDataCodec,
|
|
8471
|
+
getCloseUnrevealedVouchAccountInstructionDataDecoder,
|
|
8472
|
+
getCloseUnrevealedVouchAccountInstructionDataEncoder,
|
|
8473
|
+
getCloseVouchAccountDiscriminatorBytes,
|
|
8474
|
+
getCloseVouchAccountInstruction,
|
|
8475
|
+
getCloseVouchAccountInstructionAsync,
|
|
8476
|
+
getCloseVouchAccountInstructionDataCodec,
|
|
8477
|
+
getCloseVouchAccountInstructionDataDecoder,
|
|
8478
|
+
getCloseVouchAccountInstructionDataEncoder,
|
|
8472
8479
|
getClusterCodec,
|
|
8473
8480
|
getClusterDecoder,
|
|
8474
8481
|
getClusterEncoder,
|
|
@@ -8518,12 +8525,12 @@ export {
|
|
|
8518
8525
|
getFeesClaimedEventCodec,
|
|
8519
8526
|
getFeesClaimedEventDecoder,
|
|
8520
8527
|
getFeesClaimedEventEncoder,
|
|
8521
|
-
|
|
8522
|
-
|
|
8523
|
-
|
|
8524
|
-
|
|
8525
|
-
|
|
8526
|
-
|
|
8528
|
+
getFinalizeRevealVouchDiscriminatorBytes,
|
|
8529
|
+
getFinalizeRevealVouchInstruction,
|
|
8530
|
+
getFinalizeRevealVouchInstructionAsync,
|
|
8531
|
+
getFinalizeRevealVouchInstructionDataCodec,
|
|
8532
|
+
getFinalizeRevealVouchInstructionDataDecoder,
|
|
8533
|
+
getFinalizeRevealVouchInstructionDataEncoder,
|
|
8527
8534
|
getInitAllowedMintDiscriminatorBytes,
|
|
8528
8535
|
getInitAllowedMintInstruction,
|
|
8529
8536
|
getInitAllowedMintInstructionAsync,
|
|
@@ -8539,12 +8546,12 @@ export {
|
|
|
8539
8546
|
getInitPlatformParametersCodec,
|
|
8540
8547
|
getInitPlatformParametersDecoder,
|
|
8541
8548
|
getInitPlatformParametersEncoder,
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
|
|
8549
|
+
getInitVouchAccountDiscriminatorBytes,
|
|
8550
|
+
getInitVouchAccountInstruction,
|
|
8551
|
+
getInitVouchAccountInstructionAsync,
|
|
8552
|
+
getInitVouchAccountInstructionDataCodec,
|
|
8553
|
+
getInitVouchAccountInstructionDataDecoder,
|
|
8554
|
+
getInitVouchAccountInstructionDataEncoder,
|
|
8548
8555
|
getLocalCircuitSourceCodec,
|
|
8549
8556
|
getLocalCircuitSourceDecoder,
|
|
8550
8557
|
getLocalCircuitSourceEncoder,
|
|
@@ -8622,28 +8629,28 @@ export {
|
|
|
8622
8629
|
getRevealPeriodEndedEventCodec,
|
|
8623
8630
|
getRevealPeriodEndedEventDecoder,
|
|
8624
8631
|
getRevealPeriodEndedEventEncoder,
|
|
8625
|
-
|
|
8626
|
-
|
|
8627
|
-
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
|
|
8631
|
-
|
|
8632
|
-
|
|
8633
|
-
|
|
8634
|
-
|
|
8635
|
-
|
|
8636
|
-
|
|
8637
|
-
|
|
8638
|
-
|
|
8639
|
-
|
|
8640
|
-
|
|
8641
|
-
|
|
8642
|
-
|
|
8643
|
-
|
|
8644
|
-
|
|
8645
|
-
|
|
8646
|
-
|
|
8632
|
+
getRevealVouchCallbackDiscriminatorBytes,
|
|
8633
|
+
getRevealVouchCallbackInstruction,
|
|
8634
|
+
getRevealVouchCallbackInstructionDataCodec,
|
|
8635
|
+
getRevealVouchCallbackInstructionDataDecoder,
|
|
8636
|
+
getRevealVouchCallbackInstructionDataEncoder,
|
|
8637
|
+
getRevealVouchCompDefDiscriminatorBytes,
|
|
8638
|
+
getRevealVouchCompDefInstruction,
|
|
8639
|
+
getRevealVouchCompDefInstructionDataCodec,
|
|
8640
|
+
getRevealVouchCompDefInstructionDataDecoder,
|
|
8641
|
+
getRevealVouchCompDefInstructionDataEncoder,
|
|
8642
|
+
getRevealVouchDiscriminatorBytes,
|
|
8643
|
+
getRevealVouchFinalizedEventCodec,
|
|
8644
|
+
getRevealVouchFinalizedEventDecoder,
|
|
8645
|
+
getRevealVouchFinalizedEventEncoder,
|
|
8646
|
+
getRevealVouchInstruction,
|
|
8647
|
+
getRevealVouchInstructionAsync,
|
|
8648
|
+
getRevealVouchInstructionDataCodec,
|
|
8649
|
+
getRevealVouchInstructionDataDecoder,
|
|
8650
|
+
getRevealVouchInstructionDataEncoder,
|
|
8651
|
+
getRevealVouchOutputCodec,
|
|
8652
|
+
getRevealVouchOutputDecoder,
|
|
8653
|
+
getRevealVouchOutputEncoder,
|
|
8647
8654
|
getRewardAddedEventCodec,
|
|
8648
8655
|
getRewardAddedEventDecoder,
|
|
8649
8656
|
getRewardAddedEventEncoder,
|
|
@@ -8669,63 +8676,12 @@ export {
|
|
|
8669
8676
|
getSetWinningOptionInstructionDataCodec,
|
|
8670
8677
|
getSetWinningOptionInstructionDataDecoder,
|
|
8671
8678
|
getSetWinningOptionInstructionDataEncoder,
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
getStakeAccountClosedEventEncoder,
|
|
8676
|
-
getStakeAccountCodec,
|
|
8677
|
-
getStakeAccountDecoder,
|
|
8678
|
-
getStakeAccountDiscriminatorBytes,
|
|
8679
|
-
getStakeAccountEncoder,
|
|
8680
|
-
getStakeAccountInitializedEventCodec,
|
|
8681
|
-
getStakeAccountInitializedEventDecoder,
|
|
8682
|
-
getStakeAccountInitializedEventEncoder,
|
|
8683
|
-
getStakeCallbackDiscriminatorBytes,
|
|
8684
|
-
getStakeCallbackInstruction,
|
|
8685
|
-
getStakeCallbackInstructionDataCodec,
|
|
8686
|
-
getStakeCallbackInstructionDataDecoder,
|
|
8687
|
-
getStakeCallbackInstructionDataEncoder,
|
|
8688
|
-
getStakeCompDefDiscriminatorBytes,
|
|
8689
|
-
getStakeCompDefInstruction,
|
|
8690
|
-
getStakeCompDefInstructionDataCodec,
|
|
8691
|
-
getStakeCompDefInstructionDataDecoder,
|
|
8692
|
-
getStakeCompDefInstructionDataEncoder,
|
|
8693
|
-
getStakeDiscriminatorBytes,
|
|
8694
|
-
getStakeInstruction,
|
|
8695
|
-
getStakeInstructionAsync,
|
|
8696
|
-
getStakeInstructionDataCodec,
|
|
8697
|
-
getStakeInstructionDataDecoder,
|
|
8698
|
-
getStakeInstructionDataEncoder,
|
|
8699
|
-
getStakeOutputCodec,
|
|
8700
|
-
getStakeOutputDecoder,
|
|
8701
|
-
getStakeOutputEncoder,
|
|
8702
|
-
getStakeOutputStruct0Codec,
|
|
8703
|
-
getStakeOutputStruct0Decoder,
|
|
8704
|
-
getStakeOutputStruct0Encoder,
|
|
8705
|
-
getStakeParametersCodec,
|
|
8706
|
-
getStakeParametersDecoder,
|
|
8707
|
-
getStakeParametersEncoder,
|
|
8708
|
-
getStakeRevealedEventCodec,
|
|
8709
|
-
getStakeRevealedEventDecoder,
|
|
8710
|
-
getStakeRevealedEventEncoder,
|
|
8711
|
-
getStakedEventCodec,
|
|
8712
|
-
getStakedEventDecoder,
|
|
8713
|
-
getStakedEventEncoder,
|
|
8714
|
-
getStuckStakeClosedEventCodec,
|
|
8715
|
-
getStuckStakeClosedEventDecoder,
|
|
8716
|
-
getStuckStakeClosedEventEncoder,
|
|
8679
|
+
getStuckVouchClosedEventCodec,
|
|
8680
|
+
getStuckVouchClosedEventDecoder,
|
|
8681
|
+
getStuckVouchClosedEventEncoder,
|
|
8717
8682
|
getTimestampCodec,
|
|
8718
8683
|
getTimestampDecoder,
|
|
8719
8684
|
getTimestampEncoder,
|
|
8720
|
-
getUnstakeDiscriminatorBytes,
|
|
8721
|
-
getUnstakeInstruction,
|
|
8722
|
-
getUnstakeInstructionAsync,
|
|
8723
|
-
getUnstakeInstructionDataCodec,
|
|
8724
|
-
getUnstakeInstructionDataDecoder,
|
|
8725
|
-
getUnstakeInstructionDataEncoder,
|
|
8726
|
-
getUnstakedEventCodec,
|
|
8727
|
-
getUnstakedEventDecoder,
|
|
8728
|
-
getUnstakedEventEncoder,
|
|
8729
8685
|
getUpdateAuthorityChangedEventCodec,
|
|
8730
8686
|
getUpdateAuthorityChangedEventDecoder,
|
|
8731
8687
|
getUpdateAuthorityChangedEventEncoder,
|
|
@@ -8740,6 +8696,51 @@ export {
|
|
|
8740
8696
|
getUtilityPubkeysCodec,
|
|
8741
8697
|
getUtilityPubkeysDecoder,
|
|
8742
8698
|
getUtilityPubkeysEncoder,
|
|
8699
|
+
getVouchAccountAddress,
|
|
8700
|
+
getVouchAccountClosedEventCodec,
|
|
8701
|
+
getVouchAccountClosedEventDecoder,
|
|
8702
|
+
getVouchAccountClosedEventEncoder,
|
|
8703
|
+
getVouchAccountCodec,
|
|
8704
|
+
getVouchAccountDecoder,
|
|
8705
|
+
getVouchAccountDiscriminatorBytes,
|
|
8706
|
+
getVouchAccountEncoder,
|
|
8707
|
+
getVouchAccountInitializedEventCodec,
|
|
8708
|
+
getVouchAccountInitializedEventDecoder,
|
|
8709
|
+
getVouchAccountInitializedEventEncoder,
|
|
8710
|
+
getVouchCallbackDiscriminatorBytes,
|
|
8711
|
+
getVouchCallbackInstruction,
|
|
8712
|
+
getVouchCallbackInstructionDataCodec,
|
|
8713
|
+
getVouchCallbackInstructionDataDecoder,
|
|
8714
|
+
getVouchCallbackInstructionDataEncoder,
|
|
8715
|
+
getVouchCompDefDiscriminatorBytes,
|
|
8716
|
+
getVouchCompDefInstruction,
|
|
8717
|
+
getVouchCompDefInstructionDataCodec,
|
|
8718
|
+
getVouchCompDefInstructionDataDecoder,
|
|
8719
|
+
getVouchCompDefInstructionDataEncoder,
|
|
8720
|
+
getVouchDiscriminatorBytes,
|
|
8721
|
+
getVouchInstruction,
|
|
8722
|
+
getVouchInstructionAsync,
|
|
8723
|
+
getVouchInstructionDataCodec,
|
|
8724
|
+
getVouchInstructionDataDecoder,
|
|
8725
|
+
getVouchInstructionDataEncoder,
|
|
8726
|
+
getVouchOutputCodec,
|
|
8727
|
+
getVouchOutputDecoder,
|
|
8728
|
+
getVouchOutputEncoder,
|
|
8729
|
+
getVouchOutputStruct0Codec,
|
|
8730
|
+
getVouchOutputStruct0Decoder,
|
|
8731
|
+
getVouchOutputStruct0Encoder,
|
|
8732
|
+
getVouchParametersCodec,
|
|
8733
|
+
getVouchParametersDecoder,
|
|
8734
|
+
getVouchParametersEncoder,
|
|
8735
|
+
getVouchRevealedEventCodec,
|
|
8736
|
+
getVouchRevealedEventDecoder,
|
|
8737
|
+
getVouchRevealedEventEncoder,
|
|
8738
|
+
getVouchWithdrawnEventCodec,
|
|
8739
|
+
getVouchWithdrawnEventDecoder,
|
|
8740
|
+
getVouchWithdrawnEventEncoder,
|
|
8741
|
+
getVouchedEventCodec,
|
|
8742
|
+
getVouchedEventDecoder,
|
|
8743
|
+
getVouchedEventEncoder,
|
|
8743
8744
|
getWinningOptionSetEventCodec,
|
|
8744
8745
|
getWinningOptionSetEventDecoder,
|
|
8745
8746
|
getWinningOptionSetEventEncoder,
|
|
@@ -8749,10 +8750,16 @@ export {
|
|
|
8749
8750
|
getWithdrawRewardInstructionDataCodec,
|
|
8750
8751
|
getWithdrawRewardInstructionDataDecoder,
|
|
8751
8752
|
getWithdrawRewardInstructionDataEncoder,
|
|
8753
|
+
getWithdrawVouchDiscriminatorBytes,
|
|
8754
|
+
getWithdrawVouchInstruction,
|
|
8755
|
+
getWithdrawVouchInstructionAsync,
|
|
8756
|
+
getWithdrawVouchInstructionDataCodec,
|
|
8757
|
+
getWithdrawVouchInstructionDataDecoder,
|
|
8758
|
+
getWithdrawVouchInstructionDataEncoder,
|
|
8752
8759
|
identifyOpportunityMarketAccount,
|
|
8753
8760
|
identifyOpportunityMarketInstruction,
|
|
8754
8761
|
initAllowedMint,
|
|
8755
|
-
|
|
8762
|
+
initVouchAccount,
|
|
8756
8763
|
isCircuitSource,
|
|
8757
8764
|
isOpportunityMarketError,
|
|
8758
8765
|
nonceToBytes,
|
|
@@ -8763,39 +8770,39 @@ export {
|
|
|
8763
8770
|
parseClaimFeesInstruction,
|
|
8764
8771
|
parseClaimRewardsInstruction,
|
|
8765
8772
|
parseCloseOptionAccountInstruction,
|
|
8766
|
-
|
|
8767
|
-
|
|
8768
|
-
|
|
8773
|
+
parseCloseStuckVouchAccountInstruction,
|
|
8774
|
+
parseCloseUnrevealedVouchAccountInstruction,
|
|
8775
|
+
parseCloseVouchAccountInstruction,
|
|
8769
8776
|
parseCreateMarketInstruction,
|
|
8770
8777
|
parseEndRevealPeriodInstruction,
|
|
8771
|
-
|
|
8778
|
+
parseFinalizeRevealVouchInstruction,
|
|
8772
8779
|
parseInitAllowedMintInstruction,
|
|
8773
8780
|
parseInitPlatformConfigInstruction,
|
|
8774
|
-
|
|
8781
|
+
parseInitVouchAccountInstruction,
|
|
8775
8782
|
parseOpenMarketInstruction,
|
|
8776
8783
|
parseResolveMarketInstruction,
|
|
8777
|
-
|
|
8778
|
-
|
|
8779
|
-
|
|
8784
|
+
parseRevealVouchCallbackInstruction,
|
|
8785
|
+
parseRevealVouchCompDefInstruction,
|
|
8786
|
+
parseRevealVouchInstruction,
|
|
8780
8787
|
parseSetFeeClaimAuthorityInstruction,
|
|
8781
8788
|
parseSetUpdateAuthorityInstruction,
|
|
8782
8789
|
parseSetWinningOptionInstruction,
|
|
8783
|
-
parseStakeCallbackInstruction,
|
|
8784
|
-
parseStakeCompDefInstruction,
|
|
8785
|
-
parseStakeInstruction,
|
|
8786
|
-
parseUnstakeInstruction,
|
|
8787
8790
|
parseUpdatePlatformConfigInstruction,
|
|
8791
|
+
parseVouchCallbackInstruction,
|
|
8792
|
+
parseVouchCompDefInstruction,
|
|
8793
|
+
parseVouchInstruction,
|
|
8788
8794
|
parseWithdrawRewardInstruction,
|
|
8795
|
+
parseWithdrawVouchInstruction,
|
|
8789
8796
|
randomComputationOffset,
|
|
8790
8797
|
randomStateNonce,
|
|
8791
8798
|
resolveMarket,
|
|
8792
|
-
|
|
8799
|
+
revealVouch,
|
|
8793
8800
|
setFeeClaimAuthority,
|
|
8794
8801
|
setUpdateAuthority,
|
|
8795
8802
|
setWinningOption,
|
|
8796
|
-
stake,
|
|
8797
8803
|
toNumberArray,
|
|
8798
|
-
unstake,
|
|
8799
8804
|
updatePlatformConfig,
|
|
8800
|
-
|
|
8805
|
+
vouch,
|
|
8806
|
+
withdrawReward,
|
|
8807
|
+
withdrawVouch
|
|
8801
8808
|
};
|