@satrush/client 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +275 -51
- package/dist/index.d.ts +275 -51
- package/dist/index.js +647 -467
- package/dist/index.mjs +484 -300
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -85,8 +85,10 @@ __export(index_exports, {
|
|
|
85
85
|
SATRUSH_ERROR__INVALID_AUTOMATION_STRATEGY_MASK: () => SATRUSH_ERROR__INVALID_AUTOMATION_STRATEGY_MASK,
|
|
86
86
|
SATRUSH_ERROR__INVALID_CLAIM_AMOUNT: () => SATRUSH_ERROR__INVALID_CLAIM_AMOUNT,
|
|
87
87
|
SATRUSH_ERROR__INVALID_DEPLOYMENT_AMOUNT: () => SATRUSH_ERROR__INVALID_DEPLOYMENT_AMOUNT,
|
|
88
|
+
SATRUSH_ERROR__INVALID_DEPLOY_FEES: () => SATRUSH_ERROR__INVALID_DEPLOY_FEES,
|
|
88
89
|
SATRUSH_ERROR__INVALID_ENTROPY: () => SATRUSH_ERROR__INVALID_ENTROPY,
|
|
89
90
|
SATRUSH_ERROR__INVALID_EPOCH_ITERATION_DURATION: () => SATRUSH_ERROR__INVALID_EPOCH_ITERATION_DURATION,
|
|
91
|
+
SATRUSH_ERROR__INVALID_MINT_DATA: () => SATRUSH_ERROR__INVALID_MINT_DATA,
|
|
90
92
|
SATRUSH_ERROR__INVALID_ROUND_DURATION: () => SATRUSH_ERROR__INVALID_ROUND_DURATION,
|
|
91
93
|
SATRUSH_ERROR__INVALID_ROUND_ID: () => SATRUSH_ERROR__INVALID_ROUND_ID,
|
|
92
94
|
SATRUSH_ERROR__INVALID_SELECTION_MASK: () => SATRUSH_ERROR__INVALID_SELECTION_MASK,
|
|
@@ -122,6 +124,8 @@ __export(index_exports, {
|
|
|
122
124
|
SETTLE_DEPLOY_PUBLIC_DISCRIMINATOR: () => SETTLE_DEPLOY_PUBLIC_DISCRIMINATOR,
|
|
123
125
|
SHARE_OFFSET: () => SHARE_OFFSET,
|
|
124
126
|
SKILL_WEIGHT: () => SKILL_WEIGHT,
|
|
127
|
+
STRIKE_BOOST_HASHRATE_MULTIPLIER: () => STRIKE_BOOST_HASHRATE_MULTIPLIER,
|
|
128
|
+
STRIKE_BOOST_ROUNDS: () => STRIKE_BOOST_ROUNDS,
|
|
125
129
|
SWAP_EPOCH_STAKE_DISCRIMINATOR: () => SWAP_EPOCH_STAKE_DISCRIMINATOR,
|
|
126
130
|
SWAP_ONE_BTC_STAKE_DISCRIMINATOR: () => SWAP_ONE_BTC_STAKE_DISCRIMINATOR,
|
|
127
131
|
SWAP_ROUND_STAKE_DISCRIMINATOR: () => SWAP_ROUND_STAKE_DISCRIMINATOR,
|
|
@@ -135,6 +139,7 @@ __export(index_exports, {
|
|
|
135
139
|
TRIGGER_ONE_BTC_DRAW_DISCRIMINATOR: () => TRIGGER_ONE_BTC_DRAW_DISCRIMINATOR,
|
|
136
140
|
UPDATE_BOARD_ROUND_DURATION_DISCRIMINATOR: () => UPDATE_BOARD_ROUND_DURATION_DISCRIMINATOR,
|
|
137
141
|
UPDATE_DEPLOYMENT_SETTLE_GRACE_DURATION_DISCRIMINATOR: () => UPDATE_DEPLOYMENT_SETTLE_GRACE_DURATION_DISCRIMINATOR,
|
|
142
|
+
UPDATE_DEPLOY_FEES_DISCRIMINATOR: () => UPDATE_DEPLOY_FEES_DISCRIMINATOR,
|
|
138
143
|
UPDATE_EPOCH_VAULT_ITERATION_DURATION_DISCRIMINATOR: () => UPDATE_EPOCH_VAULT_ITERATION_DURATION_DISCRIMINATOR,
|
|
139
144
|
UPDATE_MIN_DEPLOY_USD_AMOUNT_DISCRIMINATOR: () => UPDATE_MIN_DEPLOY_USD_AMOUNT_DISCRIMINATOR,
|
|
140
145
|
UPDATE_STRIKE_TRIGGER_MODULUS_DISCRIMINATOR: () => UPDATE_STRIKE_TRIGGER_MODULUS_DISCRIMINATOR,
|
|
@@ -313,6 +318,7 @@ __export(index_exports, {
|
|
|
313
318
|
getCloseOneBtcIterationInstructionDataEncoder: () => getCloseOneBtcIterationInstructionDataEncoder,
|
|
314
319
|
getCloseOneBtcTicketDiscriminatorBytes: () => getCloseOneBtcTicketDiscriminatorBytes,
|
|
315
320
|
getCloseOneBtcTicketInstruction: () => getCloseOneBtcTicketInstruction,
|
|
321
|
+
getCloseOneBtcTicketInstructionAsync: () => getCloseOneBtcTicketInstructionAsync,
|
|
316
322
|
getCloseOneBtcTicketInstructionDataCodec: () => getCloseOneBtcTicketInstructionDataCodec,
|
|
317
323
|
getCloseOneBtcTicketInstructionDataDecoder: () => getCloseOneBtcTicketInstructionDataDecoder,
|
|
318
324
|
getCloseOneBtcTicketInstructionDataEncoder: () => getCloseOneBtcTicketInstructionDataEncoder,
|
|
@@ -578,6 +584,12 @@ __export(index_exports, {
|
|
|
578
584
|
getUpdateBoardRoundDurationInstructionDataCodec: () => getUpdateBoardRoundDurationInstructionDataCodec,
|
|
579
585
|
getUpdateBoardRoundDurationInstructionDataDecoder: () => getUpdateBoardRoundDurationInstructionDataDecoder,
|
|
580
586
|
getUpdateBoardRoundDurationInstructionDataEncoder: () => getUpdateBoardRoundDurationInstructionDataEncoder,
|
|
587
|
+
getUpdateDeployFeesDiscriminatorBytes: () => getUpdateDeployFeesDiscriminatorBytes,
|
|
588
|
+
getUpdateDeployFeesInstruction: () => getUpdateDeployFeesInstruction,
|
|
589
|
+
getUpdateDeployFeesInstructionAsync: () => getUpdateDeployFeesInstructionAsync,
|
|
590
|
+
getUpdateDeployFeesInstructionDataCodec: () => getUpdateDeployFeesInstructionDataCodec,
|
|
591
|
+
getUpdateDeployFeesInstructionDataDecoder: () => getUpdateDeployFeesInstructionDataDecoder,
|
|
592
|
+
getUpdateDeployFeesInstructionDataEncoder: () => getUpdateDeployFeesInstructionDataEncoder,
|
|
581
593
|
getUpdateDeploymentSettleGraceDurationDiscriminatorBytes: () => getUpdateDeploymentSettleGraceDurationDiscriminatorBytes,
|
|
582
594
|
getUpdateDeploymentSettleGraceDurationInstruction: () => getUpdateDeploymentSettleGraceDurationInstruction,
|
|
583
595
|
getUpdateDeploymentSettleGraceDurationInstructionAsync: () => getUpdateDeploymentSettleGraceDurationInstructionAsync,
|
|
@@ -657,6 +669,7 @@ __export(index_exports, {
|
|
|
657
669
|
parseTriggerEpochDrawInstruction: () => parseTriggerEpochDrawInstruction,
|
|
658
670
|
parseTriggerOneBtcDrawInstruction: () => parseTriggerOneBtcDrawInstruction,
|
|
659
671
|
parseUpdateBoardRoundDurationInstruction: () => parseUpdateBoardRoundDurationInstruction,
|
|
672
|
+
parseUpdateDeployFeesInstruction: () => parseUpdateDeployFeesInstruction,
|
|
660
673
|
parseUpdateDeploymentSettleGraceDurationInstruction: () => parseUpdateDeploymentSettleGraceDurationInstruction,
|
|
661
674
|
parseUpdateEpochVaultIterationDurationInstruction: () => parseUpdateEpochVaultIterationDurationInstruction,
|
|
662
675
|
parseUpdateMinDeployUsdAmountInstruction: () => parseUpdateMinDeployUsdAmountInstruction,
|
|
@@ -699,7 +712,9 @@ function getBoardEncoder() {
|
|
|
699
712
|
["strikeUsdAmount", (0, import_kit.getU64Encoder)()],
|
|
700
713
|
["strikeBtcAmount", (0, import_kit.getU64Encoder)()],
|
|
701
714
|
["strikeLastTriggerRoundId", (0, import_kit.getU32Encoder)()],
|
|
702
|
-
["
|
|
715
|
+
["strikeReserveUsdAmount", (0, import_kit.getU64Encoder)()],
|
|
716
|
+
["strikeReserveBtcAmount", (0, import_kit.getU64Encoder)()],
|
|
717
|
+
["reserved", (0, import_kit.fixEncoderSize)((0, import_kit.getBytesEncoder)(), 14)]
|
|
703
718
|
]),
|
|
704
719
|
(value) => ({ ...value, discriminator: BOARD_DISCRIMINATOR })
|
|
705
720
|
);
|
|
@@ -717,7 +732,9 @@ function getBoardDecoder() {
|
|
|
717
732
|
["strikeUsdAmount", (0, import_kit.getU64Decoder)()],
|
|
718
733
|
["strikeBtcAmount", (0, import_kit.getU64Decoder)()],
|
|
719
734
|
["strikeLastTriggerRoundId", (0, import_kit.getU32Decoder)()],
|
|
720
|
-
["
|
|
735
|
+
["strikeReserveUsdAmount", (0, import_kit.getU64Decoder)()],
|
|
736
|
+
["strikeReserveBtcAmount", (0, import_kit.getU64Decoder)()],
|
|
737
|
+
["reserved", (0, import_kit.fixDecoderSize)((0, import_kit.getBytesDecoder)(), 14)]
|
|
721
738
|
]);
|
|
722
739
|
}
|
|
723
740
|
function getBoardCodec() {
|
|
@@ -1310,6 +1327,12 @@ function getRoundRevealedEncoder() {
|
|
|
1310
1327
|
["isStrikeTriggered", (0, import_kit15.getBooleanEncoder)()],
|
|
1311
1328
|
["strikeBonusUsd", (0, import_kit15.getU64Encoder)()],
|
|
1312
1329
|
["strikeBonusBtc", (0, import_kit15.getU64Encoder)()],
|
|
1330
|
+
["strikeEpochUsd", (0, import_kit15.getU64Encoder)()],
|
|
1331
|
+
["strikeEpochBtc", (0, import_kit15.getU64Encoder)()],
|
|
1332
|
+
["strikeReserveUsd", (0, import_kit15.getU64Encoder)()],
|
|
1333
|
+
["strikeReserveBtc", (0, import_kit15.getU64Encoder)()],
|
|
1334
|
+
["strikeSeedFromReserveUsd", (0, import_kit15.getU64Encoder)()],
|
|
1335
|
+
["strikeSeedFromReserveBtc", (0, import_kit15.getU64Encoder)()],
|
|
1313
1336
|
["epochFeeUsdAmount", (0, import_kit15.getU64Encoder)()],
|
|
1314
1337
|
["oneBtcFeeUsdAmount", (0, import_kit15.getU64Encoder)()],
|
|
1315
1338
|
["protocolFeeUsdAmount", (0, import_kit15.getU64Encoder)()]
|
|
@@ -1331,6 +1354,12 @@ function getRoundRevealedDecoder() {
|
|
|
1331
1354
|
["isStrikeTriggered", (0, import_kit15.getBooleanDecoder)()],
|
|
1332
1355
|
["strikeBonusUsd", (0, import_kit15.getU64Decoder)()],
|
|
1333
1356
|
["strikeBonusBtc", (0, import_kit15.getU64Decoder)()],
|
|
1357
|
+
["strikeEpochUsd", (0, import_kit15.getU64Decoder)()],
|
|
1358
|
+
["strikeEpochBtc", (0, import_kit15.getU64Decoder)()],
|
|
1359
|
+
["strikeReserveUsd", (0, import_kit15.getU64Decoder)()],
|
|
1360
|
+
["strikeReserveBtc", (0, import_kit15.getU64Decoder)()],
|
|
1361
|
+
["strikeSeedFromReserveUsd", (0, import_kit15.getU64Decoder)()],
|
|
1362
|
+
["strikeSeedFromReserveBtc", (0, import_kit15.getU64Decoder)()],
|
|
1334
1363
|
["epochFeeUsdAmount", (0, import_kit15.getU64Decoder)()],
|
|
1335
1364
|
["oneBtcFeeUsdAmount", (0, import_kit15.getU64Decoder)()],
|
|
1336
1365
|
["protocolFeeUsdAmount", (0, import_kit15.getU64Decoder)()]
|
|
@@ -2184,7 +2213,8 @@ function getRoundEncoder() {
|
|
|
2184
2213
|
["pendingEpochFeeUsdAmount", (0, import_kit29.getU64Encoder)()],
|
|
2185
2214
|
["pendingOneBtcFeeUsdAmount", (0, import_kit29.getU64Encoder)()],
|
|
2186
2215
|
["pendingProtocolFeeUsdAmount", (0, import_kit29.getU64Encoder)()],
|
|
2187
|
-
["
|
|
2216
|
+
["isHashrateBoosted", (0, import_kit29.getBooleanEncoder)()],
|
|
2217
|
+
["reserved", (0, import_kit29.fixEncoderSize)((0, import_kit29.getBytesEncoder)(), 39)]
|
|
2188
2218
|
]),
|
|
2189
2219
|
(value) => ({ ...value, discriminator: ROUND_DISCRIMINATOR })
|
|
2190
2220
|
);
|
|
@@ -2214,7 +2244,8 @@ function getRoundDecoder() {
|
|
|
2214
2244
|
["pendingEpochFeeUsdAmount", (0, import_kit29.getU64Decoder)()],
|
|
2215
2245
|
["pendingOneBtcFeeUsdAmount", (0, import_kit29.getU64Decoder)()],
|
|
2216
2246
|
["pendingProtocolFeeUsdAmount", (0, import_kit29.getU64Decoder)()],
|
|
2217
|
-
["
|
|
2247
|
+
["isHashrateBoosted", (0, import_kit29.getBooleanDecoder)()],
|
|
2248
|
+
["reserved", (0, import_kit29.fixDecoderSize)((0, import_kit29.getBytesDecoder)(), 39)]
|
|
2218
2249
|
]);
|
|
2219
2250
|
}
|
|
2220
2251
|
function getRoundCodec() {
|
|
@@ -2270,7 +2301,7 @@ function getSatrushConfigEncoder() {
|
|
|
2270
2301
|
["bump", (0, import_kit30.getU8Encoder)()],
|
|
2271
2302
|
["ownerAuthority", (0, import_kit30.getAddressEncoder)()],
|
|
2272
2303
|
["adminAuthority", (0, import_kit30.getAddressEncoder)()],
|
|
2273
|
-
["
|
|
2304
|
+
["gameAuthority", (0, import_kit30.getAddressEncoder)()],
|
|
2274
2305
|
["feeRecipient", (0, import_kit30.getAddressEncoder)()],
|
|
2275
2306
|
["usdMint", (0, import_kit30.getAddressEncoder)()],
|
|
2276
2307
|
["btcMint", (0, import_kit30.getAddressEncoder)()],
|
|
@@ -2297,7 +2328,7 @@ function getSatrushConfigDecoder() {
|
|
|
2297
2328
|
["bump", (0, import_kit30.getU8Decoder)()],
|
|
2298
2329
|
["ownerAuthority", (0, import_kit30.getAddressDecoder)()],
|
|
2299
2330
|
["adminAuthority", (0, import_kit30.getAddressDecoder)()],
|
|
2300
|
-
["
|
|
2331
|
+
["gameAuthority", (0, import_kit30.getAddressDecoder)()],
|
|
2301
2332
|
["feeRecipient", (0, import_kit30.getAddressDecoder)()],
|
|
2302
2333
|
["usdMint", (0, import_kit30.getAddressDecoder)()],
|
|
2303
2334
|
["btcMint", (0, import_kit30.getAddressDecoder)()],
|
|
@@ -2491,11 +2522,11 @@ function getTreasurySize() {
|
|
|
2491
2522
|
}
|
|
2492
2523
|
|
|
2493
2524
|
// src/generated/errors/satrush.ts
|
|
2494
|
-
var
|
|
2525
|
+
var import_kit87 = require("@solana/kit");
|
|
2495
2526
|
|
|
2496
2527
|
// src/generated/programs/satrush.ts
|
|
2497
|
-
var
|
|
2498
|
-
var
|
|
2528
|
+
var import_kit86 = require("@solana/kit");
|
|
2529
|
+
var import_program_client_core42 = require("@solana/program-client-core");
|
|
2499
2530
|
|
|
2500
2531
|
// src/generated/instructions/buyEpochTickets.ts
|
|
2501
2532
|
var import_kit45 = require("@solana/kit");
|
|
@@ -4679,7 +4710,8 @@ async function getCloseEpochEntryInstructionAsync(input, config) {
|
|
|
4679
4710
|
value: input.epochVaultIteration ?? null,
|
|
4680
4711
|
isWritable: false
|
|
4681
4712
|
},
|
|
4682
|
-
epochVaultEntry: { value: input.epochVaultEntry ?? null, isWritable: true }
|
|
4713
|
+
epochVaultEntry: { value: input.epochVaultEntry ?? null, isWritable: true },
|
|
4714
|
+
entryOwner: { value: input.entryOwner ?? null, isWritable: true }
|
|
4683
4715
|
};
|
|
4684
4716
|
const accounts = originalAccounts;
|
|
4685
4717
|
if (!accounts.satrushConfig.value) {
|
|
@@ -4691,7 +4723,8 @@ async function getCloseEpochEntryInstructionAsync(input, config) {
|
|
|
4691
4723
|
getAccountMeta("authority", accounts.authority),
|
|
4692
4724
|
getAccountMeta("satrushConfig", accounts.satrushConfig),
|
|
4693
4725
|
getAccountMeta("epochVaultIteration", accounts.epochVaultIteration),
|
|
4694
|
-
getAccountMeta("epochVaultEntry", accounts.epochVaultEntry)
|
|
4726
|
+
getAccountMeta("epochVaultEntry", accounts.epochVaultEntry),
|
|
4727
|
+
getAccountMeta("entryOwner", accounts.entryOwner)
|
|
4695
4728
|
],
|
|
4696
4729
|
data: getCloseEpochEntryInstructionDataEncoder().encode({}),
|
|
4697
4730
|
programAddress
|
|
@@ -4706,7 +4739,8 @@ function getCloseEpochEntryInstruction(input, config) {
|
|
|
4706
4739
|
value: input.epochVaultIteration ?? null,
|
|
4707
4740
|
isWritable: false
|
|
4708
4741
|
},
|
|
4709
|
-
epochVaultEntry: { value: input.epochVaultEntry ?? null, isWritable: true }
|
|
4742
|
+
epochVaultEntry: { value: input.epochVaultEntry ?? null, isWritable: true },
|
|
4743
|
+
entryOwner: { value: input.entryOwner ?? null, isWritable: true }
|
|
4710
4744
|
};
|
|
4711
4745
|
const accounts = originalAccounts;
|
|
4712
4746
|
const getAccountMeta = (0, import_program_client_core8.getAccountMetaFactory)(programAddress, "programId");
|
|
@@ -4715,19 +4749,20 @@ function getCloseEpochEntryInstruction(input, config) {
|
|
|
4715
4749
|
getAccountMeta("authority", accounts.authority),
|
|
4716
4750
|
getAccountMeta("satrushConfig", accounts.satrushConfig),
|
|
4717
4751
|
getAccountMeta("epochVaultIteration", accounts.epochVaultIteration),
|
|
4718
|
-
getAccountMeta("epochVaultEntry", accounts.epochVaultEntry)
|
|
4752
|
+
getAccountMeta("epochVaultEntry", accounts.epochVaultEntry),
|
|
4753
|
+
getAccountMeta("entryOwner", accounts.entryOwner)
|
|
4719
4754
|
],
|
|
4720
4755
|
data: getCloseEpochEntryInstructionDataEncoder().encode({}),
|
|
4721
4756
|
programAddress
|
|
4722
4757
|
});
|
|
4723
4758
|
}
|
|
4724
4759
|
function parseCloseEpochEntryInstruction(instruction) {
|
|
4725
|
-
if (instruction.accounts.length <
|
|
4760
|
+
if (instruction.accounts.length < 5) {
|
|
4726
4761
|
throw new import_kit52.SolanaError(
|
|
4727
4762
|
import_kit52.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
|
|
4728
4763
|
{
|
|
4729
4764
|
actualAccountMetas: instruction.accounts.length,
|
|
4730
|
-
expectedAccountMetas:
|
|
4765
|
+
expectedAccountMetas: 5
|
|
4731
4766
|
}
|
|
4732
4767
|
);
|
|
4733
4768
|
}
|
|
@@ -4743,7 +4778,8 @@ function parseCloseEpochEntryInstruction(instruction) {
|
|
|
4743
4778
|
authority: getNextAccount(),
|
|
4744
4779
|
satrushConfig: getNextAccount(),
|
|
4745
4780
|
epochVaultIteration: getNextAccount(),
|
|
4746
|
-
epochVaultEntry: getNextAccount()
|
|
4781
|
+
epochVaultEntry: getNextAccount(),
|
|
4782
|
+
entryOwner: getNextAccount()
|
|
4747
4783
|
},
|
|
4748
4784
|
data: getCloseEpochEntryInstructionDataDecoder().decode(instruction.data)
|
|
4749
4785
|
};
|
|
@@ -5087,35 +5123,68 @@ function getCloseOneBtcTicketInstructionDataCodec() {
|
|
|
5087
5123
|
getCloseOneBtcTicketInstructionDataDecoder()
|
|
5088
5124
|
);
|
|
5089
5125
|
}
|
|
5126
|
+
async function getCloseOneBtcTicketInstructionAsync(input, config) {
|
|
5127
|
+
const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
|
|
5128
|
+
const originalAccounts = {
|
|
5129
|
+
authority: { value: input.authority ?? null, isWritable: true },
|
|
5130
|
+
satrushConfig: { value: input.satrushConfig ?? null, isWritable: false },
|
|
5131
|
+
oneBtcVaultIteration: {
|
|
5132
|
+
value: input.oneBtcVaultIteration ?? null,
|
|
5133
|
+
isWritable: false
|
|
5134
|
+
},
|
|
5135
|
+
ticket: { value: input.ticket ?? null, isWritable: true },
|
|
5136
|
+
ticketOwner: { value: input.ticketOwner ?? null, isWritable: true }
|
|
5137
|
+
};
|
|
5138
|
+
const accounts = originalAccounts;
|
|
5139
|
+
if (!accounts.satrushConfig.value) {
|
|
5140
|
+
accounts.satrushConfig.value = await findSatrushConfigPda();
|
|
5141
|
+
}
|
|
5142
|
+
const getAccountMeta = (0, import_program_client_core12.getAccountMetaFactory)(programAddress, "programId");
|
|
5143
|
+
return Object.freeze({
|
|
5144
|
+
accounts: [
|
|
5145
|
+
getAccountMeta("authority", accounts.authority),
|
|
5146
|
+
getAccountMeta("satrushConfig", accounts.satrushConfig),
|
|
5147
|
+
getAccountMeta("oneBtcVaultIteration", accounts.oneBtcVaultIteration),
|
|
5148
|
+
getAccountMeta("ticket", accounts.ticket),
|
|
5149
|
+
getAccountMeta("ticketOwner", accounts.ticketOwner)
|
|
5150
|
+
],
|
|
5151
|
+
data: getCloseOneBtcTicketInstructionDataEncoder().encode({}),
|
|
5152
|
+
programAddress
|
|
5153
|
+
});
|
|
5154
|
+
}
|
|
5090
5155
|
function getCloseOneBtcTicketInstruction(input, config) {
|
|
5091
5156
|
const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
|
|
5092
5157
|
const originalAccounts = {
|
|
5093
5158
|
authority: { value: input.authority ?? null, isWritable: true },
|
|
5159
|
+
satrushConfig: { value: input.satrushConfig ?? null, isWritable: false },
|
|
5094
5160
|
oneBtcVaultIteration: {
|
|
5095
5161
|
value: input.oneBtcVaultIteration ?? null,
|
|
5096
5162
|
isWritable: false
|
|
5097
5163
|
},
|
|
5098
|
-
ticket: { value: input.ticket ?? null, isWritable: true }
|
|
5164
|
+
ticket: { value: input.ticket ?? null, isWritable: true },
|
|
5165
|
+
ticketOwner: { value: input.ticketOwner ?? null, isWritable: true }
|
|
5099
5166
|
};
|
|
5100
5167
|
const accounts = originalAccounts;
|
|
5101
5168
|
const getAccountMeta = (0, import_program_client_core12.getAccountMetaFactory)(programAddress, "programId");
|
|
5102
5169
|
return Object.freeze({
|
|
5103
5170
|
accounts: [
|
|
5104
5171
|
getAccountMeta("authority", accounts.authority),
|
|
5172
|
+
getAccountMeta("satrushConfig", accounts.satrushConfig),
|
|
5105
5173
|
getAccountMeta("oneBtcVaultIteration", accounts.oneBtcVaultIteration),
|
|
5106
|
-
getAccountMeta("ticket", accounts.ticket)
|
|
5174
|
+
getAccountMeta("ticket", accounts.ticket),
|
|
5175
|
+
getAccountMeta("ticketOwner", accounts.ticketOwner)
|
|
5107
5176
|
],
|
|
5108
5177
|
data: getCloseOneBtcTicketInstructionDataEncoder().encode({}),
|
|
5109
5178
|
programAddress
|
|
5110
5179
|
});
|
|
5111
5180
|
}
|
|
5112
5181
|
function parseCloseOneBtcTicketInstruction(instruction) {
|
|
5113
|
-
if (instruction.accounts.length <
|
|
5182
|
+
if (instruction.accounts.length < 5) {
|
|
5114
5183
|
throw new import_kit56.SolanaError(
|
|
5115
5184
|
import_kit56.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
|
|
5116
5185
|
{
|
|
5117
5186
|
actualAccountMetas: instruction.accounts.length,
|
|
5118
|
-
expectedAccountMetas:
|
|
5187
|
+
expectedAccountMetas: 5
|
|
5119
5188
|
}
|
|
5120
5189
|
);
|
|
5121
5190
|
}
|
|
@@ -5129,8 +5198,10 @@ function parseCloseOneBtcTicketInstruction(instruction) {
|
|
|
5129
5198
|
programAddress: instruction.programAddress,
|
|
5130
5199
|
accounts: {
|
|
5131
5200
|
authority: getNextAccount(),
|
|
5201
|
+
satrushConfig: getNextAccount(),
|
|
5132
5202
|
oneBtcVaultIteration: getNextAccount(),
|
|
5133
|
-
ticket: getNextAccount()
|
|
5203
|
+
ticket: getNextAccount(),
|
|
5204
|
+
ticketOwner: getNextAccount()
|
|
5134
5205
|
},
|
|
5135
5206
|
data: getCloseOneBtcTicketInstructionDataDecoder().decode(instruction.data)
|
|
5136
5207
|
};
|
|
@@ -6693,7 +6764,7 @@ function getCreateSatrushConfigInstructionDataEncoder() {
|
|
|
6693
6764
|
["discriminator", (0, import_kit62.fixEncoderSize)((0, import_kit62.getBytesEncoder)(), 8)],
|
|
6694
6765
|
["ownerAuthority", (0, import_kit62.getAddressEncoder)()],
|
|
6695
6766
|
["adminAuthority", (0, import_kit62.getAddressEncoder)()],
|
|
6696
|
-
["
|
|
6767
|
+
["gameAuthority", (0, import_kit62.getAddressEncoder)()],
|
|
6697
6768
|
["feeRecipient", (0, import_kit62.getAddressEncoder)()],
|
|
6698
6769
|
["usdMint", (0, import_kit62.getAddressEncoder)()],
|
|
6699
6770
|
["btcMint", (0, import_kit62.getAddressEncoder)()]
|
|
@@ -6706,7 +6777,7 @@ function getCreateSatrushConfigInstructionDataDecoder() {
|
|
|
6706
6777
|
["discriminator", (0, import_kit62.fixDecoderSize)((0, import_kit62.getBytesDecoder)(), 8)],
|
|
6707
6778
|
["ownerAuthority", (0, import_kit62.getAddressDecoder)()],
|
|
6708
6779
|
["adminAuthority", (0, import_kit62.getAddressDecoder)()],
|
|
6709
|
-
["
|
|
6780
|
+
["gameAuthority", (0, import_kit62.getAddressDecoder)()],
|
|
6710
6781
|
["feeRecipient", (0, import_kit62.getAddressDecoder)()],
|
|
6711
6782
|
["usdMint", (0, import_kit62.getAddressDecoder)()],
|
|
6712
6783
|
["btcMint", (0, import_kit62.getAddressDecoder)()]
|
|
@@ -7760,12 +7831,18 @@ async function getRotateRoundInstructionAsync(input, config) {
|
|
|
7760
7831
|
currentRound: { value: input.currentRound ?? null, isWritable: true },
|
|
7761
7832
|
nextRound: { value: input.nextRound ?? null, isWritable: true },
|
|
7762
7833
|
usdMint: { value: input.usdMint ?? null, isWritable: false },
|
|
7834
|
+
btcMint: { value: input.btcMint ?? null, isWritable: false },
|
|
7763
7835
|
boardUsdAta: { value: input.boardUsdAta ?? null, isWritable: true },
|
|
7836
|
+
boardBtcAta: { value: input.boardBtcAta ?? null, isWritable: true },
|
|
7764
7837
|
epochVault: { value: input.epochVault ?? null, isWritable: true },
|
|
7765
7838
|
epochVaultUsdAta: {
|
|
7766
7839
|
value: input.epochVaultUsdAta ?? null,
|
|
7767
7840
|
isWritable: true
|
|
7768
7841
|
},
|
|
7842
|
+
epochVaultBtcAta: {
|
|
7843
|
+
value: input.epochVaultBtcAta ?? null,
|
|
7844
|
+
isWritable: true
|
|
7845
|
+
},
|
|
7769
7846
|
oneBtcVault: { value: input.oneBtcVault ?? null, isWritable: true },
|
|
7770
7847
|
oneBtcVaultUsdAta: {
|
|
7771
7848
|
value: input.oneBtcVaultUsdAta ?? null,
|
|
@@ -7910,61 +7987,6 @@ async function getRotateRoundInstructionAsync(input, config) {
|
|
|
7910
7987
|
if (!accounts.oneBtcVault.value) {
|
|
7911
7988
|
accounts.oneBtcVault.value = await findOneBtcVaultPda();
|
|
7912
7989
|
}
|
|
7913
|
-
if (!accounts.oneBtcVaultUsdAta.value) {
|
|
7914
|
-
accounts.oneBtcVaultUsdAta.value = await (0, import_kit67.getProgramDerivedAddress)({
|
|
7915
|
-
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
7916
|
-
seeds: [
|
|
7917
|
-
(0, import_kit67.getAddressEncoder)().encode(
|
|
7918
|
-
(0, import_program_client_core23.getAddressFromResolvedInstructionAccount)(
|
|
7919
|
-
"oneBtcVault",
|
|
7920
|
-
accounts.oneBtcVault.value
|
|
7921
|
-
)
|
|
7922
|
-
),
|
|
7923
|
-
(0, import_kit67.getBytesEncoder)().encode(
|
|
7924
|
-
new Uint8Array([
|
|
7925
|
-
6,
|
|
7926
|
-
221,
|
|
7927
|
-
246,
|
|
7928
|
-
225,
|
|
7929
|
-
215,
|
|
7930
|
-
101,
|
|
7931
|
-
161,
|
|
7932
|
-
147,
|
|
7933
|
-
217,
|
|
7934
|
-
203,
|
|
7935
|
-
225,
|
|
7936
|
-
70,
|
|
7937
|
-
206,
|
|
7938
|
-
235,
|
|
7939
|
-
121,
|
|
7940
|
-
172,
|
|
7941
|
-
28,
|
|
7942
|
-
180,
|
|
7943
|
-
133,
|
|
7944
|
-
237,
|
|
7945
|
-
95,
|
|
7946
|
-
91,
|
|
7947
|
-
55,
|
|
7948
|
-
145,
|
|
7949
|
-
58,
|
|
7950
|
-
140,
|
|
7951
|
-
245,
|
|
7952
|
-
133,
|
|
7953
|
-
126,
|
|
7954
|
-
255,
|
|
7955
|
-
0,
|
|
7956
|
-
169
|
|
7957
|
-
])
|
|
7958
|
-
),
|
|
7959
|
-
(0, import_kit67.getAddressEncoder)().encode(
|
|
7960
|
-
(0, import_program_client_core23.getAddressFromResolvedInstructionAccount)(
|
|
7961
|
-
"usdMint",
|
|
7962
|
-
accounts.usdMint.value
|
|
7963
|
-
)
|
|
7964
|
-
)
|
|
7965
|
-
]
|
|
7966
|
-
});
|
|
7967
|
-
}
|
|
7968
7990
|
if (!accounts.treasuryUsdAta.value) {
|
|
7969
7991
|
accounts.treasuryUsdAta.value = await (0, import_kit67.getProgramDerivedAddress)({
|
|
7970
7992
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
@@ -8038,9 +8060,12 @@ async function getRotateRoundInstructionAsync(input, config) {
|
|
|
8038
8060
|
getAccountMeta("currentRound", accounts.currentRound),
|
|
8039
8061
|
getAccountMeta("nextRound", accounts.nextRound),
|
|
8040
8062
|
getAccountMeta("usdMint", accounts.usdMint),
|
|
8063
|
+
getAccountMeta("btcMint", accounts.btcMint),
|
|
8041
8064
|
getAccountMeta("boardUsdAta", accounts.boardUsdAta),
|
|
8065
|
+
getAccountMeta("boardBtcAta", accounts.boardBtcAta),
|
|
8042
8066
|
getAccountMeta("epochVault", accounts.epochVault),
|
|
8043
8067
|
getAccountMeta("epochVaultUsdAta", accounts.epochVaultUsdAta),
|
|
8068
|
+
getAccountMeta("epochVaultBtcAta", accounts.epochVaultBtcAta),
|
|
8044
8069
|
getAccountMeta("oneBtcVault", accounts.oneBtcVault),
|
|
8045
8070
|
getAccountMeta("oneBtcVaultUsdAta", accounts.oneBtcVaultUsdAta),
|
|
8046
8071
|
getAccountMeta("treasury", accounts.treasury),
|
|
@@ -8064,12 +8089,18 @@ function getRotateRoundInstruction(input, config) {
|
|
|
8064
8089
|
currentRound: { value: input.currentRound ?? null, isWritable: true },
|
|
8065
8090
|
nextRound: { value: input.nextRound ?? null, isWritable: true },
|
|
8066
8091
|
usdMint: { value: input.usdMint ?? null, isWritable: false },
|
|
8092
|
+
btcMint: { value: input.btcMint ?? null, isWritable: false },
|
|
8067
8093
|
boardUsdAta: { value: input.boardUsdAta ?? null, isWritable: true },
|
|
8094
|
+
boardBtcAta: { value: input.boardBtcAta ?? null, isWritable: true },
|
|
8068
8095
|
epochVault: { value: input.epochVault ?? null, isWritable: true },
|
|
8069
8096
|
epochVaultUsdAta: {
|
|
8070
8097
|
value: input.epochVaultUsdAta ?? null,
|
|
8071
8098
|
isWritable: true
|
|
8072
8099
|
},
|
|
8100
|
+
epochVaultBtcAta: {
|
|
8101
|
+
value: input.epochVaultBtcAta ?? null,
|
|
8102
|
+
isWritable: true
|
|
8103
|
+
},
|
|
8073
8104
|
oneBtcVault: { value: input.oneBtcVault ?? null, isWritable: true },
|
|
8074
8105
|
oneBtcVaultUsdAta: {
|
|
8075
8106
|
value: input.oneBtcVaultUsdAta ?? null,
|
|
@@ -8102,9 +8133,12 @@ function getRotateRoundInstruction(input, config) {
|
|
|
8102
8133
|
getAccountMeta("currentRound", accounts.currentRound),
|
|
8103
8134
|
getAccountMeta("nextRound", accounts.nextRound),
|
|
8104
8135
|
getAccountMeta("usdMint", accounts.usdMint),
|
|
8136
|
+
getAccountMeta("btcMint", accounts.btcMint),
|
|
8105
8137
|
getAccountMeta("boardUsdAta", accounts.boardUsdAta),
|
|
8138
|
+
getAccountMeta("boardBtcAta", accounts.boardBtcAta),
|
|
8106
8139
|
getAccountMeta("epochVault", accounts.epochVault),
|
|
8107
8140
|
getAccountMeta("epochVaultUsdAta", accounts.epochVaultUsdAta),
|
|
8141
|
+
getAccountMeta("epochVaultBtcAta", accounts.epochVaultBtcAta),
|
|
8108
8142
|
getAccountMeta("oneBtcVault", accounts.oneBtcVault),
|
|
8109
8143
|
getAccountMeta("oneBtcVaultUsdAta", accounts.oneBtcVaultUsdAta),
|
|
8110
8144
|
getAccountMeta("treasury", accounts.treasury),
|
|
@@ -8120,12 +8154,12 @@ function getRotateRoundInstruction(input, config) {
|
|
|
8120
8154
|
});
|
|
8121
8155
|
}
|
|
8122
8156
|
function parseRotateRoundInstruction(instruction) {
|
|
8123
|
-
if (instruction.accounts.length <
|
|
8157
|
+
if (instruction.accounts.length < 21) {
|
|
8124
8158
|
throw new import_kit67.SolanaError(
|
|
8125
8159
|
import_kit67.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
|
|
8126
8160
|
{
|
|
8127
8161
|
actualAccountMetas: instruction.accounts.length,
|
|
8128
|
-
expectedAccountMetas:
|
|
8162
|
+
expectedAccountMetas: 21
|
|
8129
8163
|
}
|
|
8130
8164
|
);
|
|
8131
8165
|
}
|
|
@@ -8144,9 +8178,12 @@ function parseRotateRoundInstruction(instruction) {
|
|
|
8144
8178
|
currentRound: getNextAccount(),
|
|
8145
8179
|
nextRound: getNextAccount(),
|
|
8146
8180
|
usdMint: getNextAccount(),
|
|
8181
|
+
btcMint: getNextAccount(),
|
|
8147
8182
|
boardUsdAta: getNextAccount(),
|
|
8183
|
+
boardBtcAta: getNextAccount(),
|
|
8148
8184
|
epochVault: getNextAccount(),
|
|
8149
8185
|
epochVaultUsdAta: getNextAccount(),
|
|
8186
|
+
epochVaultBtcAta: getNextAccount(),
|
|
8150
8187
|
oneBtcVault: getNextAccount(),
|
|
8151
8188
|
oneBtcVaultUsdAta: getNextAccount(),
|
|
8152
8189
|
treasury: getNextAccount(),
|
|
@@ -10527,20 +10564,122 @@ function parseUpdateBoardRoundDurationInstruction(instruction) {
|
|
|
10527
10564
|
};
|
|
10528
10565
|
}
|
|
10529
10566
|
|
|
10530
|
-
// src/generated/instructions/
|
|
10567
|
+
// src/generated/instructions/updateDeployFees.ts
|
|
10531
10568
|
var import_kit79 = require("@solana/kit");
|
|
10532
10569
|
var import_program_client_core35 = require("@solana/program-client-core");
|
|
10533
|
-
var
|
|
10534
|
-
function
|
|
10570
|
+
var UPDATE_DEPLOY_FEES_DISCRIMINATOR = new Uint8Array([0, 170, 26, 215, 156, 171, 22, 68]);
|
|
10571
|
+
function getUpdateDeployFeesDiscriminatorBytes() {
|
|
10535
10572
|
return (0, import_kit79.fixEncoderSize)((0, import_kit79.getBytesEncoder)(), 8).encode(
|
|
10536
|
-
|
|
10573
|
+
UPDATE_DEPLOY_FEES_DISCRIMINATOR
|
|
10537
10574
|
);
|
|
10538
10575
|
}
|
|
10539
|
-
function
|
|
10576
|
+
function getUpdateDeployFeesInstructionDataEncoder() {
|
|
10540
10577
|
return (0, import_kit79.transformEncoder)(
|
|
10541
10578
|
(0, import_kit79.getStructEncoder)([
|
|
10542
10579
|
["discriminator", (0, import_kit79.fixEncoderSize)((0, import_kit79.getBytesEncoder)(), 8)],
|
|
10543
|
-
["
|
|
10580
|
+
["newStrikeFeeBps", (0, import_kit79.getU32Encoder)()],
|
|
10581
|
+
["newEpochFeeBps", (0, import_kit79.getU32Encoder)()],
|
|
10582
|
+
["newOneBtcFeeBps", (0, import_kit79.getU32Encoder)()],
|
|
10583
|
+
["newProtocolFeeBps", (0, import_kit79.getU32Encoder)()]
|
|
10584
|
+
]),
|
|
10585
|
+
(value) => ({ ...value, discriminator: UPDATE_DEPLOY_FEES_DISCRIMINATOR })
|
|
10586
|
+
);
|
|
10587
|
+
}
|
|
10588
|
+
function getUpdateDeployFeesInstructionDataDecoder() {
|
|
10589
|
+
return (0, import_kit79.getStructDecoder)([
|
|
10590
|
+
["discriminator", (0, import_kit79.fixDecoderSize)((0, import_kit79.getBytesDecoder)(), 8)],
|
|
10591
|
+
["newStrikeFeeBps", (0, import_kit79.getU32Decoder)()],
|
|
10592
|
+
["newEpochFeeBps", (0, import_kit79.getU32Decoder)()],
|
|
10593
|
+
["newOneBtcFeeBps", (0, import_kit79.getU32Decoder)()],
|
|
10594
|
+
["newProtocolFeeBps", (0, import_kit79.getU32Decoder)()]
|
|
10595
|
+
]);
|
|
10596
|
+
}
|
|
10597
|
+
function getUpdateDeployFeesInstructionDataCodec() {
|
|
10598
|
+
return (0, import_kit79.combineCodec)(
|
|
10599
|
+
getUpdateDeployFeesInstructionDataEncoder(),
|
|
10600
|
+
getUpdateDeployFeesInstructionDataDecoder()
|
|
10601
|
+
);
|
|
10602
|
+
}
|
|
10603
|
+
async function getUpdateDeployFeesInstructionAsync(input, config) {
|
|
10604
|
+
const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
|
|
10605
|
+
const originalAccounts = {
|
|
10606
|
+
authority: { value: input.authority ?? null, isWritable: false },
|
|
10607
|
+
satrushConfig: { value: input.satrushConfig ?? null, isWritable: true }
|
|
10608
|
+
};
|
|
10609
|
+
const accounts = originalAccounts;
|
|
10610
|
+
const args = { ...input };
|
|
10611
|
+
if (!accounts.satrushConfig.value) {
|
|
10612
|
+
accounts.satrushConfig.value = await findSatrushConfigPda();
|
|
10613
|
+
}
|
|
10614
|
+
const getAccountMeta = (0, import_program_client_core35.getAccountMetaFactory)(programAddress, "programId");
|
|
10615
|
+
return Object.freeze({
|
|
10616
|
+
accounts: [
|
|
10617
|
+
getAccountMeta("authority", accounts.authority),
|
|
10618
|
+
getAccountMeta("satrushConfig", accounts.satrushConfig)
|
|
10619
|
+
],
|
|
10620
|
+
data: getUpdateDeployFeesInstructionDataEncoder().encode(
|
|
10621
|
+
args
|
|
10622
|
+
),
|
|
10623
|
+
programAddress
|
|
10624
|
+
});
|
|
10625
|
+
}
|
|
10626
|
+
function getUpdateDeployFeesInstruction(input, config) {
|
|
10627
|
+
const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
|
|
10628
|
+
const originalAccounts = {
|
|
10629
|
+
authority: { value: input.authority ?? null, isWritable: false },
|
|
10630
|
+
satrushConfig: { value: input.satrushConfig ?? null, isWritable: true }
|
|
10631
|
+
};
|
|
10632
|
+
const accounts = originalAccounts;
|
|
10633
|
+
const args = { ...input };
|
|
10634
|
+
const getAccountMeta = (0, import_program_client_core35.getAccountMetaFactory)(programAddress, "programId");
|
|
10635
|
+
return Object.freeze({
|
|
10636
|
+
accounts: [
|
|
10637
|
+
getAccountMeta("authority", accounts.authority),
|
|
10638
|
+
getAccountMeta("satrushConfig", accounts.satrushConfig)
|
|
10639
|
+
],
|
|
10640
|
+
data: getUpdateDeployFeesInstructionDataEncoder().encode(
|
|
10641
|
+
args
|
|
10642
|
+
),
|
|
10643
|
+
programAddress
|
|
10644
|
+
});
|
|
10645
|
+
}
|
|
10646
|
+
function parseUpdateDeployFeesInstruction(instruction) {
|
|
10647
|
+
if (instruction.accounts.length < 2) {
|
|
10648
|
+
throw new import_kit79.SolanaError(
|
|
10649
|
+
import_kit79.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
|
|
10650
|
+
{
|
|
10651
|
+
actualAccountMetas: instruction.accounts.length,
|
|
10652
|
+
expectedAccountMetas: 2
|
|
10653
|
+
}
|
|
10654
|
+
);
|
|
10655
|
+
}
|
|
10656
|
+
let accountIndex = 0;
|
|
10657
|
+
const getNextAccount = () => {
|
|
10658
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
10659
|
+
accountIndex += 1;
|
|
10660
|
+
return accountMeta;
|
|
10661
|
+
};
|
|
10662
|
+
return {
|
|
10663
|
+
programAddress: instruction.programAddress,
|
|
10664
|
+
accounts: { authority: getNextAccount(), satrushConfig: getNextAccount() },
|
|
10665
|
+
data: getUpdateDeployFeesInstructionDataDecoder().decode(instruction.data)
|
|
10666
|
+
};
|
|
10667
|
+
}
|
|
10668
|
+
|
|
10669
|
+
// src/generated/instructions/updateDeploymentSettleGraceDuration.ts
|
|
10670
|
+
var import_kit80 = require("@solana/kit");
|
|
10671
|
+
var import_program_client_core36 = require("@solana/program-client-core");
|
|
10672
|
+
var UPDATE_DEPLOYMENT_SETTLE_GRACE_DURATION_DISCRIMINATOR = new Uint8Array([2, 212, 246, 89, 139, 64, 104, 74]);
|
|
10673
|
+
function getUpdateDeploymentSettleGraceDurationDiscriminatorBytes() {
|
|
10674
|
+
return (0, import_kit80.fixEncoderSize)((0, import_kit80.getBytesEncoder)(), 8).encode(
|
|
10675
|
+
UPDATE_DEPLOYMENT_SETTLE_GRACE_DURATION_DISCRIMINATOR
|
|
10676
|
+
);
|
|
10677
|
+
}
|
|
10678
|
+
function getUpdateDeploymentSettleGraceDurationInstructionDataEncoder() {
|
|
10679
|
+
return (0, import_kit80.transformEncoder)(
|
|
10680
|
+
(0, import_kit80.getStructEncoder)([
|
|
10681
|
+
["discriminator", (0, import_kit80.fixEncoderSize)((0, import_kit80.getBytesEncoder)(), 8)],
|
|
10682
|
+
["newGraceDuration", (0, import_kit80.getU64Encoder)()]
|
|
10544
10683
|
]),
|
|
10545
10684
|
(value) => ({
|
|
10546
10685
|
...value,
|
|
@@ -10549,13 +10688,13 @@ function getUpdateDeploymentSettleGraceDurationInstructionDataEncoder() {
|
|
|
10549
10688
|
);
|
|
10550
10689
|
}
|
|
10551
10690
|
function getUpdateDeploymentSettleGraceDurationInstructionDataDecoder() {
|
|
10552
|
-
return (0,
|
|
10553
|
-
["discriminator", (0,
|
|
10554
|
-
["newGraceDuration", (0,
|
|
10691
|
+
return (0, import_kit80.getStructDecoder)([
|
|
10692
|
+
["discriminator", (0, import_kit80.fixDecoderSize)((0, import_kit80.getBytesDecoder)(), 8)],
|
|
10693
|
+
["newGraceDuration", (0, import_kit80.getU64Decoder)()]
|
|
10555
10694
|
]);
|
|
10556
10695
|
}
|
|
10557
10696
|
function getUpdateDeploymentSettleGraceDurationInstructionDataCodec() {
|
|
10558
|
-
return (0,
|
|
10697
|
+
return (0, import_kit80.combineCodec)(
|
|
10559
10698
|
getUpdateDeploymentSettleGraceDurationInstructionDataEncoder(),
|
|
10560
10699
|
getUpdateDeploymentSettleGraceDurationInstructionDataDecoder()
|
|
10561
10700
|
);
|
|
@@ -10571,7 +10710,7 @@ async function getUpdateDeploymentSettleGraceDurationInstructionAsync(input, con
|
|
|
10571
10710
|
if (!accounts.satrushConfig.value) {
|
|
10572
10711
|
accounts.satrushConfig.value = await findSatrushConfigPda();
|
|
10573
10712
|
}
|
|
10574
|
-
const getAccountMeta = (0,
|
|
10713
|
+
const getAccountMeta = (0, import_program_client_core36.getAccountMetaFactory)(programAddress, "programId");
|
|
10575
10714
|
return Object.freeze({
|
|
10576
10715
|
accounts: [
|
|
10577
10716
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -10591,7 +10730,7 @@ function getUpdateDeploymentSettleGraceDurationInstruction(input, config) {
|
|
|
10591
10730
|
};
|
|
10592
10731
|
const accounts = originalAccounts;
|
|
10593
10732
|
const args = { ...input };
|
|
10594
|
-
const getAccountMeta = (0,
|
|
10733
|
+
const getAccountMeta = (0, import_program_client_core36.getAccountMetaFactory)(programAddress, "programId");
|
|
10595
10734
|
return Object.freeze({
|
|
10596
10735
|
accounts: [
|
|
10597
10736
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -10605,8 +10744,8 @@ function getUpdateDeploymentSettleGraceDurationInstruction(input, config) {
|
|
|
10605
10744
|
}
|
|
10606
10745
|
function parseUpdateDeploymentSettleGraceDurationInstruction(instruction) {
|
|
10607
10746
|
if (instruction.accounts.length < 2) {
|
|
10608
|
-
throw new
|
|
10609
|
-
|
|
10747
|
+
throw new import_kit80.SolanaError(
|
|
10748
|
+
import_kit80.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
|
|
10610
10749
|
{
|
|
10611
10750
|
actualAccountMetas: instruction.accounts.length,
|
|
10612
10751
|
expectedAccountMetas: 2
|
|
@@ -10629,19 +10768,19 @@ function parseUpdateDeploymentSettleGraceDurationInstruction(instruction) {
|
|
|
10629
10768
|
}
|
|
10630
10769
|
|
|
10631
10770
|
// src/generated/instructions/updateEpochVaultIterationDuration.ts
|
|
10632
|
-
var
|
|
10633
|
-
var
|
|
10771
|
+
var import_kit81 = require("@solana/kit");
|
|
10772
|
+
var import_program_client_core37 = require("@solana/program-client-core");
|
|
10634
10773
|
var UPDATE_EPOCH_VAULT_ITERATION_DURATION_DISCRIMINATOR = new Uint8Array([171, 103, 59, 229, 174, 188, 210, 121]);
|
|
10635
10774
|
function getUpdateEpochVaultIterationDurationDiscriminatorBytes() {
|
|
10636
|
-
return (0,
|
|
10775
|
+
return (0, import_kit81.fixEncoderSize)((0, import_kit81.getBytesEncoder)(), 8).encode(
|
|
10637
10776
|
UPDATE_EPOCH_VAULT_ITERATION_DURATION_DISCRIMINATOR
|
|
10638
10777
|
);
|
|
10639
10778
|
}
|
|
10640
10779
|
function getUpdateEpochVaultIterationDurationInstructionDataEncoder() {
|
|
10641
|
-
return (0,
|
|
10642
|
-
(0,
|
|
10643
|
-
["discriminator", (0,
|
|
10644
|
-
["newIterationDuration", (0,
|
|
10780
|
+
return (0, import_kit81.transformEncoder)(
|
|
10781
|
+
(0, import_kit81.getStructEncoder)([
|
|
10782
|
+
["discriminator", (0, import_kit81.fixEncoderSize)((0, import_kit81.getBytesEncoder)(), 8)],
|
|
10783
|
+
["newIterationDuration", (0, import_kit81.getU64Encoder)()]
|
|
10645
10784
|
]),
|
|
10646
10785
|
(value) => ({
|
|
10647
10786
|
...value,
|
|
@@ -10650,13 +10789,13 @@ function getUpdateEpochVaultIterationDurationInstructionDataEncoder() {
|
|
|
10650
10789
|
);
|
|
10651
10790
|
}
|
|
10652
10791
|
function getUpdateEpochVaultIterationDurationInstructionDataDecoder() {
|
|
10653
|
-
return (0,
|
|
10654
|
-
["discriminator", (0,
|
|
10655
|
-
["newIterationDuration", (0,
|
|
10792
|
+
return (0, import_kit81.getStructDecoder)([
|
|
10793
|
+
["discriminator", (0, import_kit81.fixDecoderSize)((0, import_kit81.getBytesDecoder)(), 8)],
|
|
10794
|
+
["newIterationDuration", (0, import_kit81.getU64Decoder)()]
|
|
10656
10795
|
]);
|
|
10657
10796
|
}
|
|
10658
10797
|
function getUpdateEpochVaultIterationDurationInstructionDataCodec() {
|
|
10659
|
-
return (0,
|
|
10798
|
+
return (0, import_kit81.combineCodec)(
|
|
10660
10799
|
getUpdateEpochVaultIterationDurationInstructionDataEncoder(),
|
|
10661
10800
|
getUpdateEpochVaultIterationDurationInstructionDataDecoder()
|
|
10662
10801
|
);
|
|
@@ -10672,7 +10811,7 @@ async function getUpdateEpochVaultIterationDurationInstructionAsync(input, confi
|
|
|
10672
10811
|
if (!accounts.satrushConfig.value) {
|
|
10673
10812
|
accounts.satrushConfig.value = await findSatrushConfigPda();
|
|
10674
10813
|
}
|
|
10675
|
-
const getAccountMeta = (0,
|
|
10814
|
+
const getAccountMeta = (0, import_program_client_core37.getAccountMetaFactory)(programAddress, "programId");
|
|
10676
10815
|
return Object.freeze({
|
|
10677
10816
|
accounts: [
|
|
10678
10817
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -10692,7 +10831,7 @@ function getUpdateEpochVaultIterationDurationInstruction(input, config) {
|
|
|
10692
10831
|
};
|
|
10693
10832
|
const accounts = originalAccounts;
|
|
10694
10833
|
const args = { ...input };
|
|
10695
|
-
const getAccountMeta = (0,
|
|
10834
|
+
const getAccountMeta = (0, import_program_client_core37.getAccountMetaFactory)(programAddress, "programId");
|
|
10696
10835
|
return Object.freeze({
|
|
10697
10836
|
accounts: [
|
|
10698
10837
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -10706,8 +10845,8 @@ function getUpdateEpochVaultIterationDurationInstruction(input, config) {
|
|
|
10706
10845
|
}
|
|
10707
10846
|
function parseUpdateEpochVaultIterationDurationInstruction(instruction) {
|
|
10708
10847
|
if (instruction.accounts.length < 2) {
|
|
10709
|
-
throw new
|
|
10710
|
-
|
|
10848
|
+
throw new import_kit81.SolanaError(
|
|
10849
|
+
import_kit81.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
|
|
10711
10850
|
{
|
|
10712
10851
|
actualAccountMetas: instruction.accounts.length,
|
|
10713
10852
|
expectedAccountMetas: 2
|
|
@@ -10730,19 +10869,19 @@ function parseUpdateEpochVaultIterationDurationInstruction(instruction) {
|
|
|
10730
10869
|
}
|
|
10731
10870
|
|
|
10732
10871
|
// src/generated/instructions/updateMinDeployUsdAmount.ts
|
|
10733
|
-
var
|
|
10734
|
-
var
|
|
10872
|
+
var import_kit82 = require("@solana/kit");
|
|
10873
|
+
var import_program_client_core38 = require("@solana/program-client-core");
|
|
10735
10874
|
var UPDATE_MIN_DEPLOY_USD_AMOUNT_DISCRIMINATOR = new Uint8Array([187, 108, 89, 178, 249, 101, 187, 33]);
|
|
10736
10875
|
function getUpdateMinDeployUsdAmountDiscriminatorBytes() {
|
|
10737
|
-
return (0,
|
|
10876
|
+
return (0, import_kit82.fixEncoderSize)((0, import_kit82.getBytesEncoder)(), 8).encode(
|
|
10738
10877
|
UPDATE_MIN_DEPLOY_USD_AMOUNT_DISCRIMINATOR
|
|
10739
10878
|
);
|
|
10740
10879
|
}
|
|
10741
10880
|
function getUpdateMinDeployUsdAmountInstructionDataEncoder() {
|
|
10742
|
-
return (0,
|
|
10743
|
-
(0,
|
|
10744
|
-
["discriminator", (0,
|
|
10745
|
-
["newMinDeployUsdAmount", (0,
|
|
10881
|
+
return (0, import_kit82.transformEncoder)(
|
|
10882
|
+
(0, import_kit82.getStructEncoder)([
|
|
10883
|
+
["discriminator", (0, import_kit82.fixEncoderSize)((0, import_kit82.getBytesEncoder)(), 8)],
|
|
10884
|
+
["newMinDeployUsdAmount", (0, import_kit82.getU64Encoder)()]
|
|
10746
10885
|
]),
|
|
10747
10886
|
(value) => ({
|
|
10748
10887
|
...value,
|
|
@@ -10751,13 +10890,13 @@ function getUpdateMinDeployUsdAmountInstructionDataEncoder() {
|
|
|
10751
10890
|
);
|
|
10752
10891
|
}
|
|
10753
10892
|
function getUpdateMinDeployUsdAmountInstructionDataDecoder() {
|
|
10754
|
-
return (0,
|
|
10755
|
-
["discriminator", (0,
|
|
10756
|
-
["newMinDeployUsdAmount", (0,
|
|
10893
|
+
return (0, import_kit82.getStructDecoder)([
|
|
10894
|
+
["discriminator", (0, import_kit82.fixDecoderSize)((0, import_kit82.getBytesDecoder)(), 8)],
|
|
10895
|
+
["newMinDeployUsdAmount", (0, import_kit82.getU64Decoder)()]
|
|
10757
10896
|
]);
|
|
10758
10897
|
}
|
|
10759
10898
|
function getUpdateMinDeployUsdAmountInstructionDataCodec() {
|
|
10760
|
-
return (0,
|
|
10899
|
+
return (0, import_kit82.combineCodec)(
|
|
10761
10900
|
getUpdateMinDeployUsdAmountInstructionDataEncoder(),
|
|
10762
10901
|
getUpdateMinDeployUsdAmountInstructionDataDecoder()
|
|
10763
10902
|
);
|
|
@@ -10773,7 +10912,7 @@ async function getUpdateMinDeployUsdAmountInstructionAsync(input, config) {
|
|
|
10773
10912
|
if (!accounts.satrushConfig.value) {
|
|
10774
10913
|
accounts.satrushConfig.value = await findSatrushConfigPda();
|
|
10775
10914
|
}
|
|
10776
|
-
const getAccountMeta = (0,
|
|
10915
|
+
const getAccountMeta = (0, import_program_client_core38.getAccountMetaFactory)(programAddress, "programId");
|
|
10777
10916
|
return Object.freeze({
|
|
10778
10917
|
accounts: [
|
|
10779
10918
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -10793,7 +10932,7 @@ function getUpdateMinDeployUsdAmountInstruction(input, config) {
|
|
|
10793
10932
|
};
|
|
10794
10933
|
const accounts = originalAccounts;
|
|
10795
10934
|
const args = { ...input };
|
|
10796
|
-
const getAccountMeta = (0,
|
|
10935
|
+
const getAccountMeta = (0, import_program_client_core38.getAccountMetaFactory)(programAddress, "programId");
|
|
10797
10936
|
return Object.freeze({
|
|
10798
10937
|
accounts: [
|
|
10799
10938
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -10807,8 +10946,8 @@ function getUpdateMinDeployUsdAmountInstruction(input, config) {
|
|
|
10807
10946
|
}
|
|
10808
10947
|
function parseUpdateMinDeployUsdAmountInstruction(instruction) {
|
|
10809
10948
|
if (instruction.accounts.length < 2) {
|
|
10810
|
-
throw new
|
|
10811
|
-
|
|
10949
|
+
throw new import_kit82.SolanaError(
|
|
10950
|
+
import_kit82.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
|
|
10812
10951
|
{
|
|
10813
10952
|
actualAccountMetas: instruction.accounts.length,
|
|
10814
10953
|
expectedAccountMetas: 2
|
|
@@ -10831,19 +10970,19 @@ function parseUpdateMinDeployUsdAmountInstruction(instruction) {
|
|
|
10831
10970
|
}
|
|
10832
10971
|
|
|
10833
10972
|
// src/generated/instructions/updateStrikeTriggerModulus.ts
|
|
10834
|
-
var
|
|
10835
|
-
var
|
|
10973
|
+
var import_kit83 = require("@solana/kit");
|
|
10974
|
+
var import_program_client_core39 = require("@solana/program-client-core");
|
|
10836
10975
|
var UPDATE_STRIKE_TRIGGER_MODULUS_DISCRIMINATOR = new Uint8Array([241, 172, 229, 62, 191, 163, 60, 186]);
|
|
10837
10976
|
function getUpdateStrikeTriggerModulusDiscriminatorBytes() {
|
|
10838
|
-
return (0,
|
|
10977
|
+
return (0, import_kit83.fixEncoderSize)((0, import_kit83.getBytesEncoder)(), 8).encode(
|
|
10839
10978
|
UPDATE_STRIKE_TRIGGER_MODULUS_DISCRIMINATOR
|
|
10840
10979
|
);
|
|
10841
10980
|
}
|
|
10842
10981
|
function getUpdateStrikeTriggerModulusInstructionDataEncoder() {
|
|
10843
|
-
return (0,
|
|
10844
|
-
(0,
|
|
10845
|
-
["discriminator", (0,
|
|
10846
|
-
["newModulus", (0,
|
|
10982
|
+
return (0, import_kit83.transformEncoder)(
|
|
10983
|
+
(0, import_kit83.getStructEncoder)([
|
|
10984
|
+
["discriminator", (0, import_kit83.fixEncoderSize)((0, import_kit83.getBytesEncoder)(), 8)],
|
|
10985
|
+
["newModulus", (0, import_kit83.getU16Encoder)()]
|
|
10847
10986
|
]),
|
|
10848
10987
|
(value) => ({
|
|
10849
10988
|
...value,
|
|
@@ -10852,13 +10991,13 @@ function getUpdateStrikeTriggerModulusInstructionDataEncoder() {
|
|
|
10852
10991
|
);
|
|
10853
10992
|
}
|
|
10854
10993
|
function getUpdateStrikeTriggerModulusInstructionDataDecoder() {
|
|
10855
|
-
return (0,
|
|
10856
|
-
["discriminator", (0,
|
|
10857
|
-
["newModulus", (0,
|
|
10994
|
+
return (0, import_kit83.getStructDecoder)([
|
|
10995
|
+
["discriminator", (0, import_kit83.fixDecoderSize)((0, import_kit83.getBytesDecoder)(), 8)],
|
|
10996
|
+
["newModulus", (0, import_kit83.getU16Decoder)()]
|
|
10858
10997
|
]);
|
|
10859
10998
|
}
|
|
10860
10999
|
function getUpdateStrikeTriggerModulusInstructionDataCodec() {
|
|
10861
|
-
return (0,
|
|
11000
|
+
return (0, import_kit83.combineCodec)(
|
|
10862
11001
|
getUpdateStrikeTriggerModulusInstructionDataEncoder(),
|
|
10863
11002
|
getUpdateStrikeTriggerModulusInstructionDataDecoder()
|
|
10864
11003
|
);
|
|
@@ -10874,7 +11013,7 @@ async function getUpdateStrikeTriggerModulusInstructionAsync(input, config) {
|
|
|
10874
11013
|
if (!accounts.satrushConfig.value) {
|
|
10875
11014
|
accounts.satrushConfig.value = await findSatrushConfigPda();
|
|
10876
11015
|
}
|
|
10877
|
-
const getAccountMeta = (0,
|
|
11016
|
+
const getAccountMeta = (0, import_program_client_core39.getAccountMetaFactory)(programAddress, "programId");
|
|
10878
11017
|
return Object.freeze({
|
|
10879
11018
|
accounts: [
|
|
10880
11019
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -10894,7 +11033,7 @@ function getUpdateStrikeTriggerModulusInstruction(input, config) {
|
|
|
10894
11033
|
};
|
|
10895
11034
|
const accounts = originalAccounts;
|
|
10896
11035
|
const args = { ...input };
|
|
10897
|
-
const getAccountMeta = (0,
|
|
11036
|
+
const getAccountMeta = (0, import_program_client_core39.getAccountMetaFactory)(programAddress, "programId");
|
|
10898
11037
|
return Object.freeze({
|
|
10899
11038
|
accounts: [
|
|
10900
11039
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -10908,8 +11047,8 @@ function getUpdateStrikeTriggerModulusInstruction(input, config) {
|
|
|
10908
11047
|
}
|
|
10909
11048
|
function parseUpdateStrikeTriggerModulusInstruction(instruction) {
|
|
10910
11049
|
if (instruction.accounts.length < 2) {
|
|
10911
|
-
throw new
|
|
10912
|
-
|
|
11050
|
+
throw new import_kit83.SolanaError(
|
|
11051
|
+
import_kit83.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
|
|
10913
11052
|
{
|
|
10914
11053
|
actualAccountMetas: instruction.accounts.length,
|
|
10915
11054
|
expectedAccountMetas: 2
|
|
@@ -10932,19 +11071,19 @@ function parseUpdateStrikeTriggerModulusInstruction(instruction) {
|
|
|
10932
11071
|
}
|
|
10933
11072
|
|
|
10934
11073
|
// src/generated/instructions/updateUnclaimedHashrateBps.ts
|
|
10935
|
-
var
|
|
10936
|
-
var
|
|
11074
|
+
var import_kit84 = require("@solana/kit");
|
|
11075
|
+
var import_program_client_core40 = require("@solana/program-client-core");
|
|
10937
11076
|
var UPDATE_UNCLAIMED_HASHRATE_BPS_DISCRIMINATOR = new Uint8Array([237, 38, 26, 14, 73, 161, 208, 157]);
|
|
10938
11077
|
function getUpdateUnclaimedHashrateBpsDiscriminatorBytes() {
|
|
10939
|
-
return (0,
|
|
11078
|
+
return (0, import_kit84.fixEncoderSize)((0, import_kit84.getBytesEncoder)(), 8).encode(
|
|
10940
11079
|
UPDATE_UNCLAIMED_HASHRATE_BPS_DISCRIMINATOR
|
|
10941
11080
|
);
|
|
10942
11081
|
}
|
|
10943
11082
|
function getUpdateUnclaimedHashrateBpsInstructionDataEncoder() {
|
|
10944
|
-
return (0,
|
|
10945
|
-
(0,
|
|
10946
|
-
["discriminator", (0,
|
|
10947
|
-
["newUnclaimedHashrateBps", (0,
|
|
11083
|
+
return (0, import_kit84.transformEncoder)(
|
|
11084
|
+
(0, import_kit84.getStructEncoder)([
|
|
11085
|
+
["discriminator", (0, import_kit84.fixEncoderSize)((0, import_kit84.getBytesEncoder)(), 8)],
|
|
11086
|
+
["newUnclaimedHashrateBps", (0, import_kit84.getU32Encoder)()]
|
|
10948
11087
|
]),
|
|
10949
11088
|
(value) => ({
|
|
10950
11089
|
...value,
|
|
@@ -10953,13 +11092,13 @@ function getUpdateUnclaimedHashrateBpsInstructionDataEncoder() {
|
|
|
10953
11092
|
);
|
|
10954
11093
|
}
|
|
10955
11094
|
function getUpdateUnclaimedHashrateBpsInstructionDataDecoder() {
|
|
10956
|
-
return (0,
|
|
10957
|
-
["discriminator", (0,
|
|
10958
|
-
["newUnclaimedHashrateBps", (0,
|
|
11095
|
+
return (0, import_kit84.getStructDecoder)([
|
|
11096
|
+
["discriminator", (0, import_kit84.fixDecoderSize)((0, import_kit84.getBytesDecoder)(), 8)],
|
|
11097
|
+
["newUnclaimedHashrateBps", (0, import_kit84.getU32Decoder)()]
|
|
10959
11098
|
]);
|
|
10960
11099
|
}
|
|
10961
11100
|
function getUpdateUnclaimedHashrateBpsInstructionDataCodec() {
|
|
10962
|
-
return (0,
|
|
11101
|
+
return (0, import_kit84.combineCodec)(
|
|
10963
11102
|
getUpdateUnclaimedHashrateBpsInstructionDataEncoder(),
|
|
10964
11103
|
getUpdateUnclaimedHashrateBpsInstructionDataDecoder()
|
|
10965
11104
|
);
|
|
@@ -10975,7 +11114,7 @@ async function getUpdateUnclaimedHashrateBpsInstructionAsync(input, config) {
|
|
|
10975
11114
|
if (!accounts.satrushConfig.value) {
|
|
10976
11115
|
accounts.satrushConfig.value = await findSatrushConfigPda();
|
|
10977
11116
|
}
|
|
10978
|
-
const getAccountMeta = (0,
|
|
11117
|
+
const getAccountMeta = (0, import_program_client_core40.getAccountMetaFactory)(programAddress, "programId");
|
|
10979
11118
|
return Object.freeze({
|
|
10980
11119
|
accounts: [
|
|
10981
11120
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -10995,7 +11134,7 @@ function getUpdateUnclaimedHashrateBpsInstruction(input, config) {
|
|
|
10995
11134
|
};
|
|
10996
11135
|
const accounts = originalAccounts;
|
|
10997
11136
|
const args = { ...input };
|
|
10998
|
-
const getAccountMeta = (0,
|
|
11137
|
+
const getAccountMeta = (0, import_program_client_core40.getAccountMetaFactory)(programAddress, "programId");
|
|
10999
11138
|
return Object.freeze({
|
|
11000
11139
|
accounts: [
|
|
11001
11140
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -11009,8 +11148,8 @@ function getUpdateUnclaimedHashrateBpsInstruction(input, config) {
|
|
|
11009
11148
|
}
|
|
11010
11149
|
function parseUpdateUnclaimedHashrateBpsInstruction(instruction) {
|
|
11011
11150
|
if (instruction.accounts.length < 2) {
|
|
11012
|
-
throw new
|
|
11013
|
-
|
|
11151
|
+
throw new import_kit84.SolanaError(
|
|
11152
|
+
import_kit84.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
|
|
11014
11153
|
{
|
|
11015
11154
|
actualAccountMetas: instruction.accounts.length,
|
|
11016
11155
|
expectedAccountMetas: 2
|
|
@@ -11033,27 +11172,27 @@ function parseUpdateUnclaimedHashrateBpsInstruction(instruction) {
|
|
|
11033
11172
|
}
|
|
11034
11173
|
|
|
11035
11174
|
// src/generated/instructions/withdrawProtocolFees.ts
|
|
11036
|
-
var
|
|
11037
|
-
var
|
|
11175
|
+
var import_kit85 = require("@solana/kit");
|
|
11176
|
+
var import_program_client_core41 = require("@solana/program-client-core");
|
|
11038
11177
|
var WITHDRAW_PROTOCOL_FEES_DISCRIMINATOR = new Uint8Array([11, 68, 165, 98, 18, 208, 134, 73]);
|
|
11039
11178
|
function getWithdrawProtocolFeesDiscriminatorBytes() {
|
|
11040
|
-
return (0,
|
|
11179
|
+
return (0, import_kit85.fixEncoderSize)((0, import_kit85.getBytesEncoder)(), 8).encode(
|
|
11041
11180
|
WITHDRAW_PROTOCOL_FEES_DISCRIMINATOR
|
|
11042
11181
|
);
|
|
11043
11182
|
}
|
|
11044
11183
|
function getWithdrawProtocolFeesInstructionDataEncoder() {
|
|
11045
|
-
return (0,
|
|
11046
|
-
(0,
|
|
11184
|
+
return (0, import_kit85.transformEncoder)(
|
|
11185
|
+
(0, import_kit85.getStructEncoder)([["discriminator", (0, import_kit85.fixEncoderSize)((0, import_kit85.getBytesEncoder)(), 8)]]),
|
|
11047
11186
|
(value) => ({ ...value, discriminator: WITHDRAW_PROTOCOL_FEES_DISCRIMINATOR })
|
|
11048
11187
|
);
|
|
11049
11188
|
}
|
|
11050
11189
|
function getWithdrawProtocolFeesInstructionDataDecoder() {
|
|
11051
|
-
return (0,
|
|
11052
|
-
["discriminator", (0,
|
|
11190
|
+
return (0, import_kit85.getStructDecoder)([
|
|
11191
|
+
["discriminator", (0, import_kit85.fixDecoderSize)((0, import_kit85.getBytesDecoder)(), 8)]
|
|
11053
11192
|
]);
|
|
11054
11193
|
}
|
|
11055
11194
|
function getWithdrawProtocolFeesInstructionDataCodec() {
|
|
11056
|
-
return (0,
|
|
11195
|
+
return (0, import_kit85.combineCodec)(
|
|
11057
11196
|
getWithdrawProtocolFeesInstructionDataEncoder(),
|
|
11058
11197
|
getWithdrawProtocolFeesInstructionDataDecoder()
|
|
11059
11198
|
);
|
|
@@ -11092,16 +11231,16 @@ async function getWithdrawProtocolFeesInstructionAsync(input, config) {
|
|
|
11092
11231
|
accounts.treasury.value = await findTreasuryPda();
|
|
11093
11232
|
}
|
|
11094
11233
|
if (!accounts.treasuryUsdAta.value) {
|
|
11095
|
-
accounts.treasuryUsdAta.value = await (0,
|
|
11234
|
+
accounts.treasuryUsdAta.value = await (0, import_kit85.getProgramDerivedAddress)({
|
|
11096
11235
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
11097
11236
|
seeds: [
|
|
11098
|
-
(0,
|
|
11099
|
-
(0,
|
|
11237
|
+
(0, import_kit85.getAddressEncoder)().encode(
|
|
11238
|
+
(0, import_program_client_core41.getAddressFromResolvedInstructionAccount)(
|
|
11100
11239
|
"treasury",
|
|
11101
11240
|
accounts.treasury.value
|
|
11102
11241
|
)
|
|
11103
11242
|
),
|
|
11104
|
-
(0,
|
|
11243
|
+
(0, import_kit85.getBytesEncoder)().encode(
|
|
11105
11244
|
new Uint8Array([
|
|
11106
11245
|
6,
|
|
11107
11246
|
221,
|
|
@@ -11137,8 +11276,8 @@ async function getWithdrawProtocolFeesInstructionAsync(input, config) {
|
|
|
11137
11276
|
169
|
|
11138
11277
|
])
|
|
11139
11278
|
),
|
|
11140
|
-
(0,
|
|
11141
|
-
(0,
|
|
11279
|
+
(0, import_kit85.getAddressEncoder)().encode(
|
|
11280
|
+
(0, import_program_client_core41.getAddressFromResolvedInstructionAccount)(
|
|
11142
11281
|
"usdMint",
|
|
11143
11282
|
accounts.usdMint.value
|
|
11144
11283
|
)
|
|
@@ -11147,16 +11286,16 @@ async function getWithdrawProtocolFeesInstructionAsync(input, config) {
|
|
|
11147
11286
|
});
|
|
11148
11287
|
}
|
|
11149
11288
|
if (!accounts.treasuryBtcAta.value) {
|
|
11150
|
-
accounts.treasuryBtcAta.value = await (0,
|
|
11289
|
+
accounts.treasuryBtcAta.value = await (0, import_kit85.getProgramDerivedAddress)({
|
|
11151
11290
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
11152
11291
|
seeds: [
|
|
11153
|
-
(0,
|
|
11154
|
-
(0,
|
|
11292
|
+
(0, import_kit85.getAddressEncoder)().encode(
|
|
11293
|
+
(0, import_program_client_core41.getAddressFromResolvedInstructionAccount)(
|
|
11155
11294
|
"treasury",
|
|
11156
11295
|
accounts.treasury.value
|
|
11157
11296
|
)
|
|
11158
11297
|
),
|
|
11159
|
-
(0,
|
|
11298
|
+
(0, import_kit85.getBytesEncoder)().encode(
|
|
11160
11299
|
new Uint8Array([
|
|
11161
11300
|
6,
|
|
11162
11301
|
221,
|
|
@@ -11192,8 +11331,8 @@ async function getWithdrawProtocolFeesInstructionAsync(input, config) {
|
|
|
11192
11331
|
169
|
|
11193
11332
|
])
|
|
11194
11333
|
),
|
|
11195
|
-
(0,
|
|
11196
|
-
(0,
|
|
11334
|
+
(0, import_kit85.getAddressEncoder)().encode(
|
|
11335
|
+
(0, import_program_client_core41.getAddressFromResolvedInstructionAccount)(
|
|
11197
11336
|
"btcMint",
|
|
11198
11337
|
accounts.btcMint.value
|
|
11199
11338
|
)
|
|
@@ -11202,16 +11341,16 @@ async function getWithdrawProtocolFeesInstructionAsync(input, config) {
|
|
|
11202
11341
|
});
|
|
11203
11342
|
}
|
|
11204
11343
|
if (!accounts.feeRecipientUsdAta.value) {
|
|
11205
|
-
accounts.feeRecipientUsdAta.value = await (0,
|
|
11344
|
+
accounts.feeRecipientUsdAta.value = await (0, import_kit85.getProgramDerivedAddress)({
|
|
11206
11345
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
11207
11346
|
seeds: [
|
|
11208
|
-
(0,
|
|
11209
|
-
(0,
|
|
11347
|
+
(0, import_kit85.getAddressEncoder)().encode(
|
|
11348
|
+
(0, import_program_client_core41.getAddressFromResolvedInstructionAccount)(
|
|
11210
11349
|
"feeRecipient",
|
|
11211
11350
|
accounts.feeRecipient.value
|
|
11212
11351
|
)
|
|
11213
11352
|
),
|
|
11214
|
-
(0,
|
|
11353
|
+
(0, import_kit85.getBytesEncoder)().encode(
|
|
11215
11354
|
new Uint8Array([
|
|
11216
11355
|
6,
|
|
11217
11356
|
221,
|
|
@@ -11247,8 +11386,8 @@ async function getWithdrawProtocolFeesInstructionAsync(input, config) {
|
|
|
11247
11386
|
169
|
|
11248
11387
|
])
|
|
11249
11388
|
),
|
|
11250
|
-
(0,
|
|
11251
|
-
(0,
|
|
11389
|
+
(0, import_kit85.getAddressEncoder)().encode(
|
|
11390
|
+
(0, import_program_client_core41.getAddressFromResolvedInstructionAccount)(
|
|
11252
11391
|
"usdMint",
|
|
11253
11392
|
accounts.usdMint.value
|
|
11254
11393
|
)
|
|
@@ -11257,16 +11396,16 @@ async function getWithdrawProtocolFeesInstructionAsync(input, config) {
|
|
|
11257
11396
|
});
|
|
11258
11397
|
}
|
|
11259
11398
|
if (!accounts.feeRecipientBtcAta.value) {
|
|
11260
|
-
accounts.feeRecipientBtcAta.value = await (0,
|
|
11399
|
+
accounts.feeRecipientBtcAta.value = await (0, import_kit85.getProgramDerivedAddress)({
|
|
11261
11400
|
programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
|
|
11262
11401
|
seeds: [
|
|
11263
|
-
(0,
|
|
11264
|
-
(0,
|
|
11402
|
+
(0, import_kit85.getAddressEncoder)().encode(
|
|
11403
|
+
(0, import_program_client_core41.getAddressFromResolvedInstructionAccount)(
|
|
11265
11404
|
"feeRecipient",
|
|
11266
11405
|
accounts.feeRecipient.value
|
|
11267
11406
|
)
|
|
11268
11407
|
),
|
|
11269
|
-
(0,
|
|
11408
|
+
(0, import_kit85.getBytesEncoder)().encode(
|
|
11270
11409
|
new Uint8Array([
|
|
11271
11410
|
6,
|
|
11272
11411
|
221,
|
|
@@ -11302,8 +11441,8 @@ async function getWithdrawProtocolFeesInstructionAsync(input, config) {
|
|
|
11302
11441
|
169
|
|
11303
11442
|
])
|
|
11304
11443
|
),
|
|
11305
|
-
(0,
|
|
11306
|
-
(0,
|
|
11444
|
+
(0, import_kit85.getAddressEncoder)().encode(
|
|
11445
|
+
(0, import_program_client_core41.getAddressFromResolvedInstructionAccount)(
|
|
11307
11446
|
"btcMint",
|
|
11308
11447
|
accounts.btcMint.value
|
|
11309
11448
|
)
|
|
@@ -11320,7 +11459,7 @@ async function getWithdrawProtocolFeesInstructionAsync(input, config) {
|
|
|
11320
11459
|
if (!accounts.systemProgram.value) {
|
|
11321
11460
|
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
11322
11461
|
}
|
|
11323
|
-
const getAccountMeta = (0,
|
|
11462
|
+
const getAccountMeta = (0, import_program_client_core41.getAccountMetaFactory)(programAddress, "programId");
|
|
11324
11463
|
return Object.freeze({
|
|
11325
11464
|
accounts: [
|
|
11326
11465
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -11377,7 +11516,7 @@ function getWithdrawProtocolFeesInstruction(input, config) {
|
|
|
11377
11516
|
if (!accounts.systemProgram.value) {
|
|
11378
11517
|
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
11379
11518
|
}
|
|
11380
|
-
const getAccountMeta = (0,
|
|
11519
|
+
const getAccountMeta = (0, import_program_client_core41.getAccountMetaFactory)(programAddress, "programId");
|
|
11381
11520
|
return Object.freeze({
|
|
11382
11521
|
accounts: [
|
|
11383
11522
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -11400,8 +11539,8 @@ function getWithdrawProtocolFeesInstruction(input, config) {
|
|
|
11400
11539
|
}
|
|
11401
11540
|
function parseWithdrawProtocolFeesInstruction(instruction) {
|
|
11402
11541
|
if (instruction.accounts.length < 13) {
|
|
11403
|
-
throw new
|
|
11404
|
-
|
|
11542
|
+
throw new import_kit85.SolanaError(
|
|
11543
|
+
import_kit85.SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS,
|
|
11405
11544
|
{
|
|
11406
11545
|
actualAccountMetas: instruction.accounts.length,
|
|
11407
11546
|
expectedAccountMetas: 13
|
|
@@ -11459,143 +11598,143 @@ var SatrushAccount = /* @__PURE__ */ ((SatrushAccount2) => {
|
|
|
11459
11598
|
})(SatrushAccount || {});
|
|
11460
11599
|
function identifySatrushAccount(account) {
|
|
11461
11600
|
const data = "data" in account ? account.data : account;
|
|
11462
|
-
if ((0,
|
|
11601
|
+
if ((0, import_kit86.containsBytes)(
|
|
11463
11602
|
data,
|
|
11464
|
-
(0,
|
|
11603
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11465
11604
|
new Uint8Array([79, 48, 160, 63, 153, 132, 240, 56])
|
|
11466
11605
|
),
|
|
11467
11606
|
0
|
|
11468
11607
|
)) {
|
|
11469
11608
|
return 0 /* Board */;
|
|
11470
11609
|
}
|
|
11471
|
-
if ((0,
|
|
11610
|
+
if ((0, import_kit86.containsBytes)(
|
|
11472
11611
|
data,
|
|
11473
|
-
(0,
|
|
11612
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11474
11613
|
new Uint8Array([100, 209, 6, 66, 115, 53, 132, 9])
|
|
11475
11614
|
),
|
|
11476
11615
|
0
|
|
11477
11616
|
)) {
|
|
11478
11617
|
return 1 /* EpochVault */;
|
|
11479
11618
|
}
|
|
11480
|
-
if ((0,
|
|
11619
|
+
if ((0, import_kit86.containsBytes)(
|
|
11481
11620
|
data,
|
|
11482
|
-
(0,
|
|
11621
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11483
11622
|
new Uint8Array([75, 243, 246, 41, 173, 130, 196, 91])
|
|
11484
11623
|
),
|
|
11485
11624
|
0
|
|
11486
11625
|
)) {
|
|
11487
11626
|
return 2 /* EpochVaultEntry */;
|
|
11488
11627
|
}
|
|
11489
|
-
if ((0,
|
|
11628
|
+
if ((0, import_kit86.containsBytes)(
|
|
11490
11629
|
data,
|
|
11491
|
-
(0,
|
|
11630
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11492
11631
|
new Uint8Array([116, 108, 198, 176, 193, 190, 91, 125])
|
|
11493
11632
|
),
|
|
11494
11633
|
0
|
|
11495
11634
|
)) {
|
|
11496
11635
|
return 3 /* EpochVaultIteration */;
|
|
11497
11636
|
}
|
|
11498
|
-
if ((0,
|
|
11637
|
+
if ((0, import_kit86.containsBytes)(
|
|
11499
11638
|
data,
|
|
11500
|
-
(0,
|
|
11639
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11501
11640
|
new Uint8Array([121, 238, 146, 107, 234, 24, 227, 31])
|
|
11502
11641
|
),
|
|
11503
11642
|
0
|
|
11504
11643
|
)) {
|
|
11505
11644
|
return 4 /* EpochVaultPage */;
|
|
11506
11645
|
}
|
|
11507
|
-
if ((0,
|
|
11646
|
+
if ((0, import_kit86.containsBytes)(
|
|
11508
11647
|
data,
|
|
11509
|
-
(0,
|
|
11648
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11510
11649
|
new Uint8Array([223, 113, 15, 54, 123, 122, 140, 100])
|
|
11511
11650
|
),
|
|
11512
11651
|
0
|
|
11513
11652
|
)) {
|
|
11514
11653
|
return 5 /* Miner */;
|
|
11515
11654
|
}
|
|
11516
|
-
if ((0,
|
|
11655
|
+
if ((0, import_kit86.containsBytes)(
|
|
11517
11656
|
data,
|
|
11518
|
-
(0,
|
|
11657
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11519
11658
|
new Uint8Array([134, 90, 53, 34, 240, 221, 175, 212])
|
|
11520
11659
|
),
|
|
11521
11660
|
0
|
|
11522
11661
|
)) {
|
|
11523
11662
|
return 6 /* OneBtcVault */;
|
|
11524
11663
|
}
|
|
11525
|
-
if ((0,
|
|
11664
|
+
if ((0, import_kit86.containsBytes)(
|
|
11526
11665
|
data,
|
|
11527
|
-
(0,
|
|
11666
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11528
11667
|
new Uint8Array([255, 64, 185, 130, 97, 37, 230, 219])
|
|
11529
11668
|
),
|
|
11530
11669
|
0
|
|
11531
11670
|
)) {
|
|
11532
11671
|
return 7 /* OneBtcVaultEntry */;
|
|
11533
11672
|
}
|
|
11534
|
-
if ((0,
|
|
11673
|
+
if ((0, import_kit86.containsBytes)(
|
|
11535
11674
|
data,
|
|
11536
|
-
(0,
|
|
11675
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11537
11676
|
new Uint8Array([190, 205, 75, 222, 220, 249, 43, 126])
|
|
11538
11677
|
),
|
|
11539
11678
|
0
|
|
11540
11679
|
)) {
|
|
11541
11680
|
return 8 /* OneBtcVaultIteration */;
|
|
11542
11681
|
}
|
|
11543
|
-
if ((0,
|
|
11682
|
+
if ((0, import_kit86.containsBytes)(
|
|
11544
11683
|
data,
|
|
11545
|
-
(0,
|
|
11684
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11546
11685
|
new Uint8Array([16, 128, 211, 70, 213, 109, 108, 216])
|
|
11547
11686
|
),
|
|
11548
11687
|
0
|
|
11549
11688
|
)) {
|
|
11550
11689
|
return 9 /* PublicAutomation */;
|
|
11551
11690
|
}
|
|
11552
|
-
if ((0,
|
|
11691
|
+
if ((0, import_kit86.containsBytes)(
|
|
11553
11692
|
data,
|
|
11554
|
-
(0,
|
|
11693
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11555
11694
|
new Uint8Array([209, 64, 180, 169, 40, 181, 110, 236])
|
|
11556
11695
|
),
|
|
11557
11696
|
0
|
|
11558
11697
|
)) {
|
|
11559
11698
|
return 10 /* PublicDeployment */;
|
|
11560
11699
|
}
|
|
11561
|
-
if ((0,
|
|
11700
|
+
if ((0, import_kit86.containsBytes)(
|
|
11562
11701
|
data,
|
|
11563
|
-
(0,
|
|
11702
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11564
11703
|
new Uint8Array([87, 127, 165, 51, 73, 78, 116, 174])
|
|
11565
11704
|
),
|
|
11566
11705
|
0
|
|
11567
11706
|
)) {
|
|
11568
11707
|
return 11 /* Round */;
|
|
11569
11708
|
}
|
|
11570
|
-
if ((0,
|
|
11709
|
+
if ((0, import_kit86.containsBytes)(
|
|
11571
11710
|
data,
|
|
11572
|
-
(0,
|
|
11711
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11573
11712
|
new Uint8Array([113, 169, 164, 118, 148, 217, 160, 200])
|
|
11574
11713
|
),
|
|
11575
11714
|
0
|
|
11576
11715
|
)) {
|
|
11577
11716
|
return 12 /* SatrushConfig */;
|
|
11578
11717
|
}
|
|
11579
|
-
if ((0,
|
|
11718
|
+
if ((0, import_kit86.containsBytes)(
|
|
11580
11719
|
data,
|
|
11581
|
-
(0,
|
|
11720
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11582
11721
|
new Uint8Array([97, 10, 251, 68, 215, 103, 124, 183])
|
|
11583
11722
|
),
|
|
11584
11723
|
0
|
|
11585
11724
|
)) {
|
|
11586
11725
|
return 13 /* SatsVault */;
|
|
11587
11726
|
}
|
|
11588
|
-
if ((0,
|
|
11727
|
+
if ((0, import_kit86.containsBytes)(
|
|
11589
11728
|
data,
|
|
11590
|
-
(0,
|
|
11729
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11591
11730
|
new Uint8Array([238, 239, 123, 238, 89, 1, 168, 253])
|
|
11592
11731
|
),
|
|
11593
11732
|
0
|
|
11594
11733
|
)) {
|
|
11595
11734
|
return 14 /* Treasury */;
|
|
11596
11735
|
}
|
|
11597
|
-
throw new
|
|
11598
|
-
|
|
11736
|
+
throw new import_kit86.SolanaError(
|
|
11737
|
+
import_kit86.SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT,
|
|
11599
11738
|
{ accountData: data, programName: "satrush" }
|
|
11600
11739
|
);
|
|
11601
11740
|
}
|
|
@@ -11634,378 +11773,388 @@ var SatrushInstruction = /* @__PURE__ */ ((SatrushInstruction2) => {
|
|
|
11634
11773
|
SatrushInstruction2[SatrushInstruction2["TriggerEpochDraw"] = 31] = "TriggerEpochDraw";
|
|
11635
11774
|
SatrushInstruction2[SatrushInstruction2["TriggerOneBtcDraw"] = 32] = "TriggerOneBtcDraw";
|
|
11636
11775
|
SatrushInstruction2[SatrushInstruction2["UpdateBoardRoundDuration"] = 33] = "UpdateBoardRoundDuration";
|
|
11637
|
-
SatrushInstruction2[SatrushInstruction2["
|
|
11638
|
-
SatrushInstruction2[SatrushInstruction2["
|
|
11639
|
-
SatrushInstruction2[SatrushInstruction2["
|
|
11640
|
-
SatrushInstruction2[SatrushInstruction2["
|
|
11641
|
-
SatrushInstruction2[SatrushInstruction2["
|
|
11642
|
-
SatrushInstruction2[SatrushInstruction2["
|
|
11776
|
+
SatrushInstruction2[SatrushInstruction2["UpdateDeployFees"] = 34] = "UpdateDeployFees";
|
|
11777
|
+
SatrushInstruction2[SatrushInstruction2["UpdateDeploymentSettleGraceDuration"] = 35] = "UpdateDeploymentSettleGraceDuration";
|
|
11778
|
+
SatrushInstruction2[SatrushInstruction2["UpdateEpochVaultIterationDuration"] = 36] = "UpdateEpochVaultIterationDuration";
|
|
11779
|
+
SatrushInstruction2[SatrushInstruction2["UpdateMinDeployUsdAmount"] = 37] = "UpdateMinDeployUsdAmount";
|
|
11780
|
+
SatrushInstruction2[SatrushInstruction2["UpdateStrikeTriggerModulus"] = 38] = "UpdateStrikeTriggerModulus";
|
|
11781
|
+
SatrushInstruction2[SatrushInstruction2["UpdateUnclaimedHashrateBps"] = 39] = "UpdateUnclaimedHashrateBps";
|
|
11782
|
+
SatrushInstruction2[SatrushInstruction2["WithdrawProtocolFees"] = 40] = "WithdrawProtocolFees";
|
|
11643
11783
|
return SatrushInstruction2;
|
|
11644
11784
|
})(SatrushInstruction || {});
|
|
11645
11785
|
function identifySatrushInstruction(instruction) {
|
|
11646
11786
|
const data = "data" in instruction ? instruction.data : instruction;
|
|
11647
|
-
if ((0,
|
|
11787
|
+
if ((0, import_kit86.containsBytes)(
|
|
11648
11788
|
data,
|
|
11649
|
-
(0,
|
|
11789
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11650
11790
|
new Uint8Array([90, 201, 98, 189, 106, 249, 86, 109])
|
|
11651
11791
|
),
|
|
11652
11792
|
0
|
|
11653
11793
|
)) {
|
|
11654
11794
|
return 0 /* BuyEpochTickets */;
|
|
11655
11795
|
}
|
|
11656
|
-
if ((0,
|
|
11796
|
+
if ((0, import_kit86.containsBytes)(
|
|
11657
11797
|
data,
|
|
11658
|
-
(0,
|
|
11798
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11659
11799
|
new Uint8Array([4, 48, 106, 230, 146, 124, 140, 167])
|
|
11660
11800
|
),
|
|
11661
11801
|
0
|
|
11662
11802
|
)) {
|
|
11663
11803
|
return 1 /* BuyOneBtcTickets */;
|
|
11664
11804
|
}
|
|
11665
|
-
if ((0,
|
|
11805
|
+
if ((0, import_kit86.containsBytes)(
|
|
11666
11806
|
data,
|
|
11667
|
-
(0,
|
|
11807
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11668
11808
|
new Uint8Array([87, 135, 14, 43, 190, 79, 45, 212])
|
|
11669
11809
|
),
|
|
11670
11810
|
0
|
|
11671
11811
|
)) {
|
|
11672
11812
|
return 2 /* CancelPublicAutomation */;
|
|
11673
11813
|
}
|
|
11674
|
-
if ((0,
|
|
11814
|
+
if ((0, import_kit86.containsBytes)(
|
|
11675
11815
|
data,
|
|
11676
|
-
(0,
|
|
11816
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11677
11817
|
new Uint8Array([226, 196, 170, 104, 125, 21, 190, 232])
|
|
11678
11818
|
),
|
|
11679
11819
|
0
|
|
11680
11820
|
)) {
|
|
11681
11821
|
return 3 /* ClaimEpochReward */;
|
|
11682
11822
|
}
|
|
11683
|
-
if ((0,
|
|
11823
|
+
if ((0, import_kit86.containsBytes)(
|
|
11684
11824
|
data,
|
|
11685
|
-
(0,
|
|
11825
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11686
11826
|
new Uint8Array([53, 168, 61, 211, 206, 81, 133, 175])
|
|
11687
11827
|
),
|
|
11688
11828
|
0
|
|
11689
11829
|
)) {
|
|
11690
11830
|
return 4 /* ClaimOneBtcReward */;
|
|
11691
11831
|
}
|
|
11692
|
-
if ((0,
|
|
11832
|
+
if ((0, import_kit86.containsBytes)(
|
|
11693
11833
|
data,
|
|
11694
|
-
(0,
|
|
11834
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11695
11835
|
new Uint8Array([196, 77, 168, 181, 6, 119, 249, 154])
|
|
11696
11836
|
),
|
|
11697
11837
|
0
|
|
11698
11838
|
)) {
|
|
11699
11839
|
return 5 /* ClaimSats */;
|
|
11700
11840
|
}
|
|
11701
|
-
if ((0,
|
|
11841
|
+
if ((0, import_kit86.containsBytes)(
|
|
11702
11842
|
data,
|
|
11703
|
-
(0,
|
|
11843
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11704
11844
|
new Uint8Array([241, 89, 98, 124, 223, 205, 215, 104])
|
|
11705
11845
|
),
|
|
11706
11846
|
0
|
|
11707
11847
|
)) {
|
|
11708
11848
|
return 6 /* ClaimUsd */;
|
|
11709
11849
|
}
|
|
11710
|
-
if ((0,
|
|
11850
|
+
if ((0, import_kit86.containsBytes)(
|
|
11711
11851
|
data,
|
|
11712
|
-
(0,
|
|
11852
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11713
11853
|
new Uint8Array([27, 23, 127, 47, 147, 184, 239, 190])
|
|
11714
11854
|
),
|
|
11715
11855
|
0
|
|
11716
11856
|
)) {
|
|
11717
11857
|
return 7 /* CloseEpochEntry */;
|
|
11718
11858
|
}
|
|
11719
|
-
if ((0,
|
|
11859
|
+
if ((0, import_kit86.containsBytes)(
|
|
11720
11860
|
data,
|
|
11721
|
-
(0,
|
|
11861
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11722
11862
|
new Uint8Array([80, 74, 10, 29, 63, 106, 63, 192])
|
|
11723
11863
|
),
|
|
11724
11864
|
0
|
|
11725
11865
|
)) {
|
|
11726
11866
|
return 8 /* CloseEpochIteration */;
|
|
11727
11867
|
}
|
|
11728
|
-
if ((0,
|
|
11868
|
+
if ((0, import_kit86.containsBytes)(
|
|
11729
11869
|
data,
|
|
11730
|
-
(0,
|
|
11870
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11731
11871
|
new Uint8Array([11, 123, 237, 176, 25, 240, 59, 135])
|
|
11732
11872
|
),
|
|
11733
11873
|
0
|
|
11734
11874
|
)) {
|
|
11735
11875
|
return 9 /* CloseEpochPage */;
|
|
11736
11876
|
}
|
|
11737
|
-
if ((0,
|
|
11877
|
+
if ((0, import_kit86.containsBytes)(
|
|
11738
11878
|
data,
|
|
11739
|
-
(0,
|
|
11879
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11740
11880
|
new Uint8Array([181, 42, 174, 200, 192, 21, 27, 187])
|
|
11741
11881
|
),
|
|
11742
11882
|
0
|
|
11743
11883
|
)) {
|
|
11744
11884
|
return 10 /* CloseOneBtcIteration */;
|
|
11745
11885
|
}
|
|
11746
|
-
if ((0,
|
|
11886
|
+
if ((0, import_kit86.containsBytes)(
|
|
11747
11887
|
data,
|
|
11748
|
-
(0,
|
|
11888
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11749
11889
|
new Uint8Array([251, 62, 143, 106, 218, 1, 162, 181])
|
|
11750
11890
|
),
|
|
11751
11891
|
0
|
|
11752
11892
|
)) {
|
|
11753
11893
|
return 11 /* CloseOneBtcTicket */;
|
|
11754
11894
|
}
|
|
11755
|
-
if ((0,
|
|
11895
|
+
if ((0, import_kit86.containsBytes)(
|
|
11756
11896
|
data,
|
|
11757
|
-
(0,
|
|
11897
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11758
11898
|
new Uint8Array([149, 14, 81, 88, 230, 226, 234, 37])
|
|
11759
11899
|
),
|
|
11760
11900
|
0
|
|
11761
11901
|
)) {
|
|
11762
11902
|
return 12 /* CloseRound */;
|
|
11763
11903
|
}
|
|
11764
|
-
if ((0,
|
|
11904
|
+
if ((0, import_kit86.containsBytes)(
|
|
11765
11905
|
data,
|
|
11766
|
-
(0,
|
|
11906
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11767
11907
|
new Uint8Array([81, 129, 130, 38, 99, 204, 224, 177])
|
|
11768
11908
|
),
|
|
11769
11909
|
0
|
|
11770
11910
|
)) {
|
|
11771
11911
|
return 13 /* CreateBoard */;
|
|
11772
11912
|
}
|
|
11773
|
-
if ((0,
|
|
11913
|
+
if ((0, import_kit86.containsBytes)(
|
|
11774
11914
|
data,
|
|
11775
|
-
(0,
|
|
11915
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11776
11916
|
new Uint8Array([69, 146, 29, 218, 228, 29, 229, 241])
|
|
11777
11917
|
),
|
|
11778
11918
|
0
|
|
11779
11919
|
)) {
|
|
11780
11920
|
return 14 /* CreateEpochVault */;
|
|
11781
11921
|
}
|
|
11782
|
-
if ((0,
|
|
11922
|
+
if ((0, import_kit86.containsBytes)(
|
|
11783
11923
|
data,
|
|
11784
|
-
(0,
|
|
11924
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11785
11925
|
new Uint8Array([156, 160, 69, 94, 108, 6, 145, 211])
|
|
11786
11926
|
),
|
|
11787
11927
|
0
|
|
11788
11928
|
)) {
|
|
11789
11929
|
return 15 /* CreateOneBtcVault */;
|
|
11790
11930
|
}
|
|
11791
|
-
if ((0,
|
|
11931
|
+
if ((0, import_kit86.containsBytes)(
|
|
11792
11932
|
data,
|
|
11793
|
-
(0,
|
|
11933
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11794
11934
|
new Uint8Array([195, 44, 245, 180, 58, 206, 203, 229])
|
|
11795
11935
|
),
|
|
11796
11936
|
0
|
|
11797
11937
|
)) {
|
|
11798
11938
|
return 16 /* CreatePublicAutomation */;
|
|
11799
11939
|
}
|
|
11800
|
-
if ((0,
|
|
11940
|
+
if ((0, import_kit86.containsBytes)(
|
|
11801
11941
|
data,
|
|
11802
|
-
(0,
|
|
11942
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11803
11943
|
new Uint8Array([96, 175, 39, 171, 158, 44, 117, 18])
|
|
11804
11944
|
),
|
|
11805
11945
|
0
|
|
11806
11946
|
)) {
|
|
11807
11947
|
return 17 /* CreateSatrushConfig */;
|
|
11808
11948
|
}
|
|
11809
|
-
if ((0,
|
|
11949
|
+
if ((0, import_kit86.containsBytes)(
|
|
11810
11950
|
data,
|
|
11811
|
-
(0,
|
|
11951
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11812
11952
|
new Uint8Array([159, 29, 126, 216, 29, 240, 141, 61])
|
|
11813
11953
|
),
|
|
11814
11954
|
0
|
|
11815
11955
|
)) {
|
|
11816
11956
|
return 18 /* CreateSatsVault */;
|
|
11817
11957
|
}
|
|
11818
|
-
if ((0,
|
|
11958
|
+
if ((0, import_kit86.containsBytes)(
|
|
11819
11959
|
data,
|
|
11820
|
-
(0,
|
|
11960
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11821
11961
|
new Uint8Array([254, 98, 217, 51, 25, 88, 140, 45])
|
|
11822
11962
|
),
|
|
11823
11963
|
0
|
|
11824
11964
|
)) {
|
|
11825
11965
|
return 19 /* CreateTreasury */;
|
|
11826
11966
|
}
|
|
11827
|
-
if ((0,
|
|
11967
|
+
if ((0, import_kit86.containsBytes)(
|
|
11828
11968
|
data,
|
|
11829
|
-
(0,
|
|
11969
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11830
11970
|
new Uint8Array([193, 31, 240, 159, 30, 224, 157, 85])
|
|
11831
11971
|
),
|
|
11832
11972
|
0
|
|
11833
11973
|
)) {
|
|
11834
11974
|
return 20 /* DeployPublic */;
|
|
11835
11975
|
}
|
|
11836
|
-
if ((0,
|
|
11976
|
+
if ((0, import_kit86.containsBytes)(
|
|
11837
11977
|
data,
|
|
11838
|
-
(0,
|
|
11978
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11839
11979
|
new Uint8Array([212, 191, 100, 136, 18, 213, 42, 72])
|
|
11840
11980
|
),
|
|
11841
11981
|
0
|
|
11842
11982
|
)) {
|
|
11843
11983
|
return 21 /* ExecutePublicAutomation */;
|
|
11844
11984
|
}
|
|
11845
|
-
if ((0,
|
|
11985
|
+
if ((0, import_kit86.containsBytes)(
|
|
11846
11986
|
data,
|
|
11847
|
-
(0,
|
|
11987
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11848
11988
|
new Uint8Array([3, 245, 202, 88, 161, 29, 51, 141])
|
|
11849
11989
|
),
|
|
11850
11990
|
0
|
|
11851
11991
|
)) {
|
|
11852
11992
|
return 22 /* RotateRound */;
|
|
11853
11993
|
}
|
|
11854
|
-
if ((0,
|
|
11994
|
+
if ((0, import_kit86.containsBytes)(
|
|
11855
11995
|
data,
|
|
11856
|
-
(0,
|
|
11996
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11857
11997
|
new Uint8Array([89, 228, 101, 114, 103, 98, 126, 229])
|
|
11858
11998
|
),
|
|
11859
11999
|
0
|
|
11860
12000
|
)) {
|
|
11861
12001
|
return 23 /* SealEpochPage */;
|
|
11862
12002
|
}
|
|
11863
|
-
if ((0,
|
|
12003
|
+
if ((0, import_kit86.containsBytes)(
|
|
11864
12004
|
data,
|
|
11865
|
-
(0,
|
|
12005
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11866
12006
|
new Uint8Array([222, 36, 211, 175, 4, 220, 2, 251])
|
|
11867
12007
|
),
|
|
11868
12008
|
0
|
|
11869
12009
|
)) {
|
|
11870
12010
|
return 24 /* SelectEpochWinner */;
|
|
11871
12011
|
}
|
|
11872
|
-
if ((0,
|
|
12012
|
+
if ((0, import_kit86.containsBytes)(
|
|
11873
12013
|
data,
|
|
11874
|
-
(0,
|
|
12014
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11875
12015
|
new Uint8Array([249, 111, 122, 103, 93, 86, 76, 198])
|
|
11876
12016
|
),
|
|
11877
12017
|
0
|
|
11878
12018
|
)) {
|
|
11879
12019
|
return 25 /* SettleDeployPublic */;
|
|
11880
12020
|
}
|
|
11881
|
-
if ((0,
|
|
12021
|
+
if ((0, import_kit86.containsBytes)(
|
|
11882
12022
|
data,
|
|
11883
|
-
(0,
|
|
12023
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11884
12024
|
new Uint8Array([82, 124, 95, 215, 213, 107, 134, 122])
|
|
11885
12025
|
),
|
|
11886
12026
|
0
|
|
11887
12027
|
)) {
|
|
11888
12028
|
return 26 /* SwapEpochStake */;
|
|
11889
12029
|
}
|
|
11890
|
-
if ((0,
|
|
12030
|
+
if ((0, import_kit86.containsBytes)(
|
|
11891
12031
|
data,
|
|
11892
|
-
(0,
|
|
12032
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11893
12033
|
new Uint8Array([61, 147, 13, 247, 164, 34, 14, 57])
|
|
11894
12034
|
),
|
|
11895
12035
|
0
|
|
11896
12036
|
)) {
|
|
11897
12037
|
return 27 /* SwapOneBtcStake */;
|
|
11898
12038
|
}
|
|
11899
|
-
if ((0,
|
|
12039
|
+
if ((0, import_kit86.containsBytes)(
|
|
11900
12040
|
data,
|
|
11901
|
-
(0,
|
|
12041
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11902
12042
|
new Uint8Array([86, 168, 42, 98, 2, 164, 250, 185])
|
|
11903
12043
|
),
|
|
11904
12044
|
0
|
|
11905
12045
|
)) {
|
|
11906
12046
|
return 28 /* SwapRoundStake */;
|
|
11907
12047
|
}
|
|
11908
|
-
if ((0,
|
|
12048
|
+
if ((0, import_kit86.containsBytes)(
|
|
11909
12049
|
data,
|
|
11910
|
-
(0,
|
|
12050
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11911
12051
|
new Uint8Array([129, 112, 9, 43, 91, 154, 157, 135])
|
|
11912
12052
|
),
|
|
11913
12053
|
0
|
|
11914
12054
|
)) {
|
|
11915
12055
|
return 29 /* SwapStrikeStake */;
|
|
11916
12056
|
}
|
|
11917
|
-
if ((0,
|
|
12057
|
+
if ((0, import_kit86.containsBytes)(
|
|
11918
12058
|
data,
|
|
11919
|
-
(0,
|
|
12059
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11920
12060
|
new Uint8Array([1, 96, 199, 199, 107, 118, 193, 87])
|
|
11921
12061
|
),
|
|
11922
12062
|
0
|
|
11923
12063
|
)) {
|
|
11924
12064
|
return 30 /* TopUpPublicAutomation */;
|
|
11925
12065
|
}
|
|
11926
|
-
if ((0,
|
|
12066
|
+
if ((0, import_kit86.containsBytes)(
|
|
11927
12067
|
data,
|
|
11928
|
-
(0,
|
|
12068
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11929
12069
|
new Uint8Array([93, 12, 139, 55, 235, 88, 37, 117])
|
|
11930
12070
|
),
|
|
11931
12071
|
0
|
|
11932
12072
|
)) {
|
|
11933
12073
|
return 31 /* TriggerEpochDraw */;
|
|
11934
12074
|
}
|
|
11935
|
-
if ((0,
|
|
12075
|
+
if ((0, import_kit86.containsBytes)(
|
|
11936
12076
|
data,
|
|
11937
|
-
(0,
|
|
12077
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11938
12078
|
new Uint8Array([252, 210, 238, 28, 169, 118, 28, 11])
|
|
11939
12079
|
),
|
|
11940
12080
|
0
|
|
11941
12081
|
)) {
|
|
11942
12082
|
return 32 /* TriggerOneBtcDraw */;
|
|
11943
12083
|
}
|
|
11944
|
-
if ((0,
|
|
12084
|
+
if ((0, import_kit86.containsBytes)(
|
|
11945
12085
|
data,
|
|
11946
|
-
(0,
|
|
12086
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11947
12087
|
new Uint8Array([12, 130, 188, 85, 167, 187, 204, 183])
|
|
11948
12088
|
),
|
|
11949
12089
|
0
|
|
11950
12090
|
)) {
|
|
11951
12091
|
return 33 /* UpdateBoardRoundDuration */;
|
|
11952
12092
|
}
|
|
11953
|
-
if ((0,
|
|
12093
|
+
if ((0, import_kit86.containsBytes)(
|
|
12094
|
+
data,
|
|
12095
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
12096
|
+
new Uint8Array([0, 170, 26, 215, 156, 171, 22, 68])
|
|
12097
|
+
),
|
|
12098
|
+
0
|
|
12099
|
+
)) {
|
|
12100
|
+
return 34 /* UpdateDeployFees */;
|
|
12101
|
+
}
|
|
12102
|
+
if ((0, import_kit86.containsBytes)(
|
|
11954
12103
|
data,
|
|
11955
|
-
(0,
|
|
12104
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11956
12105
|
new Uint8Array([2, 212, 246, 89, 139, 64, 104, 74])
|
|
11957
12106
|
),
|
|
11958
12107
|
0
|
|
11959
12108
|
)) {
|
|
11960
|
-
return
|
|
12109
|
+
return 35 /* UpdateDeploymentSettleGraceDuration */;
|
|
11961
12110
|
}
|
|
11962
|
-
if ((0,
|
|
12111
|
+
if ((0, import_kit86.containsBytes)(
|
|
11963
12112
|
data,
|
|
11964
|
-
(0,
|
|
12113
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11965
12114
|
new Uint8Array([171, 103, 59, 229, 174, 188, 210, 121])
|
|
11966
12115
|
),
|
|
11967
12116
|
0
|
|
11968
12117
|
)) {
|
|
11969
|
-
return
|
|
12118
|
+
return 36 /* UpdateEpochVaultIterationDuration */;
|
|
11970
12119
|
}
|
|
11971
|
-
if ((0,
|
|
12120
|
+
if ((0, import_kit86.containsBytes)(
|
|
11972
12121
|
data,
|
|
11973
|
-
(0,
|
|
12122
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11974
12123
|
new Uint8Array([187, 108, 89, 178, 249, 101, 187, 33])
|
|
11975
12124
|
),
|
|
11976
12125
|
0
|
|
11977
12126
|
)) {
|
|
11978
|
-
return
|
|
12127
|
+
return 37 /* UpdateMinDeployUsdAmount */;
|
|
11979
12128
|
}
|
|
11980
|
-
if ((0,
|
|
12129
|
+
if ((0, import_kit86.containsBytes)(
|
|
11981
12130
|
data,
|
|
11982
|
-
(0,
|
|
12131
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11983
12132
|
new Uint8Array([241, 172, 229, 62, 191, 163, 60, 186])
|
|
11984
12133
|
),
|
|
11985
12134
|
0
|
|
11986
12135
|
)) {
|
|
11987
|
-
return
|
|
12136
|
+
return 38 /* UpdateStrikeTriggerModulus */;
|
|
11988
12137
|
}
|
|
11989
|
-
if ((0,
|
|
12138
|
+
if ((0, import_kit86.containsBytes)(
|
|
11990
12139
|
data,
|
|
11991
|
-
(0,
|
|
12140
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
11992
12141
|
new Uint8Array([237, 38, 26, 14, 73, 161, 208, 157])
|
|
11993
12142
|
),
|
|
11994
12143
|
0
|
|
11995
12144
|
)) {
|
|
11996
|
-
return
|
|
12145
|
+
return 39 /* UpdateUnclaimedHashrateBps */;
|
|
11997
12146
|
}
|
|
11998
|
-
if ((0,
|
|
12147
|
+
if ((0, import_kit86.containsBytes)(
|
|
11999
12148
|
data,
|
|
12000
|
-
(0,
|
|
12149
|
+
(0, import_kit86.fixEncoderSize)((0, import_kit86.getBytesEncoder)(), 8).encode(
|
|
12001
12150
|
new Uint8Array([11, 68, 165, 98, 18, 208, 134, 73])
|
|
12002
12151
|
),
|
|
12003
12152
|
0
|
|
12004
12153
|
)) {
|
|
12005
|
-
return
|
|
12154
|
+
return 40 /* WithdrawProtocolFees */;
|
|
12006
12155
|
}
|
|
12007
|
-
throw new
|
|
12008
|
-
|
|
12156
|
+
throw new import_kit86.SolanaError(
|
|
12157
|
+
import_kit86.SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION,
|
|
12009
12158
|
{ instructionData: data, programName: "satrush" }
|
|
12010
12159
|
);
|
|
12011
12160
|
}
|
|
@@ -12013,492 +12162,503 @@ function parseSatrushInstruction(instruction) {
|
|
|
12013
12162
|
const instructionType = identifySatrushInstruction(instruction);
|
|
12014
12163
|
switch (instructionType) {
|
|
12015
12164
|
case 0 /* BuyEpochTickets */: {
|
|
12016
|
-
(0,
|
|
12165
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12017
12166
|
return {
|
|
12018
12167
|
instructionType: 0 /* BuyEpochTickets */,
|
|
12019
12168
|
...parseBuyEpochTicketsInstruction(instruction)
|
|
12020
12169
|
};
|
|
12021
12170
|
}
|
|
12022
12171
|
case 1 /* BuyOneBtcTickets */: {
|
|
12023
|
-
(0,
|
|
12172
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12024
12173
|
return {
|
|
12025
12174
|
instructionType: 1 /* BuyOneBtcTickets */,
|
|
12026
12175
|
...parseBuyOneBtcTicketsInstruction(instruction)
|
|
12027
12176
|
};
|
|
12028
12177
|
}
|
|
12029
12178
|
case 2 /* CancelPublicAutomation */: {
|
|
12030
|
-
(0,
|
|
12179
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12031
12180
|
return {
|
|
12032
12181
|
instructionType: 2 /* CancelPublicAutomation */,
|
|
12033
12182
|
...parseCancelPublicAutomationInstruction(instruction)
|
|
12034
12183
|
};
|
|
12035
12184
|
}
|
|
12036
12185
|
case 3 /* ClaimEpochReward */: {
|
|
12037
|
-
(0,
|
|
12186
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12038
12187
|
return {
|
|
12039
12188
|
instructionType: 3 /* ClaimEpochReward */,
|
|
12040
12189
|
...parseClaimEpochRewardInstruction(instruction)
|
|
12041
12190
|
};
|
|
12042
12191
|
}
|
|
12043
12192
|
case 4 /* ClaimOneBtcReward */: {
|
|
12044
|
-
(0,
|
|
12193
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12045
12194
|
return {
|
|
12046
12195
|
instructionType: 4 /* ClaimOneBtcReward */,
|
|
12047
12196
|
...parseClaimOneBtcRewardInstruction(instruction)
|
|
12048
12197
|
};
|
|
12049
12198
|
}
|
|
12050
12199
|
case 5 /* ClaimSats */: {
|
|
12051
|
-
(0,
|
|
12200
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12052
12201
|
return {
|
|
12053
12202
|
instructionType: 5 /* ClaimSats */,
|
|
12054
12203
|
...parseClaimSatsInstruction(instruction)
|
|
12055
12204
|
};
|
|
12056
12205
|
}
|
|
12057
12206
|
case 6 /* ClaimUsd */: {
|
|
12058
|
-
(0,
|
|
12207
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12059
12208
|
return {
|
|
12060
12209
|
instructionType: 6 /* ClaimUsd */,
|
|
12061
12210
|
...parseClaimUsdInstruction(instruction)
|
|
12062
12211
|
};
|
|
12063
12212
|
}
|
|
12064
12213
|
case 7 /* CloseEpochEntry */: {
|
|
12065
|
-
(0,
|
|
12214
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12066
12215
|
return {
|
|
12067
12216
|
instructionType: 7 /* CloseEpochEntry */,
|
|
12068
12217
|
...parseCloseEpochEntryInstruction(instruction)
|
|
12069
12218
|
};
|
|
12070
12219
|
}
|
|
12071
12220
|
case 8 /* CloseEpochIteration */: {
|
|
12072
|
-
(0,
|
|
12221
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12073
12222
|
return {
|
|
12074
12223
|
instructionType: 8 /* CloseEpochIteration */,
|
|
12075
12224
|
...parseCloseEpochIterationInstruction(instruction)
|
|
12076
12225
|
};
|
|
12077
12226
|
}
|
|
12078
12227
|
case 9 /* CloseEpochPage */: {
|
|
12079
|
-
(0,
|
|
12228
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12080
12229
|
return {
|
|
12081
12230
|
instructionType: 9 /* CloseEpochPage */,
|
|
12082
12231
|
...parseCloseEpochPageInstruction(instruction)
|
|
12083
12232
|
};
|
|
12084
12233
|
}
|
|
12085
12234
|
case 10 /* CloseOneBtcIteration */: {
|
|
12086
|
-
(0,
|
|
12235
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12087
12236
|
return {
|
|
12088
12237
|
instructionType: 10 /* CloseOneBtcIteration */,
|
|
12089
12238
|
...parseCloseOneBtcIterationInstruction(instruction)
|
|
12090
12239
|
};
|
|
12091
12240
|
}
|
|
12092
12241
|
case 11 /* CloseOneBtcTicket */: {
|
|
12093
|
-
(0,
|
|
12242
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12094
12243
|
return {
|
|
12095
12244
|
instructionType: 11 /* CloseOneBtcTicket */,
|
|
12096
12245
|
...parseCloseOneBtcTicketInstruction(instruction)
|
|
12097
12246
|
};
|
|
12098
12247
|
}
|
|
12099
12248
|
case 12 /* CloseRound */: {
|
|
12100
|
-
(0,
|
|
12249
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12101
12250
|
return {
|
|
12102
12251
|
instructionType: 12 /* CloseRound */,
|
|
12103
12252
|
...parseCloseRoundInstruction(instruction)
|
|
12104
12253
|
};
|
|
12105
12254
|
}
|
|
12106
12255
|
case 13 /* CreateBoard */: {
|
|
12107
|
-
(0,
|
|
12256
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12108
12257
|
return {
|
|
12109
12258
|
instructionType: 13 /* CreateBoard */,
|
|
12110
12259
|
...parseCreateBoardInstruction(instruction)
|
|
12111
12260
|
};
|
|
12112
12261
|
}
|
|
12113
12262
|
case 14 /* CreateEpochVault */: {
|
|
12114
|
-
(0,
|
|
12263
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12115
12264
|
return {
|
|
12116
12265
|
instructionType: 14 /* CreateEpochVault */,
|
|
12117
12266
|
...parseCreateEpochVaultInstruction(instruction)
|
|
12118
12267
|
};
|
|
12119
12268
|
}
|
|
12120
12269
|
case 15 /* CreateOneBtcVault */: {
|
|
12121
|
-
(0,
|
|
12270
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12122
12271
|
return {
|
|
12123
12272
|
instructionType: 15 /* CreateOneBtcVault */,
|
|
12124
12273
|
...parseCreateOneBtcVaultInstruction(instruction)
|
|
12125
12274
|
};
|
|
12126
12275
|
}
|
|
12127
12276
|
case 16 /* CreatePublicAutomation */: {
|
|
12128
|
-
(0,
|
|
12277
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12129
12278
|
return {
|
|
12130
12279
|
instructionType: 16 /* CreatePublicAutomation */,
|
|
12131
12280
|
...parseCreatePublicAutomationInstruction(instruction)
|
|
12132
12281
|
};
|
|
12133
12282
|
}
|
|
12134
12283
|
case 17 /* CreateSatrushConfig */: {
|
|
12135
|
-
(0,
|
|
12284
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12136
12285
|
return {
|
|
12137
12286
|
instructionType: 17 /* CreateSatrushConfig */,
|
|
12138
12287
|
...parseCreateSatrushConfigInstruction(instruction)
|
|
12139
12288
|
};
|
|
12140
12289
|
}
|
|
12141
12290
|
case 18 /* CreateSatsVault */: {
|
|
12142
|
-
(0,
|
|
12291
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12143
12292
|
return {
|
|
12144
12293
|
instructionType: 18 /* CreateSatsVault */,
|
|
12145
12294
|
...parseCreateSatsVaultInstruction(instruction)
|
|
12146
12295
|
};
|
|
12147
12296
|
}
|
|
12148
12297
|
case 19 /* CreateTreasury */: {
|
|
12149
|
-
(0,
|
|
12298
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12150
12299
|
return {
|
|
12151
12300
|
instructionType: 19 /* CreateTreasury */,
|
|
12152
12301
|
...parseCreateTreasuryInstruction(instruction)
|
|
12153
12302
|
};
|
|
12154
12303
|
}
|
|
12155
12304
|
case 20 /* DeployPublic */: {
|
|
12156
|
-
(0,
|
|
12305
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12157
12306
|
return {
|
|
12158
12307
|
instructionType: 20 /* DeployPublic */,
|
|
12159
12308
|
...parseDeployPublicInstruction(instruction)
|
|
12160
12309
|
};
|
|
12161
12310
|
}
|
|
12162
12311
|
case 21 /* ExecutePublicAutomation */: {
|
|
12163
|
-
(0,
|
|
12312
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12164
12313
|
return {
|
|
12165
12314
|
instructionType: 21 /* ExecutePublicAutomation */,
|
|
12166
12315
|
...parseExecutePublicAutomationInstruction(instruction)
|
|
12167
12316
|
};
|
|
12168
12317
|
}
|
|
12169
12318
|
case 22 /* RotateRound */: {
|
|
12170
|
-
(0,
|
|
12319
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12171
12320
|
return {
|
|
12172
12321
|
instructionType: 22 /* RotateRound */,
|
|
12173
12322
|
...parseRotateRoundInstruction(instruction)
|
|
12174
12323
|
};
|
|
12175
12324
|
}
|
|
12176
12325
|
case 23 /* SealEpochPage */: {
|
|
12177
|
-
(0,
|
|
12326
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12178
12327
|
return {
|
|
12179
12328
|
instructionType: 23 /* SealEpochPage */,
|
|
12180
12329
|
...parseSealEpochPageInstruction(instruction)
|
|
12181
12330
|
};
|
|
12182
12331
|
}
|
|
12183
12332
|
case 24 /* SelectEpochWinner */: {
|
|
12184
|
-
(0,
|
|
12333
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12185
12334
|
return {
|
|
12186
12335
|
instructionType: 24 /* SelectEpochWinner */,
|
|
12187
12336
|
...parseSelectEpochWinnerInstruction(instruction)
|
|
12188
12337
|
};
|
|
12189
12338
|
}
|
|
12190
12339
|
case 25 /* SettleDeployPublic */: {
|
|
12191
|
-
(0,
|
|
12340
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12192
12341
|
return {
|
|
12193
12342
|
instructionType: 25 /* SettleDeployPublic */,
|
|
12194
12343
|
...parseSettleDeployPublicInstruction(instruction)
|
|
12195
12344
|
};
|
|
12196
12345
|
}
|
|
12197
12346
|
case 26 /* SwapEpochStake */: {
|
|
12198
|
-
(0,
|
|
12347
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12199
12348
|
return {
|
|
12200
12349
|
instructionType: 26 /* SwapEpochStake */,
|
|
12201
12350
|
...parseSwapEpochStakeInstruction(instruction)
|
|
12202
12351
|
};
|
|
12203
12352
|
}
|
|
12204
12353
|
case 27 /* SwapOneBtcStake */: {
|
|
12205
|
-
(0,
|
|
12354
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12206
12355
|
return {
|
|
12207
12356
|
instructionType: 27 /* SwapOneBtcStake */,
|
|
12208
12357
|
...parseSwapOneBtcStakeInstruction(instruction)
|
|
12209
12358
|
};
|
|
12210
12359
|
}
|
|
12211
12360
|
case 28 /* SwapRoundStake */: {
|
|
12212
|
-
(0,
|
|
12361
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12213
12362
|
return {
|
|
12214
12363
|
instructionType: 28 /* SwapRoundStake */,
|
|
12215
12364
|
...parseSwapRoundStakeInstruction(instruction)
|
|
12216
12365
|
};
|
|
12217
12366
|
}
|
|
12218
12367
|
case 29 /* SwapStrikeStake */: {
|
|
12219
|
-
(0,
|
|
12368
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12220
12369
|
return {
|
|
12221
12370
|
instructionType: 29 /* SwapStrikeStake */,
|
|
12222
12371
|
...parseSwapStrikeStakeInstruction(instruction)
|
|
12223
12372
|
};
|
|
12224
12373
|
}
|
|
12225
12374
|
case 30 /* TopUpPublicAutomation */: {
|
|
12226
|
-
(0,
|
|
12375
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12227
12376
|
return {
|
|
12228
12377
|
instructionType: 30 /* TopUpPublicAutomation */,
|
|
12229
12378
|
...parseTopUpPublicAutomationInstruction(instruction)
|
|
12230
12379
|
};
|
|
12231
12380
|
}
|
|
12232
12381
|
case 31 /* TriggerEpochDraw */: {
|
|
12233
|
-
(0,
|
|
12382
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12234
12383
|
return {
|
|
12235
12384
|
instructionType: 31 /* TriggerEpochDraw */,
|
|
12236
12385
|
...parseTriggerEpochDrawInstruction(instruction)
|
|
12237
12386
|
};
|
|
12238
12387
|
}
|
|
12239
12388
|
case 32 /* TriggerOneBtcDraw */: {
|
|
12240
|
-
(0,
|
|
12389
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12241
12390
|
return {
|
|
12242
12391
|
instructionType: 32 /* TriggerOneBtcDraw */,
|
|
12243
12392
|
...parseTriggerOneBtcDrawInstruction(instruction)
|
|
12244
12393
|
};
|
|
12245
12394
|
}
|
|
12246
12395
|
case 33 /* UpdateBoardRoundDuration */: {
|
|
12247
|
-
(0,
|
|
12396
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12248
12397
|
return {
|
|
12249
12398
|
instructionType: 33 /* UpdateBoardRoundDuration */,
|
|
12250
12399
|
...parseUpdateBoardRoundDurationInstruction(instruction)
|
|
12251
12400
|
};
|
|
12252
12401
|
}
|
|
12253
|
-
case 34 /*
|
|
12254
|
-
(0,
|
|
12402
|
+
case 34 /* UpdateDeployFees */: {
|
|
12403
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12404
|
+
return {
|
|
12405
|
+
instructionType: 34 /* UpdateDeployFees */,
|
|
12406
|
+
...parseUpdateDeployFeesInstruction(instruction)
|
|
12407
|
+
};
|
|
12408
|
+
}
|
|
12409
|
+
case 35 /* UpdateDeploymentSettleGraceDuration */: {
|
|
12410
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12255
12411
|
return {
|
|
12256
|
-
instructionType:
|
|
12412
|
+
instructionType: 35 /* UpdateDeploymentSettleGraceDuration */,
|
|
12257
12413
|
...parseUpdateDeploymentSettleGraceDurationInstruction(instruction)
|
|
12258
12414
|
};
|
|
12259
12415
|
}
|
|
12260
|
-
case
|
|
12261
|
-
(0,
|
|
12416
|
+
case 36 /* UpdateEpochVaultIterationDuration */: {
|
|
12417
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12262
12418
|
return {
|
|
12263
|
-
instructionType:
|
|
12419
|
+
instructionType: 36 /* UpdateEpochVaultIterationDuration */,
|
|
12264
12420
|
...parseUpdateEpochVaultIterationDurationInstruction(instruction)
|
|
12265
12421
|
};
|
|
12266
12422
|
}
|
|
12267
|
-
case
|
|
12268
|
-
(0,
|
|
12423
|
+
case 37 /* UpdateMinDeployUsdAmount */: {
|
|
12424
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12269
12425
|
return {
|
|
12270
|
-
instructionType:
|
|
12426
|
+
instructionType: 37 /* UpdateMinDeployUsdAmount */,
|
|
12271
12427
|
...parseUpdateMinDeployUsdAmountInstruction(instruction)
|
|
12272
12428
|
};
|
|
12273
12429
|
}
|
|
12274
|
-
case
|
|
12275
|
-
(0,
|
|
12430
|
+
case 38 /* UpdateStrikeTriggerModulus */: {
|
|
12431
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12276
12432
|
return {
|
|
12277
|
-
instructionType:
|
|
12433
|
+
instructionType: 38 /* UpdateStrikeTriggerModulus */,
|
|
12278
12434
|
...parseUpdateStrikeTriggerModulusInstruction(instruction)
|
|
12279
12435
|
};
|
|
12280
12436
|
}
|
|
12281
|
-
case
|
|
12282
|
-
(0,
|
|
12437
|
+
case 39 /* UpdateUnclaimedHashrateBps */: {
|
|
12438
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12283
12439
|
return {
|
|
12284
|
-
instructionType:
|
|
12440
|
+
instructionType: 39 /* UpdateUnclaimedHashrateBps */,
|
|
12285
12441
|
...parseUpdateUnclaimedHashrateBpsInstruction(instruction)
|
|
12286
12442
|
};
|
|
12287
12443
|
}
|
|
12288
|
-
case
|
|
12289
|
-
(0,
|
|
12444
|
+
case 40 /* WithdrawProtocolFees */: {
|
|
12445
|
+
(0, import_kit86.assertIsInstructionWithAccounts)(instruction);
|
|
12290
12446
|
return {
|
|
12291
|
-
instructionType:
|
|
12447
|
+
instructionType: 40 /* WithdrawProtocolFees */,
|
|
12292
12448
|
...parseWithdrawProtocolFeesInstruction(instruction)
|
|
12293
12449
|
};
|
|
12294
12450
|
}
|
|
12295
12451
|
default:
|
|
12296
|
-
throw new
|
|
12297
|
-
|
|
12452
|
+
throw new import_kit86.SolanaError(
|
|
12453
|
+
import_kit86.SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE,
|
|
12298
12454
|
{ instructionType, programName: "satrush" }
|
|
12299
12455
|
);
|
|
12300
12456
|
}
|
|
12301
12457
|
}
|
|
12302
12458
|
function satrushProgram() {
|
|
12303
12459
|
return (client) => {
|
|
12304
|
-
return (0,
|
|
12460
|
+
return (0, import_kit86.extendClient)(client, {
|
|
12305
12461
|
satrush: {
|
|
12306
12462
|
accounts: {
|
|
12307
|
-
board: (0,
|
|
12308
|
-
epochVault: (0,
|
|
12309
|
-
epochVaultEntry: (0,
|
|
12463
|
+
board: (0, import_program_client_core42.addSelfFetchFunctions)(client, getBoardCodec()),
|
|
12464
|
+
epochVault: (0, import_program_client_core42.addSelfFetchFunctions)(client, getEpochVaultCodec()),
|
|
12465
|
+
epochVaultEntry: (0, import_program_client_core42.addSelfFetchFunctions)(
|
|
12310
12466
|
client,
|
|
12311
12467
|
getEpochVaultEntryCodec()
|
|
12312
12468
|
),
|
|
12313
|
-
epochVaultIteration: (0,
|
|
12469
|
+
epochVaultIteration: (0, import_program_client_core42.addSelfFetchFunctions)(
|
|
12314
12470
|
client,
|
|
12315
12471
|
getEpochVaultIterationCodec()
|
|
12316
12472
|
),
|
|
12317
|
-
epochVaultPage: (0,
|
|
12473
|
+
epochVaultPage: (0, import_program_client_core42.addSelfFetchFunctions)(
|
|
12318
12474
|
client,
|
|
12319
12475
|
getEpochVaultPageCodec()
|
|
12320
12476
|
),
|
|
12321
|
-
miner: (0,
|
|
12322
|
-
oneBtcVault: (0,
|
|
12323
|
-
oneBtcVaultEntry: (0,
|
|
12477
|
+
miner: (0, import_program_client_core42.addSelfFetchFunctions)(client, getMinerCodec()),
|
|
12478
|
+
oneBtcVault: (0, import_program_client_core42.addSelfFetchFunctions)(client, getOneBtcVaultCodec()),
|
|
12479
|
+
oneBtcVaultEntry: (0, import_program_client_core42.addSelfFetchFunctions)(
|
|
12324
12480
|
client,
|
|
12325
12481
|
getOneBtcVaultEntryCodec()
|
|
12326
12482
|
),
|
|
12327
|
-
oneBtcVaultIteration: (0,
|
|
12483
|
+
oneBtcVaultIteration: (0, import_program_client_core42.addSelfFetchFunctions)(
|
|
12328
12484
|
client,
|
|
12329
12485
|
getOneBtcVaultIterationCodec()
|
|
12330
12486
|
),
|
|
12331
|
-
publicAutomation: (0,
|
|
12487
|
+
publicAutomation: (0, import_program_client_core42.addSelfFetchFunctions)(
|
|
12332
12488
|
client,
|
|
12333
12489
|
getPublicAutomationCodec()
|
|
12334
12490
|
),
|
|
12335
|
-
publicDeployment: (0,
|
|
12491
|
+
publicDeployment: (0, import_program_client_core42.addSelfFetchFunctions)(
|
|
12336
12492
|
client,
|
|
12337
12493
|
getPublicDeploymentCodec()
|
|
12338
12494
|
),
|
|
12339
|
-
round: (0,
|
|
12340
|
-
satrushConfig: (0,
|
|
12341
|
-
satsVault: (0,
|
|
12342
|
-
treasury: (0,
|
|
12495
|
+
round: (0, import_program_client_core42.addSelfFetchFunctions)(client, getRoundCodec()),
|
|
12496
|
+
satrushConfig: (0, import_program_client_core42.addSelfFetchFunctions)(client, getSatrushConfigCodec()),
|
|
12497
|
+
satsVault: (0, import_program_client_core42.addSelfFetchFunctions)(client, getSatsVaultCodec()),
|
|
12498
|
+
treasury: (0, import_program_client_core42.addSelfFetchFunctions)(client, getTreasuryCodec())
|
|
12343
12499
|
},
|
|
12344
12500
|
instructions: {
|
|
12345
|
-
buyEpochTickets: (input) => (0,
|
|
12501
|
+
buyEpochTickets: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12346
12502
|
client,
|
|
12347
12503
|
getBuyEpochTicketsInstructionAsync(input)
|
|
12348
12504
|
),
|
|
12349
|
-
buyOneBtcTickets: (input) => (0,
|
|
12505
|
+
buyOneBtcTickets: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12350
12506
|
client,
|
|
12351
12507
|
getBuyOneBtcTicketsInstructionAsync(input)
|
|
12352
12508
|
),
|
|
12353
|
-
cancelPublicAutomation: (input) => (0,
|
|
12509
|
+
cancelPublicAutomation: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12354
12510
|
client,
|
|
12355
12511
|
getCancelPublicAutomationInstructionAsync(input)
|
|
12356
12512
|
),
|
|
12357
|
-
claimEpochReward: (input) => (0,
|
|
12513
|
+
claimEpochReward: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12358
12514
|
client,
|
|
12359
12515
|
getClaimEpochRewardInstructionAsync(input)
|
|
12360
12516
|
),
|
|
12361
|
-
claimOneBtcReward: (input) => (0,
|
|
12517
|
+
claimOneBtcReward: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12362
12518
|
client,
|
|
12363
12519
|
getClaimOneBtcRewardInstructionAsync(input)
|
|
12364
12520
|
),
|
|
12365
|
-
claimSats: (input) => (0,
|
|
12521
|
+
claimSats: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12366
12522
|
client,
|
|
12367
12523
|
getClaimSatsInstructionAsync(input)
|
|
12368
12524
|
),
|
|
12369
|
-
claimUsd: (input) => (0,
|
|
12525
|
+
claimUsd: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12370
12526
|
client,
|
|
12371
12527
|
getClaimUsdInstructionAsync(input)
|
|
12372
12528
|
),
|
|
12373
|
-
closeEpochEntry: (input) => (0,
|
|
12529
|
+
closeEpochEntry: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12374
12530
|
client,
|
|
12375
12531
|
getCloseEpochEntryInstructionAsync(input)
|
|
12376
12532
|
),
|
|
12377
|
-
closeEpochIteration: (input) => (0,
|
|
12533
|
+
closeEpochIteration: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12378
12534
|
client,
|
|
12379
12535
|
getCloseEpochIterationInstructionAsync(input)
|
|
12380
12536
|
),
|
|
12381
|
-
closeEpochPage: (input) => (0,
|
|
12537
|
+
closeEpochPage: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12382
12538
|
client,
|
|
12383
12539
|
getCloseEpochPageInstructionAsync(input)
|
|
12384
12540
|
),
|
|
12385
|
-
closeOneBtcIteration: (input) => (0,
|
|
12541
|
+
closeOneBtcIteration: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12386
12542
|
client,
|
|
12387
12543
|
getCloseOneBtcIterationInstructionAsync(input)
|
|
12388
12544
|
),
|
|
12389
|
-
closeOneBtcTicket: (input) => (0,
|
|
12545
|
+
closeOneBtcTicket: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12390
12546
|
client,
|
|
12391
|
-
|
|
12547
|
+
getCloseOneBtcTicketInstructionAsync(input)
|
|
12392
12548
|
),
|
|
12393
|
-
closeRound: (input) => (0,
|
|
12549
|
+
closeRound: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12394
12550
|
client,
|
|
12395
12551
|
getCloseRoundInstructionAsync(input)
|
|
12396
12552
|
),
|
|
12397
|
-
createBoard: (input) => (0,
|
|
12553
|
+
createBoard: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12398
12554
|
client,
|
|
12399
12555
|
getCreateBoardInstructionAsync(input)
|
|
12400
12556
|
),
|
|
12401
|
-
createEpochVault: (input) => (0,
|
|
12557
|
+
createEpochVault: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12402
12558
|
client,
|
|
12403
12559
|
getCreateEpochVaultInstructionAsync(input)
|
|
12404
12560
|
),
|
|
12405
|
-
createOneBtcVault: (input) => (0,
|
|
12561
|
+
createOneBtcVault: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12406
12562
|
client,
|
|
12407
12563
|
getCreateOneBtcVaultInstructionAsync(input)
|
|
12408
12564
|
),
|
|
12409
|
-
createPublicAutomation: (input) => (0,
|
|
12565
|
+
createPublicAutomation: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12410
12566
|
client,
|
|
12411
12567
|
getCreatePublicAutomationInstructionAsync(input)
|
|
12412
12568
|
),
|
|
12413
|
-
createSatrushConfig: (input) => (0,
|
|
12569
|
+
createSatrushConfig: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12414
12570
|
client,
|
|
12415
12571
|
getCreateSatrushConfigInstructionAsync(input)
|
|
12416
12572
|
),
|
|
12417
|
-
createSatsVault: (input) => (0,
|
|
12573
|
+
createSatsVault: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12418
12574
|
client,
|
|
12419
12575
|
getCreateSatsVaultInstructionAsync(input)
|
|
12420
12576
|
),
|
|
12421
|
-
createTreasury: (input) => (0,
|
|
12577
|
+
createTreasury: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12422
12578
|
client,
|
|
12423
12579
|
getCreateTreasuryInstructionAsync(input)
|
|
12424
12580
|
),
|
|
12425
|
-
deployPublic: (input) => (0,
|
|
12581
|
+
deployPublic: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12426
12582
|
client,
|
|
12427
12583
|
getDeployPublicInstructionAsync(input)
|
|
12428
12584
|
),
|
|
12429
|
-
executePublicAutomation: (input) => (0,
|
|
12585
|
+
executePublicAutomation: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12430
12586
|
client,
|
|
12431
12587
|
getExecutePublicAutomationInstructionAsync(input)
|
|
12432
12588
|
),
|
|
12433
|
-
rotateRound: (input) => (0,
|
|
12589
|
+
rotateRound: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12434
12590
|
client,
|
|
12435
12591
|
getRotateRoundInstructionAsync(input)
|
|
12436
12592
|
),
|
|
12437
|
-
sealEpochPage: (input) => (0,
|
|
12593
|
+
sealEpochPage: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12438
12594
|
client,
|
|
12439
12595
|
getSealEpochPageInstructionAsync(input)
|
|
12440
12596
|
),
|
|
12441
|
-
selectEpochWinner: (input) => (0,
|
|
12597
|
+
selectEpochWinner: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12442
12598
|
client,
|
|
12443
12599
|
getSelectEpochWinnerInstructionAsync(input)
|
|
12444
12600
|
),
|
|
12445
|
-
settleDeployPublic: (input) => (0,
|
|
12601
|
+
settleDeployPublic: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12446
12602
|
client,
|
|
12447
12603
|
getSettleDeployPublicInstructionAsync(input)
|
|
12448
12604
|
),
|
|
12449
|
-
swapEpochStake: (input) => (0,
|
|
12605
|
+
swapEpochStake: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12450
12606
|
client,
|
|
12451
12607
|
getSwapEpochStakeInstructionAsync(input)
|
|
12452
12608
|
),
|
|
12453
|
-
swapOneBtcStake: (input) => (0,
|
|
12609
|
+
swapOneBtcStake: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12454
12610
|
client,
|
|
12455
12611
|
getSwapOneBtcStakeInstructionAsync(input)
|
|
12456
12612
|
),
|
|
12457
|
-
swapRoundStake: (input) => (0,
|
|
12613
|
+
swapRoundStake: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12458
12614
|
client,
|
|
12459
12615
|
getSwapRoundStakeInstructionAsync(input)
|
|
12460
12616
|
),
|
|
12461
|
-
swapStrikeStake: (input) => (0,
|
|
12617
|
+
swapStrikeStake: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12462
12618
|
client,
|
|
12463
12619
|
getSwapStrikeStakeInstructionAsync(input)
|
|
12464
12620
|
),
|
|
12465
|
-
topUpPublicAutomation: (input) => (0,
|
|
12621
|
+
topUpPublicAutomation: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12466
12622
|
client,
|
|
12467
12623
|
getTopUpPublicAutomationInstructionAsync(input)
|
|
12468
12624
|
),
|
|
12469
|
-
triggerEpochDraw: (input) => (0,
|
|
12625
|
+
triggerEpochDraw: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12470
12626
|
client,
|
|
12471
12627
|
getTriggerEpochDrawInstructionAsync(input)
|
|
12472
12628
|
),
|
|
12473
|
-
triggerOneBtcDraw: (input) => (0,
|
|
12629
|
+
triggerOneBtcDraw: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12474
12630
|
client,
|
|
12475
12631
|
getTriggerOneBtcDrawInstructionAsync(input)
|
|
12476
12632
|
),
|
|
12477
|
-
updateBoardRoundDuration: (input) => (0,
|
|
12633
|
+
updateBoardRoundDuration: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12478
12634
|
client,
|
|
12479
12635
|
getUpdateBoardRoundDurationInstructionAsync(input)
|
|
12480
12636
|
),
|
|
12481
|
-
|
|
12637
|
+
updateDeployFees: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12638
|
+
client,
|
|
12639
|
+
getUpdateDeployFeesInstructionAsync(input)
|
|
12640
|
+
),
|
|
12641
|
+
updateDeploymentSettleGraceDuration: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12482
12642
|
client,
|
|
12483
12643
|
getUpdateDeploymentSettleGraceDurationInstructionAsync(input)
|
|
12484
12644
|
),
|
|
12485
|
-
updateEpochVaultIterationDuration: (input) => (0,
|
|
12645
|
+
updateEpochVaultIterationDuration: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12486
12646
|
client,
|
|
12487
12647
|
getUpdateEpochVaultIterationDurationInstructionAsync(input)
|
|
12488
12648
|
),
|
|
12489
|
-
updateMinDeployUsdAmount: (input) => (0,
|
|
12649
|
+
updateMinDeployUsdAmount: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12490
12650
|
client,
|
|
12491
12651
|
getUpdateMinDeployUsdAmountInstructionAsync(input)
|
|
12492
12652
|
),
|
|
12493
|
-
updateStrikeTriggerModulus: (input) => (0,
|
|
12653
|
+
updateStrikeTriggerModulus: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12494
12654
|
client,
|
|
12495
12655
|
getUpdateStrikeTriggerModulusInstructionAsync(input)
|
|
12496
12656
|
),
|
|
12497
|
-
updateUnclaimedHashrateBps: (input) => (0,
|
|
12657
|
+
updateUnclaimedHashrateBps: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12498
12658
|
client,
|
|
12499
12659
|
getUpdateUnclaimedHashrateBpsInstructionAsync(input)
|
|
12500
12660
|
),
|
|
12501
|
-
withdrawProtocolFees: (input) => (0,
|
|
12661
|
+
withdrawProtocolFees: (input) => (0, import_program_client_core42.addSelfPlanAndSendFunctions)(
|
|
12502
12662
|
client,
|
|
12503
12663
|
getWithdrawProtocolFeesInstructionAsync(input)
|
|
12504
12664
|
)
|
|
@@ -12578,6 +12738,8 @@ var SATRUSH_ERROR__INVALID_EPOCH_ITERATION_DURATION = 6048;
|
|
|
12578
12738
|
var SATRUSH_ERROR__INVALID_UNCLAIMED_HASHRATE_BPS = 6049;
|
|
12579
12739
|
var SATRUSH_ERROR__INVALID_STRIKE_TRIGGER_MODULUS = 6050;
|
|
12580
12740
|
var SATRUSH_ERROR__INVALID_SWAP_BPS = 6051;
|
|
12741
|
+
var SATRUSH_ERROR__INVALID_MINT_DATA = 6052;
|
|
12742
|
+
var SATRUSH_ERROR__INVALID_DEPLOY_FEES = 6053;
|
|
12581
12743
|
var satrushErrorMessages;
|
|
12582
12744
|
if (process.env["NODE_ENV"] !== "production") {
|
|
12583
12745
|
satrushErrorMessages = {
|
|
@@ -12602,9 +12764,11 @@ if (process.env["NODE_ENV"] !== "production") {
|
|
|
12602
12764
|
[SATRUSH_ERROR__INVALID_AUTOMATION_AMOUNT]: `Automation amount must be greater than zero`,
|
|
12603
12765
|
[SATRUSH_ERROR__INVALID_AUTOMATION_STRATEGY_MASK]: `Selection mask does not match the automation strategy`,
|
|
12604
12766
|
[SATRUSH_ERROR__INVALID_CLAIM_AMOUNT]: `Claim amount must be greater than zero`,
|
|
12767
|
+
[SATRUSH_ERROR__INVALID_DEPLOY_FEES]: `Deploy fee legs must each be at least 1 bps and sum to exactly 800 bps`,
|
|
12605
12768
|
[SATRUSH_ERROR__INVALID_DEPLOYMENT_AMOUNT]: `Deployment amount must be greater than zero`,
|
|
12606
12769
|
[SATRUSH_ERROR__INVALID_ENTROPY]: `Entropy value is invalid`,
|
|
12607
12770
|
[SATRUSH_ERROR__INVALID_EPOCH_ITERATION_DURATION]: `Epoch iteration duration must be greater than zero`,
|
|
12771
|
+
[SATRUSH_ERROR__INVALID_MINT_DATA]: `Mint account data is too short to contain the decimals field`,
|
|
12608
12772
|
[SATRUSH_ERROR__INVALID_ROUND_DURATION]: `Round duration must be greater than zero`,
|
|
12609
12773
|
[SATRUSH_ERROR__INVALID_ROUND_ID]: `Invalid round id supplied to create round`,
|
|
12610
12774
|
[SATRUSH_ERROR__INVALID_SELECTION_MASK]: `Selection mask must pick between 1 and 21 tiles within the 21-bit range`,
|
|
@@ -12642,7 +12806,7 @@ function getSatrushErrorMessage(code) {
|
|
|
12642
12806
|
return "Error message not available in production bundles.";
|
|
12643
12807
|
}
|
|
12644
12808
|
function isSatrushError(error, transactionMessage, code) {
|
|
12645
|
-
return (0,
|
|
12809
|
+
return (0, import_kit87.isProgramError)(
|
|
12646
12810
|
error,
|
|
12647
12811
|
transactionMessage,
|
|
12648
12812
|
SATRUSH_PROGRAM_ADDRESS,
|
|
@@ -12651,111 +12815,111 @@ function isSatrushError(error, transactionMessage, code) {
|
|
|
12651
12815
|
}
|
|
12652
12816
|
|
|
12653
12817
|
// src/builders.ts
|
|
12654
|
-
var
|
|
12818
|
+
var import_kit89 = require("@solana/kit");
|
|
12655
12819
|
var import_token = require("@solana-program/token");
|
|
12656
12820
|
|
|
12657
12821
|
// src/pda.ts
|
|
12658
|
-
var
|
|
12822
|
+
var import_kit88 = require("@solana/kit");
|
|
12659
12823
|
async function getSatrushConfigAddress() {
|
|
12660
|
-
return await (0,
|
|
12824
|
+
return await (0, import_kit88.getProgramDerivedAddress)({
|
|
12661
12825
|
programAddress: SATRUSH_PROGRAM_ADDRESS,
|
|
12662
12826
|
seeds: ["satrush_config"]
|
|
12663
12827
|
});
|
|
12664
12828
|
}
|
|
12665
12829
|
async function getEventAuthorityAddress() {
|
|
12666
|
-
return await (0,
|
|
12830
|
+
return await (0, import_kit88.getProgramDerivedAddress)({
|
|
12667
12831
|
programAddress: SATRUSH_PROGRAM_ADDRESS,
|
|
12668
12832
|
seeds: ["__event_authority"]
|
|
12669
12833
|
});
|
|
12670
12834
|
}
|
|
12671
12835
|
async function getBoardAddress() {
|
|
12672
|
-
return await (0,
|
|
12836
|
+
return await (0, import_kit88.getProgramDerivedAddress)({
|
|
12673
12837
|
programAddress: SATRUSH_PROGRAM_ADDRESS,
|
|
12674
12838
|
seeds: ["board"]
|
|
12675
12839
|
});
|
|
12676
12840
|
}
|
|
12677
12841
|
async function getRoundAddress(roundId) {
|
|
12678
|
-
return await (0,
|
|
12842
|
+
return await (0, import_kit88.getProgramDerivedAddress)({
|
|
12679
12843
|
programAddress: SATRUSH_PROGRAM_ADDRESS,
|
|
12680
|
-
seeds: ["round", (0,
|
|
12844
|
+
seeds: ["round", (0, import_kit88.getU32Encoder)().encode(roundId)]
|
|
12681
12845
|
});
|
|
12682
12846
|
}
|
|
12683
12847
|
async function getPublicDeploymentAddress(authority, roundId) {
|
|
12684
|
-
return await (0,
|
|
12848
|
+
return await (0, import_kit88.getProgramDerivedAddress)({
|
|
12685
12849
|
programAddress: SATRUSH_PROGRAM_ADDRESS,
|
|
12686
12850
|
seeds: [
|
|
12687
12851
|
"public_deployment",
|
|
12688
|
-
(0,
|
|
12689
|
-
(0,
|
|
12852
|
+
(0, import_kit88.getAddressEncoder)().encode(authority),
|
|
12853
|
+
(0, import_kit88.getU32Encoder)().encode(roundId)
|
|
12690
12854
|
]
|
|
12691
12855
|
});
|
|
12692
12856
|
}
|
|
12693
12857
|
async function getMinerAddress(authority) {
|
|
12694
|
-
return await (0,
|
|
12858
|
+
return await (0, import_kit88.getProgramDerivedAddress)({
|
|
12695
12859
|
programAddress: SATRUSH_PROGRAM_ADDRESS,
|
|
12696
|
-
seeds: ["miner", (0,
|
|
12860
|
+
seeds: ["miner", (0, import_kit88.getAddressEncoder)().encode(authority)]
|
|
12697
12861
|
});
|
|
12698
12862
|
}
|
|
12699
12863
|
async function getSatsVaultAddress() {
|
|
12700
|
-
return await (0,
|
|
12864
|
+
return await (0, import_kit88.getProgramDerivedAddress)({
|
|
12701
12865
|
programAddress: SATRUSH_PROGRAM_ADDRESS,
|
|
12702
12866
|
seeds: ["sats_vault"]
|
|
12703
12867
|
});
|
|
12704
12868
|
}
|
|
12705
12869
|
async function getEpochVaultAddress() {
|
|
12706
|
-
return await (0,
|
|
12870
|
+
return await (0, import_kit88.getProgramDerivedAddress)({
|
|
12707
12871
|
programAddress: SATRUSH_PROGRAM_ADDRESS,
|
|
12708
12872
|
seeds: ["epoch_vault"]
|
|
12709
12873
|
});
|
|
12710
12874
|
}
|
|
12711
12875
|
async function getEpochVaultIterationAddress(iterationId) {
|
|
12712
|
-
return await (0,
|
|
12876
|
+
return await (0, import_kit88.getProgramDerivedAddress)({
|
|
12713
12877
|
programAddress: SATRUSH_PROGRAM_ADDRESS,
|
|
12714
|
-
seeds: ["epoch_vault_iteration", (0,
|
|
12878
|
+
seeds: ["epoch_vault_iteration", (0, import_kit88.getU32Encoder)().encode(iterationId)]
|
|
12715
12879
|
});
|
|
12716
12880
|
}
|
|
12717
12881
|
async function getEpochVaultEntryAddress(iterationId, authority) {
|
|
12718
|
-
return await (0,
|
|
12882
|
+
return await (0, import_kit88.getProgramDerivedAddress)({
|
|
12719
12883
|
programAddress: SATRUSH_PROGRAM_ADDRESS,
|
|
12720
12884
|
seeds: [
|
|
12721
12885
|
"epoch_vault_entry",
|
|
12722
|
-
(0,
|
|
12723
|
-
(0,
|
|
12886
|
+
(0, import_kit88.getU32Encoder)().encode(iterationId),
|
|
12887
|
+
(0, import_kit88.getAddressEncoder)().encode(authority)
|
|
12724
12888
|
]
|
|
12725
12889
|
});
|
|
12726
12890
|
}
|
|
12727
12891
|
async function getEpochVaultPageAddress(iterationId, pageIndex) {
|
|
12728
|
-
return await (0,
|
|
12892
|
+
return await (0, import_kit88.getProgramDerivedAddress)({
|
|
12729
12893
|
programAddress: SATRUSH_PROGRAM_ADDRESS,
|
|
12730
12894
|
seeds: [
|
|
12731
12895
|
"epoch_vault_page",
|
|
12732
|
-
(0,
|
|
12733
|
-
(0,
|
|
12896
|
+
(0, import_kit88.getU32Encoder)().encode(iterationId),
|
|
12897
|
+
(0, import_kit88.getU16Encoder)().encode(pageIndex)
|
|
12734
12898
|
]
|
|
12735
12899
|
});
|
|
12736
12900
|
}
|
|
12737
12901
|
async function getOneBtcVaultAddress() {
|
|
12738
|
-
return await (0,
|
|
12902
|
+
return await (0, import_kit88.getProgramDerivedAddress)({
|
|
12739
12903
|
programAddress: SATRUSH_PROGRAM_ADDRESS,
|
|
12740
12904
|
seeds: ["one_btc_vault"]
|
|
12741
12905
|
});
|
|
12742
12906
|
}
|
|
12743
12907
|
async function getOneBtcVaultIterationAddress(iterationId) {
|
|
12744
|
-
return await (0,
|
|
12908
|
+
return await (0, import_kit88.getProgramDerivedAddress)({
|
|
12745
12909
|
programAddress: SATRUSH_PROGRAM_ADDRESS,
|
|
12746
|
-
seeds: ["one_btc_vault_iteration", (0,
|
|
12910
|
+
seeds: ["one_btc_vault_iteration", (0, import_kit88.getU32Encoder)().encode(iterationId)]
|
|
12747
12911
|
});
|
|
12748
12912
|
}
|
|
12749
12913
|
async function getTreasuryAddress() {
|
|
12750
|
-
return await (0,
|
|
12914
|
+
return await (0, import_kit88.getProgramDerivedAddress)({
|
|
12751
12915
|
programAddress: SATRUSH_PROGRAM_ADDRESS,
|
|
12752
12916
|
seeds: ["treasury"]
|
|
12753
12917
|
});
|
|
12754
12918
|
}
|
|
12755
12919
|
async function getPublicAutomationAddress(authority) {
|
|
12756
|
-
return await (0,
|
|
12920
|
+
return await (0, import_kit88.getProgramDerivedAddress)({
|
|
12757
12921
|
programAddress: SATRUSH_PROGRAM_ADDRESS,
|
|
12758
|
-
seeds: ["public_automation", (0,
|
|
12922
|
+
seeds: ["public_automation", (0, import_kit88.getAddressEncoder)().encode(authority)]
|
|
12759
12923
|
});
|
|
12760
12924
|
}
|
|
12761
12925
|
|
|
@@ -12773,7 +12937,7 @@ async function buildDeployPublicInstruction(authority, usdMint, roundId, selecti
|
|
|
12773
12937
|
});
|
|
12774
12938
|
const [eventAuthority] = await getEventAuthorityAddress();
|
|
12775
12939
|
return await getDeployPublicInstructionAsync({
|
|
12776
|
-
authority: (0,
|
|
12940
|
+
authority: (0, import_kit89.createNoopSigner)(authority),
|
|
12777
12941
|
usdMint,
|
|
12778
12942
|
round,
|
|
12779
12943
|
authorityUsdAta,
|
|
@@ -12799,7 +12963,7 @@ async function buildSettleDeployPublicInstruction(authority, deploymentAuthority
|
|
|
12799
12963
|
mint: usdMint
|
|
12800
12964
|
});
|
|
12801
12965
|
return await getSettleDeployPublicInstructionAsync({
|
|
12802
|
-
authority: (0,
|
|
12966
|
+
authority: (0, import_kit89.createNoopSigner)(authority),
|
|
12803
12967
|
rentRecipient,
|
|
12804
12968
|
round,
|
|
12805
12969
|
publicDeployment,
|
|
@@ -12815,7 +12979,7 @@ async function buildSettleDeployPublicInstruction(authority, deploymentAuthority
|
|
|
12815
12979
|
async function buildClaimSatsInstruction(authority, btcMint, shares) {
|
|
12816
12980
|
const [eventAuthority] = await getEventAuthorityAddress();
|
|
12817
12981
|
return await getClaimSatsInstructionAsync({
|
|
12818
|
-
authority: (0,
|
|
12982
|
+
authority: (0, import_kit89.createNoopSigner)(authority),
|
|
12819
12983
|
btcMint,
|
|
12820
12984
|
shares,
|
|
12821
12985
|
eventAuthority,
|
|
@@ -12824,7 +12988,7 @@ async function buildClaimSatsInstruction(authority, btcMint, shares) {
|
|
|
12824
12988
|
}
|
|
12825
12989
|
async function buildClaimUsdInstruction(authority, usdMint, amount) {
|
|
12826
12990
|
return await getClaimUsdInstructionAsync({
|
|
12827
|
-
authority: (0,
|
|
12991
|
+
authority: (0, import_kit89.createNoopSigner)(authority),
|
|
12828
12992
|
usdMint,
|
|
12829
12993
|
amount
|
|
12830
12994
|
});
|
|
@@ -12836,7 +13000,7 @@ async function buildCreatePublicAutomationInstruction(authority, usdMint, strate
|
|
|
12836
13000
|
mint: usdMint
|
|
12837
13001
|
});
|
|
12838
13002
|
return await getCreatePublicAutomationInstructionAsync({
|
|
12839
|
-
authority: (0,
|
|
13003
|
+
authority: (0, import_kit89.createNoopSigner)(authority),
|
|
12840
13004
|
usdMint,
|
|
12841
13005
|
authorityUsdAta,
|
|
12842
13006
|
strategy,
|
|
@@ -12853,7 +13017,7 @@ async function buildTopUpPublicAutomationInstruction(authority, usdMint, amount)
|
|
|
12853
13017
|
mint: usdMint
|
|
12854
13018
|
});
|
|
12855
13019
|
return await getTopUpPublicAutomationInstructionAsync({
|
|
12856
|
-
authority: (0,
|
|
13020
|
+
authority: (0, import_kit89.createNoopSigner)(authority),
|
|
12857
13021
|
usdMint,
|
|
12858
13022
|
authorityUsdAta,
|
|
12859
13023
|
amount
|
|
@@ -12861,7 +13025,7 @@ async function buildTopUpPublicAutomationInstruction(authority, usdMint, amount)
|
|
|
12861
13025
|
}
|
|
12862
13026
|
async function buildCancelPublicAutomationInstruction(authority, usdMint) {
|
|
12863
13027
|
return await getCancelPublicAutomationInstructionAsync({
|
|
12864
|
-
authority: (0,
|
|
13028
|
+
authority: (0, import_kit89.createNoopSigner)(authority),
|
|
12865
13029
|
usdMint
|
|
12866
13030
|
});
|
|
12867
13031
|
}
|
|
@@ -12885,7 +13049,7 @@ async function buildExecutePublicAutomationInstruction(crankAuthority, automatio
|
|
|
12885
13049
|
]);
|
|
12886
13050
|
const [eventAuthority] = await getEventAuthorityAddress();
|
|
12887
13051
|
return await getExecutePublicAutomationInstructionAsync({
|
|
12888
|
-
authority: (0,
|
|
13052
|
+
authority: (0, import_kit89.createNoopSigner)(crankAuthority),
|
|
12889
13053
|
round,
|
|
12890
13054
|
publicAutomation,
|
|
12891
13055
|
usdMint,
|
|
@@ -12910,6 +13074,8 @@ var HASHRATE_DECIMALS = 2;
|
|
|
12910
13074
|
var HASHRATE_PER_TICKET = 100n;
|
|
12911
13075
|
var LOYALTY_WEIGHT = 1n;
|
|
12912
13076
|
var SKILL_WEIGHT = 1n;
|
|
13077
|
+
var STRIKE_BOOST_ROUNDS = 240;
|
|
13078
|
+
var STRIKE_BOOST_HASHRATE_MULTIPLIER = 2n;
|
|
12913
13079
|
function getHashrateUiAmount(hashrate) {
|
|
12914
13080
|
assertU64(hashrate, "hashrate");
|
|
12915
13081
|
const whole = hashrate / HASHRATE_PER_TICKET;
|
|
@@ -12925,9 +13091,10 @@ var ZERO_REWARD = {
|
|
|
12925
13091
|
skillPoints: 0n,
|
|
12926
13092
|
total: 0n
|
|
12927
13093
|
};
|
|
12928
|
-
function hashrateReward(stake, streak, covered, totalTiles, usdUnit) {
|
|
13094
|
+
function hashrateReward(stake, streak, covered, totalTiles, usdUnit, hashrateMultiplier = 1n) {
|
|
12929
13095
|
assertU64(stake, "stake");
|
|
12930
13096
|
assertU64(usdUnit, "usdUnit");
|
|
13097
|
+
assertU64(hashrateMultiplier, "hashrateMultiplier");
|
|
12931
13098
|
if (stake === 0n || covered === 0) {
|
|
12932
13099
|
return ZERO_REWARD;
|
|
12933
13100
|
}
|
|
@@ -12935,9 +13102,9 @@ function hashrateReward(stake, streak, covered, totalTiles, usdUnit) {
|
|
|
12935
13102
|
const denom = coveredBig * usdUnit;
|
|
12936
13103
|
const skillNum = stake * (SKILL_WEIGHT * BigInt(totalTiles));
|
|
12937
13104
|
const loyaltyNum = stake * (LOYALTY_WEIGHT * BigInt(streak) * coveredBig);
|
|
12938
|
-
const total = (loyaltyNum + skillNum) / denom;
|
|
13105
|
+
const total = (loyaltyNum + skillNum) / denom * hashrateMultiplier;
|
|
12939
13106
|
assertU64(total, "hashrate reward total");
|
|
12940
|
-
const skillPoints = skillNum / denom;
|
|
13107
|
+
const skillPoints = skillNum / denom * hashrateMultiplier;
|
|
12941
13108
|
const loyaltyPoints = total - skillPoints;
|
|
12942
13109
|
return { loyaltyPoints, skillPoints, total };
|
|
12943
13110
|
}
|
|
@@ -13080,8 +13247,10 @@ function nextStreakMultiplier(currentStreakCount, lastMinedRoundId, nextRoundId)
|
|
|
13080
13247
|
SATRUSH_ERROR__INVALID_AUTOMATION_STRATEGY_MASK,
|
|
13081
13248
|
SATRUSH_ERROR__INVALID_CLAIM_AMOUNT,
|
|
13082
13249
|
SATRUSH_ERROR__INVALID_DEPLOYMENT_AMOUNT,
|
|
13250
|
+
SATRUSH_ERROR__INVALID_DEPLOY_FEES,
|
|
13083
13251
|
SATRUSH_ERROR__INVALID_ENTROPY,
|
|
13084
13252
|
SATRUSH_ERROR__INVALID_EPOCH_ITERATION_DURATION,
|
|
13253
|
+
SATRUSH_ERROR__INVALID_MINT_DATA,
|
|
13085
13254
|
SATRUSH_ERROR__INVALID_ROUND_DURATION,
|
|
13086
13255
|
SATRUSH_ERROR__INVALID_ROUND_ID,
|
|
13087
13256
|
SATRUSH_ERROR__INVALID_SELECTION_MASK,
|
|
@@ -13117,6 +13286,8 @@ function nextStreakMultiplier(currentStreakCount, lastMinedRoundId, nextRoundId)
|
|
|
13117
13286
|
SETTLE_DEPLOY_PUBLIC_DISCRIMINATOR,
|
|
13118
13287
|
SHARE_OFFSET,
|
|
13119
13288
|
SKILL_WEIGHT,
|
|
13289
|
+
STRIKE_BOOST_HASHRATE_MULTIPLIER,
|
|
13290
|
+
STRIKE_BOOST_ROUNDS,
|
|
13120
13291
|
SWAP_EPOCH_STAKE_DISCRIMINATOR,
|
|
13121
13292
|
SWAP_ONE_BTC_STAKE_DISCRIMINATOR,
|
|
13122
13293
|
SWAP_ROUND_STAKE_DISCRIMINATOR,
|
|
@@ -13130,6 +13301,7 @@ function nextStreakMultiplier(currentStreakCount, lastMinedRoundId, nextRoundId)
|
|
|
13130
13301
|
TRIGGER_ONE_BTC_DRAW_DISCRIMINATOR,
|
|
13131
13302
|
UPDATE_BOARD_ROUND_DURATION_DISCRIMINATOR,
|
|
13132
13303
|
UPDATE_DEPLOYMENT_SETTLE_GRACE_DURATION_DISCRIMINATOR,
|
|
13304
|
+
UPDATE_DEPLOY_FEES_DISCRIMINATOR,
|
|
13133
13305
|
UPDATE_EPOCH_VAULT_ITERATION_DURATION_DISCRIMINATOR,
|
|
13134
13306
|
UPDATE_MIN_DEPLOY_USD_AMOUNT_DISCRIMINATOR,
|
|
13135
13307
|
UPDATE_STRIKE_TRIGGER_MODULUS_DISCRIMINATOR,
|
|
@@ -13308,6 +13480,7 @@ function nextStreakMultiplier(currentStreakCount, lastMinedRoundId, nextRoundId)
|
|
|
13308
13480
|
getCloseOneBtcIterationInstructionDataEncoder,
|
|
13309
13481
|
getCloseOneBtcTicketDiscriminatorBytes,
|
|
13310
13482
|
getCloseOneBtcTicketInstruction,
|
|
13483
|
+
getCloseOneBtcTicketInstructionAsync,
|
|
13311
13484
|
getCloseOneBtcTicketInstructionDataCodec,
|
|
13312
13485
|
getCloseOneBtcTicketInstructionDataDecoder,
|
|
13313
13486
|
getCloseOneBtcTicketInstructionDataEncoder,
|
|
@@ -13573,6 +13746,12 @@ function nextStreakMultiplier(currentStreakCount, lastMinedRoundId, nextRoundId)
|
|
|
13573
13746
|
getUpdateBoardRoundDurationInstructionDataCodec,
|
|
13574
13747
|
getUpdateBoardRoundDurationInstructionDataDecoder,
|
|
13575
13748
|
getUpdateBoardRoundDurationInstructionDataEncoder,
|
|
13749
|
+
getUpdateDeployFeesDiscriminatorBytes,
|
|
13750
|
+
getUpdateDeployFeesInstruction,
|
|
13751
|
+
getUpdateDeployFeesInstructionAsync,
|
|
13752
|
+
getUpdateDeployFeesInstructionDataCodec,
|
|
13753
|
+
getUpdateDeployFeesInstructionDataDecoder,
|
|
13754
|
+
getUpdateDeployFeesInstructionDataEncoder,
|
|
13576
13755
|
getUpdateDeploymentSettleGraceDurationDiscriminatorBytes,
|
|
13577
13756
|
getUpdateDeploymentSettleGraceDurationInstruction,
|
|
13578
13757
|
getUpdateDeploymentSettleGraceDurationInstructionAsync,
|
|
@@ -13652,6 +13831,7 @@ function nextStreakMultiplier(currentStreakCount, lastMinedRoundId, nextRoundId)
|
|
|
13652
13831
|
parseTriggerEpochDrawInstruction,
|
|
13653
13832
|
parseTriggerOneBtcDrawInstruction,
|
|
13654
13833
|
parseUpdateBoardRoundDurationInstruction,
|
|
13834
|
+
parseUpdateDeployFeesInstruction,
|
|
13655
13835
|
parseUpdateDeploymentSettleGraceDurationInstruction,
|
|
13656
13836
|
parseUpdateEpochVaultIterationDurationInstruction,
|
|
13657
13837
|
parseUpdateMinDeployUsdAmountInstruction,
|