@bench.games/opportunity-markets 0.3.0 → 0.3.2
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 +756 -1093
- package/dist/index.cjs +959 -1290
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +123 -273
- package/dist/index.d.ts +123 -273
- package/dist/index.js +756 -1093
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -176,14 +176,14 @@ async function fetchAllMaybeArciumSignerAccount(rpc, addresses, config) {
|
|
|
176
176
|
import {
|
|
177
177
|
assertAccountExists as assertAccountExists3,
|
|
178
178
|
assertAccountsExist as assertAccountsExist3,
|
|
179
|
-
combineCodec as
|
|
179
|
+
combineCodec as combineCodec50,
|
|
180
180
|
decodeAccount as decodeAccount3,
|
|
181
181
|
fetchEncodedAccount as fetchEncodedAccount3,
|
|
182
182
|
fetchEncodedAccounts as fetchEncodedAccounts3,
|
|
183
183
|
fixDecoderSize as fixDecoderSize3,
|
|
184
184
|
fixEncoderSize as fixEncoderSize3,
|
|
185
|
-
getAddressDecoder as
|
|
186
|
-
getAddressEncoder as
|
|
185
|
+
getAddressDecoder as getAddressDecoder26,
|
|
186
|
+
getAddressEncoder as getAddressEncoder26,
|
|
187
187
|
getArrayDecoder as getArrayDecoder12,
|
|
188
188
|
getArrayEncoder as getArrayEncoder12,
|
|
189
189
|
getBooleanDecoder as getBooleanDecoder6,
|
|
@@ -192,8 +192,8 @@ import {
|
|
|
192
192
|
getBytesEncoder as getBytesEncoder3,
|
|
193
193
|
getOptionDecoder as getOptionDecoder4,
|
|
194
194
|
getOptionEncoder as getOptionEncoder4,
|
|
195
|
-
getStructDecoder as
|
|
196
|
-
getStructEncoder as
|
|
195
|
+
getStructDecoder as getStructDecoder44,
|
|
196
|
+
getStructEncoder as getStructEncoder44,
|
|
197
197
|
getU16Decoder as getU16Decoder5,
|
|
198
198
|
getU16Encoder as getU16Encoder5,
|
|
199
199
|
getU64Decoder as getU64Decoder24,
|
|
@@ -834,8 +834,7 @@ function getMarketCreatedEventEncoder() {
|
|
|
834
834
|
["feeRates", getFeeRatesEncoder()],
|
|
835
835
|
["creatorFeeClaimer", getAddressEncoder7()],
|
|
836
836
|
["marketResolutionDeadlineSeconds", getU64Encoder7()],
|
|
837
|
-
["
|
|
838
|
-
["maxRevealPeriodSeconds", getU64Encoder7()],
|
|
837
|
+
["revealPeriodSeconds", getU64Encoder7()],
|
|
839
838
|
["timestamp", getI64Encoder5()]
|
|
840
839
|
]);
|
|
841
840
|
}
|
|
@@ -855,8 +854,7 @@ function getMarketCreatedEventDecoder() {
|
|
|
855
854
|
["feeRates", getFeeRatesDecoder()],
|
|
856
855
|
["creatorFeeClaimer", getAddressDecoder7()],
|
|
857
856
|
["marketResolutionDeadlineSeconds", getU64Decoder7()],
|
|
858
|
-
["
|
|
859
|
-
["maxRevealPeriodSeconds", getU64Decoder7()],
|
|
857
|
+
["revealPeriodSeconds", getU64Decoder7()],
|
|
860
858
|
["timestamp", getI64Decoder5()]
|
|
861
859
|
]);
|
|
862
860
|
}
|
|
@@ -1363,6 +1361,8 @@ import {
|
|
|
1363
1361
|
getI64Encoder as getI64Encoder11,
|
|
1364
1362
|
getStructDecoder as getStructDecoder28,
|
|
1365
1363
|
getStructEncoder as getStructEncoder28,
|
|
1364
|
+
getU128Decoder,
|
|
1365
|
+
getU128Encoder,
|
|
1366
1366
|
getU32Decoder as getU32Decoder6,
|
|
1367
1367
|
getU32Encoder as getU32Encoder6,
|
|
1368
1368
|
getU64Decoder as getU64Decoder13,
|
|
@@ -1377,7 +1377,7 @@ function getRevealStakeFinalizedEventEncoder() {
|
|
|
1377
1377
|
["optionId", getU64Encoder13()],
|
|
1378
1378
|
["userStake", getU64Encoder13()],
|
|
1379
1379
|
["userScore", getU64Encoder13()],
|
|
1380
|
-
["totalScore",
|
|
1380
|
+
["totalScore", getU128Encoder()],
|
|
1381
1381
|
["totalStake", getU64Encoder13()],
|
|
1382
1382
|
["timestamp", getI64Encoder11()]
|
|
1383
1383
|
]);
|
|
@@ -1391,7 +1391,7 @@ function getRevealStakeFinalizedEventDecoder() {
|
|
|
1391
1391
|
["optionId", getU64Decoder13()],
|
|
1392
1392
|
["userStake", getU64Decoder13()],
|
|
1393
1393
|
["userScore", getU64Decoder13()],
|
|
1394
|
-
["totalScore",
|
|
1394
|
+
["totalScore", getU128Decoder()],
|
|
1395
1395
|
["totalStake", getU64Decoder13()],
|
|
1396
1396
|
["timestamp", getI64Decoder11()]
|
|
1397
1397
|
]);
|
|
@@ -1465,7 +1465,7 @@ function getRewardAddedEventCodec() {
|
|
|
1465
1465
|
);
|
|
1466
1466
|
}
|
|
1467
1467
|
|
|
1468
|
-
// src/generated/types/
|
|
1468
|
+
// src/generated/types/rewardWithdrawnEvent.ts
|
|
1469
1469
|
import {
|
|
1470
1470
|
combineCodec as combineCodec37,
|
|
1471
1471
|
getAddressDecoder as getAddressDecoder17,
|
|
@@ -1474,49 +1474,35 @@ import {
|
|
|
1474
1474
|
getI64Encoder as getI64Encoder13,
|
|
1475
1475
|
getStructDecoder as getStructDecoder31,
|
|
1476
1476
|
getStructEncoder as getStructEncoder31,
|
|
1477
|
-
getU32Decoder as getU32Decoder7,
|
|
1478
|
-
getU32Encoder as getU32Encoder7,
|
|
1479
1477
|
getU64Decoder as getU64Decoder16,
|
|
1480
1478
|
getU64Encoder as getU64Encoder16
|
|
1481
1479
|
} from "@solana/kit";
|
|
1482
|
-
function
|
|
1480
|
+
function getRewardWithdrawnEventEncoder() {
|
|
1483
1481
|
return getStructEncoder31([
|
|
1484
|
-
["owner", getAddressEncoder17()],
|
|
1485
1482
|
["market", getAddressEncoder17()],
|
|
1486
|
-
["
|
|
1487
|
-
["stakeAccountId", getU32Encoder7()],
|
|
1488
|
-
["optionId", getU64Encoder16()],
|
|
1483
|
+
["sponsor", getAddressEncoder17()],
|
|
1489
1484
|
["rewardAmount", getU64Encoder16()],
|
|
1490
|
-
["
|
|
1491
|
-
["unstakedAtTimestamp", getU64Encoder16()],
|
|
1492
|
-
["stakeAmount", getU64Encoder16()],
|
|
1493
|
-
["score", getU64Encoder16()],
|
|
1485
|
+
["refundTokenAccount", getAddressEncoder17()],
|
|
1494
1486
|
["timestamp", getI64Encoder13()]
|
|
1495
1487
|
]);
|
|
1496
1488
|
}
|
|
1497
|
-
function
|
|
1489
|
+
function getRewardWithdrawnEventDecoder() {
|
|
1498
1490
|
return getStructDecoder31([
|
|
1499
|
-
["owner", getAddressDecoder17()],
|
|
1500
1491
|
["market", getAddressDecoder17()],
|
|
1501
|
-
["
|
|
1502
|
-
["stakeAccountId", getU32Decoder7()],
|
|
1503
|
-
["optionId", getU64Decoder16()],
|
|
1492
|
+
["sponsor", getAddressDecoder17()],
|
|
1504
1493
|
["rewardAmount", getU64Decoder16()],
|
|
1505
|
-
["
|
|
1506
|
-
["unstakedAtTimestamp", getU64Decoder16()],
|
|
1507
|
-
["stakeAmount", getU64Decoder16()],
|
|
1508
|
-
["score", getU64Decoder16()],
|
|
1494
|
+
["refundTokenAccount", getAddressDecoder17()],
|
|
1509
1495
|
["timestamp", getI64Decoder13()]
|
|
1510
1496
|
]);
|
|
1511
1497
|
}
|
|
1512
|
-
function
|
|
1498
|
+
function getRewardWithdrawnEventCodec() {
|
|
1513
1499
|
return combineCodec37(
|
|
1514
|
-
|
|
1515
|
-
|
|
1500
|
+
getRewardWithdrawnEventEncoder(),
|
|
1501
|
+
getRewardWithdrawnEventDecoder()
|
|
1516
1502
|
);
|
|
1517
1503
|
}
|
|
1518
1504
|
|
|
1519
|
-
// src/generated/types/
|
|
1505
|
+
// src/generated/types/stakeAccountClosedEvent.ts
|
|
1520
1506
|
import {
|
|
1521
1507
|
combineCodec as combineCodec38,
|
|
1522
1508
|
getAddressDecoder as getAddressDecoder18,
|
|
@@ -1525,31 +1511,45 @@ import {
|
|
|
1525
1511
|
getI64Encoder as getI64Encoder14,
|
|
1526
1512
|
getStructDecoder as getStructDecoder32,
|
|
1527
1513
|
getStructEncoder as getStructEncoder32,
|
|
1514
|
+
getU32Decoder as getU32Decoder7,
|
|
1515
|
+
getU32Encoder as getU32Encoder7,
|
|
1528
1516
|
getU64Decoder as getU64Decoder17,
|
|
1529
1517
|
getU64Encoder as getU64Encoder17
|
|
1530
1518
|
} from "@solana/kit";
|
|
1531
|
-
function
|
|
1519
|
+
function getStakeAccountClosedEventEncoder() {
|
|
1532
1520
|
return getStructEncoder32([
|
|
1521
|
+
["owner", getAddressEncoder18()],
|
|
1533
1522
|
["market", getAddressEncoder18()],
|
|
1534
|
-
["
|
|
1523
|
+
["stakeAccount", getAddressEncoder18()],
|
|
1524
|
+
["stakeAccountId", getU32Encoder7()],
|
|
1525
|
+
["optionId", getU64Encoder17()],
|
|
1535
1526
|
["rewardAmount", getU64Encoder17()],
|
|
1536
|
-
["
|
|
1527
|
+
["stakedAtTimestamp", getU64Encoder17()],
|
|
1528
|
+
["stakeEndTimestamp", getU64Encoder17()],
|
|
1529
|
+
["stakeAmount", getU64Encoder17()],
|
|
1530
|
+
["score", getU64Encoder17()],
|
|
1537
1531
|
["timestamp", getI64Encoder14()]
|
|
1538
1532
|
]);
|
|
1539
1533
|
}
|
|
1540
|
-
function
|
|
1534
|
+
function getStakeAccountClosedEventDecoder() {
|
|
1541
1535
|
return getStructDecoder32([
|
|
1536
|
+
["owner", getAddressDecoder18()],
|
|
1542
1537
|
["market", getAddressDecoder18()],
|
|
1543
|
-
["
|
|
1538
|
+
["stakeAccount", getAddressDecoder18()],
|
|
1539
|
+
["stakeAccountId", getU32Decoder7()],
|
|
1540
|
+
["optionId", getU64Decoder17()],
|
|
1544
1541
|
["rewardAmount", getU64Decoder17()],
|
|
1545
|
-
["
|
|
1542
|
+
["stakedAtTimestamp", getU64Decoder17()],
|
|
1543
|
+
["stakeEndTimestamp", getU64Decoder17()],
|
|
1544
|
+
["stakeAmount", getU64Decoder17()],
|
|
1545
|
+
["score", getU64Decoder17()],
|
|
1546
1546
|
["timestamp", getI64Decoder14()]
|
|
1547
1547
|
]);
|
|
1548
1548
|
}
|
|
1549
|
-
function
|
|
1549
|
+
function getStakeAccountClosedEventCodec() {
|
|
1550
1550
|
return combineCodec38(
|
|
1551
|
-
|
|
1552
|
-
|
|
1551
|
+
getStakeAccountClosedEventEncoder(),
|
|
1552
|
+
getStakeAccountClosedEventDecoder()
|
|
1553
1553
|
);
|
|
1554
1554
|
}
|
|
1555
1555
|
|
|
@@ -1601,8 +1601,8 @@ import {
|
|
|
1601
1601
|
getI64Encoder as getI64Encoder16,
|
|
1602
1602
|
getStructDecoder as getStructDecoder34,
|
|
1603
1603
|
getStructEncoder as getStructEncoder34,
|
|
1604
|
-
getU128Decoder,
|
|
1605
|
-
getU128Encoder,
|
|
1604
|
+
getU128Decoder as getU128Decoder2,
|
|
1605
|
+
getU128Encoder as getU128Encoder2,
|
|
1606
1606
|
getU32Decoder as getU32Decoder9,
|
|
1607
1607
|
getU32Encoder as getU32Encoder9,
|
|
1608
1608
|
getU64Decoder as getU64Decoder18,
|
|
@@ -1617,12 +1617,12 @@ function getStakedEventEncoder() {
|
|
|
1617
1617
|
["stakeAccount", getAddressEncoder20()],
|
|
1618
1618
|
["stakeAccountId", getU32Encoder9()],
|
|
1619
1619
|
["stakeEncryptedOption", getArrayEncoder9(getU8Encoder13(), { size: 32 })],
|
|
1620
|
-
["stakeStateNonce",
|
|
1620
|
+
["stakeStateNonce", getU128Encoder2()],
|
|
1621
1621
|
[
|
|
1622
1622
|
"stakeEncryptedOptionDisclosure",
|
|
1623
1623
|
getArrayEncoder9(getU8Encoder13(), { size: 32 })
|
|
1624
1624
|
],
|
|
1625
|
-
["stakeStateDisclosureNonce",
|
|
1625
|
+
["stakeStateDisclosureNonce", getU128Encoder2()],
|
|
1626
1626
|
["amount", getU64Encoder18()],
|
|
1627
1627
|
["timestamp", getI64Encoder16()]
|
|
1628
1628
|
]);
|
|
@@ -1634,12 +1634,12 @@ function getStakedEventDecoder() {
|
|
|
1634
1634
|
["stakeAccount", getAddressDecoder20()],
|
|
1635
1635
|
["stakeAccountId", getU32Decoder9()],
|
|
1636
1636
|
["stakeEncryptedOption", getArrayDecoder9(getU8Decoder13(), { size: 32 })],
|
|
1637
|
-
["stakeStateNonce",
|
|
1637
|
+
["stakeStateNonce", getU128Decoder2()],
|
|
1638
1638
|
[
|
|
1639
1639
|
"stakeEncryptedOptionDisclosure",
|
|
1640
1640
|
getArrayDecoder9(getU8Decoder13(), { size: 32 })
|
|
1641
1641
|
],
|
|
1642
|
-
["stakeStateDisclosureNonce",
|
|
1642
|
+
["stakeStateDisclosureNonce", getU128Decoder2()],
|
|
1643
1643
|
["amount", getU64Decoder18()],
|
|
1644
1644
|
["timestamp", getI64Decoder16()]
|
|
1645
1645
|
]);
|
|
@@ -1671,8 +1671,8 @@ import {
|
|
|
1671
1671
|
getArrayEncoder as getArrayEncoder10,
|
|
1672
1672
|
getStructDecoder as getStructDecoder36,
|
|
1673
1673
|
getStructEncoder as getStructEncoder36,
|
|
1674
|
-
getU128Decoder as
|
|
1675
|
-
getU128Encoder as
|
|
1674
|
+
getU128Decoder as getU128Decoder3,
|
|
1675
|
+
getU128Encoder as getU128Encoder3,
|
|
1676
1676
|
getU8Decoder as getU8Decoder14,
|
|
1677
1677
|
getU8Encoder as getU8Encoder14
|
|
1678
1678
|
} from "@solana/kit";
|
|
@@ -1682,7 +1682,7 @@ function getStakeOutputStruct0Encoder() {
|
|
|
1682
1682
|
"field0",
|
|
1683
1683
|
getStructEncoder36([
|
|
1684
1684
|
["encryptionKey", getArrayEncoder10(getU8Encoder14(), { size: 32 })],
|
|
1685
|
-
["nonce",
|
|
1685
|
+
["nonce", getU128Encoder3()],
|
|
1686
1686
|
[
|
|
1687
1687
|
"ciphertexts",
|
|
1688
1688
|
getArrayEncoder10(getArrayEncoder10(getU8Encoder14(), { size: 32 }), {
|
|
@@ -1695,7 +1695,7 @@ function getStakeOutputStruct0Encoder() {
|
|
|
1695
1695
|
"field1",
|
|
1696
1696
|
getStructEncoder36([
|
|
1697
1697
|
["encryptionKey", getArrayEncoder10(getU8Encoder14(), { size: 32 })],
|
|
1698
|
-
["nonce",
|
|
1698
|
+
["nonce", getU128Encoder3()],
|
|
1699
1699
|
[
|
|
1700
1700
|
"ciphertexts",
|
|
1701
1701
|
getArrayEncoder10(getArrayEncoder10(getU8Encoder14(), { size: 32 }), {
|
|
@@ -1712,7 +1712,7 @@ function getStakeOutputStruct0Decoder() {
|
|
|
1712
1712
|
"field0",
|
|
1713
1713
|
getStructDecoder36([
|
|
1714
1714
|
["encryptionKey", getArrayDecoder10(getU8Decoder14(), { size: 32 })],
|
|
1715
|
-
["nonce",
|
|
1715
|
+
["nonce", getU128Decoder3()],
|
|
1716
1716
|
[
|
|
1717
1717
|
"ciphertexts",
|
|
1718
1718
|
getArrayDecoder10(getArrayDecoder10(getU8Decoder14(), { size: 32 }), {
|
|
@@ -1725,7 +1725,7 @@ function getStakeOutputStruct0Decoder() {
|
|
|
1725
1725
|
"field1",
|
|
1726
1726
|
getStructDecoder36([
|
|
1727
1727
|
["encryptionKey", getArrayDecoder10(getU8Decoder14(), { size: 32 })],
|
|
1728
|
-
["nonce",
|
|
1728
|
+
["nonce", getU128Decoder3()],
|
|
1729
1729
|
[
|
|
1730
1730
|
"ciphertexts",
|
|
1731
1731
|
getArrayDecoder10(getArrayDecoder10(getU8Decoder14(), { size: 32 }), {
|
|
@@ -1786,7 +1786,7 @@ function getStakeRevealedEventCodec() {
|
|
|
1786
1786
|
);
|
|
1787
1787
|
}
|
|
1788
1788
|
|
|
1789
|
-
// src/generated/types/
|
|
1789
|
+
// src/generated/types/stuckStakeClosedEvent.ts
|
|
1790
1790
|
import {
|
|
1791
1791
|
combineCodec as combineCodec44,
|
|
1792
1792
|
getAddressDecoder as getAddressDecoder22,
|
|
@@ -1794,98 +1794,40 @@ import {
|
|
|
1794
1794
|
getI64Decoder as getI64Decoder18,
|
|
1795
1795
|
getI64Encoder as getI64Encoder18,
|
|
1796
1796
|
getStructDecoder as getStructDecoder38,
|
|
1797
|
-
getStructEncoder as getStructEncoder38
|
|
1798
|
-
} from "@solana/kit";
|
|
1799
|
-
function getStakingPausedEventEncoder() {
|
|
1800
|
-
return getStructEncoder38([
|
|
1801
|
-
["market", getAddressEncoder22()],
|
|
1802
|
-
["timestamp", getI64Encoder18()]
|
|
1803
|
-
]);
|
|
1804
|
-
}
|
|
1805
|
-
function getStakingPausedEventDecoder() {
|
|
1806
|
-
return getStructDecoder38([
|
|
1807
|
-
["market", getAddressDecoder22()],
|
|
1808
|
-
["timestamp", getI64Decoder18()]
|
|
1809
|
-
]);
|
|
1810
|
-
}
|
|
1811
|
-
function getStakingPausedEventCodec() {
|
|
1812
|
-
return combineCodec44(
|
|
1813
|
-
getStakingPausedEventEncoder(),
|
|
1814
|
-
getStakingPausedEventDecoder()
|
|
1815
|
-
);
|
|
1816
|
-
}
|
|
1817
|
-
|
|
1818
|
-
// src/generated/types/stakingResumedEvent.ts
|
|
1819
|
-
import {
|
|
1820
|
-
combineCodec as combineCodec45,
|
|
1821
|
-
getAddressDecoder as getAddressDecoder23,
|
|
1822
|
-
getAddressEncoder as getAddressEncoder23,
|
|
1823
|
-
getI64Decoder as getI64Decoder19,
|
|
1824
|
-
getI64Encoder as getI64Encoder19,
|
|
1825
|
-
getStructDecoder as getStructDecoder39,
|
|
1826
|
-
getStructEncoder as getStructEncoder39
|
|
1827
|
-
} from "@solana/kit";
|
|
1828
|
-
function getStakingResumedEventEncoder() {
|
|
1829
|
-
return getStructEncoder39([
|
|
1830
|
-
["market", getAddressEncoder23()],
|
|
1831
|
-
["timestamp", getI64Encoder19()]
|
|
1832
|
-
]);
|
|
1833
|
-
}
|
|
1834
|
-
function getStakingResumedEventDecoder() {
|
|
1835
|
-
return getStructDecoder39([
|
|
1836
|
-
["market", getAddressDecoder23()],
|
|
1837
|
-
["timestamp", getI64Decoder19()]
|
|
1838
|
-
]);
|
|
1839
|
-
}
|
|
1840
|
-
function getStakingResumedEventCodec() {
|
|
1841
|
-
return combineCodec45(
|
|
1842
|
-
getStakingResumedEventEncoder(),
|
|
1843
|
-
getStakingResumedEventDecoder()
|
|
1844
|
-
);
|
|
1845
|
-
}
|
|
1846
|
-
|
|
1847
|
-
// src/generated/types/stuckStakeClosedEvent.ts
|
|
1848
|
-
import {
|
|
1849
|
-
combineCodec as combineCodec46,
|
|
1850
|
-
getAddressDecoder as getAddressDecoder24,
|
|
1851
|
-
getAddressEncoder as getAddressEncoder24,
|
|
1852
|
-
getI64Decoder as getI64Decoder20,
|
|
1853
|
-
getI64Encoder as getI64Encoder20,
|
|
1854
|
-
getStructDecoder as getStructDecoder40,
|
|
1855
|
-
getStructEncoder as getStructEncoder40,
|
|
1797
|
+
getStructEncoder as getStructEncoder38,
|
|
1856
1798
|
getU32Decoder as getU32Decoder11,
|
|
1857
1799
|
getU32Encoder as getU32Encoder11,
|
|
1858
1800
|
getU64Decoder as getU64Decoder20,
|
|
1859
1801
|
getU64Encoder as getU64Encoder20
|
|
1860
1802
|
} from "@solana/kit";
|
|
1861
1803
|
function getStuckStakeClosedEventEncoder() {
|
|
1862
|
-
return
|
|
1863
|
-
["owner",
|
|
1864
|
-
["market",
|
|
1865
|
-
["stakeAccount",
|
|
1804
|
+
return getStructEncoder38([
|
|
1805
|
+
["owner", getAddressEncoder22()],
|
|
1806
|
+
["market", getAddressEncoder22()],
|
|
1807
|
+
["stakeAccount", getAddressEncoder22()],
|
|
1866
1808
|
["stakeAccountId", getU32Encoder11()],
|
|
1867
1809
|
["refundedAmount", getU64Encoder20()],
|
|
1868
1810
|
["refundedPlatformFee", getU64Encoder20()],
|
|
1869
1811
|
["refundedRewardPoolFee", getU64Encoder20()],
|
|
1870
1812
|
["refundedCreatorFee", getU64Encoder20()],
|
|
1871
|
-
["timestamp",
|
|
1813
|
+
["timestamp", getI64Encoder18()]
|
|
1872
1814
|
]);
|
|
1873
1815
|
}
|
|
1874
1816
|
function getStuckStakeClosedEventDecoder() {
|
|
1875
|
-
return
|
|
1876
|
-
["owner",
|
|
1877
|
-
["market",
|
|
1878
|
-
["stakeAccount",
|
|
1817
|
+
return getStructDecoder38([
|
|
1818
|
+
["owner", getAddressDecoder22()],
|
|
1819
|
+
["market", getAddressDecoder22()],
|
|
1820
|
+
["stakeAccount", getAddressDecoder22()],
|
|
1879
1821
|
["stakeAccountId", getU32Decoder11()],
|
|
1880
1822
|
["refundedAmount", getU64Decoder20()],
|
|
1881
1823
|
["refundedPlatformFee", getU64Decoder20()],
|
|
1882
1824
|
["refundedRewardPoolFee", getU64Decoder20()],
|
|
1883
1825
|
["refundedCreatorFee", getU64Decoder20()],
|
|
1884
|
-
["timestamp",
|
|
1826
|
+
["timestamp", getI64Decoder18()]
|
|
1885
1827
|
]);
|
|
1886
1828
|
}
|
|
1887
1829
|
function getStuckStakeClosedEventCodec() {
|
|
1888
|
-
return
|
|
1830
|
+
return combineCodec44(
|
|
1889
1831
|
getStuckStakeClosedEventEncoder(),
|
|
1890
1832
|
getStuckStakeClosedEventDecoder()
|
|
1891
1833
|
);
|
|
@@ -1893,88 +1835,88 @@ function getStuckStakeClosedEventCodec() {
|
|
|
1893
1835
|
|
|
1894
1836
|
// src/generated/types/timestamp.ts
|
|
1895
1837
|
import {
|
|
1896
|
-
combineCodec as
|
|
1897
|
-
getStructDecoder as
|
|
1898
|
-
getStructEncoder as
|
|
1838
|
+
combineCodec as combineCodec45,
|
|
1839
|
+
getStructDecoder as getStructDecoder39,
|
|
1840
|
+
getStructEncoder as getStructEncoder39,
|
|
1899
1841
|
getU64Decoder as getU64Decoder21,
|
|
1900
1842
|
getU64Encoder as getU64Encoder21
|
|
1901
1843
|
} from "@solana/kit";
|
|
1902
1844
|
function getTimestampEncoder() {
|
|
1903
|
-
return
|
|
1845
|
+
return getStructEncoder39([["timestamp", getU64Encoder21()]]);
|
|
1904
1846
|
}
|
|
1905
1847
|
function getTimestampDecoder() {
|
|
1906
|
-
return
|
|
1848
|
+
return getStructDecoder39([["timestamp", getU64Decoder21()]]);
|
|
1907
1849
|
}
|
|
1908
1850
|
function getTimestampCodec() {
|
|
1909
|
-
return
|
|
1851
|
+
return combineCodec45(getTimestampEncoder(), getTimestampDecoder());
|
|
1910
1852
|
}
|
|
1911
1853
|
|
|
1912
1854
|
// src/generated/types/unstakedEvent.ts
|
|
1913
1855
|
import {
|
|
1914
|
-
combineCodec as
|
|
1915
|
-
getAddressDecoder as
|
|
1916
|
-
getAddressEncoder as
|
|
1917
|
-
getI64Decoder as
|
|
1918
|
-
getI64Encoder as
|
|
1919
|
-
getStructDecoder as
|
|
1920
|
-
getStructEncoder as
|
|
1856
|
+
combineCodec as combineCodec46,
|
|
1857
|
+
getAddressDecoder as getAddressDecoder23,
|
|
1858
|
+
getAddressEncoder as getAddressEncoder23,
|
|
1859
|
+
getI64Decoder as getI64Decoder19,
|
|
1860
|
+
getI64Encoder as getI64Encoder19,
|
|
1861
|
+
getStructDecoder as getStructDecoder40,
|
|
1862
|
+
getStructEncoder as getStructEncoder40,
|
|
1921
1863
|
getU32Decoder as getU32Decoder12,
|
|
1922
1864
|
getU32Encoder as getU32Encoder12,
|
|
1923
1865
|
getU64Decoder as getU64Decoder22,
|
|
1924
1866
|
getU64Encoder as getU64Encoder22
|
|
1925
1867
|
} from "@solana/kit";
|
|
1926
1868
|
function getUnstakedEventEncoder() {
|
|
1927
|
-
return
|
|
1928
|
-
["owner",
|
|
1929
|
-
["market",
|
|
1930
|
-
["stakeAccount",
|
|
1869
|
+
return getStructEncoder40([
|
|
1870
|
+
["owner", getAddressEncoder23()],
|
|
1871
|
+
["market", getAddressEncoder23()],
|
|
1872
|
+
["stakeAccount", getAddressEncoder23()],
|
|
1931
1873
|
["stakeAccountId", getU32Encoder12()],
|
|
1932
1874
|
["amount", getU64Encoder22()],
|
|
1933
|
-
["timestamp",
|
|
1875
|
+
["timestamp", getI64Encoder19()]
|
|
1934
1876
|
]);
|
|
1935
1877
|
}
|
|
1936
1878
|
function getUnstakedEventDecoder() {
|
|
1937
|
-
return
|
|
1938
|
-
["owner",
|
|
1939
|
-
["market",
|
|
1940
|
-
["stakeAccount",
|
|
1879
|
+
return getStructDecoder40([
|
|
1880
|
+
["owner", getAddressDecoder23()],
|
|
1881
|
+
["market", getAddressDecoder23()],
|
|
1882
|
+
["stakeAccount", getAddressDecoder23()],
|
|
1941
1883
|
["stakeAccountId", getU32Decoder12()],
|
|
1942
1884
|
["amount", getU64Decoder22()],
|
|
1943
|
-
["timestamp",
|
|
1885
|
+
["timestamp", getI64Decoder19()]
|
|
1944
1886
|
]);
|
|
1945
1887
|
}
|
|
1946
1888
|
function getUnstakedEventCodec() {
|
|
1947
|
-
return
|
|
1889
|
+
return combineCodec46(getUnstakedEventEncoder(), getUnstakedEventDecoder());
|
|
1948
1890
|
}
|
|
1949
1891
|
|
|
1950
1892
|
// src/generated/types/updateAuthorityChangedEvent.ts
|
|
1951
1893
|
import {
|
|
1952
|
-
combineCodec as
|
|
1953
|
-
getAddressDecoder as
|
|
1954
|
-
getAddressEncoder as
|
|
1955
|
-
getI64Decoder as
|
|
1956
|
-
getI64Encoder as
|
|
1957
|
-
getStructDecoder as
|
|
1958
|
-
getStructEncoder as
|
|
1894
|
+
combineCodec as combineCodec47,
|
|
1895
|
+
getAddressDecoder as getAddressDecoder24,
|
|
1896
|
+
getAddressEncoder as getAddressEncoder24,
|
|
1897
|
+
getI64Decoder as getI64Decoder20,
|
|
1898
|
+
getI64Encoder as getI64Encoder20,
|
|
1899
|
+
getStructDecoder as getStructDecoder41,
|
|
1900
|
+
getStructEncoder as getStructEncoder41
|
|
1959
1901
|
} from "@solana/kit";
|
|
1960
1902
|
function getUpdateAuthorityChangedEventEncoder() {
|
|
1961
|
-
return
|
|
1962
|
-
["platformConfig",
|
|
1963
|
-
["oldValue",
|
|
1964
|
-
["newValue",
|
|
1965
|
-
["timestamp",
|
|
1903
|
+
return getStructEncoder41([
|
|
1904
|
+
["platformConfig", getAddressEncoder24()],
|
|
1905
|
+
["oldValue", getAddressEncoder24()],
|
|
1906
|
+
["newValue", getAddressEncoder24()],
|
|
1907
|
+
["timestamp", getI64Encoder20()]
|
|
1966
1908
|
]);
|
|
1967
1909
|
}
|
|
1968
1910
|
function getUpdateAuthorityChangedEventDecoder() {
|
|
1969
|
-
return
|
|
1970
|
-
["platformConfig",
|
|
1971
|
-
["oldValue",
|
|
1972
|
-
["newValue",
|
|
1973
|
-
["timestamp",
|
|
1911
|
+
return getStructDecoder41([
|
|
1912
|
+
["platformConfig", getAddressDecoder24()],
|
|
1913
|
+
["oldValue", getAddressDecoder24()],
|
|
1914
|
+
["newValue", getAddressDecoder24()],
|
|
1915
|
+
["timestamp", getI64Decoder20()]
|
|
1974
1916
|
]);
|
|
1975
1917
|
}
|
|
1976
1918
|
function getUpdateAuthorityChangedEventCodec() {
|
|
1977
|
-
return
|
|
1919
|
+
return combineCodec47(
|
|
1978
1920
|
getUpdateAuthorityChangedEventEncoder(),
|
|
1979
1921
|
getUpdateAuthorityChangedEventDecoder()
|
|
1980
1922
|
);
|
|
@@ -1982,16 +1924,16 @@ function getUpdateAuthorityChangedEventCodec() {
|
|
|
1982
1924
|
|
|
1983
1925
|
// src/generated/types/utilityPubkeys.ts
|
|
1984
1926
|
import {
|
|
1985
|
-
combineCodec as
|
|
1927
|
+
combineCodec as combineCodec48,
|
|
1986
1928
|
getArrayDecoder as getArrayDecoder11,
|
|
1987
1929
|
getArrayEncoder as getArrayEncoder11,
|
|
1988
|
-
getStructDecoder as
|
|
1989
|
-
getStructEncoder as
|
|
1930
|
+
getStructDecoder as getStructDecoder42,
|
|
1931
|
+
getStructEncoder as getStructEncoder42,
|
|
1990
1932
|
getU8Decoder as getU8Decoder15,
|
|
1991
1933
|
getU8Encoder as getU8Encoder15
|
|
1992
1934
|
} from "@solana/kit";
|
|
1993
1935
|
function getUtilityPubkeysEncoder() {
|
|
1994
|
-
return
|
|
1936
|
+
return getStructEncoder42([
|
|
1995
1937
|
["x25519Pubkey", getArrayEncoder11(getU8Encoder15(), { size: 32 })],
|
|
1996
1938
|
["ed25519VerifyingKey", getArrayEncoder11(getU8Encoder15(), { size: 32 })],
|
|
1997
1939
|
["elgamalPubkey", getArrayEncoder11(getU8Encoder15(), { size: 32 })],
|
|
@@ -1999,7 +1941,7 @@ function getUtilityPubkeysEncoder() {
|
|
|
1999
1941
|
]);
|
|
2000
1942
|
}
|
|
2001
1943
|
function getUtilityPubkeysDecoder() {
|
|
2002
|
-
return
|
|
1944
|
+
return getStructDecoder42([
|
|
2003
1945
|
["x25519Pubkey", getArrayDecoder11(getU8Decoder15(), { size: 32 })],
|
|
2004
1946
|
["ed25519VerifyingKey", getArrayDecoder11(getU8Decoder15(), { size: 32 })],
|
|
2005
1947
|
["elgamalPubkey", getArrayDecoder11(getU8Decoder15(), { size: 32 })],
|
|
@@ -2007,47 +1949,47 @@ function getUtilityPubkeysDecoder() {
|
|
|
2007
1949
|
]);
|
|
2008
1950
|
}
|
|
2009
1951
|
function getUtilityPubkeysCodec() {
|
|
2010
|
-
return
|
|
1952
|
+
return combineCodec48(getUtilityPubkeysEncoder(), getUtilityPubkeysDecoder());
|
|
2011
1953
|
}
|
|
2012
1954
|
|
|
2013
1955
|
// src/generated/types/winningOptionSetEvent.ts
|
|
2014
1956
|
import {
|
|
2015
|
-
combineCodec as
|
|
2016
|
-
getAddressDecoder as
|
|
2017
|
-
getAddressEncoder as
|
|
2018
|
-
getI64Decoder as
|
|
2019
|
-
getI64Encoder as
|
|
2020
|
-
getStructDecoder as
|
|
2021
|
-
getStructEncoder as
|
|
1957
|
+
combineCodec as combineCodec49,
|
|
1958
|
+
getAddressDecoder as getAddressDecoder25,
|
|
1959
|
+
getAddressEncoder as getAddressEncoder25,
|
|
1960
|
+
getI64Decoder as getI64Decoder21,
|
|
1961
|
+
getI64Encoder as getI64Encoder21,
|
|
1962
|
+
getStructDecoder as getStructDecoder43,
|
|
1963
|
+
getStructEncoder as getStructEncoder43,
|
|
2022
1964
|
getU16Decoder as getU16Decoder4,
|
|
2023
1965
|
getU16Encoder as getU16Encoder4,
|
|
2024
1966
|
getU64Decoder as getU64Decoder23,
|
|
2025
1967
|
getU64Encoder as getU64Encoder23
|
|
2026
1968
|
} from "@solana/kit";
|
|
2027
1969
|
function getWinningOptionSetEventEncoder() {
|
|
2028
|
-
return
|
|
2029
|
-
["market",
|
|
2030
|
-
["marketAuthority",
|
|
2031
|
-
["option",
|
|
1970
|
+
return getStructEncoder43([
|
|
1971
|
+
["market", getAddressEncoder25()],
|
|
1972
|
+
["marketAuthority", getAddressEncoder25()],
|
|
1973
|
+
["option", getAddressEncoder25()],
|
|
2032
1974
|
["optionId", getU64Encoder23()],
|
|
2033
|
-
["
|
|
1975
|
+
["rewardBp", getU16Encoder4()],
|
|
2034
1976
|
["winningOptionAllocation", getU16Encoder4()],
|
|
2035
|
-
["timestamp",
|
|
1977
|
+
["timestamp", getI64Encoder21()]
|
|
2036
1978
|
]);
|
|
2037
1979
|
}
|
|
2038
1980
|
function getWinningOptionSetEventDecoder() {
|
|
2039
|
-
return
|
|
2040
|
-
["market",
|
|
2041
|
-
["marketAuthority",
|
|
2042
|
-
["option",
|
|
1981
|
+
return getStructDecoder43([
|
|
1982
|
+
["market", getAddressDecoder25()],
|
|
1983
|
+
["marketAuthority", getAddressDecoder25()],
|
|
1984
|
+
["option", getAddressDecoder25()],
|
|
2043
1985
|
["optionId", getU64Decoder23()],
|
|
2044
|
-
["
|
|
1986
|
+
["rewardBp", getU16Decoder4()],
|
|
2045
1987
|
["winningOptionAllocation", getU16Decoder4()],
|
|
2046
|
-
["timestamp",
|
|
1988
|
+
["timestamp", getI64Decoder21()]
|
|
2047
1989
|
]);
|
|
2048
1990
|
}
|
|
2049
1991
|
function getWinningOptionSetEventCodec() {
|
|
2050
|
-
return
|
|
1992
|
+
return combineCodec49(
|
|
2051
1993
|
getWinningOptionSetEventEncoder(),
|
|
2052
1994
|
getWinningOptionSetEventDecoder()
|
|
2053
1995
|
);
|
|
@@ -2071,32 +2013,30 @@ function getOpportunityMarketDiscriminatorBytes() {
|
|
|
2071
2013
|
}
|
|
2072
2014
|
function getOpportunityMarketEncoder() {
|
|
2073
2015
|
return transformEncoder3(
|
|
2074
|
-
|
|
2016
|
+
getStructEncoder44([
|
|
2075
2017
|
["discriminator", fixEncoderSize3(getBytesEncoder3(), 8)],
|
|
2076
2018
|
["bump", getU8Encoder16()],
|
|
2077
|
-
["creator",
|
|
2019
|
+
["creator", getAddressEncoder26()],
|
|
2078
2020
|
["index", getU64Encoder24()],
|
|
2079
2021
|
["totalOptions", getU64Encoder24()],
|
|
2080
|
-
["platform",
|
|
2022
|
+
["platform", getAddressEncoder26()],
|
|
2081
2023
|
["stakeEndTimestamp", getOptionEncoder4(getU64Encoder24())],
|
|
2082
2024
|
["resolvedAtTimestamp", getOptionEncoder4(getU64Encoder24())],
|
|
2083
2025
|
["winningOptionAllocation", getU16Encoder5()],
|
|
2026
|
+
["winningOptionActiveBp", getU16Encoder5()],
|
|
2084
2027
|
["rewardAmount", getU64Encoder24()],
|
|
2085
|
-
["marketAuthority",
|
|
2086
|
-
["
|
|
2087
|
-
["mint", getAddressEncoder28()],
|
|
2028
|
+
["marketAuthority", getAddressEncoder26()],
|
|
2029
|
+
["mint", getAddressEncoder26()],
|
|
2088
2030
|
["earlinessCutoffSeconds", getU64Encoder24()],
|
|
2089
2031
|
["earlinessMultiplier", getU16Encoder5()],
|
|
2090
2032
|
["allowUnstakingEarly", getBooleanEncoder6()],
|
|
2091
2033
|
["authorizedReaderPubkey", getArrayEncoder12(getU8Encoder16(), { size: 32 })],
|
|
2092
|
-
["stakingPaused", getBooleanEncoder6()],
|
|
2093
2034
|
["feeRates", getFeeRatesEncoder()],
|
|
2094
2035
|
["collectedPlatformFees", getU64Encoder24()],
|
|
2095
2036
|
["collectedCreatorFees", getU64Encoder24()],
|
|
2096
|
-
["creatorFeeClaimer",
|
|
2037
|
+
["creatorFeeClaimer", getAddressEncoder26()],
|
|
2097
2038
|
["marketResolutionDeadlineSeconds", getU64Encoder24()],
|
|
2098
|
-
["
|
|
2099
|
-
["maxRevealPeriodSeconds", getU64Encoder24()],
|
|
2039
|
+
["revealPeriodSeconds", getU64Encoder24()],
|
|
2100
2040
|
["revealEnded", getBooleanEncoder6()],
|
|
2101
2041
|
["minStakeAmount", getU64Encoder24()]
|
|
2102
2042
|
]),
|
|
@@ -2104,38 +2044,36 @@ function getOpportunityMarketEncoder() {
|
|
|
2104
2044
|
);
|
|
2105
2045
|
}
|
|
2106
2046
|
function getOpportunityMarketDecoder() {
|
|
2107
|
-
return
|
|
2047
|
+
return getStructDecoder44([
|
|
2108
2048
|
["discriminator", fixDecoderSize3(getBytesDecoder3(), 8)],
|
|
2109
2049
|
["bump", getU8Decoder16()],
|
|
2110
|
-
["creator",
|
|
2050
|
+
["creator", getAddressDecoder26()],
|
|
2111
2051
|
["index", getU64Decoder24()],
|
|
2112
2052
|
["totalOptions", getU64Decoder24()],
|
|
2113
|
-
["platform",
|
|
2053
|
+
["platform", getAddressDecoder26()],
|
|
2114
2054
|
["stakeEndTimestamp", getOptionDecoder4(getU64Decoder24())],
|
|
2115
2055
|
["resolvedAtTimestamp", getOptionDecoder4(getU64Decoder24())],
|
|
2116
2056
|
["winningOptionAllocation", getU16Decoder5()],
|
|
2057
|
+
["winningOptionActiveBp", getU16Decoder5()],
|
|
2117
2058
|
["rewardAmount", getU64Decoder24()],
|
|
2118
|
-
["marketAuthority",
|
|
2119
|
-
["
|
|
2120
|
-
["mint", getAddressDecoder28()],
|
|
2059
|
+
["marketAuthority", getAddressDecoder26()],
|
|
2060
|
+
["mint", getAddressDecoder26()],
|
|
2121
2061
|
["earlinessCutoffSeconds", getU64Decoder24()],
|
|
2122
2062
|
["earlinessMultiplier", getU16Decoder5()],
|
|
2123
2063
|
["allowUnstakingEarly", getBooleanDecoder6()],
|
|
2124
2064
|
["authorizedReaderPubkey", getArrayDecoder12(getU8Decoder16(), { size: 32 })],
|
|
2125
|
-
["stakingPaused", getBooleanDecoder6()],
|
|
2126
2065
|
["feeRates", getFeeRatesDecoder()],
|
|
2127
2066
|
["collectedPlatformFees", getU64Decoder24()],
|
|
2128
2067
|
["collectedCreatorFees", getU64Decoder24()],
|
|
2129
|
-
["creatorFeeClaimer",
|
|
2068
|
+
["creatorFeeClaimer", getAddressDecoder26()],
|
|
2130
2069
|
["marketResolutionDeadlineSeconds", getU64Decoder24()],
|
|
2131
|
-
["
|
|
2132
|
-
["maxRevealPeriodSeconds", getU64Decoder24()],
|
|
2070
|
+
["revealPeriodSeconds", getU64Decoder24()],
|
|
2133
2071
|
["revealEnded", getBooleanDecoder6()],
|
|
2134
2072
|
["minStakeAmount", getU64Decoder24()]
|
|
2135
2073
|
]);
|
|
2136
2074
|
}
|
|
2137
2075
|
function getOpportunityMarketCodec() {
|
|
2138
|
-
return
|
|
2076
|
+
return combineCodec50(
|
|
2139
2077
|
getOpportunityMarketEncoder(),
|
|
2140
2078
|
getOpportunityMarketDecoder()
|
|
2141
2079
|
);
|
|
@@ -2175,20 +2113,22 @@ async function fetchAllMaybeOpportunityMarket(rpc, addresses, config) {
|
|
|
2175
2113
|
import {
|
|
2176
2114
|
assertAccountExists as assertAccountExists4,
|
|
2177
2115
|
assertAccountsExist as assertAccountsExist4,
|
|
2178
|
-
combineCodec as
|
|
2116
|
+
combineCodec as combineCodec51,
|
|
2179
2117
|
decodeAccount as decodeAccount4,
|
|
2180
2118
|
fetchEncodedAccount as fetchEncodedAccount4,
|
|
2181
2119
|
fetchEncodedAccounts as fetchEncodedAccounts4,
|
|
2182
2120
|
fixDecoderSize as fixDecoderSize4,
|
|
2183
2121
|
fixEncoderSize as fixEncoderSize4,
|
|
2184
|
-
getAddressDecoder as
|
|
2185
|
-
getAddressEncoder as
|
|
2122
|
+
getAddressDecoder as getAddressDecoder27,
|
|
2123
|
+
getAddressEncoder as getAddressEncoder27,
|
|
2124
|
+
getBooleanDecoder as getBooleanDecoder7,
|
|
2125
|
+
getBooleanEncoder as getBooleanEncoder7,
|
|
2186
2126
|
getBytesDecoder as getBytesDecoder4,
|
|
2187
2127
|
getBytesEncoder as getBytesEncoder4,
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2128
|
+
getStructDecoder as getStructDecoder45,
|
|
2129
|
+
getStructEncoder as getStructEncoder45,
|
|
2130
|
+
getU128Decoder as getU128Decoder4,
|
|
2131
|
+
getU128Encoder as getU128Encoder4,
|
|
2192
2132
|
getU16Decoder as getU16Decoder6,
|
|
2193
2133
|
getU16Encoder as getU16Encoder6,
|
|
2194
2134
|
getU64Decoder as getU64Decoder25,
|
|
@@ -2214,15 +2154,16 @@ function getOpportunityMarketOptionDiscriminatorBytes() {
|
|
|
2214
2154
|
}
|
|
2215
2155
|
function getOpportunityMarketOptionEncoder() {
|
|
2216
2156
|
return transformEncoder4(
|
|
2217
|
-
|
|
2157
|
+
getStructEncoder45([
|
|
2218
2158
|
["discriminator", fixEncoderSize4(getBytesEncoder4(), 8)],
|
|
2219
2159
|
["bump", getU8Encoder17()],
|
|
2220
2160
|
["id", getU64Encoder25()],
|
|
2221
|
-
["creator",
|
|
2161
|
+
["creator", getAddressEncoder27()],
|
|
2222
2162
|
["createdAt", getU64Encoder25()],
|
|
2223
2163
|
["totalStaked", getU64Encoder25()],
|
|
2224
|
-
["totalScore",
|
|
2225
|
-
["
|
|
2164
|
+
["totalScore", getU128Encoder4()],
|
|
2165
|
+
["rewardBp", getU16Encoder6()],
|
|
2166
|
+
["includedInActiveBp", getBooleanEncoder7()]
|
|
2226
2167
|
]),
|
|
2227
2168
|
(value) => ({
|
|
2228
2169
|
...value,
|
|
@@ -2231,19 +2172,20 @@ function getOpportunityMarketOptionEncoder() {
|
|
|
2231
2172
|
);
|
|
2232
2173
|
}
|
|
2233
2174
|
function getOpportunityMarketOptionDecoder() {
|
|
2234
|
-
return
|
|
2175
|
+
return getStructDecoder45([
|
|
2235
2176
|
["discriminator", fixDecoderSize4(getBytesDecoder4(), 8)],
|
|
2236
2177
|
["bump", getU8Decoder17()],
|
|
2237
2178
|
["id", getU64Decoder25()],
|
|
2238
|
-
["creator",
|
|
2179
|
+
["creator", getAddressDecoder27()],
|
|
2239
2180
|
["createdAt", getU64Decoder25()],
|
|
2240
2181
|
["totalStaked", getU64Decoder25()],
|
|
2241
|
-
["totalScore",
|
|
2242
|
-
["
|
|
2182
|
+
["totalScore", getU128Decoder4()],
|
|
2183
|
+
["rewardBp", getU16Decoder6()],
|
|
2184
|
+
["includedInActiveBp", getBooleanDecoder7()]
|
|
2243
2185
|
]);
|
|
2244
2186
|
}
|
|
2245
2187
|
function getOpportunityMarketOptionCodec() {
|
|
2246
|
-
return
|
|
2188
|
+
return combineCodec51(
|
|
2247
2189
|
getOpportunityMarketOptionEncoder(),
|
|
2248
2190
|
getOpportunityMarketOptionDecoder()
|
|
2249
2191
|
);
|
|
@@ -2287,20 +2229,20 @@ async function fetchAllMaybeOpportunityMarketOption(rpc, addresses, config) {
|
|
|
2287
2229
|
import {
|
|
2288
2230
|
assertAccountExists as assertAccountExists5,
|
|
2289
2231
|
assertAccountsExist as assertAccountsExist5,
|
|
2290
|
-
combineCodec as
|
|
2232
|
+
combineCodec as combineCodec52,
|
|
2291
2233
|
decodeAccount as decodeAccount5,
|
|
2292
2234
|
fetchEncodedAccount as fetchEncodedAccount5,
|
|
2293
2235
|
fetchEncodedAccounts as fetchEncodedAccounts5,
|
|
2294
2236
|
fixDecoderSize as fixDecoderSize5,
|
|
2295
2237
|
fixEncoderSize as fixEncoderSize5,
|
|
2296
|
-
getAddressDecoder as
|
|
2297
|
-
getAddressEncoder as
|
|
2298
|
-
getBooleanDecoder as
|
|
2299
|
-
getBooleanEncoder as
|
|
2238
|
+
getAddressDecoder as getAddressDecoder28,
|
|
2239
|
+
getAddressEncoder as getAddressEncoder28,
|
|
2240
|
+
getBooleanDecoder as getBooleanDecoder8,
|
|
2241
|
+
getBooleanEncoder as getBooleanEncoder8,
|
|
2300
2242
|
getBytesDecoder as getBytesDecoder5,
|
|
2301
2243
|
getBytesEncoder as getBytesEncoder5,
|
|
2302
|
-
getStructDecoder as
|
|
2303
|
-
getStructEncoder as
|
|
2244
|
+
getStructDecoder as getStructDecoder46,
|
|
2245
|
+
getStructEncoder as getStructEncoder46,
|
|
2304
2246
|
getU64Decoder as getU64Decoder26,
|
|
2305
2247
|
getU64Encoder as getU64Encoder26,
|
|
2306
2248
|
getU8Decoder as getU8Decoder18,
|
|
@@ -2324,13 +2266,13 @@ function getOpportunityMarketSponsorDiscriminatorBytes() {
|
|
|
2324
2266
|
}
|
|
2325
2267
|
function getOpportunityMarketSponsorEncoder() {
|
|
2326
2268
|
return transformEncoder5(
|
|
2327
|
-
|
|
2269
|
+
getStructEncoder46([
|
|
2328
2270
|
["discriminator", fixEncoderSize5(getBytesEncoder5(), 8)],
|
|
2329
2271
|
["bump", getU8Encoder18()],
|
|
2330
|
-
["sponsor",
|
|
2331
|
-
["market",
|
|
2272
|
+
["sponsor", getAddressEncoder28()],
|
|
2273
|
+
["market", getAddressEncoder28()],
|
|
2332
2274
|
["rewardDeposited", getU64Encoder26()],
|
|
2333
|
-
["rewardLocked",
|
|
2275
|
+
["rewardLocked", getBooleanEncoder8()]
|
|
2334
2276
|
]),
|
|
2335
2277
|
(value) => ({
|
|
2336
2278
|
...value,
|
|
@@ -2339,17 +2281,17 @@ function getOpportunityMarketSponsorEncoder() {
|
|
|
2339
2281
|
);
|
|
2340
2282
|
}
|
|
2341
2283
|
function getOpportunityMarketSponsorDecoder() {
|
|
2342
|
-
return
|
|
2284
|
+
return getStructDecoder46([
|
|
2343
2285
|
["discriminator", fixDecoderSize5(getBytesDecoder5(), 8)],
|
|
2344
2286
|
["bump", getU8Decoder18()],
|
|
2345
|
-
["sponsor",
|
|
2346
|
-
["market",
|
|
2287
|
+
["sponsor", getAddressDecoder28()],
|
|
2288
|
+
["market", getAddressDecoder28()],
|
|
2347
2289
|
["rewardDeposited", getU64Decoder26()],
|
|
2348
|
-
["rewardLocked",
|
|
2290
|
+
["rewardLocked", getBooleanDecoder8()]
|
|
2349
2291
|
]);
|
|
2350
2292
|
}
|
|
2351
2293
|
function getOpportunityMarketSponsorCodec() {
|
|
2352
|
-
return
|
|
2294
|
+
return combineCodec52(
|
|
2353
2295
|
getOpportunityMarketSponsorEncoder(),
|
|
2354
2296
|
getOpportunityMarketSponsorDecoder()
|
|
2355
2297
|
);
|
|
@@ -2395,18 +2337,18 @@ import {
|
|
|
2395
2337
|
addEncoderSizePrefix as addEncoderSizePrefix2,
|
|
2396
2338
|
assertAccountExists as assertAccountExists6,
|
|
2397
2339
|
assertAccountsExist as assertAccountsExist6,
|
|
2398
|
-
combineCodec as
|
|
2340
|
+
combineCodec as combineCodec53,
|
|
2399
2341
|
decodeAccount as decodeAccount6,
|
|
2400
2342
|
fetchEncodedAccount as fetchEncodedAccount6,
|
|
2401
2343
|
fetchEncodedAccounts as fetchEncodedAccounts6,
|
|
2402
2344
|
fixDecoderSize as fixDecoderSize6,
|
|
2403
2345
|
fixEncoderSize as fixEncoderSize6,
|
|
2404
|
-
getAddressDecoder as
|
|
2405
|
-
getAddressEncoder as
|
|
2346
|
+
getAddressDecoder as getAddressDecoder29,
|
|
2347
|
+
getAddressEncoder as getAddressEncoder29,
|
|
2406
2348
|
getBytesDecoder as getBytesDecoder6,
|
|
2407
2349
|
getBytesEncoder as getBytesEncoder6,
|
|
2408
|
-
getStructDecoder as
|
|
2409
|
-
getStructEncoder as
|
|
2350
|
+
getStructDecoder as getStructDecoder47,
|
|
2351
|
+
getStructEncoder as getStructEncoder47,
|
|
2410
2352
|
getU32Decoder as getU32Decoder13,
|
|
2411
2353
|
getU32Encoder as getU32Encoder13,
|
|
2412
2354
|
getU64Decoder as getU64Decoder27,
|
|
@@ -2434,37 +2376,37 @@ function getPlatformConfigDiscriminatorBytes() {
|
|
|
2434
2376
|
}
|
|
2435
2377
|
function getPlatformConfigEncoder() {
|
|
2436
2378
|
return transformEncoder6(
|
|
2437
|
-
|
|
2379
|
+
getStructEncoder47([
|
|
2438
2380
|
["discriminator", fixEncoderSize6(getBytesEncoder6(), 8)],
|
|
2439
2381
|
["bump", getU8Encoder19()],
|
|
2440
2382
|
["name", addEncoderSizePrefix2(getUtf8Encoder2(), getU32Encoder13())],
|
|
2441
|
-
["updateAuthority",
|
|
2442
|
-
["feeClaimAuthority",
|
|
2383
|
+
["updateAuthority", getAddressEncoder29()],
|
|
2384
|
+
["feeClaimAuthority", getAddressEncoder29()],
|
|
2443
2385
|
["feeRates", getFeeRatesEncoder()],
|
|
2444
2386
|
["marketResolutionDeadlineSeconds", getU64Encoder27()],
|
|
2445
2387
|
["minTimeToStakeSeconds", getU64Encoder27()],
|
|
2446
|
-
["
|
|
2447
|
-
["
|
|
2388
|
+
["revealAuthority", getAddressEncoder29()],
|
|
2389
|
+
["revealPeriodSeconds", getU64Encoder27()]
|
|
2448
2390
|
]),
|
|
2449
2391
|
(value) => ({ ...value, discriminator: PLATFORM_CONFIG_DISCRIMINATOR })
|
|
2450
2392
|
);
|
|
2451
2393
|
}
|
|
2452
2394
|
function getPlatformConfigDecoder() {
|
|
2453
|
-
return
|
|
2395
|
+
return getStructDecoder47([
|
|
2454
2396
|
["discriminator", fixDecoderSize6(getBytesDecoder6(), 8)],
|
|
2455
2397
|
["bump", getU8Decoder19()],
|
|
2456
2398
|
["name", addDecoderSizePrefix2(getUtf8Decoder2(), getU32Decoder13())],
|
|
2457
|
-
["updateAuthority",
|
|
2458
|
-
["feeClaimAuthority",
|
|
2399
|
+
["updateAuthority", getAddressDecoder29()],
|
|
2400
|
+
["feeClaimAuthority", getAddressDecoder29()],
|
|
2459
2401
|
["feeRates", getFeeRatesDecoder()],
|
|
2460
2402
|
["marketResolutionDeadlineSeconds", getU64Decoder27()],
|
|
2461
2403
|
["minTimeToStakeSeconds", getU64Decoder27()],
|
|
2462
|
-
["
|
|
2463
|
-
["
|
|
2404
|
+
["revealAuthority", getAddressDecoder29()],
|
|
2405
|
+
["revealPeriodSeconds", getU64Decoder27()]
|
|
2464
2406
|
]);
|
|
2465
2407
|
}
|
|
2466
2408
|
function getPlatformConfigCodec() {
|
|
2467
|
-
return
|
|
2409
|
+
return combineCodec53(getPlatformConfigEncoder(), getPlatformConfigDecoder());
|
|
2468
2410
|
}
|
|
2469
2411
|
function decodePlatformConfig(encodedAccount) {
|
|
2470
2412
|
return decodeAccount6(
|
|
@@ -2501,26 +2443,26 @@ async function fetchAllMaybePlatformConfig(rpc, addresses, config) {
|
|
|
2501
2443
|
import {
|
|
2502
2444
|
assertAccountExists as assertAccountExists7,
|
|
2503
2445
|
assertAccountsExist as assertAccountsExist7,
|
|
2504
|
-
combineCodec as
|
|
2446
|
+
combineCodec as combineCodec54,
|
|
2505
2447
|
decodeAccount as decodeAccount7,
|
|
2506
2448
|
fetchEncodedAccount as fetchEncodedAccount7,
|
|
2507
2449
|
fetchEncodedAccounts as fetchEncodedAccounts7,
|
|
2508
2450
|
fixDecoderSize as fixDecoderSize7,
|
|
2509
2451
|
fixEncoderSize as fixEncoderSize7,
|
|
2510
|
-
getAddressDecoder as
|
|
2511
|
-
getAddressEncoder as
|
|
2452
|
+
getAddressDecoder as getAddressDecoder30,
|
|
2453
|
+
getAddressEncoder as getAddressEncoder30,
|
|
2512
2454
|
getArrayDecoder as getArrayDecoder13,
|
|
2513
2455
|
getArrayEncoder as getArrayEncoder13,
|
|
2514
|
-
getBooleanDecoder as
|
|
2515
|
-
getBooleanEncoder as
|
|
2456
|
+
getBooleanDecoder as getBooleanDecoder9,
|
|
2457
|
+
getBooleanEncoder as getBooleanEncoder9,
|
|
2516
2458
|
getBytesDecoder as getBytesDecoder7,
|
|
2517
2459
|
getBytesEncoder as getBytesEncoder7,
|
|
2518
|
-
getOptionDecoder as
|
|
2519
|
-
getOptionEncoder as
|
|
2520
|
-
getStructDecoder as
|
|
2521
|
-
getStructEncoder as
|
|
2522
|
-
getU128Decoder as
|
|
2523
|
-
getU128Encoder as
|
|
2460
|
+
getOptionDecoder as getOptionDecoder5,
|
|
2461
|
+
getOptionEncoder as getOptionEncoder5,
|
|
2462
|
+
getStructDecoder as getStructDecoder48,
|
|
2463
|
+
getStructEncoder as getStructEncoder48,
|
|
2464
|
+
getU128Decoder as getU128Decoder5,
|
|
2465
|
+
getU128Encoder as getU128Encoder5,
|
|
2524
2466
|
getU32Decoder as getU32Decoder14,
|
|
2525
2467
|
getU32Encoder as getU32Encoder14,
|
|
2526
2468
|
getU64Decoder as getU64Decoder28,
|
|
@@ -2546,61 +2488,61 @@ function getStakeAccountDiscriminatorBytes() {
|
|
|
2546
2488
|
}
|
|
2547
2489
|
function getStakeAccountEncoder() {
|
|
2548
2490
|
return transformEncoder7(
|
|
2549
|
-
|
|
2491
|
+
getStructEncoder48([
|
|
2550
2492
|
["discriminator", fixEncoderSize7(getBytesEncoder7(), 8)],
|
|
2551
2493
|
["encryptedOption", getArrayEncoder13(getU8Encoder20(), { size: 32 })],
|
|
2552
|
-
["stateNonce",
|
|
2494
|
+
["stateNonce", getU128Encoder5()],
|
|
2553
2495
|
["bump", getU8Encoder20()],
|
|
2554
|
-
["owner",
|
|
2555
|
-
["market",
|
|
2496
|
+
["owner", getAddressEncoder30()],
|
|
2497
|
+
["market", getAddressEncoder30()],
|
|
2556
2498
|
["userPubkey", getArrayEncoder13(getU8Encoder20(), { size: 32 })],
|
|
2557
2499
|
[
|
|
2558
2500
|
"encryptedOptionDisclosure",
|
|
2559
2501
|
getArrayEncoder13(getU8Encoder20(), { size: 32 })
|
|
2560
2502
|
],
|
|
2561
|
-
["stateNonceDisclosure",
|
|
2562
|
-
["stakedAtTimestamp",
|
|
2563
|
-
["unstakedAtTimestamp",
|
|
2503
|
+
["stateNonceDisclosure", getU128Encoder5()],
|
|
2504
|
+
["stakedAtTimestamp", getOptionEncoder5(getU64Encoder28())],
|
|
2505
|
+
["unstakedAtTimestamp", getOptionEncoder5(getU64Encoder28())],
|
|
2564
2506
|
["amount", getU64Encoder28()],
|
|
2565
2507
|
["collectedFees", getCollectedFeesEncoder()],
|
|
2566
|
-
["revealedOption",
|
|
2567
|
-
["score",
|
|
2568
|
-
["unstaked",
|
|
2508
|
+
["revealedOption", getOptionEncoder5(getU64Encoder28())],
|
|
2509
|
+
["score", getOptionEncoder5(getU64Encoder28())],
|
|
2510
|
+
["unstaked", getBooleanEncoder9()],
|
|
2569
2511
|
["id", getU32Encoder14()],
|
|
2570
|
-
["pendingStakeComputation",
|
|
2571
|
-
["pendingReveal",
|
|
2512
|
+
["pendingStakeComputation", getOptionEncoder5(getAddressEncoder30())],
|
|
2513
|
+
["pendingReveal", getBooleanEncoder9()]
|
|
2572
2514
|
]),
|
|
2573
2515
|
(value) => ({ ...value, discriminator: STAKE_ACCOUNT_DISCRIMINATOR })
|
|
2574
2516
|
);
|
|
2575
2517
|
}
|
|
2576
2518
|
function getStakeAccountDecoder() {
|
|
2577
|
-
return
|
|
2519
|
+
return getStructDecoder48([
|
|
2578
2520
|
["discriminator", fixDecoderSize7(getBytesDecoder7(), 8)],
|
|
2579
2521
|
["encryptedOption", getArrayDecoder13(getU8Decoder20(), { size: 32 })],
|
|
2580
|
-
["stateNonce",
|
|
2522
|
+
["stateNonce", getU128Decoder5()],
|
|
2581
2523
|
["bump", getU8Decoder20()],
|
|
2582
|
-
["owner",
|
|
2583
|
-
["market",
|
|
2524
|
+
["owner", getAddressDecoder30()],
|
|
2525
|
+
["market", getAddressDecoder30()],
|
|
2584
2526
|
["userPubkey", getArrayDecoder13(getU8Decoder20(), { size: 32 })],
|
|
2585
2527
|
[
|
|
2586
2528
|
"encryptedOptionDisclosure",
|
|
2587
2529
|
getArrayDecoder13(getU8Decoder20(), { size: 32 })
|
|
2588
2530
|
],
|
|
2589
|
-
["stateNonceDisclosure",
|
|
2590
|
-
["stakedAtTimestamp",
|
|
2591
|
-
["unstakedAtTimestamp",
|
|
2531
|
+
["stateNonceDisclosure", getU128Decoder5()],
|
|
2532
|
+
["stakedAtTimestamp", getOptionDecoder5(getU64Decoder28())],
|
|
2533
|
+
["unstakedAtTimestamp", getOptionDecoder5(getU64Decoder28())],
|
|
2592
2534
|
["amount", getU64Decoder28()],
|
|
2593
2535
|
["collectedFees", getCollectedFeesDecoder()],
|
|
2594
|
-
["revealedOption",
|
|
2595
|
-
["score",
|
|
2596
|
-
["unstaked",
|
|
2536
|
+
["revealedOption", getOptionDecoder5(getU64Decoder28())],
|
|
2537
|
+
["score", getOptionDecoder5(getU64Decoder28())],
|
|
2538
|
+
["unstaked", getBooleanDecoder9()],
|
|
2597
2539
|
["id", getU32Decoder14()],
|
|
2598
|
-
["pendingStakeComputation",
|
|
2599
|
-
["pendingReveal",
|
|
2540
|
+
["pendingStakeComputation", getOptionDecoder5(getAddressDecoder30())],
|
|
2541
|
+
["pendingReveal", getBooleanDecoder9()]
|
|
2600
2542
|
]);
|
|
2601
2543
|
}
|
|
2602
2544
|
function getStakeAccountCodec() {
|
|
2603
|
-
return
|
|
2545
|
+
return combineCodec54(getStakeAccountEncoder(), getStakeAccountDecoder());
|
|
2604
2546
|
}
|
|
2605
2547
|
function decodeStakeAccount(encodedAccount) {
|
|
2606
2548
|
return decodeAccount7(
|
|
@@ -2733,21 +2675,19 @@ var OpportunityMarketInstruction = /* @__PURE__ */ ((OpportunityMarketInstructio
|
|
|
2733
2675
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["InitPlatformConfig"] = 11] = "InitPlatformConfig";
|
|
2734
2676
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["InitStakeAccount"] = 12] = "InitStakeAccount";
|
|
2735
2677
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["OpenMarket"] = 13] = "OpenMarket";
|
|
2736
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2737
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2738
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2739
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2740
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2741
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2742
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2743
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2744
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2745
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2746
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2747
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2748
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2749
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["UpdatePlatformConfig"] = 27] = "UpdatePlatformConfig";
|
|
2750
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["WithdrawReward"] = 28] = "WithdrawReward";
|
|
2678
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["ResolveMarket"] = 14] = "ResolveMarket";
|
|
2679
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["RevealStake"] = 15] = "RevealStake";
|
|
2680
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["RevealStakeCallback"] = 16] = "RevealStakeCallback";
|
|
2681
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["RevealStakeCompDef"] = 17] = "RevealStakeCompDef";
|
|
2682
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["SetFeeClaimAuthority"] = 18] = "SetFeeClaimAuthority";
|
|
2683
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["SetUpdateAuthority"] = 19] = "SetUpdateAuthority";
|
|
2684
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["SetWinningOption"] = 20] = "SetWinningOption";
|
|
2685
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["Stake"] = 21] = "Stake";
|
|
2686
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["StakeCallback"] = 22] = "StakeCallback";
|
|
2687
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["StakeCompDef"] = 23] = "StakeCompDef";
|
|
2688
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["Unstake"] = 24] = "Unstake";
|
|
2689
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["UpdatePlatformConfig"] = 25] = "UpdatePlatformConfig";
|
|
2690
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["WithdrawReward"] = 26] = "WithdrawReward";
|
|
2751
2691
|
return OpportunityMarketInstruction2;
|
|
2752
2692
|
})(OpportunityMarketInstruction || {});
|
|
2753
2693
|
function identifyOpportunityMarketInstruction(instruction) {
|
|
@@ -2881,47 +2821,29 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2881
2821
|
if (containsBytes(
|
|
2882
2822
|
data,
|
|
2883
2823
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2884
|
-
new Uint8Array([
|
|
2824
|
+
new Uint8Array([155, 23, 80, 173, 46, 74, 23, 239])
|
|
2885
2825
|
),
|
|
2886
2826
|
0
|
|
2887
2827
|
)) {
|
|
2888
|
-
return 14 /*
|
|
2828
|
+
return 14 /* ResolveMarket */;
|
|
2889
2829
|
}
|
|
2890
2830
|
if (containsBytes(
|
|
2891
2831
|
data,
|
|
2892
2832
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2893
|
-
new Uint8Array([
|
|
2833
|
+
new Uint8Array([107, 229, 210, 77, 126, 255, 243, 188])
|
|
2894
2834
|
),
|
|
2895
2835
|
0
|
|
2896
2836
|
)) {
|
|
2897
|
-
return 15 /*
|
|
2837
|
+
return 15 /* RevealStake */;
|
|
2898
2838
|
}
|
|
2899
2839
|
if (containsBytes(
|
|
2900
2840
|
data,
|
|
2901
2841
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2902
|
-
new Uint8Array([
|
|
2842
|
+
new Uint8Array([79, 19, 120, 162, 232, 39, 206, 116])
|
|
2903
2843
|
),
|
|
2904
2844
|
0
|
|
2905
2845
|
)) {
|
|
2906
|
-
return 16 /*
|
|
2907
|
-
}
|
|
2908
|
-
if (containsBytes(
|
|
2909
|
-
data,
|
|
2910
|
-
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2911
|
-
new Uint8Array([107, 229, 210, 77, 126, 255, 243, 188])
|
|
2912
|
-
),
|
|
2913
|
-
0
|
|
2914
|
-
)) {
|
|
2915
|
-
return 17 /* RevealStake */;
|
|
2916
|
-
}
|
|
2917
|
-
if (containsBytes(
|
|
2918
|
-
data,
|
|
2919
|
-
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2920
|
-
new Uint8Array([79, 19, 120, 162, 232, 39, 206, 116])
|
|
2921
|
-
),
|
|
2922
|
-
0
|
|
2923
|
-
)) {
|
|
2924
|
-
return 18 /* RevealStakeCallback */;
|
|
2846
|
+
return 16 /* RevealStakeCallback */;
|
|
2925
2847
|
}
|
|
2926
2848
|
if (containsBytes(
|
|
2927
2849
|
data,
|
|
@@ -2930,7 +2852,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2930
2852
|
),
|
|
2931
2853
|
0
|
|
2932
2854
|
)) {
|
|
2933
|
-
return
|
|
2855
|
+
return 17 /* RevealStakeCompDef */;
|
|
2934
2856
|
}
|
|
2935
2857
|
if (containsBytes(
|
|
2936
2858
|
data,
|
|
@@ -2939,7 +2861,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2939
2861
|
),
|
|
2940
2862
|
0
|
|
2941
2863
|
)) {
|
|
2942
|
-
return
|
|
2864
|
+
return 18 /* SetFeeClaimAuthority */;
|
|
2943
2865
|
}
|
|
2944
2866
|
if (containsBytes(
|
|
2945
2867
|
data,
|
|
@@ -2948,7 +2870,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2948
2870
|
),
|
|
2949
2871
|
0
|
|
2950
2872
|
)) {
|
|
2951
|
-
return
|
|
2873
|
+
return 19 /* SetUpdateAuthority */;
|
|
2952
2874
|
}
|
|
2953
2875
|
if (containsBytes(
|
|
2954
2876
|
data,
|
|
@@ -2957,7 +2879,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2957
2879
|
),
|
|
2958
2880
|
0
|
|
2959
2881
|
)) {
|
|
2960
|
-
return
|
|
2882
|
+
return 20 /* SetWinningOption */;
|
|
2961
2883
|
}
|
|
2962
2884
|
if (containsBytes(
|
|
2963
2885
|
data,
|
|
@@ -2966,7 +2888,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2966
2888
|
),
|
|
2967
2889
|
0
|
|
2968
2890
|
)) {
|
|
2969
|
-
return
|
|
2891
|
+
return 21 /* Stake */;
|
|
2970
2892
|
}
|
|
2971
2893
|
if (containsBytes(
|
|
2972
2894
|
data,
|
|
@@ -2975,7 +2897,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2975
2897
|
),
|
|
2976
2898
|
0
|
|
2977
2899
|
)) {
|
|
2978
|
-
return
|
|
2900
|
+
return 22 /* StakeCallback */;
|
|
2979
2901
|
}
|
|
2980
2902
|
if (containsBytes(
|
|
2981
2903
|
data,
|
|
@@ -2984,7 +2906,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2984
2906
|
),
|
|
2985
2907
|
0
|
|
2986
2908
|
)) {
|
|
2987
|
-
return
|
|
2909
|
+
return 23 /* StakeCompDef */;
|
|
2988
2910
|
}
|
|
2989
2911
|
if (containsBytes(
|
|
2990
2912
|
data,
|
|
@@ -2993,7 +2915,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2993
2915
|
),
|
|
2994
2916
|
0
|
|
2995
2917
|
)) {
|
|
2996
|
-
return
|
|
2918
|
+
return 24 /* Unstake */;
|
|
2997
2919
|
}
|
|
2998
2920
|
if (containsBytes(
|
|
2999
2921
|
data,
|
|
@@ -3002,7 +2924,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
3002
2924
|
),
|
|
3003
2925
|
0
|
|
3004
2926
|
)) {
|
|
3005
|
-
return
|
|
2927
|
+
return 25 /* UpdatePlatformConfig */;
|
|
3006
2928
|
}
|
|
3007
2929
|
if (containsBytes(
|
|
3008
2930
|
data,
|
|
@@ -3011,7 +2933,7 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
3011
2933
|
),
|
|
3012
2934
|
0
|
|
3013
2935
|
)) {
|
|
3014
|
-
return
|
|
2936
|
+
return 26 /* WithdrawReward */;
|
|
3015
2937
|
}
|
|
3016
2938
|
throw new Error(
|
|
3017
2939
|
"The provided instruction could not be identified as a opportunityMarket instruction."
|
|
@@ -3045,16 +2967,15 @@ var OPPORTUNITY_MARKET_ERROR__LOCKED = 6022;
|
|
|
3045
2967
|
var OPPORTUNITY_MARKET_ERROR__INVALID_ACCOUNT_STATE = 6023;
|
|
3046
2968
|
var OPPORTUNITY_MARKET_ERROR__NO_FEES_TO_CLAIM = 6024;
|
|
3047
2969
|
var OPPORTUNITY_MARKET_ERROR__STAKE_NOT_STUCK = 6025;
|
|
3048
|
-
var
|
|
3049
|
-
var
|
|
3050
|
-
var
|
|
3051
|
-
var
|
|
3052
|
-
var
|
|
3053
|
-
var
|
|
3054
|
-
var
|
|
3055
|
-
var
|
|
3056
|
-
var
|
|
3057
|
-
var OPPORTUNITY_MARKET_ERROR__REWARD_ALREADY_CLAIMED = 6035;
|
|
2970
|
+
var OPPORTUNITY_MARKET_ERROR__STAKE_BELOW_MINIMUM = 6026;
|
|
2971
|
+
var OPPORTUNITY_MARKET_ERROR__SELECT_OPTIONS_DEADLINE_PASSED = 6027;
|
|
2972
|
+
var OPPORTUNITY_MARKET_ERROR__INVALID_FEE_RATES = 6028;
|
|
2973
|
+
var OPPORTUNITY_MARKET_ERROR__OPTION_STILL_NEEDED = 6029;
|
|
2974
|
+
var OPPORTUNITY_MARKET_ERROR__CREATOR_MISMATCH = 6030;
|
|
2975
|
+
var OPPORTUNITY_MARKET_ERROR__REVEAL_PERIOD_NOT_OVER = 6031;
|
|
2976
|
+
var OPPORTUNITY_MARKET_ERROR__NO_FINALIZED_WINNING_OPTION = 6032;
|
|
2977
|
+
var OPPORTUNITY_MARKET_ERROR__NO_REWARD_TO_CLAIM = 6033;
|
|
2978
|
+
var OPPORTUNITY_MARKET_ERROR__REWARD_ALREADY_CLAIMED = 6034;
|
|
3058
2979
|
var opportunityMarketErrorMessages;
|
|
3059
2980
|
if (true) {
|
|
3060
2981
|
opportunityMarketErrorMessages = {
|
|
@@ -3075,10 +2996,9 @@ if (true) {
|
|
|
3075
2996
|
[OPPORTUNITY_MARKET_ERROR__LOCKED]: `Account is locked`,
|
|
3076
2997
|
[OPPORTUNITY_MARKET_ERROR__MARKET_ALREADY_OPEN]: `Market is already open`,
|
|
3077
2998
|
[OPPORTUNITY_MARKET_ERROR__MARKET_NOT_OPEN]: `Market is not open`,
|
|
3078
|
-
[OPPORTUNITY_MARKET_ERROR__MARKET_NOT_PAUSED]: `Market is not paused`,
|
|
3079
2999
|
[OPPORTUNITY_MARKET_ERROR__MARKET_NOT_RESOLVED]: `Market not yet resolved`,
|
|
3080
|
-
[OPPORTUNITY_MARKET_ERROR__MARKET_PAUSED]: `Market staking is currently paused`,
|
|
3081
3000
|
[OPPORTUNITY_MARKET_ERROR__NO_FEES_TO_CLAIM]: `No fees to claim`,
|
|
3001
|
+
[OPPORTUNITY_MARKET_ERROR__NO_FINALIZED_WINNING_OPTION]: `No winning option has a finalized stake`,
|
|
3082
3002
|
[OPPORTUNITY_MARKET_ERROR__NO_REWARD_TO_CLAIM]: `No reward to claim`,
|
|
3083
3003
|
[OPPORTUNITY_MARKET_ERROR__NO_STAKE]: `Stake account has no recorded stake`,
|
|
3084
3004
|
[OPPORTUNITY_MARKET_ERROR__NOT_REVEALED]: `Stake not yet revealed`,
|
|
@@ -3113,15 +3033,15 @@ function isOpportunityMarketError(error, transactionMessage, code) {
|
|
|
3113
3033
|
|
|
3114
3034
|
// src/generated/instructions/addMarketOption.ts
|
|
3115
3035
|
import {
|
|
3116
|
-
combineCodec as
|
|
3036
|
+
combineCodec as combineCodec55,
|
|
3117
3037
|
fixDecoderSize as fixDecoderSize8,
|
|
3118
3038
|
fixEncoderSize as fixEncoderSize9,
|
|
3119
|
-
getAddressEncoder as
|
|
3039
|
+
getAddressEncoder as getAddressEncoder31,
|
|
3120
3040
|
getBytesDecoder as getBytesDecoder8,
|
|
3121
3041
|
getBytesEncoder as getBytesEncoder9,
|
|
3122
3042
|
getProgramDerivedAddress,
|
|
3123
|
-
getStructDecoder as
|
|
3124
|
-
getStructEncoder as
|
|
3043
|
+
getStructDecoder as getStructDecoder49,
|
|
3044
|
+
getStructEncoder as getStructEncoder49,
|
|
3125
3045
|
getU64Decoder as getU64Decoder29,
|
|
3126
3046
|
getU64Encoder as getU64Encoder29,
|
|
3127
3047
|
transformEncoder as transformEncoder8
|
|
@@ -3191,7 +3111,7 @@ function getAddMarketOptionDiscriminatorBytes() {
|
|
|
3191
3111
|
}
|
|
3192
3112
|
function getAddMarketOptionInstructionDataEncoder() {
|
|
3193
3113
|
return transformEncoder8(
|
|
3194
|
-
|
|
3114
|
+
getStructEncoder49([
|
|
3195
3115
|
["discriminator", fixEncoderSize9(getBytesEncoder9(), 8)],
|
|
3196
3116
|
["optionId", getU64Encoder29()]
|
|
3197
3117
|
]),
|
|
@@ -3199,13 +3119,13 @@ function getAddMarketOptionInstructionDataEncoder() {
|
|
|
3199
3119
|
);
|
|
3200
3120
|
}
|
|
3201
3121
|
function getAddMarketOptionInstructionDataDecoder() {
|
|
3202
|
-
return
|
|
3122
|
+
return getStructDecoder49([
|
|
3203
3123
|
["discriminator", fixDecoderSize8(getBytesDecoder8(), 8)],
|
|
3204
3124
|
["optionId", getU64Decoder29()]
|
|
3205
3125
|
]);
|
|
3206
3126
|
}
|
|
3207
3127
|
function getAddMarketOptionInstructionDataCodec() {
|
|
3208
|
-
return
|
|
3128
|
+
return combineCodec55(
|
|
3209
3129
|
getAddMarketOptionInstructionDataEncoder(),
|
|
3210
3130
|
getAddMarketOptionInstructionDataDecoder()
|
|
3211
3131
|
);
|
|
@@ -3227,7 +3147,7 @@ async function getAddMarketOptionInstructionAsync(input, config) {
|
|
|
3227
3147
|
getBytesEncoder9().encode(
|
|
3228
3148
|
new Uint8Array([111, 112, 116, 105, 111, 110])
|
|
3229
3149
|
),
|
|
3230
|
-
|
|
3150
|
+
getAddressEncoder31().encode(expectAddress(accounts.market.value)),
|
|
3231
3151
|
getU64Encoder29().encode(expectSome(args.optionId))
|
|
3232
3152
|
]
|
|
3233
3153
|
});
|
|
@@ -3300,17 +3220,17 @@ function parseAddMarketOptionInstruction(instruction) {
|
|
|
3300
3220
|
|
|
3301
3221
|
// src/generated/instructions/addReward.ts
|
|
3302
3222
|
import {
|
|
3303
|
-
combineCodec as
|
|
3223
|
+
combineCodec as combineCodec56,
|
|
3304
3224
|
fixDecoderSize as fixDecoderSize9,
|
|
3305
3225
|
fixEncoderSize as fixEncoderSize10,
|
|
3306
|
-
getAddressEncoder as
|
|
3307
|
-
getBooleanDecoder as
|
|
3308
|
-
getBooleanEncoder as
|
|
3226
|
+
getAddressEncoder as getAddressEncoder32,
|
|
3227
|
+
getBooleanDecoder as getBooleanDecoder10,
|
|
3228
|
+
getBooleanEncoder as getBooleanEncoder10,
|
|
3309
3229
|
getBytesDecoder as getBytesDecoder9,
|
|
3310
3230
|
getBytesEncoder as getBytesEncoder10,
|
|
3311
3231
|
getProgramDerivedAddress as getProgramDerivedAddress2,
|
|
3312
|
-
getStructDecoder as
|
|
3313
|
-
getStructEncoder as
|
|
3232
|
+
getStructDecoder as getStructDecoder50,
|
|
3233
|
+
getStructEncoder as getStructEncoder50,
|
|
3314
3234
|
getU64Decoder as getU64Decoder30,
|
|
3315
3235
|
getU64Encoder as getU64Encoder30,
|
|
3316
3236
|
transformEncoder as transformEncoder9
|
|
@@ -3330,23 +3250,23 @@ function getAddRewardDiscriminatorBytes() {
|
|
|
3330
3250
|
}
|
|
3331
3251
|
function getAddRewardInstructionDataEncoder() {
|
|
3332
3252
|
return transformEncoder9(
|
|
3333
|
-
|
|
3253
|
+
getStructEncoder50([
|
|
3334
3254
|
["discriminator", fixEncoderSize10(getBytesEncoder10(), 8)],
|
|
3335
3255
|
["amount", getU64Encoder30()],
|
|
3336
|
-
["lock",
|
|
3256
|
+
["lock", getBooleanEncoder10()]
|
|
3337
3257
|
]),
|
|
3338
3258
|
(value) => ({ ...value, discriminator: ADD_REWARD_DISCRIMINATOR })
|
|
3339
3259
|
);
|
|
3340
3260
|
}
|
|
3341
3261
|
function getAddRewardInstructionDataDecoder() {
|
|
3342
|
-
return
|
|
3262
|
+
return getStructDecoder50([
|
|
3343
3263
|
["discriminator", fixDecoderSize9(getBytesDecoder9(), 8)],
|
|
3344
3264
|
["amount", getU64Decoder30()],
|
|
3345
|
-
["lock",
|
|
3265
|
+
["lock", getBooleanDecoder10()]
|
|
3346
3266
|
]);
|
|
3347
3267
|
}
|
|
3348
3268
|
function getAddRewardInstructionDataCodec() {
|
|
3349
|
-
return
|
|
3269
|
+
return combineCodec56(
|
|
3350
3270
|
getAddRewardInstructionDataEncoder(),
|
|
3351
3271
|
getAddRewardInstructionDataDecoder()
|
|
3352
3272
|
);
|
|
@@ -3375,8 +3295,8 @@ async function getAddRewardInstructionAsync(input, config) {
|
|
|
3375
3295
|
getBytesEncoder10().encode(
|
|
3376
3296
|
new Uint8Array([115, 112, 111, 110, 115, 111, 114])
|
|
3377
3297
|
),
|
|
3378
|
-
|
|
3379
|
-
|
|
3298
|
+
getAddressEncoder32().encode(expectAddress(accounts.sponsor.value)),
|
|
3299
|
+
getAddressEncoder32().encode(expectAddress(accounts.market.value))
|
|
3380
3300
|
]
|
|
3381
3301
|
});
|
|
3382
3302
|
}
|
|
@@ -3384,9 +3304,9 @@ async function getAddRewardInstructionAsync(input, config) {
|
|
|
3384
3304
|
accounts.marketTokenAta.value = await getProgramDerivedAddress2({
|
|
3385
3305
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
3386
3306
|
seeds: [
|
|
3387
|
-
|
|
3388
|
-
|
|
3389
|
-
|
|
3307
|
+
getAddressEncoder32().encode(expectAddress(accounts.market.value)),
|
|
3308
|
+
getAddressEncoder32().encode(expectAddress(accounts.tokenProgram.value)),
|
|
3309
|
+
getAddressEncoder32().encode(expectAddress(accounts.tokenMint.value))
|
|
3390
3310
|
]
|
|
3391
3311
|
});
|
|
3392
3312
|
}
|
|
@@ -3477,15 +3397,15 @@ function parseAddRewardInstruction(instruction) {
|
|
|
3477
3397
|
|
|
3478
3398
|
// src/generated/instructions/claimCreatorFees.ts
|
|
3479
3399
|
import {
|
|
3480
|
-
combineCodec as
|
|
3400
|
+
combineCodec as combineCodec57,
|
|
3481
3401
|
fixDecoderSize as fixDecoderSize10,
|
|
3482
3402
|
fixEncoderSize as fixEncoderSize11,
|
|
3483
|
-
getAddressEncoder as
|
|
3403
|
+
getAddressEncoder as getAddressEncoder33,
|
|
3484
3404
|
getBytesDecoder as getBytesDecoder10,
|
|
3485
3405
|
getBytesEncoder as getBytesEncoder11,
|
|
3486
3406
|
getProgramDerivedAddress as getProgramDerivedAddress3,
|
|
3487
|
-
getStructDecoder as
|
|
3488
|
-
getStructEncoder as
|
|
3407
|
+
getStructDecoder as getStructDecoder51,
|
|
3408
|
+
getStructEncoder as getStructEncoder51,
|
|
3489
3409
|
transformEncoder as transformEncoder10
|
|
3490
3410
|
} from "@solana/kit";
|
|
3491
3411
|
var CLAIM_CREATOR_FEES_DISCRIMINATOR = new Uint8Array([
|
|
@@ -3505,17 +3425,17 @@ function getClaimCreatorFeesDiscriminatorBytes() {
|
|
|
3505
3425
|
}
|
|
3506
3426
|
function getClaimCreatorFeesInstructionDataEncoder() {
|
|
3507
3427
|
return transformEncoder10(
|
|
3508
|
-
|
|
3428
|
+
getStructEncoder51([["discriminator", fixEncoderSize11(getBytesEncoder11(), 8)]]),
|
|
3509
3429
|
(value) => ({ ...value, discriminator: CLAIM_CREATOR_FEES_DISCRIMINATOR })
|
|
3510
3430
|
);
|
|
3511
3431
|
}
|
|
3512
3432
|
function getClaimCreatorFeesInstructionDataDecoder() {
|
|
3513
|
-
return
|
|
3433
|
+
return getStructDecoder51([
|
|
3514
3434
|
["discriminator", fixDecoderSize10(getBytesDecoder10(), 8)]
|
|
3515
3435
|
]);
|
|
3516
3436
|
}
|
|
3517
3437
|
function getClaimCreatorFeesInstructionDataCodec() {
|
|
3518
|
-
return
|
|
3438
|
+
return combineCodec57(
|
|
3519
3439
|
getClaimCreatorFeesInstructionDataEncoder(),
|
|
3520
3440
|
getClaimCreatorFeesInstructionDataDecoder()
|
|
3521
3441
|
);
|
|
@@ -3538,9 +3458,9 @@ async function getClaimCreatorFeesInstructionAsync(input, config) {
|
|
|
3538
3458
|
accounts.marketTokenAta.value = await getProgramDerivedAddress3({
|
|
3539
3459
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
3540
3460
|
seeds: [
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3461
|
+
getAddressEncoder33().encode(expectAddress(accounts.market.value)),
|
|
3462
|
+
getAddressEncoder33().encode(expectAddress(accounts.tokenProgram.value)),
|
|
3463
|
+
getAddressEncoder33().encode(expectAddress(accounts.tokenMint.value))
|
|
3544
3464
|
]
|
|
3545
3465
|
});
|
|
3546
3466
|
}
|
|
@@ -3612,15 +3532,15 @@ function parseClaimCreatorFeesInstruction(instruction) {
|
|
|
3612
3532
|
|
|
3613
3533
|
// src/generated/instructions/claimFees.ts
|
|
3614
3534
|
import {
|
|
3615
|
-
combineCodec as
|
|
3535
|
+
combineCodec as combineCodec58,
|
|
3616
3536
|
fixDecoderSize as fixDecoderSize11,
|
|
3617
3537
|
fixEncoderSize as fixEncoderSize12,
|
|
3618
|
-
getAddressEncoder as
|
|
3538
|
+
getAddressEncoder as getAddressEncoder34,
|
|
3619
3539
|
getBytesDecoder as getBytesDecoder11,
|
|
3620
3540
|
getBytesEncoder as getBytesEncoder12,
|
|
3621
3541
|
getProgramDerivedAddress as getProgramDerivedAddress4,
|
|
3622
|
-
getStructDecoder as
|
|
3623
|
-
getStructEncoder as
|
|
3542
|
+
getStructDecoder as getStructDecoder52,
|
|
3543
|
+
getStructEncoder as getStructEncoder52,
|
|
3624
3544
|
transformEncoder as transformEncoder11
|
|
3625
3545
|
} from "@solana/kit";
|
|
3626
3546
|
var CLAIM_FEES_DISCRIMINATOR = new Uint8Array([
|
|
@@ -3638,17 +3558,17 @@ function getClaimFeesDiscriminatorBytes() {
|
|
|
3638
3558
|
}
|
|
3639
3559
|
function getClaimFeesInstructionDataEncoder() {
|
|
3640
3560
|
return transformEncoder11(
|
|
3641
|
-
|
|
3561
|
+
getStructEncoder52([["discriminator", fixEncoderSize12(getBytesEncoder12(), 8)]]),
|
|
3642
3562
|
(value) => ({ ...value, discriminator: CLAIM_FEES_DISCRIMINATOR })
|
|
3643
3563
|
);
|
|
3644
3564
|
}
|
|
3645
3565
|
function getClaimFeesInstructionDataDecoder() {
|
|
3646
|
-
return
|
|
3566
|
+
return getStructDecoder52([
|
|
3647
3567
|
["discriminator", fixDecoderSize11(getBytesDecoder11(), 8)]
|
|
3648
3568
|
]);
|
|
3649
3569
|
}
|
|
3650
3570
|
function getClaimFeesInstructionDataCodec() {
|
|
3651
|
-
return
|
|
3571
|
+
return combineCodec58(
|
|
3652
3572
|
getClaimFeesInstructionDataEncoder(),
|
|
3653
3573
|
getClaimFeesInstructionDataDecoder()
|
|
3654
3574
|
);
|
|
@@ -3672,9 +3592,9 @@ async function getClaimFeesInstructionAsync(input, config) {
|
|
|
3672
3592
|
accounts.marketTokenAta.value = await getProgramDerivedAddress4({
|
|
3673
3593
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
3674
3594
|
seeds: [
|
|
3675
|
-
|
|
3676
|
-
|
|
3677
|
-
|
|
3595
|
+
getAddressEncoder34().encode(expectAddress(accounts.market.value)),
|
|
3596
|
+
getAddressEncoder34().encode(expectAddress(accounts.tokenProgram.value)),
|
|
3597
|
+
getAddressEncoder34().encode(expectAddress(accounts.tokenMint.value))
|
|
3678
3598
|
]
|
|
3679
3599
|
});
|
|
3680
3600
|
}
|
|
@@ -3750,15 +3670,15 @@ function parseClaimFeesInstruction(instruction) {
|
|
|
3750
3670
|
|
|
3751
3671
|
// src/generated/instructions/closeOptionAccount.ts
|
|
3752
3672
|
import {
|
|
3753
|
-
combineCodec as
|
|
3673
|
+
combineCodec as combineCodec59,
|
|
3754
3674
|
fixDecoderSize as fixDecoderSize12,
|
|
3755
3675
|
fixEncoderSize as fixEncoderSize13,
|
|
3756
|
-
getAddressEncoder as
|
|
3676
|
+
getAddressEncoder as getAddressEncoder35,
|
|
3757
3677
|
getBytesDecoder as getBytesDecoder12,
|
|
3758
3678
|
getBytesEncoder as getBytesEncoder13,
|
|
3759
3679
|
getProgramDerivedAddress as getProgramDerivedAddress5,
|
|
3760
|
-
getStructDecoder as
|
|
3761
|
-
getStructEncoder as
|
|
3680
|
+
getStructDecoder as getStructDecoder53,
|
|
3681
|
+
getStructEncoder as getStructEncoder53,
|
|
3762
3682
|
getU64Decoder as getU64Decoder31,
|
|
3763
3683
|
getU64Encoder as getU64Encoder31,
|
|
3764
3684
|
transformEncoder as transformEncoder12
|
|
@@ -3780,7 +3700,7 @@ function getCloseOptionAccountDiscriminatorBytes() {
|
|
|
3780
3700
|
}
|
|
3781
3701
|
function getCloseOptionAccountInstructionDataEncoder() {
|
|
3782
3702
|
return transformEncoder12(
|
|
3783
|
-
|
|
3703
|
+
getStructEncoder53([
|
|
3784
3704
|
["discriminator", fixEncoderSize13(getBytesEncoder13(), 8)],
|
|
3785
3705
|
["optionId", getU64Encoder31()]
|
|
3786
3706
|
]),
|
|
@@ -3788,13 +3708,13 @@ function getCloseOptionAccountInstructionDataEncoder() {
|
|
|
3788
3708
|
);
|
|
3789
3709
|
}
|
|
3790
3710
|
function getCloseOptionAccountInstructionDataDecoder() {
|
|
3791
|
-
return
|
|
3711
|
+
return getStructDecoder53([
|
|
3792
3712
|
["discriminator", fixDecoderSize12(getBytesDecoder12(), 8)],
|
|
3793
3713
|
["optionId", getU64Decoder31()]
|
|
3794
3714
|
]);
|
|
3795
3715
|
}
|
|
3796
3716
|
function getCloseOptionAccountInstructionDataCodec() {
|
|
3797
|
-
return
|
|
3717
|
+
return combineCodec59(
|
|
3798
3718
|
getCloseOptionAccountInstructionDataEncoder(),
|
|
3799
3719
|
getCloseOptionAccountInstructionDataDecoder()
|
|
3800
3720
|
);
|
|
@@ -3817,7 +3737,7 @@ async function getCloseOptionAccountInstructionAsync(input, config) {
|
|
|
3817
3737
|
getBytesEncoder13().encode(
|
|
3818
3738
|
new Uint8Array([111, 112, 116, 105, 111, 110])
|
|
3819
3739
|
),
|
|
3820
|
-
|
|
3740
|
+
getAddressEncoder35().encode(expectAddress(accounts.market.value)),
|
|
3821
3741
|
getU64Encoder31().encode(expectSome(args.optionId))
|
|
3822
3742
|
]
|
|
3823
3743
|
});
|
|
@@ -3896,15 +3816,15 @@ function parseCloseOptionAccountInstruction(instruction) {
|
|
|
3896
3816
|
|
|
3897
3817
|
// src/generated/instructions/closeStakeAccount.ts
|
|
3898
3818
|
import {
|
|
3899
|
-
combineCodec as
|
|
3819
|
+
combineCodec as combineCodec60,
|
|
3900
3820
|
fixDecoderSize as fixDecoderSize13,
|
|
3901
3821
|
fixEncoderSize as fixEncoderSize14,
|
|
3902
|
-
getAddressEncoder as
|
|
3822
|
+
getAddressEncoder as getAddressEncoder36,
|
|
3903
3823
|
getBytesDecoder as getBytesDecoder13,
|
|
3904
3824
|
getBytesEncoder as getBytesEncoder14,
|
|
3905
3825
|
getProgramDerivedAddress as getProgramDerivedAddress6,
|
|
3906
|
-
getStructDecoder as
|
|
3907
|
-
getStructEncoder as
|
|
3826
|
+
getStructDecoder as getStructDecoder54,
|
|
3827
|
+
getStructEncoder as getStructEncoder54,
|
|
3908
3828
|
getU32Decoder as getU32Decoder15,
|
|
3909
3829
|
getU32Encoder as getU32Encoder15,
|
|
3910
3830
|
getU64Decoder as getU64Decoder32,
|
|
@@ -3928,7 +3848,7 @@ function getCloseStakeAccountDiscriminatorBytes() {
|
|
|
3928
3848
|
}
|
|
3929
3849
|
function getCloseStakeAccountInstructionDataEncoder() {
|
|
3930
3850
|
return transformEncoder13(
|
|
3931
|
-
|
|
3851
|
+
getStructEncoder54([
|
|
3932
3852
|
["discriminator", fixEncoderSize14(getBytesEncoder14(), 8)],
|
|
3933
3853
|
["optionId", getU64Encoder32()],
|
|
3934
3854
|
["stakeAccountId", getU32Encoder15()]
|
|
@@ -3937,14 +3857,14 @@ function getCloseStakeAccountInstructionDataEncoder() {
|
|
|
3937
3857
|
);
|
|
3938
3858
|
}
|
|
3939
3859
|
function getCloseStakeAccountInstructionDataDecoder() {
|
|
3940
|
-
return
|
|
3860
|
+
return getStructDecoder54([
|
|
3941
3861
|
["discriminator", fixDecoderSize13(getBytesDecoder13(), 8)],
|
|
3942
3862
|
["optionId", getU64Decoder32()],
|
|
3943
3863
|
["stakeAccountId", getU32Decoder15()]
|
|
3944
3864
|
]);
|
|
3945
3865
|
}
|
|
3946
3866
|
function getCloseStakeAccountInstructionDataCodec() {
|
|
3947
|
-
return
|
|
3867
|
+
return combineCodec60(
|
|
3948
3868
|
getCloseStakeAccountInstructionDataEncoder(),
|
|
3949
3869
|
getCloseStakeAccountInstructionDataDecoder()
|
|
3950
3870
|
);
|
|
@@ -3988,8 +3908,8 @@ async function getCloseStakeAccountInstructionAsync(input, config) {
|
|
|
3988
3908
|
116
|
|
3989
3909
|
])
|
|
3990
3910
|
),
|
|
3991
|
-
|
|
3992
|
-
|
|
3911
|
+
getAddressEncoder36().encode(expectAddress(accounts.owner.value)),
|
|
3912
|
+
getAddressEncoder36().encode(expectAddress(accounts.market.value)),
|
|
3993
3913
|
getU32Encoder15().encode(expectSome(args.stakeAccountId))
|
|
3994
3914
|
]
|
|
3995
3915
|
});
|
|
@@ -4001,7 +3921,7 @@ async function getCloseStakeAccountInstructionAsync(input, config) {
|
|
|
4001
3921
|
getBytesEncoder14().encode(
|
|
4002
3922
|
new Uint8Array([111, 112, 116, 105, 111, 110])
|
|
4003
3923
|
),
|
|
4004
|
-
|
|
3924
|
+
getAddressEncoder36().encode(expectAddress(accounts.market.value)),
|
|
4005
3925
|
getU64Encoder32().encode(expectSome(args.optionId))
|
|
4006
3926
|
]
|
|
4007
3927
|
});
|
|
@@ -4010,9 +3930,9 @@ async function getCloseStakeAccountInstructionAsync(input, config) {
|
|
|
4010
3930
|
accounts.marketTokenAta.value = await getProgramDerivedAddress6({
|
|
4011
3931
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
4012
3932
|
seeds: [
|
|
4013
|
-
|
|
4014
|
-
|
|
4015
|
-
|
|
3933
|
+
getAddressEncoder36().encode(expectAddress(accounts.market.value)),
|
|
3934
|
+
getAddressEncoder36().encode(expectAddress(accounts.tokenProgram.value)),
|
|
3935
|
+
getAddressEncoder36().encode(expectAddress(accounts.tokenMint.value))
|
|
4016
3936
|
]
|
|
4017
3937
|
});
|
|
4018
3938
|
}
|
|
@@ -4107,15 +4027,15 @@ function parseCloseStakeAccountInstruction(instruction) {
|
|
|
4107
4027
|
|
|
4108
4028
|
// src/generated/instructions/closeStuckStakeAccount.ts
|
|
4109
4029
|
import {
|
|
4110
|
-
combineCodec as
|
|
4030
|
+
combineCodec as combineCodec61,
|
|
4111
4031
|
fixDecoderSize as fixDecoderSize14,
|
|
4112
4032
|
fixEncoderSize as fixEncoderSize15,
|
|
4113
|
-
getAddressEncoder as
|
|
4033
|
+
getAddressEncoder as getAddressEncoder37,
|
|
4114
4034
|
getBytesDecoder as getBytesDecoder14,
|
|
4115
4035
|
getBytesEncoder as getBytesEncoder15,
|
|
4116
4036
|
getProgramDerivedAddress as getProgramDerivedAddress7,
|
|
4117
|
-
getStructDecoder as
|
|
4118
|
-
getStructEncoder as
|
|
4037
|
+
getStructDecoder as getStructDecoder55,
|
|
4038
|
+
getStructEncoder as getStructEncoder55,
|
|
4119
4039
|
getU32Decoder as getU32Decoder16,
|
|
4120
4040
|
getU32Encoder as getU32Encoder16,
|
|
4121
4041
|
transformEncoder as transformEncoder14
|
|
@@ -4137,7 +4057,7 @@ function getCloseStuckStakeAccountDiscriminatorBytes() {
|
|
|
4137
4057
|
}
|
|
4138
4058
|
function getCloseStuckStakeAccountInstructionDataEncoder() {
|
|
4139
4059
|
return transformEncoder14(
|
|
4140
|
-
|
|
4060
|
+
getStructEncoder55([
|
|
4141
4061
|
["discriminator", fixEncoderSize15(getBytesEncoder15(), 8)],
|
|
4142
4062
|
["stakeAccountId", getU32Encoder16()]
|
|
4143
4063
|
]),
|
|
@@ -4148,13 +4068,13 @@ function getCloseStuckStakeAccountInstructionDataEncoder() {
|
|
|
4148
4068
|
);
|
|
4149
4069
|
}
|
|
4150
4070
|
function getCloseStuckStakeAccountInstructionDataDecoder() {
|
|
4151
|
-
return
|
|
4071
|
+
return getStructDecoder55([
|
|
4152
4072
|
["discriminator", fixDecoderSize14(getBytesDecoder14(), 8)],
|
|
4153
4073
|
["stakeAccountId", getU32Decoder16()]
|
|
4154
4074
|
]);
|
|
4155
4075
|
}
|
|
4156
4076
|
function getCloseStuckStakeAccountInstructionDataCodec() {
|
|
4157
|
-
return
|
|
4077
|
+
return combineCodec61(
|
|
4158
4078
|
getCloseStuckStakeAccountInstructionDataEncoder(),
|
|
4159
4079
|
getCloseStuckStakeAccountInstructionDataDecoder()
|
|
4160
4080
|
);
|
|
@@ -4197,8 +4117,8 @@ async function getCloseStuckStakeAccountInstructionAsync(input, config) {
|
|
|
4197
4117
|
116
|
|
4198
4118
|
])
|
|
4199
4119
|
),
|
|
4200
|
-
|
|
4201
|
-
|
|
4120
|
+
getAddressEncoder37().encode(expectAddress(accounts.signer.value)),
|
|
4121
|
+
getAddressEncoder37().encode(expectAddress(accounts.market.value)),
|
|
4202
4122
|
getU32Encoder16().encode(expectSome(args.stakeAccountId))
|
|
4203
4123
|
]
|
|
4204
4124
|
});
|
|
@@ -4207,9 +4127,9 @@ async function getCloseStuckStakeAccountInstructionAsync(input, config) {
|
|
|
4207
4127
|
accounts.marketTokenAta.value = await getProgramDerivedAddress7({
|
|
4208
4128
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
4209
4129
|
seeds: [
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
|
|
4130
|
+
getAddressEncoder37().encode(expectAddress(accounts.market.value)),
|
|
4131
|
+
getAddressEncoder37().encode(expectAddress(accounts.tokenProgram.value)),
|
|
4132
|
+
getAddressEncoder37().encode(expectAddress(accounts.tokenMint.value))
|
|
4213
4133
|
]
|
|
4214
4134
|
});
|
|
4215
4135
|
}
|
|
@@ -4302,20 +4222,20 @@ function parseCloseStuckStakeAccountInstruction(instruction) {
|
|
|
4302
4222
|
|
|
4303
4223
|
// src/generated/instructions/createMarket.ts
|
|
4304
4224
|
import {
|
|
4305
|
-
combineCodec as
|
|
4225
|
+
combineCodec as combineCodec62,
|
|
4306
4226
|
fixDecoderSize as fixDecoderSize15,
|
|
4307
4227
|
fixEncoderSize as fixEncoderSize16,
|
|
4308
|
-
getAddressDecoder as
|
|
4309
|
-
getAddressEncoder as
|
|
4228
|
+
getAddressDecoder as getAddressDecoder31,
|
|
4229
|
+
getAddressEncoder as getAddressEncoder38,
|
|
4310
4230
|
getArrayDecoder as getArrayDecoder14,
|
|
4311
4231
|
getArrayEncoder as getArrayEncoder14,
|
|
4312
|
-
getBooleanDecoder as
|
|
4313
|
-
getBooleanEncoder as
|
|
4232
|
+
getBooleanDecoder as getBooleanDecoder11,
|
|
4233
|
+
getBooleanEncoder as getBooleanEncoder11,
|
|
4314
4234
|
getBytesDecoder as getBytesDecoder15,
|
|
4315
4235
|
getBytesEncoder as getBytesEncoder16,
|
|
4316
4236
|
getProgramDerivedAddress as getProgramDerivedAddress8,
|
|
4317
|
-
getStructDecoder as
|
|
4318
|
-
getStructEncoder as
|
|
4237
|
+
getStructDecoder as getStructDecoder56,
|
|
4238
|
+
getStructEncoder as getStructEncoder56,
|
|
4319
4239
|
getU16Decoder as getU16Decoder7,
|
|
4320
4240
|
getU16Encoder as getU16Encoder7,
|
|
4321
4241
|
getU64Decoder as getU64Decoder33,
|
|
@@ -4341,37 +4261,35 @@ function getCreateMarketDiscriminatorBytes() {
|
|
|
4341
4261
|
}
|
|
4342
4262
|
function getCreateMarketInstructionDataEncoder() {
|
|
4343
4263
|
return transformEncoder15(
|
|
4344
|
-
|
|
4264
|
+
getStructEncoder56([
|
|
4345
4265
|
["discriminator", fixEncoderSize16(getBytesEncoder16(), 8)],
|
|
4346
4266
|
["marketIndex", getU64Encoder33()],
|
|
4347
|
-
["marketAuthority",
|
|
4348
|
-
["allowUnstakingEarly",
|
|
4267
|
+
["marketAuthority", getAddressEncoder38()],
|
|
4268
|
+
["allowUnstakingEarly", getBooleanEncoder11()],
|
|
4349
4269
|
["authorizedReaderPubkey", getArrayEncoder14(getU8Encoder21(), { size: 32 })],
|
|
4350
|
-
["revealPeriodAuthority", getAddressEncoder40()],
|
|
4351
4270
|
["earlinessCutoffSeconds", getU64Encoder33()],
|
|
4352
4271
|
["earlinessMultiplier", getU16Encoder7()],
|
|
4353
4272
|
["minStakeAmount", getU64Encoder33()],
|
|
4354
|
-
["creatorFeeClaimer",
|
|
4273
|
+
["creatorFeeClaimer", getAddressEncoder38()]
|
|
4355
4274
|
]),
|
|
4356
4275
|
(value) => ({ ...value, discriminator: CREATE_MARKET_DISCRIMINATOR })
|
|
4357
4276
|
);
|
|
4358
4277
|
}
|
|
4359
4278
|
function getCreateMarketInstructionDataDecoder() {
|
|
4360
|
-
return
|
|
4279
|
+
return getStructDecoder56([
|
|
4361
4280
|
["discriminator", fixDecoderSize15(getBytesDecoder15(), 8)],
|
|
4362
4281
|
["marketIndex", getU64Decoder33()],
|
|
4363
|
-
["marketAuthority",
|
|
4364
|
-
["allowUnstakingEarly",
|
|
4282
|
+
["marketAuthority", getAddressDecoder31()],
|
|
4283
|
+
["allowUnstakingEarly", getBooleanDecoder11()],
|
|
4365
4284
|
["authorizedReaderPubkey", getArrayDecoder14(getU8Decoder21(), { size: 32 })],
|
|
4366
|
-
["revealPeriodAuthority", getAddressDecoder33()],
|
|
4367
4285
|
["earlinessCutoffSeconds", getU64Decoder33()],
|
|
4368
4286
|
["earlinessMultiplier", getU16Decoder7()],
|
|
4369
4287
|
["minStakeAmount", getU64Decoder33()],
|
|
4370
|
-
["creatorFeeClaimer",
|
|
4288
|
+
["creatorFeeClaimer", getAddressDecoder31()]
|
|
4371
4289
|
]);
|
|
4372
4290
|
}
|
|
4373
4291
|
function getCreateMarketInstructionDataCodec() {
|
|
4374
|
-
return
|
|
4292
|
+
return combineCodec62(
|
|
4375
4293
|
getCreateMarketInstructionDataEncoder(),
|
|
4376
4294
|
getCreateMarketInstructionDataDecoder()
|
|
4377
4295
|
);
|
|
@@ -4420,10 +4338,10 @@ async function getCreateMarketInstructionAsync(input, config) {
|
|
|
4420
4338
|
116
|
|
4421
4339
|
])
|
|
4422
4340
|
),
|
|
4423
|
-
|
|
4341
|
+
getAddressEncoder38().encode(
|
|
4424
4342
|
expectAddress(accounts.platformConfig.value)
|
|
4425
4343
|
),
|
|
4426
|
-
|
|
4344
|
+
getAddressEncoder38().encode(expectAddress(accounts.creator.value)),
|
|
4427
4345
|
getU64Encoder33().encode(expectSome(args.marketIndex))
|
|
4428
4346
|
]
|
|
4429
4347
|
});
|
|
@@ -4432,9 +4350,9 @@ async function getCreateMarketInstructionAsync(input, config) {
|
|
|
4432
4350
|
accounts.marketTokenAta.value = await getProgramDerivedAddress8({
|
|
4433
4351
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
4434
4352
|
seeds: [
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4353
|
+
getAddressEncoder38().encode(expectAddress(accounts.market.value)),
|
|
4354
|
+
getAddressEncoder38().encode(expectAddress(accounts.tokenProgram.value)),
|
|
4355
|
+
getAddressEncoder38().encode(expectAddress(accounts.tokenMint.value))
|
|
4438
4356
|
]
|
|
4439
4357
|
});
|
|
4440
4358
|
}
|
|
@@ -4458,10 +4376,10 @@ async function getCreateMarketInstructionAsync(input, config) {
|
|
|
4458
4376
|
116
|
|
4459
4377
|
])
|
|
4460
4378
|
),
|
|
4461
|
-
|
|
4379
|
+
getAddressEncoder38().encode(
|
|
4462
4380
|
expectAddress(accounts.platformConfig.value)
|
|
4463
4381
|
),
|
|
4464
|
-
|
|
4382
|
+
getAddressEncoder38().encode(expectAddress(accounts.tokenMint.value))
|
|
4465
4383
|
]
|
|
4466
4384
|
});
|
|
4467
4385
|
}
|
|
@@ -4562,13 +4480,13 @@ function parseCreateMarketInstruction(instruction) {
|
|
|
4562
4480
|
|
|
4563
4481
|
// src/generated/instructions/endRevealPeriod.ts
|
|
4564
4482
|
import {
|
|
4565
|
-
combineCodec as
|
|
4483
|
+
combineCodec as combineCodec63,
|
|
4566
4484
|
fixDecoderSize as fixDecoderSize16,
|
|
4567
4485
|
fixEncoderSize as fixEncoderSize17,
|
|
4568
4486
|
getBytesDecoder as getBytesDecoder16,
|
|
4569
4487
|
getBytesEncoder as getBytesEncoder17,
|
|
4570
|
-
getStructDecoder as
|
|
4571
|
-
getStructEncoder as
|
|
4488
|
+
getStructDecoder as getStructDecoder57,
|
|
4489
|
+
getStructEncoder as getStructEncoder57,
|
|
4572
4490
|
transformEncoder as transformEncoder16
|
|
4573
4491
|
} from "@solana/kit";
|
|
4574
4492
|
var END_REVEAL_PERIOD_DISCRIMINATOR = new Uint8Array([
|
|
@@ -4588,17 +4506,17 @@ function getEndRevealPeriodDiscriminatorBytes() {
|
|
|
4588
4506
|
}
|
|
4589
4507
|
function getEndRevealPeriodInstructionDataEncoder() {
|
|
4590
4508
|
return transformEncoder16(
|
|
4591
|
-
|
|
4509
|
+
getStructEncoder57([["discriminator", fixEncoderSize17(getBytesEncoder17(), 8)]]),
|
|
4592
4510
|
(value) => ({ ...value, discriminator: END_REVEAL_PERIOD_DISCRIMINATOR })
|
|
4593
4511
|
);
|
|
4594
4512
|
}
|
|
4595
4513
|
function getEndRevealPeriodInstructionDataDecoder() {
|
|
4596
|
-
return
|
|
4514
|
+
return getStructDecoder57([
|
|
4597
4515
|
["discriminator", fixDecoderSize16(getBytesDecoder16(), 8)]
|
|
4598
4516
|
]);
|
|
4599
4517
|
}
|
|
4600
4518
|
function getEndRevealPeriodInstructionDataCodec() {
|
|
4601
|
-
return
|
|
4519
|
+
return combineCodec63(
|
|
4602
4520
|
getEndRevealPeriodInstructionDataEncoder(),
|
|
4603
4521
|
getEndRevealPeriodInstructionDataDecoder()
|
|
4604
4522
|
);
|
|
@@ -4607,21 +4525,23 @@ function getEndRevealPeriodInstruction(input, config) {
|
|
|
4607
4525
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
4608
4526
|
const originalAccounts = {
|
|
4609
4527
|
signer: { value: input.signer ?? null, isWritable: false },
|
|
4610
|
-
market: { value: input.market ?? null, isWritable: true }
|
|
4528
|
+
market: { value: input.market ?? null, isWritable: true },
|
|
4529
|
+
platformConfig: { value: input.platformConfig ?? null, isWritable: false }
|
|
4611
4530
|
};
|
|
4612
4531
|
const accounts = originalAccounts;
|
|
4613
4532
|
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
4614
4533
|
return Object.freeze({
|
|
4615
4534
|
accounts: [
|
|
4616
4535
|
getAccountMeta(accounts.signer),
|
|
4617
|
-
getAccountMeta(accounts.market)
|
|
4536
|
+
getAccountMeta(accounts.market),
|
|
4537
|
+
getAccountMeta(accounts.platformConfig)
|
|
4618
4538
|
],
|
|
4619
4539
|
data: getEndRevealPeriodInstructionDataEncoder().encode({}),
|
|
4620
4540
|
programAddress
|
|
4621
4541
|
});
|
|
4622
4542
|
}
|
|
4623
4543
|
function parseEndRevealPeriodInstruction(instruction) {
|
|
4624
|
-
if (instruction.accounts.length <
|
|
4544
|
+
if (instruction.accounts.length < 3) {
|
|
4625
4545
|
throw new Error("Not enough accounts");
|
|
4626
4546
|
}
|
|
4627
4547
|
let accountIndex = 0;
|
|
@@ -4632,22 +4552,26 @@ function parseEndRevealPeriodInstruction(instruction) {
|
|
|
4632
4552
|
};
|
|
4633
4553
|
return {
|
|
4634
4554
|
programAddress: instruction.programAddress,
|
|
4635
|
-
accounts: {
|
|
4555
|
+
accounts: {
|
|
4556
|
+
signer: getNextAccount(),
|
|
4557
|
+
market: getNextAccount(),
|
|
4558
|
+
platformConfig: getNextAccount()
|
|
4559
|
+
},
|
|
4636
4560
|
data: getEndRevealPeriodInstructionDataDecoder().decode(instruction.data)
|
|
4637
4561
|
};
|
|
4638
4562
|
}
|
|
4639
4563
|
|
|
4640
4564
|
// src/generated/instructions/finalizeRevealStake.ts
|
|
4641
4565
|
import {
|
|
4642
|
-
combineCodec as
|
|
4566
|
+
combineCodec as combineCodec64,
|
|
4643
4567
|
fixDecoderSize as fixDecoderSize17,
|
|
4644
4568
|
fixEncoderSize as fixEncoderSize18,
|
|
4645
|
-
getAddressEncoder as
|
|
4569
|
+
getAddressEncoder as getAddressEncoder39,
|
|
4646
4570
|
getBytesDecoder as getBytesDecoder17,
|
|
4647
4571
|
getBytesEncoder as getBytesEncoder18,
|
|
4648
4572
|
getProgramDerivedAddress as getProgramDerivedAddress9,
|
|
4649
|
-
getStructDecoder as
|
|
4650
|
-
getStructEncoder as
|
|
4573
|
+
getStructDecoder as getStructDecoder58,
|
|
4574
|
+
getStructEncoder as getStructEncoder58,
|
|
4651
4575
|
getU32Decoder as getU32Decoder17,
|
|
4652
4576
|
getU32Encoder as getU32Encoder17,
|
|
4653
4577
|
getU64Decoder as getU64Decoder34,
|
|
@@ -4671,7 +4595,7 @@ function getFinalizeRevealStakeDiscriminatorBytes() {
|
|
|
4671
4595
|
}
|
|
4672
4596
|
function getFinalizeRevealStakeInstructionDataEncoder() {
|
|
4673
4597
|
return transformEncoder17(
|
|
4674
|
-
|
|
4598
|
+
getStructEncoder58([
|
|
4675
4599
|
["discriminator", fixEncoderSize18(getBytesEncoder18(), 8)],
|
|
4676
4600
|
["optionId", getU64Encoder34()],
|
|
4677
4601
|
["stakeAccountId", getU32Encoder17()]
|
|
@@ -4683,14 +4607,14 @@ function getFinalizeRevealStakeInstructionDataEncoder() {
|
|
|
4683
4607
|
);
|
|
4684
4608
|
}
|
|
4685
4609
|
function getFinalizeRevealStakeInstructionDataDecoder() {
|
|
4686
|
-
return
|
|
4610
|
+
return getStructDecoder58([
|
|
4687
4611
|
["discriminator", fixDecoderSize17(getBytesDecoder17(), 8)],
|
|
4688
4612
|
["optionId", getU64Decoder34()],
|
|
4689
4613
|
["stakeAccountId", getU32Decoder17()]
|
|
4690
4614
|
]);
|
|
4691
4615
|
}
|
|
4692
4616
|
function getFinalizeRevealStakeInstructionDataCodec() {
|
|
4693
|
-
return
|
|
4617
|
+
return combineCodec64(
|
|
4694
4618
|
getFinalizeRevealStakeInstructionDataEncoder(),
|
|
4695
4619
|
getFinalizeRevealStakeInstructionDataDecoder()
|
|
4696
4620
|
);
|
|
@@ -4728,8 +4652,8 @@ async function getFinalizeRevealStakeInstructionAsync(input, config) {
|
|
|
4728
4652
|
116
|
|
4729
4653
|
])
|
|
4730
4654
|
),
|
|
4731
|
-
|
|
4732
|
-
|
|
4655
|
+
getAddressEncoder39().encode(expectAddress(accounts.owner.value)),
|
|
4656
|
+
getAddressEncoder39().encode(expectAddress(accounts.market.value)),
|
|
4733
4657
|
getU32Encoder17().encode(expectSome(args.stakeAccountId))
|
|
4734
4658
|
]
|
|
4735
4659
|
});
|
|
@@ -4741,7 +4665,7 @@ async function getFinalizeRevealStakeInstructionAsync(input, config) {
|
|
|
4741
4665
|
getBytesEncoder18().encode(
|
|
4742
4666
|
new Uint8Array([111, 112, 116, 105, 111, 110])
|
|
4743
4667
|
),
|
|
4744
|
-
|
|
4668
|
+
getAddressEncoder39().encode(expectAddress(accounts.market.value)),
|
|
4745
4669
|
getU64Encoder34().encode(expectSome(args.optionId))
|
|
4746
4670
|
]
|
|
4747
4671
|
});
|
|
@@ -4824,15 +4748,15 @@ function parseFinalizeRevealStakeInstruction(instruction) {
|
|
|
4824
4748
|
|
|
4825
4749
|
// src/generated/instructions/initAllowedMint.ts
|
|
4826
4750
|
import {
|
|
4827
|
-
combineCodec as
|
|
4751
|
+
combineCodec as combineCodec65,
|
|
4828
4752
|
fixDecoderSize as fixDecoderSize18,
|
|
4829
4753
|
fixEncoderSize as fixEncoderSize19,
|
|
4830
|
-
getAddressEncoder as
|
|
4754
|
+
getAddressEncoder as getAddressEncoder40,
|
|
4831
4755
|
getBytesDecoder as getBytesDecoder18,
|
|
4832
4756
|
getBytesEncoder as getBytesEncoder19,
|
|
4833
4757
|
getProgramDerivedAddress as getProgramDerivedAddress10,
|
|
4834
|
-
getStructDecoder as
|
|
4835
|
-
getStructEncoder as
|
|
4758
|
+
getStructDecoder as getStructDecoder59,
|
|
4759
|
+
getStructEncoder as getStructEncoder59,
|
|
4836
4760
|
transformEncoder as transformEncoder18
|
|
4837
4761
|
} from "@solana/kit";
|
|
4838
4762
|
var INIT_ALLOWED_MINT_DISCRIMINATOR = new Uint8Array([
|
|
@@ -4852,17 +4776,17 @@ function getInitAllowedMintDiscriminatorBytes() {
|
|
|
4852
4776
|
}
|
|
4853
4777
|
function getInitAllowedMintInstructionDataEncoder() {
|
|
4854
4778
|
return transformEncoder18(
|
|
4855
|
-
|
|
4779
|
+
getStructEncoder59([["discriminator", fixEncoderSize19(getBytesEncoder19(), 8)]]),
|
|
4856
4780
|
(value) => ({ ...value, discriminator: INIT_ALLOWED_MINT_DISCRIMINATOR })
|
|
4857
4781
|
);
|
|
4858
4782
|
}
|
|
4859
4783
|
function getInitAllowedMintInstructionDataDecoder() {
|
|
4860
|
-
return
|
|
4784
|
+
return getStructDecoder59([
|
|
4861
4785
|
["discriminator", fixDecoderSize18(getBytesDecoder18(), 8)]
|
|
4862
4786
|
]);
|
|
4863
4787
|
}
|
|
4864
4788
|
function getInitAllowedMintInstructionDataCodec() {
|
|
4865
|
-
return
|
|
4789
|
+
return combineCodec65(
|
|
4866
4790
|
getInitAllowedMintInstructionDataEncoder(),
|
|
4867
4791
|
getInitAllowedMintInstructionDataDecoder()
|
|
4868
4792
|
);
|
|
@@ -4897,10 +4821,10 @@ async function getInitAllowedMintInstructionAsync(input, config) {
|
|
|
4897
4821
|
116
|
|
4898
4822
|
])
|
|
4899
4823
|
),
|
|
4900
|
-
|
|
4824
|
+
getAddressEncoder40().encode(
|
|
4901
4825
|
expectAddress(accounts.platformConfig.value)
|
|
4902
4826
|
),
|
|
4903
|
-
|
|
4827
|
+
getAddressEncoder40().encode(expectAddress(accounts.tokenMint.value))
|
|
4904
4828
|
]
|
|
4905
4829
|
});
|
|
4906
4830
|
}
|
|
@@ -4973,16 +4897,16 @@ function parseInitAllowedMintInstruction(instruction) {
|
|
|
4973
4897
|
import {
|
|
4974
4898
|
addDecoderSizePrefix as addDecoderSizePrefix3,
|
|
4975
4899
|
addEncoderSizePrefix as addEncoderSizePrefix3,
|
|
4976
|
-
combineCodec as
|
|
4900
|
+
combineCodec as combineCodec66,
|
|
4977
4901
|
fixDecoderSize as fixDecoderSize19,
|
|
4978
4902
|
fixEncoderSize as fixEncoderSize20,
|
|
4979
|
-
getAddressDecoder as
|
|
4980
|
-
getAddressEncoder as
|
|
4903
|
+
getAddressDecoder as getAddressDecoder32,
|
|
4904
|
+
getAddressEncoder as getAddressEncoder41,
|
|
4981
4905
|
getBytesDecoder as getBytesDecoder19,
|
|
4982
4906
|
getBytesEncoder as getBytesEncoder20,
|
|
4983
4907
|
getProgramDerivedAddress as getProgramDerivedAddress11,
|
|
4984
|
-
getStructDecoder as
|
|
4985
|
-
getStructEncoder as
|
|
4908
|
+
getStructDecoder as getStructDecoder60,
|
|
4909
|
+
getStructEncoder as getStructEncoder60,
|
|
4986
4910
|
getU16Decoder as getU16Decoder8,
|
|
4987
4911
|
getU16Encoder as getU16Encoder8,
|
|
4988
4912
|
getU32Decoder as getU32Decoder18,
|
|
@@ -5010,37 +4934,37 @@ function getInitPlatformConfigDiscriminatorBytes() {
|
|
|
5010
4934
|
}
|
|
5011
4935
|
function getInitPlatformConfigInstructionDataEncoder() {
|
|
5012
4936
|
return transformEncoder19(
|
|
5013
|
-
|
|
4937
|
+
getStructEncoder60([
|
|
5014
4938
|
["discriminator", fixEncoderSize20(getBytesEncoder20(), 8)],
|
|
5015
4939
|
["name", addEncoderSizePrefix3(getUtf8Encoder3(), getU32Encoder18())],
|
|
5016
4940
|
["platformFeeBp", getU16Encoder8()],
|
|
5017
4941
|
["rewardPoolFeeBp", getU16Encoder8()],
|
|
5018
4942
|
["creatorFeeBp", getU16Encoder8()],
|
|
5019
|
-
["feeClaimAuthority",
|
|
4943
|
+
["feeClaimAuthority", getAddressEncoder41()],
|
|
4944
|
+
["revealAuthority", getAddressEncoder41()],
|
|
5020
4945
|
["minTimeToStakeSeconds", getU64Encoder35()],
|
|
5021
|
-
["
|
|
5022
|
-
["maxRevealPeriodSeconds", getU64Encoder35()],
|
|
4946
|
+
["revealPeriodSeconds", getU64Encoder35()],
|
|
5023
4947
|
["marketResolutionDeadlineSeconds", getU64Encoder35()]
|
|
5024
4948
|
]),
|
|
5025
4949
|
(value) => ({ ...value, discriminator: INIT_PLATFORM_CONFIG_DISCRIMINATOR })
|
|
5026
4950
|
);
|
|
5027
4951
|
}
|
|
5028
4952
|
function getInitPlatformConfigInstructionDataDecoder() {
|
|
5029
|
-
return
|
|
4953
|
+
return getStructDecoder60([
|
|
5030
4954
|
["discriminator", fixDecoderSize19(getBytesDecoder19(), 8)],
|
|
5031
4955
|
["name", addDecoderSizePrefix3(getUtf8Decoder3(), getU32Decoder18())],
|
|
5032
4956
|
["platformFeeBp", getU16Decoder8()],
|
|
5033
4957
|
["rewardPoolFeeBp", getU16Decoder8()],
|
|
5034
4958
|
["creatorFeeBp", getU16Decoder8()],
|
|
5035
|
-
["feeClaimAuthority",
|
|
4959
|
+
["feeClaimAuthority", getAddressDecoder32()],
|
|
4960
|
+
["revealAuthority", getAddressDecoder32()],
|
|
5036
4961
|
["minTimeToStakeSeconds", getU64Decoder35()],
|
|
5037
|
-
["
|
|
5038
|
-
["maxRevealPeriodSeconds", getU64Decoder35()],
|
|
4962
|
+
["revealPeriodSeconds", getU64Decoder35()],
|
|
5039
4963
|
["marketResolutionDeadlineSeconds", getU64Decoder35()]
|
|
5040
4964
|
]);
|
|
5041
4965
|
}
|
|
5042
4966
|
function getInitPlatformConfigInstructionDataCodec() {
|
|
5043
|
-
return
|
|
4967
|
+
return combineCodec66(
|
|
5044
4968
|
getInitPlatformConfigInstructionDataEncoder(),
|
|
5045
4969
|
getInitPlatformConfigInstructionDataDecoder()
|
|
5046
4970
|
);
|
|
@@ -5077,7 +5001,7 @@ async function getInitPlatformConfigInstructionAsync(input, config) {
|
|
|
5077
5001
|
103
|
|
5078
5002
|
])
|
|
5079
5003
|
),
|
|
5080
|
-
|
|
5004
|
+
getAddressEncoder41().encode(expectAddress(accounts.payer.value)),
|
|
5081
5005
|
getUtf8Encoder3().encode(expectSome(args.name))
|
|
5082
5006
|
]
|
|
5083
5007
|
});
|
|
@@ -5148,15 +5072,15 @@ function parseInitPlatformConfigInstruction(instruction) {
|
|
|
5148
5072
|
|
|
5149
5073
|
// src/generated/instructions/initStakeAccount.ts
|
|
5150
5074
|
import {
|
|
5151
|
-
combineCodec as
|
|
5075
|
+
combineCodec as combineCodec67,
|
|
5152
5076
|
fixDecoderSize as fixDecoderSize20,
|
|
5153
5077
|
fixEncoderSize as fixEncoderSize21,
|
|
5154
|
-
getAddressEncoder as
|
|
5078
|
+
getAddressEncoder as getAddressEncoder42,
|
|
5155
5079
|
getBytesDecoder as getBytesDecoder20,
|
|
5156
5080
|
getBytesEncoder as getBytesEncoder21,
|
|
5157
5081
|
getProgramDerivedAddress as getProgramDerivedAddress12,
|
|
5158
|
-
getStructDecoder as
|
|
5159
|
-
getStructEncoder as
|
|
5082
|
+
getStructDecoder as getStructDecoder61,
|
|
5083
|
+
getStructEncoder as getStructEncoder61,
|
|
5160
5084
|
getU32Decoder as getU32Decoder19,
|
|
5161
5085
|
getU32Encoder as getU32Encoder19,
|
|
5162
5086
|
transformEncoder as transformEncoder20
|
|
@@ -5178,7 +5102,7 @@ function getInitStakeAccountDiscriminatorBytes() {
|
|
|
5178
5102
|
}
|
|
5179
5103
|
function getInitStakeAccountInstructionDataEncoder() {
|
|
5180
5104
|
return transformEncoder20(
|
|
5181
|
-
|
|
5105
|
+
getStructEncoder61([
|
|
5182
5106
|
["discriminator", fixEncoderSize21(getBytesEncoder21(), 8)],
|
|
5183
5107
|
["stakeAccountId", getU32Encoder19()]
|
|
5184
5108
|
]),
|
|
@@ -5186,13 +5110,13 @@ function getInitStakeAccountInstructionDataEncoder() {
|
|
|
5186
5110
|
);
|
|
5187
5111
|
}
|
|
5188
5112
|
function getInitStakeAccountInstructionDataDecoder() {
|
|
5189
|
-
return
|
|
5113
|
+
return getStructDecoder61([
|
|
5190
5114
|
["discriminator", fixDecoderSize20(getBytesDecoder20(), 8)],
|
|
5191
5115
|
["stakeAccountId", getU32Decoder19()]
|
|
5192
5116
|
]);
|
|
5193
5117
|
}
|
|
5194
5118
|
function getInitStakeAccountInstructionDataCodec() {
|
|
5195
|
-
return
|
|
5119
|
+
return combineCodec67(
|
|
5196
5120
|
getInitStakeAccountInstructionDataEncoder(),
|
|
5197
5121
|
getInitStakeAccountInstructionDataDecoder()
|
|
5198
5122
|
);
|
|
@@ -5229,8 +5153,8 @@ async function getInitStakeAccountInstructionAsync(input, config) {
|
|
|
5229
5153
|
116
|
|
5230
5154
|
])
|
|
5231
5155
|
),
|
|
5232
|
-
|
|
5233
|
-
|
|
5156
|
+
getAddressEncoder42().encode(expectAddress(accounts.owner.value)),
|
|
5157
|
+
getAddressEncoder42().encode(expectAddress(accounts.market.value)),
|
|
5234
5158
|
getU32Encoder19().encode(expectSome(args.stakeAccountId))
|
|
5235
5159
|
]
|
|
5236
5160
|
});
|
|
@@ -5307,13 +5231,13 @@ function parseInitStakeAccountInstruction(instruction) {
|
|
|
5307
5231
|
|
|
5308
5232
|
// src/generated/instructions/openMarket.ts
|
|
5309
5233
|
import {
|
|
5310
|
-
combineCodec as
|
|
5234
|
+
combineCodec as combineCodec68,
|
|
5311
5235
|
fixDecoderSize as fixDecoderSize21,
|
|
5312
5236
|
fixEncoderSize as fixEncoderSize22,
|
|
5313
5237
|
getBytesDecoder as getBytesDecoder21,
|
|
5314
5238
|
getBytesEncoder as getBytesEncoder22,
|
|
5315
|
-
getStructDecoder as
|
|
5316
|
-
getStructEncoder as
|
|
5239
|
+
getStructDecoder as getStructDecoder62,
|
|
5240
|
+
getStructEncoder as getStructEncoder62,
|
|
5317
5241
|
getU64Decoder as getU64Decoder36,
|
|
5318
5242
|
getU64Encoder as getU64Encoder36,
|
|
5319
5243
|
transformEncoder as transformEncoder21
|
|
@@ -5333,7 +5257,7 @@ function getOpenMarketDiscriminatorBytes() {
|
|
|
5333
5257
|
}
|
|
5334
5258
|
function getOpenMarketInstructionDataEncoder() {
|
|
5335
5259
|
return transformEncoder21(
|
|
5336
|
-
|
|
5260
|
+
getStructEncoder62([
|
|
5337
5261
|
["discriminator", fixEncoderSize22(getBytesEncoder22(), 8)],
|
|
5338
5262
|
["timeToStake", getU64Encoder36()]
|
|
5339
5263
|
]),
|
|
@@ -5341,13 +5265,13 @@ function getOpenMarketInstructionDataEncoder() {
|
|
|
5341
5265
|
);
|
|
5342
5266
|
}
|
|
5343
5267
|
function getOpenMarketInstructionDataDecoder() {
|
|
5344
|
-
return
|
|
5268
|
+
return getStructDecoder62([
|
|
5345
5269
|
["discriminator", fixDecoderSize21(getBytesDecoder21(), 8)],
|
|
5346
5270
|
["timeToStake", getU64Decoder36()]
|
|
5347
5271
|
]);
|
|
5348
5272
|
}
|
|
5349
5273
|
function getOpenMarketInstructionDataCodec() {
|
|
5350
|
-
return
|
|
5274
|
+
return combineCodec68(
|
|
5351
5275
|
getOpenMarketInstructionDataEncoder(),
|
|
5352
5276
|
getOpenMarketInstructionDataDecoder()
|
|
5353
5277
|
);
|
|
@@ -5398,97 +5322,17 @@ function parseOpenMarketInstruction(instruction) {
|
|
|
5398
5322
|
};
|
|
5399
5323
|
}
|
|
5400
5324
|
|
|
5401
|
-
// src/generated/instructions/
|
|
5325
|
+
// src/generated/instructions/resolveMarket.ts
|
|
5402
5326
|
import {
|
|
5403
|
-
combineCodec as
|
|
5327
|
+
combineCodec as combineCodec69,
|
|
5404
5328
|
fixDecoderSize as fixDecoderSize22,
|
|
5405
5329
|
fixEncoderSize as fixEncoderSize23,
|
|
5406
5330
|
getBytesDecoder as getBytesDecoder22,
|
|
5407
5331
|
getBytesEncoder as getBytesEncoder23,
|
|
5408
|
-
getStructDecoder as
|
|
5409
|
-
getStructEncoder as
|
|
5332
|
+
getStructDecoder as getStructDecoder63,
|
|
5333
|
+
getStructEncoder as getStructEncoder63,
|
|
5410
5334
|
transformEncoder as transformEncoder22
|
|
5411
5335
|
} from "@solana/kit";
|
|
5412
|
-
var PAUSE_STAKING_DISCRIMINATOR = new Uint8Array([
|
|
5413
|
-
245,
|
|
5414
|
-
191,
|
|
5415
|
-
35,
|
|
5416
|
-
58,
|
|
5417
|
-
88,
|
|
5418
|
-
250,
|
|
5419
|
-
229,
|
|
5420
|
-
60
|
|
5421
|
-
]);
|
|
5422
|
-
function getPauseStakingDiscriminatorBytes() {
|
|
5423
|
-
return fixEncoderSize23(getBytesEncoder23(), 8).encode(
|
|
5424
|
-
PAUSE_STAKING_DISCRIMINATOR
|
|
5425
|
-
);
|
|
5426
|
-
}
|
|
5427
|
-
function getPauseStakingInstructionDataEncoder() {
|
|
5428
|
-
return transformEncoder22(
|
|
5429
|
-
getStructEncoder65([["discriminator", fixEncoderSize23(getBytesEncoder23(), 8)]]),
|
|
5430
|
-
(value) => ({ ...value, discriminator: PAUSE_STAKING_DISCRIMINATOR })
|
|
5431
|
-
);
|
|
5432
|
-
}
|
|
5433
|
-
function getPauseStakingInstructionDataDecoder() {
|
|
5434
|
-
return getStructDecoder65([
|
|
5435
|
-
["discriminator", fixDecoderSize22(getBytesDecoder22(), 8)]
|
|
5436
|
-
]);
|
|
5437
|
-
}
|
|
5438
|
-
function getPauseStakingInstructionDataCodec() {
|
|
5439
|
-
return combineCodec71(
|
|
5440
|
-
getPauseStakingInstructionDataEncoder(),
|
|
5441
|
-
getPauseStakingInstructionDataDecoder()
|
|
5442
|
-
);
|
|
5443
|
-
}
|
|
5444
|
-
function getPauseStakingInstruction(input, config) {
|
|
5445
|
-
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
5446
|
-
const originalAccounts = {
|
|
5447
|
-
marketAuthority: {
|
|
5448
|
-
value: input.marketAuthority ?? null,
|
|
5449
|
-
isWritable: false
|
|
5450
|
-
},
|
|
5451
|
-
market: { value: input.market ?? null, isWritable: true }
|
|
5452
|
-
};
|
|
5453
|
-
const accounts = originalAccounts;
|
|
5454
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
5455
|
-
return Object.freeze({
|
|
5456
|
-
accounts: [
|
|
5457
|
-
getAccountMeta(accounts.marketAuthority),
|
|
5458
|
-
getAccountMeta(accounts.market)
|
|
5459
|
-
],
|
|
5460
|
-
data: getPauseStakingInstructionDataEncoder().encode({}),
|
|
5461
|
-
programAddress
|
|
5462
|
-
});
|
|
5463
|
-
}
|
|
5464
|
-
function parsePauseStakingInstruction(instruction) {
|
|
5465
|
-
if (instruction.accounts.length < 2) {
|
|
5466
|
-
throw new Error("Not enough accounts");
|
|
5467
|
-
}
|
|
5468
|
-
let accountIndex = 0;
|
|
5469
|
-
const getNextAccount = () => {
|
|
5470
|
-
const accountMeta = instruction.accounts[accountIndex];
|
|
5471
|
-
accountIndex += 1;
|
|
5472
|
-
return accountMeta;
|
|
5473
|
-
};
|
|
5474
|
-
return {
|
|
5475
|
-
programAddress: instruction.programAddress,
|
|
5476
|
-
accounts: { marketAuthority: getNextAccount(), market: getNextAccount() },
|
|
5477
|
-
data: getPauseStakingInstructionDataDecoder().decode(instruction.data)
|
|
5478
|
-
};
|
|
5479
|
-
}
|
|
5480
|
-
|
|
5481
|
-
// src/generated/instructions/resolveMarket.ts
|
|
5482
|
-
import {
|
|
5483
|
-
combineCodec as combineCodec72,
|
|
5484
|
-
fixDecoderSize as fixDecoderSize23,
|
|
5485
|
-
fixEncoderSize as fixEncoderSize24,
|
|
5486
|
-
getBytesDecoder as getBytesDecoder23,
|
|
5487
|
-
getBytesEncoder as getBytesEncoder24,
|
|
5488
|
-
getStructDecoder as getStructDecoder66,
|
|
5489
|
-
getStructEncoder as getStructEncoder66,
|
|
5490
|
-
transformEncoder as transformEncoder23
|
|
5491
|
-
} from "@solana/kit";
|
|
5492
5336
|
var RESOLVE_MARKET_DISCRIMINATOR = new Uint8Array([
|
|
5493
5337
|
155,
|
|
5494
5338
|
23,
|
|
@@ -5500,23 +5344,23 @@ var RESOLVE_MARKET_DISCRIMINATOR = new Uint8Array([
|
|
|
5500
5344
|
239
|
|
5501
5345
|
]);
|
|
5502
5346
|
function getResolveMarketDiscriminatorBytes() {
|
|
5503
|
-
return
|
|
5347
|
+
return fixEncoderSize23(getBytesEncoder23(), 8).encode(
|
|
5504
5348
|
RESOLVE_MARKET_DISCRIMINATOR
|
|
5505
5349
|
);
|
|
5506
5350
|
}
|
|
5507
5351
|
function getResolveMarketInstructionDataEncoder() {
|
|
5508
|
-
return
|
|
5509
|
-
|
|
5352
|
+
return transformEncoder22(
|
|
5353
|
+
getStructEncoder63([["discriminator", fixEncoderSize23(getBytesEncoder23(), 8)]]),
|
|
5510
5354
|
(value) => ({ ...value, discriminator: RESOLVE_MARKET_DISCRIMINATOR })
|
|
5511
5355
|
);
|
|
5512
5356
|
}
|
|
5513
5357
|
function getResolveMarketInstructionDataDecoder() {
|
|
5514
|
-
return
|
|
5515
|
-
["discriminator",
|
|
5358
|
+
return getStructDecoder63([
|
|
5359
|
+
["discriminator", fixDecoderSize22(getBytesDecoder22(), 8)]
|
|
5516
5360
|
]);
|
|
5517
5361
|
}
|
|
5518
5362
|
function getResolveMarketInstructionDataCodec() {
|
|
5519
|
-
return
|
|
5363
|
+
return combineCodec69(
|
|
5520
5364
|
getResolveMarketInstructionDataEncoder(),
|
|
5521
5365
|
getResolveMarketInstructionDataDecoder()
|
|
5522
5366
|
);
|
|
@@ -5558,102 +5402,22 @@ function parseResolveMarketInstruction(instruction) {
|
|
|
5558
5402
|
};
|
|
5559
5403
|
}
|
|
5560
5404
|
|
|
5561
|
-
// src/generated/instructions/resumeStaking.ts
|
|
5562
|
-
import {
|
|
5563
|
-
combineCodec as combineCodec73,
|
|
5564
|
-
fixDecoderSize as fixDecoderSize24,
|
|
5565
|
-
fixEncoderSize as fixEncoderSize25,
|
|
5566
|
-
getBytesDecoder as getBytesDecoder24,
|
|
5567
|
-
getBytesEncoder as getBytesEncoder25,
|
|
5568
|
-
getStructDecoder as getStructDecoder67,
|
|
5569
|
-
getStructEncoder as getStructEncoder67,
|
|
5570
|
-
transformEncoder as transformEncoder24
|
|
5571
|
-
} from "@solana/kit";
|
|
5572
|
-
var RESUME_STAKING_DISCRIMINATOR = new Uint8Array([
|
|
5573
|
-
31,
|
|
5574
|
-
200,
|
|
5575
|
-
175,
|
|
5576
|
-
23,
|
|
5577
|
-
211,
|
|
5578
|
-
22,
|
|
5579
|
-
63,
|
|
5580
|
-
155
|
|
5581
|
-
]);
|
|
5582
|
-
function getResumeStakingDiscriminatorBytes() {
|
|
5583
|
-
return fixEncoderSize25(getBytesEncoder25(), 8).encode(
|
|
5584
|
-
RESUME_STAKING_DISCRIMINATOR
|
|
5585
|
-
);
|
|
5586
|
-
}
|
|
5587
|
-
function getResumeStakingInstructionDataEncoder() {
|
|
5588
|
-
return transformEncoder24(
|
|
5589
|
-
getStructEncoder67([["discriminator", fixEncoderSize25(getBytesEncoder25(), 8)]]),
|
|
5590
|
-
(value) => ({ ...value, discriminator: RESUME_STAKING_DISCRIMINATOR })
|
|
5591
|
-
);
|
|
5592
|
-
}
|
|
5593
|
-
function getResumeStakingInstructionDataDecoder() {
|
|
5594
|
-
return getStructDecoder67([
|
|
5595
|
-
["discriminator", fixDecoderSize24(getBytesDecoder24(), 8)]
|
|
5596
|
-
]);
|
|
5597
|
-
}
|
|
5598
|
-
function getResumeStakingInstructionDataCodec() {
|
|
5599
|
-
return combineCodec73(
|
|
5600
|
-
getResumeStakingInstructionDataEncoder(),
|
|
5601
|
-
getResumeStakingInstructionDataDecoder()
|
|
5602
|
-
);
|
|
5603
|
-
}
|
|
5604
|
-
function getResumeStakingInstruction(input, config) {
|
|
5605
|
-
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
5606
|
-
const originalAccounts = {
|
|
5607
|
-
marketAuthority: {
|
|
5608
|
-
value: input.marketAuthority ?? null,
|
|
5609
|
-
isWritable: false
|
|
5610
|
-
},
|
|
5611
|
-
market: { value: input.market ?? null, isWritable: true }
|
|
5612
|
-
};
|
|
5613
|
-
const accounts = originalAccounts;
|
|
5614
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
5615
|
-
return Object.freeze({
|
|
5616
|
-
accounts: [
|
|
5617
|
-
getAccountMeta(accounts.marketAuthority),
|
|
5618
|
-
getAccountMeta(accounts.market)
|
|
5619
|
-
],
|
|
5620
|
-
data: getResumeStakingInstructionDataEncoder().encode({}),
|
|
5621
|
-
programAddress
|
|
5622
|
-
});
|
|
5623
|
-
}
|
|
5624
|
-
function parseResumeStakingInstruction(instruction) {
|
|
5625
|
-
if (instruction.accounts.length < 2) {
|
|
5626
|
-
throw new Error("Not enough accounts");
|
|
5627
|
-
}
|
|
5628
|
-
let accountIndex = 0;
|
|
5629
|
-
const getNextAccount = () => {
|
|
5630
|
-
const accountMeta = instruction.accounts[accountIndex];
|
|
5631
|
-
accountIndex += 1;
|
|
5632
|
-
return accountMeta;
|
|
5633
|
-
};
|
|
5634
|
-
return {
|
|
5635
|
-
programAddress: instruction.programAddress,
|
|
5636
|
-
accounts: { marketAuthority: getNextAccount(), market: getNextAccount() },
|
|
5637
|
-
data: getResumeStakingInstructionDataDecoder().decode(instruction.data)
|
|
5638
|
-
};
|
|
5639
|
-
}
|
|
5640
|
-
|
|
5641
5405
|
// src/generated/instructions/revealStake.ts
|
|
5642
5406
|
import {
|
|
5643
|
-
combineCodec as
|
|
5644
|
-
fixDecoderSize as
|
|
5645
|
-
fixEncoderSize as
|
|
5646
|
-
getAddressEncoder as
|
|
5647
|
-
getBytesDecoder as
|
|
5648
|
-
getBytesEncoder as
|
|
5407
|
+
combineCodec as combineCodec70,
|
|
5408
|
+
fixDecoderSize as fixDecoderSize23,
|
|
5409
|
+
fixEncoderSize as fixEncoderSize24,
|
|
5410
|
+
getAddressEncoder as getAddressEncoder43,
|
|
5411
|
+
getBytesDecoder as getBytesDecoder23,
|
|
5412
|
+
getBytesEncoder as getBytesEncoder24,
|
|
5649
5413
|
getProgramDerivedAddress as getProgramDerivedAddress13,
|
|
5650
|
-
getStructDecoder as
|
|
5651
|
-
getStructEncoder as
|
|
5414
|
+
getStructDecoder as getStructDecoder64,
|
|
5415
|
+
getStructEncoder as getStructEncoder64,
|
|
5652
5416
|
getU32Decoder as getU32Decoder20,
|
|
5653
5417
|
getU32Encoder as getU32Encoder20,
|
|
5654
5418
|
getU64Decoder as getU64Decoder37,
|
|
5655
5419
|
getU64Encoder as getU64Encoder37,
|
|
5656
|
-
transformEncoder as
|
|
5420
|
+
transformEncoder as transformEncoder23
|
|
5657
5421
|
} from "@solana/kit";
|
|
5658
5422
|
var REVEAL_STAKE_DISCRIMINATOR = new Uint8Array([
|
|
5659
5423
|
107,
|
|
@@ -5666,14 +5430,14 @@ var REVEAL_STAKE_DISCRIMINATOR = new Uint8Array([
|
|
|
5666
5430
|
188
|
|
5667
5431
|
]);
|
|
5668
5432
|
function getRevealStakeDiscriminatorBytes() {
|
|
5669
|
-
return
|
|
5433
|
+
return fixEncoderSize24(getBytesEncoder24(), 8).encode(
|
|
5670
5434
|
REVEAL_STAKE_DISCRIMINATOR
|
|
5671
5435
|
);
|
|
5672
5436
|
}
|
|
5673
5437
|
function getRevealStakeInstructionDataEncoder() {
|
|
5674
|
-
return
|
|
5675
|
-
|
|
5676
|
-
["discriminator",
|
|
5438
|
+
return transformEncoder23(
|
|
5439
|
+
getStructEncoder64([
|
|
5440
|
+
["discriminator", fixEncoderSize24(getBytesEncoder24(), 8)],
|
|
5677
5441
|
["computationOffset", getU64Encoder37()],
|
|
5678
5442
|
["stakeAccountId", getU32Encoder20()]
|
|
5679
5443
|
]),
|
|
@@ -5681,14 +5445,14 @@ function getRevealStakeInstructionDataEncoder() {
|
|
|
5681
5445
|
);
|
|
5682
5446
|
}
|
|
5683
5447
|
function getRevealStakeInstructionDataDecoder() {
|
|
5684
|
-
return
|
|
5685
|
-
["discriminator",
|
|
5448
|
+
return getStructDecoder64([
|
|
5449
|
+
["discriminator", fixDecoderSize23(getBytesDecoder23(), 8)],
|
|
5686
5450
|
["computationOffset", getU64Decoder37()],
|
|
5687
5451
|
["stakeAccountId", getU32Decoder20()]
|
|
5688
5452
|
]);
|
|
5689
5453
|
}
|
|
5690
5454
|
function getRevealStakeInstructionDataCodec() {
|
|
5691
|
-
return
|
|
5455
|
+
return combineCodec70(
|
|
5692
5456
|
getRevealStakeInstructionDataEncoder(),
|
|
5693
5457
|
getRevealStakeInstructionDataDecoder()
|
|
5694
5458
|
);
|
|
@@ -5721,7 +5485,7 @@ async function getRevealStakeInstructionAsync(input, config) {
|
|
|
5721
5485
|
accounts.stakeAccount.value = await getProgramDerivedAddress13({
|
|
5722
5486
|
programAddress,
|
|
5723
5487
|
seeds: [
|
|
5724
|
-
|
|
5488
|
+
getBytesEncoder24().encode(
|
|
5725
5489
|
new Uint8Array([
|
|
5726
5490
|
115,
|
|
5727
5491
|
116,
|
|
@@ -5738,8 +5502,8 @@ async function getRevealStakeInstructionAsync(input, config) {
|
|
|
5738
5502
|
116
|
|
5739
5503
|
])
|
|
5740
5504
|
),
|
|
5741
|
-
|
|
5742
|
-
|
|
5505
|
+
getAddressEncoder43().encode(expectAddress(accounts.owner.value)),
|
|
5506
|
+
getAddressEncoder43().encode(expectAddress(accounts.market.value)),
|
|
5743
5507
|
getU32Encoder20().encode(expectSome(args.stakeAccountId))
|
|
5744
5508
|
]
|
|
5745
5509
|
});
|
|
@@ -5748,7 +5512,7 @@ async function getRevealStakeInstructionAsync(input, config) {
|
|
|
5748
5512
|
accounts.signPdaAccount.value = await getProgramDerivedAddress13({
|
|
5749
5513
|
programAddress,
|
|
5750
5514
|
seeds: [
|
|
5751
|
-
|
|
5515
|
+
getBytesEncoder24().encode(
|
|
5752
5516
|
new Uint8Array([
|
|
5753
5517
|
65,
|
|
5754
5518
|
114,
|
|
@@ -5907,24 +5671,24 @@ function parseRevealStakeInstruction(instruction) {
|
|
|
5907
5671
|
|
|
5908
5672
|
// src/generated/instructions/revealStakeCallback.ts
|
|
5909
5673
|
import {
|
|
5910
|
-
combineCodec as
|
|
5911
|
-
fixDecoderSize as
|
|
5912
|
-
fixEncoderSize as
|
|
5674
|
+
combineCodec as combineCodec71,
|
|
5675
|
+
fixDecoderSize as fixDecoderSize24,
|
|
5676
|
+
fixEncoderSize as fixEncoderSize25,
|
|
5913
5677
|
getArrayDecoder as getArrayDecoder15,
|
|
5914
5678
|
getArrayEncoder as getArrayEncoder15,
|
|
5915
|
-
getBytesDecoder as
|
|
5916
|
-
getBytesEncoder as
|
|
5679
|
+
getBytesDecoder as getBytesDecoder24,
|
|
5680
|
+
getBytesEncoder as getBytesEncoder25,
|
|
5917
5681
|
getDiscriminatedUnionDecoder as getDiscriminatedUnionDecoder4,
|
|
5918
5682
|
getDiscriminatedUnionEncoder as getDiscriminatedUnionEncoder4,
|
|
5919
|
-
getStructDecoder as
|
|
5920
|
-
getStructEncoder as
|
|
5683
|
+
getStructDecoder as getStructDecoder65,
|
|
5684
|
+
getStructEncoder as getStructEncoder65,
|
|
5921
5685
|
getTupleDecoder as getTupleDecoder6,
|
|
5922
5686
|
getTupleEncoder as getTupleEncoder6,
|
|
5923
5687
|
getU8Decoder as getU8Decoder22,
|
|
5924
5688
|
getU8Encoder as getU8Encoder22,
|
|
5925
5689
|
getUnitDecoder,
|
|
5926
5690
|
getUnitEncoder,
|
|
5927
|
-
transformEncoder as
|
|
5691
|
+
transformEncoder as transformEncoder24
|
|
5928
5692
|
} from "@solana/kit";
|
|
5929
5693
|
var REVEAL_STAKE_CALLBACK_DISCRIMINATOR = new Uint8Array([
|
|
5930
5694
|
79,
|
|
@@ -5937,20 +5701,20 @@ var REVEAL_STAKE_CALLBACK_DISCRIMINATOR = new Uint8Array([
|
|
|
5937
5701
|
116
|
|
5938
5702
|
]);
|
|
5939
5703
|
function getRevealStakeCallbackDiscriminatorBytes() {
|
|
5940
|
-
return
|
|
5704
|
+
return fixEncoderSize25(getBytesEncoder25(), 8).encode(
|
|
5941
5705
|
REVEAL_STAKE_CALLBACK_DISCRIMINATOR
|
|
5942
5706
|
);
|
|
5943
5707
|
}
|
|
5944
5708
|
function getRevealStakeCallbackInstructionDataEncoder() {
|
|
5945
|
-
return
|
|
5946
|
-
|
|
5947
|
-
["discriminator",
|
|
5709
|
+
return transformEncoder24(
|
|
5710
|
+
getStructEncoder65([
|
|
5711
|
+
["discriminator", fixEncoderSize25(getBytesEncoder25(), 8)],
|
|
5948
5712
|
[
|
|
5949
5713
|
"output",
|
|
5950
5714
|
getDiscriminatedUnionEncoder4([
|
|
5951
5715
|
[
|
|
5952
5716
|
"Success",
|
|
5953
|
-
|
|
5717
|
+
getStructEncoder65([
|
|
5954
5718
|
[
|
|
5955
5719
|
"fields",
|
|
5956
5720
|
getTupleEncoder6([
|
|
@@ -5963,7 +5727,7 @@ function getRevealStakeCallbackInstructionDataEncoder() {
|
|
|
5963
5727
|
["Failure", getUnitEncoder()],
|
|
5964
5728
|
[
|
|
5965
5729
|
"MarkerForIdlBuildDoNotUseThis",
|
|
5966
|
-
|
|
5730
|
+
getStructEncoder65([
|
|
5967
5731
|
["fields", getTupleEncoder6([getRevealStakeOutputEncoder()])]
|
|
5968
5732
|
])
|
|
5969
5733
|
]
|
|
@@ -5977,14 +5741,14 @@ function getRevealStakeCallbackInstructionDataEncoder() {
|
|
|
5977
5741
|
);
|
|
5978
5742
|
}
|
|
5979
5743
|
function getRevealStakeCallbackInstructionDataDecoder() {
|
|
5980
|
-
return
|
|
5981
|
-
["discriminator",
|
|
5744
|
+
return getStructDecoder65([
|
|
5745
|
+
["discriminator", fixDecoderSize24(getBytesDecoder24(), 8)],
|
|
5982
5746
|
[
|
|
5983
5747
|
"output",
|
|
5984
5748
|
getDiscriminatedUnionDecoder4([
|
|
5985
5749
|
[
|
|
5986
5750
|
"Success",
|
|
5987
|
-
|
|
5751
|
+
getStructDecoder65([
|
|
5988
5752
|
[
|
|
5989
5753
|
"fields",
|
|
5990
5754
|
getTupleDecoder6([
|
|
@@ -5997,7 +5761,7 @@ function getRevealStakeCallbackInstructionDataDecoder() {
|
|
|
5997
5761
|
["Failure", getUnitDecoder()],
|
|
5998
5762
|
[
|
|
5999
5763
|
"MarkerForIdlBuildDoNotUseThis",
|
|
6000
|
-
|
|
5764
|
+
getStructDecoder65([
|
|
6001
5765
|
["fields", getTupleDecoder6([getRevealStakeOutputDecoder()])]
|
|
6002
5766
|
])
|
|
6003
5767
|
]
|
|
@@ -6006,7 +5770,7 @@ function getRevealStakeCallbackInstructionDataDecoder() {
|
|
|
6006
5770
|
]);
|
|
6007
5771
|
}
|
|
6008
5772
|
function getRevealStakeCallbackInstructionDataCodec() {
|
|
6009
|
-
return
|
|
5773
|
+
return combineCodec71(
|
|
6010
5774
|
getRevealStakeCallbackInstructionDataEncoder(),
|
|
6011
5775
|
getRevealStakeCallbackInstructionDataDecoder()
|
|
6012
5776
|
);
|
|
@@ -6082,14 +5846,14 @@ function parseRevealStakeCallbackInstruction(instruction) {
|
|
|
6082
5846
|
|
|
6083
5847
|
// src/generated/instructions/revealStakeCompDef.ts
|
|
6084
5848
|
import {
|
|
6085
|
-
combineCodec as
|
|
6086
|
-
fixDecoderSize as
|
|
6087
|
-
fixEncoderSize as
|
|
6088
|
-
getBytesDecoder as
|
|
6089
|
-
getBytesEncoder as
|
|
6090
|
-
getStructDecoder as
|
|
6091
|
-
getStructEncoder as
|
|
6092
|
-
transformEncoder as
|
|
5849
|
+
combineCodec as combineCodec72,
|
|
5850
|
+
fixDecoderSize as fixDecoderSize25,
|
|
5851
|
+
fixEncoderSize as fixEncoderSize26,
|
|
5852
|
+
getBytesDecoder as getBytesDecoder25,
|
|
5853
|
+
getBytesEncoder as getBytesEncoder26,
|
|
5854
|
+
getStructDecoder as getStructDecoder66,
|
|
5855
|
+
getStructEncoder as getStructEncoder66,
|
|
5856
|
+
transformEncoder as transformEncoder25
|
|
6093
5857
|
} from "@solana/kit";
|
|
6094
5858
|
var REVEAL_STAKE_COMP_DEF_DISCRIMINATOR = new Uint8Array([
|
|
6095
5859
|
197,
|
|
@@ -6102,13 +5866,13 @@ var REVEAL_STAKE_COMP_DEF_DISCRIMINATOR = new Uint8Array([
|
|
|
6102
5866
|
0
|
|
6103
5867
|
]);
|
|
6104
5868
|
function getRevealStakeCompDefDiscriminatorBytes() {
|
|
6105
|
-
return
|
|
5869
|
+
return fixEncoderSize26(getBytesEncoder26(), 8).encode(
|
|
6106
5870
|
REVEAL_STAKE_COMP_DEF_DISCRIMINATOR
|
|
6107
5871
|
);
|
|
6108
5872
|
}
|
|
6109
5873
|
function getRevealStakeCompDefInstructionDataEncoder() {
|
|
6110
|
-
return
|
|
6111
|
-
|
|
5874
|
+
return transformEncoder25(
|
|
5875
|
+
getStructEncoder66([["discriminator", fixEncoderSize26(getBytesEncoder26(), 8)]]),
|
|
6112
5876
|
(value) => ({
|
|
6113
5877
|
...value,
|
|
6114
5878
|
discriminator: REVEAL_STAKE_COMP_DEF_DISCRIMINATOR
|
|
@@ -6116,12 +5880,12 @@ function getRevealStakeCompDefInstructionDataEncoder() {
|
|
|
6116
5880
|
);
|
|
6117
5881
|
}
|
|
6118
5882
|
function getRevealStakeCompDefInstructionDataDecoder() {
|
|
6119
|
-
return
|
|
6120
|
-
["discriminator",
|
|
5883
|
+
return getStructDecoder66([
|
|
5884
|
+
["discriminator", fixDecoderSize25(getBytesDecoder25(), 8)]
|
|
6121
5885
|
]);
|
|
6122
5886
|
}
|
|
6123
5887
|
function getRevealStakeCompDefInstructionDataCodec() {
|
|
6124
|
-
return
|
|
5888
|
+
return combineCodec72(
|
|
6125
5889
|
getRevealStakeCompDefInstructionDataEncoder(),
|
|
6126
5890
|
getRevealStakeCompDefInstructionDataDecoder()
|
|
6127
5891
|
);
|
|
@@ -6194,14 +5958,14 @@ function parseRevealStakeCompDefInstruction(instruction) {
|
|
|
6194
5958
|
|
|
6195
5959
|
// src/generated/instructions/setFeeClaimAuthority.ts
|
|
6196
5960
|
import {
|
|
6197
|
-
combineCodec as
|
|
6198
|
-
fixDecoderSize as
|
|
6199
|
-
fixEncoderSize as
|
|
6200
|
-
getBytesDecoder as
|
|
6201
|
-
getBytesEncoder as
|
|
6202
|
-
getStructDecoder as
|
|
6203
|
-
getStructEncoder as
|
|
6204
|
-
transformEncoder as
|
|
5961
|
+
combineCodec as combineCodec73,
|
|
5962
|
+
fixDecoderSize as fixDecoderSize26,
|
|
5963
|
+
fixEncoderSize as fixEncoderSize27,
|
|
5964
|
+
getBytesDecoder as getBytesDecoder26,
|
|
5965
|
+
getBytesEncoder as getBytesEncoder27,
|
|
5966
|
+
getStructDecoder as getStructDecoder67,
|
|
5967
|
+
getStructEncoder as getStructEncoder67,
|
|
5968
|
+
transformEncoder as transformEncoder26
|
|
6205
5969
|
} from "@solana/kit";
|
|
6206
5970
|
var SET_FEE_CLAIM_AUTHORITY_DISCRIMINATOR = new Uint8Array([
|
|
6207
5971
|
75,
|
|
@@ -6214,13 +5978,13 @@ var SET_FEE_CLAIM_AUTHORITY_DISCRIMINATOR = new Uint8Array([
|
|
|
6214
5978
|
3
|
|
6215
5979
|
]);
|
|
6216
5980
|
function getSetFeeClaimAuthorityDiscriminatorBytes() {
|
|
6217
|
-
return
|
|
5981
|
+
return fixEncoderSize27(getBytesEncoder27(), 8).encode(
|
|
6218
5982
|
SET_FEE_CLAIM_AUTHORITY_DISCRIMINATOR
|
|
6219
5983
|
);
|
|
6220
5984
|
}
|
|
6221
5985
|
function getSetFeeClaimAuthorityInstructionDataEncoder() {
|
|
6222
|
-
return
|
|
6223
|
-
|
|
5986
|
+
return transformEncoder26(
|
|
5987
|
+
getStructEncoder67([["discriminator", fixEncoderSize27(getBytesEncoder27(), 8)]]),
|
|
6224
5988
|
(value) => ({
|
|
6225
5989
|
...value,
|
|
6226
5990
|
discriminator: SET_FEE_CLAIM_AUTHORITY_DISCRIMINATOR
|
|
@@ -6228,12 +5992,12 @@ function getSetFeeClaimAuthorityInstructionDataEncoder() {
|
|
|
6228
5992
|
);
|
|
6229
5993
|
}
|
|
6230
5994
|
function getSetFeeClaimAuthorityInstructionDataDecoder() {
|
|
6231
|
-
return
|
|
6232
|
-
["discriminator",
|
|
5995
|
+
return getStructDecoder67([
|
|
5996
|
+
["discriminator", fixDecoderSize26(getBytesDecoder26(), 8)]
|
|
6233
5997
|
]);
|
|
6234
5998
|
}
|
|
6235
5999
|
function getSetFeeClaimAuthorityInstructionDataCodec() {
|
|
6236
|
-
return
|
|
6000
|
+
return combineCodec73(
|
|
6237
6001
|
getSetFeeClaimAuthorityInstructionDataEncoder(),
|
|
6238
6002
|
getSetFeeClaimAuthorityInstructionDataDecoder()
|
|
6239
6003
|
);
|
|
@@ -6288,14 +6052,14 @@ function parseSetFeeClaimAuthorityInstruction(instruction) {
|
|
|
6288
6052
|
|
|
6289
6053
|
// src/generated/instructions/setUpdateAuthority.ts
|
|
6290
6054
|
import {
|
|
6291
|
-
combineCodec as
|
|
6292
|
-
fixDecoderSize as
|
|
6293
|
-
fixEncoderSize as
|
|
6294
|
-
getBytesDecoder as
|
|
6295
|
-
getBytesEncoder as
|
|
6296
|
-
getStructDecoder as
|
|
6297
|
-
getStructEncoder as
|
|
6298
|
-
transformEncoder as
|
|
6055
|
+
combineCodec as combineCodec74,
|
|
6056
|
+
fixDecoderSize as fixDecoderSize27,
|
|
6057
|
+
fixEncoderSize as fixEncoderSize28,
|
|
6058
|
+
getBytesDecoder as getBytesDecoder27,
|
|
6059
|
+
getBytesEncoder as getBytesEncoder28,
|
|
6060
|
+
getStructDecoder as getStructDecoder68,
|
|
6061
|
+
getStructEncoder as getStructEncoder68,
|
|
6062
|
+
transformEncoder as transformEncoder27
|
|
6299
6063
|
} from "@solana/kit";
|
|
6300
6064
|
var SET_UPDATE_AUTHORITY_DISCRIMINATOR = new Uint8Array([
|
|
6301
6065
|
166,
|
|
@@ -6308,23 +6072,23 @@ var SET_UPDATE_AUTHORITY_DISCRIMINATOR = new Uint8Array([
|
|
|
6308
6072
|
155
|
|
6309
6073
|
]);
|
|
6310
6074
|
function getSetUpdateAuthorityDiscriminatorBytes() {
|
|
6311
|
-
return
|
|
6075
|
+
return fixEncoderSize28(getBytesEncoder28(), 8).encode(
|
|
6312
6076
|
SET_UPDATE_AUTHORITY_DISCRIMINATOR
|
|
6313
6077
|
);
|
|
6314
6078
|
}
|
|
6315
6079
|
function getSetUpdateAuthorityInstructionDataEncoder() {
|
|
6316
|
-
return
|
|
6317
|
-
|
|
6080
|
+
return transformEncoder27(
|
|
6081
|
+
getStructEncoder68([["discriminator", fixEncoderSize28(getBytesEncoder28(), 8)]]),
|
|
6318
6082
|
(value) => ({ ...value, discriminator: SET_UPDATE_AUTHORITY_DISCRIMINATOR })
|
|
6319
6083
|
);
|
|
6320
6084
|
}
|
|
6321
6085
|
function getSetUpdateAuthorityInstructionDataDecoder() {
|
|
6322
|
-
return
|
|
6323
|
-
["discriminator",
|
|
6086
|
+
return getStructDecoder68([
|
|
6087
|
+
["discriminator", fixDecoderSize27(getBytesDecoder27(), 8)]
|
|
6324
6088
|
]);
|
|
6325
6089
|
}
|
|
6326
6090
|
function getSetUpdateAuthorityInstructionDataCodec() {
|
|
6327
|
-
return
|
|
6091
|
+
return combineCodec74(
|
|
6328
6092
|
getSetUpdateAuthorityInstructionDataEncoder(),
|
|
6329
6093
|
getSetUpdateAuthorityInstructionDataDecoder()
|
|
6330
6094
|
);
|
|
@@ -6376,20 +6140,20 @@ function parseSetUpdateAuthorityInstruction(instruction) {
|
|
|
6376
6140
|
|
|
6377
6141
|
// src/generated/instructions/setWinningOption.ts
|
|
6378
6142
|
import {
|
|
6379
|
-
combineCodec as
|
|
6380
|
-
fixDecoderSize as
|
|
6381
|
-
fixEncoderSize as
|
|
6382
|
-
getAddressEncoder as
|
|
6383
|
-
getBytesDecoder as
|
|
6384
|
-
getBytesEncoder as
|
|
6143
|
+
combineCodec as combineCodec75,
|
|
6144
|
+
fixDecoderSize as fixDecoderSize28,
|
|
6145
|
+
fixEncoderSize as fixEncoderSize29,
|
|
6146
|
+
getAddressEncoder as getAddressEncoder44,
|
|
6147
|
+
getBytesDecoder as getBytesDecoder28,
|
|
6148
|
+
getBytesEncoder as getBytesEncoder29,
|
|
6385
6149
|
getProgramDerivedAddress as getProgramDerivedAddress14,
|
|
6386
|
-
getStructDecoder as
|
|
6387
|
-
getStructEncoder as
|
|
6150
|
+
getStructDecoder as getStructDecoder69,
|
|
6151
|
+
getStructEncoder as getStructEncoder69,
|
|
6388
6152
|
getU16Decoder as getU16Decoder9,
|
|
6389
6153
|
getU16Encoder as getU16Encoder9,
|
|
6390
6154
|
getU64Decoder as getU64Decoder38,
|
|
6391
6155
|
getU64Encoder as getU64Encoder38,
|
|
6392
|
-
transformEncoder as
|
|
6156
|
+
transformEncoder as transformEncoder28
|
|
6393
6157
|
} from "@solana/kit";
|
|
6394
6158
|
var SET_WINNING_OPTION_DISCRIMINATOR = new Uint8Array([
|
|
6395
6159
|
156,
|
|
@@ -6402,29 +6166,29 @@ var SET_WINNING_OPTION_DISCRIMINATOR = new Uint8Array([
|
|
|
6402
6166
|
206
|
|
6403
6167
|
]);
|
|
6404
6168
|
function getSetWinningOptionDiscriminatorBytes() {
|
|
6405
|
-
return
|
|
6169
|
+
return fixEncoderSize29(getBytesEncoder29(), 8).encode(
|
|
6406
6170
|
SET_WINNING_OPTION_DISCRIMINATOR
|
|
6407
6171
|
);
|
|
6408
6172
|
}
|
|
6409
6173
|
function getSetWinningOptionInstructionDataEncoder() {
|
|
6410
|
-
return
|
|
6411
|
-
|
|
6412
|
-
["discriminator",
|
|
6174
|
+
return transformEncoder28(
|
|
6175
|
+
getStructEncoder69([
|
|
6176
|
+
["discriminator", fixEncoderSize29(getBytesEncoder29(), 8)],
|
|
6413
6177
|
["optionId", getU64Encoder38()],
|
|
6414
|
-
["
|
|
6178
|
+
["rewardBp", getU16Encoder9()]
|
|
6415
6179
|
]),
|
|
6416
6180
|
(value) => ({ ...value, discriminator: SET_WINNING_OPTION_DISCRIMINATOR })
|
|
6417
6181
|
);
|
|
6418
6182
|
}
|
|
6419
6183
|
function getSetWinningOptionInstructionDataDecoder() {
|
|
6420
|
-
return
|
|
6421
|
-
["discriminator",
|
|
6184
|
+
return getStructDecoder69([
|
|
6185
|
+
["discriminator", fixDecoderSize28(getBytesDecoder28(), 8)],
|
|
6422
6186
|
["optionId", getU64Decoder38()],
|
|
6423
|
-
["
|
|
6187
|
+
["rewardBp", getU16Decoder9()]
|
|
6424
6188
|
]);
|
|
6425
6189
|
}
|
|
6426
6190
|
function getSetWinningOptionInstructionDataCodec() {
|
|
6427
|
-
return
|
|
6191
|
+
return combineCodec75(
|
|
6428
6192
|
getSetWinningOptionInstructionDataEncoder(),
|
|
6429
6193
|
getSetWinningOptionInstructionDataDecoder()
|
|
6430
6194
|
);
|
|
@@ -6445,10 +6209,10 @@ async function getSetWinningOptionInstructionAsync(input, config) {
|
|
|
6445
6209
|
accounts.option.value = await getProgramDerivedAddress14({
|
|
6446
6210
|
programAddress,
|
|
6447
6211
|
seeds: [
|
|
6448
|
-
|
|
6212
|
+
getBytesEncoder29().encode(
|
|
6449
6213
|
new Uint8Array([111, 112, 116, 105, 111, 110])
|
|
6450
6214
|
),
|
|
6451
|
-
|
|
6215
|
+
getAddressEncoder44().encode(expectAddress(accounts.market.value)),
|
|
6452
6216
|
getU64Encoder38().encode(expectSome(args.optionId))
|
|
6453
6217
|
]
|
|
6454
6218
|
});
|
|
@@ -6514,26 +6278,26 @@ function parseSetWinningOptionInstruction(instruction) {
|
|
|
6514
6278
|
|
|
6515
6279
|
// src/generated/instructions/stake.ts
|
|
6516
6280
|
import {
|
|
6517
|
-
combineCodec as
|
|
6518
|
-
fixDecoderSize as
|
|
6519
|
-
fixEncoderSize as
|
|
6520
|
-
getAddressEncoder as
|
|
6281
|
+
combineCodec as combineCodec76,
|
|
6282
|
+
fixDecoderSize as fixDecoderSize29,
|
|
6283
|
+
fixEncoderSize as fixEncoderSize30,
|
|
6284
|
+
getAddressEncoder as getAddressEncoder45,
|
|
6521
6285
|
getArrayDecoder as getArrayDecoder16,
|
|
6522
6286
|
getArrayEncoder as getArrayEncoder16,
|
|
6523
|
-
getBytesDecoder as
|
|
6524
|
-
getBytesEncoder as
|
|
6287
|
+
getBytesDecoder as getBytesDecoder29,
|
|
6288
|
+
getBytesEncoder as getBytesEncoder30,
|
|
6525
6289
|
getProgramDerivedAddress as getProgramDerivedAddress15,
|
|
6526
|
-
getStructDecoder as
|
|
6527
|
-
getStructEncoder as
|
|
6528
|
-
getU128Decoder as
|
|
6529
|
-
getU128Encoder as
|
|
6290
|
+
getStructDecoder as getStructDecoder70,
|
|
6291
|
+
getStructEncoder as getStructEncoder70,
|
|
6292
|
+
getU128Decoder as getU128Decoder6,
|
|
6293
|
+
getU128Encoder as getU128Encoder6,
|
|
6530
6294
|
getU32Decoder as getU32Decoder21,
|
|
6531
6295
|
getU32Encoder as getU32Encoder21,
|
|
6532
6296
|
getU64Decoder as getU64Decoder39,
|
|
6533
6297
|
getU64Encoder as getU64Encoder39,
|
|
6534
6298
|
getU8Decoder as getU8Decoder23,
|
|
6535
6299
|
getU8Encoder as getU8Encoder23,
|
|
6536
|
-
transformEncoder as
|
|
6300
|
+
transformEncoder as transformEncoder29
|
|
6537
6301
|
} from "@solana/kit";
|
|
6538
6302
|
var STAKE_DISCRIMINATOR = new Uint8Array([
|
|
6539
6303
|
206,
|
|
@@ -6546,12 +6310,12 @@ var STAKE_DISCRIMINATOR = new Uint8Array([
|
|
|
6546
6310
|
108
|
|
6547
6311
|
]);
|
|
6548
6312
|
function getStakeDiscriminatorBytes() {
|
|
6549
|
-
return
|
|
6313
|
+
return fixEncoderSize30(getBytesEncoder30(), 8).encode(STAKE_DISCRIMINATOR);
|
|
6550
6314
|
}
|
|
6551
6315
|
function getStakeInstructionDataEncoder() {
|
|
6552
|
-
return
|
|
6553
|
-
|
|
6554
|
-
["discriminator",
|
|
6316
|
+
return transformEncoder29(
|
|
6317
|
+
getStructEncoder70([
|
|
6318
|
+
["discriminator", fixEncoderSize30(getBytesEncoder30(), 8)],
|
|
6555
6319
|
["computationOffset", getU64Encoder39()],
|
|
6556
6320
|
["stakeAccountId", getU32Encoder21()],
|
|
6557
6321
|
["amount", getU64Encoder39()],
|
|
@@ -6559,29 +6323,29 @@ function getStakeInstructionDataEncoder() {
|
|
|
6559
6323
|
"selectedOptionCiphertext",
|
|
6560
6324
|
getArrayEncoder16(getU8Encoder23(), { size: 32 })
|
|
6561
6325
|
],
|
|
6562
|
-
["inputNonce",
|
|
6563
|
-
["authorizedReaderNonce",
|
|
6326
|
+
["inputNonce", getU128Encoder6()],
|
|
6327
|
+
["authorizedReaderNonce", getU128Encoder6()],
|
|
6564
6328
|
["userPubkey", getArrayEncoder16(getU8Encoder23(), { size: 32 })],
|
|
6565
|
-
["stateNonce",
|
|
6329
|
+
["stateNonce", getU128Encoder6()]
|
|
6566
6330
|
]),
|
|
6567
6331
|
(value) => ({ ...value, discriminator: STAKE_DISCRIMINATOR })
|
|
6568
6332
|
);
|
|
6569
6333
|
}
|
|
6570
6334
|
function getStakeInstructionDataDecoder() {
|
|
6571
|
-
return
|
|
6572
|
-
["discriminator",
|
|
6335
|
+
return getStructDecoder70([
|
|
6336
|
+
["discriminator", fixDecoderSize29(getBytesDecoder29(), 8)],
|
|
6573
6337
|
["computationOffset", getU64Decoder39()],
|
|
6574
6338
|
["stakeAccountId", getU32Decoder21()],
|
|
6575
6339
|
["amount", getU64Decoder39()],
|
|
6576
6340
|
["selectedOptionCiphertext", getArrayDecoder16(getU8Decoder23(), { size: 32 })],
|
|
6577
|
-
["inputNonce",
|
|
6578
|
-
["authorizedReaderNonce",
|
|
6341
|
+
["inputNonce", getU128Decoder6()],
|
|
6342
|
+
["authorizedReaderNonce", getU128Decoder6()],
|
|
6579
6343
|
["userPubkey", getArrayDecoder16(getU8Decoder23(), { size: 32 })],
|
|
6580
|
-
["stateNonce",
|
|
6344
|
+
["stateNonce", getU128Decoder6()]
|
|
6581
6345
|
]);
|
|
6582
6346
|
}
|
|
6583
6347
|
function getStakeInstructionDataCodec() {
|
|
6584
|
-
return
|
|
6348
|
+
return combineCodec76(
|
|
6585
6349
|
getStakeInstructionDataEncoder(),
|
|
6586
6350
|
getStakeInstructionDataDecoder()
|
|
6587
6351
|
);
|
|
@@ -6621,9 +6385,9 @@ async function getStakeInstructionAsync(input, config) {
|
|
|
6621
6385
|
accounts.marketTokenAta.value = await getProgramDerivedAddress15({
|
|
6622
6386
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
6623
6387
|
seeds: [
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6388
|
+
getAddressEncoder45().encode(expectAddress(accounts.market.value)),
|
|
6389
|
+
getAddressEncoder45().encode(expectAddress(accounts.tokenProgram.value)),
|
|
6390
|
+
getAddressEncoder45().encode(expectAddress(accounts.tokenMint.value))
|
|
6627
6391
|
]
|
|
6628
6392
|
});
|
|
6629
6393
|
}
|
|
@@ -6631,7 +6395,7 @@ async function getStakeInstructionAsync(input, config) {
|
|
|
6631
6395
|
accounts.signPdaAccount.value = await getProgramDerivedAddress15({
|
|
6632
6396
|
programAddress,
|
|
6633
6397
|
seeds: [
|
|
6634
|
-
|
|
6398
|
+
getBytesEncoder30().encode(
|
|
6635
6399
|
new Uint8Array([
|
|
6636
6400
|
65,
|
|
6637
6401
|
114,
|
|
@@ -6809,24 +6573,24 @@ function parseStakeInstruction(instruction) {
|
|
|
6809
6573
|
|
|
6810
6574
|
// src/generated/instructions/stakeCallback.ts
|
|
6811
6575
|
import {
|
|
6812
|
-
combineCodec as
|
|
6813
|
-
fixDecoderSize as
|
|
6814
|
-
fixEncoderSize as
|
|
6576
|
+
combineCodec as combineCodec77,
|
|
6577
|
+
fixDecoderSize as fixDecoderSize30,
|
|
6578
|
+
fixEncoderSize as fixEncoderSize31,
|
|
6815
6579
|
getArrayDecoder as getArrayDecoder17,
|
|
6816
6580
|
getArrayEncoder as getArrayEncoder17,
|
|
6817
|
-
getBytesDecoder as
|
|
6818
|
-
getBytesEncoder as
|
|
6581
|
+
getBytesDecoder as getBytesDecoder30,
|
|
6582
|
+
getBytesEncoder as getBytesEncoder31,
|
|
6819
6583
|
getDiscriminatedUnionDecoder as getDiscriminatedUnionDecoder5,
|
|
6820
6584
|
getDiscriminatedUnionEncoder as getDiscriminatedUnionEncoder5,
|
|
6821
|
-
getStructDecoder as
|
|
6822
|
-
getStructEncoder as
|
|
6585
|
+
getStructDecoder as getStructDecoder71,
|
|
6586
|
+
getStructEncoder as getStructEncoder71,
|
|
6823
6587
|
getTupleDecoder as getTupleDecoder7,
|
|
6824
6588
|
getTupleEncoder as getTupleEncoder7,
|
|
6825
6589
|
getU8Decoder as getU8Decoder24,
|
|
6826
6590
|
getU8Encoder as getU8Encoder24,
|
|
6827
6591
|
getUnitDecoder as getUnitDecoder2,
|
|
6828
6592
|
getUnitEncoder as getUnitEncoder2,
|
|
6829
|
-
transformEncoder as
|
|
6593
|
+
transformEncoder as transformEncoder30
|
|
6830
6594
|
} from "@solana/kit";
|
|
6831
6595
|
var STAKE_CALLBACK_DISCRIMINATOR = new Uint8Array([
|
|
6832
6596
|
40,
|
|
@@ -6839,20 +6603,20 @@ var STAKE_CALLBACK_DISCRIMINATOR = new Uint8Array([
|
|
|
6839
6603
|
89
|
|
6840
6604
|
]);
|
|
6841
6605
|
function getStakeCallbackDiscriminatorBytes() {
|
|
6842
|
-
return
|
|
6606
|
+
return fixEncoderSize31(getBytesEncoder31(), 8).encode(
|
|
6843
6607
|
STAKE_CALLBACK_DISCRIMINATOR
|
|
6844
6608
|
);
|
|
6845
6609
|
}
|
|
6846
6610
|
function getStakeCallbackInstructionDataEncoder() {
|
|
6847
|
-
return
|
|
6848
|
-
|
|
6849
|
-
["discriminator",
|
|
6611
|
+
return transformEncoder30(
|
|
6612
|
+
getStructEncoder71([
|
|
6613
|
+
["discriminator", fixEncoderSize31(getBytesEncoder31(), 8)],
|
|
6850
6614
|
[
|
|
6851
6615
|
"output",
|
|
6852
6616
|
getDiscriminatedUnionEncoder5([
|
|
6853
6617
|
[
|
|
6854
6618
|
"Success",
|
|
6855
|
-
|
|
6619
|
+
getStructEncoder71([
|
|
6856
6620
|
[
|
|
6857
6621
|
"fields",
|
|
6858
6622
|
getTupleEncoder7([
|
|
@@ -6865,7 +6629,7 @@ function getStakeCallbackInstructionDataEncoder() {
|
|
|
6865
6629
|
["Failure", getUnitEncoder2()],
|
|
6866
6630
|
[
|
|
6867
6631
|
"MarkerForIdlBuildDoNotUseThis",
|
|
6868
|
-
|
|
6632
|
+
getStructEncoder71([
|
|
6869
6633
|
["fields", getTupleEncoder7([getStakeOutputEncoder()])]
|
|
6870
6634
|
])
|
|
6871
6635
|
]
|
|
@@ -6876,14 +6640,14 @@ function getStakeCallbackInstructionDataEncoder() {
|
|
|
6876
6640
|
);
|
|
6877
6641
|
}
|
|
6878
6642
|
function getStakeCallbackInstructionDataDecoder() {
|
|
6879
|
-
return
|
|
6880
|
-
["discriminator",
|
|
6643
|
+
return getStructDecoder71([
|
|
6644
|
+
["discriminator", fixDecoderSize30(getBytesDecoder30(), 8)],
|
|
6881
6645
|
[
|
|
6882
6646
|
"output",
|
|
6883
6647
|
getDiscriminatedUnionDecoder5([
|
|
6884
6648
|
[
|
|
6885
6649
|
"Success",
|
|
6886
|
-
|
|
6650
|
+
getStructDecoder71([
|
|
6887
6651
|
[
|
|
6888
6652
|
"fields",
|
|
6889
6653
|
getTupleDecoder7([
|
|
@@ -6896,7 +6660,7 @@ function getStakeCallbackInstructionDataDecoder() {
|
|
|
6896
6660
|
["Failure", getUnitDecoder2()],
|
|
6897
6661
|
[
|
|
6898
6662
|
"MarkerForIdlBuildDoNotUseThis",
|
|
6899
|
-
|
|
6663
|
+
getStructDecoder71([
|
|
6900
6664
|
["fields", getTupleDecoder7([getStakeOutputDecoder()])]
|
|
6901
6665
|
])
|
|
6902
6666
|
]
|
|
@@ -6905,7 +6669,7 @@ function getStakeCallbackInstructionDataDecoder() {
|
|
|
6905
6669
|
]);
|
|
6906
6670
|
}
|
|
6907
6671
|
function getStakeCallbackInstructionDataCodec() {
|
|
6908
|
-
return
|
|
6672
|
+
return combineCodec77(
|
|
6909
6673
|
getStakeCallbackInstructionDataEncoder(),
|
|
6910
6674
|
getStakeCallbackInstructionDataDecoder()
|
|
6911
6675
|
);
|
|
@@ -6982,14 +6746,14 @@ function parseStakeCallbackInstruction(instruction) {
|
|
|
6982
6746
|
|
|
6983
6747
|
// src/generated/instructions/stakeCompDef.ts
|
|
6984
6748
|
import {
|
|
6985
|
-
combineCodec as
|
|
6986
|
-
fixDecoderSize as
|
|
6987
|
-
fixEncoderSize as
|
|
6988
|
-
getBytesDecoder as
|
|
6989
|
-
getBytesEncoder as
|
|
6990
|
-
getStructDecoder as
|
|
6991
|
-
getStructEncoder as
|
|
6992
|
-
transformEncoder as
|
|
6749
|
+
combineCodec as combineCodec78,
|
|
6750
|
+
fixDecoderSize as fixDecoderSize31,
|
|
6751
|
+
fixEncoderSize as fixEncoderSize32,
|
|
6752
|
+
getBytesDecoder as getBytesDecoder31,
|
|
6753
|
+
getBytesEncoder as getBytesEncoder32,
|
|
6754
|
+
getStructDecoder as getStructDecoder72,
|
|
6755
|
+
getStructEncoder as getStructEncoder72,
|
|
6756
|
+
transformEncoder as transformEncoder31
|
|
6993
6757
|
} from "@solana/kit";
|
|
6994
6758
|
var STAKE_COMP_DEF_DISCRIMINATOR = new Uint8Array([
|
|
6995
6759
|
156,
|
|
@@ -7002,23 +6766,23 @@ var STAKE_COMP_DEF_DISCRIMINATOR = new Uint8Array([
|
|
|
7002
6766
|
130
|
|
7003
6767
|
]);
|
|
7004
6768
|
function getStakeCompDefDiscriminatorBytes() {
|
|
7005
|
-
return
|
|
6769
|
+
return fixEncoderSize32(getBytesEncoder32(), 8).encode(
|
|
7006
6770
|
STAKE_COMP_DEF_DISCRIMINATOR
|
|
7007
6771
|
);
|
|
7008
6772
|
}
|
|
7009
6773
|
function getStakeCompDefInstructionDataEncoder() {
|
|
7010
|
-
return
|
|
7011
|
-
|
|
6774
|
+
return transformEncoder31(
|
|
6775
|
+
getStructEncoder72([["discriminator", fixEncoderSize32(getBytesEncoder32(), 8)]]),
|
|
7012
6776
|
(value) => ({ ...value, discriminator: STAKE_COMP_DEF_DISCRIMINATOR })
|
|
7013
6777
|
);
|
|
7014
6778
|
}
|
|
7015
6779
|
function getStakeCompDefInstructionDataDecoder() {
|
|
7016
|
-
return
|
|
7017
|
-
["discriminator",
|
|
6780
|
+
return getStructDecoder72([
|
|
6781
|
+
["discriminator", fixDecoderSize31(getBytesDecoder31(), 8)]
|
|
7018
6782
|
]);
|
|
7019
6783
|
}
|
|
7020
6784
|
function getStakeCompDefInstructionDataCodec() {
|
|
7021
|
-
return
|
|
6785
|
+
return combineCodec78(
|
|
7022
6786
|
getStakeCompDefInstructionDataEncoder(),
|
|
7023
6787
|
getStakeCompDefInstructionDataDecoder()
|
|
7024
6788
|
);
|
|
@@ -7089,18 +6853,18 @@ function parseStakeCompDefInstruction(instruction) {
|
|
|
7089
6853
|
|
|
7090
6854
|
// src/generated/instructions/unstake.ts
|
|
7091
6855
|
import {
|
|
7092
|
-
combineCodec as
|
|
7093
|
-
fixDecoderSize as
|
|
7094
|
-
fixEncoderSize as
|
|
7095
|
-
getAddressEncoder as
|
|
7096
|
-
getBytesDecoder as
|
|
7097
|
-
getBytesEncoder as
|
|
6856
|
+
combineCodec as combineCodec79,
|
|
6857
|
+
fixDecoderSize as fixDecoderSize32,
|
|
6858
|
+
fixEncoderSize as fixEncoderSize33,
|
|
6859
|
+
getAddressEncoder as getAddressEncoder46,
|
|
6860
|
+
getBytesDecoder as getBytesDecoder32,
|
|
6861
|
+
getBytesEncoder as getBytesEncoder33,
|
|
7098
6862
|
getProgramDerivedAddress as getProgramDerivedAddress16,
|
|
7099
|
-
getStructDecoder as
|
|
7100
|
-
getStructEncoder as
|
|
6863
|
+
getStructDecoder as getStructDecoder73,
|
|
6864
|
+
getStructEncoder as getStructEncoder73,
|
|
7101
6865
|
getU32Decoder as getU32Decoder22,
|
|
7102
6866
|
getU32Encoder as getU32Encoder22,
|
|
7103
|
-
transformEncoder as
|
|
6867
|
+
transformEncoder as transformEncoder32
|
|
7104
6868
|
} from "@solana/kit";
|
|
7105
6869
|
var UNSTAKE_DISCRIMINATOR = new Uint8Array([
|
|
7106
6870
|
90,
|
|
@@ -7113,25 +6877,25 @@ var UNSTAKE_DISCRIMINATOR = new Uint8Array([
|
|
|
7113
6877
|
225
|
|
7114
6878
|
]);
|
|
7115
6879
|
function getUnstakeDiscriminatorBytes() {
|
|
7116
|
-
return
|
|
6880
|
+
return fixEncoderSize33(getBytesEncoder33(), 8).encode(UNSTAKE_DISCRIMINATOR);
|
|
7117
6881
|
}
|
|
7118
6882
|
function getUnstakeInstructionDataEncoder() {
|
|
7119
|
-
return
|
|
7120
|
-
|
|
7121
|
-
["discriminator",
|
|
6883
|
+
return transformEncoder32(
|
|
6884
|
+
getStructEncoder73([
|
|
6885
|
+
["discriminator", fixEncoderSize33(getBytesEncoder33(), 8)],
|
|
7122
6886
|
["stakeAccountId", getU32Encoder22()]
|
|
7123
6887
|
]),
|
|
7124
6888
|
(value) => ({ ...value, discriminator: UNSTAKE_DISCRIMINATOR })
|
|
7125
6889
|
);
|
|
7126
6890
|
}
|
|
7127
6891
|
function getUnstakeInstructionDataDecoder() {
|
|
7128
|
-
return
|
|
7129
|
-
["discriminator",
|
|
6892
|
+
return getStructDecoder73([
|
|
6893
|
+
["discriminator", fixDecoderSize32(getBytesDecoder32(), 8)],
|
|
7130
6894
|
["stakeAccountId", getU32Decoder22()]
|
|
7131
6895
|
]);
|
|
7132
6896
|
}
|
|
7133
6897
|
function getUnstakeInstructionDataCodec() {
|
|
7134
|
-
return
|
|
6898
|
+
return combineCodec79(
|
|
7135
6899
|
getUnstakeInstructionDataEncoder(),
|
|
7136
6900
|
getUnstakeInstructionDataDecoder()
|
|
7137
6901
|
);
|
|
@@ -7158,7 +6922,7 @@ async function getUnstakeInstructionAsync(input, config) {
|
|
|
7158
6922
|
accounts.stakeAccount.value = await getProgramDerivedAddress16({
|
|
7159
6923
|
programAddress,
|
|
7160
6924
|
seeds: [
|
|
7161
|
-
|
|
6925
|
+
getBytesEncoder33().encode(
|
|
7162
6926
|
new Uint8Array([
|
|
7163
6927
|
115,
|
|
7164
6928
|
116,
|
|
@@ -7175,8 +6939,8 @@ async function getUnstakeInstructionAsync(input, config) {
|
|
|
7175
6939
|
116
|
|
7176
6940
|
])
|
|
7177
6941
|
),
|
|
7178
|
-
|
|
7179
|
-
|
|
6942
|
+
getAddressEncoder46().encode(expectAddress(accounts.owner.value)),
|
|
6943
|
+
getAddressEncoder46().encode(expectAddress(accounts.market.value)),
|
|
7180
6944
|
getU32Encoder22().encode(expectSome(args.stakeAccountId))
|
|
7181
6945
|
]
|
|
7182
6946
|
});
|
|
@@ -7185,9 +6949,9 @@ async function getUnstakeInstructionAsync(input, config) {
|
|
|
7185
6949
|
accounts.marketTokenAta.value = await getProgramDerivedAddress16({
|
|
7186
6950
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
7187
6951
|
seeds: [
|
|
7188
|
-
|
|
7189
|
-
|
|
7190
|
-
|
|
6952
|
+
getAddressEncoder46().encode(expectAddress(accounts.market.value)),
|
|
6953
|
+
getAddressEncoder46().encode(expectAddress(accounts.tokenProgram.value)),
|
|
6954
|
+
getAddressEncoder46().encode(expectAddress(accounts.tokenMint.value))
|
|
7191
6955
|
]
|
|
7192
6956
|
});
|
|
7193
6957
|
}
|
|
@@ -7282,18 +7046,20 @@ function parseUnstakeInstruction(instruction) {
|
|
|
7282
7046
|
|
|
7283
7047
|
// src/generated/instructions/updatePlatformConfig.ts
|
|
7284
7048
|
import {
|
|
7285
|
-
combineCodec as
|
|
7286
|
-
fixDecoderSize as
|
|
7287
|
-
fixEncoderSize as
|
|
7288
|
-
|
|
7289
|
-
|
|
7290
|
-
|
|
7291
|
-
|
|
7049
|
+
combineCodec as combineCodec80,
|
|
7050
|
+
fixDecoderSize as fixDecoderSize33,
|
|
7051
|
+
fixEncoderSize as fixEncoderSize34,
|
|
7052
|
+
getAddressDecoder as getAddressDecoder33,
|
|
7053
|
+
getAddressEncoder as getAddressEncoder47,
|
|
7054
|
+
getBytesDecoder as getBytesDecoder33,
|
|
7055
|
+
getBytesEncoder as getBytesEncoder34,
|
|
7056
|
+
getStructDecoder as getStructDecoder74,
|
|
7057
|
+
getStructEncoder as getStructEncoder74,
|
|
7292
7058
|
getU16Decoder as getU16Decoder10,
|
|
7293
7059
|
getU16Encoder as getU16Encoder10,
|
|
7294
7060
|
getU64Decoder as getU64Decoder40,
|
|
7295
7061
|
getU64Encoder as getU64Encoder40,
|
|
7296
|
-
transformEncoder as
|
|
7062
|
+
transformEncoder as transformEncoder33
|
|
7297
7063
|
} from "@solana/kit";
|
|
7298
7064
|
var UPDATE_PLATFORM_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
7299
7065
|
195,
|
|
@@ -7306,20 +7072,20 @@ var UPDATE_PLATFORM_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
|
7306
7072
|
143
|
|
7307
7073
|
]);
|
|
7308
7074
|
function getUpdatePlatformConfigDiscriminatorBytes() {
|
|
7309
|
-
return
|
|
7075
|
+
return fixEncoderSize34(getBytesEncoder34(), 8).encode(
|
|
7310
7076
|
UPDATE_PLATFORM_CONFIG_DISCRIMINATOR
|
|
7311
7077
|
);
|
|
7312
7078
|
}
|
|
7313
7079
|
function getUpdatePlatformConfigInstructionDataEncoder() {
|
|
7314
|
-
return
|
|
7315
|
-
|
|
7316
|
-
["discriminator",
|
|
7080
|
+
return transformEncoder33(
|
|
7081
|
+
getStructEncoder74([
|
|
7082
|
+
["discriminator", fixEncoderSize34(getBytesEncoder34(), 8)],
|
|
7317
7083
|
["platformFeeBp", getU16Encoder10()],
|
|
7318
7084
|
["rewardPoolFeeBp", getU16Encoder10()],
|
|
7319
7085
|
["creatorFeeBp", getU16Encoder10()],
|
|
7086
|
+
["revealAuthority", getAddressEncoder47()],
|
|
7320
7087
|
["minTimeToStakeSeconds", getU64Encoder40()],
|
|
7321
|
-
["
|
|
7322
|
-
["maxRevealPeriodSeconds", getU64Encoder40()],
|
|
7088
|
+
["revealPeriodSeconds", getU64Encoder40()],
|
|
7323
7089
|
["marketResolutionDeadlineSeconds", getU64Encoder40()]
|
|
7324
7090
|
]),
|
|
7325
7091
|
(value) => ({
|
|
@@ -7329,19 +7095,19 @@ function getUpdatePlatformConfigInstructionDataEncoder() {
|
|
|
7329
7095
|
);
|
|
7330
7096
|
}
|
|
7331
7097
|
function getUpdatePlatformConfigInstructionDataDecoder() {
|
|
7332
|
-
return
|
|
7333
|
-
["discriminator",
|
|
7098
|
+
return getStructDecoder74([
|
|
7099
|
+
["discriminator", fixDecoderSize33(getBytesDecoder33(), 8)],
|
|
7334
7100
|
["platformFeeBp", getU16Decoder10()],
|
|
7335
7101
|
["rewardPoolFeeBp", getU16Decoder10()],
|
|
7336
7102
|
["creatorFeeBp", getU16Decoder10()],
|
|
7103
|
+
["revealAuthority", getAddressDecoder33()],
|
|
7337
7104
|
["minTimeToStakeSeconds", getU64Decoder40()],
|
|
7338
|
-
["
|
|
7339
|
-
["maxRevealPeriodSeconds", getU64Decoder40()],
|
|
7105
|
+
["revealPeriodSeconds", getU64Decoder40()],
|
|
7340
7106
|
["marketResolutionDeadlineSeconds", getU64Decoder40()]
|
|
7341
7107
|
]);
|
|
7342
7108
|
}
|
|
7343
7109
|
function getUpdatePlatformConfigInstructionDataCodec() {
|
|
7344
|
-
return
|
|
7110
|
+
return combineCodec80(
|
|
7345
7111
|
getUpdatePlatformConfigInstructionDataEncoder(),
|
|
7346
7112
|
getUpdatePlatformConfigInstructionDataDecoder()
|
|
7347
7113
|
);
|
|
@@ -7393,16 +7159,16 @@ function parseUpdatePlatformConfigInstruction(instruction) {
|
|
|
7393
7159
|
|
|
7394
7160
|
// src/generated/instructions/withdrawReward.ts
|
|
7395
7161
|
import {
|
|
7396
|
-
combineCodec as
|
|
7397
|
-
fixDecoderSize as
|
|
7398
|
-
fixEncoderSize as
|
|
7399
|
-
getAddressEncoder as
|
|
7400
|
-
getBytesDecoder as
|
|
7401
|
-
getBytesEncoder as
|
|
7162
|
+
combineCodec as combineCodec81,
|
|
7163
|
+
fixDecoderSize as fixDecoderSize34,
|
|
7164
|
+
fixEncoderSize as fixEncoderSize35,
|
|
7165
|
+
getAddressEncoder as getAddressEncoder48,
|
|
7166
|
+
getBytesDecoder as getBytesDecoder34,
|
|
7167
|
+
getBytesEncoder as getBytesEncoder35,
|
|
7402
7168
|
getProgramDerivedAddress as getProgramDerivedAddress17,
|
|
7403
|
-
getStructDecoder as
|
|
7404
|
-
getStructEncoder as
|
|
7405
|
-
transformEncoder as
|
|
7169
|
+
getStructDecoder as getStructDecoder75,
|
|
7170
|
+
getStructEncoder as getStructEncoder75,
|
|
7171
|
+
transformEncoder as transformEncoder34
|
|
7406
7172
|
} from "@solana/kit";
|
|
7407
7173
|
var WITHDRAW_REWARD_DISCRIMINATOR = new Uint8Array([
|
|
7408
7174
|
191,
|
|
@@ -7415,23 +7181,23 @@ var WITHDRAW_REWARD_DISCRIMINATOR = new Uint8Array([
|
|
|
7415
7181
|
244
|
|
7416
7182
|
]);
|
|
7417
7183
|
function getWithdrawRewardDiscriminatorBytes() {
|
|
7418
|
-
return
|
|
7184
|
+
return fixEncoderSize35(getBytesEncoder35(), 8).encode(
|
|
7419
7185
|
WITHDRAW_REWARD_DISCRIMINATOR
|
|
7420
7186
|
);
|
|
7421
7187
|
}
|
|
7422
7188
|
function getWithdrawRewardInstructionDataEncoder() {
|
|
7423
|
-
return
|
|
7424
|
-
|
|
7189
|
+
return transformEncoder34(
|
|
7190
|
+
getStructEncoder75([["discriminator", fixEncoderSize35(getBytesEncoder35(), 8)]]),
|
|
7425
7191
|
(value) => ({ ...value, discriminator: WITHDRAW_REWARD_DISCRIMINATOR })
|
|
7426
7192
|
);
|
|
7427
7193
|
}
|
|
7428
7194
|
function getWithdrawRewardInstructionDataDecoder() {
|
|
7429
|
-
return
|
|
7430
|
-
["discriminator",
|
|
7195
|
+
return getStructDecoder75([
|
|
7196
|
+
["discriminator", fixDecoderSize34(getBytesDecoder34(), 8)]
|
|
7431
7197
|
]);
|
|
7432
7198
|
}
|
|
7433
7199
|
function getWithdrawRewardInstructionDataCodec() {
|
|
7434
|
-
return
|
|
7200
|
+
return combineCodec81(
|
|
7435
7201
|
getWithdrawRewardInstructionDataEncoder(),
|
|
7436
7202
|
getWithdrawRewardInstructionDataDecoder()
|
|
7437
7203
|
);
|
|
@@ -7455,11 +7221,11 @@ async function getWithdrawRewardInstructionAsync(input, config) {
|
|
|
7455
7221
|
accounts.sponsorAccount.value = await getProgramDerivedAddress17({
|
|
7456
7222
|
programAddress,
|
|
7457
7223
|
seeds: [
|
|
7458
|
-
|
|
7224
|
+
getBytesEncoder35().encode(
|
|
7459
7225
|
new Uint8Array([115, 112, 111, 110, 115, 111, 114])
|
|
7460
7226
|
),
|
|
7461
|
-
|
|
7462
|
-
|
|
7227
|
+
getAddressEncoder48().encode(expectAddress(accounts.sponsor.value)),
|
|
7228
|
+
getAddressEncoder48().encode(expectAddress(accounts.market.value))
|
|
7463
7229
|
]
|
|
7464
7230
|
});
|
|
7465
7231
|
}
|
|
@@ -7467,9 +7233,9 @@ async function getWithdrawRewardInstructionAsync(input, config) {
|
|
|
7467
7233
|
accounts.marketTokenAta.value = await getProgramDerivedAddress17({
|
|
7468
7234
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
7469
7235
|
seeds: [
|
|
7470
|
-
|
|
7471
|
-
|
|
7472
|
-
|
|
7236
|
+
getAddressEncoder48().encode(expectAddress(accounts.market.value)),
|
|
7237
|
+
getAddressEncoder48().encode(expectAddress(accounts.tokenProgram.value)),
|
|
7238
|
+
getAddressEncoder48().encode(expectAddress(accounts.tokenMint.value))
|
|
7473
7239
|
]
|
|
7474
7240
|
});
|
|
7475
7241
|
}
|
|
@@ -7683,6 +7449,44 @@ function getComputeAccounts(ixName, config) {
|
|
|
7683
7449
|
};
|
|
7684
7450
|
}
|
|
7685
7451
|
|
|
7452
|
+
// src/arcium/awaitFinalizeComputation.ts
|
|
7453
|
+
var TIMEOUT_SLOTS = 180;
|
|
7454
|
+
var DEFAULT_POLL_INTERVAL = 1e3;
|
|
7455
|
+
var DEFAULT_SIGNATURE_LIMIT = 100;
|
|
7456
|
+
var awaitComputationFinalization = async (rpc, computationAccount, invocationSignature, options) => {
|
|
7457
|
+
const commitment = options?.commitment ?? "confirmed";
|
|
7458
|
+
const pollInterval = options?.pollInterval ?? DEFAULT_POLL_INTERVAL;
|
|
7459
|
+
const limit = options?.transactionCountLimit ?? DEFAULT_SIGNATURE_LIMIT;
|
|
7460
|
+
const invocationTx = await rpc.getTransaction(invocationSignature, {
|
|
7461
|
+
commitment,
|
|
7462
|
+
encoding: "json",
|
|
7463
|
+
maxSupportedTransactionVersion: 0
|
|
7464
|
+
}).send();
|
|
7465
|
+
if (!invocationTx) {
|
|
7466
|
+
throw new Error(`Invocation transaction ${invocationSignature} not found`);
|
|
7467
|
+
}
|
|
7468
|
+
const deadlineSlot = invocationTx.slot + BigInt(TIMEOUT_SLOTS);
|
|
7469
|
+
for (; ; ) {
|
|
7470
|
+
const signatures = await rpc.getSignaturesForAddress(computationAccount, {
|
|
7471
|
+
limit,
|
|
7472
|
+
commitment
|
|
7473
|
+
}).send();
|
|
7474
|
+
for (const sigInfo of signatures) {
|
|
7475
|
+
if (sigInfo.signature === invocationSignature) continue;
|
|
7476
|
+
if (sigInfo.err === null) {
|
|
7477
|
+
return sigInfo.signature;
|
|
7478
|
+
}
|
|
7479
|
+
}
|
|
7480
|
+
const currentSlot = await rpc.getSlot({ commitment }).send();
|
|
7481
|
+
if (currentSlot > deadlineSlot) {
|
|
7482
|
+
throw new Error(
|
|
7483
|
+
`Computation ${computationAccount} not finalized within ${TIMEOUT_SLOTS} slots of invocation ${invocationSignature}`
|
|
7484
|
+
);
|
|
7485
|
+
}
|
|
7486
|
+
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
7487
|
+
}
|
|
7488
|
+
};
|
|
7489
|
+
|
|
7686
7490
|
// src/instructions/stake.ts
|
|
7687
7491
|
async function stake(input, config) {
|
|
7688
7492
|
const {
|
|
@@ -7723,6 +7527,10 @@ async function stake(input, config) {
|
|
|
7723
7527
|
programAddress ? { programAddress } : void 0
|
|
7724
7528
|
);
|
|
7725
7529
|
}
|
|
7530
|
+
async function awaitStakeFinalization(rpc, txSignature, config, options) {
|
|
7531
|
+
const { computationAccount } = getComputeAccounts("stake", config);
|
|
7532
|
+
return awaitComputationFinalization(rpc, computationAccount, txSignature, options);
|
|
7533
|
+
}
|
|
7726
7534
|
|
|
7727
7535
|
// src/instructions/revealStake.ts
|
|
7728
7536
|
async function revealStake(input, config) {
|
|
@@ -7738,6 +7546,10 @@ async function revealStake(input, config) {
|
|
|
7738
7546
|
programAddress ? { programAddress } : void 0
|
|
7739
7547
|
);
|
|
7740
7548
|
}
|
|
7549
|
+
async function awaitRevealStakeFinalization(rpc, txSignature, config, options) {
|
|
7550
|
+
const { computationAccount } = getComputeAccounts("reveal_stake", config);
|
|
7551
|
+
return awaitComputationFinalization(rpc, computationAccount, txSignature, options);
|
|
7552
|
+
}
|
|
7741
7553
|
|
|
7742
7554
|
// src/instructions/addMarketOption.ts
|
|
7743
7555
|
async function addMarketOption(input) {
|
|
@@ -7757,24 +7569,6 @@ function openMarket(input) {
|
|
|
7757
7569
|
);
|
|
7758
7570
|
}
|
|
7759
7571
|
|
|
7760
|
-
// src/instructions/pauseStaking.ts
|
|
7761
|
-
function pauseStaking(input) {
|
|
7762
|
-
const { programAddress, ...params } = input;
|
|
7763
|
-
return getPauseStakingInstruction(
|
|
7764
|
-
params,
|
|
7765
|
-
programAddress ? { programAddress } : void 0
|
|
7766
|
-
);
|
|
7767
|
-
}
|
|
7768
|
-
|
|
7769
|
-
// src/instructions/resumeStaking.ts
|
|
7770
|
-
function resumeStaking(input) {
|
|
7771
|
-
const { programAddress, ...params } = input;
|
|
7772
|
-
return getResumeStakingInstruction(
|
|
7773
|
-
params,
|
|
7774
|
-
programAddress ? { programAddress } : void 0
|
|
7775
|
-
);
|
|
7776
|
-
}
|
|
7777
|
-
|
|
7778
7572
|
// src/instructions/setWinningOption.ts
|
|
7779
7573
|
async function setWinningOption(input) {
|
|
7780
7574
|
const { programAddress, ...params } = input;
|
|
@@ -7876,7 +7670,7 @@ async function finalizeRevealStake(input) {
|
|
|
7876
7670
|
|
|
7877
7671
|
// src/accounts/platformConfig.ts
|
|
7878
7672
|
import {
|
|
7879
|
-
getAddressEncoder as
|
|
7673
|
+
getAddressEncoder as getAddressEncoder49,
|
|
7880
7674
|
getProgramDerivedAddress as getProgramDerivedAddress18,
|
|
7881
7675
|
getUtf8Encoder as getUtf8Encoder4
|
|
7882
7676
|
} from "@solana/kit";
|
|
@@ -7886,7 +7680,7 @@ async function getPlatformConfigAddress(authority, name, programId = OPPORTUNITY
|
|
|
7886
7680
|
programAddress: programId,
|
|
7887
7681
|
seeds: [
|
|
7888
7682
|
PLATFORM_CONFIG_SEED,
|
|
7889
|
-
|
|
7683
|
+
getAddressEncoder49().encode(authority),
|
|
7890
7684
|
getUtf8Encoder4().encode(name)
|
|
7891
7685
|
]
|
|
7892
7686
|
});
|
|
@@ -7902,9 +7696,9 @@ async function createPlatformConfig(rpc, params) {
|
|
|
7902
7696
|
rewardPoolFeeBp,
|
|
7903
7697
|
creatorFeeBp,
|
|
7904
7698
|
feeClaimAuthority,
|
|
7699
|
+
revealAuthority,
|
|
7905
7700
|
minTimeToStakeSeconds,
|
|
7906
|
-
|
|
7907
|
-
maxRevealPeriodSeconds,
|
|
7701
|
+
revealPeriodSeconds,
|
|
7908
7702
|
marketResolutionDeadlineSeconds
|
|
7909
7703
|
} = params;
|
|
7910
7704
|
const [platformConfigAddress] = await getPlatformConfigAddress(
|
|
@@ -7926,9 +7720,9 @@ async function createPlatformConfig(rpc, params) {
|
|
|
7926
7720
|
rewardPoolFeeBp,
|
|
7927
7721
|
creatorFeeBp,
|
|
7928
7722
|
feeClaimAuthority,
|
|
7723
|
+
revealAuthority,
|
|
7929
7724
|
minTimeToStakeSeconds,
|
|
7930
|
-
|
|
7931
|
-
maxRevealPeriodSeconds,
|
|
7725
|
+
revealPeriodSeconds,
|
|
7932
7726
|
marketResolutionDeadlineSeconds
|
|
7933
7727
|
},
|
|
7934
7728
|
programAddress ? { programAddress } : void 0
|
|
@@ -7944,9 +7738,9 @@ async function updatePlatformConfig(rpc, params) {
|
|
|
7944
7738
|
platformFeeBp,
|
|
7945
7739
|
rewardPoolFeeBp,
|
|
7946
7740
|
creatorFeeBp,
|
|
7741
|
+
revealAuthority,
|
|
7947
7742
|
minTimeToStakeSeconds,
|
|
7948
|
-
|
|
7949
|
-
maxRevealPeriodSeconds,
|
|
7743
|
+
revealPeriodSeconds,
|
|
7950
7744
|
marketResolutionDeadlineSeconds
|
|
7951
7745
|
} = params;
|
|
7952
7746
|
const [platformConfigAddress] = await getPlatformConfigAddress(
|
|
@@ -7967,9 +7761,9 @@ async function updatePlatformConfig(rpc, params) {
|
|
|
7967
7761
|
platformFeeBp,
|
|
7968
7762
|
rewardPoolFeeBp,
|
|
7969
7763
|
creatorFeeBp,
|
|
7764
|
+
revealAuthority,
|
|
7970
7765
|
minTimeToStakeSeconds,
|
|
7971
|
-
|
|
7972
|
-
maxRevealPeriodSeconds,
|
|
7766
|
+
revealPeriodSeconds,
|
|
7973
7767
|
marketResolutionDeadlineSeconds
|
|
7974
7768
|
},
|
|
7975
7769
|
programAddress ? { programAddress } : void 0
|
|
@@ -8023,12 +7817,12 @@ function setFeeClaimAuthority(input) {
|
|
|
8023
7817
|
|
|
8024
7818
|
// src/accounts/allowedMint.ts
|
|
8025
7819
|
import {
|
|
8026
|
-
getAddressEncoder as
|
|
7820
|
+
getAddressEncoder as getAddressEncoder50,
|
|
8027
7821
|
getProgramDerivedAddress as getProgramDerivedAddress19
|
|
8028
7822
|
} from "@solana/kit";
|
|
8029
7823
|
var ALLOWED_MINT_SEED = "allowed_mint";
|
|
8030
7824
|
async function getAllowedMintAddress(platformConfig, mint, programId = OPPORTUNITY_MARKET_PROGRAM_ADDRESS) {
|
|
8031
|
-
const enc =
|
|
7825
|
+
const enc = getAddressEncoder50();
|
|
8032
7826
|
return getProgramDerivedAddress19({
|
|
8033
7827
|
programAddress: programId,
|
|
8034
7828
|
seeds: [ALLOWED_MINT_SEED, enc.encode(platformConfig), enc.encode(mint)]
|
|
@@ -8037,7 +7831,7 @@ async function getAllowedMintAddress(platformConfig, mint, programId = OPPORTUNI
|
|
|
8037
7831
|
|
|
8038
7832
|
// src/accounts/opportunityMarket.ts
|
|
8039
7833
|
import {
|
|
8040
|
-
getAddressEncoder as
|
|
7834
|
+
getAddressEncoder as getAddressEncoder51,
|
|
8041
7835
|
getU64Encoder as getU64Encoder41,
|
|
8042
7836
|
getProgramDerivedAddress as getProgramDerivedAddress20
|
|
8043
7837
|
} from "@solana/kit";
|
|
@@ -8047,8 +7841,8 @@ async function getOpportunityMarketAddress(platformConfig, creator, marketIndex,
|
|
|
8047
7841
|
programAddress: programId,
|
|
8048
7842
|
seeds: [
|
|
8049
7843
|
OPPORTUNITY_MARKET_SEED,
|
|
8050
|
-
|
|
8051
|
-
|
|
7844
|
+
getAddressEncoder51().encode(platformConfig),
|
|
7845
|
+
getAddressEncoder51().encode(creator),
|
|
8052
7846
|
getU64Encoder41().encode(BigInt(marketIndex))
|
|
8053
7847
|
]
|
|
8054
7848
|
});
|
|
@@ -8056,7 +7850,7 @@ async function getOpportunityMarketAddress(platformConfig, creator, marketIndex,
|
|
|
8056
7850
|
|
|
8057
7851
|
// src/accounts/opportunityMarketOption.ts
|
|
8058
7852
|
import {
|
|
8059
|
-
getAddressEncoder as
|
|
7853
|
+
getAddressEncoder as getAddressEncoder52,
|
|
8060
7854
|
getU64Encoder as getU64Encoder42,
|
|
8061
7855
|
getProgramDerivedAddress as getProgramDerivedAddress21
|
|
8062
7856
|
} from "@solana/kit";
|
|
@@ -8066,7 +7860,7 @@ async function getOpportunityMarketOptionAddress(market, optionId, programId = O
|
|
|
8066
7860
|
programAddress: programId,
|
|
8067
7861
|
seeds: [
|
|
8068
7862
|
OPPORTUNITY_MARKET_OPTION_SEED,
|
|
8069
|
-
|
|
7863
|
+
getAddressEncoder52().encode(market),
|
|
8070
7864
|
getU64Encoder42().encode(optionId)
|
|
8071
7865
|
]
|
|
8072
7866
|
});
|
|
@@ -8074,12 +7868,12 @@ async function getOpportunityMarketOptionAddress(market, optionId, programId = O
|
|
|
8074
7868
|
|
|
8075
7869
|
// src/accounts/opportunityMarketSponsor.ts
|
|
8076
7870
|
import {
|
|
8077
|
-
getAddressEncoder as
|
|
7871
|
+
getAddressEncoder as getAddressEncoder53,
|
|
8078
7872
|
getProgramDerivedAddress as getProgramDerivedAddress22
|
|
8079
7873
|
} from "@solana/kit";
|
|
8080
7874
|
var SPONSOR_SEED = "sponsor";
|
|
8081
7875
|
async function getOpportunityMarketSponsorAddress(sponsor, market, programId = OPPORTUNITY_MARKET_PROGRAM_ADDRESS) {
|
|
8082
|
-
const addressEncoder =
|
|
7876
|
+
const addressEncoder = getAddressEncoder53();
|
|
8083
7877
|
return getProgramDerivedAddress22({
|
|
8084
7878
|
programAddress: programId,
|
|
8085
7879
|
seeds: [
|
|
@@ -8092,12 +7886,12 @@ async function getOpportunityMarketSponsorAddress(sponsor, market, programId = O
|
|
|
8092
7886
|
|
|
8093
7887
|
// src/accounts/stakeAccount.ts
|
|
8094
7888
|
import {
|
|
8095
|
-
getAddressEncoder as
|
|
7889
|
+
getAddressEncoder as getAddressEncoder54,
|
|
8096
7890
|
getProgramDerivedAddress as getProgramDerivedAddress23
|
|
8097
7891
|
} from "@solana/kit";
|
|
8098
7892
|
var STAKE_ACCOUNT_SEED = "stake_account";
|
|
8099
7893
|
async function getStakeAccountAddress(owner, market, stakeAccountId, programId = OPPORTUNITY_MARKET_PROGRAM_ADDRESS) {
|
|
8100
|
-
const addressEncoder =
|
|
7894
|
+
const addressEncoder = getAddressEncoder54();
|
|
8101
7895
|
const idBytes = new Uint8Array(4);
|
|
8102
7896
|
new DataView(idBytes.buffer).setUint32(0, stakeAccountId, true);
|
|
8103
7897
|
return getProgramDerivedAddress23({
|
|
@@ -8111,115 +7905,6 @@ async function getStakeAccountAddress(owner, market, stakeAccountId, programId =
|
|
|
8111
7905
|
});
|
|
8112
7906
|
}
|
|
8113
7907
|
|
|
8114
|
-
// src/arcium/awaitFinalizeComputation.ts
|
|
8115
|
-
import { getAddressEncoder as getAddressEncoder56 } from "@solana/kit";
|
|
8116
|
-
|
|
8117
|
-
// src/arcium/constants.ts
|
|
8118
|
-
var ARCIUM_PROGRAM_ID = "Arcj82pX7HxYKLR92qvgZUAd7vGS1k4hQvAFcPATFdEQ";
|
|
8119
|
-
|
|
8120
|
-
// src/arcium/awaitFinalizeComputation.ts
|
|
8121
|
-
var FINALIZE_COMPUTATION_EVENT_DISCRIMINATOR = new Uint8Array([27, 75, 117, 221, 191, 213, 253, 249]);
|
|
8122
|
-
function serializeLE(val, lengthInBytes) {
|
|
8123
|
-
const result = new Uint8Array(lengthInBytes);
|
|
8124
|
-
let tempVal = val;
|
|
8125
|
-
for (let i = 0; i < lengthInBytes; i++) {
|
|
8126
|
-
result[i] = Number(tempVal & BigInt(255));
|
|
8127
|
-
tempVal >>= BigInt(8);
|
|
8128
|
-
}
|
|
8129
|
-
return result;
|
|
8130
|
-
}
|
|
8131
|
-
function bytesEqual(a, b) {
|
|
8132
|
-
if (a.length !== b.length) return false;
|
|
8133
|
-
for (let i = 0; i < a.length; i++) {
|
|
8134
|
-
if (a[i] !== b[i]) return false;
|
|
8135
|
-
}
|
|
8136
|
-
return true;
|
|
8137
|
-
}
|
|
8138
|
-
var awaitBatchComputationFinalization = async (rpc, computationOffsets, options) => {
|
|
8139
|
-
if (computationOffsets.length === 0) {
|
|
8140
|
-
return /* @__PURE__ */ new Map();
|
|
8141
|
-
}
|
|
8142
|
-
const mxeProgramId = options?.mxeProgramId ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
8143
|
-
const commitment = options?.commitment ?? "confirmed";
|
|
8144
|
-
const mxeProgramIdBytes = getAddressEncoder56().encode(mxeProgramId);
|
|
8145
|
-
const transactionCountLimit = options?.transactionCountLimit ?? 100;
|
|
8146
|
-
const pollInterval = options?.pollInterval ?? 1e3;
|
|
8147
|
-
const maxAttempts = options?.maxAttempts ?? 120;
|
|
8148
|
-
const offsetBytesMap = /* @__PURE__ */ new Map();
|
|
8149
|
-
for (const offset of computationOffsets) {
|
|
8150
|
-
offsetBytesMap.set(offset, serializeLE(offset, 8));
|
|
8151
|
-
}
|
|
8152
|
-
const foundResults = /* @__PURE__ */ new Map();
|
|
8153
|
-
const remainingOffsets = new Set(computationOffsets);
|
|
8154
|
-
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
8155
|
-
try {
|
|
8156
|
-
const signatures = await rpc.getSignaturesForAddress(
|
|
8157
|
-
ARCIUM_PROGRAM_ID,
|
|
8158
|
-
{ limit: transactionCountLimit }
|
|
8159
|
-
).send();
|
|
8160
|
-
for (const sigInfo of signatures) {
|
|
8161
|
-
const tx = await rpc.getTransaction(sigInfo.signature, {
|
|
8162
|
-
commitment,
|
|
8163
|
-
encoding: "json",
|
|
8164
|
-
maxSupportedTransactionVersion: 0
|
|
8165
|
-
}).send();
|
|
8166
|
-
if (!tx) continue;
|
|
8167
|
-
const logs = tx.meta?.logMessages || [];
|
|
8168
|
-
for (const log of logs) {
|
|
8169
|
-
if (log.includes("Program data:")) {
|
|
8170
|
-
const base64Data = log.split("Program data: ")[1];
|
|
8171
|
-
if (!base64Data) continue;
|
|
8172
|
-
try {
|
|
8173
|
-
const eventData = Uint8Array.from(atob(base64Data), (c) => c.charCodeAt(0));
|
|
8174
|
-
if (eventData.length >= 48 && bytesEqual(eventData.subarray(0, 8), FINALIZE_COMPUTATION_EVENT_DISCRIMINATOR)) {
|
|
8175
|
-
const eventOffsetBytes = eventData.subarray(8, 16);
|
|
8176
|
-
const eventMxeProgramId = eventData.subarray(16, 48);
|
|
8177
|
-
if (!bytesEqual(eventMxeProgramId, mxeProgramIdBytes)) continue;
|
|
8178
|
-
for (const offset of remainingOffsets) {
|
|
8179
|
-
const expectedBytes = offsetBytesMap.get(offset);
|
|
8180
|
-
if (bytesEqual(eventOffsetBytes, expectedBytes)) {
|
|
8181
|
-
const txError = tx.meta?.err;
|
|
8182
|
-
let errorMessage;
|
|
8183
|
-
if (txError) {
|
|
8184
|
-
const errorLog = logs.find((l) => l.includes("Error") || l.includes("failed"));
|
|
8185
|
-
errorMessage = errorLog || JSON.stringify(txError);
|
|
8186
|
-
}
|
|
8187
|
-
foundResults.set(offset, {
|
|
8188
|
-
signature: sigInfo.signature,
|
|
8189
|
-
error: errorMessage
|
|
8190
|
-
});
|
|
8191
|
-
remainingOffsets.delete(offset);
|
|
8192
|
-
break;
|
|
8193
|
-
}
|
|
8194
|
-
}
|
|
8195
|
-
}
|
|
8196
|
-
} catch {
|
|
8197
|
-
continue;
|
|
8198
|
-
}
|
|
8199
|
-
}
|
|
8200
|
-
}
|
|
8201
|
-
if (remainingOffsets.size === 0) {
|
|
8202
|
-
return foundResults;
|
|
8203
|
-
}
|
|
8204
|
-
}
|
|
8205
|
-
if (remainingOffsets.size === 0) {
|
|
8206
|
-
return foundResults;
|
|
8207
|
-
}
|
|
8208
|
-
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
8209
|
-
} catch (error) {
|
|
8210
|
-
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
8211
|
-
}
|
|
8212
|
-
}
|
|
8213
|
-
const missingOffsets = Array.from(remainingOffsets).join(", ");
|
|
8214
|
-
throw new Error(
|
|
8215
|
-
`Computation finalization timed out after ${maxAttempts} attempts. Missing offsets: ${missingOffsets}`
|
|
8216
|
-
);
|
|
8217
|
-
};
|
|
8218
|
-
var awaitComputationFinalization = async (rpc, computationOffset, options) => {
|
|
8219
|
-
const results = await awaitBatchComputationFinalization(rpc, [computationOffset], options);
|
|
8220
|
-
return results.get(computationOffset);
|
|
8221
|
-
};
|
|
8222
|
-
|
|
8223
7908
|
// src/x25519/keypair.ts
|
|
8224
7909
|
import { RescueCipher, x25519 } from "@arcium-hq/client";
|
|
8225
7910
|
import { BN as BN3 } from "bn.js";
|
|
@@ -8283,11 +7968,10 @@ export {
|
|
|
8283
7968
|
OPPORTUNITY_MARKET_ERROR__LOCKED,
|
|
8284
7969
|
OPPORTUNITY_MARKET_ERROR__MARKET_ALREADY_OPEN,
|
|
8285
7970
|
OPPORTUNITY_MARKET_ERROR__MARKET_NOT_OPEN,
|
|
8286
|
-
OPPORTUNITY_MARKET_ERROR__MARKET_NOT_PAUSED,
|
|
8287
7971
|
OPPORTUNITY_MARKET_ERROR__MARKET_NOT_RESOLVED,
|
|
8288
|
-
OPPORTUNITY_MARKET_ERROR__MARKET_PAUSED,
|
|
8289
7972
|
OPPORTUNITY_MARKET_ERROR__NOT_REVEALED,
|
|
8290
7973
|
OPPORTUNITY_MARKET_ERROR__NO_FEES_TO_CLAIM,
|
|
7974
|
+
OPPORTUNITY_MARKET_ERROR__NO_FINALIZED_WINNING_OPTION,
|
|
8291
7975
|
OPPORTUNITY_MARKET_ERROR__NO_REWARD_TO_CLAIM,
|
|
8292
7976
|
OPPORTUNITY_MARKET_ERROR__NO_STAKE,
|
|
8293
7977
|
OPPORTUNITY_MARKET_ERROR__OPTION_STILL_NEEDED,
|
|
@@ -8310,12 +7994,10 @@ export {
|
|
|
8310
7994
|
OpportunityMarketAccount,
|
|
8311
7995
|
OpportunityMarketInstruction,
|
|
8312
7996
|
Output,
|
|
8313
|
-
PAUSE_STAKING_DISCRIMINATOR,
|
|
8314
7997
|
PLATFORM_CONFIG_DISCRIMINATOR,
|
|
8315
7998
|
PLATFORM_CONFIG_SEED,
|
|
8316
7999
|
Parameter,
|
|
8317
8000
|
RESOLVE_MARKET_DISCRIMINATOR,
|
|
8318
|
-
RESUME_STAKING_DISCRIMINATOR,
|
|
8319
8001
|
REVEAL_STAKE_CALLBACK_DISCRIMINATOR,
|
|
8320
8002
|
REVEAL_STAKE_COMP_DEF_DISCRIMINATOR,
|
|
8321
8003
|
REVEAL_STAKE_DISCRIMINATOR,
|
|
@@ -8333,8 +8015,9 @@ export {
|
|
|
8333
8015
|
WITHDRAW_REWARD_DISCRIMINATOR,
|
|
8334
8016
|
addMarketOption,
|
|
8335
8017
|
addReward,
|
|
8336
|
-
awaitBatchComputationFinalization,
|
|
8337
8018
|
awaitComputationFinalization,
|
|
8019
|
+
awaitRevealStakeFinalization,
|
|
8020
|
+
awaitStakeFinalization,
|
|
8338
8021
|
circuitSource,
|
|
8339
8022
|
claimCreatorFees,
|
|
8340
8023
|
claimFees,
|
|
@@ -8585,11 +8268,6 @@ export {
|
|
|
8585
8268
|
getParameterCodec,
|
|
8586
8269
|
getParameterDecoder,
|
|
8587
8270
|
getParameterEncoder,
|
|
8588
|
-
getPauseStakingDiscriminatorBytes,
|
|
8589
|
-
getPauseStakingInstruction,
|
|
8590
|
-
getPauseStakingInstructionDataCodec,
|
|
8591
|
-
getPauseStakingInstructionDataDecoder,
|
|
8592
|
-
getPauseStakingInstructionDataEncoder,
|
|
8593
8271
|
getPlatformConfigAddress,
|
|
8594
8272
|
getPlatformConfigCodec,
|
|
8595
8273
|
getPlatformConfigDecoder,
|
|
@@ -8600,11 +8278,6 @@ export {
|
|
|
8600
8278
|
getResolveMarketInstructionDataCodec,
|
|
8601
8279
|
getResolveMarketInstructionDataDecoder,
|
|
8602
8280
|
getResolveMarketInstructionDataEncoder,
|
|
8603
|
-
getResumeStakingDiscriminatorBytes,
|
|
8604
|
-
getResumeStakingInstruction,
|
|
8605
|
-
getResumeStakingInstructionDataCodec,
|
|
8606
|
-
getResumeStakingInstructionDataDecoder,
|
|
8607
|
-
getResumeStakingInstructionDataEncoder,
|
|
8608
8281
|
getRevealPeriodEndedEventCodec,
|
|
8609
8282
|
getRevealPeriodEndedEventDecoder,
|
|
8610
8283
|
getRevealPeriodEndedEventEncoder,
|
|
@@ -8633,9 +8306,6 @@ export {
|
|
|
8633
8306
|
getRewardAddedEventCodec,
|
|
8634
8307
|
getRewardAddedEventDecoder,
|
|
8635
8308
|
getRewardAddedEventEncoder,
|
|
8636
|
-
getRewardClaimedEventCodec,
|
|
8637
|
-
getRewardClaimedEventDecoder,
|
|
8638
|
-
getRewardClaimedEventEncoder,
|
|
8639
8309
|
getRewardWithdrawnEventCodec,
|
|
8640
8310
|
getRewardWithdrawnEventDecoder,
|
|
8641
8311
|
getRewardWithdrawnEventEncoder,
|
|
@@ -8656,6 +8326,9 @@ export {
|
|
|
8656
8326
|
getSetWinningOptionInstructionDataDecoder,
|
|
8657
8327
|
getSetWinningOptionInstructionDataEncoder,
|
|
8658
8328
|
getStakeAccountAddress,
|
|
8329
|
+
getStakeAccountClosedEventCodec,
|
|
8330
|
+
getStakeAccountClosedEventDecoder,
|
|
8331
|
+
getStakeAccountClosedEventEncoder,
|
|
8659
8332
|
getStakeAccountCodec,
|
|
8660
8333
|
getStakeAccountDecoder,
|
|
8661
8334
|
getStakeAccountDiscriminatorBytes,
|
|
@@ -8691,12 +8364,6 @@ export {
|
|
|
8691
8364
|
getStakedEventCodec,
|
|
8692
8365
|
getStakedEventDecoder,
|
|
8693
8366
|
getStakedEventEncoder,
|
|
8694
|
-
getStakingPausedEventCodec,
|
|
8695
|
-
getStakingPausedEventDecoder,
|
|
8696
|
-
getStakingPausedEventEncoder,
|
|
8697
|
-
getStakingResumedEventCodec,
|
|
8698
|
-
getStakingResumedEventDecoder,
|
|
8699
|
-
getStakingResumedEventEncoder,
|
|
8700
8367
|
getStuckStakeClosedEventCodec,
|
|
8701
8368
|
getStuckStakeClosedEventDecoder,
|
|
8702
8369
|
getStuckStakeClosedEventEncoder,
|
|
@@ -8754,9 +8421,7 @@ export {
|
|
|
8754
8421
|
parseInitPlatformConfigInstruction,
|
|
8755
8422
|
parseInitStakeAccountInstruction,
|
|
8756
8423
|
parseOpenMarketInstruction,
|
|
8757
|
-
parsePauseStakingInstruction,
|
|
8758
8424
|
parseResolveMarketInstruction,
|
|
8759
|
-
parseResumeStakingInstruction,
|
|
8760
8425
|
parseRevealStakeCallbackInstruction,
|
|
8761
8426
|
parseRevealStakeCompDefInstruction,
|
|
8762
8427
|
parseRevealStakeInstruction,
|
|
@@ -8769,11 +8434,9 @@ export {
|
|
|
8769
8434
|
parseUnstakeInstruction,
|
|
8770
8435
|
parseUpdatePlatformConfigInstruction,
|
|
8771
8436
|
parseWithdrawRewardInstruction,
|
|
8772
|
-
pauseStaking,
|
|
8773
8437
|
randomComputationOffset,
|
|
8774
8438
|
randomStateNonce,
|
|
8775
8439
|
resolveMarket,
|
|
8776
|
-
resumeStaking,
|
|
8777
8440
|
revealStake,
|
|
8778
8441
|
setFeeClaimAuthority,
|
|
8779
8442
|
setUpdateAuthority,
|