@bench.games/opportunity-markets 0.3.1 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.js +1277 -1286
- package/dist/index.cjs +1376 -1376
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +302 -284
- package/dist/index.d.ts +302 -284
- package/dist/index.js +1277 -1286
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/browser/index.js
CHANGED
|
@@ -176,28 +176,28 @@ 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 combineCodec51,
|
|
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 getAddressDecoder27,
|
|
186
|
+
getAddressEncoder as getAddressEncoder27,
|
|
187
187
|
getArrayDecoder as getArrayDecoder12,
|
|
188
188
|
getArrayEncoder as getArrayEncoder12,
|
|
189
|
-
getBooleanDecoder as
|
|
190
|
-
getBooleanEncoder as
|
|
189
|
+
getBooleanDecoder as getBooleanDecoder4,
|
|
190
|
+
getBooleanEncoder as getBooleanEncoder4,
|
|
191
191
|
getBytesDecoder as getBytesDecoder3,
|
|
192
192
|
getBytesEncoder as getBytesEncoder3,
|
|
193
|
-
getOptionDecoder as
|
|
194
|
-
getOptionEncoder as
|
|
195
|
-
getStructDecoder as
|
|
196
|
-
getStructEncoder as
|
|
193
|
+
getOptionDecoder as getOptionDecoder5,
|
|
194
|
+
getOptionEncoder as getOptionEncoder5,
|
|
195
|
+
getStructDecoder as getStructDecoder45,
|
|
196
|
+
getStructEncoder as getStructEncoder45,
|
|
197
197
|
getU16Decoder as getU16Decoder5,
|
|
198
198
|
getU16Encoder as getU16Encoder5,
|
|
199
|
-
getU64Decoder as
|
|
200
|
-
getU64Encoder as
|
|
199
|
+
getU64Decoder as getU64Decoder25,
|
|
200
|
+
getU64Encoder as getU64Encoder25,
|
|
201
201
|
getU8Decoder as getU8Decoder16,
|
|
202
202
|
getU8Encoder as getU8Encoder16,
|
|
203
203
|
transformEncoder as transformEncoder3
|
|
@@ -805,8 +805,6 @@ import {
|
|
|
805
805
|
getAddressEncoder as getAddressEncoder7,
|
|
806
806
|
getArrayDecoder as getArrayDecoder5,
|
|
807
807
|
getArrayEncoder as getArrayEncoder5,
|
|
808
|
-
getBooleanDecoder as getBooleanDecoder2,
|
|
809
|
-
getBooleanEncoder as getBooleanEncoder2,
|
|
810
808
|
getI64Decoder as getI64Decoder5,
|
|
811
809
|
getI64Encoder as getI64Encoder5,
|
|
812
810
|
getStructDecoder as getStructDecoder17,
|
|
@@ -829,13 +827,11 @@ function getMarketCreatedEventEncoder() {
|
|
|
829
827
|
["earlinessMultiplier", getU16Encoder3()],
|
|
830
828
|
["marketAuthority", getAddressEncoder7()],
|
|
831
829
|
["authorizedReaderPubkey", getArrayEncoder5(getU8Encoder8(), { size: 32 })],
|
|
832
|
-
["allowUnstakingEarly", getBooleanEncoder2()],
|
|
833
830
|
["minStakeAmount", getU64Encoder7()],
|
|
834
831
|
["feeRates", getFeeRatesEncoder()],
|
|
835
832
|
["creatorFeeClaimer", getAddressEncoder7()],
|
|
836
833
|
["marketResolutionDeadlineSeconds", getU64Encoder7()],
|
|
837
|
-
["
|
|
838
|
-
["maxRevealPeriodSeconds", getU64Encoder7()],
|
|
834
|
+
["revealPeriodSeconds", getU64Encoder7()],
|
|
839
835
|
["timestamp", getI64Encoder5()]
|
|
840
836
|
]);
|
|
841
837
|
}
|
|
@@ -850,13 +846,11 @@ function getMarketCreatedEventDecoder() {
|
|
|
850
846
|
["earlinessMultiplier", getU16Decoder3()],
|
|
851
847
|
["marketAuthority", getAddressDecoder7()],
|
|
852
848
|
["authorizedReaderPubkey", getArrayDecoder5(getU8Decoder8(), { size: 32 })],
|
|
853
|
-
["allowUnstakingEarly", getBooleanDecoder2()],
|
|
854
849
|
["minStakeAmount", getU64Decoder7()],
|
|
855
850
|
["feeRates", getFeeRatesDecoder()],
|
|
856
851
|
["creatorFeeClaimer", getAddressDecoder7()],
|
|
857
852
|
["marketResolutionDeadlineSeconds", getU64Decoder7()],
|
|
858
|
-
["
|
|
859
|
-
["maxRevealPeriodSeconds", getU64Decoder7()],
|
|
853
|
+
["revealPeriodSeconds", getU64Decoder7()],
|
|
860
854
|
["timestamp", getI64Decoder5()]
|
|
861
855
|
]);
|
|
862
856
|
}
|
|
@@ -977,8 +971,8 @@ import {
|
|
|
977
971
|
getAddressEncoder as getAddressEncoder11,
|
|
978
972
|
getArrayDecoder as getArrayDecoder6,
|
|
979
973
|
getArrayEncoder as getArrayEncoder6,
|
|
980
|
-
getBooleanDecoder as
|
|
981
|
-
getBooleanEncoder as
|
|
974
|
+
getBooleanDecoder as getBooleanDecoder2,
|
|
975
|
+
getBooleanEncoder as getBooleanEncoder2,
|
|
982
976
|
getDiscriminatedUnionDecoder as getDiscriminatedUnionDecoder3,
|
|
983
977
|
getDiscriminatedUnionEncoder as getDiscriminatedUnionEncoder3,
|
|
984
978
|
getOptionDecoder as getOptionDecoder3,
|
|
@@ -1018,7 +1012,7 @@ function getMXEAccountEncoder() {
|
|
|
1018
1012
|
"fields",
|
|
1019
1013
|
getTupleEncoder5([
|
|
1020
1014
|
getUtilityPubkeysEncoder(),
|
|
1021
|
-
getArrayEncoder6(
|
|
1015
|
+
getArrayEncoder6(getBooleanEncoder2())
|
|
1022
1016
|
])
|
|
1023
1017
|
]
|
|
1024
1018
|
])
|
|
@@ -1055,7 +1049,7 @@ function getMXEAccountDecoder() {
|
|
|
1055
1049
|
"fields",
|
|
1056
1050
|
getTupleDecoder5([
|
|
1057
1051
|
getUtilityPubkeysDecoder(),
|
|
1058
|
-
getArrayDecoder6(
|
|
1052
|
+
getArrayDecoder6(getBooleanDecoder2())
|
|
1059
1053
|
])
|
|
1060
1054
|
]
|
|
1061
1055
|
])
|
|
@@ -1191,20 +1185,20 @@ import {
|
|
|
1191
1185
|
combineCodec as combineCodec29,
|
|
1192
1186
|
getAddressDecoder as getAddressDecoder12,
|
|
1193
1187
|
getAddressEncoder as getAddressEncoder12,
|
|
1194
|
-
getBooleanDecoder as
|
|
1195
|
-
getBooleanEncoder as
|
|
1188
|
+
getBooleanDecoder as getBooleanDecoder3,
|
|
1189
|
+
getBooleanEncoder as getBooleanEncoder3,
|
|
1196
1190
|
getStructDecoder as getStructDecoder25,
|
|
1197
1191
|
getStructEncoder as getStructEncoder25
|
|
1198
1192
|
} from "@solana/kit";
|
|
1199
1193
|
function getOnChainCircuitSourceEncoder() {
|
|
1200
1194
|
return getStructEncoder25([
|
|
1201
|
-
["isCompleted",
|
|
1195
|
+
["isCompleted", getBooleanEncoder3()],
|
|
1202
1196
|
["uploadAuth", getAddressEncoder12()]
|
|
1203
1197
|
]);
|
|
1204
1198
|
}
|
|
1205
1199
|
function getOnChainCircuitSourceDecoder() {
|
|
1206
1200
|
return getStructDecoder25([
|
|
1207
|
-
["isCompleted",
|
|
1201
|
+
["isCompleted", getBooleanDecoder3()],
|
|
1208
1202
|
["uploadAuth", getAddressDecoder12()]
|
|
1209
1203
|
]);
|
|
1210
1204
|
}
|
|
@@ -1431,8 +1425,6 @@ import {
|
|
|
1431
1425
|
combineCodec as combineCodec36,
|
|
1432
1426
|
getAddressDecoder as getAddressDecoder16,
|
|
1433
1427
|
getAddressEncoder as getAddressEncoder16,
|
|
1434
|
-
getBooleanDecoder as getBooleanDecoder5,
|
|
1435
|
-
getBooleanEncoder as getBooleanEncoder5,
|
|
1436
1428
|
getI64Decoder as getI64Decoder12,
|
|
1437
1429
|
getI64Encoder as getI64Encoder12,
|
|
1438
1430
|
getStructDecoder as getStructDecoder30,
|
|
@@ -1446,7 +1438,6 @@ function getRewardAddedEventEncoder() {
|
|
|
1446
1438
|
["sponsor", getAddressEncoder16()],
|
|
1447
1439
|
["amount", getU64Encoder15()],
|
|
1448
1440
|
["totalRewardAmount", getU64Encoder15()],
|
|
1449
|
-
["locked", getBooleanEncoder5()],
|
|
1450
1441
|
["timestamp", getI64Encoder12()]
|
|
1451
1442
|
]);
|
|
1452
1443
|
}
|
|
@@ -1456,7 +1447,6 @@ function getRewardAddedEventDecoder() {
|
|
|
1456
1447
|
["sponsor", getAddressDecoder16()],
|
|
1457
1448
|
["amount", getU64Decoder15()],
|
|
1458
1449
|
["totalRewardAmount", getU64Decoder15()],
|
|
1459
|
-
["locked", getBooleanDecoder5()],
|
|
1460
1450
|
["timestamp", getI64Decoder12()]
|
|
1461
1451
|
]);
|
|
1462
1452
|
}
|
|
@@ -1467,7 +1457,7 @@ function getRewardAddedEventCodec() {
|
|
|
1467
1457
|
);
|
|
1468
1458
|
}
|
|
1469
1459
|
|
|
1470
|
-
// src/generated/types/
|
|
1460
|
+
// src/generated/types/rewardsClaimedEvent.ts
|
|
1471
1461
|
import {
|
|
1472
1462
|
combineCodec as combineCodec37,
|
|
1473
1463
|
getAddressDecoder as getAddressDecoder17,
|
|
@@ -1476,35 +1466,43 @@ import {
|
|
|
1476
1466
|
getI64Encoder as getI64Encoder13,
|
|
1477
1467
|
getStructDecoder as getStructDecoder31,
|
|
1478
1468
|
getStructEncoder as getStructEncoder31,
|
|
1469
|
+
getU32Decoder as getU32Decoder7,
|
|
1470
|
+
getU32Encoder as getU32Encoder7,
|
|
1479
1471
|
getU64Decoder as getU64Decoder16,
|
|
1480
1472
|
getU64Encoder as getU64Encoder16
|
|
1481
1473
|
} from "@solana/kit";
|
|
1482
|
-
function
|
|
1474
|
+
function getRewardsClaimedEventEncoder() {
|
|
1483
1475
|
return getStructEncoder31([
|
|
1476
|
+
["owner", getAddressEncoder17()],
|
|
1484
1477
|
["market", getAddressEncoder17()],
|
|
1485
|
-
["
|
|
1478
|
+
["stakeAccount", getAddressEncoder17()],
|
|
1479
|
+
["stakeAccountId", getU32Encoder7()],
|
|
1480
|
+
["optionId", getU64Encoder16()],
|
|
1486
1481
|
["rewardAmount", getU64Encoder16()],
|
|
1487
|
-
["
|
|
1482
|
+
["score", getU64Encoder16()],
|
|
1488
1483
|
["timestamp", getI64Encoder13()]
|
|
1489
1484
|
]);
|
|
1490
1485
|
}
|
|
1491
|
-
function
|
|
1486
|
+
function getRewardsClaimedEventDecoder() {
|
|
1492
1487
|
return getStructDecoder31([
|
|
1488
|
+
["owner", getAddressDecoder17()],
|
|
1493
1489
|
["market", getAddressDecoder17()],
|
|
1494
|
-
["
|
|
1490
|
+
["stakeAccount", getAddressDecoder17()],
|
|
1491
|
+
["stakeAccountId", getU32Decoder7()],
|
|
1492
|
+
["optionId", getU64Decoder16()],
|
|
1495
1493
|
["rewardAmount", getU64Decoder16()],
|
|
1496
|
-
["
|
|
1494
|
+
["score", getU64Decoder16()],
|
|
1497
1495
|
["timestamp", getI64Decoder13()]
|
|
1498
1496
|
]);
|
|
1499
1497
|
}
|
|
1500
|
-
function
|
|
1498
|
+
function getRewardsClaimedEventCodec() {
|
|
1501
1499
|
return combineCodec37(
|
|
1502
|
-
|
|
1503
|
-
|
|
1500
|
+
getRewardsClaimedEventEncoder(),
|
|
1501
|
+
getRewardsClaimedEventDecoder()
|
|
1504
1502
|
);
|
|
1505
1503
|
}
|
|
1506
1504
|
|
|
1507
|
-
// src/generated/types/
|
|
1505
|
+
// src/generated/types/rewardWithdrawnEvent.ts
|
|
1508
1506
|
import {
|
|
1509
1507
|
combineCodec as combineCodec38,
|
|
1510
1508
|
getAddressDecoder as getAddressDecoder18,
|
|
@@ -1513,111 +1511,150 @@ import {
|
|
|
1513
1511
|
getI64Encoder as getI64Encoder14,
|
|
1514
1512
|
getStructDecoder as getStructDecoder32,
|
|
1515
1513
|
getStructEncoder as getStructEncoder32,
|
|
1516
|
-
getU32Decoder as getU32Decoder7,
|
|
1517
|
-
getU32Encoder as getU32Encoder7,
|
|
1518
1514
|
getU64Decoder as getU64Decoder17,
|
|
1519
1515
|
getU64Encoder as getU64Encoder17
|
|
1520
1516
|
} from "@solana/kit";
|
|
1521
|
-
function
|
|
1517
|
+
function getRewardWithdrawnEventEncoder() {
|
|
1522
1518
|
return getStructEncoder32([
|
|
1523
|
-
["owner", getAddressEncoder18()],
|
|
1524
1519
|
["market", getAddressEncoder18()],
|
|
1525
|
-
["
|
|
1526
|
-
["stakeAccountId", getU32Encoder7()],
|
|
1527
|
-
["optionId", getU64Encoder17()],
|
|
1520
|
+
["sponsor", getAddressEncoder18()],
|
|
1528
1521
|
["rewardAmount", getU64Encoder17()],
|
|
1529
|
-
["
|
|
1530
|
-
["stakeEndTimestamp", getU64Encoder17()],
|
|
1531
|
-
["stakeAmount", getU64Encoder17()],
|
|
1532
|
-
["score", getU64Encoder17()],
|
|
1522
|
+
["refundTokenAccount", getAddressEncoder18()],
|
|
1533
1523
|
["timestamp", getI64Encoder14()]
|
|
1534
1524
|
]);
|
|
1535
1525
|
}
|
|
1536
|
-
function
|
|
1526
|
+
function getRewardWithdrawnEventDecoder() {
|
|
1537
1527
|
return getStructDecoder32([
|
|
1538
|
-
["owner", getAddressDecoder18()],
|
|
1539
1528
|
["market", getAddressDecoder18()],
|
|
1540
|
-
["
|
|
1541
|
-
["stakeAccountId", getU32Decoder7()],
|
|
1542
|
-
["optionId", getU64Decoder17()],
|
|
1529
|
+
["sponsor", getAddressDecoder18()],
|
|
1543
1530
|
["rewardAmount", getU64Decoder17()],
|
|
1544
|
-
["
|
|
1545
|
-
["stakeEndTimestamp", getU64Decoder17()],
|
|
1546
|
-
["stakeAmount", getU64Decoder17()],
|
|
1547
|
-
["score", getU64Decoder17()],
|
|
1531
|
+
["refundTokenAccount", getAddressDecoder18()],
|
|
1548
1532
|
["timestamp", getI64Decoder14()]
|
|
1549
1533
|
]);
|
|
1550
1534
|
}
|
|
1551
|
-
function
|
|
1535
|
+
function getRewardWithdrawnEventCodec() {
|
|
1552
1536
|
return combineCodec38(
|
|
1553
|
-
|
|
1554
|
-
|
|
1537
|
+
getRewardWithdrawnEventEncoder(),
|
|
1538
|
+
getRewardWithdrawnEventDecoder()
|
|
1555
1539
|
);
|
|
1556
1540
|
}
|
|
1557
1541
|
|
|
1558
|
-
// src/generated/types/
|
|
1542
|
+
// src/generated/types/stakeAccountClosedEvent.ts
|
|
1559
1543
|
import {
|
|
1560
1544
|
combineCodec as combineCodec39,
|
|
1561
1545
|
getAddressDecoder as getAddressDecoder19,
|
|
1562
1546
|
getAddressEncoder as getAddressEncoder19,
|
|
1563
1547
|
getI64Decoder as getI64Decoder15,
|
|
1564
1548
|
getI64Encoder as getI64Encoder15,
|
|
1549
|
+
getOptionDecoder as getOptionDecoder4,
|
|
1550
|
+
getOptionEncoder as getOptionEncoder4,
|
|
1565
1551
|
getStructDecoder as getStructDecoder33,
|
|
1566
1552
|
getStructEncoder as getStructEncoder33,
|
|
1567
1553
|
getU32Decoder as getU32Decoder8,
|
|
1568
|
-
getU32Encoder as getU32Encoder8
|
|
1554
|
+
getU32Encoder as getU32Encoder8,
|
|
1555
|
+
getU64Decoder as getU64Decoder18,
|
|
1556
|
+
getU64Encoder as getU64Encoder18
|
|
1569
1557
|
} from "@solana/kit";
|
|
1570
|
-
function
|
|
1558
|
+
function getStakeAccountClosedEventEncoder() {
|
|
1571
1559
|
return getStructEncoder33([
|
|
1572
|
-
["stakeAccount", getAddressEncoder19()],
|
|
1573
1560
|
["owner", getAddressEncoder19()],
|
|
1574
1561
|
["market", getAddressEncoder19()],
|
|
1575
|
-
["
|
|
1562
|
+
["stakeAccount", getAddressEncoder19()],
|
|
1563
|
+
["stakeAccountId", getU32Encoder8()],
|
|
1564
|
+
["optionId", getOptionEncoder4(getU64Encoder18())],
|
|
1565
|
+
["stakeAmount", getU64Encoder18()],
|
|
1566
|
+
["feeRefund", getU64Encoder18()],
|
|
1567
|
+
["stakedAtTimestamp", getU64Encoder18()],
|
|
1568
|
+
["stakeEndTimestamp", getU64Encoder18()],
|
|
1569
|
+
["score", getU64Encoder18()],
|
|
1576
1570
|
["timestamp", getI64Encoder15()]
|
|
1577
1571
|
]);
|
|
1578
1572
|
}
|
|
1579
|
-
function
|
|
1573
|
+
function getStakeAccountClosedEventDecoder() {
|
|
1580
1574
|
return getStructDecoder33([
|
|
1581
|
-
["stakeAccount", getAddressDecoder19()],
|
|
1582
1575
|
["owner", getAddressDecoder19()],
|
|
1583
1576
|
["market", getAddressDecoder19()],
|
|
1584
|
-
["
|
|
1577
|
+
["stakeAccount", getAddressDecoder19()],
|
|
1578
|
+
["stakeAccountId", getU32Decoder8()],
|
|
1579
|
+
["optionId", getOptionDecoder4(getU64Decoder18())],
|
|
1580
|
+
["stakeAmount", getU64Decoder18()],
|
|
1581
|
+
["feeRefund", getU64Decoder18()],
|
|
1582
|
+
["stakedAtTimestamp", getU64Decoder18()],
|
|
1583
|
+
["stakeEndTimestamp", getU64Decoder18()],
|
|
1584
|
+
["score", getU64Decoder18()],
|
|
1585
1585
|
["timestamp", getI64Decoder15()]
|
|
1586
1586
|
]);
|
|
1587
1587
|
}
|
|
1588
|
-
function
|
|
1588
|
+
function getStakeAccountClosedEventCodec() {
|
|
1589
1589
|
return combineCodec39(
|
|
1590
|
-
|
|
1591
|
-
|
|
1590
|
+
getStakeAccountClosedEventEncoder(),
|
|
1591
|
+
getStakeAccountClosedEventDecoder()
|
|
1592
1592
|
);
|
|
1593
1593
|
}
|
|
1594
1594
|
|
|
1595
|
-
// src/generated/types/
|
|
1595
|
+
// src/generated/types/stakeAccountInitializedEvent.ts
|
|
1596
1596
|
import {
|
|
1597
1597
|
combineCodec as combineCodec40,
|
|
1598
1598
|
getAddressDecoder as getAddressDecoder20,
|
|
1599
1599
|
getAddressEncoder as getAddressEncoder20,
|
|
1600
|
-
getArrayDecoder as getArrayDecoder9,
|
|
1601
|
-
getArrayEncoder as getArrayEncoder9,
|
|
1602
1600
|
getI64Decoder as getI64Decoder16,
|
|
1603
1601
|
getI64Encoder as getI64Encoder16,
|
|
1604
1602
|
getStructDecoder as getStructDecoder34,
|
|
1605
1603
|
getStructEncoder as getStructEncoder34,
|
|
1604
|
+
getU32Decoder as getU32Decoder9,
|
|
1605
|
+
getU32Encoder as getU32Encoder9
|
|
1606
|
+
} from "@solana/kit";
|
|
1607
|
+
function getStakeAccountInitializedEventEncoder() {
|
|
1608
|
+
return getStructEncoder34([
|
|
1609
|
+
["stakeAccount", getAddressEncoder20()],
|
|
1610
|
+
["owner", getAddressEncoder20()],
|
|
1611
|
+
["market", getAddressEncoder20()],
|
|
1612
|
+
["accountId", getU32Encoder9()],
|
|
1613
|
+
["timestamp", getI64Encoder16()]
|
|
1614
|
+
]);
|
|
1615
|
+
}
|
|
1616
|
+
function getStakeAccountInitializedEventDecoder() {
|
|
1617
|
+
return getStructDecoder34([
|
|
1618
|
+
["stakeAccount", getAddressDecoder20()],
|
|
1619
|
+
["owner", getAddressDecoder20()],
|
|
1620
|
+
["market", getAddressDecoder20()],
|
|
1621
|
+
["accountId", getU32Decoder9()],
|
|
1622
|
+
["timestamp", getI64Decoder16()]
|
|
1623
|
+
]);
|
|
1624
|
+
}
|
|
1625
|
+
function getStakeAccountInitializedEventCodec() {
|
|
1626
|
+
return combineCodec40(
|
|
1627
|
+
getStakeAccountInitializedEventEncoder(),
|
|
1628
|
+
getStakeAccountInitializedEventDecoder()
|
|
1629
|
+
);
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
// src/generated/types/stakedEvent.ts
|
|
1633
|
+
import {
|
|
1634
|
+
combineCodec as combineCodec41,
|
|
1635
|
+
getAddressDecoder as getAddressDecoder21,
|
|
1636
|
+
getAddressEncoder as getAddressEncoder21,
|
|
1637
|
+
getArrayDecoder as getArrayDecoder9,
|
|
1638
|
+
getArrayEncoder as getArrayEncoder9,
|
|
1639
|
+
getI64Decoder as getI64Decoder17,
|
|
1640
|
+
getI64Encoder as getI64Encoder17,
|
|
1641
|
+
getStructDecoder as getStructDecoder35,
|
|
1642
|
+
getStructEncoder as getStructEncoder35,
|
|
1606
1643
|
getU128Decoder as getU128Decoder2,
|
|
1607
1644
|
getU128Encoder as getU128Encoder2,
|
|
1608
|
-
getU32Decoder as
|
|
1609
|
-
getU32Encoder as
|
|
1610
|
-
getU64Decoder as
|
|
1611
|
-
getU64Encoder as
|
|
1645
|
+
getU32Decoder as getU32Decoder10,
|
|
1646
|
+
getU32Encoder as getU32Encoder10,
|
|
1647
|
+
getU64Decoder as getU64Decoder19,
|
|
1648
|
+
getU64Encoder as getU64Encoder19,
|
|
1612
1649
|
getU8Decoder as getU8Decoder13,
|
|
1613
1650
|
getU8Encoder as getU8Encoder13
|
|
1614
1651
|
} from "@solana/kit";
|
|
1615
1652
|
function getStakedEventEncoder() {
|
|
1616
|
-
return
|
|
1617
|
-
["user",
|
|
1618
|
-
["market",
|
|
1619
|
-
["stakeAccount",
|
|
1620
|
-
["stakeAccountId",
|
|
1653
|
+
return getStructEncoder35([
|
|
1654
|
+
["user", getAddressEncoder21()],
|
|
1655
|
+
["market", getAddressEncoder21()],
|
|
1656
|
+
["stakeAccount", getAddressEncoder21()],
|
|
1657
|
+
["stakeAccountId", getU32Encoder10()],
|
|
1621
1658
|
["stakeEncryptedOption", getArrayEncoder9(getU8Encoder13(), { size: 32 })],
|
|
1622
1659
|
["stakeStateNonce", getU128Encoder2()],
|
|
1623
1660
|
[
|
|
@@ -1625,16 +1662,16 @@ function getStakedEventEncoder() {
|
|
|
1625
1662
|
getArrayEncoder9(getU8Encoder13(), { size: 32 })
|
|
1626
1663
|
],
|
|
1627
1664
|
["stakeStateDisclosureNonce", getU128Encoder2()],
|
|
1628
|
-
["amount",
|
|
1629
|
-
["timestamp",
|
|
1665
|
+
["amount", getU64Encoder19()],
|
|
1666
|
+
["timestamp", getI64Encoder17()]
|
|
1630
1667
|
]);
|
|
1631
1668
|
}
|
|
1632
1669
|
function getStakedEventDecoder() {
|
|
1633
|
-
return
|
|
1634
|
-
["user",
|
|
1635
|
-
["market",
|
|
1636
|
-
["stakeAccount",
|
|
1637
|
-
["stakeAccountId",
|
|
1670
|
+
return getStructDecoder35([
|
|
1671
|
+
["user", getAddressDecoder21()],
|
|
1672
|
+
["market", getAddressDecoder21()],
|
|
1673
|
+
["stakeAccount", getAddressDecoder21()],
|
|
1674
|
+
["stakeAccountId", getU32Decoder10()],
|
|
1638
1675
|
["stakeEncryptedOption", getArrayDecoder9(getU8Decoder13(), { size: 32 })],
|
|
1639
1676
|
["stakeStateNonce", getU128Decoder2()],
|
|
1640
1677
|
[
|
|
@@ -1642,47 +1679,47 @@ function getStakedEventDecoder() {
|
|
|
1642
1679
|
getArrayDecoder9(getU8Decoder13(), { size: 32 })
|
|
1643
1680
|
],
|
|
1644
1681
|
["stakeStateDisclosureNonce", getU128Decoder2()],
|
|
1645
|
-
["amount",
|
|
1646
|
-
["timestamp",
|
|
1682
|
+
["amount", getU64Decoder19()],
|
|
1683
|
+
["timestamp", getI64Decoder17()]
|
|
1647
1684
|
]);
|
|
1648
1685
|
}
|
|
1649
1686
|
function getStakedEventCodec() {
|
|
1650
|
-
return
|
|
1687
|
+
return combineCodec41(getStakedEventEncoder(), getStakedEventDecoder());
|
|
1651
1688
|
}
|
|
1652
1689
|
|
|
1653
1690
|
// src/generated/types/stakeOutput.ts
|
|
1654
1691
|
import {
|
|
1655
|
-
combineCodec as
|
|
1656
|
-
getStructDecoder as
|
|
1657
|
-
getStructEncoder as
|
|
1692
|
+
combineCodec as combineCodec42,
|
|
1693
|
+
getStructDecoder as getStructDecoder36,
|
|
1694
|
+
getStructEncoder as getStructEncoder36
|
|
1658
1695
|
} from "@solana/kit";
|
|
1659
1696
|
function getStakeOutputEncoder() {
|
|
1660
|
-
return
|
|
1697
|
+
return getStructEncoder36([["field0", getStakeOutputStruct0Encoder()]]);
|
|
1661
1698
|
}
|
|
1662
1699
|
function getStakeOutputDecoder() {
|
|
1663
|
-
return
|
|
1700
|
+
return getStructDecoder36([["field0", getStakeOutputStruct0Decoder()]]);
|
|
1664
1701
|
}
|
|
1665
1702
|
function getStakeOutputCodec() {
|
|
1666
|
-
return
|
|
1703
|
+
return combineCodec42(getStakeOutputEncoder(), getStakeOutputDecoder());
|
|
1667
1704
|
}
|
|
1668
1705
|
|
|
1669
1706
|
// src/generated/types/stakeOutputStruct0.ts
|
|
1670
1707
|
import {
|
|
1671
|
-
combineCodec as
|
|
1708
|
+
combineCodec as combineCodec43,
|
|
1672
1709
|
getArrayDecoder as getArrayDecoder10,
|
|
1673
1710
|
getArrayEncoder as getArrayEncoder10,
|
|
1674
|
-
getStructDecoder as
|
|
1675
|
-
getStructEncoder as
|
|
1711
|
+
getStructDecoder as getStructDecoder37,
|
|
1712
|
+
getStructEncoder as getStructEncoder37,
|
|
1676
1713
|
getU128Decoder as getU128Decoder3,
|
|
1677
1714
|
getU128Encoder as getU128Encoder3,
|
|
1678
1715
|
getU8Decoder as getU8Decoder14,
|
|
1679
1716
|
getU8Encoder as getU8Encoder14
|
|
1680
1717
|
} from "@solana/kit";
|
|
1681
1718
|
function getStakeOutputStruct0Encoder() {
|
|
1682
|
-
return
|
|
1719
|
+
return getStructEncoder37([
|
|
1683
1720
|
[
|
|
1684
1721
|
"field0",
|
|
1685
|
-
|
|
1722
|
+
getStructEncoder37([
|
|
1686
1723
|
["encryptionKey", getArrayEncoder10(getU8Encoder14(), { size: 32 })],
|
|
1687
1724
|
["nonce", getU128Encoder3()],
|
|
1688
1725
|
[
|
|
@@ -1695,7 +1732,7 @@ function getStakeOutputStruct0Encoder() {
|
|
|
1695
1732
|
],
|
|
1696
1733
|
[
|
|
1697
1734
|
"field1",
|
|
1698
|
-
|
|
1735
|
+
getStructEncoder37([
|
|
1699
1736
|
["encryptionKey", getArrayEncoder10(getU8Encoder14(), { size: 32 })],
|
|
1700
1737
|
["nonce", getU128Encoder3()],
|
|
1701
1738
|
[
|
|
@@ -1709,10 +1746,10 @@ function getStakeOutputStruct0Encoder() {
|
|
|
1709
1746
|
]);
|
|
1710
1747
|
}
|
|
1711
1748
|
function getStakeOutputStruct0Decoder() {
|
|
1712
|
-
return
|
|
1749
|
+
return getStructDecoder37([
|
|
1713
1750
|
[
|
|
1714
1751
|
"field0",
|
|
1715
|
-
|
|
1752
|
+
getStructDecoder37([
|
|
1716
1753
|
["encryptionKey", getArrayDecoder10(getU8Decoder14(), { size: 32 })],
|
|
1717
1754
|
["nonce", getU128Decoder3()],
|
|
1718
1755
|
[
|
|
@@ -1725,7 +1762,7 @@ function getStakeOutputStruct0Decoder() {
|
|
|
1725
1762
|
],
|
|
1726
1763
|
[
|
|
1727
1764
|
"field1",
|
|
1728
|
-
|
|
1765
|
+
getStructDecoder37([
|
|
1729
1766
|
["encryptionKey", getArrayDecoder10(getU8Decoder14(), { size: 32 })],
|
|
1730
1767
|
["nonce", getU128Decoder3()],
|
|
1731
1768
|
[
|
|
@@ -1739,56 +1776,13 @@ function getStakeOutputStruct0Decoder() {
|
|
|
1739
1776
|
]);
|
|
1740
1777
|
}
|
|
1741
1778
|
function getStakeOutputStruct0Codec() {
|
|
1742
|
-
return
|
|
1779
|
+
return combineCodec43(
|
|
1743
1780
|
getStakeOutputStruct0Encoder(),
|
|
1744
1781
|
getStakeOutputStruct0Decoder()
|
|
1745
1782
|
);
|
|
1746
1783
|
}
|
|
1747
1784
|
|
|
1748
1785
|
// src/generated/types/stakeRevealedEvent.ts
|
|
1749
|
-
import {
|
|
1750
|
-
combineCodec as combineCodec43,
|
|
1751
|
-
getAddressDecoder as getAddressDecoder21,
|
|
1752
|
-
getAddressEncoder as getAddressEncoder21,
|
|
1753
|
-
getI64Decoder as getI64Decoder17,
|
|
1754
|
-
getI64Encoder as getI64Encoder17,
|
|
1755
|
-
getStructDecoder as getStructDecoder37,
|
|
1756
|
-
getStructEncoder as getStructEncoder37,
|
|
1757
|
-
getU32Decoder as getU32Decoder10,
|
|
1758
|
-
getU32Encoder as getU32Encoder10,
|
|
1759
|
-
getU64Decoder as getU64Decoder19,
|
|
1760
|
-
getU64Encoder as getU64Encoder19
|
|
1761
|
-
} from "@solana/kit";
|
|
1762
|
-
function getStakeRevealedEventEncoder() {
|
|
1763
|
-
return getStructEncoder37([
|
|
1764
|
-
["user", getAddressEncoder21()],
|
|
1765
|
-
["market", getAddressEncoder21()],
|
|
1766
|
-
["stakeAccount", getAddressEncoder21()],
|
|
1767
|
-
["stakeAccountId", getU32Encoder10()],
|
|
1768
|
-
["stakeAmount", getU64Encoder19()],
|
|
1769
|
-
["selectedOption", getU64Encoder19()],
|
|
1770
|
-
["timestamp", getI64Encoder17()]
|
|
1771
|
-
]);
|
|
1772
|
-
}
|
|
1773
|
-
function getStakeRevealedEventDecoder() {
|
|
1774
|
-
return getStructDecoder37([
|
|
1775
|
-
["user", getAddressDecoder21()],
|
|
1776
|
-
["market", getAddressDecoder21()],
|
|
1777
|
-
["stakeAccount", getAddressDecoder21()],
|
|
1778
|
-
["stakeAccountId", getU32Decoder10()],
|
|
1779
|
-
["stakeAmount", getU64Decoder19()],
|
|
1780
|
-
["selectedOption", getU64Decoder19()],
|
|
1781
|
-
["timestamp", getI64Decoder17()]
|
|
1782
|
-
]);
|
|
1783
|
-
}
|
|
1784
|
-
function getStakeRevealedEventCodec() {
|
|
1785
|
-
return combineCodec43(
|
|
1786
|
-
getStakeRevealedEventEncoder(),
|
|
1787
|
-
getStakeRevealedEventDecoder()
|
|
1788
|
-
);
|
|
1789
|
-
}
|
|
1790
|
-
|
|
1791
|
-
// src/generated/types/stakingPausedEvent.ts
|
|
1792
1786
|
import {
|
|
1793
1787
|
combineCodec as combineCodec44,
|
|
1794
1788
|
getAddressDecoder as getAddressDecoder22,
|
|
@@ -1796,28 +1790,42 @@ import {
|
|
|
1796
1790
|
getI64Decoder as getI64Decoder18,
|
|
1797
1791
|
getI64Encoder as getI64Encoder18,
|
|
1798
1792
|
getStructDecoder as getStructDecoder38,
|
|
1799
|
-
getStructEncoder as getStructEncoder38
|
|
1793
|
+
getStructEncoder as getStructEncoder38,
|
|
1794
|
+
getU32Decoder as getU32Decoder11,
|
|
1795
|
+
getU32Encoder as getU32Encoder11,
|
|
1796
|
+
getU64Decoder as getU64Decoder20,
|
|
1797
|
+
getU64Encoder as getU64Encoder20
|
|
1800
1798
|
} from "@solana/kit";
|
|
1801
|
-
function
|
|
1799
|
+
function getStakeRevealedEventEncoder() {
|
|
1802
1800
|
return getStructEncoder38([
|
|
1801
|
+
["user", getAddressEncoder22()],
|
|
1803
1802
|
["market", getAddressEncoder22()],
|
|
1803
|
+
["stakeAccount", getAddressEncoder22()],
|
|
1804
|
+
["stakeAccountId", getU32Encoder11()],
|
|
1805
|
+
["stakeAmount", getU64Encoder20()],
|
|
1806
|
+
["selectedOption", getU64Encoder20()],
|
|
1804
1807
|
["timestamp", getI64Encoder18()]
|
|
1805
1808
|
]);
|
|
1806
1809
|
}
|
|
1807
|
-
function
|
|
1810
|
+
function getStakeRevealedEventDecoder() {
|
|
1808
1811
|
return getStructDecoder38([
|
|
1812
|
+
["user", getAddressDecoder22()],
|
|
1809
1813
|
["market", getAddressDecoder22()],
|
|
1814
|
+
["stakeAccount", getAddressDecoder22()],
|
|
1815
|
+
["stakeAccountId", getU32Decoder11()],
|
|
1816
|
+
["stakeAmount", getU64Decoder20()],
|
|
1817
|
+
["selectedOption", getU64Decoder20()],
|
|
1810
1818
|
["timestamp", getI64Decoder18()]
|
|
1811
1819
|
]);
|
|
1812
1820
|
}
|
|
1813
|
-
function
|
|
1821
|
+
function getStakeRevealedEventCodec() {
|
|
1814
1822
|
return combineCodec44(
|
|
1815
|
-
|
|
1816
|
-
|
|
1823
|
+
getStakeRevealedEventEncoder(),
|
|
1824
|
+
getStakeRevealedEventDecoder()
|
|
1817
1825
|
);
|
|
1818
1826
|
}
|
|
1819
1827
|
|
|
1820
|
-
// src/generated/types/
|
|
1828
|
+
// src/generated/types/stuckStakeClosedEvent.ts
|
|
1821
1829
|
import {
|
|
1822
1830
|
combineCodec as combineCodec45,
|
|
1823
1831
|
getAddressDecoder as getAddressDecoder23,
|
|
@@ -1825,93 +1833,102 @@ import {
|
|
|
1825
1833
|
getI64Decoder as getI64Decoder19,
|
|
1826
1834
|
getI64Encoder as getI64Encoder19,
|
|
1827
1835
|
getStructDecoder as getStructDecoder39,
|
|
1828
|
-
getStructEncoder as getStructEncoder39
|
|
1836
|
+
getStructEncoder as getStructEncoder39,
|
|
1837
|
+
getU32Decoder as getU32Decoder12,
|
|
1838
|
+
getU32Encoder as getU32Encoder12,
|
|
1839
|
+
getU64Decoder as getU64Decoder21,
|
|
1840
|
+
getU64Encoder as getU64Encoder21
|
|
1829
1841
|
} from "@solana/kit";
|
|
1830
|
-
function
|
|
1842
|
+
function getStuckStakeClosedEventEncoder() {
|
|
1831
1843
|
return getStructEncoder39([
|
|
1844
|
+
["owner", getAddressEncoder23()],
|
|
1832
1845
|
["market", getAddressEncoder23()],
|
|
1846
|
+
["stakeAccount", getAddressEncoder23()],
|
|
1847
|
+
["stakeAccountId", getU32Encoder12()],
|
|
1848
|
+
["refundedAmount", getU64Encoder21()],
|
|
1849
|
+
["refundedPlatformFee", getU64Encoder21()],
|
|
1850
|
+
["refundedRewardPoolFee", getU64Encoder21()],
|
|
1851
|
+
["refundedCreatorFee", getU64Encoder21()],
|
|
1833
1852
|
["timestamp", getI64Encoder19()]
|
|
1834
1853
|
]);
|
|
1835
1854
|
}
|
|
1836
|
-
function
|
|
1855
|
+
function getStuckStakeClosedEventDecoder() {
|
|
1837
1856
|
return getStructDecoder39([
|
|
1857
|
+
["owner", getAddressDecoder23()],
|
|
1838
1858
|
["market", getAddressDecoder23()],
|
|
1859
|
+
["stakeAccount", getAddressDecoder23()],
|
|
1860
|
+
["stakeAccountId", getU32Decoder12()],
|
|
1861
|
+
["refundedAmount", getU64Decoder21()],
|
|
1862
|
+
["refundedPlatformFee", getU64Decoder21()],
|
|
1863
|
+
["refundedRewardPoolFee", getU64Decoder21()],
|
|
1864
|
+
["refundedCreatorFee", getU64Decoder21()],
|
|
1839
1865
|
["timestamp", getI64Decoder19()]
|
|
1840
1866
|
]);
|
|
1841
1867
|
}
|
|
1842
|
-
function
|
|
1868
|
+
function getStuckStakeClosedEventCodec() {
|
|
1843
1869
|
return combineCodec45(
|
|
1844
|
-
|
|
1845
|
-
|
|
1870
|
+
getStuckStakeClosedEventEncoder(),
|
|
1871
|
+
getStuckStakeClosedEventDecoder()
|
|
1846
1872
|
);
|
|
1847
1873
|
}
|
|
1848
1874
|
|
|
1849
|
-
// src/generated/types/
|
|
1875
|
+
// src/generated/types/timestamp.ts
|
|
1850
1876
|
import {
|
|
1851
1877
|
combineCodec as combineCodec46,
|
|
1878
|
+
getStructDecoder as getStructDecoder40,
|
|
1879
|
+
getStructEncoder as getStructEncoder40,
|
|
1880
|
+
getU64Decoder as getU64Decoder22,
|
|
1881
|
+
getU64Encoder as getU64Encoder22
|
|
1882
|
+
} from "@solana/kit";
|
|
1883
|
+
function getTimestampEncoder() {
|
|
1884
|
+
return getStructEncoder40([["timestamp", getU64Encoder22()]]);
|
|
1885
|
+
}
|
|
1886
|
+
function getTimestampDecoder() {
|
|
1887
|
+
return getStructDecoder40([["timestamp", getU64Decoder22()]]);
|
|
1888
|
+
}
|
|
1889
|
+
function getTimestampCodec() {
|
|
1890
|
+
return combineCodec46(getTimestampEncoder(), getTimestampDecoder());
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
// src/generated/types/unstakedEvent.ts
|
|
1894
|
+
import {
|
|
1895
|
+
combineCodec as combineCodec47,
|
|
1852
1896
|
getAddressDecoder as getAddressDecoder24,
|
|
1853
1897
|
getAddressEncoder as getAddressEncoder24,
|
|
1854
1898
|
getI64Decoder as getI64Decoder20,
|
|
1855
1899
|
getI64Encoder as getI64Encoder20,
|
|
1856
|
-
getStructDecoder as
|
|
1857
|
-
getStructEncoder as
|
|
1858
|
-
getU32Decoder as
|
|
1859
|
-
getU32Encoder as
|
|
1860
|
-
getU64Decoder as
|
|
1861
|
-
getU64Encoder as
|
|
1900
|
+
getStructDecoder as getStructDecoder41,
|
|
1901
|
+
getStructEncoder as getStructEncoder41,
|
|
1902
|
+
getU32Decoder as getU32Decoder13,
|
|
1903
|
+
getU32Encoder as getU32Encoder13,
|
|
1904
|
+
getU64Decoder as getU64Decoder23,
|
|
1905
|
+
getU64Encoder as getU64Encoder23
|
|
1862
1906
|
} from "@solana/kit";
|
|
1863
|
-
function
|
|
1864
|
-
return
|
|
1907
|
+
function getUnstakedEventEncoder() {
|
|
1908
|
+
return getStructEncoder41([
|
|
1865
1909
|
["owner", getAddressEncoder24()],
|
|
1866
1910
|
["market", getAddressEncoder24()],
|
|
1867
1911
|
["stakeAccount", getAddressEncoder24()],
|
|
1868
|
-
["stakeAccountId",
|
|
1869
|
-
["
|
|
1870
|
-
["refundedPlatformFee", getU64Encoder20()],
|
|
1871
|
-
["refundedRewardPoolFee", getU64Encoder20()],
|
|
1872
|
-
["refundedCreatorFee", getU64Encoder20()],
|
|
1912
|
+
["stakeAccountId", getU32Encoder13()],
|
|
1913
|
+
["amount", getU64Encoder23()],
|
|
1873
1914
|
["timestamp", getI64Encoder20()]
|
|
1874
1915
|
]);
|
|
1875
1916
|
}
|
|
1876
|
-
function
|
|
1877
|
-
return
|
|
1917
|
+
function getUnstakedEventDecoder() {
|
|
1918
|
+
return getStructDecoder41([
|
|
1878
1919
|
["owner", getAddressDecoder24()],
|
|
1879
1920
|
["market", getAddressDecoder24()],
|
|
1880
1921
|
["stakeAccount", getAddressDecoder24()],
|
|
1881
|
-
["stakeAccountId",
|
|
1882
|
-
["
|
|
1883
|
-
["refundedPlatformFee", getU64Decoder20()],
|
|
1884
|
-
["refundedRewardPoolFee", getU64Decoder20()],
|
|
1885
|
-
["refundedCreatorFee", getU64Decoder20()],
|
|
1922
|
+
["stakeAccountId", getU32Decoder13()],
|
|
1923
|
+
["amount", getU64Decoder23()],
|
|
1886
1924
|
["timestamp", getI64Decoder20()]
|
|
1887
1925
|
]);
|
|
1888
1926
|
}
|
|
1889
|
-
function
|
|
1890
|
-
return
|
|
1891
|
-
getStuckStakeClosedEventEncoder(),
|
|
1892
|
-
getStuckStakeClosedEventDecoder()
|
|
1893
|
-
);
|
|
1927
|
+
function getUnstakedEventCodec() {
|
|
1928
|
+
return combineCodec47(getUnstakedEventEncoder(), getUnstakedEventDecoder());
|
|
1894
1929
|
}
|
|
1895
1930
|
|
|
1896
|
-
// src/generated/types/
|
|
1897
|
-
import {
|
|
1898
|
-
combineCodec as combineCodec47,
|
|
1899
|
-
getStructDecoder as getStructDecoder41,
|
|
1900
|
-
getStructEncoder as getStructEncoder41,
|
|
1901
|
-
getU64Decoder as getU64Decoder21,
|
|
1902
|
-
getU64Encoder as getU64Encoder21
|
|
1903
|
-
} from "@solana/kit";
|
|
1904
|
-
function getTimestampEncoder() {
|
|
1905
|
-
return getStructEncoder41([["timestamp", getU64Encoder21()]]);
|
|
1906
|
-
}
|
|
1907
|
-
function getTimestampDecoder() {
|
|
1908
|
-
return getStructDecoder41([["timestamp", getU64Decoder21()]]);
|
|
1909
|
-
}
|
|
1910
|
-
function getTimestampCodec() {
|
|
1911
|
-
return combineCodec47(getTimestampEncoder(), getTimestampDecoder());
|
|
1912
|
-
}
|
|
1913
|
-
|
|
1914
|
-
// src/generated/types/unstakedEvent.ts
|
|
1931
|
+
// src/generated/types/updateAuthorityChangedEvent.ts
|
|
1915
1932
|
import {
|
|
1916
1933
|
combineCodec as combineCodec48,
|
|
1917
1934
|
getAddressDecoder as getAddressDecoder25,
|
|
@@ -1919,64 +1936,26 @@ import {
|
|
|
1919
1936
|
getI64Decoder as getI64Decoder21,
|
|
1920
1937
|
getI64Encoder as getI64Encoder21,
|
|
1921
1938
|
getStructDecoder as getStructDecoder42,
|
|
1922
|
-
getStructEncoder as getStructEncoder42
|
|
1923
|
-
getU32Decoder as getU32Decoder12,
|
|
1924
|
-
getU32Encoder as getU32Encoder12,
|
|
1925
|
-
getU64Decoder as getU64Decoder22,
|
|
1926
|
-
getU64Encoder as getU64Encoder22
|
|
1939
|
+
getStructEncoder as getStructEncoder42
|
|
1927
1940
|
} from "@solana/kit";
|
|
1928
|
-
function
|
|
1941
|
+
function getUpdateAuthorityChangedEventEncoder() {
|
|
1929
1942
|
return getStructEncoder42([
|
|
1930
|
-
["
|
|
1931
|
-
["
|
|
1932
|
-
["
|
|
1933
|
-
["stakeAccountId", getU32Encoder12()],
|
|
1934
|
-
["amount", getU64Encoder22()],
|
|
1943
|
+
["platformConfig", getAddressEncoder25()],
|
|
1944
|
+
["oldValue", getAddressEncoder25()],
|
|
1945
|
+
["newValue", getAddressEncoder25()],
|
|
1935
1946
|
["timestamp", getI64Encoder21()]
|
|
1936
1947
|
]);
|
|
1937
1948
|
}
|
|
1938
|
-
function
|
|
1949
|
+
function getUpdateAuthorityChangedEventDecoder() {
|
|
1939
1950
|
return getStructDecoder42([
|
|
1940
|
-
["
|
|
1941
|
-
["
|
|
1942
|
-
["
|
|
1943
|
-
["stakeAccountId", getU32Decoder12()],
|
|
1944
|
-
["amount", getU64Decoder22()],
|
|
1951
|
+
["platformConfig", getAddressDecoder25()],
|
|
1952
|
+
["oldValue", getAddressDecoder25()],
|
|
1953
|
+
["newValue", getAddressDecoder25()],
|
|
1945
1954
|
["timestamp", getI64Decoder21()]
|
|
1946
1955
|
]);
|
|
1947
1956
|
}
|
|
1948
|
-
function getUnstakedEventCodec() {
|
|
1949
|
-
return combineCodec48(getUnstakedEventEncoder(), getUnstakedEventDecoder());
|
|
1950
|
-
}
|
|
1951
|
-
|
|
1952
|
-
// src/generated/types/updateAuthorityChangedEvent.ts
|
|
1953
|
-
import {
|
|
1954
|
-
combineCodec as combineCodec49,
|
|
1955
|
-
getAddressDecoder as getAddressDecoder26,
|
|
1956
|
-
getAddressEncoder as getAddressEncoder26,
|
|
1957
|
-
getI64Decoder as getI64Decoder22,
|
|
1958
|
-
getI64Encoder as getI64Encoder22,
|
|
1959
|
-
getStructDecoder as getStructDecoder43,
|
|
1960
|
-
getStructEncoder as getStructEncoder43
|
|
1961
|
-
} from "@solana/kit";
|
|
1962
|
-
function getUpdateAuthorityChangedEventEncoder() {
|
|
1963
|
-
return getStructEncoder43([
|
|
1964
|
-
["platformConfig", getAddressEncoder26()],
|
|
1965
|
-
["oldValue", getAddressEncoder26()],
|
|
1966
|
-
["newValue", getAddressEncoder26()],
|
|
1967
|
-
["timestamp", getI64Encoder22()]
|
|
1968
|
-
]);
|
|
1969
|
-
}
|
|
1970
|
-
function getUpdateAuthorityChangedEventDecoder() {
|
|
1971
|
-
return getStructDecoder43([
|
|
1972
|
-
["platformConfig", getAddressDecoder26()],
|
|
1973
|
-
["oldValue", getAddressDecoder26()],
|
|
1974
|
-
["newValue", getAddressDecoder26()],
|
|
1975
|
-
["timestamp", getI64Decoder22()]
|
|
1976
|
-
]);
|
|
1977
|
-
}
|
|
1978
1957
|
function getUpdateAuthorityChangedEventCodec() {
|
|
1979
|
-
return
|
|
1958
|
+
return combineCodec48(
|
|
1980
1959
|
getUpdateAuthorityChangedEventEncoder(),
|
|
1981
1960
|
getUpdateAuthorityChangedEventDecoder()
|
|
1982
1961
|
);
|
|
@@ -1984,16 +1963,16 @@ function getUpdateAuthorityChangedEventCodec() {
|
|
|
1984
1963
|
|
|
1985
1964
|
// src/generated/types/utilityPubkeys.ts
|
|
1986
1965
|
import {
|
|
1987
|
-
combineCodec as
|
|
1966
|
+
combineCodec as combineCodec49,
|
|
1988
1967
|
getArrayDecoder as getArrayDecoder11,
|
|
1989
1968
|
getArrayEncoder as getArrayEncoder11,
|
|
1990
|
-
getStructDecoder as
|
|
1991
|
-
getStructEncoder as
|
|
1969
|
+
getStructDecoder as getStructDecoder43,
|
|
1970
|
+
getStructEncoder as getStructEncoder43,
|
|
1992
1971
|
getU8Decoder as getU8Decoder15,
|
|
1993
1972
|
getU8Encoder as getU8Encoder15
|
|
1994
1973
|
} from "@solana/kit";
|
|
1995
1974
|
function getUtilityPubkeysEncoder() {
|
|
1996
|
-
return
|
|
1975
|
+
return getStructEncoder43([
|
|
1997
1976
|
["x25519Pubkey", getArrayEncoder11(getU8Encoder15(), { size: 32 })],
|
|
1998
1977
|
["ed25519VerifyingKey", getArrayEncoder11(getU8Encoder15(), { size: 32 })],
|
|
1999
1978
|
["elgamalPubkey", getArrayEncoder11(getU8Encoder15(), { size: 32 })],
|
|
@@ -2001,7 +1980,7 @@ function getUtilityPubkeysEncoder() {
|
|
|
2001
1980
|
]);
|
|
2002
1981
|
}
|
|
2003
1982
|
function getUtilityPubkeysDecoder() {
|
|
2004
|
-
return
|
|
1983
|
+
return getStructDecoder43([
|
|
2005
1984
|
["x25519Pubkey", getArrayDecoder11(getU8Decoder15(), { size: 32 })],
|
|
2006
1985
|
["ed25519VerifyingKey", getArrayDecoder11(getU8Decoder15(), { size: 32 })],
|
|
2007
1986
|
["elgamalPubkey", getArrayDecoder11(getU8Decoder15(), { size: 32 })],
|
|
@@ -2009,47 +1988,47 @@ function getUtilityPubkeysDecoder() {
|
|
|
2009
1988
|
]);
|
|
2010
1989
|
}
|
|
2011
1990
|
function getUtilityPubkeysCodec() {
|
|
2012
|
-
return
|
|
1991
|
+
return combineCodec49(getUtilityPubkeysEncoder(), getUtilityPubkeysDecoder());
|
|
2013
1992
|
}
|
|
2014
1993
|
|
|
2015
1994
|
// src/generated/types/winningOptionSetEvent.ts
|
|
2016
1995
|
import {
|
|
2017
|
-
combineCodec as
|
|
2018
|
-
getAddressDecoder as
|
|
2019
|
-
getAddressEncoder as
|
|
2020
|
-
getI64Decoder as
|
|
2021
|
-
getI64Encoder as
|
|
2022
|
-
getStructDecoder as
|
|
2023
|
-
getStructEncoder as
|
|
1996
|
+
combineCodec as combineCodec50,
|
|
1997
|
+
getAddressDecoder as getAddressDecoder26,
|
|
1998
|
+
getAddressEncoder as getAddressEncoder26,
|
|
1999
|
+
getI64Decoder as getI64Decoder22,
|
|
2000
|
+
getI64Encoder as getI64Encoder22,
|
|
2001
|
+
getStructDecoder as getStructDecoder44,
|
|
2002
|
+
getStructEncoder as getStructEncoder44,
|
|
2024
2003
|
getU16Decoder as getU16Decoder4,
|
|
2025
2004
|
getU16Encoder as getU16Encoder4,
|
|
2026
|
-
getU64Decoder as
|
|
2027
|
-
getU64Encoder as
|
|
2005
|
+
getU64Decoder as getU64Decoder24,
|
|
2006
|
+
getU64Encoder as getU64Encoder24
|
|
2028
2007
|
} from "@solana/kit";
|
|
2029
2008
|
function getWinningOptionSetEventEncoder() {
|
|
2030
|
-
return
|
|
2031
|
-
["market",
|
|
2032
|
-
["marketAuthority",
|
|
2033
|
-
["option",
|
|
2034
|
-
["optionId",
|
|
2009
|
+
return getStructEncoder44([
|
|
2010
|
+
["market", getAddressEncoder26()],
|
|
2011
|
+
["marketAuthority", getAddressEncoder26()],
|
|
2012
|
+
["option", getAddressEncoder26()],
|
|
2013
|
+
["optionId", getU64Encoder24()],
|
|
2035
2014
|
["rewardBp", getU16Encoder4()],
|
|
2036
2015
|
["winningOptionAllocation", getU16Encoder4()],
|
|
2037
|
-
["timestamp",
|
|
2016
|
+
["timestamp", getI64Encoder22()]
|
|
2038
2017
|
]);
|
|
2039
2018
|
}
|
|
2040
2019
|
function getWinningOptionSetEventDecoder() {
|
|
2041
|
-
return
|
|
2042
|
-
["market",
|
|
2043
|
-
["marketAuthority",
|
|
2044
|
-
["option",
|
|
2045
|
-
["optionId",
|
|
2020
|
+
return getStructDecoder44([
|
|
2021
|
+
["market", getAddressDecoder26()],
|
|
2022
|
+
["marketAuthority", getAddressDecoder26()],
|
|
2023
|
+
["option", getAddressDecoder26()],
|
|
2024
|
+
["optionId", getU64Decoder24()],
|
|
2046
2025
|
["rewardBp", getU16Decoder4()],
|
|
2047
2026
|
["winningOptionAllocation", getU16Decoder4()],
|
|
2048
|
-
["timestamp",
|
|
2027
|
+
["timestamp", getI64Decoder22()]
|
|
2049
2028
|
]);
|
|
2050
2029
|
}
|
|
2051
2030
|
function getWinningOptionSetEventCodec() {
|
|
2052
|
-
return
|
|
2031
|
+
return combineCodec50(
|
|
2053
2032
|
getWinningOptionSetEventEncoder(),
|
|
2054
2033
|
getWinningOptionSetEventDecoder()
|
|
2055
2034
|
);
|
|
@@ -2073,71 +2052,65 @@ function getOpportunityMarketDiscriminatorBytes() {
|
|
|
2073
2052
|
}
|
|
2074
2053
|
function getOpportunityMarketEncoder() {
|
|
2075
2054
|
return transformEncoder3(
|
|
2076
|
-
|
|
2055
|
+
getStructEncoder45([
|
|
2077
2056
|
["discriminator", fixEncoderSize3(getBytesEncoder3(), 8)],
|
|
2078
2057
|
["bump", getU8Encoder16()],
|
|
2079
|
-
["creator",
|
|
2080
|
-
["index",
|
|
2081
|
-
["totalOptions",
|
|
2082
|
-
["platform",
|
|
2083
|
-
["stakeEndTimestamp",
|
|
2084
|
-
["resolvedAtTimestamp",
|
|
2058
|
+
["creator", getAddressEncoder27()],
|
|
2059
|
+
["index", getU64Encoder25()],
|
|
2060
|
+
["totalOptions", getU64Encoder25()],
|
|
2061
|
+
["platform", getAddressEncoder27()],
|
|
2062
|
+
["stakeEndTimestamp", getOptionEncoder5(getU64Encoder25())],
|
|
2063
|
+
["resolvedAtTimestamp", getOptionEncoder5(getU64Encoder25())],
|
|
2085
2064
|
["winningOptionAllocation", getU16Encoder5()],
|
|
2086
|
-
["
|
|
2087
|
-
["
|
|
2088
|
-
["
|
|
2089
|
-
["mint",
|
|
2090
|
-
["earlinessCutoffSeconds",
|
|
2065
|
+
["winningOptionActiveBp", getU16Encoder5()],
|
|
2066
|
+
["rewardAmount", getU64Encoder25()],
|
|
2067
|
+
["marketAuthority", getAddressEncoder27()],
|
|
2068
|
+
["mint", getAddressEncoder27()],
|
|
2069
|
+
["earlinessCutoffSeconds", getU64Encoder25()],
|
|
2091
2070
|
["earlinessMultiplier", getU16Encoder5()],
|
|
2092
|
-
["allowUnstakingEarly", getBooleanEncoder6()],
|
|
2093
2071
|
["authorizedReaderPubkey", getArrayEncoder12(getU8Encoder16(), { size: 32 })],
|
|
2094
|
-
["stakingPaused", getBooleanEncoder6()],
|
|
2095
2072
|
["feeRates", getFeeRatesEncoder()],
|
|
2096
|
-
["collectedPlatformFees",
|
|
2097
|
-
["collectedCreatorFees",
|
|
2098
|
-
["creatorFeeClaimer",
|
|
2099
|
-
["marketResolutionDeadlineSeconds",
|
|
2100
|
-
["
|
|
2101
|
-
["
|
|
2102
|
-
["
|
|
2103
|
-
["minStakeAmount", getU64Encoder24()]
|
|
2073
|
+
["collectedPlatformFees", getU64Encoder25()],
|
|
2074
|
+
["collectedCreatorFees", getU64Encoder25()],
|
|
2075
|
+
["creatorFeeClaimer", getAddressEncoder27()],
|
|
2076
|
+
["marketResolutionDeadlineSeconds", getU64Encoder25()],
|
|
2077
|
+
["revealPeriodSeconds", getU64Encoder25()],
|
|
2078
|
+
["revealEnded", getBooleanEncoder4()],
|
|
2079
|
+
["minStakeAmount", getU64Encoder25()]
|
|
2104
2080
|
]),
|
|
2105
2081
|
(value) => ({ ...value, discriminator: OPPORTUNITY_MARKET_DISCRIMINATOR })
|
|
2106
2082
|
);
|
|
2107
2083
|
}
|
|
2108
2084
|
function getOpportunityMarketDecoder() {
|
|
2109
|
-
return
|
|
2085
|
+
return getStructDecoder45([
|
|
2110
2086
|
["discriminator", fixDecoderSize3(getBytesDecoder3(), 8)],
|
|
2111
2087
|
["bump", getU8Decoder16()],
|
|
2112
|
-
["creator",
|
|
2113
|
-
["index",
|
|
2114
|
-
["totalOptions",
|
|
2115
|
-
["platform",
|
|
2116
|
-
["stakeEndTimestamp",
|
|
2117
|
-
["resolvedAtTimestamp",
|
|
2088
|
+
["creator", getAddressDecoder27()],
|
|
2089
|
+
["index", getU64Decoder25()],
|
|
2090
|
+
["totalOptions", getU64Decoder25()],
|
|
2091
|
+
["platform", getAddressDecoder27()],
|
|
2092
|
+
["stakeEndTimestamp", getOptionDecoder5(getU64Decoder25())],
|
|
2093
|
+
["resolvedAtTimestamp", getOptionDecoder5(getU64Decoder25())],
|
|
2118
2094
|
["winningOptionAllocation", getU16Decoder5()],
|
|
2119
|
-
["
|
|
2120
|
-
["
|
|
2121
|
-
["
|
|
2122
|
-
["mint",
|
|
2123
|
-
["earlinessCutoffSeconds",
|
|
2095
|
+
["winningOptionActiveBp", getU16Decoder5()],
|
|
2096
|
+
["rewardAmount", getU64Decoder25()],
|
|
2097
|
+
["marketAuthority", getAddressDecoder27()],
|
|
2098
|
+
["mint", getAddressDecoder27()],
|
|
2099
|
+
["earlinessCutoffSeconds", getU64Decoder25()],
|
|
2124
2100
|
["earlinessMultiplier", getU16Decoder5()],
|
|
2125
|
-
["allowUnstakingEarly", getBooleanDecoder6()],
|
|
2126
2101
|
["authorizedReaderPubkey", getArrayDecoder12(getU8Decoder16(), { size: 32 })],
|
|
2127
|
-
["stakingPaused", getBooleanDecoder6()],
|
|
2128
2102
|
["feeRates", getFeeRatesDecoder()],
|
|
2129
|
-
["collectedPlatformFees",
|
|
2130
|
-
["collectedCreatorFees",
|
|
2131
|
-
["creatorFeeClaimer",
|
|
2132
|
-
["marketResolutionDeadlineSeconds",
|
|
2133
|
-
["
|
|
2134
|
-
["
|
|
2135
|
-
["
|
|
2136
|
-
["minStakeAmount", getU64Decoder24()]
|
|
2103
|
+
["collectedPlatformFees", getU64Decoder25()],
|
|
2104
|
+
["collectedCreatorFees", getU64Decoder25()],
|
|
2105
|
+
["creatorFeeClaimer", getAddressDecoder27()],
|
|
2106
|
+
["marketResolutionDeadlineSeconds", getU64Decoder25()],
|
|
2107
|
+
["revealPeriodSeconds", getU64Decoder25()],
|
|
2108
|
+
["revealEnded", getBooleanDecoder4()],
|
|
2109
|
+
["minStakeAmount", getU64Decoder25()]
|
|
2137
2110
|
]);
|
|
2138
2111
|
}
|
|
2139
2112
|
function getOpportunityMarketCodec() {
|
|
2140
|
-
return
|
|
2113
|
+
return combineCodec51(
|
|
2141
2114
|
getOpportunityMarketEncoder(),
|
|
2142
2115
|
getOpportunityMarketDecoder()
|
|
2143
2116
|
);
|
|
@@ -2177,26 +2150,26 @@ async function fetchAllMaybeOpportunityMarket(rpc, addresses, config) {
|
|
|
2177
2150
|
import {
|
|
2178
2151
|
assertAccountExists as assertAccountExists4,
|
|
2179
2152
|
assertAccountsExist as assertAccountsExist4,
|
|
2180
|
-
combineCodec as
|
|
2153
|
+
combineCodec as combineCodec52,
|
|
2181
2154
|
decodeAccount as decodeAccount4,
|
|
2182
2155
|
fetchEncodedAccount as fetchEncodedAccount4,
|
|
2183
2156
|
fetchEncodedAccounts as fetchEncodedAccounts4,
|
|
2184
2157
|
fixDecoderSize as fixDecoderSize4,
|
|
2185
2158
|
fixEncoderSize as fixEncoderSize4,
|
|
2186
|
-
getAddressDecoder as
|
|
2187
|
-
getAddressEncoder as
|
|
2159
|
+
getAddressDecoder as getAddressDecoder28,
|
|
2160
|
+
getAddressEncoder as getAddressEncoder28,
|
|
2161
|
+
getBooleanDecoder as getBooleanDecoder5,
|
|
2162
|
+
getBooleanEncoder as getBooleanEncoder5,
|
|
2188
2163
|
getBytesDecoder as getBytesDecoder4,
|
|
2189
2164
|
getBytesEncoder as getBytesEncoder4,
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
getStructDecoder as getStructDecoder47,
|
|
2193
|
-
getStructEncoder as getStructEncoder47,
|
|
2165
|
+
getStructDecoder as getStructDecoder46,
|
|
2166
|
+
getStructEncoder as getStructEncoder46,
|
|
2194
2167
|
getU128Decoder as getU128Decoder4,
|
|
2195
2168
|
getU128Encoder as getU128Encoder4,
|
|
2196
2169
|
getU16Decoder as getU16Decoder6,
|
|
2197
2170
|
getU16Encoder as getU16Encoder6,
|
|
2198
|
-
getU64Decoder as
|
|
2199
|
-
getU64Encoder as
|
|
2171
|
+
getU64Decoder as getU64Decoder26,
|
|
2172
|
+
getU64Encoder as getU64Encoder26,
|
|
2200
2173
|
getU8Decoder as getU8Decoder17,
|
|
2201
2174
|
getU8Encoder as getU8Encoder17,
|
|
2202
2175
|
transformEncoder as transformEncoder4
|
|
@@ -2218,15 +2191,16 @@ function getOpportunityMarketOptionDiscriminatorBytes() {
|
|
|
2218
2191
|
}
|
|
2219
2192
|
function getOpportunityMarketOptionEncoder() {
|
|
2220
2193
|
return transformEncoder4(
|
|
2221
|
-
|
|
2194
|
+
getStructEncoder46([
|
|
2222
2195
|
["discriminator", fixEncoderSize4(getBytesEncoder4(), 8)],
|
|
2223
2196
|
["bump", getU8Encoder17()],
|
|
2224
|
-
["id",
|
|
2225
|
-
["creator",
|
|
2226
|
-
["createdAt",
|
|
2227
|
-
["
|
|
2197
|
+
["id", getU64Encoder26()],
|
|
2198
|
+
["creator", getAddressEncoder28()],
|
|
2199
|
+
["createdAt", getU64Encoder26()],
|
|
2200
|
+
["unclaimedStake", getU64Encoder26()],
|
|
2228
2201
|
["totalScore", getU128Encoder4()],
|
|
2229
|
-
["rewardBp",
|
|
2202
|
+
["rewardBp", getU16Encoder6()],
|
|
2203
|
+
["includedInActiveBp", getBooleanEncoder5()]
|
|
2230
2204
|
]),
|
|
2231
2205
|
(value) => ({
|
|
2232
2206
|
...value,
|
|
@@ -2235,19 +2209,20 @@ function getOpportunityMarketOptionEncoder() {
|
|
|
2235
2209
|
);
|
|
2236
2210
|
}
|
|
2237
2211
|
function getOpportunityMarketOptionDecoder() {
|
|
2238
|
-
return
|
|
2212
|
+
return getStructDecoder46([
|
|
2239
2213
|
["discriminator", fixDecoderSize4(getBytesDecoder4(), 8)],
|
|
2240
2214
|
["bump", getU8Decoder17()],
|
|
2241
|
-
["id",
|
|
2242
|
-
["creator",
|
|
2243
|
-
["createdAt",
|
|
2244
|
-
["
|
|
2215
|
+
["id", getU64Decoder26()],
|
|
2216
|
+
["creator", getAddressDecoder28()],
|
|
2217
|
+
["createdAt", getU64Decoder26()],
|
|
2218
|
+
["unclaimedStake", getU64Decoder26()],
|
|
2245
2219
|
["totalScore", getU128Decoder4()],
|
|
2246
|
-
["rewardBp",
|
|
2220
|
+
["rewardBp", getU16Decoder6()],
|
|
2221
|
+
["includedInActiveBp", getBooleanDecoder5()]
|
|
2247
2222
|
]);
|
|
2248
2223
|
}
|
|
2249
2224
|
function getOpportunityMarketOptionCodec() {
|
|
2250
|
-
return
|
|
2225
|
+
return combineCodec52(
|
|
2251
2226
|
getOpportunityMarketOptionEncoder(),
|
|
2252
2227
|
getOpportunityMarketOptionDecoder()
|
|
2253
2228
|
);
|
|
@@ -2291,22 +2266,20 @@ async function fetchAllMaybeOpportunityMarketOption(rpc, addresses, config) {
|
|
|
2291
2266
|
import {
|
|
2292
2267
|
assertAccountExists as assertAccountExists5,
|
|
2293
2268
|
assertAccountsExist as assertAccountsExist5,
|
|
2294
|
-
combineCodec as
|
|
2269
|
+
combineCodec as combineCodec53,
|
|
2295
2270
|
decodeAccount as decodeAccount5,
|
|
2296
2271
|
fetchEncodedAccount as fetchEncodedAccount5,
|
|
2297
2272
|
fetchEncodedAccounts as fetchEncodedAccounts5,
|
|
2298
2273
|
fixDecoderSize as fixDecoderSize5,
|
|
2299
2274
|
fixEncoderSize as fixEncoderSize5,
|
|
2300
|
-
getAddressDecoder as
|
|
2301
|
-
getAddressEncoder as
|
|
2302
|
-
getBooleanDecoder as getBooleanDecoder7,
|
|
2303
|
-
getBooleanEncoder as getBooleanEncoder7,
|
|
2275
|
+
getAddressDecoder as getAddressDecoder29,
|
|
2276
|
+
getAddressEncoder as getAddressEncoder29,
|
|
2304
2277
|
getBytesDecoder as getBytesDecoder5,
|
|
2305
2278
|
getBytesEncoder as getBytesEncoder5,
|
|
2306
|
-
getStructDecoder as
|
|
2307
|
-
getStructEncoder as
|
|
2308
|
-
getU64Decoder as
|
|
2309
|
-
getU64Encoder as
|
|
2279
|
+
getStructDecoder as getStructDecoder47,
|
|
2280
|
+
getStructEncoder as getStructEncoder47,
|
|
2281
|
+
getU64Decoder as getU64Decoder27,
|
|
2282
|
+
getU64Encoder as getU64Encoder27,
|
|
2310
2283
|
getU8Decoder as getU8Decoder18,
|
|
2311
2284
|
getU8Encoder as getU8Encoder18,
|
|
2312
2285
|
transformEncoder as transformEncoder5
|
|
@@ -2328,13 +2301,12 @@ function getOpportunityMarketSponsorDiscriminatorBytes() {
|
|
|
2328
2301
|
}
|
|
2329
2302
|
function getOpportunityMarketSponsorEncoder() {
|
|
2330
2303
|
return transformEncoder5(
|
|
2331
|
-
|
|
2304
|
+
getStructEncoder47([
|
|
2332
2305
|
["discriminator", fixEncoderSize5(getBytesEncoder5(), 8)],
|
|
2333
2306
|
["bump", getU8Encoder18()],
|
|
2334
|
-
["sponsor",
|
|
2335
|
-
["market",
|
|
2336
|
-
["rewardDeposited",
|
|
2337
|
-
["rewardLocked", getBooleanEncoder7()]
|
|
2307
|
+
["sponsor", getAddressEncoder29()],
|
|
2308
|
+
["market", getAddressEncoder29()],
|
|
2309
|
+
["rewardDeposited", getU64Encoder27()]
|
|
2338
2310
|
]),
|
|
2339
2311
|
(value) => ({
|
|
2340
2312
|
...value,
|
|
@@ -2343,17 +2315,16 @@ function getOpportunityMarketSponsorEncoder() {
|
|
|
2343
2315
|
);
|
|
2344
2316
|
}
|
|
2345
2317
|
function getOpportunityMarketSponsorDecoder() {
|
|
2346
|
-
return
|
|
2318
|
+
return getStructDecoder47([
|
|
2347
2319
|
["discriminator", fixDecoderSize5(getBytesDecoder5(), 8)],
|
|
2348
2320
|
["bump", getU8Decoder18()],
|
|
2349
|
-
["sponsor",
|
|
2350
|
-
["market",
|
|
2351
|
-
["rewardDeposited",
|
|
2352
|
-
["rewardLocked", getBooleanDecoder7()]
|
|
2321
|
+
["sponsor", getAddressDecoder29()],
|
|
2322
|
+
["market", getAddressDecoder29()],
|
|
2323
|
+
["rewardDeposited", getU64Decoder27()]
|
|
2353
2324
|
]);
|
|
2354
2325
|
}
|
|
2355
2326
|
function getOpportunityMarketSponsorCodec() {
|
|
2356
|
-
return
|
|
2327
|
+
return combineCodec53(
|
|
2357
2328
|
getOpportunityMarketSponsorEncoder(),
|
|
2358
2329
|
getOpportunityMarketSponsorDecoder()
|
|
2359
2330
|
);
|
|
@@ -2399,22 +2370,22 @@ import {
|
|
|
2399
2370
|
addEncoderSizePrefix as addEncoderSizePrefix2,
|
|
2400
2371
|
assertAccountExists as assertAccountExists6,
|
|
2401
2372
|
assertAccountsExist as assertAccountsExist6,
|
|
2402
|
-
combineCodec as
|
|
2373
|
+
combineCodec as combineCodec54,
|
|
2403
2374
|
decodeAccount as decodeAccount6,
|
|
2404
2375
|
fetchEncodedAccount as fetchEncodedAccount6,
|
|
2405
2376
|
fetchEncodedAccounts as fetchEncodedAccounts6,
|
|
2406
2377
|
fixDecoderSize as fixDecoderSize6,
|
|
2407
2378
|
fixEncoderSize as fixEncoderSize6,
|
|
2408
|
-
getAddressDecoder as
|
|
2409
|
-
getAddressEncoder as
|
|
2379
|
+
getAddressDecoder as getAddressDecoder30,
|
|
2380
|
+
getAddressEncoder as getAddressEncoder30,
|
|
2410
2381
|
getBytesDecoder as getBytesDecoder6,
|
|
2411
2382
|
getBytesEncoder as getBytesEncoder6,
|
|
2412
|
-
getStructDecoder as
|
|
2413
|
-
getStructEncoder as
|
|
2414
|
-
getU32Decoder as
|
|
2415
|
-
getU32Encoder as
|
|
2416
|
-
getU64Decoder as
|
|
2417
|
-
getU64Encoder as
|
|
2383
|
+
getStructDecoder as getStructDecoder48,
|
|
2384
|
+
getStructEncoder as getStructEncoder48,
|
|
2385
|
+
getU32Decoder as getU32Decoder14,
|
|
2386
|
+
getU32Encoder as getU32Encoder14,
|
|
2387
|
+
getU64Decoder as getU64Decoder28,
|
|
2388
|
+
getU64Encoder as getU64Encoder28,
|
|
2418
2389
|
getU8Decoder as getU8Decoder19,
|
|
2419
2390
|
getU8Encoder as getU8Encoder19,
|
|
2420
2391
|
getUtf8Decoder as getUtf8Decoder2,
|
|
@@ -2438,37 +2409,37 @@ function getPlatformConfigDiscriminatorBytes() {
|
|
|
2438
2409
|
}
|
|
2439
2410
|
function getPlatformConfigEncoder() {
|
|
2440
2411
|
return transformEncoder6(
|
|
2441
|
-
|
|
2412
|
+
getStructEncoder48([
|
|
2442
2413
|
["discriminator", fixEncoderSize6(getBytesEncoder6(), 8)],
|
|
2443
2414
|
["bump", getU8Encoder19()],
|
|
2444
|
-
["name", addEncoderSizePrefix2(getUtf8Encoder2(),
|
|
2445
|
-
["updateAuthority",
|
|
2446
|
-
["feeClaimAuthority",
|
|
2415
|
+
["name", addEncoderSizePrefix2(getUtf8Encoder2(), getU32Encoder14())],
|
|
2416
|
+
["updateAuthority", getAddressEncoder30()],
|
|
2417
|
+
["feeClaimAuthority", getAddressEncoder30()],
|
|
2447
2418
|
["feeRates", getFeeRatesEncoder()],
|
|
2448
|
-
["marketResolutionDeadlineSeconds",
|
|
2449
|
-
["minTimeToStakeSeconds",
|
|
2450
|
-
["
|
|
2451
|
-
["
|
|
2419
|
+
["marketResolutionDeadlineSeconds", getU64Encoder28()],
|
|
2420
|
+
["minTimeToStakeSeconds", getU64Encoder28()],
|
|
2421
|
+
["revealAuthority", getAddressEncoder30()],
|
|
2422
|
+
["revealPeriodSeconds", getU64Encoder28()]
|
|
2452
2423
|
]),
|
|
2453
2424
|
(value) => ({ ...value, discriminator: PLATFORM_CONFIG_DISCRIMINATOR })
|
|
2454
2425
|
);
|
|
2455
2426
|
}
|
|
2456
2427
|
function getPlatformConfigDecoder() {
|
|
2457
|
-
return
|
|
2428
|
+
return getStructDecoder48([
|
|
2458
2429
|
["discriminator", fixDecoderSize6(getBytesDecoder6(), 8)],
|
|
2459
2430
|
["bump", getU8Decoder19()],
|
|
2460
|
-
["name", addDecoderSizePrefix2(getUtf8Decoder2(),
|
|
2461
|
-
["updateAuthority",
|
|
2462
|
-
["feeClaimAuthority",
|
|
2431
|
+
["name", addDecoderSizePrefix2(getUtf8Decoder2(), getU32Decoder14())],
|
|
2432
|
+
["updateAuthority", getAddressDecoder30()],
|
|
2433
|
+
["feeClaimAuthority", getAddressDecoder30()],
|
|
2463
2434
|
["feeRates", getFeeRatesDecoder()],
|
|
2464
|
-
["marketResolutionDeadlineSeconds",
|
|
2465
|
-
["minTimeToStakeSeconds",
|
|
2466
|
-
["
|
|
2467
|
-
["
|
|
2435
|
+
["marketResolutionDeadlineSeconds", getU64Decoder28()],
|
|
2436
|
+
["minTimeToStakeSeconds", getU64Decoder28()],
|
|
2437
|
+
["revealAuthority", getAddressDecoder30()],
|
|
2438
|
+
["revealPeriodSeconds", getU64Decoder28()]
|
|
2468
2439
|
]);
|
|
2469
2440
|
}
|
|
2470
2441
|
function getPlatformConfigCodec() {
|
|
2471
|
-
return
|
|
2442
|
+
return combineCodec54(getPlatformConfigEncoder(), getPlatformConfigDecoder());
|
|
2472
2443
|
}
|
|
2473
2444
|
function decodePlatformConfig(encodedAccount) {
|
|
2474
2445
|
return decodeAccount6(
|
|
@@ -2505,30 +2476,30 @@ async function fetchAllMaybePlatformConfig(rpc, addresses, config) {
|
|
|
2505
2476
|
import {
|
|
2506
2477
|
assertAccountExists as assertAccountExists7,
|
|
2507
2478
|
assertAccountsExist as assertAccountsExist7,
|
|
2508
|
-
combineCodec as
|
|
2479
|
+
combineCodec as combineCodec55,
|
|
2509
2480
|
decodeAccount as decodeAccount7,
|
|
2510
2481
|
fetchEncodedAccount as fetchEncodedAccount7,
|
|
2511
2482
|
fetchEncodedAccounts as fetchEncodedAccounts7,
|
|
2512
2483
|
fixDecoderSize as fixDecoderSize7,
|
|
2513
2484
|
fixEncoderSize as fixEncoderSize7,
|
|
2514
|
-
getAddressDecoder as
|
|
2515
|
-
getAddressEncoder as
|
|
2485
|
+
getAddressDecoder as getAddressDecoder31,
|
|
2486
|
+
getAddressEncoder as getAddressEncoder31,
|
|
2516
2487
|
getArrayDecoder as getArrayDecoder13,
|
|
2517
2488
|
getArrayEncoder as getArrayEncoder13,
|
|
2518
|
-
getBooleanDecoder as
|
|
2519
|
-
getBooleanEncoder as
|
|
2489
|
+
getBooleanDecoder as getBooleanDecoder6,
|
|
2490
|
+
getBooleanEncoder as getBooleanEncoder6,
|
|
2520
2491
|
getBytesDecoder as getBytesDecoder7,
|
|
2521
2492
|
getBytesEncoder as getBytesEncoder7,
|
|
2522
2493
|
getOptionDecoder as getOptionDecoder6,
|
|
2523
2494
|
getOptionEncoder as getOptionEncoder6,
|
|
2524
|
-
getStructDecoder as
|
|
2525
|
-
getStructEncoder as
|
|
2495
|
+
getStructDecoder as getStructDecoder49,
|
|
2496
|
+
getStructEncoder as getStructEncoder49,
|
|
2526
2497
|
getU128Decoder as getU128Decoder5,
|
|
2527
2498
|
getU128Encoder as getU128Encoder5,
|
|
2528
|
-
getU32Decoder as
|
|
2529
|
-
getU32Encoder as
|
|
2530
|
-
getU64Decoder as
|
|
2531
|
-
getU64Encoder as
|
|
2499
|
+
getU32Decoder as getU32Decoder15,
|
|
2500
|
+
getU32Encoder as getU32Encoder15,
|
|
2501
|
+
getU64Decoder as getU64Decoder29,
|
|
2502
|
+
getU64Encoder as getU64Encoder29,
|
|
2532
2503
|
getU8Decoder as getU8Decoder20,
|
|
2533
2504
|
getU8Encoder as getU8Encoder20,
|
|
2534
2505
|
transformEncoder as transformEncoder7
|
|
@@ -2550,61 +2521,63 @@ function getStakeAccountDiscriminatorBytes() {
|
|
|
2550
2521
|
}
|
|
2551
2522
|
function getStakeAccountEncoder() {
|
|
2552
2523
|
return transformEncoder7(
|
|
2553
|
-
|
|
2524
|
+
getStructEncoder49([
|
|
2554
2525
|
["discriminator", fixEncoderSize7(getBytesEncoder7(), 8)],
|
|
2555
2526
|
["encryptedOption", getArrayEncoder13(getU8Encoder20(), { size: 32 })],
|
|
2556
2527
|
["stateNonce", getU128Encoder5()],
|
|
2557
2528
|
["bump", getU8Encoder20()],
|
|
2558
|
-
["owner",
|
|
2559
|
-
["market",
|
|
2529
|
+
["owner", getAddressEncoder31()],
|
|
2530
|
+
["market", getAddressEncoder31()],
|
|
2560
2531
|
["userPubkey", getArrayEncoder13(getU8Encoder20(), { size: 32 })],
|
|
2561
2532
|
[
|
|
2562
2533
|
"encryptedOptionDisclosure",
|
|
2563
2534
|
getArrayEncoder13(getU8Encoder20(), { size: 32 })
|
|
2564
2535
|
],
|
|
2565
2536
|
["stateNonceDisclosure", getU128Encoder5()],
|
|
2566
|
-
["stakedAtTimestamp", getOptionEncoder6(
|
|
2567
|
-
["unstakedAtTimestamp", getOptionEncoder6(
|
|
2568
|
-
["amount",
|
|
2537
|
+
["stakedAtTimestamp", getOptionEncoder6(getU64Encoder29())],
|
|
2538
|
+
["unstakedAtTimestamp", getOptionEncoder6(getU64Encoder29())],
|
|
2539
|
+
["amount", getU64Encoder29()],
|
|
2569
2540
|
["collectedFees", getCollectedFeesEncoder()],
|
|
2570
|
-
["revealedOption", getOptionEncoder6(
|
|
2571
|
-
["score", getOptionEncoder6(
|
|
2572
|
-
["unstaked",
|
|
2573
|
-
["
|
|
2574
|
-
["
|
|
2575
|
-
["
|
|
2541
|
+
["revealedOption", getOptionEncoder6(getU64Encoder29())],
|
|
2542
|
+
["score", getOptionEncoder6(getU64Encoder29())],
|
|
2543
|
+
["unstaked", getBooleanEncoder6()],
|
|
2544
|
+
["rewardsClaimed", getBooleanEncoder6()],
|
|
2545
|
+
["id", getU32Encoder15()],
|
|
2546
|
+
["pendingStakeComputation", getOptionEncoder6(getAddressEncoder31())],
|
|
2547
|
+
["pendingReveal", getBooleanEncoder6()]
|
|
2576
2548
|
]),
|
|
2577
2549
|
(value) => ({ ...value, discriminator: STAKE_ACCOUNT_DISCRIMINATOR })
|
|
2578
2550
|
);
|
|
2579
2551
|
}
|
|
2580
2552
|
function getStakeAccountDecoder() {
|
|
2581
|
-
return
|
|
2553
|
+
return getStructDecoder49([
|
|
2582
2554
|
["discriminator", fixDecoderSize7(getBytesDecoder7(), 8)],
|
|
2583
2555
|
["encryptedOption", getArrayDecoder13(getU8Decoder20(), { size: 32 })],
|
|
2584
2556
|
["stateNonce", getU128Decoder5()],
|
|
2585
2557
|
["bump", getU8Decoder20()],
|
|
2586
|
-
["owner",
|
|
2587
|
-
["market",
|
|
2558
|
+
["owner", getAddressDecoder31()],
|
|
2559
|
+
["market", getAddressDecoder31()],
|
|
2588
2560
|
["userPubkey", getArrayDecoder13(getU8Decoder20(), { size: 32 })],
|
|
2589
2561
|
[
|
|
2590
2562
|
"encryptedOptionDisclosure",
|
|
2591
2563
|
getArrayDecoder13(getU8Decoder20(), { size: 32 })
|
|
2592
2564
|
],
|
|
2593
2565
|
["stateNonceDisclosure", getU128Decoder5()],
|
|
2594
|
-
["stakedAtTimestamp", getOptionDecoder6(
|
|
2595
|
-
["unstakedAtTimestamp", getOptionDecoder6(
|
|
2596
|
-
["amount",
|
|
2566
|
+
["stakedAtTimestamp", getOptionDecoder6(getU64Decoder29())],
|
|
2567
|
+
["unstakedAtTimestamp", getOptionDecoder6(getU64Decoder29())],
|
|
2568
|
+
["amount", getU64Decoder29()],
|
|
2597
2569
|
["collectedFees", getCollectedFeesDecoder()],
|
|
2598
|
-
["revealedOption", getOptionDecoder6(
|
|
2599
|
-
["score", getOptionDecoder6(
|
|
2600
|
-
["unstaked",
|
|
2601
|
-
["
|
|
2602
|
-
["
|
|
2603
|
-
["
|
|
2570
|
+
["revealedOption", getOptionDecoder6(getU64Decoder29())],
|
|
2571
|
+
["score", getOptionDecoder6(getU64Decoder29())],
|
|
2572
|
+
["unstaked", getBooleanDecoder6()],
|
|
2573
|
+
["rewardsClaimed", getBooleanDecoder6()],
|
|
2574
|
+
["id", getU32Decoder15()],
|
|
2575
|
+
["pendingStakeComputation", getOptionDecoder6(getAddressDecoder31())],
|
|
2576
|
+
["pendingReveal", getBooleanDecoder6()]
|
|
2604
2577
|
]);
|
|
2605
2578
|
}
|
|
2606
2579
|
function getStakeAccountCodec() {
|
|
2607
|
-
return
|
|
2580
|
+
return combineCodec55(getStakeAccountEncoder(), getStakeAccountDecoder());
|
|
2608
2581
|
}
|
|
2609
2582
|
function decodeStakeAccount(encodedAccount) {
|
|
2610
2583
|
return decodeAccount7(
|
|
@@ -2642,7 +2615,7 @@ import {
|
|
|
2642
2615
|
fixEncoderSize as fixEncoderSize8,
|
|
2643
2616
|
getBytesEncoder as getBytesEncoder8
|
|
2644
2617
|
} from "@solana/kit";
|
|
2645
|
-
var OPPORTUNITY_MARKET_PROGRAM_ADDRESS = "
|
|
2618
|
+
var OPPORTUNITY_MARKET_PROGRAM_ADDRESS = "bncqApu6NkUibDwnbfXR5oRPCLiYjwHgVuCdHRTD6rp";
|
|
2646
2619
|
var OpportunityMarketAccount = /* @__PURE__ */ ((OpportunityMarketAccount2) => {
|
|
2647
2620
|
OpportunityMarketAccount2[OpportunityMarketAccount2["AllowedMint"] = 0] = "AllowedMint";
|
|
2648
2621
|
OpportunityMarketAccount2[OpportunityMarketAccount2["ArciumSignerAccount"] = 1] = "ArciumSignerAccount";
|
|
@@ -2727,19 +2700,19 @@ var OpportunityMarketInstruction = /* @__PURE__ */ ((OpportunityMarketInstructio
|
|
|
2727
2700
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["AddReward"] = 1] = "AddReward";
|
|
2728
2701
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["ClaimCreatorFees"] = 2] = "ClaimCreatorFees";
|
|
2729
2702
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["ClaimFees"] = 3] = "ClaimFees";
|
|
2730
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2731
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2732
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2733
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2734
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2735
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2736
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2737
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2738
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2739
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2740
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2741
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2742
|
-
OpportunityMarketInstruction2[OpportunityMarketInstruction2["
|
|
2703
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["ClaimRewards"] = 4] = "ClaimRewards";
|
|
2704
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["CloseOptionAccount"] = 5] = "CloseOptionAccount";
|
|
2705
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["CloseStakeAccount"] = 6] = "CloseStakeAccount";
|
|
2706
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["CloseStuckStakeAccount"] = 7] = "CloseStuckStakeAccount";
|
|
2707
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["CloseUnrevealedStakeAccount"] = 8] = "CloseUnrevealedStakeAccount";
|
|
2708
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["CreateMarket"] = 9] = "CreateMarket";
|
|
2709
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["EndRevealPeriod"] = 10] = "EndRevealPeriod";
|
|
2710
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["FinalizeRevealStake"] = 11] = "FinalizeRevealStake";
|
|
2711
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["InitAllowedMint"] = 12] = "InitAllowedMint";
|
|
2712
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["InitPlatformConfig"] = 13] = "InitPlatformConfig";
|
|
2713
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["InitStakeAccount"] = 14] = "InitStakeAccount";
|
|
2714
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["OpenMarket"] = 15] = "OpenMarket";
|
|
2715
|
+
OpportunityMarketInstruction2[OpportunityMarketInstruction2["ResolveMarket"] = 16] = "ResolveMarket";
|
|
2743
2716
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["RevealStake"] = 17] = "RevealStake";
|
|
2744
2717
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["RevealStakeCallback"] = 18] = "RevealStakeCallback";
|
|
2745
2718
|
OpportunityMarketInstruction2[OpportunityMarketInstruction2["RevealStakeCompDef"] = 19] = "RevealStakeCompDef";
|
|
@@ -2795,119 +2768,119 @@ function identifyOpportunityMarketInstruction(instruction) {
|
|
|
2795
2768
|
if (containsBytes(
|
|
2796
2769
|
data,
|
|
2797
2770
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2798
|
-
new Uint8Array([
|
|
2771
|
+
new Uint8Array([4, 144, 132, 71, 116, 23, 151, 80])
|
|
2799
2772
|
),
|
|
2800
2773
|
0
|
|
2801
2774
|
)) {
|
|
2802
|
-
return 4 /*
|
|
2775
|
+
return 4 /* ClaimRewards */;
|
|
2803
2776
|
}
|
|
2804
2777
|
if (containsBytes(
|
|
2805
2778
|
data,
|
|
2806
2779
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2807
|
-
new Uint8Array([
|
|
2780
|
+
new Uint8Array([46, 121, 107, 240, 123, 190, 229, 1])
|
|
2808
2781
|
),
|
|
2809
2782
|
0
|
|
2810
2783
|
)) {
|
|
2811
|
-
return 5 /*
|
|
2784
|
+
return 5 /* CloseOptionAccount */;
|
|
2812
2785
|
}
|
|
2813
2786
|
if (containsBytes(
|
|
2814
2787
|
data,
|
|
2815
2788
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2816
|
-
new Uint8Array([
|
|
2789
|
+
new Uint8Array([246, 236, 59, 167, 115, 135, 122, 12])
|
|
2817
2790
|
),
|
|
2818
2791
|
0
|
|
2819
2792
|
)) {
|
|
2820
|
-
return 6 /*
|
|
2793
|
+
return 6 /* CloseStakeAccount */;
|
|
2821
2794
|
}
|
|
2822
2795
|
if (containsBytes(
|
|
2823
2796
|
data,
|
|
2824
2797
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2825
|
-
new Uint8Array([
|
|
2798
|
+
new Uint8Array([41, 239, 108, 203, 185, 230, 165, 181])
|
|
2826
2799
|
),
|
|
2827
2800
|
0
|
|
2828
2801
|
)) {
|
|
2829
|
-
return 7 /*
|
|
2802
|
+
return 7 /* CloseStuckStakeAccount */;
|
|
2830
2803
|
}
|
|
2831
2804
|
if (containsBytes(
|
|
2832
2805
|
data,
|
|
2833
2806
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2834
|
-
new Uint8Array([
|
|
2807
|
+
new Uint8Array([171, 229, 236, 216, 122, 118, 188, 103])
|
|
2835
2808
|
),
|
|
2836
2809
|
0
|
|
2837
2810
|
)) {
|
|
2838
|
-
return 8 /*
|
|
2811
|
+
return 8 /* CloseUnrevealedStakeAccount */;
|
|
2839
2812
|
}
|
|
2840
2813
|
if (containsBytes(
|
|
2841
2814
|
data,
|
|
2842
2815
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2843
|
-
new Uint8Array([
|
|
2816
|
+
new Uint8Array([103, 226, 97, 235, 200, 188, 251, 254])
|
|
2844
2817
|
),
|
|
2845
2818
|
0
|
|
2846
2819
|
)) {
|
|
2847
|
-
return 9 /*
|
|
2820
|
+
return 9 /* CreateMarket */;
|
|
2848
2821
|
}
|
|
2849
2822
|
if (containsBytes(
|
|
2850
2823
|
data,
|
|
2851
2824
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2852
|
-
new Uint8Array([
|
|
2825
|
+
new Uint8Array([144, 81, 42, 65, 127, 60, 134, 92])
|
|
2853
2826
|
),
|
|
2854
2827
|
0
|
|
2855
2828
|
)) {
|
|
2856
|
-
return 10 /*
|
|
2829
|
+
return 10 /* EndRevealPeriod */;
|
|
2857
2830
|
}
|
|
2858
2831
|
if (containsBytes(
|
|
2859
2832
|
data,
|
|
2860
2833
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2861
|
-
new Uint8Array([
|
|
2834
|
+
new Uint8Array([92, 201, 94, 219, 117, 53, 255, 230])
|
|
2862
2835
|
),
|
|
2863
2836
|
0
|
|
2864
2837
|
)) {
|
|
2865
|
-
return 11 /*
|
|
2838
|
+
return 11 /* FinalizeRevealStake */;
|
|
2866
2839
|
}
|
|
2867
2840
|
if (containsBytes(
|
|
2868
2841
|
data,
|
|
2869
2842
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2870
|
-
new Uint8Array([
|
|
2843
|
+
new Uint8Array([215, 70, 3, 5, 42, 229, 151, 10])
|
|
2871
2844
|
),
|
|
2872
2845
|
0
|
|
2873
2846
|
)) {
|
|
2874
|
-
return 12 /*
|
|
2847
|
+
return 12 /* InitAllowedMint */;
|
|
2875
2848
|
}
|
|
2876
2849
|
if (containsBytes(
|
|
2877
2850
|
data,
|
|
2878
2851
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2879
|
-
new Uint8Array([
|
|
2852
|
+
new Uint8Array([101, 52, 47, 49, 156, 16, 32, 118])
|
|
2880
2853
|
),
|
|
2881
2854
|
0
|
|
2882
2855
|
)) {
|
|
2883
|
-
return 13 /*
|
|
2856
|
+
return 13 /* InitPlatformConfig */;
|
|
2884
2857
|
}
|
|
2885
2858
|
if (containsBytes(
|
|
2886
2859
|
data,
|
|
2887
2860
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2888
|
-
new Uint8Array([
|
|
2861
|
+
new Uint8Array([132, 171, 255, 149, 163, 37, 220, 45])
|
|
2889
2862
|
),
|
|
2890
2863
|
0
|
|
2891
2864
|
)) {
|
|
2892
|
-
return 14 /*
|
|
2865
|
+
return 14 /* InitStakeAccount */;
|
|
2893
2866
|
}
|
|
2894
2867
|
if (containsBytes(
|
|
2895
2868
|
data,
|
|
2896
2869
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2897
|
-
new Uint8Array([
|
|
2870
|
+
new Uint8Array([116, 19, 123, 75, 217, 244, 69, 44])
|
|
2898
2871
|
),
|
|
2899
2872
|
0
|
|
2900
2873
|
)) {
|
|
2901
|
-
return 15 /*
|
|
2874
|
+
return 15 /* OpenMarket */;
|
|
2902
2875
|
}
|
|
2903
2876
|
if (containsBytes(
|
|
2904
2877
|
data,
|
|
2905
2878
|
fixEncoderSize8(getBytesEncoder8(), 8).encode(
|
|
2906
|
-
new Uint8Array([
|
|
2879
|
+
new Uint8Array([155, 23, 80, 173, 46, 74, 23, 239])
|
|
2907
2880
|
),
|
|
2908
2881
|
0
|
|
2909
2882
|
)) {
|
|
2910
|
-
return 16 /*
|
|
2883
|
+
return 16 /* ResolveMarket */;
|
|
2911
2884
|
}
|
|
2912
2885
|
if (containsBytes(
|
|
2913
2886
|
data,
|
|
@@ -3049,16 +3022,15 @@ var OPPORTUNITY_MARKET_ERROR__LOCKED = 6022;
|
|
|
3049
3022
|
var OPPORTUNITY_MARKET_ERROR__INVALID_ACCOUNT_STATE = 6023;
|
|
3050
3023
|
var OPPORTUNITY_MARKET_ERROR__NO_FEES_TO_CLAIM = 6024;
|
|
3051
3024
|
var OPPORTUNITY_MARKET_ERROR__STAKE_NOT_STUCK = 6025;
|
|
3052
|
-
var
|
|
3053
|
-
var
|
|
3054
|
-
var
|
|
3055
|
-
var
|
|
3056
|
-
var
|
|
3057
|
-
var
|
|
3058
|
-
var
|
|
3059
|
-
var
|
|
3060
|
-
var
|
|
3061
|
-
var OPPORTUNITY_MARKET_ERROR__REWARD_ALREADY_CLAIMED = 6035;
|
|
3025
|
+
var OPPORTUNITY_MARKET_ERROR__STAKE_BELOW_MINIMUM = 6026;
|
|
3026
|
+
var OPPORTUNITY_MARKET_ERROR__SELECT_OPTIONS_DEADLINE_PASSED = 6027;
|
|
3027
|
+
var OPPORTUNITY_MARKET_ERROR__INVALID_FEE_RATES = 6028;
|
|
3028
|
+
var OPPORTUNITY_MARKET_ERROR__OPTION_STILL_NEEDED = 6029;
|
|
3029
|
+
var OPPORTUNITY_MARKET_ERROR__CREATOR_MISMATCH = 6030;
|
|
3030
|
+
var OPPORTUNITY_MARKET_ERROR__REVEAL_PERIOD_NOT_OVER = 6031;
|
|
3031
|
+
var OPPORTUNITY_MARKET_ERROR__NO_FINALIZED_WINNING_OPTION = 6032;
|
|
3032
|
+
var OPPORTUNITY_MARKET_ERROR__NO_REWARD_TO_CLAIM = 6033;
|
|
3033
|
+
var OPPORTUNITY_MARKET_ERROR__REWARD_ALREADY_CLAIMED = 6034;
|
|
3062
3034
|
var opportunityMarketErrorMessages;
|
|
3063
3035
|
if (true) {
|
|
3064
3036
|
opportunityMarketErrorMessages = {
|
|
@@ -3079,10 +3051,9 @@ if (true) {
|
|
|
3079
3051
|
[OPPORTUNITY_MARKET_ERROR__LOCKED]: `Account is locked`,
|
|
3080
3052
|
[OPPORTUNITY_MARKET_ERROR__MARKET_ALREADY_OPEN]: `Market is already open`,
|
|
3081
3053
|
[OPPORTUNITY_MARKET_ERROR__MARKET_NOT_OPEN]: `Market is not open`,
|
|
3082
|
-
[OPPORTUNITY_MARKET_ERROR__MARKET_NOT_PAUSED]: `Market is not paused`,
|
|
3083
3054
|
[OPPORTUNITY_MARKET_ERROR__MARKET_NOT_RESOLVED]: `Market not yet resolved`,
|
|
3084
|
-
[OPPORTUNITY_MARKET_ERROR__MARKET_PAUSED]: `Market staking is currently paused`,
|
|
3085
3055
|
[OPPORTUNITY_MARKET_ERROR__NO_FEES_TO_CLAIM]: `No fees to claim`,
|
|
3056
|
+
[OPPORTUNITY_MARKET_ERROR__NO_FINALIZED_WINNING_OPTION]: `No winning option has a finalized stake`,
|
|
3086
3057
|
[OPPORTUNITY_MARKET_ERROR__NO_REWARD_TO_CLAIM]: `No reward to claim`,
|
|
3087
3058
|
[OPPORTUNITY_MARKET_ERROR__NO_STAKE]: `Stake account has no recorded stake`,
|
|
3088
3059
|
[OPPORTUNITY_MARKET_ERROR__NOT_REVEALED]: `Stake not yet revealed`,
|
|
@@ -3117,17 +3088,17 @@ function isOpportunityMarketError(error, transactionMessage, code) {
|
|
|
3117
3088
|
|
|
3118
3089
|
// src/generated/instructions/addMarketOption.ts
|
|
3119
3090
|
import {
|
|
3120
|
-
combineCodec as
|
|
3091
|
+
combineCodec as combineCodec56,
|
|
3121
3092
|
fixDecoderSize as fixDecoderSize8,
|
|
3122
3093
|
fixEncoderSize as fixEncoderSize9,
|
|
3123
|
-
getAddressEncoder as
|
|
3094
|
+
getAddressEncoder as getAddressEncoder32,
|
|
3124
3095
|
getBytesDecoder as getBytesDecoder8,
|
|
3125
3096
|
getBytesEncoder as getBytesEncoder9,
|
|
3126
3097
|
getProgramDerivedAddress,
|
|
3127
|
-
getStructDecoder as
|
|
3128
|
-
getStructEncoder as
|
|
3129
|
-
getU64Decoder as
|
|
3130
|
-
getU64Encoder as
|
|
3098
|
+
getStructDecoder as getStructDecoder50,
|
|
3099
|
+
getStructEncoder as getStructEncoder50,
|
|
3100
|
+
getU64Decoder as getU64Decoder30,
|
|
3101
|
+
getU64Encoder as getU64Encoder30,
|
|
3131
3102
|
transformEncoder as transformEncoder8
|
|
3132
3103
|
} from "@solana/kit";
|
|
3133
3104
|
|
|
@@ -3195,21 +3166,21 @@ function getAddMarketOptionDiscriminatorBytes() {
|
|
|
3195
3166
|
}
|
|
3196
3167
|
function getAddMarketOptionInstructionDataEncoder() {
|
|
3197
3168
|
return transformEncoder8(
|
|
3198
|
-
|
|
3169
|
+
getStructEncoder50([
|
|
3199
3170
|
["discriminator", fixEncoderSize9(getBytesEncoder9(), 8)],
|
|
3200
|
-
["optionId",
|
|
3171
|
+
["optionId", getU64Encoder30()]
|
|
3201
3172
|
]),
|
|
3202
3173
|
(value) => ({ ...value, discriminator: ADD_MARKET_OPTION_DISCRIMINATOR })
|
|
3203
3174
|
);
|
|
3204
3175
|
}
|
|
3205
3176
|
function getAddMarketOptionInstructionDataDecoder() {
|
|
3206
|
-
return
|
|
3177
|
+
return getStructDecoder50([
|
|
3207
3178
|
["discriminator", fixDecoderSize8(getBytesDecoder8(), 8)],
|
|
3208
|
-
["optionId",
|
|
3179
|
+
["optionId", getU64Decoder30()]
|
|
3209
3180
|
]);
|
|
3210
3181
|
}
|
|
3211
3182
|
function getAddMarketOptionInstructionDataCodec() {
|
|
3212
|
-
return
|
|
3183
|
+
return combineCodec56(
|
|
3213
3184
|
getAddMarketOptionInstructionDataEncoder(),
|
|
3214
3185
|
getAddMarketOptionInstructionDataDecoder()
|
|
3215
3186
|
);
|
|
@@ -3231,8 +3202,8 @@ async function getAddMarketOptionInstructionAsync(input, config) {
|
|
|
3231
3202
|
getBytesEncoder9().encode(
|
|
3232
3203
|
new Uint8Array([111, 112, 116, 105, 111, 110])
|
|
3233
3204
|
),
|
|
3234
|
-
|
|
3235
|
-
|
|
3205
|
+
getAddressEncoder32().encode(expectAddress(accounts.market.value)),
|
|
3206
|
+
getU64Encoder30().encode(expectSome(args.optionId))
|
|
3236
3207
|
]
|
|
3237
3208
|
});
|
|
3238
3209
|
}
|
|
@@ -3304,19 +3275,17 @@ function parseAddMarketOptionInstruction(instruction) {
|
|
|
3304
3275
|
|
|
3305
3276
|
// src/generated/instructions/addReward.ts
|
|
3306
3277
|
import {
|
|
3307
|
-
combineCodec as
|
|
3278
|
+
combineCodec as combineCodec57,
|
|
3308
3279
|
fixDecoderSize as fixDecoderSize9,
|
|
3309
3280
|
fixEncoderSize as fixEncoderSize10,
|
|
3310
|
-
getAddressEncoder as
|
|
3311
|
-
getBooleanDecoder as getBooleanDecoder9,
|
|
3312
|
-
getBooleanEncoder as getBooleanEncoder9,
|
|
3281
|
+
getAddressEncoder as getAddressEncoder33,
|
|
3313
3282
|
getBytesDecoder as getBytesDecoder9,
|
|
3314
3283
|
getBytesEncoder as getBytesEncoder10,
|
|
3315
3284
|
getProgramDerivedAddress as getProgramDerivedAddress2,
|
|
3316
|
-
getStructDecoder as
|
|
3317
|
-
getStructEncoder as
|
|
3318
|
-
getU64Decoder as
|
|
3319
|
-
getU64Encoder as
|
|
3285
|
+
getStructDecoder as getStructDecoder51,
|
|
3286
|
+
getStructEncoder as getStructEncoder51,
|
|
3287
|
+
getU64Decoder as getU64Decoder31,
|
|
3288
|
+
getU64Encoder as getU64Encoder31,
|
|
3320
3289
|
transformEncoder as transformEncoder9
|
|
3321
3290
|
} from "@solana/kit";
|
|
3322
3291
|
var ADD_REWARD_DISCRIMINATOR = new Uint8Array([
|
|
@@ -3334,23 +3303,21 @@ function getAddRewardDiscriminatorBytes() {
|
|
|
3334
3303
|
}
|
|
3335
3304
|
function getAddRewardInstructionDataEncoder() {
|
|
3336
3305
|
return transformEncoder9(
|
|
3337
|
-
|
|
3306
|
+
getStructEncoder51([
|
|
3338
3307
|
["discriminator", fixEncoderSize10(getBytesEncoder10(), 8)],
|
|
3339
|
-
["amount",
|
|
3340
|
-
["lock", getBooleanEncoder9()]
|
|
3308
|
+
["amount", getU64Encoder31()]
|
|
3341
3309
|
]),
|
|
3342
3310
|
(value) => ({ ...value, discriminator: ADD_REWARD_DISCRIMINATOR })
|
|
3343
3311
|
);
|
|
3344
3312
|
}
|
|
3345
3313
|
function getAddRewardInstructionDataDecoder() {
|
|
3346
|
-
return
|
|
3314
|
+
return getStructDecoder51([
|
|
3347
3315
|
["discriminator", fixDecoderSize9(getBytesDecoder9(), 8)],
|
|
3348
|
-
["amount",
|
|
3349
|
-
["lock", getBooleanDecoder9()]
|
|
3316
|
+
["amount", getU64Decoder31()]
|
|
3350
3317
|
]);
|
|
3351
3318
|
}
|
|
3352
3319
|
function getAddRewardInstructionDataCodec() {
|
|
3353
|
-
return
|
|
3320
|
+
return combineCodec57(
|
|
3354
3321
|
getAddRewardInstructionDataEncoder(),
|
|
3355
3322
|
getAddRewardInstructionDataDecoder()
|
|
3356
3323
|
);
|
|
@@ -3379,8 +3346,8 @@ async function getAddRewardInstructionAsync(input, config) {
|
|
|
3379
3346
|
getBytesEncoder10().encode(
|
|
3380
3347
|
new Uint8Array([115, 112, 111, 110, 115, 111, 114])
|
|
3381
3348
|
),
|
|
3382
|
-
|
|
3383
|
-
|
|
3349
|
+
getAddressEncoder33().encode(expectAddress(accounts.sponsor.value)),
|
|
3350
|
+
getAddressEncoder33().encode(expectAddress(accounts.market.value))
|
|
3384
3351
|
]
|
|
3385
3352
|
});
|
|
3386
3353
|
}
|
|
@@ -3388,9 +3355,9 @@ async function getAddRewardInstructionAsync(input, config) {
|
|
|
3388
3355
|
accounts.marketTokenAta.value = await getProgramDerivedAddress2({
|
|
3389
3356
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
3390
3357
|
seeds: [
|
|
3391
|
-
|
|
3392
|
-
|
|
3393
|
-
|
|
3358
|
+
getAddressEncoder33().encode(expectAddress(accounts.market.value)),
|
|
3359
|
+
getAddressEncoder33().encode(expectAddress(accounts.tokenProgram.value)),
|
|
3360
|
+
getAddressEncoder33().encode(expectAddress(accounts.tokenMint.value))
|
|
3394
3361
|
]
|
|
3395
3362
|
});
|
|
3396
3363
|
}
|
|
@@ -3481,15 +3448,15 @@ function parseAddRewardInstruction(instruction) {
|
|
|
3481
3448
|
|
|
3482
3449
|
// src/generated/instructions/claimCreatorFees.ts
|
|
3483
3450
|
import {
|
|
3484
|
-
combineCodec as
|
|
3451
|
+
combineCodec as combineCodec58,
|
|
3485
3452
|
fixDecoderSize as fixDecoderSize10,
|
|
3486
3453
|
fixEncoderSize as fixEncoderSize11,
|
|
3487
|
-
getAddressEncoder as
|
|
3454
|
+
getAddressEncoder as getAddressEncoder34,
|
|
3488
3455
|
getBytesDecoder as getBytesDecoder10,
|
|
3489
3456
|
getBytesEncoder as getBytesEncoder11,
|
|
3490
3457
|
getProgramDerivedAddress as getProgramDerivedAddress3,
|
|
3491
|
-
getStructDecoder as
|
|
3492
|
-
getStructEncoder as
|
|
3458
|
+
getStructDecoder as getStructDecoder52,
|
|
3459
|
+
getStructEncoder as getStructEncoder52,
|
|
3493
3460
|
transformEncoder as transformEncoder10
|
|
3494
3461
|
} from "@solana/kit";
|
|
3495
3462
|
var CLAIM_CREATOR_FEES_DISCRIMINATOR = new Uint8Array([
|
|
@@ -3509,17 +3476,17 @@ function getClaimCreatorFeesDiscriminatorBytes() {
|
|
|
3509
3476
|
}
|
|
3510
3477
|
function getClaimCreatorFeesInstructionDataEncoder() {
|
|
3511
3478
|
return transformEncoder10(
|
|
3512
|
-
|
|
3479
|
+
getStructEncoder52([["discriminator", fixEncoderSize11(getBytesEncoder11(), 8)]]),
|
|
3513
3480
|
(value) => ({ ...value, discriminator: CLAIM_CREATOR_FEES_DISCRIMINATOR })
|
|
3514
3481
|
);
|
|
3515
3482
|
}
|
|
3516
3483
|
function getClaimCreatorFeesInstructionDataDecoder() {
|
|
3517
|
-
return
|
|
3484
|
+
return getStructDecoder52([
|
|
3518
3485
|
["discriminator", fixDecoderSize10(getBytesDecoder10(), 8)]
|
|
3519
3486
|
]);
|
|
3520
3487
|
}
|
|
3521
3488
|
function getClaimCreatorFeesInstructionDataCodec() {
|
|
3522
|
-
return
|
|
3489
|
+
return combineCodec58(
|
|
3523
3490
|
getClaimCreatorFeesInstructionDataEncoder(),
|
|
3524
3491
|
getClaimCreatorFeesInstructionDataDecoder()
|
|
3525
3492
|
);
|
|
@@ -3542,9 +3509,9 @@ async function getClaimCreatorFeesInstructionAsync(input, config) {
|
|
|
3542
3509
|
accounts.marketTokenAta.value = await getProgramDerivedAddress3({
|
|
3543
3510
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
3544
3511
|
seeds: [
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3512
|
+
getAddressEncoder34().encode(expectAddress(accounts.market.value)),
|
|
3513
|
+
getAddressEncoder34().encode(expectAddress(accounts.tokenProgram.value)),
|
|
3514
|
+
getAddressEncoder34().encode(expectAddress(accounts.tokenMint.value))
|
|
3548
3515
|
]
|
|
3549
3516
|
});
|
|
3550
3517
|
}
|
|
@@ -3616,15 +3583,15 @@ function parseClaimCreatorFeesInstruction(instruction) {
|
|
|
3616
3583
|
|
|
3617
3584
|
// src/generated/instructions/claimFees.ts
|
|
3618
3585
|
import {
|
|
3619
|
-
combineCodec as
|
|
3586
|
+
combineCodec as combineCodec59,
|
|
3620
3587
|
fixDecoderSize as fixDecoderSize11,
|
|
3621
3588
|
fixEncoderSize as fixEncoderSize12,
|
|
3622
|
-
getAddressEncoder as
|
|
3589
|
+
getAddressEncoder as getAddressEncoder35,
|
|
3623
3590
|
getBytesDecoder as getBytesDecoder11,
|
|
3624
3591
|
getBytesEncoder as getBytesEncoder12,
|
|
3625
3592
|
getProgramDerivedAddress as getProgramDerivedAddress4,
|
|
3626
|
-
getStructDecoder as
|
|
3627
|
-
getStructEncoder as
|
|
3593
|
+
getStructDecoder as getStructDecoder53,
|
|
3594
|
+
getStructEncoder as getStructEncoder53,
|
|
3628
3595
|
transformEncoder as transformEncoder11
|
|
3629
3596
|
} from "@solana/kit";
|
|
3630
3597
|
var CLAIM_FEES_DISCRIMINATOR = new Uint8Array([
|
|
@@ -3642,17 +3609,17 @@ function getClaimFeesDiscriminatorBytes() {
|
|
|
3642
3609
|
}
|
|
3643
3610
|
function getClaimFeesInstructionDataEncoder() {
|
|
3644
3611
|
return transformEncoder11(
|
|
3645
|
-
|
|
3612
|
+
getStructEncoder53([["discriminator", fixEncoderSize12(getBytesEncoder12(), 8)]]),
|
|
3646
3613
|
(value) => ({ ...value, discriminator: CLAIM_FEES_DISCRIMINATOR })
|
|
3647
3614
|
);
|
|
3648
3615
|
}
|
|
3649
3616
|
function getClaimFeesInstructionDataDecoder() {
|
|
3650
|
-
return
|
|
3617
|
+
return getStructDecoder53([
|
|
3651
3618
|
["discriminator", fixDecoderSize11(getBytesDecoder11(), 8)]
|
|
3652
3619
|
]);
|
|
3653
3620
|
}
|
|
3654
3621
|
function getClaimFeesInstructionDataCodec() {
|
|
3655
|
-
return
|
|
3622
|
+
return combineCodec59(
|
|
3656
3623
|
getClaimFeesInstructionDataEncoder(),
|
|
3657
3624
|
getClaimFeesInstructionDataDecoder()
|
|
3658
3625
|
);
|
|
@@ -3676,9 +3643,9 @@ async function getClaimFeesInstructionAsync(input, config) {
|
|
|
3676
3643
|
accounts.marketTokenAta.value = await getProgramDerivedAddress4({
|
|
3677
3644
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
3678
3645
|
seeds: [
|
|
3679
|
-
|
|
3680
|
-
|
|
3681
|
-
|
|
3646
|
+
getAddressEncoder35().encode(expectAddress(accounts.market.value)),
|
|
3647
|
+
getAddressEncoder35().encode(expectAddress(accounts.tokenProgram.value)),
|
|
3648
|
+
getAddressEncoder35().encode(expectAddress(accounts.tokenMint.value))
|
|
3682
3649
|
]
|
|
3683
3650
|
});
|
|
3684
3651
|
}
|
|
@@ -3752,20 +3719,165 @@ function parseClaimFeesInstruction(instruction) {
|
|
|
3752
3719
|
};
|
|
3753
3720
|
}
|
|
3754
3721
|
|
|
3755
|
-
// src/generated/instructions/
|
|
3722
|
+
// src/generated/instructions/claimRewards.ts
|
|
3756
3723
|
import {
|
|
3757
|
-
combineCodec as
|
|
3724
|
+
combineCodec as combineCodec60,
|
|
3758
3725
|
fixDecoderSize as fixDecoderSize12,
|
|
3759
3726
|
fixEncoderSize as fixEncoderSize13,
|
|
3760
|
-
getAddressEncoder as
|
|
3727
|
+
getAddressEncoder as getAddressEncoder36,
|
|
3761
3728
|
getBytesDecoder as getBytesDecoder12,
|
|
3762
3729
|
getBytesEncoder as getBytesEncoder13,
|
|
3763
3730
|
getProgramDerivedAddress as getProgramDerivedAddress5,
|
|
3731
|
+
getStructDecoder as getStructDecoder54,
|
|
3732
|
+
getStructEncoder as getStructEncoder54,
|
|
3733
|
+
transformEncoder as transformEncoder12
|
|
3734
|
+
} from "@solana/kit";
|
|
3735
|
+
var CLAIM_REWARDS_DISCRIMINATOR = new Uint8Array([
|
|
3736
|
+
4,
|
|
3737
|
+
144,
|
|
3738
|
+
132,
|
|
3739
|
+
71,
|
|
3740
|
+
116,
|
|
3741
|
+
23,
|
|
3742
|
+
151,
|
|
3743
|
+
80
|
|
3744
|
+
]);
|
|
3745
|
+
function getClaimRewardsDiscriminatorBytes() {
|
|
3746
|
+
return fixEncoderSize13(getBytesEncoder13(), 8).encode(
|
|
3747
|
+
CLAIM_REWARDS_DISCRIMINATOR
|
|
3748
|
+
);
|
|
3749
|
+
}
|
|
3750
|
+
function getClaimRewardsInstructionDataEncoder() {
|
|
3751
|
+
return transformEncoder12(
|
|
3752
|
+
getStructEncoder54([["discriminator", fixEncoderSize13(getBytesEncoder13(), 8)]]),
|
|
3753
|
+
(value) => ({ ...value, discriminator: CLAIM_REWARDS_DISCRIMINATOR })
|
|
3754
|
+
);
|
|
3755
|
+
}
|
|
3756
|
+
function getClaimRewardsInstructionDataDecoder() {
|
|
3757
|
+
return getStructDecoder54([
|
|
3758
|
+
["discriminator", fixDecoderSize12(getBytesDecoder12(), 8)]
|
|
3759
|
+
]);
|
|
3760
|
+
}
|
|
3761
|
+
function getClaimRewardsInstructionDataCodec() {
|
|
3762
|
+
return combineCodec60(
|
|
3763
|
+
getClaimRewardsInstructionDataEncoder(),
|
|
3764
|
+
getClaimRewardsInstructionDataDecoder()
|
|
3765
|
+
);
|
|
3766
|
+
}
|
|
3767
|
+
async function getClaimRewardsInstructionAsync(input, config) {
|
|
3768
|
+
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
3769
|
+
const originalAccounts = {
|
|
3770
|
+
owner: { value: input.owner ?? null, isWritable: true },
|
|
3771
|
+
market: { value: input.market ?? null, isWritable: true },
|
|
3772
|
+
stakeAccount: { value: input.stakeAccount ?? null, isWritable: true },
|
|
3773
|
+
option: { value: input.option ?? null, isWritable: true },
|
|
3774
|
+
tokenMint: { value: input.tokenMint ?? null, isWritable: false },
|
|
3775
|
+
marketTokenAta: { value: input.marketTokenAta ?? null, isWritable: true },
|
|
3776
|
+
ownerTokenAccount: {
|
|
3777
|
+
value: input.ownerTokenAccount ?? null,
|
|
3778
|
+
isWritable: true
|
|
3779
|
+
},
|
|
3780
|
+
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false }
|
|
3781
|
+
};
|
|
3782
|
+
const accounts = originalAccounts;
|
|
3783
|
+
if (!accounts.marketTokenAta.value) {
|
|
3784
|
+
accounts.marketTokenAta.value = await getProgramDerivedAddress5({
|
|
3785
|
+
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
3786
|
+
seeds: [
|
|
3787
|
+
getAddressEncoder36().encode(expectAddress(accounts.market.value)),
|
|
3788
|
+
getAddressEncoder36().encode(expectAddress(accounts.tokenProgram.value)),
|
|
3789
|
+
getAddressEncoder36().encode(expectAddress(accounts.tokenMint.value))
|
|
3790
|
+
]
|
|
3791
|
+
});
|
|
3792
|
+
}
|
|
3793
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
3794
|
+
return Object.freeze({
|
|
3795
|
+
accounts: [
|
|
3796
|
+
getAccountMeta(accounts.owner),
|
|
3797
|
+
getAccountMeta(accounts.market),
|
|
3798
|
+
getAccountMeta(accounts.stakeAccount),
|
|
3799
|
+
getAccountMeta(accounts.option),
|
|
3800
|
+
getAccountMeta(accounts.tokenMint),
|
|
3801
|
+
getAccountMeta(accounts.marketTokenAta),
|
|
3802
|
+
getAccountMeta(accounts.ownerTokenAccount),
|
|
3803
|
+
getAccountMeta(accounts.tokenProgram)
|
|
3804
|
+
],
|
|
3805
|
+
data: getClaimRewardsInstructionDataEncoder().encode({}),
|
|
3806
|
+
programAddress
|
|
3807
|
+
});
|
|
3808
|
+
}
|
|
3809
|
+
function getClaimRewardsInstruction(input, config) {
|
|
3810
|
+
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
3811
|
+
const originalAccounts = {
|
|
3812
|
+
owner: { value: input.owner ?? null, isWritable: true },
|
|
3813
|
+
market: { value: input.market ?? null, isWritable: true },
|
|
3814
|
+
stakeAccount: { value: input.stakeAccount ?? null, isWritable: true },
|
|
3815
|
+
option: { value: input.option ?? null, isWritable: true },
|
|
3816
|
+
tokenMint: { value: input.tokenMint ?? null, isWritable: false },
|
|
3817
|
+
marketTokenAta: { value: input.marketTokenAta ?? null, isWritable: true },
|
|
3818
|
+
ownerTokenAccount: {
|
|
3819
|
+
value: input.ownerTokenAccount ?? null,
|
|
3820
|
+
isWritable: true
|
|
3821
|
+
},
|
|
3822
|
+
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false }
|
|
3823
|
+
};
|
|
3824
|
+
const accounts = originalAccounts;
|
|
3825
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
3826
|
+
return Object.freeze({
|
|
3827
|
+
accounts: [
|
|
3828
|
+
getAccountMeta(accounts.owner),
|
|
3829
|
+
getAccountMeta(accounts.market),
|
|
3830
|
+
getAccountMeta(accounts.stakeAccount),
|
|
3831
|
+
getAccountMeta(accounts.option),
|
|
3832
|
+
getAccountMeta(accounts.tokenMint),
|
|
3833
|
+
getAccountMeta(accounts.marketTokenAta),
|
|
3834
|
+
getAccountMeta(accounts.ownerTokenAccount),
|
|
3835
|
+
getAccountMeta(accounts.tokenProgram)
|
|
3836
|
+
],
|
|
3837
|
+
data: getClaimRewardsInstructionDataEncoder().encode({}),
|
|
3838
|
+
programAddress
|
|
3839
|
+
});
|
|
3840
|
+
}
|
|
3841
|
+
function parseClaimRewardsInstruction(instruction) {
|
|
3842
|
+
if (instruction.accounts.length < 8) {
|
|
3843
|
+
throw new Error("Not enough accounts");
|
|
3844
|
+
}
|
|
3845
|
+
let accountIndex = 0;
|
|
3846
|
+
const getNextAccount = () => {
|
|
3847
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
3848
|
+
accountIndex += 1;
|
|
3849
|
+
return accountMeta;
|
|
3850
|
+
};
|
|
3851
|
+
return {
|
|
3852
|
+
programAddress: instruction.programAddress,
|
|
3853
|
+
accounts: {
|
|
3854
|
+
owner: getNextAccount(),
|
|
3855
|
+
market: getNextAccount(),
|
|
3856
|
+
stakeAccount: getNextAccount(),
|
|
3857
|
+
option: getNextAccount(),
|
|
3858
|
+
tokenMint: getNextAccount(),
|
|
3859
|
+
marketTokenAta: getNextAccount(),
|
|
3860
|
+
ownerTokenAccount: getNextAccount(),
|
|
3861
|
+
tokenProgram: getNextAccount()
|
|
3862
|
+
},
|
|
3863
|
+
data: getClaimRewardsInstructionDataDecoder().decode(instruction.data)
|
|
3864
|
+
};
|
|
3865
|
+
}
|
|
3866
|
+
|
|
3867
|
+
// src/generated/instructions/closeOptionAccount.ts
|
|
3868
|
+
import {
|
|
3869
|
+
combineCodec as combineCodec61,
|
|
3870
|
+
fixDecoderSize as fixDecoderSize13,
|
|
3871
|
+
fixEncoderSize as fixEncoderSize14,
|
|
3872
|
+
getAddressEncoder as getAddressEncoder37,
|
|
3873
|
+
getBytesDecoder as getBytesDecoder13,
|
|
3874
|
+
getBytesEncoder as getBytesEncoder14,
|
|
3875
|
+
getProgramDerivedAddress as getProgramDerivedAddress6,
|
|
3764
3876
|
getStructDecoder as getStructDecoder55,
|
|
3765
3877
|
getStructEncoder as getStructEncoder55,
|
|
3766
|
-
getU64Decoder as
|
|
3767
|
-
getU64Encoder as
|
|
3768
|
-
transformEncoder as
|
|
3878
|
+
getU64Decoder as getU64Decoder32,
|
|
3879
|
+
getU64Encoder as getU64Encoder32,
|
|
3880
|
+
transformEncoder as transformEncoder13
|
|
3769
3881
|
} from "@solana/kit";
|
|
3770
3882
|
var CLOSE_OPTION_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
3771
3883
|
46,
|
|
@@ -3778,23 +3890,23 @@ var CLOSE_OPTION_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
|
3778
3890
|
1
|
|
3779
3891
|
]);
|
|
3780
3892
|
function getCloseOptionAccountDiscriminatorBytes() {
|
|
3781
|
-
return
|
|
3893
|
+
return fixEncoderSize14(getBytesEncoder14(), 8).encode(
|
|
3782
3894
|
CLOSE_OPTION_ACCOUNT_DISCRIMINATOR
|
|
3783
3895
|
);
|
|
3784
3896
|
}
|
|
3785
3897
|
function getCloseOptionAccountInstructionDataEncoder() {
|
|
3786
|
-
return
|
|
3898
|
+
return transformEncoder13(
|
|
3787
3899
|
getStructEncoder55([
|
|
3788
|
-
["discriminator",
|
|
3789
|
-
["optionId",
|
|
3900
|
+
["discriminator", fixEncoderSize14(getBytesEncoder14(), 8)],
|
|
3901
|
+
["optionId", getU64Encoder32()]
|
|
3790
3902
|
]),
|
|
3791
3903
|
(value) => ({ ...value, discriminator: CLOSE_OPTION_ACCOUNT_DISCRIMINATOR })
|
|
3792
3904
|
);
|
|
3793
3905
|
}
|
|
3794
3906
|
function getCloseOptionAccountInstructionDataDecoder() {
|
|
3795
3907
|
return getStructDecoder55([
|
|
3796
|
-
["discriminator",
|
|
3797
|
-
["optionId",
|
|
3908
|
+
["discriminator", fixDecoderSize13(getBytesDecoder13(), 8)],
|
|
3909
|
+
["optionId", getU64Decoder32()]
|
|
3798
3910
|
]);
|
|
3799
3911
|
}
|
|
3800
3912
|
function getCloseOptionAccountInstructionDataCodec() {
|
|
@@ -3815,14 +3927,14 @@ async function getCloseOptionAccountInstructionAsync(input, config) {
|
|
|
3815
3927
|
const accounts = originalAccounts;
|
|
3816
3928
|
const args = { ...input };
|
|
3817
3929
|
if (!accounts.option.value) {
|
|
3818
|
-
accounts.option.value = await
|
|
3930
|
+
accounts.option.value = await getProgramDerivedAddress6({
|
|
3819
3931
|
programAddress,
|
|
3820
3932
|
seeds: [
|
|
3821
|
-
|
|
3933
|
+
getBytesEncoder14().encode(
|
|
3822
3934
|
new Uint8Array([111, 112, 116, 105, 111, 110])
|
|
3823
3935
|
),
|
|
3824
3936
|
getAddressEncoder37().encode(expectAddress(accounts.market.value)),
|
|
3825
|
-
|
|
3937
|
+
getU64Encoder32().encode(expectSome(args.optionId))
|
|
3826
3938
|
]
|
|
3827
3939
|
});
|
|
3828
3940
|
}
|
|
@@ -3901,19 +4013,15 @@ function parseCloseOptionAccountInstruction(instruction) {
|
|
|
3901
4013
|
// src/generated/instructions/closeStakeAccount.ts
|
|
3902
4014
|
import {
|
|
3903
4015
|
combineCodec as combineCodec62,
|
|
3904
|
-
fixDecoderSize as
|
|
3905
|
-
fixEncoderSize as
|
|
4016
|
+
fixDecoderSize as fixDecoderSize14,
|
|
4017
|
+
fixEncoderSize as fixEncoderSize15,
|
|
3906
4018
|
getAddressEncoder as getAddressEncoder38,
|
|
3907
|
-
getBytesDecoder as
|
|
3908
|
-
getBytesEncoder as
|
|
3909
|
-
getProgramDerivedAddress as
|
|
4019
|
+
getBytesDecoder as getBytesDecoder14,
|
|
4020
|
+
getBytesEncoder as getBytesEncoder15,
|
|
4021
|
+
getProgramDerivedAddress as getProgramDerivedAddress7,
|
|
3910
4022
|
getStructDecoder as getStructDecoder56,
|
|
3911
4023
|
getStructEncoder as getStructEncoder56,
|
|
3912
|
-
|
|
3913
|
-
getU32Encoder as getU32Encoder15,
|
|
3914
|
-
getU64Decoder as getU64Decoder32,
|
|
3915
|
-
getU64Encoder as getU64Encoder32,
|
|
3916
|
-
transformEncoder as transformEncoder13
|
|
4024
|
+
transformEncoder as transformEncoder14
|
|
3917
4025
|
} from "@solana/kit";
|
|
3918
4026
|
var CLOSE_STAKE_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
3919
4027
|
246,
|
|
@@ -3926,25 +4034,19 @@ var CLOSE_STAKE_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
|
3926
4034
|
12
|
|
3927
4035
|
]);
|
|
3928
4036
|
function getCloseStakeAccountDiscriminatorBytes() {
|
|
3929
|
-
return
|
|
4037
|
+
return fixEncoderSize15(getBytesEncoder15(), 8).encode(
|
|
3930
4038
|
CLOSE_STAKE_ACCOUNT_DISCRIMINATOR
|
|
3931
4039
|
);
|
|
3932
4040
|
}
|
|
3933
4041
|
function getCloseStakeAccountInstructionDataEncoder() {
|
|
3934
|
-
return
|
|
3935
|
-
getStructEncoder56([
|
|
3936
|
-
["discriminator", fixEncoderSize14(getBytesEncoder14(), 8)],
|
|
3937
|
-
["optionId", getU64Encoder32()],
|
|
3938
|
-
["stakeAccountId", getU32Encoder15()]
|
|
3939
|
-
]),
|
|
4042
|
+
return transformEncoder14(
|
|
4043
|
+
getStructEncoder56([["discriminator", fixEncoderSize15(getBytesEncoder15(), 8)]]),
|
|
3940
4044
|
(value) => ({ ...value, discriminator: CLOSE_STAKE_ACCOUNT_DISCRIMINATOR })
|
|
3941
4045
|
);
|
|
3942
4046
|
}
|
|
3943
4047
|
function getCloseStakeAccountInstructionDataDecoder() {
|
|
3944
4048
|
return getStructDecoder56([
|
|
3945
|
-
["discriminator",
|
|
3946
|
-
["optionId", getU64Decoder32()],
|
|
3947
|
-
["stakeAccountId", getU32Decoder15()]
|
|
4049
|
+
["discriminator", fixDecoderSize14(getBytesDecoder14(), 8)]
|
|
3948
4050
|
]);
|
|
3949
4051
|
}
|
|
3950
4052
|
function getCloseStakeAccountInstructionDataCodec() {
|
|
@@ -3970,48 +4072,8 @@ async function getCloseStakeAccountInstructionAsync(input, config) {
|
|
|
3970
4072
|
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
3971
4073
|
};
|
|
3972
4074
|
const accounts = originalAccounts;
|
|
3973
|
-
const args = { ...input };
|
|
3974
|
-
if (!accounts.stakeAccount.value) {
|
|
3975
|
-
accounts.stakeAccount.value = await getProgramDerivedAddress6({
|
|
3976
|
-
programAddress,
|
|
3977
|
-
seeds: [
|
|
3978
|
-
getBytesEncoder14().encode(
|
|
3979
|
-
new Uint8Array([
|
|
3980
|
-
115,
|
|
3981
|
-
116,
|
|
3982
|
-
97,
|
|
3983
|
-
107,
|
|
3984
|
-
101,
|
|
3985
|
-
95,
|
|
3986
|
-
97,
|
|
3987
|
-
99,
|
|
3988
|
-
99,
|
|
3989
|
-
111,
|
|
3990
|
-
117,
|
|
3991
|
-
110,
|
|
3992
|
-
116
|
|
3993
|
-
])
|
|
3994
|
-
),
|
|
3995
|
-
getAddressEncoder38().encode(expectAddress(accounts.owner.value)),
|
|
3996
|
-
getAddressEncoder38().encode(expectAddress(accounts.market.value)),
|
|
3997
|
-
getU32Encoder15().encode(expectSome(args.stakeAccountId))
|
|
3998
|
-
]
|
|
3999
|
-
});
|
|
4000
|
-
}
|
|
4001
|
-
if (!accounts.option.value) {
|
|
4002
|
-
accounts.option.value = await getProgramDerivedAddress6({
|
|
4003
|
-
programAddress,
|
|
4004
|
-
seeds: [
|
|
4005
|
-
getBytesEncoder14().encode(
|
|
4006
|
-
new Uint8Array([111, 112, 116, 105, 111, 110])
|
|
4007
|
-
),
|
|
4008
|
-
getAddressEncoder38().encode(expectAddress(accounts.market.value)),
|
|
4009
|
-
getU64Encoder32().encode(expectSome(args.optionId))
|
|
4010
|
-
]
|
|
4011
|
-
});
|
|
4012
|
-
}
|
|
4013
4075
|
if (!accounts.marketTokenAta.value) {
|
|
4014
|
-
accounts.marketTokenAta.value = await
|
|
4076
|
+
accounts.marketTokenAta.value = await getProgramDerivedAddress7({
|
|
4015
4077
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
4016
4078
|
seeds: [
|
|
4017
4079
|
getAddressEncoder38().encode(expectAddress(accounts.market.value)),
|
|
@@ -4036,9 +4098,7 @@ async function getCloseStakeAccountInstructionAsync(input, config) {
|
|
|
4036
4098
|
getAccountMeta(accounts.tokenProgram),
|
|
4037
4099
|
getAccountMeta(accounts.systemProgram)
|
|
4038
4100
|
],
|
|
4039
|
-
data: getCloseStakeAccountInstructionDataEncoder().encode(
|
|
4040
|
-
args
|
|
4041
|
-
),
|
|
4101
|
+
data: getCloseStakeAccountInstructionDataEncoder().encode({}),
|
|
4042
4102
|
programAddress
|
|
4043
4103
|
});
|
|
4044
4104
|
}
|
|
@@ -4059,7 +4119,6 @@ function getCloseStakeAccountInstruction(input, config) {
|
|
|
4059
4119
|
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
4060
4120
|
};
|
|
4061
4121
|
const accounts = originalAccounts;
|
|
4062
|
-
const args = { ...input };
|
|
4063
4122
|
if (!accounts.systemProgram.value) {
|
|
4064
4123
|
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
4065
4124
|
}
|
|
@@ -4076,9 +4135,7 @@ function getCloseStakeAccountInstruction(input, config) {
|
|
|
4076
4135
|
getAccountMeta(accounts.tokenProgram),
|
|
4077
4136
|
getAccountMeta(accounts.systemProgram)
|
|
4078
4137
|
],
|
|
4079
|
-
data: getCloseStakeAccountInstructionDataEncoder().encode(
|
|
4080
|
-
args
|
|
4081
|
-
),
|
|
4138
|
+
data: getCloseStakeAccountInstructionDataEncoder().encode({}),
|
|
4082
4139
|
programAddress
|
|
4083
4140
|
});
|
|
4084
4141
|
}
|
|
@@ -4112,17 +4169,17 @@ function parseCloseStakeAccountInstruction(instruction) {
|
|
|
4112
4169
|
// src/generated/instructions/closeStuckStakeAccount.ts
|
|
4113
4170
|
import {
|
|
4114
4171
|
combineCodec as combineCodec63,
|
|
4115
|
-
fixDecoderSize as
|
|
4116
|
-
fixEncoderSize as
|
|
4172
|
+
fixDecoderSize as fixDecoderSize15,
|
|
4173
|
+
fixEncoderSize as fixEncoderSize16,
|
|
4117
4174
|
getAddressEncoder as getAddressEncoder39,
|
|
4118
|
-
getBytesDecoder as
|
|
4119
|
-
getBytesEncoder as
|
|
4120
|
-
getProgramDerivedAddress as
|
|
4175
|
+
getBytesDecoder as getBytesDecoder15,
|
|
4176
|
+
getBytesEncoder as getBytesEncoder16,
|
|
4177
|
+
getProgramDerivedAddress as getProgramDerivedAddress8,
|
|
4121
4178
|
getStructDecoder as getStructDecoder57,
|
|
4122
4179
|
getStructEncoder as getStructEncoder57,
|
|
4123
4180
|
getU32Decoder as getU32Decoder16,
|
|
4124
4181
|
getU32Encoder as getU32Encoder16,
|
|
4125
|
-
transformEncoder as
|
|
4182
|
+
transformEncoder as transformEncoder15
|
|
4126
4183
|
} from "@solana/kit";
|
|
4127
4184
|
var CLOSE_STUCK_STAKE_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
4128
4185
|
41,
|
|
@@ -4135,14 +4192,14 @@ var CLOSE_STUCK_STAKE_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
|
4135
4192
|
181
|
|
4136
4193
|
]);
|
|
4137
4194
|
function getCloseStuckStakeAccountDiscriminatorBytes() {
|
|
4138
|
-
return
|
|
4195
|
+
return fixEncoderSize16(getBytesEncoder16(), 8).encode(
|
|
4139
4196
|
CLOSE_STUCK_STAKE_ACCOUNT_DISCRIMINATOR
|
|
4140
4197
|
);
|
|
4141
4198
|
}
|
|
4142
4199
|
function getCloseStuckStakeAccountInstructionDataEncoder() {
|
|
4143
|
-
return
|
|
4200
|
+
return transformEncoder15(
|
|
4144
4201
|
getStructEncoder57([
|
|
4145
|
-
["discriminator",
|
|
4202
|
+
["discriminator", fixEncoderSize16(getBytesEncoder16(), 8)],
|
|
4146
4203
|
["stakeAccountId", getU32Encoder16()]
|
|
4147
4204
|
]),
|
|
4148
4205
|
(value) => ({
|
|
@@ -4153,7 +4210,7 @@ function getCloseStuckStakeAccountInstructionDataEncoder() {
|
|
|
4153
4210
|
}
|
|
4154
4211
|
function getCloseStuckStakeAccountInstructionDataDecoder() {
|
|
4155
4212
|
return getStructDecoder57([
|
|
4156
|
-
["discriminator",
|
|
4213
|
+
["discriminator", fixDecoderSize15(getBytesDecoder15(), 8)],
|
|
4157
4214
|
["stakeAccountId", getU32Decoder16()]
|
|
4158
4215
|
]);
|
|
4159
4216
|
}
|
|
@@ -4181,10 +4238,10 @@ async function getCloseStuckStakeAccountInstructionAsync(input, config) {
|
|
|
4181
4238
|
const accounts = originalAccounts;
|
|
4182
4239
|
const args = { ...input };
|
|
4183
4240
|
if (!accounts.stakeAccount.value) {
|
|
4184
|
-
accounts.stakeAccount.value = await
|
|
4241
|
+
accounts.stakeAccount.value = await getProgramDerivedAddress8({
|
|
4185
4242
|
programAddress,
|
|
4186
4243
|
seeds: [
|
|
4187
|
-
|
|
4244
|
+
getBytesEncoder16().encode(
|
|
4188
4245
|
new Uint8Array([
|
|
4189
4246
|
115,
|
|
4190
4247
|
116,
|
|
@@ -4208,7 +4265,7 @@ async function getCloseStuckStakeAccountInstructionAsync(input, config) {
|
|
|
4208
4265
|
});
|
|
4209
4266
|
}
|
|
4210
4267
|
if (!accounts.marketTokenAta.value) {
|
|
4211
|
-
accounts.marketTokenAta.value = await
|
|
4268
|
+
accounts.marketTokenAta.value = await getProgramDerivedAddress8({
|
|
4212
4269
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
4213
4270
|
seeds: [
|
|
4214
4271
|
getAddressEncoder39().encode(expectAddress(accounts.market.value)),
|
|
@@ -4304,29 +4361,183 @@ function parseCloseStuckStakeAccountInstruction(instruction) {
|
|
|
4304
4361
|
};
|
|
4305
4362
|
}
|
|
4306
4363
|
|
|
4307
|
-
// src/generated/instructions/
|
|
4364
|
+
// src/generated/instructions/closeUnrevealedStakeAccount.ts
|
|
4308
4365
|
import {
|
|
4309
4366
|
combineCodec as combineCodec64,
|
|
4310
|
-
fixDecoderSize as
|
|
4311
|
-
fixEncoderSize as
|
|
4312
|
-
getAddressDecoder as getAddressDecoder33,
|
|
4367
|
+
fixDecoderSize as fixDecoderSize16,
|
|
4368
|
+
fixEncoderSize as fixEncoderSize17,
|
|
4313
4369
|
getAddressEncoder as getAddressEncoder40,
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
getBooleanEncoder as getBooleanEncoder10,
|
|
4318
|
-
getBytesDecoder as getBytesDecoder15,
|
|
4319
|
-
getBytesEncoder as getBytesEncoder16,
|
|
4320
|
-
getProgramDerivedAddress as getProgramDerivedAddress8,
|
|
4370
|
+
getBytesDecoder as getBytesDecoder16,
|
|
4371
|
+
getBytesEncoder as getBytesEncoder17,
|
|
4372
|
+
getProgramDerivedAddress as getProgramDerivedAddress9,
|
|
4321
4373
|
getStructDecoder as getStructDecoder58,
|
|
4322
4374
|
getStructEncoder as getStructEncoder58,
|
|
4375
|
+
transformEncoder as transformEncoder16
|
|
4376
|
+
} from "@solana/kit";
|
|
4377
|
+
var CLOSE_UNREVEALED_STAKE_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
4378
|
+
171,
|
|
4379
|
+
229,
|
|
4380
|
+
236,
|
|
4381
|
+
216,
|
|
4382
|
+
122,
|
|
4383
|
+
118,
|
|
4384
|
+
188,
|
|
4385
|
+
103
|
|
4386
|
+
]);
|
|
4387
|
+
function getCloseUnrevealedStakeAccountDiscriminatorBytes() {
|
|
4388
|
+
return fixEncoderSize17(getBytesEncoder17(), 8).encode(
|
|
4389
|
+
CLOSE_UNREVEALED_STAKE_ACCOUNT_DISCRIMINATOR
|
|
4390
|
+
);
|
|
4391
|
+
}
|
|
4392
|
+
function getCloseUnrevealedStakeAccountInstructionDataEncoder() {
|
|
4393
|
+
return transformEncoder16(
|
|
4394
|
+
getStructEncoder58([["discriminator", fixEncoderSize17(getBytesEncoder17(), 8)]]),
|
|
4395
|
+
(value) => ({
|
|
4396
|
+
...value,
|
|
4397
|
+
discriminator: CLOSE_UNREVEALED_STAKE_ACCOUNT_DISCRIMINATOR
|
|
4398
|
+
})
|
|
4399
|
+
);
|
|
4400
|
+
}
|
|
4401
|
+
function getCloseUnrevealedStakeAccountInstructionDataDecoder() {
|
|
4402
|
+
return getStructDecoder58([
|
|
4403
|
+
["discriminator", fixDecoderSize16(getBytesDecoder16(), 8)]
|
|
4404
|
+
]);
|
|
4405
|
+
}
|
|
4406
|
+
function getCloseUnrevealedStakeAccountInstructionDataCodec() {
|
|
4407
|
+
return combineCodec64(
|
|
4408
|
+
getCloseUnrevealedStakeAccountInstructionDataEncoder(),
|
|
4409
|
+
getCloseUnrevealedStakeAccountInstructionDataDecoder()
|
|
4410
|
+
);
|
|
4411
|
+
}
|
|
4412
|
+
async function getCloseUnrevealedStakeAccountInstructionAsync(input, config) {
|
|
4413
|
+
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
4414
|
+
const originalAccounts = {
|
|
4415
|
+
owner: { value: input.owner ?? null, isWritable: true },
|
|
4416
|
+
market: { value: input.market ?? null, isWritable: true },
|
|
4417
|
+
stakeAccount: { value: input.stakeAccount ?? null, isWritable: true },
|
|
4418
|
+
tokenMint: { value: input.tokenMint ?? null, isWritable: false },
|
|
4419
|
+
marketTokenAta: { value: input.marketTokenAta ?? null, isWritable: true },
|
|
4420
|
+
ownerTokenAccount: {
|
|
4421
|
+
value: input.ownerTokenAccount ?? null,
|
|
4422
|
+
isWritable: true
|
|
4423
|
+
},
|
|
4424
|
+
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
4425
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
4426
|
+
};
|
|
4427
|
+
const accounts = originalAccounts;
|
|
4428
|
+
if (!accounts.marketTokenAta.value) {
|
|
4429
|
+
accounts.marketTokenAta.value = await getProgramDerivedAddress9({
|
|
4430
|
+
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
4431
|
+
seeds: [
|
|
4432
|
+
getAddressEncoder40().encode(expectAddress(accounts.market.value)),
|
|
4433
|
+
getAddressEncoder40().encode(expectAddress(accounts.tokenProgram.value)),
|
|
4434
|
+
getAddressEncoder40().encode(expectAddress(accounts.tokenMint.value))
|
|
4435
|
+
]
|
|
4436
|
+
});
|
|
4437
|
+
}
|
|
4438
|
+
if (!accounts.systemProgram.value) {
|
|
4439
|
+
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
4440
|
+
}
|
|
4441
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
4442
|
+
return Object.freeze({
|
|
4443
|
+
accounts: [
|
|
4444
|
+
getAccountMeta(accounts.owner),
|
|
4445
|
+
getAccountMeta(accounts.market),
|
|
4446
|
+
getAccountMeta(accounts.stakeAccount),
|
|
4447
|
+
getAccountMeta(accounts.tokenMint),
|
|
4448
|
+
getAccountMeta(accounts.marketTokenAta),
|
|
4449
|
+
getAccountMeta(accounts.ownerTokenAccount),
|
|
4450
|
+
getAccountMeta(accounts.tokenProgram),
|
|
4451
|
+
getAccountMeta(accounts.systemProgram)
|
|
4452
|
+
],
|
|
4453
|
+
data: getCloseUnrevealedStakeAccountInstructionDataEncoder().encode({}),
|
|
4454
|
+
programAddress
|
|
4455
|
+
});
|
|
4456
|
+
}
|
|
4457
|
+
function getCloseUnrevealedStakeAccountInstruction(input, config) {
|
|
4458
|
+
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
4459
|
+
const originalAccounts = {
|
|
4460
|
+
owner: { value: input.owner ?? null, isWritable: true },
|
|
4461
|
+
market: { value: input.market ?? null, isWritable: true },
|
|
4462
|
+
stakeAccount: { value: input.stakeAccount ?? null, isWritable: true },
|
|
4463
|
+
tokenMint: { value: input.tokenMint ?? null, isWritable: false },
|
|
4464
|
+
marketTokenAta: { value: input.marketTokenAta ?? null, isWritable: true },
|
|
4465
|
+
ownerTokenAccount: {
|
|
4466
|
+
value: input.ownerTokenAccount ?? null,
|
|
4467
|
+
isWritable: true
|
|
4468
|
+
},
|
|
4469
|
+
tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
|
|
4470
|
+
systemProgram: { value: input.systemProgram ?? null, isWritable: false }
|
|
4471
|
+
};
|
|
4472
|
+
const accounts = originalAccounts;
|
|
4473
|
+
if (!accounts.systemProgram.value) {
|
|
4474
|
+
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
4475
|
+
}
|
|
4476
|
+
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
4477
|
+
return Object.freeze({
|
|
4478
|
+
accounts: [
|
|
4479
|
+
getAccountMeta(accounts.owner),
|
|
4480
|
+
getAccountMeta(accounts.market),
|
|
4481
|
+
getAccountMeta(accounts.stakeAccount),
|
|
4482
|
+
getAccountMeta(accounts.tokenMint),
|
|
4483
|
+
getAccountMeta(accounts.marketTokenAta),
|
|
4484
|
+
getAccountMeta(accounts.ownerTokenAccount),
|
|
4485
|
+
getAccountMeta(accounts.tokenProgram),
|
|
4486
|
+
getAccountMeta(accounts.systemProgram)
|
|
4487
|
+
],
|
|
4488
|
+
data: getCloseUnrevealedStakeAccountInstructionDataEncoder().encode({}),
|
|
4489
|
+
programAddress
|
|
4490
|
+
});
|
|
4491
|
+
}
|
|
4492
|
+
function parseCloseUnrevealedStakeAccountInstruction(instruction) {
|
|
4493
|
+
if (instruction.accounts.length < 8) {
|
|
4494
|
+
throw new Error("Not enough accounts");
|
|
4495
|
+
}
|
|
4496
|
+
let accountIndex = 0;
|
|
4497
|
+
const getNextAccount = () => {
|
|
4498
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
4499
|
+
accountIndex += 1;
|
|
4500
|
+
return accountMeta;
|
|
4501
|
+
};
|
|
4502
|
+
return {
|
|
4503
|
+
programAddress: instruction.programAddress,
|
|
4504
|
+
accounts: {
|
|
4505
|
+
owner: getNextAccount(),
|
|
4506
|
+
market: getNextAccount(),
|
|
4507
|
+
stakeAccount: getNextAccount(),
|
|
4508
|
+
tokenMint: getNextAccount(),
|
|
4509
|
+
marketTokenAta: getNextAccount(),
|
|
4510
|
+
ownerTokenAccount: getNextAccount(),
|
|
4511
|
+
tokenProgram: getNextAccount(),
|
|
4512
|
+
systemProgram: getNextAccount()
|
|
4513
|
+
},
|
|
4514
|
+
data: getCloseUnrevealedStakeAccountInstructionDataDecoder().decode(
|
|
4515
|
+
instruction.data
|
|
4516
|
+
)
|
|
4517
|
+
};
|
|
4518
|
+
}
|
|
4519
|
+
|
|
4520
|
+
// src/generated/instructions/createMarket.ts
|
|
4521
|
+
import {
|
|
4522
|
+
combineCodec as combineCodec65,
|
|
4523
|
+
fixDecoderSize as fixDecoderSize17,
|
|
4524
|
+
fixEncoderSize as fixEncoderSize18,
|
|
4525
|
+
getAddressDecoder as getAddressDecoder32,
|
|
4526
|
+
getAddressEncoder as getAddressEncoder41,
|
|
4527
|
+
getArrayDecoder as getArrayDecoder14,
|
|
4528
|
+
getArrayEncoder as getArrayEncoder14,
|
|
4529
|
+
getBytesDecoder as getBytesDecoder17,
|
|
4530
|
+
getBytesEncoder as getBytesEncoder18,
|
|
4531
|
+
getProgramDerivedAddress as getProgramDerivedAddress10,
|
|
4532
|
+
getStructDecoder as getStructDecoder59,
|
|
4533
|
+
getStructEncoder as getStructEncoder59,
|
|
4323
4534
|
getU16Decoder as getU16Decoder7,
|
|
4324
4535
|
getU16Encoder as getU16Encoder7,
|
|
4325
4536
|
getU64Decoder as getU64Decoder33,
|
|
4326
4537
|
getU64Encoder as getU64Encoder33,
|
|
4327
4538
|
getU8Decoder as getU8Decoder21,
|
|
4328
4539
|
getU8Encoder as getU8Encoder21,
|
|
4329
|
-
transformEncoder as
|
|
4540
|
+
transformEncoder as transformEncoder17
|
|
4330
4541
|
} from "@solana/kit";
|
|
4331
4542
|
var CREATE_MARKET_DISCRIMINATOR = new Uint8Array([
|
|
4332
4543
|
103,
|
|
@@ -4339,43 +4550,39 @@ var CREATE_MARKET_DISCRIMINATOR = new Uint8Array([
|
|
|
4339
4550
|
254
|
|
4340
4551
|
]);
|
|
4341
4552
|
function getCreateMarketDiscriminatorBytes() {
|
|
4342
|
-
return
|
|
4553
|
+
return fixEncoderSize18(getBytesEncoder18(), 8).encode(
|
|
4343
4554
|
CREATE_MARKET_DISCRIMINATOR
|
|
4344
4555
|
);
|
|
4345
4556
|
}
|
|
4346
4557
|
function getCreateMarketInstructionDataEncoder() {
|
|
4347
|
-
return
|
|
4348
|
-
|
|
4349
|
-
["discriminator",
|
|
4558
|
+
return transformEncoder17(
|
|
4559
|
+
getStructEncoder59([
|
|
4560
|
+
["discriminator", fixEncoderSize18(getBytesEncoder18(), 8)],
|
|
4350
4561
|
["marketIndex", getU64Encoder33()],
|
|
4351
|
-
["marketAuthority",
|
|
4352
|
-
["allowUnstakingEarly", getBooleanEncoder10()],
|
|
4562
|
+
["marketAuthority", getAddressEncoder41()],
|
|
4353
4563
|
["authorizedReaderPubkey", getArrayEncoder14(getU8Encoder21(), { size: 32 })],
|
|
4354
|
-
["revealPeriodAuthority", getAddressEncoder40()],
|
|
4355
4564
|
["earlinessCutoffSeconds", getU64Encoder33()],
|
|
4356
4565
|
["earlinessMultiplier", getU16Encoder7()],
|
|
4357
4566
|
["minStakeAmount", getU64Encoder33()],
|
|
4358
|
-
["creatorFeeClaimer",
|
|
4567
|
+
["creatorFeeClaimer", getAddressEncoder41()]
|
|
4359
4568
|
]),
|
|
4360
4569
|
(value) => ({ ...value, discriminator: CREATE_MARKET_DISCRIMINATOR })
|
|
4361
4570
|
);
|
|
4362
4571
|
}
|
|
4363
4572
|
function getCreateMarketInstructionDataDecoder() {
|
|
4364
|
-
return
|
|
4365
|
-
["discriminator",
|
|
4573
|
+
return getStructDecoder59([
|
|
4574
|
+
["discriminator", fixDecoderSize17(getBytesDecoder17(), 8)],
|
|
4366
4575
|
["marketIndex", getU64Decoder33()],
|
|
4367
|
-
["marketAuthority",
|
|
4368
|
-
["allowUnstakingEarly", getBooleanDecoder10()],
|
|
4576
|
+
["marketAuthority", getAddressDecoder32()],
|
|
4369
4577
|
["authorizedReaderPubkey", getArrayDecoder14(getU8Decoder21(), { size: 32 })],
|
|
4370
|
-
["revealPeriodAuthority", getAddressDecoder33()],
|
|
4371
4578
|
["earlinessCutoffSeconds", getU64Decoder33()],
|
|
4372
4579
|
["earlinessMultiplier", getU16Decoder7()],
|
|
4373
4580
|
["minStakeAmount", getU64Decoder33()],
|
|
4374
|
-
["creatorFeeClaimer",
|
|
4581
|
+
["creatorFeeClaimer", getAddressDecoder32()]
|
|
4375
4582
|
]);
|
|
4376
4583
|
}
|
|
4377
4584
|
function getCreateMarketInstructionDataCodec() {
|
|
4378
|
-
return
|
|
4585
|
+
return combineCodec65(
|
|
4379
4586
|
getCreateMarketInstructionDataEncoder(),
|
|
4380
4587
|
getCreateMarketInstructionDataDecoder()
|
|
4381
4588
|
);
|
|
@@ -4399,10 +4606,10 @@ async function getCreateMarketInstructionAsync(input, config) {
|
|
|
4399
4606
|
const accounts = originalAccounts;
|
|
4400
4607
|
const args = { ...input };
|
|
4401
4608
|
if (!accounts.market.value) {
|
|
4402
|
-
accounts.market.value = await
|
|
4609
|
+
accounts.market.value = await getProgramDerivedAddress10({
|
|
4403
4610
|
programAddress,
|
|
4404
4611
|
seeds: [
|
|
4405
|
-
|
|
4612
|
+
getBytesEncoder18().encode(
|
|
4406
4613
|
new Uint8Array([
|
|
4407
4614
|
111,
|
|
4408
4615
|
112,
|
|
@@ -4424,29 +4631,29 @@ async function getCreateMarketInstructionAsync(input, config) {
|
|
|
4424
4631
|
116
|
|
4425
4632
|
])
|
|
4426
4633
|
),
|
|
4427
|
-
|
|
4634
|
+
getAddressEncoder41().encode(
|
|
4428
4635
|
expectAddress(accounts.platformConfig.value)
|
|
4429
4636
|
),
|
|
4430
|
-
|
|
4637
|
+
getAddressEncoder41().encode(expectAddress(accounts.creator.value)),
|
|
4431
4638
|
getU64Encoder33().encode(expectSome(args.marketIndex))
|
|
4432
4639
|
]
|
|
4433
4640
|
});
|
|
4434
4641
|
}
|
|
4435
4642
|
if (!accounts.marketTokenAta.value) {
|
|
4436
|
-
accounts.marketTokenAta.value = await
|
|
4643
|
+
accounts.marketTokenAta.value = await getProgramDerivedAddress10({
|
|
4437
4644
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
4438
4645
|
seeds: [
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4646
|
+
getAddressEncoder41().encode(expectAddress(accounts.market.value)),
|
|
4647
|
+
getAddressEncoder41().encode(expectAddress(accounts.tokenProgram.value)),
|
|
4648
|
+
getAddressEncoder41().encode(expectAddress(accounts.tokenMint.value))
|
|
4442
4649
|
]
|
|
4443
4650
|
});
|
|
4444
4651
|
}
|
|
4445
4652
|
if (!accounts.allowedMint.value) {
|
|
4446
|
-
accounts.allowedMint.value = await
|
|
4653
|
+
accounts.allowedMint.value = await getProgramDerivedAddress10({
|
|
4447
4654
|
programAddress,
|
|
4448
4655
|
seeds: [
|
|
4449
|
-
|
|
4656
|
+
getBytesEncoder18().encode(
|
|
4450
4657
|
new Uint8Array([
|
|
4451
4658
|
97,
|
|
4452
4659
|
108,
|
|
@@ -4462,10 +4669,10 @@ async function getCreateMarketInstructionAsync(input, config) {
|
|
|
4462
4669
|
116
|
|
4463
4670
|
])
|
|
4464
4671
|
),
|
|
4465
|
-
|
|
4672
|
+
getAddressEncoder41().encode(
|
|
4466
4673
|
expectAddress(accounts.platformConfig.value)
|
|
4467
4674
|
),
|
|
4468
|
-
|
|
4675
|
+
getAddressEncoder41().encode(expectAddress(accounts.tokenMint.value))
|
|
4469
4676
|
]
|
|
4470
4677
|
});
|
|
4471
4678
|
}
|
|
@@ -4566,14 +4773,14 @@ function parseCreateMarketInstruction(instruction) {
|
|
|
4566
4773
|
|
|
4567
4774
|
// src/generated/instructions/endRevealPeriod.ts
|
|
4568
4775
|
import {
|
|
4569
|
-
combineCodec as
|
|
4570
|
-
fixDecoderSize as
|
|
4571
|
-
fixEncoderSize as
|
|
4572
|
-
getBytesDecoder as
|
|
4573
|
-
getBytesEncoder as
|
|
4574
|
-
getStructDecoder as
|
|
4575
|
-
getStructEncoder as
|
|
4576
|
-
transformEncoder as
|
|
4776
|
+
combineCodec as combineCodec66,
|
|
4777
|
+
fixDecoderSize as fixDecoderSize18,
|
|
4778
|
+
fixEncoderSize as fixEncoderSize19,
|
|
4779
|
+
getBytesDecoder as getBytesDecoder18,
|
|
4780
|
+
getBytesEncoder as getBytesEncoder19,
|
|
4781
|
+
getStructDecoder as getStructDecoder60,
|
|
4782
|
+
getStructEncoder as getStructEncoder60,
|
|
4783
|
+
transformEncoder as transformEncoder18
|
|
4577
4784
|
} from "@solana/kit";
|
|
4578
4785
|
var END_REVEAL_PERIOD_DISCRIMINATOR = new Uint8Array([
|
|
4579
4786
|
144,
|
|
@@ -4586,23 +4793,23 @@ var END_REVEAL_PERIOD_DISCRIMINATOR = new Uint8Array([
|
|
|
4586
4793
|
92
|
|
4587
4794
|
]);
|
|
4588
4795
|
function getEndRevealPeriodDiscriminatorBytes() {
|
|
4589
|
-
return
|
|
4796
|
+
return fixEncoderSize19(getBytesEncoder19(), 8).encode(
|
|
4590
4797
|
END_REVEAL_PERIOD_DISCRIMINATOR
|
|
4591
4798
|
);
|
|
4592
4799
|
}
|
|
4593
4800
|
function getEndRevealPeriodInstructionDataEncoder() {
|
|
4594
|
-
return
|
|
4595
|
-
|
|
4801
|
+
return transformEncoder18(
|
|
4802
|
+
getStructEncoder60([["discriminator", fixEncoderSize19(getBytesEncoder19(), 8)]]),
|
|
4596
4803
|
(value) => ({ ...value, discriminator: END_REVEAL_PERIOD_DISCRIMINATOR })
|
|
4597
4804
|
);
|
|
4598
4805
|
}
|
|
4599
4806
|
function getEndRevealPeriodInstructionDataDecoder() {
|
|
4600
|
-
return
|
|
4601
|
-
["discriminator",
|
|
4807
|
+
return getStructDecoder60([
|
|
4808
|
+
["discriminator", fixDecoderSize18(getBytesDecoder18(), 8)]
|
|
4602
4809
|
]);
|
|
4603
4810
|
}
|
|
4604
4811
|
function getEndRevealPeriodInstructionDataCodec() {
|
|
4605
|
-
return
|
|
4812
|
+
return combineCodec66(
|
|
4606
4813
|
getEndRevealPeriodInstructionDataEncoder(),
|
|
4607
4814
|
getEndRevealPeriodInstructionDataDecoder()
|
|
4608
4815
|
);
|
|
@@ -4611,21 +4818,23 @@ function getEndRevealPeriodInstruction(input, config) {
|
|
|
4611
4818
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
4612
4819
|
const originalAccounts = {
|
|
4613
4820
|
signer: { value: input.signer ?? null, isWritable: false },
|
|
4614
|
-
market: { value: input.market ?? null, isWritable: true }
|
|
4821
|
+
market: { value: input.market ?? null, isWritable: true },
|
|
4822
|
+
platformConfig: { value: input.platformConfig ?? null, isWritable: false }
|
|
4615
4823
|
};
|
|
4616
4824
|
const accounts = originalAccounts;
|
|
4617
4825
|
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
4618
4826
|
return Object.freeze({
|
|
4619
4827
|
accounts: [
|
|
4620
4828
|
getAccountMeta(accounts.signer),
|
|
4621
|
-
getAccountMeta(accounts.market)
|
|
4829
|
+
getAccountMeta(accounts.market),
|
|
4830
|
+
getAccountMeta(accounts.platformConfig)
|
|
4622
4831
|
],
|
|
4623
4832
|
data: getEndRevealPeriodInstructionDataEncoder().encode({}),
|
|
4624
4833
|
programAddress
|
|
4625
4834
|
});
|
|
4626
4835
|
}
|
|
4627
4836
|
function parseEndRevealPeriodInstruction(instruction) {
|
|
4628
|
-
if (instruction.accounts.length <
|
|
4837
|
+
if (instruction.accounts.length < 3) {
|
|
4629
4838
|
throw new Error("Not enough accounts");
|
|
4630
4839
|
}
|
|
4631
4840
|
let accountIndex = 0;
|
|
@@ -4636,27 +4845,31 @@ function parseEndRevealPeriodInstruction(instruction) {
|
|
|
4636
4845
|
};
|
|
4637
4846
|
return {
|
|
4638
4847
|
programAddress: instruction.programAddress,
|
|
4639
|
-
accounts: {
|
|
4848
|
+
accounts: {
|
|
4849
|
+
signer: getNextAccount(),
|
|
4850
|
+
market: getNextAccount(),
|
|
4851
|
+
platformConfig: getNextAccount()
|
|
4852
|
+
},
|
|
4640
4853
|
data: getEndRevealPeriodInstructionDataDecoder().decode(instruction.data)
|
|
4641
4854
|
};
|
|
4642
4855
|
}
|
|
4643
4856
|
|
|
4644
4857
|
// src/generated/instructions/finalizeRevealStake.ts
|
|
4645
4858
|
import {
|
|
4646
|
-
combineCodec as
|
|
4647
|
-
fixDecoderSize as
|
|
4648
|
-
fixEncoderSize as
|
|
4649
|
-
getAddressEncoder as
|
|
4650
|
-
getBytesDecoder as
|
|
4651
|
-
getBytesEncoder as
|
|
4652
|
-
getProgramDerivedAddress as
|
|
4653
|
-
getStructDecoder as
|
|
4654
|
-
getStructEncoder as
|
|
4859
|
+
combineCodec as combineCodec67,
|
|
4860
|
+
fixDecoderSize as fixDecoderSize19,
|
|
4861
|
+
fixEncoderSize as fixEncoderSize20,
|
|
4862
|
+
getAddressEncoder as getAddressEncoder42,
|
|
4863
|
+
getBytesDecoder as getBytesDecoder19,
|
|
4864
|
+
getBytesEncoder as getBytesEncoder20,
|
|
4865
|
+
getProgramDerivedAddress as getProgramDerivedAddress11,
|
|
4866
|
+
getStructDecoder as getStructDecoder61,
|
|
4867
|
+
getStructEncoder as getStructEncoder61,
|
|
4655
4868
|
getU32Decoder as getU32Decoder17,
|
|
4656
4869
|
getU32Encoder as getU32Encoder17,
|
|
4657
4870
|
getU64Decoder as getU64Decoder34,
|
|
4658
4871
|
getU64Encoder as getU64Encoder34,
|
|
4659
|
-
transformEncoder as
|
|
4872
|
+
transformEncoder as transformEncoder19
|
|
4660
4873
|
} from "@solana/kit";
|
|
4661
4874
|
var FINALIZE_REVEAL_STAKE_DISCRIMINATOR = new Uint8Array([
|
|
4662
4875
|
92,
|
|
@@ -4669,14 +4882,14 @@ var FINALIZE_REVEAL_STAKE_DISCRIMINATOR = new Uint8Array([
|
|
|
4669
4882
|
230
|
|
4670
4883
|
]);
|
|
4671
4884
|
function getFinalizeRevealStakeDiscriminatorBytes() {
|
|
4672
|
-
return
|
|
4885
|
+
return fixEncoderSize20(getBytesEncoder20(), 8).encode(
|
|
4673
4886
|
FINALIZE_REVEAL_STAKE_DISCRIMINATOR
|
|
4674
4887
|
);
|
|
4675
4888
|
}
|
|
4676
4889
|
function getFinalizeRevealStakeInstructionDataEncoder() {
|
|
4677
|
-
return
|
|
4678
|
-
|
|
4679
|
-
["discriminator",
|
|
4890
|
+
return transformEncoder19(
|
|
4891
|
+
getStructEncoder61([
|
|
4892
|
+
["discriminator", fixEncoderSize20(getBytesEncoder20(), 8)],
|
|
4680
4893
|
["optionId", getU64Encoder34()],
|
|
4681
4894
|
["stakeAccountId", getU32Encoder17()]
|
|
4682
4895
|
]),
|
|
@@ -4687,14 +4900,14 @@ function getFinalizeRevealStakeInstructionDataEncoder() {
|
|
|
4687
4900
|
);
|
|
4688
4901
|
}
|
|
4689
4902
|
function getFinalizeRevealStakeInstructionDataDecoder() {
|
|
4690
|
-
return
|
|
4691
|
-
["discriminator",
|
|
4903
|
+
return getStructDecoder61([
|
|
4904
|
+
["discriminator", fixDecoderSize19(getBytesDecoder19(), 8)],
|
|
4692
4905
|
["optionId", getU64Decoder34()],
|
|
4693
4906
|
["stakeAccountId", getU32Decoder17()]
|
|
4694
4907
|
]);
|
|
4695
4908
|
}
|
|
4696
4909
|
function getFinalizeRevealStakeInstructionDataCodec() {
|
|
4697
|
-
return
|
|
4910
|
+
return combineCodec67(
|
|
4698
4911
|
getFinalizeRevealStakeInstructionDataEncoder(),
|
|
4699
4912
|
getFinalizeRevealStakeInstructionDataDecoder()
|
|
4700
4913
|
);
|
|
@@ -4712,10 +4925,10 @@ async function getFinalizeRevealStakeInstructionAsync(input, config) {
|
|
|
4712
4925
|
const accounts = originalAccounts;
|
|
4713
4926
|
const args = { ...input };
|
|
4714
4927
|
if (!accounts.stakeAccount.value) {
|
|
4715
|
-
accounts.stakeAccount.value = await
|
|
4928
|
+
accounts.stakeAccount.value = await getProgramDerivedAddress11({
|
|
4716
4929
|
programAddress,
|
|
4717
4930
|
seeds: [
|
|
4718
|
-
|
|
4931
|
+
getBytesEncoder20().encode(
|
|
4719
4932
|
new Uint8Array([
|
|
4720
4933
|
115,
|
|
4721
4934
|
116,
|
|
@@ -4732,20 +4945,20 @@ async function getFinalizeRevealStakeInstructionAsync(input, config) {
|
|
|
4732
4945
|
116
|
|
4733
4946
|
])
|
|
4734
4947
|
),
|
|
4735
|
-
|
|
4736
|
-
|
|
4948
|
+
getAddressEncoder42().encode(expectAddress(accounts.owner.value)),
|
|
4949
|
+
getAddressEncoder42().encode(expectAddress(accounts.market.value)),
|
|
4737
4950
|
getU32Encoder17().encode(expectSome(args.stakeAccountId))
|
|
4738
4951
|
]
|
|
4739
4952
|
});
|
|
4740
4953
|
}
|
|
4741
4954
|
if (!accounts.option.value) {
|
|
4742
|
-
accounts.option.value = await
|
|
4955
|
+
accounts.option.value = await getProgramDerivedAddress11({
|
|
4743
4956
|
programAddress,
|
|
4744
4957
|
seeds: [
|
|
4745
|
-
|
|
4958
|
+
getBytesEncoder20().encode(
|
|
4746
4959
|
new Uint8Array([111, 112, 116, 105, 111, 110])
|
|
4747
4960
|
),
|
|
4748
|
-
|
|
4961
|
+
getAddressEncoder42().encode(expectAddress(accounts.market.value)),
|
|
4749
4962
|
getU64Encoder34().encode(expectSome(args.optionId))
|
|
4750
4963
|
]
|
|
4751
4964
|
});
|
|
@@ -4828,16 +5041,16 @@ function parseFinalizeRevealStakeInstruction(instruction) {
|
|
|
4828
5041
|
|
|
4829
5042
|
// src/generated/instructions/initAllowedMint.ts
|
|
4830
5043
|
import {
|
|
4831
|
-
combineCodec as
|
|
4832
|
-
fixDecoderSize as
|
|
4833
|
-
fixEncoderSize as
|
|
4834
|
-
getAddressEncoder as
|
|
4835
|
-
getBytesDecoder as
|
|
4836
|
-
getBytesEncoder as
|
|
4837
|
-
getProgramDerivedAddress as
|
|
4838
|
-
getStructDecoder as
|
|
4839
|
-
getStructEncoder as
|
|
4840
|
-
transformEncoder as
|
|
5044
|
+
combineCodec as combineCodec68,
|
|
5045
|
+
fixDecoderSize as fixDecoderSize20,
|
|
5046
|
+
fixEncoderSize as fixEncoderSize21,
|
|
5047
|
+
getAddressEncoder as getAddressEncoder43,
|
|
5048
|
+
getBytesDecoder as getBytesDecoder20,
|
|
5049
|
+
getBytesEncoder as getBytesEncoder21,
|
|
5050
|
+
getProgramDerivedAddress as getProgramDerivedAddress12,
|
|
5051
|
+
getStructDecoder as getStructDecoder62,
|
|
5052
|
+
getStructEncoder as getStructEncoder62,
|
|
5053
|
+
transformEncoder as transformEncoder20
|
|
4841
5054
|
} from "@solana/kit";
|
|
4842
5055
|
var INIT_ALLOWED_MINT_DISCRIMINATOR = new Uint8Array([
|
|
4843
5056
|
215,
|
|
@@ -4850,23 +5063,23 @@ var INIT_ALLOWED_MINT_DISCRIMINATOR = new Uint8Array([
|
|
|
4850
5063
|
10
|
|
4851
5064
|
]);
|
|
4852
5065
|
function getInitAllowedMintDiscriminatorBytes() {
|
|
4853
|
-
return
|
|
5066
|
+
return fixEncoderSize21(getBytesEncoder21(), 8).encode(
|
|
4854
5067
|
INIT_ALLOWED_MINT_DISCRIMINATOR
|
|
4855
5068
|
);
|
|
4856
5069
|
}
|
|
4857
5070
|
function getInitAllowedMintInstructionDataEncoder() {
|
|
4858
|
-
return
|
|
4859
|
-
|
|
5071
|
+
return transformEncoder20(
|
|
5072
|
+
getStructEncoder62([["discriminator", fixEncoderSize21(getBytesEncoder21(), 8)]]),
|
|
4860
5073
|
(value) => ({ ...value, discriminator: INIT_ALLOWED_MINT_DISCRIMINATOR })
|
|
4861
5074
|
);
|
|
4862
5075
|
}
|
|
4863
5076
|
function getInitAllowedMintInstructionDataDecoder() {
|
|
4864
|
-
return
|
|
4865
|
-
["discriminator",
|
|
5077
|
+
return getStructDecoder62([
|
|
5078
|
+
["discriminator", fixDecoderSize20(getBytesDecoder20(), 8)]
|
|
4866
5079
|
]);
|
|
4867
5080
|
}
|
|
4868
5081
|
function getInitAllowedMintInstructionDataCodec() {
|
|
4869
|
-
return
|
|
5082
|
+
return combineCodec68(
|
|
4870
5083
|
getInitAllowedMintInstructionDataEncoder(),
|
|
4871
5084
|
getInitAllowedMintInstructionDataDecoder()
|
|
4872
5085
|
);
|
|
@@ -4882,10 +5095,10 @@ async function getInitAllowedMintInstructionAsync(input, config) {
|
|
|
4882
5095
|
};
|
|
4883
5096
|
const accounts = originalAccounts;
|
|
4884
5097
|
if (!accounts.allowedMint.value) {
|
|
4885
|
-
accounts.allowedMint.value = await
|
|
5098
|
+
accounts.allowedMint.value = await getProgramDerivedAddress12({
|
|
4886
5099
|
programAddress,
|
|
4887
5100
|
seeds: [
|
|
4888
|
-
|
|
5101
|
+
getBytesEncoder21().encode(
|
|
4889
5102
|
new Uint8Array([
|
|
4890
5103
|
97,
|
|
4891
5104
|
108,
|
|
@@ -4901,10 +5114,10 @@ async function getInitAllowedMintInstructionAsync(input, config) {
|
|
|
4901
5114
|
116
|
|
4902
5115
|
])
|
|
4903
5116
|
),
|
|
4904
|
-
|
|
5117
|
+
getAddressEncoder43().encode(
|
|
4905
5118
|
expectAddress(accounts.platformConfig.value)
|
|
4906
5119
|
),
|
|
4907
|
-
|
|
5120
|
+
getAddressEncoder43().encode(expectAddress(accounts.tokenMint.value))
|
|
4908
5121
|
]
|
|
4909
5122
|
});
|
|
4910
5123
|
}
|
|
@@ -4977,16 +5190,16 @@ function parseInitAllowedMintInstruction(instruction) {
|
|
|
4977
5190
|
import {
|
|
4978
5191
|
addDecoderSizePrefix as addDecoderSizePrefix3,
|
|
4979
5192
|
addEncoderSizePrefix as addEncoderSizePrefix3,
|
|
4980
|
-
combineCodec as
|
|
4981
|
-
fixDecoderSize as
|
|
4982
|
-
fixEncoderSize as
|
|
4983
|
-
getAddressDecoder as
|
|
4984
|
-
getAddressEncoder as
|
|
4985
|
-
getBytesDecoder as
|
|
4986
|
-
getBytesEncoder as
|
|
4987
|
-
getProgramDerivedAddress as
|
|
4988
|
-
getStructDecoder as
|
|
4989
|
-
getStructEncoder as
|
|
5193
|
+
combineCodec as combineCodec69,
|
|
5194
|
+
fixDecoderSize as fixDecoderSize21,
|
|
5195
|
+
fixEncoderSize as fixEncoderSize22,
|
|
5196
|
+
getAddressDecoder as getAddressDecoder33,
|
|
5197
|
+
getAddressEncoder as getAddressEncoder44,
|
|
5198
|
+
getBytesDecoder as getBytesDecoder21,
|
|
5199
|
+
getBytesEncoder as getBytesEncoder22,
|
|
5200
|
+
getProgramDerivedAddress as getProgramDerivedAddress13,
|
|
5201
|
+
getStructDecoder as getStructDecoder63,
|
|
5202
|
+
getStructEncoder as getStructEncoder63,
|
|
4990
5203
|
getU16Decoder as getU16Decoder8,
|
|
4991
5204
|
getU16Encoder as getU16Encoder8,
|
|
4992
5205
|
getU32Decoder as getU32Decoder18,
|
|
@@ -4995,7 +5208,7 @@ import {
|
|
|
4995
5208
|
getU64Encoder as getU64Encoder35,
|
|
4996
5209
|
getUtf8Decoder as getUtf8Decoder3,
|
|
4997
5210
|
getUtf8Encoder as getUtf8Encoder3,
|
|
4998
|
-
transformEncoder as
|
|
5211
|
+
transformEncoder as transformEncoder21
|
|
4999
5212
|
} from "@solana/kit";
|
|
5000
5213
|
var INIT_PLATFORM_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
5001
5214
|
101,
|
|
@@ -5008,43 +5221,43 @@ var INIT_PLATFORM_CONFIG_DISCRIMINATOR = new Uint8Array([
|
|
|
5008
5221
|
118
|
|
5009
5222
|
]);
|
|
5010
5223
|
function getInitPlatformConfigDiscriminatorBytes() {
|
|
5011
|
-
return
|
|
5224
|
+
return fixEncoderSize22(getBytesEncoder22(), 8).encode(
|
|
5012
5225
|
INIT_PLATFORM_CONFIG_DISCRIMINATOR
|
|
5013
5226
|
);
|
|
5014
5227
|
}
|
|
5015
5228
|
function getInitPlatformConfigInstructionDataEncoder() {
|
|
5016
|
-
return
|
|
5017
|
-
|
|
5018
|
-
["discriminator",
|
|
5229
|
+
return transformEncoder21(
|
|
5230
|
+
getStructEncoder63([
|
|
5231
|
+
["discriminator", fixEncoderSize22(getBytesEncoder22(), 8)],
|
|
5019
5232
|
["name", addEncoderSizePrefix3(getUtf8Encoder3(), getU32Encoder18())],
|
|
5020
5233
|
["platformFeeBp", getU16Encoder8()],
|
|
5021
5234
|
["rewardPoolFeeBp", getU16Encoder8()],
|
|
5022
5235
|
["creatorFeeBp", getU16Encoder8()],
|
|
5023
|
-
["feeClaimAuthority",
|
|
5236
|
+
["feeClaimAuthority", getAddressEncoder44()],
|
|
5237
|
+
["revealAuthority", getAddressEncoder44()],
|
|
5024
5238
|
["minTimeToStakeSeconds", getU64Encoder35()],
|
|
5025
|
-
["
|
|
5026
|
-
["maxRevealPeriodSeconds", getU64Encoder35()],
|
|
5239
|
+
["revealPeriodSeconds", getU64Encoder35()],
|
|
5027
5240
|
["marketResolutionDeadlineSeconds", getU64Encoder35()]
|
|
5028
5241
|
]),
|
|
5029
5242
|
(value) => ({ ...value, discriminator: INIT_PLATFORM_CONFIG_DISCRIMINATOR })
|
|
5030
5243
|
);
|
|
5031
5244
|
}
|
|
5032
5245
|
function getInitPlatformConfigInstructionDataDecoder() {
|
|
5033
|
-
return
|
|
5034
|
-
["discriminator",
|
|
5246
|
+
return getStructDecoder63([
|
|
5247
|
+
["discriminator", fixDecoderSize21(getBytesDecoder21(), 8)],
|
|
5035
5248
|
["name", addDecoderSizePrefix3(getUtf8Decoder3(), getU32Decoder18())],
|
|
5036
5249
|
["platformFeeBp", getU16Decoder8()],
|
|
5037
5250
|
["rewardPoolFeeBp", getU16Decoder8()],
|
|
5038
5251
|
["creatorFeeBp", getU16Decoder8()],
|
|
5039
|
-
["feeClaimAuthority",
|
|
5252
|
+
["feeClaimAuthority", getAddressDecoder33()],
|
|
5253
|
+
["revealAuthority", getAddressDecoder33()],
|
|
5040
5254
|
["minTimeToStakeSeconds", getU64Decoder35()],
|
|
5041
|
-
["
|
|
5042
|
-
["maxRevealPeriodSeconds", getU64Decoder35()],
|
|
5255
|
+
["revealPeriodSeconds", getU64Decoder35()],
|
|
5043
5256
|
["marketResolutionDeadlineSeconds", getU64Decoder35()]
|
|
5044
5257
|
]);
|
|
5045
5258
|
}
|
|
5046
5259
|
function getInitPlatformConfigInstructionDataCodec() {
|
|
5047
|
-
return
|
|
5260
|
+
return combineCodec69(
|
|
5048
5261
|
getInitPlatformConfigInstructionDataEncoder(),
|
|
5049
5262
|
getInitPlatformConfigInstructionDataDecoder()
|
|
5050
5263
|
);
|
|
@@ -5059,10 +5272,10 @@ async function getInitPlatformConfigInstructionAsync(input, config) {
|
|
|
5059
5272
|
const accounts = originalAccounts;
|
|
5060
5273
|
const args = { ...input };
|
|
5061
5274
|
if (!accounts.platformConfig.value) {
|
|
5062
|
-
accounts.platformConfig.value = await
|
|
5275
|
+
accounts.platformConfig.value = await getProgramDerivedAddress13({
|
|
5063
5276
|
programAddress,
|
|
5064
5277
|
seeds: [
|
|
5065
|
-
|
|
5278
|
+
getBytesEncoder22().encode(
|
|
5066
5279
|
new Uint8Array([
|
|
5067
5280
|
112,
|
|
5068
5281
|
108,
|
|
@@ -5081,7 +5294,7 @@ async function getInitPlatformConfigInstructionAsync(input, config) {
|
|
|
5081
5294
|
103
|
|
5082
5295
|
])
|
|
5083
5296
|
),
|
|
5084
|
-
|
|
5297
|
+
getAddressEncoder44().encode(expectAddress(accounts.payer.value)),
|
|
5085
5298
|
getUtf8Encoder3().encode(expectSome(args.name))
|
|
5086
5299
|
]
|
|
5087
5300
|
});
|
|
@@ -5152,18 +5365,18 @@ function parseInitPlatformConfigInstruction(instruction) {
|
|
|
5152
5365
|
|
|
5153
5366
|
// src/generated/instructions/initStakeAccount.ts
|
|
5154
5367
|
import {
|
|
5155
|
-
combineCodec as
|
|
5156
|
-
fixDecoderSize as
|
|
5157
|
-
fixEncoderSize as
|
|
5158
|
-
getAddressEncoder as
|
|
5159
|
-
getBytesDecoder as
|
|
5160
|
-
getBytesEncoder as
|
|
5161
|
-
getProgramDerivedAddress as
|
|
5162
|
-
getStructDecoder as
|
|
5163
|
-
getStructEncoder as
|
|
5368
|
+
combineCodec as combineCodec70,
|
|
5369
|
+
fixDecoderSize as fixDecoderSize22,
|
|
5370
|
+
fixEncoderSize as fixEncoderSize23,
|
|
5371
|
+
getAddressEncoder as getAddressEncoder45,
|
|
5372
|
+
getBytesDecoder as getBytesDecoder22,
|
|
5373
|
+
getBytesEncoder as getBytesEncoder23,
|
|
5374
|
+
getProgramDerivedAddress as getProgramDerivedAddress14,
|
|
5375
|
+
getStructDecoder as getStructDecoder64,
|
|
5376
|
+
getStructEncoder as getStructEncoder64,
|
|
5164
5377
|
getU32Decoder as getU32Decoder19,
|
|
5165
5378
|
getU32Encoder as getU32Encoder19,
|
|
5166
|
-
transformEncoder as
|
|
5379
|
+
transformEncoder as transformEncoder22
|
|
5167
5380
|
} from "@solana/kit";
|
|
5168
5381
|
var INIT_STAKE_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
5169
5382
|
132,
|
|
@@ -5176,27 +5389,27 @@ var INIT_STAKE_ACCOUNT_DISCRIMINATOR = new Uint8Array([
|
|
|
5176
5389
|
45
|
|
5177
5390
|
]);
|
|
5178
5391
|
function getInitStakeAccountDiscriminatorBytes() {
|
|
5179
|
-
return
|
|
5392
|
+
return fixEncoderSize23(getBytesEncoder23(), 8).encode(
|
|
5180
5393
|
INIT_STAKE_ACCOUNT_DISCRIMINATOR
|
|
5181
5394
|
);
|
|
5182
5395
|
}
|
|
5183
5396
|
function getInitStakeAccountInstructionDataEncoder() {
|
|
5184
|
-
return
|
|
5185
|
-
|
|
5186
|
-
["discriminator",
|
|
5397
|
+
return transformEncoder22(
|
|
5398
|
+
getStructEncoder64([
|
|
5399
|
+
["discriminator", fixEncoderSize23(getBytesEncoder23(), 8)],
|
|
5187
5400
|
["stakeAccountId", getU32Encoder19()]
|
|
5188
5401
|
]),
|
|
5189
5402
|
(value) => ({ ...value, discriminator: INIT_STAKE_ACCOUNT_DISCRIMINATOR })
|
|
5190
5403
|
);
|
|
5191
5404
|
}
|
|
5192
5405
|
function getInitStakeAccountInstructionDataDecoder() {
|
|
5193
|
-
return
|
|
5194
|
-
["discriminator",
|
|
5406
|
+
return getStructDecoder64([
|
|
5407
|
+
["discriminator", fixDecoderSize22(getBytesDecoder22(), 8)],
|
|
5195
5408
|
["stakeAccountId", getU32Decoder19()]
|
|
5196
5409
|
]);
|
|
5197
5410
|
}
|
|
5198
5411
|
function getInitStakeAccountInstructionDataCodec() {
|
|
5199
|
-
return
|
|
5412
|
+
return combineCodec70(
|
|
5200
5413
|
getInitStakeAccountInstructionDataEncoder(),
|
|
5201
5414
|
getInitStakeAccountInstructionDataDecoder()
|
|
5202
5415
|
);
|
|
@@ -5213,10 +5426,10 @@ async function getInitStakeAccountInstructionAsync(input, config) {
|
|
|
5213
5426
|
const accounts = originalAccounts;
|
|
5214
5427
|
const args = { ...input };
|
|
5215
5428
|
if (!accounts.stakeAccount.value) {
|
|
5216
|
-
accounts.stakeAccount.value = await
|
|
5429
|
+
accounts.stakeAccount.value = await getProgramDerivedAddress14({
|
|
5217
5430
|
programAddress,
|
|
5218
5431
|
seeds: [
|
|
5219
|
-
|
|
5432
|
+
getBytesEncoder23().encode(
|
|
5220
5433
|
new Uint8Array([
|
|
5221
5434
|
115,
|
|
5222
5435
|
116,
|
|
@@ -5233,8 +5446,8 @@ async function getInitStakeAccountInstructionAsync(input, config) {
|
|
|
5233
5446
|
116
|
|
5234
5447
|
])
|
|
5235
5448
|
),
|
|
5236
|
-
|
|
5237
|
-
|
|
5449
|
+
getAddressEncoder45().encode(expectAddress(accounts.owner.value)),
|
|
5450
|
+
getAddressEncoder45().encode(expectAddress(accounts.market.value)),
|
|
5238
5451
|
getU32Encoder19().encode(expectSome(args.stakeAccountId))
|
|
5239
5452
|
]
|
|
5240
5453
|
});
|
|
@@ -5311,16 +5524,16 @@ function parseInitStakeAccountInstruction(instruction) {
|
|
|
5311
5524
|
|
|
5312
5525
|
// src/generated/instructions/openMarket.ts
|
|
5313
5526
|
import {
|
|
5314
|
-
combineCodec as
|
|
5315
|
-
fixDecoderSize as
|
|
5316
|
-
fixEncoderSize as
|
|
5317
|
-
getBytesDecoder as
|
|
5318
|
-
getBytesEncoder as
|
|
5319
|
-
getStructDecoder as
|
|
5320
|
-
getStructEncoder as
|
|
5527
|
+
combineCodec as combineCodec71,
|
|
5528
|
+
fixDecoderSize as fixDecoderSize23,
|
|
5529
|
+
fixEncoderSize as fixEncoderSize24,
|
|
5530
|
+
getBytesDecoder as getBytesDecoder23,
|
|
5531
|
+
getBytesEncoder as getBytesEncoder24,
|
|
5532
|
+
getStructDecoder as getStructDecoder65,
|
|
5533
|
+
getStructEncoder as getStructEncoder65,
|
|
5321
5534
|
getU64Decoder as getU64Decoder36,
|
|
5322
5535
|
getU64Encoder as getU64Encoder36,
|
|
5323
|
-
transformEncoder as
|
|
5536
|
+
transformEncoder as transformEncoder23
|
|
5324
5537
|
} from "@solana/kit";
|
|
5325
5538
|
var OPEN_MARKET_DISCRIMINATOR = new Uint8Array([
|
|
5326
5539
|
116,
|
|
@@ -5333,25 +5546,25 @@ var OPEN_MARKET_DISCRIMINATOR = new Uint8Array([
|
|
|
5333
5546
|
44
|
|
5334
5547
|
]);
|
|
5335
5548
|
function getOpenMarketDiscriminatorBytes() {
|
|
5336
|
-
return
|
|
5549
|
+
return fixEncoderSize24(getBytesEncoder24(), 8).encode(OPEN_MARKET_DISCRIMINATOR);
|
|
5337
5550
|
}
|
|
5338
5551
|
function getOpenMarketInstructionDataEncoder() {
|
|
5339
|
-
return
|
|
5340
|
-
|
|
5341
|
-
["discriminator",
|
|
5552
|
+
return transformEncoder23(
|
|
5553
|
+
getStructEncoder65([
|
|
5554
|
+
["discriminator", fixEncoderSize24(getBytesEncoder24(), 8)],
|
|
5342
5555
|
["timeToStake", getU64Encoder36()]
|
|
5343
5556
|
]),
|
|
5344
5557
|
(value) => ({ ...value, discriminator: OPEN_MARKET_DISCRIMINATOR })
|
|
5345
5558
|
);
|
|
5346
5559
|
}
|
|
5347
5560
|
function getOpenMarketInstructionDataDecoder() {
|
|
5348
|
-
return
|
|
5349
|
-
["discriminator",
|
|
5561
|
+
return getStructDecoder65([
|
|
5562
|
+
["discriminator", fixDecoderSize23(getBytesDecoder23(), 8)],
|
|
5350
5563
|
["timeToStake", getU64Decoder36()]
|
|
5351
5564
|
]);
|
|
5352
5565
|
}
|
|
5353
5566
|
function getOpenMarketInstructionDataCodec() {
|
|
5354
|
-
return
|
|
5567
|
+
return combineCodec71(
|
|
5355
5568
|
getOpenMarketInstructionDataEncoder(),
|
|
5356
5569
|
getOpenMarketInstructionDataDecoder()
|
|
5357
5570
|
);
|
|
@@ -5402,96 +5615,16 @@ function parseOpenMarketInstruction(instruction) {
|
|
|
5402
5615
|
};
|
|
5403
5616
|
}
|
|
5404
5617
|
|
|
5405
|
-
// src/generated/instructions/pauseStaking.ts
|
|
5406
|
-
import {
|
|
5407
|
-
combineCodec as combineCodec71,
|
|
5408
|
-
fixDecoderSize as fixDecoderSize22,
|
|
5409
|
-
fixEncoderSize as fixEncoderSize23,
|
|
5410
|
-
getBytesDecoder as getBytesDecoder22,
|
|
5411
|
-
getBytesEncoder as getBytesEncoder23,
|
|
5412
|
-
getStructDecoder as getStructDecoder65,
|
|
5413
|
-
getStructEncoder as getStructEncoder65,
|
|
5414
|
-
transformEncoder as transformEncoder22
|
|
5415
|
-
} from "@solana/kit";
|
|
5416
|
-
var PAUSE_STAKING_DISCRIMINATOR = new Uint8Array([
|
|
5417
|
-
245,
|
|
5418
|
-
191,
|
|
5419
|
-
35,
|
|
5420
|
-
58,
|
|
5421
|
-
88,
|
|
5422
|
-
250,
|
|
5423
|
-
229,
|
|
5424
|
-
60
|
|
5425
|
-
]);
|
|
5426
|
-
function getPauseStakingDiscriminatorBytes() {
|
|
5427
|
-
return fixEncoderSize23(getBytesEncoder23(), 8).encode(
|
|
5428
|
-
PAUSE_STAKING_DISCRIMINATOR
|
|
5429
|
-
);
|
|
5430
|
-
}
|
|
5431
|
-
function getPauseStakingInstructionDataEncoder() {
|
|
5432
|
-
return transformEncoder22(
|
|
5433
|
-
getStructEncoder65([["discriminator", fixEncoderSize23(getBytesEncoder23(), 8)]]),
|
|
5434
|
-
(value) => ({ ...value, discriminator: PAUSE_STAKING_DISCRIMINATOR })
|
|
5435
|
-
);
|
|
5436
|
-
}
|
|
5437
|
-
function getPauseStakingInstructionDataDecoder() {
|
|
5438
|
-
return getStructDecoder65([
|
|
5439
|
-
["discriminator", fixDecoderSize22(getBytesDecoder22(), 8)]
|
|
5440
|
-
]);
|
|
5441
|
-
}
|
|
5442
|
-
function getPauseStakingInstructionDataCodec() {
|
|
5443
|
-
return combineCodec71(
|
|
5444
|
-
getPauseStakingInstructionDataEncoder(),
|
|
5445
|
-
getPauseStakingInstructionDataDecoder()
|
|
5446
|
-
);
|
|
5447
|
-
}
|
|
5448
|
-
function getPauseStakingInstruction(input, config) {
|
|
5449
|
-
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
5450
|
-
const originalAccounts = {
|
|
5451
|
-
marketAuthority: {
|
|
5452
|
-
value: input.marketAuthority ?? null,
|
|
5453
|
-
isWritable: false
|
|
5454
|
-
},
|
|
5455
|
-
market: { value: input.market ?? null, isWritable: true }
|
|
5456
|
-
};
|
|
5457
|
-
const accounts = originalAccounts;
|
|
5458
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
5459
|
-
return Object.freeze({
|
|
5460
|
-
accounts: [
|
|
5461
|
-
getAccountMeta(accounts.marketAuthority),
|
|
5462
|
-
getAccountMeta(accounts.market)
|
|
5463
|
-
],
|
|
5464
|
-
data: getPauseStakingInstructionDataEncoder().encode({}),
|
|
5465
|
-
programAddress
|
|
5466
|
-
});
|
|
5467
|
-
}
|
|
5468
|
-
function parsePauseStakingInstruction(instruction) {
|
|
5469
|
-
if (instruction.accounts.length < 2) {
|
|
5470
|
-
throw new Error("Not enough accounts");
|
|
5471
|
-
}
|
|
5472
|
-
let accountIndex = 0;
|
|
5473
|
-
const getNextAccount = () => {
|
|
5474
|
-
const accountMeta = instruction.accounts[accountIndex];
|
|
5475
|
-
accountIndex += 1;
|
|
5476
|
-
return accountMeta;
|
|
5477
|
-
};
|
|
5478
|
-
return {
|
|
5479
|
-
programAddress: instruction.programAddress,
|
|
5480
|
-
accounts: { marketAuthority: getNextAccount(), market: getNextAccount() },
|
|
5481
|
-
data: getPauseStakingInstructionDataDecoder().decode(instruction.data)
|
|
5482
|
-
};
|
|
5483
|
-
}
|
|
5484
|
-
|
|
5485
5618
|
// src/generated/instructions/resolveMarket.ts
|
|
5486
5619
|
import {
|
|
5487
5620
|
combineCodec as combineCodec72,
|
|
5488
|
-
fixDecoderSize as
|
|
5489
|
-
fixEncoderSize as
|
|
5490
|
-
getBytesDecoder as
|
|
5491
|
-
getBytesEncoder as
|
|
5621
|
+
fixDecoderSize as fixDecoderSize24,
|
|
5622
|
+
fixEncoderSize as fixEncoderSize25,
|
|
5623
|
+
getBytesDecoder as getBytesDecoder24,
|
|
5624
|
+
getBytesEncoder as getBytesEncoder25,
|
|
5492
5625
|
getStructDecoder as getStructDecoder66,
|
|
5493
5626
|
getStructEncoder as getStructEncoder66,
|
|
5494
|
-
transformEncoder as
|
|
5627
|
+
transformEncoder as transformEncoder24
|
|
5495
5628
|
} from "@solana/kit";
|
|
5496
5629
|
var RESOLVE_MARKET_DISCRIMINATOR = new Uint8Array([
|
|
5497
5630
|
155,
|
|
@@ -5504,108 +5637,28 @@ var RESOLVE_MARKET_DISCRIMINATOR = new Uint8Array([
|
|
|
5504
5637
|
239
|
|
5505
5638
|
]);
|
|
5506
5639
|
function getResolveMarketDiscriminatorBytes() {
|
|
5507
|
-
return
|
|
5640
|
+
return fixEncoderSize25(getBytesEncoder25(), 8).encode(
|
|
5508
5641
|
RESOLVE_MARKET_DISCRIMINATOR
|
|
5509
5642
|
);
|
|
5510
5643
|
}
|
|
5511
5644
|
function getResolveMarketInstructionDataEncoder() {
|
|
5512
|
-
return
|
|
5513
|
-
getStructEncoder66([["discriminator",
|
|
5645
|
+
return transformEncoder24(
|
|
5646
|
+
getStructEncoder66([["discriminator", fixEncoderSize25(getBytesEncoder25(), 8)]]),
|
|
5514
5647
|
(value) => ({ ...value, discriminator: RESOLVE_MARKET_DISCRIMINATOR })
|
|
5515
5648
|
);
|
|
5516
5649
|
}
|
|
5517
5650
|
function getResolveMarketInstructionDataDecoder() {
|
|
5518
|
-
return getStructDecoder66([
|
|
5519
|
-
["discriminator", fixDecoderSize23(getBytesDecoder23(), 8)]
|
|
5520
|
-
]);
|
|
5521
|
-
}
|
|
5522
|
-
function getResolveMarketInstructionDataCodec() {
|
|
5523
|
-
return combineCodec72(
|
|
5524
|
-
getResolveMarketInstructionDataEncoder(),
|
|
5525
|
-
getResolveMarketInstructionDataDecoder()
|
|
5526
|
-
);
|
|
5527
|
-
}
|
|
5528
|
-
function getResolveMarketInstruction(input, config) {
|
|
5529
|
-
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
5530
|
-
const originalAccounts = {
|
|
5531
|
-
marketAuthority: {
|
|
5532
|
-
value: input.marketAuthority ?? null,
|
|
5533
|
-
isWritable: false
|
|
5534
|
-
},
|
|
5535
|
-
market: { value: input.market ?? null, isWritable: true }
|
|
5536
|
-
};
|
|
5537
|
-
const accounts = originalAccounts;
|
|
5538
|
-
const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
|
|
5539
|
-
return Object.freeze({
|
|
5540
|
-
accounts: [
|
|
5541
|
-
getAccountMeta(accounts.marketAuthority),
|
|
5542
|
-
getAccountMeta(accounts.market)
|
|
5543
|
-
],
|
|
5544
|
-
data: getResolveMarketInstructionDataEncoder().encode({}),
|
|
5545
|
-
programAddress
|
|
5546
|
-
});
|
|
5547
|
-
}
|
|
5548
|
-
function parseResolveMarketInstruction(instruction) {
|
|
5549
|
-
if (instruction.accounts.length < 2) {
|
|
5550
|
-
throw new Error("Not enough accounts");
|
|
5551
|
-
}
|
|
5552
|
-
let accountIndex = 0;
|
|
5553
|
-
const getNextAccount = () => {
|
|
5554
|
-
const accountMeta = instruction.accounts[accountIndex];
|
|
5555
|
-
accountIndex += 1;
|
|
5556
|
-
return accountMeta;
|
|
5557
|
-
};
|
|
5558
|
-
return {
|
|
5559
|
-
programAddress: instruction.programAddress,
|
|
5560
|
-
accounts: { marketAuthority: getNextAccount(), market: getNextAccount() },
|
|
5561
|
-
data: getResolveMarketInstructionDataDecoder().decode(instruction.data)
|
|
5562
|
-
};
|
|
5563
|
-
}
|
|
5564
|
-
|
|
5565
|
-
// src/generated/instructions/resumeStaking.ts
|
|
5566
|
-
import {
|
|
5567
|
-
combineCodec as combineCodec73,
|
|
5568
|
-
fixDecoderSize as fixDecoderSize24,
|
|
5569
|
-
fixEncoderSize as fixEncoderSize25,
|
|
5570
|
-
getBytesDecoder as getBytesDecoder24,
|
|
5571
|
-
getBytesEncoder as getBytesEncoder25,
|
|
5572
|
-
getStructDecoder as getStructDecoder67,
|
|
5573
|
-
getStructEncoder as getStructEncoder67,
|
|
5574
|
-
transformEncoder as transformEncoder24
|
|
5575
|
-
} from "@solana/kit";
|
|
5576
|
-
var RESUME_STAKING_DISCRIMINATOR = new Uint8Array([
|
|
5577
|
-
31,
|
|
5578
|
-
200,
|
|
5579
|
-
175,
|
|
5580
|
-
23,
|
|
5581
|
-
211,
|
|
5582
|
-
22,
|
|
5583
|
-
63,
|
|
5584
|
-
155
|
|
5585
|
-
]);
|
|
5586
|
-
function getResumeStakingDiscriminatorBytes() {
|
|
5587
|
-
return fixEncoderSize25(getBytesEncoder25(), 8).encode(
|
|
5588
|
-
RESUME_STAKING_DISCRIMINATOR
|
|
5589
|
-
);
|
|
5590
|
-
}
|
|
5591
|
-
function getResumeStakingInstructionDataEncoder() {
|
|
5592
|
-
return transformEncoder24(
|
|
5593
|
-
getStructEncoder67([["discriminator", fixEncoderSize25(getBytesEncoder25(), 8)]]),
|
|
5594
|
-
(value) => ({ ...value, discriminator: RESUME_STAKING_DISCRIMINATOR })
|
|
5595
|
-
);
|
|
5596
|
-
}
|
|
5597
|
-
function getResumeStakingInstructionDataDecoder() {
|
|
5598
|
-
return getStructDecoder67([
|
|
5651
|
+
return getStructDecoder66([
|
|
5599
5652
|
["discriminator", fixDecoderSize24(getBytesDecoder24(), 8)]
|
|
5600
5653
|
]);
|
|
5601
5654
|
}
|
|
5602
|
-
function
|
|
5603
|
-
return
|
|
5604
|
-
|
|
5605
|
-
|
|
5655
|
+
function getResolveMarketInstructionDataCodec() {
|
|
5656
|
+
return combineCodec72(
|
|
5657
|
+
getResolveMarketInstructionDataEncoder(),
|
|
5658
|
+
getResolveMarketInstructionDataDecoder()
|
|
5606
5659
|
);
|
|
5607
5660
|
}
|
|
5608
|
-
function
|
|
5661
|
+
function getResolveMarketInstruction(input, config) {
|
|
5609
5662
|
const programAddress = config?.programAddress ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
5610
5663
|
const originalAccounts = {
|
|
5611
5664
|
marketAuthority: {
|
|
@@ -5621,11 +5674,11 @@ function getResumeStakingInstruction(input, config) {
|
|
|
5621
5674
|
getAccountMeta(accounts.marketAuthority),
|
|
5622
5675
|
getAccountMeta(accounts.market)
|
|
5623
5676
|
],
|
|
5624
|
-
data:
|
|
5677
|
+
data: getResolveMarketInstructionDataEncoder().encode({}),
|
|
5625
5678
|
programAddress
|
|
5626
5679
|
});
|
|
5627
5680
|
}
|
|
5628
|
-
function
|
|
5681
|
+
function parseResolveMarketInstruction(instruction) {
|
|
5629
5682
|
if (instruction.accounts.length < 2) {
|
|
5630
5683
|
throw new Error("Not enough accounts");
|
|
5631
5684
|
}
|
|
@@ -5638,21 +5691,21 @@ function parseResumeStakingInstruction(instruction) {
|
|
|
5638
5691
|
return {
|
|
5639
5692
|
programAddress: instruction.programAddress,
|
|
5640
5693
|
accounts: { marketAuthority: getNextAccount(), market: getNextAccount() },
|
|
5641
|
-
data:
|
|
5694
|
+
data: getResolveMarketInstructionDataDecoder().decode(instruction.data)
|
|
5642
5695
|
};
|
|
5643
5696
|
}
|
|
5644
5697
|
|
|
5645
5698
|
// src/generated/instructions/revealStake.ts
|
|
5646
5699
|
import {
|
|
5647
|
-
combineCodec as
|
|
5700
|
+
combineCodec as combineCodec73,
|
|
5648
5701
|
fixDecoderSize as fixDecoderSize25,
|
|
5649
5702
|
fixEncoderSize as fixEncoderSize26,
|
|
5650
|
-
getAddressEncoder as
|
|
5703
|
+
getAddressEncoder as getAddressEncoder46,
|
|
5651
5704
|
getBytesDecoder as getBytesDecoder25,
|
|
5652
5705
|
getBytesEncoder as getBytesEncoder26,
|
|
5653
|
-
getProgramDerivedAddress as
|
|
5654
|
-
getStructDecoder as
|
|
5655
|
-
getStructEncoder as
|
|
5706
|
+
getProgramDerivedAddress as getProgramDerivedAddress15,
|
|
5707
|
+
getStructDecoder as getStructDecoder67,
|
|
5708
|
+
getStructEncoder as getStructEncoder67,
|
|
5656
5709
|
getU32Decoder as getU32Decoder20,
|
|
5657
5710
|
getU32Encoder as getU32Encoder20,
|
|
5658
5711
|
getU64Decoder as getU64Decoder37,
|
|
@@ -5676,7 +5729,7 @@ function getRevealStakeDiscriminatorBytes() {
|
|
|
5676
5729
|
}
|
|
5677
5730
|
function getRevealStakeInstructionDataEncoder() {
|
|
5678
5731
|
return transformEncoder25(
|
|
5679
|
-
|
|
5732
|
+
getStructEncoder67([
|
|
5680
5733
|
["discriminator", fixEncoderSize26(getBytesEncoder26(), 8)],
|
|
5681
5734
|
["computationOffset", getU64Encoder37()],
|
|
5682
5735
|
["stakeAccountId", getU32Encoder20()]
|
|
@@ -5685,14 +5738,14 @@ function getRevealStakeInstructionDataEncoder() {
|
|
|
5685
5738
|
);
|
|
5686
5739
|
}
|
|
5687
5740
|
function getRevealStakeInstructionDataDecoder() {
|
|
5688
|
-
return
|
|
5741
|
+
return getStructDecoder67([
|
|
5689
5742
|
["discriminator", fixDecoderSize25(getBytesDecoder25(), 8)],
|
|
5690
5743
|
["computationOffset", getU64Decoder37()],
|
|
5691
5744
|
["stakeAccountId", getU32Decoder20()]
|
|
5692
5745
|
]);
|
|
5693
5746
|
}
|
|
5694
5747
|
function getRevealStakeInstructionDataCodec() {
|
|
5695
|
-
return
|
|
5748
|
+
return combineCodec73(
|
|
5696
5749
|
getRevealStakeInstructionDataEncoder(),
|
|
5697
5750
|
getRevealStakeInstructionDataDecoder()
|
|
5698
5751
|
);
|
|
@@ -5722,7 +5775,7 @@ async function getRevealStakeInstructionAsync(input, config) {
|
|
|
5722
5775
|
const accounts = originalAccounts;
|
|
5723
5776
|
const args = { ...input };
|
|
5724
5777
|
if (!accounts.stakeAccount.value) {
|
|
5725
|
-
accounts.stakeAccount.value = await
|
|
5778
|
+
accounts.stakeAccount.value = await getProgramDerivedAddress15({
|
|
5726
5779
|
programAddress,
|
|
5727
5780
|
seeds: [
|
|
5728
5781
|
getBytesEncoder26().encode(
|
|
@@ -5742,14 +5795,14 @@ async function getRevealStakeInstructionAsync(input, config) {
|
|
|
5742
5795
|
116
|
|
5743
5796
|
])
|
|
5744
5797
|
),
|
|
5745
|
-
|
|
5746
|
-
|
|
5798
|
+
getAddressEncoder46().encode(expectAddress(accounts.owner.value)),
|
|
5799
|
+
getAddressEncoder46().encode(expectAddress(accounts.market.value)),
|
|
5747
5800
|
getU32Encoder20().encode(expectSome(args.stakeAccountId))
|
|
5748
5801
|
]
|
|
5749
5802
|
});
|
|
5750
5803
|
}
|
|
5751
5804
|
if (!accounts.signPdaAccount.value) {
|
|
5752
|
-
accounts.signPdaAccount.value = await
|
|
5805
|
+
accounts.signPdaAccount.value = await getProgramDerivedAddress15({
|
|
5753
5806
|
programAddress,
|
|
5754
5807
|
seeds: [
|
|
5755
5808
|
getBytesEncoder26().encode(
|
|
@@ -5911,7 +5964,7 @@ function parseRevealStakeInstruction(instruction) {
|
|
|
5911
5964
|
|
|
5912
5965
|
// src/generated/instructions/revealStakeCallback.ts
|
|
5913
5966
|
import {
|
|
5914
|
-
combineCodec as
|
|
5967
|
+
combineCodec as combineCodec74,
|
|
5915
5968
|
fixDecoderSize as fixDecoderSize26,
|
|
5916
5969
|
fixEncoderSize as fixEncoderSize27,
|
|
5917
5970
|
getArrayDecoder as getArrayDecoder15,
|
|
@@ -5920,8 +5973,8 @@ import {
|
|
|
5920
5973
|
getBytesEncoder as getBytesEncoder27,
|
|
5921
5974
|
getDiscriminatedUnionDecoder as getDiscriminatedUnionDecoder4,
|
|
5922
5975
|
getDiscriminatedUnionEncoder as getDiscriminatedUnionEncoder4,
|
|
5923
|
-
getStructDecoder as
|
|
5924
|
-
getStructEncoder as
|
|
5976
|
+
getStructDecoder as getStructDecoder68,
|
|
5977
|
+
getStructEncoder as getStructEncoder68,
|
|
5925
5978
|
getTupleDecoder as getTupleDecoder6,
|
|
5926
5979
|
getTupleEncoder as getTupleEncoder6,
|
|
5927
5980
|
getU8Decoder as getU8Decoder22,
|
|
@@ -5947,14 +6000,14 @@ function getRevealStakeCallbackDiscriminatorBytes() {
|
|
|
5947
6000
|
}
|
|
5948
6001
|
function getRevealStakeCallbackInstructionDataEncoder() {
|
|
5949
6002
|
return transformEncoder26(
|
|
5950
|
-
|
|
6003
|
+
getStructEncoder68([
|
|
5951
6004
|
["discriminator", fixEncoderSize27(getBytesEncoder27(), 8)],
|
|
5952
6005
|
[
|
|
5953
6006
|
"output",
|
|
5954
6007
|
getDiscriminatedUnionEncoder4([
|
|
5955
6008
|
[
|
|
5956
6009
|
"Success",
|
|
5957
|
-
|
|
6010
|
+
getStructEncoder68([
|
|
5958
6011
|
[
|
|
5959
6012
|
"fields",
|
|
5960
6013
|
getTupleEncoder6([
|
|
@@ -5967,7 +6020,7 @@ function getRevealStakeCallbackInstructionDataEncoder() {
|
|
|
5967
6020
|
["Failure", getUnitEncoder()],
|
|
5968
6021
|
[
|
|
5969
6022
|
"MarkerForIdlBuildDoNotUseThis",
|
|
5970
|
-
|
|
6023
|
+
getStructEncoder68([
|
|
5971
6024
|
["fields", getTupleEncoder6([getRevealStakeOutputEncoder()])]
|
|
5972
6025
|
])
|
|
5973
6026
|
]
|
|
@@ -5981,14 +6034,14 @@ function getRevealStakeCallbackInstructionDataEncoder() {
|
|
|
5981
6034
|
);
|
|
5982
6035
|
}
|
|
5983
6036
|
function getRevealStakeCallbackInstructionDataDecoder() {
|
|
5984
|
-
return
|
|
6037
|
+
return getStructDecoder68([
|
|
5985
6038
|
["discriminator", fixDecoderSize26(getBytesDecoder26(), 8)],
|
|
5986
6039
|
[
|
|
5987
6040
|
"output",
|
|
5988
6041
|
getDiscriminatedUnionDecoder4([
|
|
5989
6042
|
[
|
|
5990
6043
|
"Success",
|
|
5991
|
-
|
|
6044
|
+
getStructDecoder68([
|
|
5992
6045
|
[
|
|
5993
6046
|
"fields",
|
|
5994
6047
|
getTupleDecoder6([
|
|
@@ -6001,7 +6054,7 @@ function getRevealStakeCallbackInstructionDataDecoder() {
|
|
|
6001
6054
|
["Failure", getUnitDecoder()],
|
|
6002
6055
|
[
|
|
6003
6056
|
"MarkerForIdlBuildDoNotUseThis",
|
|
6004
|
-
|
|
6057
|
+
getStructDecoder68([
|
|
6005
6058
|
["fields", getTupleDecoder6([getRevealStakeOutputDecoder()])]
|
|
6006
6059
|
])
|
|
6007
6060
|
]
|
|
@@ -6010,7 +6063,7 @@ function getRevealStakeCallbackInstructionDataDecoder() {
|
|
|
6010
6063
|
]);
|
|
6011
6064
|
}
|
|
6012
6065
|
function getRevealStakeCallbackInstructionDataCodec() {
|
|
6013
|
-
return
|
|
6066
|
+
return combineCodec74(
|
|
6014
6067
|
getRevealStakeCallbackInstructionDataEncoder(),
|
|
6015
6068
|
getRevealStakeCallbackInstructionDataDecoder()
|
|
6016
6069
|
);
|
|
@@ -6086,13 +6139,13 @@ function parseRevealStakeCallbackInstruction(instruction) {
|
|
|
6086
6139
|
|
|
6087
6140
|
// src/generated/instructions/revealStakeCompDef.ts
|
|
6088
6141
|
import {
|
|
6089
|
-
combineCodec as
|
|
6142
|
+
combineCodec as combineCodec75,
|
|
6090
6143
|
fixDecoderSize as fixDecoderSize27,
|
|
6091
6144
|
fixEncoderSize as fixEncoderSize28,
|
|
6092
6145
|
getBytesDecoder as getBytesDecoder27,
|
|
6093
6146
|
getBytesEncoder as getBytesEncoder28,
|
|
6094
|
-
getStructDecoder as
|
|
6095
|
-
getStructEncoder as
|
|
6147
|
+
getStructDecoder as getStructDecoder69,
|
|
6148
|
+
getStructEncoder as getStructEncoder69,
|
|
6096
6149
|
transformEncoder as transformEncoder27
|
|
6097
6150
|
} from "@solana/kit";
|
|
6098
6151
|
var REVEAL_STAKE_COMP_DEF_DISCRIMINATOR = new Uint8Array([
|
|
@@ -6112,7 +6165,7 @@ function getRevealStakeCompDefDiscriminatorBytes() {
|
|
|
6112
6165
|
}
|
|
6113
6166
|
function getRevealStakeCompDefInstructionDataEncoder() {
|
|
6114
6167
|
return transformEncoder27(
|
|
6115
|
-
|
|
6168
|
+
getStructEncoder69([["discriminator", fixEncoderSize28(getBytesEncoder28(), 8)]]),
|
|
6116
6169
|
(value) => ({
|
|
6117
6170
|
...value,
|
|
6118
6171
|
discriminator: REVEAL_STAKE_COMP_DEF_DISCRIMINATOR
|
|
@@ -6120,12 +6173,12 @@ function getRevealStakeCompDefInstructionDataEncoder() {
|
|
|
6120
6173
|
);
|
|
6121
6174
|
}
|
|
6122
6175
|
function getRevealStakeCompDefInstructionDataDecoder() {
|
|
6123
|
-
return
|
|
6176
|
+
return getStructDecoder69([
|
|
6124
6177
|
["discriminator", fixDecoderSize27(getBytesDecoder27(), 8)]
|
|
6125
6178
|
]);
|
|
6126
6179
|
}
|
|
6127
6180
|
function getRevealStakeCompDefInstructionDataCodec() {
|
|
6128
|
-
return
|
|
6181
|
+
return combineCodec75(
|
|
6129
6182
|
getRevealStakeCompDefInstructionDataEncoder(),
|
|
6130
6183
|
getRevealStakeCompDefInstructionDataDecoder()
|
|
6131
6184
|
);
|
|
@@ -6198,13 +6251,13 @@ function parseRevealStakeCompDefInstruction(instruction) {
|
|
|
6198
6251
|
|
|
6199
6252
|
// src/generated/instructions/setFeeClaimAuthority.ts
|
|
6200
6253
|
import {
|
|
6201
|
-
combineCodec as
|
|
6254
|
+
combineCodec as combineCodec76,
|
|
6202
6255
|
fixDecoderSize as fixDecoderSize28,
|
|
6203
6256
|
fixEncoderSize as fixEncoderSize29,
|
|
6204
6257
|
getBytesDecoder as getBytesDecoder28,
|
|
6205
6258
|
getBytesEncoder as getBytesEncoder29,
|
|
6206
|
-
getStructDecoder as
|
|
6207
|
-
getStructEncoder as
|
|
6259
|
+
getStructDecoder as getStructDecoder70,
|
|
6260
|
+
getStructEncoder as getStructEncoder70,
|
|
6208
6261
|
transformEncoder as transformEncoder28
|
|
6209
6262
|
} from "@solana/kit";
|
|
6210
6263
|
var SET_FEE_CLAIM_AUTHORITY_DISCRIMINATOR = new Uint8Array([
|
|
@@ -6224,7 +6277,7 @@ function getSetFeeClaimAuthorityDiscriminatorBytes() {
|
|
|
6224
6277
|
}
|
|
6225
6278
|
function getSetFeeClaimAuthorityInstructionDataEncoder() {
|
|
6226
6279
|
return transformEncoder28(
|
|
6227
|
-
|
|
6280
|
+
getStructEncoder70([["discriminator", fixEncoderSize29(getBytesEncoder29(), 8)]]),
|
|
6228
6281
|
(value) => ({
|
|
6229
6282
|
...value,
|
|
6230
6283
|
discriminator: SET_FEE_CLAIM_AUTHORITY_DISCRIMINATOR
|
|
@@ -6232,12 +6285,12 @@ function getSetFeeClaimAuthorityInstructionDataEncoder() {
|
|
|
6232
6285
|
);
|
|
6233
6286
|
}
|
|
6234
6287
|
function getSetFeeClaimAuthorityInstructionDataDecoder() {
|
|
6235
|
-
return
|
|
6288
|
+
return getStructDecoder70([
|
|
6236
6289
|
["discriminator", fixDecoderSize28(getBytesDecoder28(), 8)]
|
|
6237
6290
|
]);
|
|
6238
6291
|
}
|
|
6239
6292
|
function getSetFeeClaimAuthorityInstructionDataCodec() {
|
|
6240
|
-
return
|
|
6293
|
+
return combineCodec76(
|
|
6241
6294
|
getSetFeeClaimAuthorityInstructionDataEncoder(),
|
|
6242
6295
|
getSetFeeClaimAuthorityInstructionDataDecoder()
|
|
6243
6296
|
);
|
|
@@ -6292,13 +6345,13 @@ function parseSetFeeClaimAuthorityInstruction(instruction) {
|
|
|
6292
6345
|
|
|
6293
6346
|
// src/generated/instructions/setUpdateAuthority.ts
|
|
6294
6347
|
import {
|
|
6295
|
-
combineCodec as
|
|
6348
|
+
combineCodec as combineCodec77,
|
|
6296
6349
|
fixDecoderSize as fixDecoderSize29,
|
|
6297
6350
|
fixEncoderSize as fixEncoderSize30,
|
|
6298
6351
|
getBytesDecoder as getBytesDecoder29,
|
|
6299
6352
|
getBytesEncoder as getBytesEncoder30,
|
|
6300
|
-
getStructDecoder as
|
|
6301
|
-
getStructEncoder as
|
|
6353
|
+
getStructDecoder as getStructDecoder71,
|
|
6354
|
+
getStructEncoder as getStructEncoder71,
|
|
6302
6355
|
transformEncoder as transformEncoder29
|
|
6303
6356
|
} from "@solana/kit";
|
|
6304
6357
|
var SET_UPDATE_AUTHORITY_DISCRIMINATOR = new Uint8Array([
|
|
@@ -6318,17 +6371,17 @@ function getSetUpdateAuthorityDiscriminatorBytes() {
|
|
|
6318
6371
|
}
|
|
6319
6372
|
function getSetUpdateAuthorityInstructionDataEncoder() {
|
|
6320
6373
|
return transformEncoder29(
|
|
6321
|
-
|
|
6374
|
+
getStructEncoder71([["discriminator", fixEncoderSize30(getBytesEncoder30(), 8)]]),
|
|
6322
6375
|
(value) => ({ ...value, discriminator: SET_UPDATE_AUTHORITY_DISCRIMINATOR })
|
|
6323
6376
|
);
|
|
6324
6377
|
}
|
|
6325
6378
|
function getSetUpdateAuthorityInstructionDataDecoder() {
|
|
6326
|
-
return
|
|
6379
|
+
return getStructDecoder71([
|
|
6327
6380
|
["discriminator", fixDecoderSize29(getBytesDecoder29(), 8)]
|
|
6328
6381
|
]);
|
|
6329
6382
|
}
|
|
6330
6383
|
function getSetUpdateAuthorityInstructionDataCodec() {
|
|
6331
|
-
return
|
|
6384
|
+
return combineCodec77(
|
|
6332
6385
|
getSetUpdateAuthorityInstructionDataEncoder(),
|
|
6333
6386
|
getSetUpdateAuthorityInstructionDataDecoder()
|
|
6334
6387
|
);
|
|
@@ -6380,15 +6433,15 @@ function parseSetUpdateAuthorityInstruction(instruction) {
|
|
|
6380
6433
|
|
|
6381
6434
|
// src/generated/instructions/setWinningOption.ts
|
|
6382
6435
|
import {
|
|
6383
|
-
combineCodec as
|
|
6436
|
+
combineCodec as combineCodec78,
|
|
6384
6437
|
fixDecoderSize as fixDecoderSize30,
|
|
6385
6438
|
fixEncoderSize as fixEncoderSize31,
|
|
6386
|
-
getAddressEncoder as
|
|
6439
|
+
getAddressEncoder as getAddressEncoder47,
|
|
6387
6440
|
getBytesDecoder as getBytesDecoder30,
|
|
6388
6441
|
getBytesEncoder as getBytesEncoder31,
|
|
6389
|
-
getProgramDerivedAddress as
|
|
6390
|
-
getStructDecoder as
|
|
6391
|
-
getStructEncoder as
|
|
6442
|
+
getProgramDerivedAddress as getProgramDerivedAddress16,
|
|
6443
|
+
getStructDecoder as getStructDecoder72,
|
|
6444
|
+
getStructEncoder as getStructEncoder72,
|
|
6392
6445
|
getU16Decoder as getU16Decoder9,
|
|
6393
6446
|
getU16Encoder as getU16Encoder9,
|
|
6394
6447
|
getU64Decoder as getU64Decoder38,
|
|
@@ -6412,7 +6465,7 @@ function getSetWinningOptionDiscriminatorBytes() {
|
|
|
6412
6465
|
}
|
|
6413
6466
|
function getSetWinningOptionInstructionDataEncoder() {
|
|
6414
6467
|
return transformEncoder30(
|
|
6415
|
-
|
|
6468
|
+
getStructEncoder72([
|
|
6416
6469
|
["discriminator", fixEncoderSize31(getBytesEncoder31(), 8)],
|
|
6417
6470
|
["optionId", getU64Encoder38()],
|
|
6418
6471
|
["rewardBp", getU16Encoder9()]
|
|
@@ -6421,14 +6474,14 @@ function getSetWinningOptionInstructionDataEncoder() {
|
|
|
6421
6474
|
);
|
|
6422
6475
|
}
|
|
6423
6476
|
function getSetWinningOptionInstructionDataDecoder() {
|
|
6424
|
-
return
|
|
6477
|
+
return getStructDecoder72([
|
|
6425
6478
|
["discriminator", fixDecoderSize30(getBytesDecoder30(), 8)],
|
|
6426
6479
|
["optionId", getU64Decoder38()],
|
|
6427
6480
|
["rewardBp", getU16Decoder9()]
|
|
6428
6481
|
]);
|
|
6429
6482
|
}
|
|
6430
6483
|
function getSetWinningOptionInstructionDataCodec() {
|
|
6431
|
-
return
|
|
6484
|
+
return combineCodec78(
|
|
6432
6485
|
getSetWinningOptionInstructionDataEncoder(),
|
|
6433
6486
|
getSetWinningOptionInstructionDataDecoder()
|
|
6434
6487
|
);
|
|
@@ -6446,13 +6499,13 @@ async function getSetWinningOptionInstructionAsync(input, config) {
|
|
|
6446
6499
|
const accounts = originalAccounts;
|
|
6447
6500
|
const args = { ...input };
|
|
6448
6501
|
if (!accounts.option.value) {
|
|
6449
|
-
accounts.option.value = await
|
|
6502
|
+
accounts.option.value = await getProgramDerivedAddress16({
|
|
6450
6503
|
programAddress,
|
|
6451
6504
|
seeds: [
|
|
6452
6505
|
getBytesEncoder31().encode(
|
|
6453
6506
|
new Uint8Array([111, 112, 116, 105, 111, 110])
|
|
6454
6507
|
),
|
|
6455
|
-
|
|
6508
|
+
getAddressEncoder47().encode(expectAddress(accounts.market.value)),
|
|
6456
6509
|
getU64Encoder38().encode(expectSome(args.optionId))
|
|
6457
6510
|
]
|
|
6458
6511
|
});
|
|
@@ -6518,17 +6571,17 @@ function parseSetWinningOptionInstruction(instruction) {
|
|
|
6518
6571
|
|
|
6519
6572
|
// src/generated/instructions/stake.ts
|
|
6520
6573
|
import {
|
|
6521
|
-
combineCodec as
|
|
6574
|
+
combineCodec as combineCodec79,
|
|
6522
6575
|
fixDecoderSize as fixDecoderSize31,
|
|
6523
6576
|
fixEncoderSize as fixEncoderSize32,
|
|
6524
|
-
getAddressEncoder as
|
|
6577
|
+
getAddressEncoder as getAddressEncoder48,
|
|
6525
6578
|
getArrayDecoder as getArrayDecoder16,
|
|
6526
6579
|
getArrayEncoder as getArrayEncoder16,
|
|
6527
6580
|
getBytesDecoder as getBytesDecoder31,
|
|
6528
6581
|
getBytesEncoder as getBytesEncoder32,
|
|
6529
|
-
getProgramDerivedAddress as
|
|
6530
|
-
getStructDecoder as
|
|
6531
|
-
getStructEncoder as
|
|
6582
|
+
getProgramDerivedAddress as getProgramDerivedAddress17,
|
|
6583
|
+
getStructDecoder as getStructDecoder73,
|
|
6584
|
+
getStructEncoder as getStructEncoder73,
|
|
6532
6585
|
getU128Decoder as getU128Decoder6,
|
|
6533
6586
|
getU128Encoder as getU128Encoder6,
|
|
6534
6587
|
getU32Decoder as getU32Decoder21,
|
|
@@ -6554,7 +6607,7 @@ function getStakeDiscriminatorBytes() {
|
|
|
6554
6607
|
}
|
|
6555
6608
|
function getStakeInstructionDataEncoder() {
|
|
6556
6609
|
return transformEncoder31(
|
|
6557
|
-
|
|
6610
|
+
getStructEncoder73([
|
|
6558
6611
|
["discriminator", fixEncoderSize32(getBytesEncoder32(), 8)],
|
|
6559
6612
|
["computationOffset", getU64Encoder39()],
|
|
6560
6613
|
["stakeAccountId", getU32Encoder21()],
|
|
@@ -6572,7 +6625,7 @@ function getStakeInstructionDataEncoder() {
|
|
|
6572
6625
|
);
|
|
6573
6626
|
}
|
|
6574
6627
|
function getStakeInstructionDataDecoder() {
|
|
6575
|
-
return
|
|
6628
|
+
return getStructDecoder73([
|
|
6576
6629
|
["discriminator", fixDecoderSize31(getBytesDecoder31(), 8)],
|
|
6577
6630
|
["computationOffset", getU64Decoder39()],
|
|
6578
6631
|
["stakeAccountId", getU32Decoder21()],
|
|
@@ -6585,7 +6638,7 @@ function getStakeInstructionDataDecoder() {
|
|
|
6585
6638
|
]);
|
|
6586
6639
|
}
|
|
6587
6640
|
function getStakeInstructionDataCodec() {
|
|
6588
|
-
return
|
|
6641
|
+
return combineCodec79(
|
|
6589
6642
|
getStakeInstructionDataEncoder(),
|
|
6590
6643
|
getStakeInstructionDataDecoder()
|
|
6591
6644
|
);
|
|
@@ -6622,17 +6675,17 @@ async function getStakeInstructionAsync(input, config) {
|
|
|
6622
6675
|
const accounts = originalAccounts;
|
|
6623
6676
|
const args = { ...input };
|
|
6624
6677
|
if (!accounts.marketTokenAta.value) {
|
|
6625
|
-
accounts.marketTokenAta.value = await
|
|
6678
|
+
accounts.marketTokenAta.value = await getProgramDerivedAddress17({
|
|
6626
6679
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
6627
6680
|
seeds: [
|
|
6628
|
-
|
|
6629
|
-
|
|
6630
|
-
|
|
6681
|
+
getAddressEncoder48().encode(expectAddress(accounts.market.value)),
|
|
6682
|
+
getAddressEncoder48().encode(expectAddress(accounts.tokenProgram.value)),
|
|
6683
|
+
getAddressEncoder48().encode(expectAddress(accounts.tokenMint.value))
|
|
6631
6684
|
]
|
|
6632
6685
|
});
|
|
6633
6686
|
}
|
|
6634
6687
|
if (!accounts.signPdaAccount.value) {
|
|
6635
|
-
accounts.signPdaAccount.value = await
|
|
6688
|
+
accounts.signPdaAccount.value = await getProgramDerivedAddress17({
|
|
6636
6689
|
programAddress,
|
|
6637
6690
|
seeds: [
|
|
6638
6691
|
getBytesEncoder32().encode(
|
|
@@ -6813,7 +6866,7 @@ function parseStakeInstruction(instruction) {
|
|
|
6813
6866
|
|
|
6814
6867
|
// src/generated/instructions/stakeCallback.ts
|
|
6815
6868
|
import {
|
|
6816
|
-
combineCodec as
|
|
6869
|
+
combineCodec as combineCodec80,
|
|
6817
6870
|
fixDecoderSize as fixDecoderSize32,
|
|
6818
6871
|
fixEncoderSize as fixEncoderSize33,
|
|
6819
6872
|
getArrayDecoder as getArrayDecoder17,
|
|
@@ -6822,8 +6875,8 @@ import {
|
|
|
6822
6875
|
getBytesEncoder as getBytesEncoder33,
|
|
6823
6876
|
getDiscriminatedUnionDecoder as getDiscriminatedUnionDecoder5,
|
|
6824
6877
|
getDiscriminatedUnionEncoder as getDiscriminatedUnionEncoder5,
|
|
6825
|
-
getStructDecoder as
|
|
6826
|
-
getStructEncoder as
|
|
6878
|
+
getStructDecoder as getStructDecoder74,
|
|
6879
|
+
getStructEncoder as getStructEncoder74,
|
|
6827
6880
|
getTupleDecoder as getTupleDecoder7,
|
|
6828
6881
|
getTupleEncoder as getTupleEncoder7,
|
|
6829
6882
|
getU8Decoder as getU8Decoder24,
|
|
@@ -6849,14 +6902,14 @@ function getStakeCallbackDiscriminatorBytes() {
|
|
|
6849
6902
|
}
|
|
6850
6903
|
function getStakeCallbackInstructionDataEncoder() {
|
|
6851
6904
|
return transformEncoder32(
|
|
6852
|
-
|
|
6905
|
+
getStructEncoder74([
|
|
6853
6906
|
["discriminator", fixEncoderSize33(getBytesEncoder33(), 8)],
|
|
6854
6907
|
[
|
|
6855
6908
|
"output",
|
|
6856
6909
|
getDiscriminatedUnionEncoder5([
|
|
6857
6910
|
[
|
|
6858
6911
|
"Success",
|
|
6859
|
-
|
|
6912
|
+
getStructEncoder74([
|
|
6860
6913
|
[
|
|
6861
6914
|
"fields",
|
|
6862
6915
|
getTupleEncoder7([
|
|
@@ -6869,7 +6922,7 @@ function getStakeCallbackInstructionDataEncoder() {
|
|
|
6869
6922
|
["Failure", getUnitEncoder2()],
|
|
6870
6923
|
[
|
|
6871
6924
|
"MarkerForIdlBuildDoNotUseThis",
|
|
6872
|
-
|
|
6925
|
+
getStructEncoder74([
|
|
6873
6926
|
["fields", getTupleEncoder7([getStakeOutputEncoder()])]
|
|
6874
6927
|
])
|
|
6875
6928
|
]
|
|
@@ -6880,14 +6933,14 @@ function getStakeCallbackInstructionDataEncoder() {
|
|
|
6880
6933
|
);
|
|
6881
6934
|
}
|
|
6882
6935
|
function getStakeCallbackInstructionDataDecoder() {
|
|
6883
|
-
return
|
|
6936
|
+
return getStructDecoder74([
|
|
6884
6937
|
["discriminator", fixDecoderSize32(getBytesDecoder32(), 8)],
|
|
6885
6938
|
[
|
|
6886
6939
|
"output",
|
|
6887
6940
|
getDiscriminatedUnionDecoder5([
|
|
6888
6941
|
[
|
|
6889
6942
|
"Success",
|
|
6890
|
-
|
|
6943
|
+
getStructDecoder74([
|
|
6891
6944
|
[
|
|
6892
6945
|
"fields",
|
|
6893
6946
|
getTupleDecoder7([
|
|
@@ -6900,7 +6953,7 @@ function getStakeCallbackInstructionDataDecoder() {
|
|
|
6900
6953
|
["Failure", getUnitDecoder2()],
|
|
6901
6954
|
[
|
|
6902
6955
|
"MarkerForIdlBuildDoNotUseThis",
|
|
6903
|
-
|
|
6956
|
+
getStructDecoder74([
|
|
6904
6957
|
["fields", getTupleDecoder7([getStakeOutputDecoder()])]
|
|
6905
6958
|
])
|
|
6906
6959
|
]
|
|
@@ -6909,7 +6962,7 @@ function getStakeCallbackInstructionDataDecoder() {
|
|
|
6909
6962
|
]);
|
|
6910
6963
|
}
|
|
6911
6964
|
function getStakeCallbackInstructionDataCodec() {
|
|
6912
|
-
return
|
|
6965
|
+
return combineCodec80(
|
|
6913
6966
|
getStakeCallbackInstructionDataEncoder(),
|
|
6914
6967
|
getStakeCallbackInstructionDataDecoder()
|
|
6915
6968
|
);
|
|
@@ -6986,13 +7039,13 @@ function parseStakeCallbackInstruction(instruction) {
|
|
|
6986
7039
|
|
|
6987
7040
|
// src/generated/instructions/stakeCompDef.ts
|
|
6988
7041
|
import {
|
|
6989
|
-
combineCodec as
|
|
7042
|
+
combineCodec as combineCodec81,
|
|
6990
7043
|
fixDecoderSize as fixDecoderSize33,
|
|
6991
7044
|
fixEncoderSize as fixEncoderSize34,
|
|
6992
7045
|
getBytesDecoder as getBytesDecoder33,
|
|
6993
7046
|
getBytesEncoder as getBytesEncoder34,
|
|
6994
|
-
getStructDecoder as
|
|
6995
|
-
getStructEncoder as
|
|
7047
|
+
getStructDecoder as getStructDecoder75,
|
|
7048
|
+
getStructEncoder as getStructEncoder75,
|
|
6996
7049
|
transformEncoder as transformEncoder33
|
|
6997
7050
|
} from "@solana/kit";
|
|
6998
7051
|
var STAKE_COMP_DEF_DISCRIMINATOR = new Uint8Array([
|
|
@@ -7012,17 +7065,17 @@ function getStakeCompDefDiscriminatorBytes() {
|
|
|
7012
7065
|
}
|
|
7013
7066
|
function getStakeCompDefInstructionDataEncoder() {
|
|
7014
7067
|
return transformEncoder33(
|
|
7015
|
-
|
|
7068
|
+
getStructEncoder75([["discriminator", fixEncoderSize34(getBytesEncoder34(), 8)]]),
|
|
7016
7069
|
(value) => ({ ...value, discriminator: STAKE_COMP_DEF_DISCRIMINATOR })
|
|
7017
7070
|
);
|
|
7018
7071
|
}
|
|
7019
7072
|
function getStakeCompDefInstructionDataDecoder() {
|
|
7020
|
-
return
|
|
7073
|
+
return getStructDecoder75([
|
|
7021
7074
|
["discriminator", fixDecoderSize33(getBytesDecoder33(), 8)]
|
|
7022
7075
|
]);
|
|
7023
7076
|
}
|
|
7024
7077
|
function getStakeCompDefInstructionDataCodec() {
|
|
7025
|
-
return
|
|
7078
|
+
return combineCodec81(
|
|
7026
7079
|
getStakeCompDefInstructionDataEncoder(),
|
|
7027
7080
|
getStakeCompDefInstructionDataDecoder()
|
|
7028
7081
|
);
|
|
@@ -7093,15 +7146,15 @@ function parseStakeCompDefInstruction(instruction) {
|
|
|
7093
7146
|
|
|
7094
7147
|
// src/generated/instructions/unstake.ts
|
|
7095
7148
|
import {
|
|
7096
|
-
combineCodec as
|
|
7149
|
+
combineCodec as combineCodec82,
|
|
7097
7150
|
fixDecoderSize as fixDecoderSize34,
|
|
7098
7151
|
fixEncoderSize as fixEncoderSize35,
|
|
7099
|
-
getAddressEncoder as
|
|
7152
|
+
getAddressEncoder as getAddressEncoder49,
|
|
7100
7153
|
getBytesDecoder as getBytesDecoder34,
|
|
7101
7154
|
getBytesEncoder as getBytesEncoder35,
|
|
7102
|
-
getProgramDerivedAddress as
|
|
7103
|
-
getStructDecoder as
|
|
7104
|
-
getStructEncoder as
|
|
7155
|
+
getProgramDerivedAddress as getProgramDerivedAddress18,
|
|
7156
|
+
getStructDecoder as getStructDecoder76,
|
|
7157
|
+
getStructEncoder as getStructEncoder76,
|
|
7105
7158
|
getU32Decoder as getU32Decoder22,
|
|
7106
7159
|
getU32Encoder as getU32Encoder22,
|
|
7107
7160
|
transformEncoder as transformEncoder34
|
|
@@ -7121,7 +7174,7 @@ function getUnstakeDiscriminatorBytes() {
|
|
|
7121
7174
|
}
|
|
7122
7175
|
function getUnstakeInstructionDataEncoder() {
|
|
7123
7176
|
return transformEncoder34(
|
|
7124
|
-
|
|
7177
|
+
getStructEncoder76([
|
|
7125
7178
|
["discriminator", fixEncoderSize35(getBytesEncoder35(), 8)],
|
|
7126
7179
|
["stakeAccountId", getU32Encoder22()]
|
|
7127
7180
|
]),
|
|
@@ -7129,13 +7182,13 @@ function getUnstakeInstructionDataEncoder() {
|
|
|
7129
7182
|
);
|
|
7130
7183
|
}
|
|
7131
7184
|
function getUnstakeInstructionDataDecoder() {
|
|
7132
|
-
return
|
|
7185
|
+
return getStructDecoder76([
|
|
7133
7186
|
["discriminator", fixDecoderSize34(getBytesDecoder34(), 8)],
|
|
7134
7187
|
["stakeAccountId", getU32Decoder22()]
|
|
7135
7188
|
]);
|
|
7136
7189
|
}
|
|
7137
7190
|
function getUnstakeInstructionDataCodec() {
|
|
7138
|
-
return
|
|
7191
|
+
return combineCodec82(
|
|
7139
7192
|
getUnstakeInstructionDataEncoder(),
|
|
7140
7193
|
getUnstakeInstructionDataDecoder()
|
|
7141
7194
|
);
|
|
@@ -7159,7 +7212,7 @@ async function getUnstakeInstructionAsync(input, config) {
|
|
|
7159
7212
|
const accounts = originalAccounts;
|
|
7160
7213
|
const args = { ...input };
|
|
7161
7214
|
if (!accounts.stakeAccount.value) {
|
|
7162
|
-
accounts.stakeAccount.value = await
|
|
7215
|
+
accounts.stakeAccount.value = await getProgramDerivedAddress18({
|
|
7163
7216
|
programAddress,
|
|
7164
7217
|
seeds: [
|
|
7165
7218
|
getBytesEncoder35().encode(
|
|
@@ -7179,19 +7232,19 @@ async function getUnstakeInstructionAsync(input, config) {
|
|
|
7179
7232
|
116
|
|
7180
7233
|
])
|
|
7181
7234
|
),
|
|
7182
|
-
|
|
7183
|
-
|
|
7235
|
+
getAddressEncoder49().encode(expectAddress(accounts.owner.value)),
|
|
7236
|
+
getAddressEncoder49().encode(expectAddress(accounts.market.value)),
|
|
7184
7237
|
getU32Encoder22().encode(expectSome(args.stakeAccountId))
|
|
7185
7238
|
]
|
|
7186
7239
|
});
|
|
7187
7240
|
}
|
|
7188
7241
|
if (!accounts.marketTokenAta.value) {
|
|
7189
|
-
accounts.marketTokenAta.value = await
|
|
7242
|
+
accounts.marketTokenAta.value = await getProgramDerivedAddress18({
|
|
7190
7243
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
7191
7244
|
seeds: [
|
|
7192
|
-
|
|
7193
|
-
|
|
7194
|
-
|
|
7245
|
+
getAddressEncoder49().encode(expectAddress(accounts.market.value)),
|
|
7246
|
+
getAddressEncoder49().encode(expectAddress(accounts.tokenProgram.value)),
|
|
7247
|
+
getAddressEncoder49().encode(expectAddress(accounts.tokenMint.value))
|
|
7195
7248
|
]
|
|
7196
7249
|
});
|
|
7197
7250
|
}
|
|
@@ -7286,13 +7339,15 @@ function parseUnstakeInstruction(instruction) {
|
|
|
7286
7339
|
|
|
7287
7340
|
// src/generated/instructions/updatePlatformConfig.ts
|
|
7288
7341
|
import {
|
|
7289
|
-
combineCodec as
|
|
7342
|
+
combineCodec as combineCodec83,
|
|
7290
7343
|
fixDecoderSize as fixDecoderSize35,
|
|
7291
7344
|
fixEncoderSize as fixEncoderSize36,
|
|
7345
|
+
getAddressDecoder as getAddressDecoder34,
|
|
7346
|
+
getAddressEncoder as getAddressEncoder50,
|
|
7292
7347
|
getBytesDecoder as getBytesDecoder35,
|
|
7293
7348
|
getBytesEncoder as getBytesEncoder36,
|
|
7294
|
-
getStructDecoder as
|
|
7295
|
-
getStructEncoder as
|
|
7349
|
+
getStructDecoder as getStructDecoder77,
|
|
7350
|
+
getStructEncoder as getStructEncoder77,
|
|
7296
7351
|
getU16Decoder as getU16Decoder10,
|
|
7297
7352
|
getU16Encoder as getU16Encoder10,
|
|
7298
7353
|
getU64Decoder as getU64Decoder40,
|
|
@@ -7316,14 +7371,14 @@ function getUpdatePlatformConfigDiscriminatorBytes() {
|
|
|
7316
7371
|
}
|
|
7317
7372
|
function getUpdatePlatformConfigInstructionDataEncoder() {
|
|
7318
7373
|
return transformEncoder35(
|
|
7319
|
-
|
|
7374
|
+
getStructEncoder77([
|
|
7320
7375
|
["discriminator", fixEncoderSize36(getBytesEncoder36(), 8)],
|
|
7321
7376
|
["platformFeeBp", getU16Encoder10()],
|
|
7322
7377
|
["rewardPoolFeeBp", getU16Encoder10()],
|
|
7323
7378
|
["creatorFeeBp", getU16Encoder10()],
|
|
7379
|
+
["revealAuthority", getAddressEncoder50()],
|
|
7324
7380
|
["minTimeToStakeSeconds", getU64Encoder40()],
|
|
7325
|
-
["
|
|
7326
|
-
["maxRevealPeriodSeconds", getU64Encoder40()],
|
|
7381
|
+
["revealPeriodSeconds", getU64Encoder40()],
|
|
7327
7382
|
["marketResolutionDeadlineSeconds", getU64Encoder40()]
|
|
7328
7383
|
]),
|
|
7329
7384
|
(value) => ({
|
|
@@ -7333,19 +7388,19 @@ function getUpdatePlatformConfigInstructionDataEncoder() {
|
|
|
7333
7388
|
);
|
|
7334
7389
|
}
|
|
7335
7390
|
function getUpdatePlatformConfigInstructionDataDecoder() {
|
|
7336
|
-
return
|
|
7391
|
+
return getStructDecoder77([
|
|
7337
7392
|
["discriminator", fixDecoderSize35(getBytesDecoder35(), 8)],
|
|
7338
7393
|
["platformFeeBp", getU16Decoder10()],
|
|
7339
7394
|
["rewardPoolFeeBp", getU16Decoder10()],
|
|
7340
7395
|
["creatorFeeBp", getU16Decoder10()],
|
|
7396
|
+
["revealAuthority", getAddressDecoder34()],
|
|
7341
7397
|
["minTimeToStakeSeconds", getU64Decoder40()],
|
|
7342
|
-
["
|
|
7343
|
-
["maxRevealPeriodSeconds", getU64Decoder40()],
|
|
7398
|
+
["revealPeriodSeconds", getU64Decoder40()],
|
|
7344
7399
|
["marketResolutionDeadlineSeconds", getU64Decoder40()]
|
|
7345
7400
|
]);
|
|
7346
7401
|
}
|
|
7347
7402
|
function getUpdatePlatformConfigInstructionDataCodec() {
|
|
7348
|
-
return
|
|
7403
|
+
return combineCodec83(
|
|
7349
7404
|
getUpdatePlatformConfigInstructionDataEncoder(),
|
|
7350
7405
|
getUpdatePlatformConfigInstructionDataDecoder()
|
|
7351
7406
|
);
|
|
@@ -7397,15 +7452,15 @@ function parseUpdatePlatformConfigInstruction(instruction) {
|
|
|
7397
7452
|
|
|
7398
7453
|
// src/generated/instructions/withdrawReward.ts
|
|
7399
7454
|
import {
|
|
7400
|
-
combineCodec as
|
|
7455
|
+
combineCodec as combineCodec84,
|
|
7401
7456
|
fixDecoderSize as fixDecoderSize36,
|
|
7402
7457
|
fixEncoderSize as fixEncoderSize37,
|
|
7403
|
-
getAddressEncoder as
|
|
7458
|
+
getAddressEncoder as getAddressEncoder51,
|
|
7404
7459
|
getBytesDecoder as getBytesDecoder36,
|
|
7405
7460
|
getBytesEncoder as getBytesEncoder37,
|
|
7406
|
-
getProgramDerivedAddress as
|
|
7407
|
-
getStructDecoder as
|
|
7408
|
-
getStructEncoder as
|
|
7461
|
+
getProgramDerivedAddress as getProgramDerivedAddress19,
|
|
7462
|
+
getStructDecoder as getStructDecoder78,
|
|
7463
|
+
getStructEncoder as getStructEncoder78,
|
|
7409
7464
|
transformEncoder as transformEncoder36
|
|
7410
7465
|
} from "@solana/kit";
|
|
7411
7466
|
var WITHDRAW_REWARD_DISCRIMINATOR = new Uint8Array([
|
|
@@ -7425,17 +7480,17 @@ function getWithdrawRewardDiscriminatorBytes() {
|
|
|
7425
7480
|
}
|
|
7426
7481
|
function getWithdrawRewardInstructionDataEncoder() {
|
|
7427
7482
|
return transformEncoder36(
|
|
7428
|
-
|
|
7483
|
+
getStructEncoder78([["discriminator", fixEncoderSize37(getBytesEncoder37(), 8)]]),
|
|
7429
7484
|
(value) => ({ ...value, discriminator: WITHDRAW_REWARD_DISCRIMINATOR })
|
|
7430
7485
|
);
|
|
7431
7486
|
}
|
|
7432
7487
|
function getWithdrawRewardInstructionDataDecoder() {
|
|
7433
|
-
return
|
|
7488
|
+
return getStructDecoder78([
|
|
7434
7489
|
["discriminator", fixDecoderSize36(getBytesDecoder36(), 8)]
|
|
7435
7490
|
]);
|
|
7436
7491
|
}
|
|
7437
7492
|
function getWithdrawRewardInstructionDataCodec() {
|
|
7438
|
-
return
|
|
7493
|
+
return combineCodec84(
|
|
7439
7494
|
getWithdrawRewardInstructionDataEncoder(),
|
|
7440
7495
|
getWithdrawRewardInstructionDataDecoder()
|
|
7441
7496
|
);
|
|
@@ -7456,24 +7511,24 @@ async function getWithdrawRewardInstructionAsync(input, config) {
|
|
|
7456
7511
|
};
|
|
7457
7512
|
const accounts = originalAccounts;
|
|
7458
7513
|
if (!accounts.sponsorAccount.value) {
|
|
7459
|
-
accounts.sponsorAccount.value = await
|
|
7514
|
+
accounts.sponsorAccount.value = await getProgramDerivedAddress19({
|
|
7460
7515
|
programAddress,
|
|
7461
7516
|
seeds: [
|
|
7462
7517
|
getBytesEncoder37().encode(
|
|
7463
7518
|
new Uint8Array([115, 112, 111, 110, 115, 111, 114])
|
|
7464
7519
|
),
|
|
7465
|
-
|
|
7466
|
-
|
|
7520
|
+
getAddressEncoder51().encode(expectAddress(accounts.sponsor.value)),
|
|
7521
|
+
getAddressEncoder51().encode(expectAddress(accounts.market.value))
|
|
7467
7522
|
]
|
|
7468
7523
|
});
|
|
7469
7524
|
}
|
|
7470
7525
|
if (!accounts.marketTokenAta.value) {
|
|
7471
|
-
accounts.marketTokenAta.value = await
|
|
7526
|
+
accounts.marketTokenAta.value = await getProgramDerivedAddress19({
|
|
7472
7527
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
7473
7528
|
seeds: [
|
|
7474
|
-
|
|
7475
|
-
|
|
7476
|
-
|
|
7529
|
+
getAddressEncoder51().encode(expectAddress(accounts.market.value)),
|
|
7530
|
+
getAddressEncoder51().encode(expectAddress(accounts.tokenProgram.value)),
|
|
7531
|
+
getAddressEncoder51().encode(expectAddress(accounts.tokenMint.value))
|
|
7477
7532
|
]
|
|
7478
7533
|
});
|
|
7479
7534
|
}
|
|
@@ -7687,6 +7742,44 @@ function getComputeAccounts(ixName, config) {
|
|
|
7687
7742
|
};
|
|
7688
7743
|
}
|
|
7689
7744
|
|
|
7745
|
+
// src/arcium/awaitFinalizeComputation.ts
|
|
7746
|
+
var TIMEOUT_SLOTS = 180;
|
|
7747
|
+
var DEFAULT_POLL_INTERVAL = 1e3;
|
|
7748
|
+
var DEFAULT_SIGNATURE_LIMIT = 100;
|
|
7749
|
+
var awaitComputationFinalization = async (rpc, computationAccount, invocationSignature, options) => {
|
|
7750
|
+
const commitment = options?.commitment ?? "confirmed";
|
|
7751
|
+
const pollInterval = options?.pollInterval ?? DEFAULT_POLL_INTERVAL;
|
|
7752
|
+
const limit = options?.transactionCountLimit ?? DEFAULT_SIGNATURE_LIMIT;
|
|
7753
|
+
const invocationTx = await rpc.getTransaction(invocationSignature, {
|
|
7754
|
+
commitment,
|
|
7755
|
+
encoding: "json",
|
|
7756
|
+
maxSupportedTransactionVersion: 0
|
|
7757
|
+
}).send();
|
|
7758
|
+
if (!invocationTx) {
|
|
7759
|
+
throw new Error(`Invocation transaction ${invocationSignature} not found`);
|
|
7760
|
+
}
|
|
7761
|
+
const deadlineSlot = invocationTx.slot + BigInt(TIMEOUT_SLOTS);
|
|
7762
|
+
for (; ; ) {
|
|
7763
|
+
const signatures = await rpc.getSignaturesForAddress(computationAccount, {
|
|
7764
|
+
limit,
|
|
7765
|
+
commitment
|
|
7766
|
+
}).send();
|
|
7767
|
+
for (const sigInfo of signatures) {
|
|
7768
|
+
if (sigInfo.signature === invocationSignature) continue;
|
|
7769
|
+
if (sigInfo.err === null) {
|
|
7770
|
+
return sigInfo.signature;
|
|
7771
|
+
}
|
|
7772
|
+
}
|
|
7773
|
+
const currentSlot = await rpc.getSlot({ commitment }).send();
|
|
7774
|
+
if (currentSlot > deadlineSlot) {
|
|
7775
|
+
throw new Error(
|
|
7776
|
+
`Computation ${computationAccount} not finalized within ${TIMEOUT_SLOTS} slots of invocation ${invocationSignature}`
|
|
7777
|
+
);
|
|
7778
|
+
}
|
|
7779
|
+
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
7780
|
+
}
|
|
7781
|
+
};
|
|
7782
|
+
|
|
7690
7783
|
// src/instructions/stake.ts
|
|
7691
7784
|
async function stake(input, config) {
|
|
7692
7785
|
const {
|
|
@@ -7727,6 +7820,10 @@ async function stake(input, config) {
|
|
|
7727
7820
|
programAddress ? { programAddress } : void 0
|
|
7728
7821
|
);
|
|
7729
7822
|
}
|
|
7823
|
+
async function awaitStakeFinalization(rpc, txSignature, config, options) {
|
|
7824
|
+
const { computationAccount } = getComputeAccounts("stake", config);
|
|
7825
|
+
return awaitComputationFinalization(rpc, computationAccount, txSignature, options);
|
|
7826
|
+
}
|
|
7730
7827
|
|
|
7731
7828
|
// src/instructions/revealStake.ts
|
|
7732
7829
|
async function revealStake(input, config) {
|
|
@@ -7742,6 +7839,10 @@ async function revealStake(input, config) {
|
|
|
7742
7839
|
programAddress ? { programAddress } : void 0
|
|
7743
7840
|
);
|
|
7744
7841
|
}
|
|
7842
|
+
async function awaitRevealStakeFinalization(rpc, txSignature, config, options) {
|
|
7843
|
+
const { computationAccount } = getComputeAccounts("reveal_stake", config);
|
|
7844
|
+
return awaitComputationFinalization(rpc, computationAccount, txSignature, options);
|
|
7845
|
+
}
|
|
7745
7846
|
|
|
7746
7847
|
// src/instructions/addMarketOption.ts
|
|
7747
7848
|
async function addMarketOption(input) {
|
|
@@ -7761,24 +7862,6 @@ function openMarket(input) {
|
|
|
7761
7862
|
);
|
|
7762
7863
|
}
|
|
7763
7864
|
|
|
7764
|
-
// src/instructions/pauseStaking.ts
|
|
7765
|
-
function pauseStaking(input) {
|
|
7766
|
-
const { programAddress, ...params } = input;
|
|
7767
|
-
return getPauseStakingInstruction(
|
|
7768
|
-
params,
|
|
7769
|
-
programAddress ? { programAddress } : void 0
|
|
7770
|
-
);
|
|
7771
|
-
}
|
|
7772
|
-
|
|
7773
|
-
// src/instructions/resumeStaking.ts
|
|
7774
|
-
function resumeStaking(input) {
|
|
7775
|
-
const { programAddress, ...params } = input;
|
|
7776
|
-
return getResumeStakingInstruction(
|
|
7777
|
-
params,
|
|
7778
|
-
programAddress ? { programAddress } : void 0
|
|
7779
|
-
);
|
|
7780
|
-
}
|
|
7781
|
-
|
|
7782
7865
|
// src/instructions/setWinningOption.ts
|
|
7783
7866
|
async function setWinningOption(input) {
|
|
7784
7867
|
const { programAddress, ...params } = input;
|
|
@@ -7833,6 +7916,15 @@ async function initAllowedMint(input) {
|
|
|
7833
7916
|
);
|
|
7834
7917
|
}
|
|
7835
7918
|
|
|
7919
|
+
// src/instructions/claimRewards.ts
|
|
7920
|
+
async function claimRewards(input) {
|
|
7921
|
+
const { programAddress, ...params } = input;
|
|
7922
|
+
return getClaimRewardsInstructionAsync(
|
|
7923
|
+
params,
|
|
7924
|
+
programAddress ? { programAddress } : void 0
|
|
7925
|
+
);
|
|
7926
|
+
}
|
|
7927
|
+
|
|
7836
7928
|
// src/instructions/closeStakeAccount.ts
|
|
7837
7929
|
async function closeStakeAccount(input) {
|
|
7838
7930
|
const { programAddress, ...params } = input;
|
|
@@ -7842,6 +7934,15 @@ async function closeStakeAccount(input) {
|
|
|
7842
7934
|
);
|
|
7843
7935
|
}
|
|
7844
7936
|
|
|
7937
|
+
// src/instructions/closeUnrevealedStakeAccount.ts
|
|
7938
|
+
async function closeUnrevealedStakeAccount(input) {
|
|
7939
|
+
const { programAddress, ...params } = input;
|
|
7940
|
+
return getCloseUnrevealedStakeAccountInstructionAsync(
|
|
7941
|
+
params,
|
|
7942
|
+
programAddress ? { programAddress } : void 0
|
|
7943
|
+
);
|
|
7944
|
+
}
|
|
7945
|
+
|
|
7845
7946
|
// src/instructions/closeStuckStakeAccount.ts
|
|
7846
7947
|
async function closeStuckStakeAccount(input) {
|
|
7847
7948
|
const { programAddress, ...params } = input;
|
|
@@ -7880,17 +7981,17 @@ async function finalizeRevealStake(input) {
|
|
|
7880
7981
|
|
|
7881
7982
|
// src/accounts/platformConfig.ts
|
|
7882
7983
|
import {
|
|
7883
|
-
getAddressEncoder as
|
|
7884
|
-
getProgramDerivedAddress as
|
|
7984
|
+
getAddressEncoder as getAddressEncoder52,
|
|
7985
|
+
getProgramDerivedAddress as getProgramDerivedAddress20,
|
|
7885
7986
|
getUtf8Encoder as getUtf8Encoder4
|
|
7886
7987
|
} from "@solana/kit";
|
|
7887
7988
|
var PLATFORM_CONFIG_SEED = "platform_config";
|
|
7888
7989
|
async function getPlatformConfigAddress(authority, name, programId = OPPORTUNITY_MARKET_PROGRAM_ADDRESS) {
|
|
7889
|
-
return
|
|
7990
|
+
return getProgramDerivedAddress20({
|
|
7890
7991
|
programAddress: programId,
|
|
7891
7992
|
seeds: [
|
|
7892
7993
|
PLATFORM_CONFIG_SEED,
|
|
7893
|
-
|
|
7994
|
+
getAddressEncoder52().encode(authority),
|
|
7894
7995
|
getUtf8Encoder4().encode(name)
|
|
7895
7996
|
]
|
|
7896
7997
|
});
|
|
@@ -7906,9 +8007,9 @@ async function createPlatformConfig(rpc, params) {
|
|
|
7906
8007
|
rewardPoolFeeBp,
|
|
7907
8008
|
creatorFeeBp,
|
|
7908
8009
|
feeClaimAuthority,
|
|
8010
|
+
revealAuthority,
|
|
7909
8011
|
minTimeToStakeSeconds,
|
|
7910
|
-
|
|
7911
|
-
maxRevealPeriodSeconds,
|
|
8012
|
+
revealPeriodSeconds,
|
|
7912
8013
|
marketResolutionDeadlineSeconds
|
|
7913
8014
|
} = params;
|
|
7914
8015
|
const [platformConfigAddress] = await getPlatformConfigAddress(
|
|
@@ -7930,9 +8031,9 @@ async function createPlatformConfig(rpc, params) {
|
|
|
7930
8031
|
rewardPoolFeeBp,
|
|
7931
8032
|
creatorFeeBp,
|
|
7932
8033
|
feeClaimAuthority,
|
|
8034
|
+
revealAuthority,
|
|
7933
8035
|
minTimeToStakeSeconds,
|
|
7934
|
-
|
|
7935
|
-
maxRevealPeriodSeconds,
|
|
8036
|
+
revealPeriodSeconds,
|
|
7936
8037
|
marketResolutionDeadlineSeconds
|
|
7937
8038
|
},
|
|
7938
8039
|
programAddress ? { programAddress } : void 0
|
|
@@ -7948,9 +8049,9 @@ async function updatePlatformConfig(rpc, params) {
|
|
|
7948
8049
|
platformFeeBp,
|
|
7949
8050
|
rewardPoolFeeBp,
|
|
7950
8051
|
creatorFeeBp,
|
|
8052
|
+
revealAuthority,
|
|
7951
8053
|
minTimeToStakeSeconds,
|
|
7952
|
-
|
|
7953
|
-
maxRevealPeriodSeconds,
|
|
8054
|
+
revealPeriodSeconds,
|
|
7954
8055
|
marketResolutionDeadlineSeconds
|
|
7955
8056
|
} = params;
|
|
7956
8057
|
const [platformConfigAddress] = await getPlatformConfigAddress(
|
|
@@ -7971,9 +8072,9 @@ async function updatePlatformConfig(rpc, params) {
|
|
|
7971
8072
|
platformFeeBp,
|
|
7972
8073
|
rewardPoolFeeBp,
|
|
7973
8074
|
creatorFeeBp,
|
|
8075
|
+
revealAuthority,
|
|
7974
8076
|
minTimeToStakeSeconds,
|
|
7975
|
-
|
|
7976
|
-
maxRevealPeriodSeconds,
|
|
8077
|
+
revealPeriodSeconds,
|
|
7977
8078
|
marketResolutionDeadlineSeconds
|
|
7978
8079
|
},
|
|
7979
8080
|
programAddress ? { programAddress } : void 0
|
|
@@ -8027,13 +8128,13 @@ function setFeeClaimAuthority(input) {
|
|
|
8027
8128
|
|
|
8028
8129
|
// src/accounts/allowedMint.ts
|
|
8029
8130
|
import {
|
|
8030
|
-
getAddressEncoder as
|
|
8031
|
-
getProgramDerivedAddress as
|
|
8131
|
+
getAddressEncoder as getAddressEncoder53,
|
|
8132
|
+
getProgramDerivedAddress as getProgramDerivedAddress21
|
|
8032
8133
|
} from "@solana/kit";
|
|
8033
8134
|
var ALLOWED_MINT_SEED = "allowed_mint";
|
|
8034
8135
|
async function getAllowedMintAddress(platformConfig, mint, programId = OPPORTUNITY_MARKET_PROGRAM_ADDRESS) {
|
|
8035
|
-
const enc =
|
|
8036
|
-
return
|
|
8136
|
+
const enc = getAddressEncoder53();
|
|
8137
|
+
return getProgramDerivedAddress21({
|
|
8037
8138
|
programAddress: programId,
|
|
8038
8139
|
seeds: [ALLOWED_MINT_SEED, enc.encode(platformConfig), enc.encode(mint)]
|
|
8039
8140
|
});
|
|
@@ -8041,18 +8142,18 @@ async function getAllowedMintAddress(platformConfig, mint, programId = OPPORTUNI
|
|
|
8041
8142
|
|
|
8042
8143
|
// src/accounts/opportunityMarket.ts
|
|
8043
8144
|
import {
|
|
8044
|
-
getAddressEncoder as
|
|
8145
|
+
getAddressEncoder as getAddressEncoder54,
|
|
8045
8146
|
getU64Encoder as getU64Encoder41,
|
|
8046
|
-
getProgramDerivedAddress as
|
|
8147
|
+
getProgramDerivedAddress as getProgramDerivedAddress22
|
|
8047
8148
|
} from "@solana/kit";
|
|
8048
8149
|
var OPPORTUNITY_MARKET_SEED = "opportunity_market";
|
|
8049
8150
|
async function getOpportunityMarketAddress(platformConfig, creator, marketIndex, programId = OPPORTUNITY_MARKET_PROGRAM_ADDRESS) {
|
|
8050
|
-
return
|
|
8151
|
+
return getProgramDerivedAddress22({
|
|
8051
8152
|
programAddress: programId,
|
|
8052
8153
|
seeds: [
|
|
8053
8154
|
OPPORTUNITY_MARKET_SEED,
|
|
8054
|
-
|
|
8055
|
-
|
|
8155
|
+
getAddressEncoder54().encode(platformConfig),
|
|
8156
|
+
getAddressEncoder54().encode(creator),
|
|
8056
8157
|
getU64Encoder41().encode(BigInt(marketIndex))
|
|
8057
8158
|
]
|
|
8058
8159
|
});
|
|
@@ -8060,17 +8161,17 @@ async function getOpportunityMarketAddress(platformConfig, creator, marketIndex,
|
|
|
8060
8161
|
|
|
8061
8162
|
// src/accounts/opportunityMarketOption.ts
|
|
8062
8163
|
import {
|
|
8063
|
-
getAddressEncoder as
|
|
8164
|
+
getAddressEncoder as getAddressEncoder55,
|
|
8064
8165
|
getU64Encoder as getU64Encoder42,
|
|
8065
|
-
getProgramDerivedAddress as
|
|
8166
|
+
getProgramDerivedAddress as getProgramDerivedAddress23
|
|
8066
8167
|
} from "@solana/kit";
|
|
8067
8168
|
var OPPORTUNITY_MARKET_OPTION_SEED = "option";
|
|
8068
8169
|
async function getOpportunityMarketOptionAddress(market, optionId, programId = OPPORTUNITY_MARKET_PROGRAM_ADDRESS) {
|
|
8069
|
-
return
|
|
8170
|
+
return getProgramDerivedAddress23({
|
|
8070
8171
|
programAddress: programId,
|
|
8071
8172
|
seeds: [
|
|
8072
8173
|
OPPORTUNITY_MARKET_OPTION_SEED,
|
|
8073
|
-
|
|
8174
|
+
getAddressEncoder55().encode(market),
|
|
8074
8175
|
getU64Encoder42().encode(optionId)
|
|
8075
8176
|
]
|
|
8076
8177
|
});
|
|
@@ -8078,13 +8179,13 @@ async function getOpportunityMarketOptionAddress(market, optionId, programId = O
|
|
|
8078
8179
|
|
|
8079
8180
|
// src/accounts/opportunityMarketSponsor.ts
|
|
8080
8181
|
import {
|
|
8081
|
-
getAddressEncoder as
|
|
8082
|
-
getProgramDerivedAddress as
|
|
8182
|
+
getAddressEncoder as getAddressEncoder56,
|
|
8183
|
+
getProgramDerivedAddress as getProgramDerivedAddress24
|
|
8083
8184
|
} from "@solana/kit";
|
|
8084
8185
|
var SPONSOR_SEED = "sponsor";
|
|
8085
8186
|
async function getOpportunityMarketSponsorAddress(sponsor, market, programId = OPPORTUNITY_MARKET_PROGRAM_ADDRESS) {
|
|
8086
|
-
const addressEncoder =
|
|
8087
|
-
return
|
|
8187
|
+
const addressEncoder = getAddressEncoder56();
|
|
8188
|
+
return getProgramDerivedAddress24({
|
|
8088
8189
|
programAddress: programId,
|
|
8089
8190
|
seeds: [
|
|
8090
8191
|
SPONSOR_SEED,
|
|
@@ -8096,15 +8197,15 @@ async function getOpportunityMarketSponsorAddress(sponsor, market, programId = O
|
|
|
8096
8197
|
|
|
8097
8198
|
// src/accounts/stakeAccount.ts
|
|
8098
8199
|
import {
|
|
8099
|
-
getAddressEncoder as
|
|
8100
|
-
getProgramDerivedAddress as
|
|
8200
|
+
getAddressEncoder as getAddressEncoder57,
|
|
8201
|
+
getProgramDerivedAddress as getProgramDerivedAddress25
|
|
8101
8202
|
} from "@solana/kit";
|
|
8102
8203
|
var STAKE_ACCOUNT_SEED = "stake_account";
|
|
8103
8204
|
async function getStakeAccountAddress(owner, market, stakeAccountId, programId = OPPORTUNITY_MARKET_PROGRAM_ADDRESS) {
|
|
8104
|
-
const addressEncoder =
|
|
8205
|
+
const addressEncoder = getAddressEncoder57();
|
|
8105
8206
|
const idBytes = new Uint8Array(4);
|
|
8106
8207
|
new DataView(idBytes.buffer).setUint32(0, stakeAccountId, true);
|
|
8107
|
-
return
|
|
8208
|
+
return getProgramDerivedAddress25({
|
|
8108
8209
|
programAddress: programId,
|
|
8109
8210
|
seeds: [
|
|
8110
8211
|
STAKE_ACCOUNT_SEED,
|
|
@@ -8115,115 +8216,6 @@ async function getStakeAccountAddress(owner, market, stakeAccountId, programId =
|
|
|
8115
8216
|
});
|
|
8116
8217
|
}
|
|
8117
8218
|
|
|
8118
|
-
// src/arcium/awaitFinalizeComputation.ts
|
|
8119
|
-
import { getAddressEncoder as getAddressEncoder56 } from "@solana/kit";
|
|
8120
|
-
|
|
8121
|
-
// src/arcium/constants.ts
|
|
8122
|
-
var ARCIUM_PROGRAM_ID = "Arcj82pX7HxYKLR92qvgZUAd7vGS1k4hQvAFcPATFdEQ";
|
|
8123
|
-
|
|
8124
|
-
// src/arcium/awaitFinalizeComputation.ts
|
|
8125
|
-
var FINALIZE_COMPUTATION_EVENT_DISCRIMINATOR = new Uint8Array([27, 75, 117, 221, 191, 213, 253, 249]);
|
|
8126
|
-
function serializeLE(val, lengthInBytes) {
|
|
8127
|
-
const result = new Uint8Array(lengthInBytes);
|
|
8128
|
-
let tempVal = val;
|
|
8129
|
-
for (let i = 0; i < lengthInBytes; i++) {
|
|
8130
|
-
result[i] = Number(tempVal & BigInt(255));
|
|
8131
|
-
tempVal >>= BigInt(8);
|
|
8132
|
-
}
|
|
8133
|
-
return result;
|
|
8134
|
-
}
|
|
8135
|
-
function bytesEqual(a, b) {
|
|
8136
|
-
if (a.length !== b.length) return false;
|
|
8137
|
-
for (let i = 0; i < a.length; i++) {
|
|
8138
|
-
if (a[i] !== b[i]) return false;
|
|
8139
|
-
}
|
|
8140
|
-
return true;
|
|
8141
|
-
}
|
|
8142
|
-
var awaitBatchComputationFinalization = async (rpc, computationOffsets, options) => {
|
|
8143
|
-
if (computationOffsets.length === 0) {
|
|
8144
|
-
return /* @__PURE__ */ new Map();
|
|
8145
|
-
}
|
|
8146
|
-
const mxeProgramId = options?.mxeProgramId ?? OPPORTUNITY_MARKET_PROGRAM_ADDRESS;
|
|
8147
|
-
const commitment = options?.commitment ?? "confirmed";
|
|
8148
|
-
const mxeProgramIdBytes = getAddressEncoder56().encode(mxeProgramId);
|
|
8149
|
-
const transactionCountLimit = options?.transactionCountLimit ?? 100;
|
|
8150
|
-
const pollInterval = options?.pollInterval ?? 1e3;
|
|
8151
|
-
const maxAttempts = options?.maxAttempts ?? 120;
|
|
8152
|
-
const offsetBytesMap = /* @__PURE__ */ new Map();
|
|
8153
|
-
for (const offset of computationOffsets) {
|
|
8154
|
-
offsetBytesMap.set(offset, serializeLE(offset, 8));
|
|
8155
|
-
}
|
|
8156
|
-
const foundResults = /* @__PURE__ */ new Map();
|
|
8157
|
-
const remainingOffsets = new Set(computationOffsets);
|
|
8158
|
-
for (let attempt = 0; attempt < maxAttempts; attempt++) {
|
|
8159
|
-
try {
|
|
8160
|
-
const signatures = await rpc.getSignaturesForAddress(
|
|
8161
|
-
ARCIUM_PROGRAM_ID,
|
|
8162
|
-
{ limit: transactionCountLimit }
|
|
8163
|
-
).send();
|
|
8164
|
-
for (const sigInfo of signatures) {
|
|
8165
|
-
const tx = await rpc.getTransaction(sigInfo.signature, {
|
|
8166
|
-
commitment,
|
|
8167
|
-
encoding: "json",
|
|
8168
|
-
maxSupportedTransactionVersion: 0
|
|
8169
|
-
}).send();
|
|
8170
|
-
if (!tx) continue;
|
|
8171
|
-
const logs = tx.meta?.logMessages || [];
|
|
8172
|
-
for (const log of logs) {
|
|
8173
|
-
if (log.includes("Program data:")) {
|
|
8174
|
-
const base64Data = log.split("Program data: ")[1];
|
|
8175
|
-
if (!base64Data) continue;
|
|
8176
|
-
try {
|
|
8177
|
-
const eventData = Uint8Array.from(atob(base64Data), (c) => c.charCodeAt(0));
|
|
8178
|
-
if (eventData.length >= 48 && bytesEqual(eventData.subarray(0, 8), FINALIZE_COMPUTATION_EVENT_DISCRIMINATOR)) {
|
|
8179
|
-
const eventOffsetBytes = eventData.subarray(8, 16);
|
|
8180
|
-
const eventMxeProgramId = eventData.subarray(16, 48);
|
|
8181
|
-
if (!bytesEqual(eventMxeProgramId, mxeProgramIdBytes)) continue;
|
|
8182
|
-
for (const offset of remainingOffsets) {
|
|
8183
|
-
const expectedBytes = offsetBytesMap.get(offset);
|
|
8184
|
-
if (bytesEqual(eventOffsetBytes, expectedBytes)) {
|
|
8185
|
-
const txError = tx.meta?.err;
|
|
8186
|
-
let errorMessage;
|
|
8187
|
-
if (txError) {
|
|
8188
|
-
const errorLog = logs.find((l) => l.includes("Error") || l.includes("failed"));
|
|
8189
|
-
errorMessage = errorLog || JSON.stringify(txError);
|
|
8190
|
-
}
|
|
8191
|
-
foundResults.set(offset, {
|
|
8192
|
-
signature: sigInfo.signature,
|
|
8193
|
-
error: errorMessage
|
|
8194
|
-
});
|
|
8195
|
-
remainingOffsets.delete(offset);
|
|
8196
|
-
break;
|
|
8197
|
-
}
|
|
8198
|
-
}
|
|
8199
|
-
}
|
|
8200
|
-
} catch {
|
|
8201
|
-
continue;
|
|
8202
|
-
}
|
|
8203
|
-
}
|
|
8204
|
-
}
|
|
8205
|
-
if (remainingOffsets.size === 0) {
|
|
8206
|
-
return foundResults;
|
|
8207
|
-
}
|
|
8208
|
-
}
|
|
8209
|
-
if (remainingOffsets.size === 0) {
|
|
8210
|
-
return foundResults;
|
|
8211
|
-
}
|
|
8212
|
-
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
8213
|
-
} catch (error) {
|
|
8214
|
-
await new Promise((resolve) => setTimeout(resolve, pollInterval));
|
|
8215
|
-
}
|
|
8216
|
-
}
|
|
8217
|
-
const missingOffsets = Array.from(remainingOffsets).join(", ");
|
|
8218
|
-
throw new Error(
|
|
8219
|
-
`Computation finalization timed out after ${maxAttempts} attempts. Missing offsets: ${missingOffsets}`
|
|
8220
|
-
);
|
|
8221
|
-
};
|
|
8222
|
-
var awaitComputationFinalization = async (rpc, computationOffset, options) => {
|
|
8223
|
-
const results = await awaitBatchComputationFinalization(rpc, [computationOffset], options);
|
|
8224
|
-
return results.get(computationOffset);
|
|
8225
|
-
};
|
|
8226
|
-
|
|
8227
8219
|
// src/x25519/keypair.ts
|
|
8228
8220
|
import { RescueCipher, x25519 } from "@arcium-hq/client";
|
|
8229
8221
|
import { BN as BN3 } from "bn.js";
|
|
@@ -8257,9 +8249,11 @@ export {
|
|
|
8257
8249
|
ARCIUM_SIGNER_ACCOUNT_DISCRIMINATOR,
|
|
8258
8250
|
CLAIM_CREATOR_FEES_DISCRIMINATOR,
|
|
8259
8251
|
CLAIM_FEES_DISCRIMINATOR,
|
|
8252
|
+
CLAIM_REWARDS_DISCRIMINATOR,
|
|
8260
8253
|
CLOSE_OPTION_ACCOUNT_DISCRIMINATOR,
|
|
8261
8254
|
CLOSE_STAKE_ACCOUNT_DISCRIMINATOR,
|
|
8262
8255
|
CLOSE_STUCK_STAKE_ACCOUNT_DISCRIMINATOR,
|
|
8256
|
+
CLOSE_UNREVEALED_STAKE_ACCOUNT_DISCRIMINATOR,
|
|
8263
8257
|
CREATE_MARKET_DISCRIMINATOR,
|
|
8264
8258
|
END_REVEAL_PERIOD_DISCRIMINATOR,
|
|
8265
8259
|
FINALIZE_REVEAL_STAKE_DISCRIMINATOR,
|
|
@@ -8287,11 +8281,10 @@ export {
|
|
|
8287
8281
|
OPPORTUNITY_MARKET_ERROR__LOCKED,
|
|
8288
8282
|
OPPORTUNITY_MARKET_ERROR__MARKET_ALREADY_OPEN,
|
|
8289
8283
|
OPPORTUNITY_MARKET_ERROR__MARKET_NOT_OPEN,
|
|
8290
|
-
OPPORTUNITY_MARKET_ERROR__MARKET_NOT_PAUSED,
|
|
8291
8284
|
OPPORTUNITY_MARKET_ERROR__MARKET_NOT_RESOLVED,
|
|
8292
|
-
OPPORTUNITY_MARKET_ERROR__MARKET_PAUSED,
|
|
8293
8285
|
OPPORTUNITY_MARKET_ERROR__NOT_REVEALED,
|
|
8294
8286
|
OPPORTUNITY_MARKET_ERROR__NO_FEES_TO_CLAIM,
|
|
8287
|
+
OPPORTUNITY_MARKET_ERROR__NO_FINALIZED_WINNING_OPTION,
|
|
8295
8288
|
OPPORTUNITY_MARKET_ERROR__NO_REWARD_TO_CLAIM,
|
|
8296
8289
|
OPPORTUNITY_MARKET_ERROR__NO_STAKE,
|
|
8297
8290
|
OPPORTUNITY_MARKET_ERROR__OPTION_STILL_NEEDED,
|
|
@@ -8314,12 +8307,10 @@ export {
|
|
|
8314
8307
|
OpportunityMarketAccount,
|
|
8315
8308
|
OpportunityMarketInstruction,
|
|
8316
8309
|
Output,
|
|
8317
|
-
PAUSE_STAKING_DISCRIMINATOR,
|
|
8318
8310
|
PLATFORM_CONFIG_DISCRIMINATOR,
|
|
8319
8311
|
PLATFORM_CONFIG_SEED,
|
|
8320
8312
|
Parameter,
|
|
8321
8313
|
RESOLVE_MARKET_DISCRIMINATOR,
|
|
8322
|
-
RESUME_STAKING_DISCRIMINATOR,
|
|
8323
8314
|
REVEAL_STAKE_CALLBACK_DISCRIMINATOR,
|
|
8324
8315
|
REVEAL_STAKE_COMP_DEF_DISCRIMINATOR,
|
|
8325
8316
|
REVEAL_STAKE_DISCRIMINATOR,
|
|
@@ -8337,14 +8328,17 @@ export {
|
|
|
8337
8328
|
WITHDRAW_REWARD_DISCRIMINATOR,
|
|
8338
8329
|
addMarketOption,
|
|
8339
8330
|
addReward,
|
|
8340
|
-
awaitBatchComputationFinalization,
|
|
8341
8331
|
awaitComputationFinalization,
|
|
8332
|
+
awaitRevealStakeFinalization,
|
|
8333
|
+
awaitStakeFinalization,
|
|
8342
8334
|
circuitSource,
|
|
8343
8335
|
claimCreatorFees,
|
|
8344
8336
|
claimFees,
|
|
8337
|
+
claimRewards,
|
|
8345
8338
|
closeOptionAccount,
|
|
8346
8339
|
closeStakeAccount,
|
|
8347
8340
|
closeStuckStakeAccount,
|
|
8341
|
+
closeUnrevealedStakeAccount,
|
|
8348
8342
|
createCipher,
|
|
8349
8343
|
createMarket,
|
|
8350
8344
|
createPlatformConfig,
|
|
@@ -8433,6 +8427,12 @@ export {
|
|
|
8433
8427
|
getClaimFeesInstructionDataCodec,
|
|
8434
8428
|
getClaimFeesInstructionDataDecoder,
|
|
8435
8429
|
getClaimFeesInstructionDataEncoder,
|
|
8430
|
+
getClaimRewardsDiscriminatorBytes,
|
|
8431
|
+
getClaimRewardsInstruction,
|
|
8432
|
+
getClaimRewardsInstructionAsync,
|
|
8433
|
+
getClaimRewardsInstructionDataCodec,
|
|
8434
|
+
getClaimRewardsInstructionDataDecoder,
|
|
8435
|
+
getClaimRewardsInstructionDataEncoder,
|
|
8436
8436
|
getClockAccountCodec,
|
|
8437
8437
|
getClockAccountDecoder,
|
|
8438
8438
|
getClockAccountEncoder,
|
|
@@ -8454,6 +8454,12 @@ export {
|
|
|
8454
8454
|
getCloseStuckStakeAccountInstructionDataCodec,
|
|
8455
8455
|
getCloseStuckStakeAccountInstructionDataDecoder,
|
|
8456
8456
|
getCloseStuckStakeAccountInstructionDataEncoder,
|
|
8457
|
+
getCloseUnrevealedStakeAccountDiscriminatorBytes,
|
|
8458
|
+
getCloseUnrevealedStakeAccountInstruction,
|
|
8459
|
+
getCloseUnrevealedStakeAccountInstructionAsync,
|
|
8460
|
+
getCloseUnrevealedStakeAccountInstructionDataCodec,
|
|
8461
|
+
getCloseUnrevealedStakeAccountInstructionDataDecoder,
|
|
8462
|
+
getCloseUnrevealedStakeAccountInstructionDataEncoder,
|
|
8457
8463
|
getClusterCodec,
|
|
8458
8464
|
getClusterDecoder,
|
|
8459
8465
|
getClusterEncoder,
|
|
@@ -8589,11 +8595,6 @@ export {
|
|
|
8589
8595
|
getParameterCodec,
|
|
8590
8596
|
getParameterDecoder,
|
|
8591
8597
|
getParameterEncoder,
|
|
8592
|
-
getPauseStakingDiscriminatorBytes,
|
|
8593
|
-
getPauseStakingInstruction,
|
|
8594
|
-
getPauseStakingInstructionDataCodec,
|
|
8595
|
-
getPauseStakingInstructionDataDecoder,
|
|
8596
|
-
getPauseStakingInstructionDataEncoder,
|
|
8597
8598
|
getPlatformConfigAddress,
|
|
8598
8599
|
getPlatformConfigCodec,
|
|
8599
8600
|
getPlatformConfigDecoder,
|
|
@@ -8604,11 +8605,6 @@ export {
|
|
|
8604
8605
|
getResolveMarketInstructionDataCodec,
|
|
8605
8606
|
getResolveMarketInstructionDataDecoder,
|
|
8606
8607
|
getResolveMarketInstructionDataEncoder,
|
|
8607
|
-
getResumeStakingDiscriminatorBytes,
|
|
8608
|
-
getResumeStakingInstruction,
|
|
8609
|
-
getResumeStakingInstructionDataCodec,
|
|
8610
|
-
getResumeStakingInstructionDataDecoder,
|
|
8611
|
-
getResumeStakingInstructionDataEncoder,
|
|
8612
8608
|
getRevealPeriodEndedEventCodec,
|
|
8613
8609
|
getRevealPeriodEndedEventDecoder,
|
|
8614
8610
|
getRevealPeriodEndedEventEncoder,
|
|
@@ -8640,6 +8636,9 @@ export {
|
|
|
8640
8636
|
getRewardWithdrawnEventCodec,
|
|
8641
8637
|
getRewardWithdrawnEventDecoder,
|
|
8642
8638
|
getRewardWithdrawnEventEncoder,
|
|
8639
|
+
getRewardsClaimedEventCodec,
|
|
8640
|
+
getRewardsClaimedEventDecoder,
|
|
8641
|
+
getRewardsClaimedEventEncoder,
|
|
8643
8642
|
getSetFeeClaimAuthorityDiscriminatorBytes,
|
|
8644
8643
|
getSetFeeClaimAuthorityInstruction,
|
|
8645
8644
|
getSetFeeClaimAuthorityInstructionDataCodec,
|
|
@@ -8695,12 +8694,6 @@ export {
|
|
|
8695
8694
|
getStakedEventCodec,
|
|
8696
8695
|
getStakedEventDecoder,
|
|
8697
8696
|
getStakedEventEncoder,
|
|
8698
|
-
getStakingPausedEventCodec,
|
|
8699
|
-
getStakingPausedEventDecoder,
|
|
8700
|
-
getStakingPausedEventEncoder,
|
|
8701
|
-
getStakingResumedEventCodec,
|
|
8702
|
-
getStakingResumedEventDecoder,
|
|
8703
|
-
getStakingResumedEventEncoder,
|
|
8704
8697
|
getStuckStakeClosedEventCodec,
|
|
8705
8698
|
getStuckStakeClosedEventDecoder,
|
|
8706
8699
|
getStuckStakeClosedEventEncoder,
|
|
@@ -8748,9 +8741,11 @@ export {
|
|
|
8748
8741
|
parseAddRewardInstruction,
|
|
8749
8742
|
parseClaimCreatorFeesInstruction,
|
|
8750
8743
|
parseClaimFeesInstruction,
|
|
8744
|
+
parseClaimRewardsInstruction,
|
|
8751
8745
|
parseCloseOptionAccountInstruction,
|
|
8752
8746
|
parseCloseStakeAccountInstruction,
|
|
8753
8747
|
parseCloseStuckStakeAccountInstruction,
|
|
8748
|
+
parseCloseUnrevealedStakeAccountInstruction,
|
|
8754
8749
|
parseCreateMarketInstruction,
|
|
8755
8750
|
parseEndRevealPeriodInstruction,
|
|
8756
8751
|
parseFinalizeRevealStakeInstruction,
|
|
@@ -8758,9 +8753,7 @@ export {
|
|
|
8758
8753
|
parseInitPlatformConfigInstruction,
|
|
8759
8754
|
parseInitStakeAccountInstruction,
|
|
8760
8755
|
parseOpenMarketInstruction,
|
|
8761
|
-
parsePauseStakingInstruction,
|
|
8762
8756
|
parseResolveMarketInstruction,
|
|
8763
|
-
parseResumeStakingInstruction,
|
|
8764
8757
|
parseRevealStakeCallbackInstruction,
|
|
8765
8758
|
parseRevealStakeCompDefInstruction,
|
|
8766
8759
|
parseRevealStakeInstruction,
|
|
@@ -8773,11 +8766,9 @@ export {
|
|
|
8773
8766
|
parseUnstakeInstruction,
|
|
8774
8767
|
parseUpdatePlatformConfigInstruction,
|
|
8775
8768
|
parseWithdrawRewardInstruction,
|
|
8776
|
-
pauseStaking,
|
|
8777
8769
|
randomComputationOffset,
|
|
8778
8770
|
randomStateNonce,
|
|
8779
8771
|
resolveMarket,
|
|
8780
|
-
resumeStaking,
|
|
8781
8772
|
revealStake,
|
|
8782
8773
|
setFeeClaimAuthority,
|
|
8783
8774
|
setUpdateAuthority,
|