@satrush/client 0.1.7 → 0.1.8
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 +91 -6
- package/dist/index.d.ts +91 -6
- package/dist/index.js +462 -310
- package/dist/index.mjs +269 -112
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -518,7 +518,9 @@ function getEpochWinnerSelectedEncoder() {
|
|
|
518
518
|
["winner", getAddressEncoder3()],
|
|
519
519
|
["rank", getU8Encoder4()],
|
|
520
520
|
["pageIndex", getU16Encoder5()],
|
|
521
|
-
["winningTicket", getU64Encoder6()]
|
|
521
|
+
["winningTicket", getU64Encoder6()],
|
|
522
|
+
["wonUsdAmount", getU64Encoder6()],
|
|
523
|
+
["wonBtcAmount", getU64Encoder6()]
|
|
522
524
|
]),
|
|
523
525
|
[
|
|
524
526
|
getConstantEncoder3(
|
|
@@ -536,7 +538,9 @@ function getEpochWinnerSelectedDecoder() {
|
|
|
536
538
|
["winner", getAddressDecoder3()],
|
|
537
539
|
["rank", getU8Decoder4()],
|
|
538
540
|
["pageIndex", getU16Decoder5()],
|
|
539
|
-
["winningTicket", getU64Decoder6()]
|
|
541
|
+
["winningTicket", getU64Decoder6()],
|
|
542
|
+
["wonUsdAmount", getU64Decoder6()],
|
|
543
|
+
["wonBtcAmount", getU64Decoder6()]
|
|
540
544
|
]),
|
|
541
545
|
[
|
|
542
546
|
getConstantDecoder3(
|
|
@@ -2126,7 +2130,8 @@ function getSatrushConfigEncoder() {
|
|
|
2126
2130
|
["minDeployUsdAmount", getU64Encoder26()],
|
|
2127
2131
|
["epochVaultIterationDuration", getU64Encoder26()],
|
|
2128
2132
|
["deploymentSettleGraceDuration", getU64Encoder26()],
|
|
2129
|
-
["
|
|
2133
|
+
["strikeTriggerModulus", getU16Encoder16()],
|
|
2134
|
+
["reserved", fixEncoderSize23(getBytesEncoder23(), 30)]
|
|
2130
2135
|
]),
|
|
2131
2136
|
(value) => ({ ...value, discriminator: SATRUSH_CONFIG_DISCRIMINATOR })
|
|
2132
2137
|
);
|
|
@@ -2152,7 +2157,8 @@ function getSatrushConfigDecoder() {
|
|
|
2152
2157
|
["minDeployUsdAmount", getU64Decoder26()],
|
|
2153
2158
|
["epochVaultIterationDuration", getU64Decoder26()],
|
|
2154
2159
|
["deploymentSettleGraceDuration", getU64Decoder26()],
|
|
2155
|
-
["
|
|
2160
|
+
["strikeTriggerModulus", getU16Decoder16()],
|
|
2161
|
+
["reserved", fixDecoderSize13(getBytesDecoder13(), 30)]
|
|
2156
2162
|
]);
|
|
2157
2163
|
}
|
|
2158
2164
|
function getSatrushConfigCodec() {
|
|
@@ -2380,12 +2386,12 @@ import {
|
|
|
2380
2386
|
assertIsInstructionWithAccounts,
|
|
2381
2387
|
containsBytes,
|
|
2382
2388
|
extendClient,
|
|
2383
|
-
fixEncoderSize as
|
|
2384
|
-
getBytesEncoder as
|
|
2389
|
+
fixEncoderSize as fixEncoderSize66,
|
|
2390
|
+
getBytesEncoder as getBytesEncoder78,
|
|
2385
2391
|
SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT,
|
|
2386
2392
|
SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION,
|
|
2387
2393
|
SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE,
|
|
2388
|
-
SolanaError as
|
|
2394
|
+
SolanaError as SolanaError41
|
|
2389
2395
|
} from "@solana/kit";
|
|
2390
2396
|
import {
|
|
2391
2397
|
addSelfFetchFunctions,
|
|
@@ -11372,7 +11378,7 @@ function parseUpdateMinDeployUsdAmountInstruction(instruction) {
|
|
|
11372
11378
|
};
|
|
11373
11379
|
}
|
|
11374
11380
|
|
|
11375
|
-
// src/generated/instructions/
|
|
11381
|
+
// src/generated/instructions/updateStrikeTriggerModulus.ts
|
|
11376
11382
|
import {
|
|
11377
11383
|
combineCodec as combineCodec70,
|
|
11378
11384
|
fixDecoderSize as fixDecoderSize53,
|
|
@@ -11381,8 +11387,8 @@ import {
|
|
|
11381
11387
|
getBytesEncoder as getBytesEncoder75,
|
|
11382
11388
|
getStructDecoder as getStructDecoder66,
|
|
11383
11389
|
getStructEncoder as getStructEncoder66,
|
|
11384
|
-
|
|
11385
|
-
|
|
11390
|
+
getU16Decoder as getU16Decoder21,
|
|
11391
|
+
getU16Encoder as getU16Encoder21,
|
|
11386
11392
|
SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS as SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS38,
|
|
11387
11393
|
SolanaError as SolanaError38,
|
|
11388
11394
|
transformEncoder as transformEncoder53
|
|
@@ -11390,37 +11396,37 @@ import {
|
|
|
11390
11396
|
import {
|
|
11391
11397
|
getAccountMetaFactory as getAccountMetaFactory38
|
|
11392
11398
|
} from "@solana/program-client-core";
|
|
11393
|
-
var
|
|
11394
|
-
function
|
|
11399
|
+
var UPDATE_STRIKE_TRIGGER_MODULUS_DISCRIMINATOR = new Uint8Array([241, 172, 229, 62, 191, 163, 60, 186]);
|
|
11400
|
+
function getUpdateStrikeTriggerModulusDiscriminatorBytes() {
|
|
11395
11401
|
return fixEncoderSize63(getBytesEncoder75(), 8).encode(
|
|
11396
|
-
|
|
11402
|
+
UPDATE_STRIKE_TRIGGER_MODULUS_DISCRIMINATOR
|
|
11397
11403
|
);
|
|
11398
11404
|
}
|
|
11399
|
-
function
|
|
11405
|
+
function getUpdateStrikeTriggerModulusInstructionDataEncoder() {
|
|
11400
11406
|
return transformEncoder53(
|
|
11401
11407
|
getStructEncoder66([
|
|
11402
11408
|
["discriminator", fixEncoderSize63(getBytesEncoder75(), 8)],
|
|
11403
|
-
["
|
|
11409
|
+
["newModulus", getU16Encoder21()]
|
|
11404
11410
|
]),
|
|
11405
11411
|
(value) => ({
|
|
11406
11412
|
...value,
|
|
11407
|
-
discriminator:
|
|
11413
|
+
discriminator: UPDATE_STRIKE_TRIGGER_MODULUS_DISCRIMINATOR
|
|
11408
11414
|
})
|
|
11409
11415
|
);
|
|
11410
11416
|
}
|
|
11411
|
-
function
|
|
11417
|
+
function getUpdateStrikeTriggerModulusInstructionDataDecoder() {
|
|
11412
11418
|
return getStructDecoder66([
|
|
11413
11419
|
["discriminator", fixDecoderSize53(getBytesDecoder53(), 8)],
|
|
11414
|
-
["
|
|
11420
|
+
["newModulus", getU16Decoder21()]
|
|
11415
11421
|
]);
|
|
11416
11422
|
}
|
|
11417
|
-
function
|
|
11423
|
+
function getUpdateStrikeTriggerModulusInstructionDataCodec() {
|
|
11418
11424
|
return combineCodec70(
|
|
11419
|
-
|
|
11420
|
-
|
|
11425
|
+
getUpdateStrikeTriggerModulusInstructionDataEncoder(),
|
|
11426
|
+
getUpdateStrikeTriggerModulusInstructionDataDecoder()
|
|
11421
11427
|
);
|
|
11422
11428
|
}
|
|
11423
|
-
async function
|
|
11429
|
+
async function getUpdateStrikeTriggerModulusInstructionAsync(input, config) {
|
|
11424
11430
|
const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
|
|
11425
11431
|
const originalAccounts = {
|
|
11426
11432
|
authority: { value: input.authority ?? null, isWritable: false },
|
|
@@ -11437,13 +11443,13 @@ async function getUpdateUnclaimedHashrateBpsInstructionAsync(input, config) {
|
|
|
11437
11443
|
getAccountMeta("authority", accounts.authority),
|
|
11438
11444
|
getAccountMeta("satrushConfig", accounts.satrushConfig)
|
|
11439
11445
|
],
|
|
11440
|
-
data:
|
|
11446
|
+
data: getUpdateStrikeTriggerModulusInstructionDataEncoder().encode(
|
|
11441
11447
|
args
|
|
11442
11448
|
),
|
|
11443
11449
|
programAddress
|
|
11444
11450
|
});
|
|
11445
11451
|
}
|
|
11446
|
-
function
|
|
11452
|
+
function getUpdateStrikeTriggerModulusInstruction(input, config) {
|
|
11447
11453
|
const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
|
|
11448
11454
|
const originalAccounts = {
|
|
11449
11455
|
authority: { value: input.authority ?? null, isWritable: false },
|
|
@@ -11457,13 +11463,13 @@ function getUpdateUnclaimedHashrateBpsInstruction(input, config) {
|
|
|
11457
11463
|
getAccountMeta("authority", accounts.authority),
|
|
11458
11464
|
getAccountMeta("satrushConfig", accounts.satrushConfig)
|
|
11459
11465
|
],
|
|
11460
|
-
data:
|
|
11466
|
+
data: getUpdateStrikeTriggerModulusInstructionDataEncoder().encode(
|
|
11461
11467
|
args
|
|
11462
11468
|
),
|
|
11463
11469
|
programAddress
|
|
11464
11470
|
});
|
|
11465
11471
|
}
|
|
11466
|
-
function
|
|
11472
|
+
function parseUpdateStrikeTriggerModulusInstruction(instruction) {
|
|
11467
11473
|
if (instruction.accounts.length < 2) {
|
|
11468
11474
|
throw new SolanaError38(
|
|
11469
11475
|
SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS38,
|
|
@@ -11482,50 +11488,166 @@ function parseUpdateUnclaimedHashrateBpsInstruction(instruction) {
|
|
|
11482
11488
|
return {
|
|
11483
11489
|
programAddress: instruction.programAddress,
|
|
11484
11490
|
accounts: { authority: getNextAccount(), satrushConfig: getNextAccount() },
|
|
11485
|
-
data:
|
|
11491
|
+
data: getUpdateStrikeTriggerModulusInstructionDataDecoder().decode(
|
|
11486
11492
|
instruction.data
|
|
11487
11493
|
)
|
|
11488
11494
|
};
|
|
11489
11495
|
}
|
|
11490
11496
|
|
|
11491
|
-
// src/generated/instructions/
|
|
11497
|
+
// src/generated/instructions/updateUnclaimedHashrateBps.ts
|
|
11492
11498
|
import {
|
|
11493
11499
|
combineCodec as combineCodec71,
|
|
11494
11500
|
fixDecoderSize as fixDecoderSize54,
|
|
11495
11501
|
fixEncoderSize as fixEncoderSize64,
|
|
11496
|
-
getAddressEncoder as getAddressEncoder40,
|
|
11497
11502
|
getBytesDecoder as getBytesDecoder54,
|
|
11498
11503
|
getBytesEncoder as getBytesEncoder76,
|
|
11499
|
-
getProgramDerivedAddress as getProgramDerivedAddress34,
|
|
11500
11504
|
getStructDecoder as getStructDecoder67,
|
|
11501
11505
|
getStructEncoder as getStructEncoder67,
|
|
11506
|
+
getU32Decoder as getU32Decoder32,
|
|
11507
|
+
getU32Encoder as getU32Encoder32,
|
|
11502
11508
|
SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS as SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS39,
|
|
11503
11509
|
SolanaError as SolanaError39,
|
|
11504
11510
|
transformEncoder as transformEncoder54
|
|
11505
11511
|
} from "@solana/kit";
|
|
11506
11512
|
import {
|
|
11507
|
-
getAccountMetaFactory as getAccountMetaFactory39
|
|
11513
|
+
getAccountMetaFactory as getAccountMetaFactory39
|
|
11514
|
+
} from "@solana/program-client-core";
|
|
11515
|
+
var UPDATE_UNCLAIMED_HASHRATE_BPS_DISCRIMINATOR = new Uint8Array([237, 38, 26, 14, 73, 161, 208, 157]);
|
|
11516
|
+
function getUpdateUnclaimedHashrateBpsDiscriminatorBytes() {
|
|
11517
|
+
return fixEncoderSize64(getBytesEncoder76(), 8).encode(
|
|
11518
|
+
UPDATE_UNCLAIMED_HASHRATE_BPS_DISCRIMINATOR
|
|
11519
|
+
);
|
|
11520
|
+
}
|
|
11521
|
+
function getUpdateUnclaimedHashrateBpsInstructionDataEncoder() {
|
|
11522
|
+
return transformEncoder54(
|
|
11523
|
+
getStructEncoder67([
|
|
11524
|
+
["discriminator", fixEncoderSize64(getBytesEncoder76(), 8)],
|
|
11525
|
+
["newUnclaimedHashrateBps", getU32Encoder32()]
|
|
11526
|
+
]),
|
|
11527
|
+
(value) => ({
|
|
11528
|
+
...value,
|
|
11529
|
+
discriminator: UPDATE_UNCLAIMED_HASHRATE_BPS_DISCRIMINATOR
|
|
11530
|
+
})
|
|
11531
|
+
);
|
|
11532
|
+
}
|
|
11533
|
+
function getUpdateUnclaimedHashrateBpsInstructionDataDecoder() {
|
|
11534
|
+
return getStructDecoder67([
|
|
11535
|
+
["discriminator", fixDecoderSize54(getBytesDecoder54(), 8)],
|
|
11536
|
+
["newUnclaimedHashrateBps", getU32Decoder32()]
|
|
11537
|
+
]);
|
|
11538
|
+
}
|
|
11539
|
+
function getUpdateUnclaimedHashrateBpsInstructionDataCodec() {
|
|
11540
|
+
return combineCodec71(
|
|
11541
|
+
getUpdateUnclaimedHashrateBpsInstructionDataEncoder(),
|
|
11542
|
+
getUpdateUnclaimedHashrateBpsInstructionDataDecoder()
|
|
11543
|
+
);
|
|
11544
|
+
}
|
|
11545
|
+
async function getUpdateUnclaimedHashrateBpsInstructionAsync(input, config) {
|
|
11546
|
+
const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
|
|
11547
|
+
const originalAccounts = {
|
|
11548
|
+
authority: { value: input.authority ?? null, isWritable: false },
|
|
11549
|
+
satrushConfig: { value: input.satrushConfig ?? null, isWritable: true }
|
|
11550
|
+
};
|
|
11551
|
+
const accounts = originalAccounts;
|
|
11552
|
+
const args = { ...input };
|
|
11553
|
+
if (!accounts.satrushConfig.value) {
|
|
11554
|
+
accounts.satrushConfig.value = await findSatrushConfigPda();
|
|
11555
|
+
}
|
|
11556
|
+
const getAccountMeta = getAccountMetaFactory39(programAddress, "programId");
|
|
11557
|
+
return Object.freeze({
|
|
11558
|
+
accounts: [
|
|
11559
|
+
getAccountMeta("authority", accounts.authority),
|
|
11560
|
+
getAccountMeta("satrushConfig", accounts.satrushConfig)
|
|
11561
|
+
],
|
|
11562
|
+
data: getUpdateUnclaimedHashrateBpsInstructionDataEncoder().encode(
|
|
11563
|
+
args
|
|
11564
|
+
),
|
|
11565
|
+
programAddress
|
|
11566
|
+
});
|
|
11567
|
+
}
|
|
11568
|
+
function getUpdateUnclaimedHashrateBpsInstruction(input, config) {
|
|
11569
|
+
const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
|
|
11570
|
+
const originalAccounts = {
|
|
11571
|
+
authority: { value: input.authority ?? null, isWritable: false },
|
|
11572
|
+
satrushConfig: { value: input.satrushConfig ?? null, isWritable: true }
|
|
11573
|
+
};
|
|
11574
|
+
const accounts = originalAccounts;
|
|
11575
|
+
const args = { ...input };
|
|
11576
|
+
const getAccountMeta = getAccountMetaFactory39(programAddress, "programId");
|
|
11577
|
+
return Object.freeze({
|
|
11578
|
+
accounts: [
|
|
11579
|
+
getAccountMeta("authority", accounts.authority),
|
|
11580
|
+
getAccountMeta("satrushConfig", accounts.satrushConfig)
|
|
11581
|
+
],
|
|
11582
|
+
data: getUpdateUnclaimedHashrateBpsInstructionDataEncoder().encode(
|
|
11583
|
+
args
|
|
11584
|
+
),
|
|
11585
|
+
programAddress
|
|
11586
|
+
});
|
|
11587
|
+
}
|
|
11588
|
+
function parseUpdateUnclaimedHashrateBpsInstruction(instruction) {
|
|
11589
|
+
if (instruction.accounts.length < 2) {
|
|
11590
|
+
throw new SolanaError39(
|
|
11591
|
+
SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS39,
|
|
11592
|
+
{
|
|
11593
|
+
actualAccountMetas: instruction.accounts.length,
|
|
11594
|
+
expectedAccountMetas: 2
|
|
11595
|
+
}
|
|
11596
|
+
);
|
|
11597
|
+
}
|
|
11598
|
+
let accountIndex = 0;
|
|
11599
|
+
const getNextAccount = () => {
|
|
11600
|
+
const accountMeta = instruction.accounts[accountIndex];
|
|
11601
|
+
accountIndex += 1;
|
|
11602
|
+
return accountMeta;
|
|
11603
|
+
};
|
|
11604
|
+
return {
|
|
11605
|
+
programAddress: instruction.programAddress,
|
|
11606
|
+
accounts: { authority: getNextAccount(), satrushConfig: getNextAccount() },
|
|
11607
|
+
data: getUpdateUnclaimedHashrateBpsInstructionDataDecoder().decode(
|
|
11608
|
+
instruction.data
|
|
11609
|
+
)
|
|
11610
|
+
};
|
|
11611
|
+
}
|
|
11612
|
+
|
|
11613
|
+
// src/generated/instructions/withdrawProtocolFees.ts
|
|
11614
|
+
import {
|
|
11615
|
+
combineCodec as combineCodec72,
|
|
11616
|
+
fixDecoderSize as fixDecoderSize55,
|
|
11617
|
+
fixEncoderSize as fixEncoderSize65,
|
|
11618
|
+
getAddressEncoder as getAddressEncoder40,
|
|
11619
|
+
getBytesDecoder as getBytesDecoder55,
|
|
11620
|
+
getBytesEncoder as getBytesEncoder77,
|
|
11621
|
+
getProgramDerivedAddress as getProgramDerivedAddress34,
|
|
11622
|
+
getStructDecoder as getStructDecoder68,
|
|
11623
|
+
getStructEncoder as getStructEncoder68,
|
|
11624
|
+
SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS as SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS40,
|
|
11625
|
+
SolanaError as SolanaError40,
|
|
11626
|
+
transformEncoder as transformEncoder55
|
|
11627
|
+
} from "@solana/kit";
|
|
11628
|
+
import {
|
|
11629
|
+
getAccountMetaFactory as getAccountMetaFactory40,
|
|
11508
11630
|
getAddressFromResolvedInstructionAccount as getAddressFromResolvedInstructionAccount24
|
|
11509
11631
|
} from "@solana/program-client-core";
|
|
11510
11632
|
var WITHDRAW_PROTOCOL_FEES_DISCRIMINATOR = new Uint8Array([11, 68, 165, 98, 18, 208, 134, 73]);
|
|
11511
11633
|
function getWithdrawProtocolFeesDiscriminatorBytes() {
|
|
11512
|
-
return
|
|
11634
|
+
return fixEncoderSize65(getBytesEncoder77(), 8).encode(
|
|
11513
11635
|
WITHDRAW_PROTOCOL_FEES_DISCRIMINATOR
|
|
11514
11636
|
);
|
|
11515
11637
|
}
|
|
11516
11638
|
function getWithdrawProtocolFeesInstructionDataEncoder() {
|
|
11517
|
-
return
|
|
11518
|
-
|
|
11639
|
+
return transformEncoder55(
|
|
11640
|
+
getStructEncoder68([["discriminator", fixEncoderSize65(getBytesEncoder77(), 8)]]),
|
|
11519
11641
|
(value) => ({ ...value, discriminator: WITHDRAW_PROTOCOL_FEES_DISCRIMINATOR })
|
|
11520
11642
|
);
|
|
11521
11643
|
}
|
|
11522
11644
|
function getWithdrawProtocolFeesInstructionDataDecoder() {
|
|
11523
|
-
return
|
|
11524
|
-
["discriminator",
|
|
11645
|
+
return getStructDecoder68([
|
|
11646
|
+
["discriminator", fixDecoderSize55(getBytesDecoder55(), 8)]
|
|
11525
11647
|
]);
|
|
11526
11648
|
}
|
|
11527
11649
|
function getWithdrawProtocolFeesInstructionDataCodec() {
|
|
11528
|
-
return
|
|
11650
|
+
return combineCodec72(
|
|
11529
11651
|
getWithdrawProtocolFeesInstructionDataEncoder(),
|
|
11530
11652
|
getWithdrawProtocolFeesInstructionDataDecoder()
|
|
11531
11653
|
);
|
|
@@ -11573,7 +11695,7 @@ async function getWithdrawProtocolFeesInstructionAsync(input, config) {
|
|
|
11573
11695
|
accounts.treasury.value
|
|
11574
11696
|
)
|
|
11575
11697
|
),
|
|
11576
|
-
|
|
11698
|
+
getBytesEncoder77().encode(
|
|
11577
11699
|
new Uint8Array([
|
|
11578
11700
|
6,
|
|
11579
11701
|
221,
|
|
@@ -11628,7 +11750,7 @@ async function getWithdrawProtocolFeesInstructionAsync(input, config) {
|
|
|
11628
11750
|
accounts.treasury.value
|
|
11629
11751
|
)
|
|
11630
11752
|
),
|
|
11631
|
-
|
|
11753
|
+
getBytesEncoder77().encode(
|
|
11632
11754
|
new Uint8Array([
|
|
11633
11755
|
6,
|
|
11634
11756
|
221,
|
|
@@ -11683,7 +11805,7 @@ async function getWithdrawProtocolFeesInstructionAsync(input, config) {
|
|
|
11683
11805
|
accounts.feeRecipient.value
|
|
11684
11806
|
)
|
|
11685
11807
|
),
|
|
11686
|
-
|
|
11808
|
+
getBytesEncoder77().encode(
|
|
11687
11809
|
new Uint8Array([
|
|
11688
11810
|
6,
|
|
11689
11811
|
221,
|
|
@@ -11738,7 +11860,7 @@ async function getWithdrawProtocolFeesInstructionAsync(input, config) {
|
|
|
11738
11860
|
accounts.feeRecipient.value
|
|
11739
11861
|
)
|
|
11740
11862
|
),
|
|
11741
|
-
|
|
11863
|
+
getBytesEncoder77().encode(
|
|
11742
11864
|
new Uint8Array([
|
|
11743
11865
|
6,
|
|
11744
11866
|
221,
|
|
@@ -11792,7 +11914,7 @@ async function getWithdrawProtocolFeesInstructionAsync(input, config) {
|
|
|
11792
11914
|
if (!accounts.systemProgram.value) {
|
|
11793
11915
|
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
11794
11916
|
}
|
|
11795
|
-
const getAccountMeta =
|
|
11917
|
+
const getAccountMeta = getAccountMetaFactory40(programAddress, "programId");
|
|
11796
11918
|
return Object.freeze({
|
|
11797
11919
|
accounts: [
|
|
11798
11920
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -11849,7 +11971,7 @@ function getWithdrawProtocolFeesInstruction(input, config) {
|
|
|
11849
11971
|
if (!accounts.systemProgram.value) {
|
|
11850
11972
|
accounts.systemProgram.value = "11111111111111111111111111111111";
|
|
11851
11973
|
}
|
|
11852
|
-
const getAccountMeta =
|
|
11974
|
+
const getAccountMeta = getAccountMetaFactory40(programAddress, "programId");
|
|
11853
11975
|
return Object.freeze({
|
|
11854
11976
|
accounts: [
|
|
11855
11977
|
getAccountMeta("authority", accounts.authority),
|
|
@@ -11872,8 +11994,8 @@ function getWithdrawProtocolFeesInstruction(input, config) {
|
|
|
11872
11994
|
}
|
|
11873
11995
|
function parseWithdrawProtocolFeesInstruction(instruction) {
|
|
11874
11996
|
if (instruction.accounts.length < 13) {
|
|
11875
|
-
throw new
|
|
11876
|
-
|
|
11997
|
+
throw new SolanaError40(
|
|
11998
|
+
SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS40,
|
|
11877
11999
|
{
|
|
11878
12000
|
actualAccountMetas: instruction.accounts.length,
|
|
11879
12001
|
expectedAccountMetas: 13
|
|
@@ -11933,7 +12055,7 @@ function identifySatrushAccount(account) {
|
|
|
11933
12055
|
const data = "data" in account ? account.data : account;
|
|
11934
12056
|
if (containsBytes(
|
|
11935
12057
|
data,
|
|
11936
|
-
|
|
12058
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
11937
12059
|
new Uint8Array([79, 48, 160, 63, 153, 132, 240, 56])
|
|
11938
12060
|
),
|
|
11939
12061
|
0
|
|
@@ -11942,7 +12064,7 @@ function identifySatrushAccount(account) {
|
|
|
11942
12064
|
}
|
|
11943
12065
|
if (containsBytes(
|
|
11944
12066
|
data,
|
|
11945
|
-
|
|
12067
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
11946
12068
|
new Uint8Array([100, 209, 6, 66, 115, 53, 132, 9])
|
|
11947
12069
|
),
|
|
11948
12070
|
0
|
|
@@ -11951,7 +12073,7 @@ function identifySatrushAccount(account) {
|
|
|
11951
12073
|
}
|
|
11952
12074
|
if (containsBytes(
|
|
11953
12075
|
data,
|
|
11954
|
-
|
|
12076
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
11955
12077
|
new Uint8Array([75, 243, 246, 41, 173, 130, 196, 91])
|
|
11956
12078
|
),
|
|
11957
12079
|
0
|
|
@@ -11960,7 +12082,7 @@ function identifySatrushAccount(account) {
|
|
|
11960
12082
|
}
|
|
11961
12083
|
if (containsBytes(
|
|
11962
12084
|
data,
|
|
11963
|
-
|
|
12085
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
11964
12086
|
new Uint8Array([116, 108, 198, 176, 193, 190, 91, 125])
|
|
11965
12087
|
),
|
|
11966
12088
|
0
|
|
@@ -11969,7 +12091,7 @@ function identifySatrushAccount(account) {
|
|
|
11969
12091
|
}
|
|
11970
12092
|
if (containsBytes(
|
|
11971
12093
|
data,
|
|
11972
|
-
|
|
12094
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
11973
12095
|
new Uint8Array([121, 238, 146, 107, 234, 24, 227, 31])
|
|
11974
12096
|
),
|
|
11975
12097
|
0
|
|
@@ -11978,7 +12100,7 @@ function identifySatrushAccount(account) {
|
|
|
11978
12100
|
}
|
|
11979
12101
|
if (containsBytes(
|
|
11980
12102
|
data,
|
|
11981
|
-
|
|
12103
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
11982
12104
|
new Uint8Array([223, 113, 15, 54, 123, 122, 140, 100])
|
|
11983
12105
|
),
|
|
11984
12106
|
0
|
|
@@ -11987,7 +12109,7 @@ function identifySatrushAccount(account) {
|
|
|
11987
12109
|
}
|
|
11988
12110
|
if (containsBytes(
|
|
11989
12111
|
data,
|
|
11990
|
-
|
|
12112
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
11991
12113
|
new Uint8Array([134, 90, 53, 34, 240, 221, 175, 212])
|
|
11992
12114
|
),
|
|
11993
12115
|
0
|
|
@@ -11996,7 +12118,7 @@ function identifySatrushAccount(account) {
|
|
|
11996
12118
|
}
|
|
11997
12119
|
if (containsBytes(
|
|
11998
12120
|
data,
|
|
11999
|
-
|
|
12121
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12000
12122
|
new Uint8Array([255, 64, 185, 130, 97, 37, 230, 219])
|
|
12001
12123
|
),
|
|
12002
12124
|
0
|
|
@@ -12005,7 +12127,7 @@ function identifySatrushAccount(account) {
|
|
|
12005
12127
|
}
|
|
12006
12128
|
if (containsBytes(
|
|
12007
12129
|
data,
|
|
12008
|
-
|
|
12130
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12009
12131
|
new Uint8Array([190, 205, 75, 222, 220, 249, 43, 126])
|
|
12010
12132
|
),
|
|
12011
12133
|
0
|
|
@@ -12014,7 +12136,7 @@ function identifySatrushAccount(account) {
|
|
|
12014
12136
|
}
|
|
12015
12137
|
if (containsBytes(
|
|
12016
12138
|
data,
|
|
12017
|
-
|
|
12139
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12018
12140
|
new Uint8Array([16, 128, 211, 70, 213, 109, 108, 216])
|
|
12019
12141
|
),
|
|
12020
12142
|
0
|
|
@@ -12023,7 +12145,7 @@ function identifySatrushAccount(account) {
|
|
|
12023
12145
|
}
|
|
12024
12146
|
if (containsBytes(
|
|
12025
12147
|
data,
|
|
12026
|
-
|
|
12148
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12027
12149
|
new Uint8Array([209, 64, 180, 169, 40, 181, 110, 236])
|
|
12028
12150
|
),
|
|
12029
12151
|
0
|
|
@@ -12032,7 +12154,7 @@ function identifySatrushAccount(account) {
|
|
|
12032
12154
|
}
|
|
12033
12155
|
if (containsBytes(
|
|
12034
12156
|
data,
|
|
12035
|
-
|
|
12157
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12036
12158
|
new Uint8Array([87, 127, 165, 51, 73, 78, 116, 174])
|
|
12037
12159
|
),
|
|
12038
12160
|
0
|
|
@@ -12041,7 +12163,7 @@ function identifySatrushAccount(account) {
|
|
|
12041
12163
|
}
|
|
12042
12164
|
if (containsBytes(
|
|
12043
12165
|
data,
|
|
12044
|
-
|
|
12166
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12045
12167
|
new Uint8Array([113, 169, 164, 118, 148, 217, 160, 200])
|
|
12046
12168
|
),
|
|
12047
12169
|
0
|
|
@@ -12050,7 +12172,7 @@ function identifySatrushAccount(account) {
|
|
|
12050
12172
|
}
|
|
12051
12173
|
if (containsBytes(
|
|
12052
12174
|
data,
|
|
12053
|
-
|
|
12175
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12054
12176
|
new Uint8Array([97, 10, 251, 68, 215, 103, 124, 183])
|
|
12055
12177
|
),
|
|
12056
12178
|
0
|
|
@@ -12059,14 +12181,14 @@ function identifySatrushAccount(account) {
|
|
|
12059
12181
|
}
|
|
12060
12182
|
if (containsBytes(
|
|
12061
12183
|
data,
|
|
12062
|
-
|
|
12184
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12063
12185
|
new Uint8Array([238, 239, 123, 238, 89, 1, 168, 253])
|
|
12064
12186
|
),
|
|
12065
12187
|
0
|
|
12066
12188
|
)) {
|
|
12067
12189
|
return 14 /* Treasury */;
|
|
12068
12190
|
}
|
|
12069
|
-
throw new
|
|
12191
|
+
throw new SolanaError41(
|
|
12070
12192
|
SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT,
|
|
12071
12193
|
{ accountData: data, programName: "satrush" }
|
|
12072
12194
|
);
|
|
@@ -12109,15 +12231,16 @@ var SatrushInstruction = /* @__PURE__ */ ((SatrushInstruction2) => {
|
|
|
12109
12231
|
SatrushInstruction2[SatrushInstruction2["UpdateDeploymentSettleGraceDuration"] = 34] = "UpdateDeploymentSettleGraceDuration";
|
|
12110
12232
|
SatrushInstruction2[SatrushInstruction2["UpdateEpochVaultIterationDuration"] = 35] = "UpdateEpochVaultIterationDuration";
|
|
12111
12233
|
SatrushInstruction2[SatrushInstruction2["UpdateMinDeployUsdAmount"] = 36] = "UpdateMinDeployUsdAmount";
|
|
12112
|
-
SatrushInstruction2[SatrushInstruction2["
|
|
12113
|
-
SatrushInstruction2[SatrushInstruction2["
|
|
12234
|
+
SatrushInstruction2[SatrushInstruction2["UpdateStrikeTriggerModulus"] = 37] = "UpdateStrikeTriggerModulus";
|
|
12235
|
+
SatrushInstruction2[SatrushInstruction2["UpdateUnclaimedHashrateBps"] = 38] = "UpdateUnclaimedHashrateBps";
|
|
12236
|
+
SatrushInstruction2[SatrushInstruction2["WithdrawProtocolFees"] = 39] = "WithdrawProtocolFees";
|
|
12114
12237
|
return SatrushInstruction2;
|
|
12115
12238
|
})(SatrushInstruction || {});
|
|
12116
12239
|
function identifySatrushInstruction(instruction) {
|
|
12117
12240
|
const data = "data" in instruction ? instruction.data : instruction;
|
|
12118
12241
|
if (containsBytes(
|
|
12119
12242
|
data,
|
|
12120
|
-
|
|
12243
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12121
12244
|
new Uint8Array([90, 201, 98, 189, 106, 249, 86, 109])
|
|
12122
12245
|
),
|
|
12123
12246
|
0
|
|
@@ -12126,7 +12249,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12126
12249
|
}
|
|
12127
12250
|
if (containsBytes(
|
|
12128
12251
|
data,
|
|
12129
|
-
|
|
12252
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12130
12253
|
new Uint8Array([4, 48, 106, 230, 146, 124, 140, 167])
|
|
12131
12254
|
),
|
|
12132
12255
|
0
|
|
@@ -12135,7 +12258,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12135
12258
|
}
|
|
12136
12259
|
if (containsBytes(
|
|
12137
12260
|
data,
|
|
12138
|
-
|
|
12261
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12139
12262
|
new Uint8Array([87, 135, 14, 43, 190, 79, 45, 212])
|
|
12140
12263
|
),
|
|
12141
12264
|
0
|
|
@@ -12144,7 +12267,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12144
12267
|
}
|
|
12145
12268
|
if (containsBytes(
|
|
12146
12269
|
data,
|
|
12147
|
-
|
|
12270
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12148
12271
|
new Uint8Array([226, 196, 170, 104, 125, 21, 190, 232])
|
|
12149
12272
|
),
|
|
12150
12273
|
0
|
|
@@ -12153,7 +12276,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12153
12276
|
}
|
|
12154
12277
|
if (containsBytes(
|
|
12155
12278
|
data,
|
|
12156
|
-
|
|
12279
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12157
12280
|
new Uint8Array([53, 168, 61, 211, 206, 81, 133, 175])
|
|
12158
12281
|
),
|
|
12159
12282
|
0
|
|
@@ -12162,7 +12285,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12162
12285
|
}
|
|
12163
12286
|
if (containsBytes(
|
|
12164
12287
|
data,
|
|
12165
|
-
|
|
12288
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12166
12289
|
new Uint8Array([196, 77, 168, 181, 6, 119, 249, 154])
|
|
12167
12290
|
),
|
|
12168
12291
|
0
|
|
@@ -12171,7 +12294,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12171
12294
|
}
|
|
12172
12295
|
if (containsBytes(
|
|
12173
12296
|
data,
|
|
12174
|
-
|
|
12297
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12175
12298
|
new Uint8Array([241, 89, 98, 124, 223, 205, 215, 104])
|
|
12176
12299
|
),
|
|
12177
12300
|
0
|
|
@@ -12180,7 +12303,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12180
12303
|
}
|
|
12181
12304
|
if (containsBytes(
|
|
12182
12305
|
data,
|
|
12183
|
-
|
|
12306
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12184
12307
|
new Uint8Array([27, 23, 127, 47, 147, 184, 239, 190])
|
|
12185
12308
|
),
|
|
12186
12309
|
0
|
|
@@ -12189,7 +12312,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12189
12312
|
}
|
|
12190
12313
|
if (containsBytes(
|
|
12191
12314
|
data,
|
|
12192
|
-
|
|
12315
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12193
12316
|
new Uint8Array([80, 74, 10, 29, 63, 106, 63, 192])
|
|
12194
12317
|
),
|
|
12195
12318
|
0
|
|
@@ -12198,7 +12321,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12198
12321
|
}
|
|
12199
12322
|
if (containsBytes(
|
|
12200
12323
|
data,
|
|
12201
|
-
|
|
12324
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12202
12325
|
new Uint8Array([11, 123, 237, 176, 25, 240, 59, 135])
|
|
12203
12326
|
),
|
|
12204
12327
|
0
|
|
@@ -12207,7 +12330,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12207
12330
|
}
|
|
12208
12331
|
if (containsBytes(
|
|
12209
12332
|
data,
|
|
12210
|
-
|
|
12333
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12211
12334
|
new Uint8Array([181, 42, 174, 200, 192, 21, 27, 187])
|
|
12212
12335
|
),
|
|
12213
12336
|
0
|
|
@@ -12216,7 +12339,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12216
12339
|
}
|
|
12217
12340
|
if (containsBytes(
|
|
12218
12341
|
data,
|
|
12219
|
-
|
|
12342
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12220
12343
|
new Uint8Array([251, 62, 143, 106, 218, 1, 162, 181])
|
|
12221
12344
|
),
|
|
12222
12345
|
0
|
|
@@ -12225,7 +12348,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12225
12348
|
}
|
|
12226
12349
|
if (containsBytes(
|
|
12227
12350
|
data,
|
|
12228
|
-
|
|
12351
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12229
12352
|
new Uint8Array([149, 14, 81, 88, 230, 226, 234, 37])
|
|
12230
12353
|
),
|
|
12231
12354
|
0
|
|
@@ -12234,7 +12357,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12234
12357
|
}
|
|
12235
12358
|
if (containsBytes(
|
|
12236
12359
|
data,
|
|
12237
|
-
|
|
12360
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12238
12361
|
new Uint8Array([81, 129, 130, 38, 99, 204, 224, 177])
|
|
12239
12362
|
),
|
|
12240
12363
|
0
|
|
@@ -12243,7 +12366,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12243
12366
|
}
|
|
12244
12367
|
if (containsBytes(
|
|
12245
12368
|
data,
|
|
12246
|
-
|
|
12369
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12247
12370
|
new Uint8Array([69, 146, 29, 218, 228, 29, 229, 241])
|
|
12248
12371
|
),
|
|
12249
12372
|
0
|
|
@@ -12252,7 +12375,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12252
12375
|
}
|
|
12253
12376
|
if (containsBytes(
|
|
12254
12377
|
data,
|
|
12255
|
-
|
|
12378
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12256
12379
|
new Uint8Array([156, 160, 69, 94, 108, 6, 145, 211])
|
|
12257
12380
|
),
|
|
12258
12381
|
0
|
|
@@ -12261,7 +12384,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12261
12384
|
}
|
|
12262
12385
|
if (containsBytes(
|
|
12263
12386
|
data,
|
|
12264
|
-
|
|
12387
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12265
12388
|
new Uint8Array([195, 44, 245, 180, 58, 206, 203, 229])
|
|
12266
12389
|
),
|
|
12267
12390
|
0
|
|
@@ -12270,7 +12393,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12270
12393
|
}
|
|
12271
12394
|
if (containsBytes(
|
|
12272
12395
|
data,
|
|
12273
|
-
|
|
12396
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12274
12397
|
new Uint8Array([96, 175, 39, 171, 158, 44, 117, 18])
|
|
12275
12398
|
),
|
|
12276
12399
|
0
|
|
@@ -12279,7 +12402,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12279
12402
|
}
|
|
12280
12403
|
if (containsBytes(
|
|
12281
12404
|
data,
|
|
12282
|
-
|
|
12405
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12283
12406
|
new Uint8Array([159, 29, 126, 216, 29, 240, 141, 61])
|
|
12284
12407
|
),
|
|
12285
12408
|
0
|
|
@@ -12288,7 +12411,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12288
12411
|
}
|
|
12289
12412
|
if (containsBytes(
|
|
12290
12413
|
data,
|
|
12291
|
-
|
|
12414
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12292
12415
|
new Uint8Array([254, 98, 217, 51, 25, 88, 140, 45])
|
|
12293
12416
|
),
|
|
12294
12417
|
0
|
|
@@ -12297,7 +12420,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12297
12420
|
}
|
|
12298
12421
|
if (containsBytes(
|
|
12299
12422
|
data,
|
|
12300
|
-
|
|
12423
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12301
12424
|
new Uint8Array([193, 31, 240, 159, 30, 224, 157, 85])
|
|
12302
12425
|
),
|
|
12303
12426
|
0
|
|
@@ -12306,7 +12429,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12306
12429
|
}
|
|
12307
12430
|
if (containsBytes(
|
|
12308
12431
|
data,
|
|
12309
|
-
|
|
12432
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12310
12433
|
new Uint8Array([212, 191, 100, 136, 18, 213, 42, 72])
|
|
12311
12434
|
),
|
|
12312
12435
|
0
|
|
@@ -12315,7 +12438,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12315
12438
|
}
|
|
12316
12439
|
if (containsBytes(
|
|
12317
12440
|
data,
|
|
12318
|
-
|
|
12441
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12319
12442
|
new Uint8Array([3, 245, 202, 88, 161, 29, 51, 141])
|
|
12320
12443
|
),
|
|
12321
12444
|
0
|
|
@@ -12324,7 +12447,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12324
12447
|
}
|
|
12325
12448
|
if (containsBytes(
|
|
12326
12449
|
data,
|
|
12327
|
-
|
|
12450
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12328
12451
|
new Uint8Array([89, 228, 101, 114, 103, 98, 126, 229])
|
|
12329
12452
|
),
|
|
12330
12453
|
0
|
|
@@ -12333,7 +12456,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12333
12456
|
}
|
|
12334
12457
|
if (containsBytes(
|
|
12335
12458
|
data,
|
|
12336
|
-
|
|
12459
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12337
12460
|
new Uint8Array([222, 36, 211, 175, 4, 220, 2, 251])
|
|
12338
12461
|
),
|
|
12339
12462
|
0
|
|
@@ -12342,7 +12465,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12342
12465
|
}
|
|
12343
12466
|
if (containsBytes(
|
|
12344
12467
|
data,
|
|
12345
|
-
|
|
12468
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12346
12469
|
new Uint8Array([249, 111, 122, 103, 93, 86, 76, 198])
|
|
12347
12470
|
),
|
|
12348
12471
|
0
|
|
@@ -12351,7 +12474,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12351
12474
|
}
|
|
12352
12475
|
if (containsBytes(
|
|
12353
12476
|
data,
|
|
12354
|
-
|
|
12477
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12355
12478
|
new Uint8Array([82, 124, 95, 215, 213, 107, 134, 122])
|
|
12356
12479
|
),
|
|
12357
12480
|
0
|
|
@@ -12360,7 +12483,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12360
12483
|
}
|
|
12361
12484
|
if (containsBytes(
|
|
12362
12485
|
data,
|
|
12363
|
-
|
|
12486
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12364
12487
|
new Uint8Array([61, 147, 13, 247, 164, 34, 14, 57])
|
|
12365
12488
|
),
|
|
12366
12489
|
0
|
|
@@ -12369,7 +12492,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12369
12492
|
}
|
|
12370
12493
|
if (containsBytes(
|
|
12371
12494
|
data,
|
|
12372
|
-
|
|
12495
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12373
12496
|
new Uint8Array([86, 168, 42, 98, 2, 164, 250, 185])
|
|
12374
12497
|
),
|
|
12375
12498
|
0
|
|
@@ -12378,7 +12501,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12378
12501
|
}
|
|
12379
12502
|
if (containsBytes(
|
|
12380
12503
|
data,
|
|
12381
|
-
|
|
12504
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12382
12505
|
new Uint8Array([129, 112, 9, 43, 91, 154, 157, 135])
|
|
12383
12506
|
),
|
|
12384
12507
|
0
|
|
@@ -12387,7 +12510,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12387
12510
|
}
|
|
12388
12511
|
if (containsBytes(
|
|
12389
12512
|
data,
|
|
12390
|
-
|
|
12513
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12391
12514
|
new Uint8Array([1, 96, 199, 199, 107, 118, 193, 87])
|
|
12392
12515
|
),
|
|
12393
12516
|
0
|
|
@@ -12396,7 +12519,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12396
12519
|
}
|
|
12397
12520
|
if (containsBytes(
|
|
12398
12521
|
data,
|
|
12399
|
-
|
|
12522
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12400
12523
|
new Uint8Array([93, 12, 139, 55, 235, 88, 37, 117])
|
|
12401
12524
|
),
|
|
12402
12525
|
0
|
|
@@ -12405,7 +12528,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12405
12528
|
}
|
|
12406
12529
|
if (containsBytes(
|
|
12407
12530
|
data,
|
|
12408
|
-
|
|
12531
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12409
12532
|
new Uint8Array([252, 210, 238, 28, 169, 118, 28, 11])
|
|
12410
12533
|
),
|
|
12411
12534
|
0
|
|
@@ -12414,7 +12537,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12414
12537
|
}
|
|
12415
12538
|
if (containsBytes(
|
|
12416
12539
|
data,
|
|
12417
|
-
|
|
12540
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12418
12541
|
new Uint8Array([12, 130, 188, 85, 167, 187, 204, 183])
|
|
12419
12542
|
),
|
|
12420
12543
|
0
|
|
@@ -12423,7 +12546,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12423
12546
|
}
|
|
12424
12547
|
if (containsBytes(
|
|
12425
12548
|
data,
|
|
12426
|
-
|
|
12549
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12427
12550
|
new Uint8Array([2, 212, 246, 89, 139, 64, 104, 74])
|
|
12428
12551
|
),
|
|
12429
12552
|
0
|
|
@@ -12432,7 +12555,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12432
12555
|
}
|
|
12433
12556
|
if (containsBytes(
|
|
12434
12557
|
data,
|
|
12435
|
-
|
|
12558
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12436
12559
|
new Uint8Array([171, 103, 59, 229, 174, 188, 210, 121])
|
|
12437
12560
|
),
|
|
12438
12561
|
0
|
|
@@ -12441,7 +12564,7 @@ function identifySatrushInstruction(instruction) {
|
|
|
12441
12564
|
}
|
|
12442
12565
|
if (containsBytes(
|
|
12443
12566
|
data,
|
|
12444
|
-
|
|
12567
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12445
12568
|
new Uint8Array([187, 108, 89, 178, 249, 101, 187, 33])
|
|
12446
12569
|
),
|
|
12447
12570
|
0
|
|
@@ -12450,23 +12573,32 @@ function identifySatrushInstruction(instruction) {
|
|
|
12450
12573
|
}
|
|
12451
12574
|
if (containsBytes(
|
|
12452
12575
|
data,
|
|
12453
|
-
|
|
12576
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12577
|
+
new Uint8Array([241, 172, 229, 62, 191, 163, 60, 186])
|
|
12578
|
+
),
|
|
12579
|
+
0
|
|
12580
|
+
)) {
|
|
12581
|
+
return 37 /* UpdateStrikeTriggerModulus */;
|
|
12582
|
+
}
|
|
12583
|
+
if (containsBytes(
|
|
12584
|
+
data,
|
|
12585
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12454
12586
|
new Uint8Array([237, 38, 26, 14, 73, 161, 208, 157])
|
|
12455
12587
|
),
|
|
12456
12588
|
0
|
|
12457
12589
|
)) {
|
|
12458
|
-
return
|
|
12590
|
+
return 38 /* UpdateUnclaimedHashrateBps */;
|
|
12459
12591
|
}
|
|
12460
12592
|
if (containsBytes(
|
|
12461
12593
|
data,
|
|
12462
|
-
|
|
12594
|
+
fixEncoderSize66(getBytesEncoder78(), 8).encode(
|
|
12463
12595
|
new Uint8Array([11, 68, 165, 98, 18, 208, 134, 73])
|
|
12464
12596
|
),
|
|
12465
12597
|
0
|
|
12466
12598
|
)) {
|
|
12467
|
-
return
|
|
12599
|
+
return 39 /* WithdrawProtocolFees */;
|
|
12468
12600
|
}
|
|
12469
|
-
throw new
|
|
12601
|
+
throw new SolanaError41(
|
|
12470
12602
|
SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION,
|
|
12471
12603
|
{ instructionData: data, programName: "satrush" }
|
|
12472
12604
|
);
|
|
@@ -12733,22 +12865,29 @@ function parseSatrushInstruction(instruction) {
|
|
|
12733
12865
|
...parseUpdateMinDeployUsdAmountInstruction(instruction)
|
|
12734
12866
|
};
|
|
12735
12867
|
}
|
|
12736
|
-
case 37 /*
|
|
12868
|
+
case 37 /* UpdateStrikeTriggerModulus */: {
|
|
12737
12869
|
assertIsInstructionWithAccounts(instruction);
|
|
12738
12870
|
return {
|
|
12739
|
-
instructionType: 37 /*
|
|
12871
|
+
instructionType: 37 /* UpdateStrikeTriggerModulus */,
|
|
12872
|
+
...parseUpdateStrikeTriggerModulusInstruction(instruction)
|
|
12873
|
+
};
|
|
12874
|
+
}
|
|
12875
|
+
case 38 /* UpdateUnclaimedHashrateBps */: {
|
|
12876
|
+
assertIsInstructionWithAccounts(instruction);
|
|
12877
|
+
return {
|
|
12878
|
+
instructionType: 38 /* UpdateUnclaimedHashrateBps */,
|
|
12740
12879
|
...parseUpdateUnclaimedHashrateBpsInstruction(instruction)
|
|
12741
12880
|
};
|
|
12742
12881
|
}
|
|
12743
|
-
case
|
|
12882
|
+
case 39 /* WithdrawProtocolFees */: {
|
|
12744
12883
|
assertIsInstructionWithAccounts(instruction);
|
|
12745
12884
|
return {
|
|
12746
|
-
instructionType:
|
|
12885
|
+
instructionType: 39 /* WithdrawProtocolFees */,
|
|
12747
12886
|
...parseWithdrawProtocolFeesInstruction(instruction)
|
|
12748
12887
|
};
|
|
12749
12888
|
}
|
|
12750
12889
|
default:
|
|
12751
|
-
throw new
|
|
12890
|
+
throw new SolanaError41(
|
|
12752
12891
|
SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE,
|
|
12753
12892
|
{ instructionType, programName: "satrush" }
|
|
12754
12893
|
);
|
|
@@ -12945,6 +13084,10 @@ function satrushProgram() {
|
|
|
12945
13084
|
client,
|
|
12946
13085
|
getUpdateMinDeployUsdAmountInstructionAsync(input)
|
|
12947
13086
|
),
|
|
13087
|
+
updateStrikeTriggerModulus: (input) => addSelfPlanAndSendFunctions(
|
|
13088
|
+
client,
|
|
13089
|
+
getUpdateStrikeTriggerModulusInstructionAsync(input)
|
|
13090
|
+
),
|
|
12948
13091
|
updateUnclaimedHashrateBps: (input) => addSelfPlanAndSendFunctions(
|
|
12949
13092
|
client,
|
|
12950
13093
|
getUpdateUnclaimedHashrateBpsInstructionAsync(input)
|
|
@@ -13027,6 +13170,8 @@ var SATRUSH_ERROR__INVALID_AUTOMATION_STRATEGY_MASK = 6046;
|
|
|
13027
13170
|
var SATRUSH_ERROR__DEPLOY_AMOUNT_BELOW_MINIMUM = 6047;
|
|
13028
13171
|
var SATRUSH_ERROR__INVALID_EPOCH_ITERATION_DURATION = 6048;
|
|
13029
13172
|
var SATRUSH_ERROR__INVALID_UNCLAIMED_HASHRATE_BPS = 6049;
|
|
13173
|
+
var SATRUSH_ERROR__INVALID_STRIKE_TRIGGER_MODULUS = 6050;
|
|
13174
|
+
var SATRUSH_ERROR__INVALID_SWAP_BPS = 6051;
|
|
13030
13175
|
var satrushErrorMessages;
|
|
13031
13176
|
if (process.env["NODE_ENV"] !== "production") {
|
|
13032
13177
|
satrushErrorMessages = {
|
|
@@ -13059,6 +13204,8 @@ if (process.env["NODE_ENV"] !== "production") {
|
|
|
13059
13204
|
[SATRUSH_ERROR__INVALID_SELECTION_MASK]: `Selection mask must pick between 1 and 21 tiles within the 21-bit range`,
|
|
13060
13205
|
[SATRUSH_ERROR__INVALID_SHARE_AMOUNT]: `Share amount must be greater than zero`,
|
|
13061
13206
|
[SATRUSH_ERROR__INVALID_SLOT_HASH]: `Slot hash entropy is unavailable or invalid`,
|
|
13207
|
+
[SATRUSH_ERROR__INVALID_STRIKE_TRIGGER_MODULUS]: `Strike trigger modulus must be greater than zero`,
|
|
13208
|
+
[SATRUSH_ERROR__INVALID_SWAP_BPS]: `Sats Vault round fee bps plus deploy fee bps must stay below 10_000`,
|
|
13062
13209
|
[SATRUSH_ERROR__INVALID_SWAP_PROGRAM]: `Swap program account does not match the configured swap program`,
|
|
13063
13210
|
[SATRUSH_ERROR__INVALID_TICKETS_COUNT]: `Tickets count must be greater than zero`,
|
|
13064
13211
|
[SATRUSH_ERROR__INVALID_UNCLAIMED_HASHRATE_BPS]: `Unclaimed hashrate bps must not exceed 10_000`,
|
|
@@ -13108,7 +13255,7 @@ import {
|
|
|
13108
13255
|
import {
|
|
13109
13256
|
getAddressEncoder as getAddressEncoder41,
|
|
13110
13257
|
getProgramDerivedAddress as getProgramDerivedAddress35,
|
|
13111
|
-
getU16Encoder as
|
|
13258
|
+
getU16Encoder as getU16Encoder22,
|
|
13112
13259
|
getU32Encoder as getU32Encoder33
|
|
13113
13260
|
} from "@solana/kit";
|
|
13114
13261
|
async function getSatrushConfigAddress() {
|
|
@@ -13185,7 +13332,7 @@ async function getEpochVaultPageAddress(iterationId, pageIndex) {
|
|
|
13185
13332
|
seeds: [
|
|
13186
13333
|
"epoch_vault_page",
|
|
13187
13334
|
getU32Encoder33().encode(iterationId),
|
|
13188
|
-
|
|
13335
|
+
getU16Encoder22().encode(pageIndex)
|
|
13189
13336
|
]
|
|
13190
13337
|
});
|
|
13191
13338
|
}
|
|
@@ -13541,6 +13688,8 @@ export {
|
|
|
13541
13688
|
SATRUSH_ERROR__INVALID_SELECTION_MASK,
|
|
13542
13689
|
SATRUSH_ERROR__INVALID_SHARE_AMOUNT,
|
|
13543
13690
|
SATRUSH_ERROR__INVALID_SLOT_HASH,
|
|
13691
|
+
SATRUSH_ERROR__INVALID_STRIKE_TRIGGER_MODULUS,
|
|
13692
|
+
SATRUSH_ERROR__INVALID_SWAP_BPS,
|
|
13544
13693
|
SATRUSH_ERROR__INVALID_SWAP_PROGRAM,
|
|
13545
13694
|
SATRUSH_ERROR__INVALID_TICKETS_COUNT,
|
|
13546
13695
|
SATRUSH_ERROR__INVALID_UNCLAIMED_HASHRATE_BPS,
|
|
@@ -13584,6 +13733,7 @@ export {
|
|
|
13584
13733
|
UPDATE_DEPLOYMENT_SETTLE_GRACE_DURATION_DISCRIMINATOR,
|
|
13585
13734
|
UPDATE_EPOCH_VAULT_ITERATION_DURATION_DISCRIMINATOR,
|
|
13586
13735
|
UPDATE_MIN_DEPLOY_USD_AMOUNT_DISCRIMINATOR,
|
|
13736
|
+
UPDATE_STRIKE_TRIGGER_MODULUS_DISCRIMINATOR,
|
|
13587
13737
|
UPDATE_UNCLAIMED_HASHRATE_BPS_DISCRIMINATOR,
|
|
13588
13738
|
WITHDRAW_PROTOCOL_FEES_DISCRIMINATOR,
|
|
13589
13739
|
btcToSats,
|
|
@@ -14042,6 +14192,12 @@ export {
|
|
|
14042
14192
|
getUpdateMinDeployUsdAmountInstructionDataCodec,
|
|
14043
14193
|
getUpdateMinDeployUsdAmountInstructionDataDecoder,
|
|
14044
14194
|
getUpdateMinDeployUsdAmountInstructionDataEncoder,
|
|
14195
|
+
getUpdateStrikeTriggerModulusDiscriminatorBytes,
|
|
14196
|
+
getUpdateStrikeTriggerModulusInstruction,
|
|
14197
|
+
getUpdateStrikeTriggerModulusInstructionAsync,
|
|
14198
|
+
getUpdateStrikeTriggerModulusInstructionDataCodec,
|
|
14199
|
+
getUpdateStrikeTriggerModulusInstructionDataDecoder,
|
|
14200
|
+
getUpdateStrikeTriggerModulusInstructionDataEncoder,
|
|
14045
14201
|
getUpdateUnclaimedHashrateBpsDiscriminatorBytes,
|
|
14046
14202
|
getUpdateUnclaimedHashrateBpsInstruction,
|
|
14047
14203
|
getUpdateUnclaimedHashrateBpsInstructionAsync,
|
|
@@ -14100,6 +14256,7 @@ export {
|
|
|
14100
14256
|
parseUpdateDeploymentSettleGraceDurationInstruction,
|
|
14101
14257
|
parseUpdateEpochVaultIterationDurationInstruction,
|
|
14102
14258
|
parseUpdateMinDeployUsdAmountInstruction,
|
|
14259
|
+
parseUpdateStrikeTriggerModulusInstruction,
|
|
14103
14260
|
parseUpdateUnclaimedHashrateBpsInstruction,
|
|
14104
14261
|
parseWithdrawProtocolFeesInstruction,
|
|
14105
14262
|
satrushProgram,
|