@satrush/client 0.1.10 → 0.1.12

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.mjs CHANGED
@@ -49,7 +49,9 @@ function getBoardEncoder() {
49
49
  ["strikeUsdAmount", getU64Encoder()],
50
50
  ["strikeBtcAmount", getU64Encoder()],
51
51
  ["strikeLastTriggerRoundId", getU32Encoder()],
52
- ["reserved", fixEncoderSize(getBytesEncoder(), 30)]
52
+ ["strikeReserveUsdAmount", getU64Encoder()],
53
+ ["strikeReserveBtcAmount", getU64Encoder()],
54
+ ["reserved", fixEncoderSize(getBytesEncoder(), 14)]
53
55
  ]),
54
56
  (value) => ({ ...value, discriminator: BOARD_DISCRIMINATOR })
55
57
  );
@@ -67,7 +69,9 @@ function getBoardDecoder() {
67
69
  ["strikeUsdAmount", getU64Decoder()],
68
70
  ["strikeBtcAmount", getU64Decoder()],
69
71
  ["strikeLastTriggerRoundId", getU32Decoder()],
70
- ["reserved", fixDecoderSize(getBytesDecoder(), 30)]
72
+ ["strikeReserveUsdAmount", getU64Decoder()],
73
+ ["strikeReserveBtcAmount", getU64Decoder()],
74
+ ["reserved", fixDecoderSize(getBytesDecoder(), 14)]
71
75
  ]);
72
76
  }
73
77
  function getBoardCodec() {
@@ -886,6 +890,12 @@ function getRoundRevealedEncoder() {
886
890
  ["isStrikeTriggered", getBooleanEncoder3()],
887
891
  ["strikeBonusUsd", getU64Encoder12()],
888
892
  ["strikeBonusBtc", getU64Encoder12()],
893
+ ["strikeEpochUsd", getU64Encoder12()],
894
+ ["strikeEpochBtc", getU64Encoder12()],
895
+ ["strikeReserveUsd", getU64Encoder12()],
896
+ ["strikeReserveBtc", getU64Encoder12()],
897
+ ["strikeSeedFromReserveUsd", getU64Encoder12()],
898
+ ["strikeSeedFromReserveBtc", getU64Encoder12()],
889
899
  ["epochFeeUsdAmount", getU64Encoder12()],
890
900
  ["oneBtcFeeUsdAmount", getU64Encoder12()],
891
901
  ["protocolFeeUsdAmount", getU64Encoder12()]
@@ -907,6 +917,12 @@ function getRoundRevealedDecoder() {
907
917
  ["isStrikeTriggered", getBooleanDecoder3()],
908
918
  ["strikeBonusUsd", getU64Decoder12()],
909
919
  ["strikeBonusBtc", getU64Decoder12()],
920
+ ["strikeEpochUsd", getU64Decoder12()],
921
+ ["strikeEpochBtc", getU64Decoder12()],
922
+ ["strikeReserveUsd", getU64Decoder12()],
923
+ ["strikeReserveBtc", getU64Decoder12()],
924
+ ["strikeSeedFromReserveUsd", getU64Decoder12()],
925
+ ["strikeSeedFromReserveBtc", getU64Decoder12()],
910
926
  ["epochFeeUsdAmount", getU64Decoder12()],
911
927
  ["oneBtcFeeUsdAmount", getU64Decoder12()],
912
928
  ["protocolFeeUsdAmount", getU64Decoder12()]
@@ -1948,6 +1964,8 @@ import {
1948
1964
  fixEncoderSize as fixEncoderSize22,
1949
1965
  getArrayDecoder as getArrayDecoder3,
1950
1966
  getArrayEncoder as getArrayEncoder3,
1967
+ getBooleanDecoder as getBooleanDecoder7,
1968
+ getBooleanEncoder as getBooleanEncoder7,
1951
1969
  getBytesDecoder as getBytesDecoder12,
1952
1970
  getBytesEncoder as getBytesEncoder22,
1953
1971
  getOptionDecoder as getOptionDecoder2,
@@ -2006,7 +2024,8 @@ function getRoundEncoder() {
2006
2024
  ["pendingEpochFeeUsdAmount", getU64Encoder25()],
2007
2025
  ["pendingOneBtcFeeUsdAmount", getU64Encoder25()],
2008
2026
  ["pendingProtocolFeeUsdAmount", getU64Encoder25()],
2009
- ["reserved", fixEncoderSize22(getBytesEncoder22(), 40)]
2027
+ ["isHashrateBoosted", getBooleanEncoder7()],
2028
+ ["reserved", fixEncoderSize22(getBytesEncoder22(), 39)]
2010
2029
  ]),
2011
2030
  (value) => ({ ...value, discriminator: ROUND_DISCRIMINATOR })
2012
2031
  );
@@ -2036,7 +2055,8 @@ function getRoundDecoder() {
2036
2055
  ["pendingEpochFeeUsdAmount", getU64Decoder25()],
2037
2056
  ["pendingOneBtcFeeUsdAmount", getU64Decoder25()],
2038
2057
  ["pendingProtocolFeeUsdAmount", getU64Decoder25()],
2039
- ["reserved", fixDecoderSize12(getBytesDecoder12(), 40)]
2058
+ ["isHashrateBoosted", getBooleanDecoder7()],
2059
+ ["reserved", fixDecoderSize12(getBytesDecoder12(), 39)]
2040
2060
  ]);
2041
2061
  }
2042
2062
  function getRoundCodec() {
@@ -2386,12 +2406,12 @@ import {
2386
2406
  assertIsInstructionWithAccounts,
2387
2407
  containsBytes,
2388
2408
  extendClient,
2389
- fixEncoderSize as fixEncoderSize66,
2390
- getBytesEncoder as getBytesEncoder78,
2409
+ fixEncoderSize as fixEncoderSize67,
2410
+ getBytesEncoder as getBytesEncoder79,
2391
2411
  SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT,
2392
2412
  SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION,
2393
2413
  SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE,
2394
- SolanaError as SolanaError41
2414
+ SolanaError as SolanaError42
2395
2415
  } from "@solana/kit";
2396
2416
  import {
2397
2417
  addSelfFetchFunctions,
@@ -3829,18 +3849,20 @@ async function getClaimOneBtcRewardInstructionAsync(input, config) {
3829
3849
  const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
3830
3850
  const originalAccounts = {
3831
3851
  authority: { value: input.authority ?? null, isWritable: true },
3852
+ satrushConfig: { value: input.satrushConfig ?? null, isWritable: false },
3832
3853
  oneBtcVault: { value: input.oneBtcVault ?? null, isWritable: true },
3833
3854
  oneBtcVaultIteration: {
3834
3855
  value: input.oneBtcVaultIteration ?? null,
3835
3856
  isWritable: true
3836
3857
  },
3837
3858
  ticket: { value: input.ticket ?? null, isWritable: false },
3859
+ winner: { value: input.winner ?? null, isWritable: false },
3838
3860
  btcMint: { value: input.btcMint ?? null, isWritable: false },
3839
3861
  oneBtcVaultBtcAta: {
3840
3862
  value: input.oneBtcVaultBtcAta ?? null,
3841
3863
  isWritable: true
3842
3864
  },
3843
- authorityBtcAta: { value: input.authorityBtcAta ?? null, isWritable: true },
3865
+ winnerBtcAta: { value: input.winnerBtcAta ?? null, isWritable: true },
3844
3866
  tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
3845
3867
  associatedTokenProgram: {
3846
3868
  value: input.associatedTokenProgram ?? null,
@@ -3849,6 +3871,9 @@ async function getClaimOneBtcRewardInstructionAsync(input, config) {
3849
3871
  systemProgram: { value: input.systemProgram ?? null, isWritable: false }
3850
3872
  };
3851
3873
  const accounts = originalAccounts;
3874
+ if (!accounts.satrushConfig.value) {
3875
+ accounts.satrushConfig.value = await findSatrushConfigPda();
3876
+ }
3852
3877
  if (!accounts.oneBtcVault.value) {
3853
3878
  accounts.oneBtcVault.value = await findOneBtcVaultPda();
3854
3879
  }
@@ -3907,14 +3932,14 @@ async function getClaimOneBtcRewardInstructionAsync(input, config) {
3907
3932
  ]
3908
3933
  });
3909
3934
  }
3910
- if (!accounts.authorityBtcAta.value) {
3911
- accounts.authorityBtcAta.value = await getProgramDerivedAddress15({
3935
+ if (!accounts.winnerBtcAta.value) {
3936
+ accounts.winnerBtcAta.value = await getProgramDerivedAddress15({
3912
3937
  programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
3913
3938
  seeds: [
3914
3939
  getAddressEncoder20().encode(
3915
3940
  getAddressFromResolvedInstructionAccount5(
3916
- "authority",
3917
- accounts.authority.value
3941
+ "winner",
3942
+ accounts.winner.value
3918
3943
  )
3919
3944
  ),
3920
3945
  getBytesEncoder42().encode(
@@ -3975,12 +4000,14 @@ async function getClaimOneBtcRewardInstructionAsync(input, config) {
3975
4000
  return Object.freeze({
3976
4001
  accounts: [
3977
4002
  getAccountMeta("authority", accounts.authority),
4003
+ getAccountMeta("satrushConfig", accounts.satrushConfig),
3978
4004
  getAccountMeta("oneBtcVault", accounts.oneBtcVault),
3979
4005
  getAccountMeta("oneBtcVaultIteration", accounts.oneBtcVaultIteration),
3980
4006
  getAccountMeta("ticket", accounts.ticket),
4007
+ getAccountMeta("winner", accounts.winner),
3981
4008
  getAccountMeta("btcMint", accounts.btcMint),
3982
4009
  getAccountMeta("oneBtcVaultBtcAta", accounts.oneBtcVaultBtcAta),
3983
- getAccountMeta("authorityBtcAta", accounts.authorityBtcAta),
4010
+ getAccountMeta("winnerBtcAta", accounts.winnerBtcAta),
3984
4011
  getAccountMeta("tokenProgram", accounts.tokenProgram),
3985
4012
  getAccountMeta("associatedTokenProgram", accounts.associatedTokenProgram),
3986
4013
  getAccountMeta("systemProgram", accounts.systemProgram)
@@ -3993,18 +4020,20 @@ function getClaimOneBtcRewardInstruction(input, config) {
3993
4020
  const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
3994
4021
  const originalAccounts = {
3995
4022
  authority: { value: input.authority ?? null, isWritable: true },
4023
+ satrushConfig: { value: input.satrushConfig ?? null, isWritable: false },
3996
4024
  oneBtcVault: { value: input.oneBtcVault ?? null, isWritable: true },
3997
4025
  oneBtcVaultIteration: {
3998
4026
  value: input.oneBtcVaultIteration ?? null,
3999
4027
  isWritable: true
4000
4028
  },
4001
4029
  ticket: { value: input.ticket ?? null, isWritable: false },
4030
+ winner: { value: input.winner ?? null, isWritable: false },
4002
4031
  btcMint: { value: input.btcMint ?? null, isWritable: false },
4003
4032
  oneBtcVaultBtcAta: {
4004
4033
  value: input.oneBtcVaultBtcAta ?? null,
4005
4034
  isWritable: true
4006
4035
  },
4007
- authorityBtcAta: { value: input.authorityBtcAta ?? null, isWritable: true },
4036
+ winnerBtcAta: { value: input.winnerBtcAta ?? null, isWritable: true },
4008
4037
  tokenProgram: { value: input.tokenProgram ?? null, isWritable: false },
4009
4038
  associatedTokenProgram: {
4010
4039
  value: input.associatedTokenProgram ?? null,
@@ -4026,12 +4055,14 @@ function getClaimOneBtcRewardInstruction(input, config) {
4026
4055
  return Object.freeze({
4027
4056
  accounts: [
4028
4057
  getAccountMeta("authority", accounts.authority),
4058
+ getAccountMeta("satrushConfig", accounts.satrushConfig),
4029
4059
  getAccountMeta("oneBtcVault", accounts.oneBtcVault),
4030
4060
  getAccountMeta("oneBtcVaultIteration", accounts.oneBtcVaultIteration),
4031
4061
  getAccountMeta("ticket", accounts.ticket),
4062
+ getAccountMeta("winner", accounts.winner),
4032
4063
  getAccountMeta("btcMint", accounts.btcMint),
4033
4064
  getAccountMeta("oneBtcVaultBtcAta", accounts.oneBtcVaultBtcAta),
4034
- getAccountMeta("authorityBtcAta", accounts.authorityBtcAta),
4065
+ getAccountMeta("winnerBtcAta", accounts.winnerBtcAta),
4035
4066
  getAccountMeta("tokenProgram", accounts.tokenProgram),
4036
4067
  getAccountMeta("associatedTokenProgram", accounts.associatedTokenProgram),
4037
4068
  getAccountMeta("systemProgram", accounts.systemProgram)
@@ -4041,12 +4072,12 @@ function getClaimOneBtcRewardInstruction(input, config) {
4041
4072
  });
4042
4073
  }
4043
4074
  function parseClaimOneBtcRewardInstruction(instruction) {
4044
- if (instruction.accounts.length < 10) {
4075
+ if (instruction.accounts.length < 12) {
4045
4076
  throw new SolanaError5(
4046
4077
  SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS5,
4047
4078
  {
4048
4079
  actualAccountMetas: instruction.accounts.length,
4049
- expectedAccountMetas: 10
4080
+ expectedAccountMetas: 12
4050
4081
  }
4051
4082
  );
4052
4083
  }
@@ -4060,12 +4091,14 @@ function parseClaimOneBtcRewardInstruction(instruction) {
4060
4091
  programAddress: instruction.programAddress,
4061
4092
  accounts: {
4062
4093
  authority: getNextAccount(),
4094
+ satrushConfig: getNextAccount(),
4063
4095
  oneBtcVault: getNextAccount(),
4064
4096
  oneBtcVaultIteration: getNextAccount(),
4065
4097
  ticket: getNextAccount(),
4098
+ winner: getNextAccount(),
4066
4099
  btcMint: getNextAccount(),
4067
4100
  oneBtcVaultBtcAta: getNextAccount(),
4068
- authorityBtcAta: getNextAccount(),
4101
+ winnerBtcAta: getNextAccount(),
4069
4102
  tokenProgram: getNextAccount(),
4070
4103
  associatedTokenProgram: getNextAccount(),
4071
4104
  systemProgram: getNextAccount()
@@ -4750,7 +4783,8 @@ async function getCloseEpochEntryInstructionAsync(input, config) {
4750
4783
  value: input.epochVaultIteration ?? null,
4751
4784
  isWritable: false
4752
4785
  },
4753
- epochVaultEntry: { value: input.epochVaultEntry ?? null, isWritable: true }
4786
+ epochVaultEntry: { value: input.epochVaultEntry ?? null, isWritable: true },
4787
+ entryOwner: { value: input.entryOwner ?? null, isWritable: true }
4754
4788
  };
4755
4789
  const accounts = originalAccounts;
4756
4790
  if (!accounts.satrushConfig.value) {
@@ -4762,7 +4796,8 @@ async function getCloseEpochEntryInstructionAsync(input, config) {
4762
4796
  getAccountMeta("authority", accounts.authority),
4763
4797
  getAccountMeta("satrushConfig", accounts.satrushConfig),
4764
4798
  getAccountMeta("epochVaultIteration", accounts.epochVaultIteration),
4765
- getAccountMeta("epochVaultEntry", accounts.epochVaultEntry)
4799
+ getAccountMeta("epochVaultEntry", accounts.epochVaultEntry),
4800
+ getAccountMeta("entryOwner", accounts.entryOwner)
4766
4801
  ],
4767
4802
  data: getCloseEpochEntryInstructionDataEncoder().encode({}),
4768
4803
  programAddress
@@ -4777,7 +4812,8 @@ function getCloseEpochEntryInstruction(input, config) {
4777
4812
  value: input.epochVaultIteration ?? null,
4778
4813
  isWritable: false
4779
4814
  },
4780
- epochVaultEntry: { value: input.epochVaultEntry ?? null, isWritable: true }
4815
+ epochVaultEntry: { value: input.epochVaultEntry ?? null, isWritable: true },
4816
+ entryOwner: { value: input.entryOwner ?? null, isWritable: true }
4781
4817
  };
4782
4818
  const accounts = originalAccounts;
4783
4819
  const getAccountMeta = getAccountMetaFactory8(programAddress, "programId");
@@ -4786,19 +4822,20 @@ function getCloseEpochEntryInstruction(input, config) {
4786
4822
  getAccountMeta("authority", accounts.authority),
4787
4823
  getAccountMeta("satrushConfig", accounts.satrushConfig),
4788
4824
  getAccountMeta("epochVaultIteration", accounts.epochVaultIteration),
4789
- getAccountMeta("epochVaultEntry", accounts.epochVaultEntry)
4825
+ getAccountMeta("epochVaultEntry", accounts.epochVaultEntry),
4826
+ getAccountMeta("entryOwner", accounts.entryOwner)
4790
4827
  ],
4791
4828
  data: getCloseEpochEntryInstructionDataEncoder().encode({}),
4792
4829
  programAddress
4793
4830
  });
4794
4831
  }
4795
4832
  function parseCloseEpochEntryInstruction(instruction) {
4796
- if (instruction.accounts.length < 4) {
4833
+ if (instruction.accounts.length < 5) {
4797
4834
  throw new SolanaError8(
4798
4835
  SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS8,
4799
4836
  {
4800
4837
  actualAccountMetas: instruction.accounts.length,
4801
- expectedAccountMetas: 4
4838
+ expectedAccountMetas: 5
4802
4839
  }
4803
4840
  );
4804
4841
  }
@@ -4814,7 +4851,8 @@ function parseCloseEpochEntryInstruction(instruction) {
4814
4851
  authority: getNextAccount(),
4815
4852
  satrushConfig: getNextAccount(),
4816
4853
  epochVaultIteration: getNextAccount(),
4817
- epochVaultEntry: getNextAccount()
4854
+ epochVaultEntry: getNextAccount(),
4855
+ entryOwner: getNextAccount()
4818
4856
  },
4819
4857
  data: getCloseEpochEntryInstructionDataDecoder().decode(instruction.data)
4820
4858
  };
@@ -5210,35 +5248,68 @@ function getCloseOneBtcTicketInstructionDataCodec() {
5210
5248
  getCloseOneBtcTicketInstructionDataDecoder()
5211
5249
  );
5212
5250
  }
5251
+ async function getCloseOneBtcTicketInstructionAsync(input, config) {
5252
+ const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
5253
+ const originalAccounts = {
5254
+ authority: { value: input.authority ?? null, isWritable: true },
5255
+ satrushConfig: { value: input.satrushConfig ?? null, isWritable: false },
5256
+ oneBtcVaultIteration: {
5257
+ value: input.oneBtcVaultIteration ?? null,
5258
+ isWritable: false
5259
+ },
5260
+ ticket: { value: input.ticket ?? null, isWritable: true },
5261
+ ticketOwner: { value: input.ticketOwner ?? null, isWritable: true }
5262
+ };
5263
+ const accounts = originalAccounts;
5264
+ if (!accounts.satrushConfig.value) {
5265
+ accounts.satrushConfig.value = await findSatrushConfigPda();
5266
+ }
5267
+ const getAccountMeta = getAccountMetaFactory12(programAddress, "programId");
5268
+ return Object.freeze({
5269
+ accounts: [
5270
+ getAccountMeta("authority", accounts.authority),
5271
+ getAccountMeta("satrushConfig", accounts.satrushConfig),
5272
+ getAccountMeta("oneBtcVaultIteration", accounts.oneBtcVaultIteration),
5273
+ getAccountMeta("ticket", accounts.ticket),
5274
+ getAccountMeta("ticketOwner", accounts.ticketOwner)
5275
+ ],
5276
+ data: getCloseOneBtcTicketInstructionDataEncoder().encode({}),
5277
+ programAddress
5278
+ });
5279
+ }
5213
5280
  function getCloseOneBtcTicketInstruction(input, config) {
5214
5281
  const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
5215
5282
  const originalAccounts = {
5216
5283
  authority: { value: input.authority ?? null, isWritable: true },
5284
+ satrushConfig: { value: input.satrushConfig ?? null, isWritable: false },
5217
5285
  oneBtcVaultIteration: {
5218
5286
  value: input.oneBtcVaultIteration ?? null,
5219
5287
  isWritable: false
5220
5288
  },
5221
- ticket: { value: input.ticket ?? null, isWritable: true }
5289
+ ticket: { value: input.ticket ?? null, isWritable: true },
5290
+ ticketOwner: { value: input.ticketOwner ?? null, isWritable: true }
5222
5291
  };
5223
5292
  const accounts = originalAccounts;
5224
5293
  const getAccountMeta = getAccountMetaFactory12(programAddress, "programId");
5225
5294
  return Object.freeze({
5226
5295
  accounts: [
5227
5296
  getAccountMeta("authority", accounts.authority),
5297
+ getAccountMeta("satrushConfig", accounts.satrushConfig),
5228
5298
  getAccountMeta("oneBtcVaultIteration", accounts.oneBtcVaultIteration),
5229
- getAccountMeta("ticket", accounts.ticket)
5299
+ getAccountMeta("ticket", accounts.ticket),
5300
+ getAccountMeta("ticketOwner", accounts.ticketOwner)
5230
5301
  ],
5231
5302
  data: getCloseOneBtcTicketInstructionDataEncoder().encode({}),
5232
5303
  programAddress
5233
5304
  });
5234
5305
  }
5235
5306
  function parseCloseOneBtcTicketInstruction(instruction) {
5236
- if (instruction.accounts.length < 3) {
5307
+ if (instruction.accounts.length < 5) {
5237
5308
  throw new SolanaError12(
5238
5309
  SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS12,
5239
5310
  {
5240
5311
  actualAccountMetas: instruction.accounts.length,
5241
- expectedAccountMetas: 3
5312
+ expectedAccountMetas: 5
5242
5313
  }
5243
5314
  );
5244
5315
  }
@@ -5252,8 +5323,10 @@ function parseCloseOneBtcTicketInstruction(instruction) {
5252
5323
  programAddress: instruction.programAddress,
5253
5324
  accounts: {
5254
5325
  authority: getNextAccount(),
5326
+ satrushConfig: getNextAccount(),
5255
5327
  oneBtcVaultIteration: getNextAccount(),
5256
- ticket: getNextAccount()
5328
+ ticket: getNextAccount(),
5329
+ ticketOwner: getNextAccount()
5257
5330
  },
5258
5331
  data: getCloseOneBtcTicketInstructionDataDecoder().decode(instruction.data)
5259
5332
  };
@@ -6612,8 +6685,8 @@ import {
6612
6685
  fixDecoderSize as fixDecoderSize32,
6613
6686
  fixEncoderSize as fixEncoderSize42,
6614
6687
  getAddressEncoder as getAddressEncoder27,
6615
- getBooleanDecoder as getBooleanDecoder7,
6616
- getBooleanEncoder as getBooleanEncoder7,
6688
+ getBooleanDecoder as getBooleanDecoder8,
6689
+ getBooleanEncoder as getBooleanEncoder8,
6617
6690
  getBytesDecoder as getBytesDecoder32,
6618
6691
  getBytesEncoder as getBytesEncoder54,
6619
6692
  getProgramDerivedAddress as getProgramDerivedAddress22,
@@ -6644,7 +6717,7 @@ function getCreatePublicAutomationInstructionDataEncoder() {
6644
6717
  ["strategy", getAutomationStrategyEncoder()],
6645
6718
  ["selectionMask", getU32Encoder24()],
6646
6719
  ["perRoundUsdAmount", getU64Encoder33()],
6647
- ["reload", getBooleanEncoder7()],
6720
+ ["reload", getBooleanEncoder8()],
6648
6721
  ["depositUsdAmount", getU64Encoder33()]
6649
6722
  ]),
6650
6723
  (value) => ({
@@ -6659,7 +6732,7 @@ function getCreatePublicAutomationInstructionDataDecoder() {
6659
6732
  ["strategy", getAutomationStrategyDecoder()],
6660
6733
  ["selectionMask", getU32Decoder24()],
6661
6734
  ["perRoundUsdAmount", getU64Decoder33()],
6662
- ["reload", getBooleanDecoder7()],
6735
+ ["reload", getBooleanDecoder8()],
6663
6736
  ["depositUsdAmount", getU64Decoder33()]
6664
6737
  ]);
6665
6738
  }
@@ -8072,12 +8145,18 @@ async function getRotateRoundInstructionAsync(input, config) {
8072
8145
  currentRound: { value: input.currentRound ?? null, isWritable: true },
8073
8146
  nextRound: { value: input.nextRound ?? null, isWritable: true },
8074
8147
  usdMint: { value: input.usdMint ?? null, isWritable: false },
8148
+ btcMint: { value: input.btcMint ?? null, isWritable: false },
8075
8149
  boardUsdAta: { value: input.boardUsdAta ?? null, isWritable: true },
8150
+ boardBtcAta: { value: input.boardBtcAta ?? null, isWritable: true },
8076
8151
  epochVault: { value: input.epochVault ?? null, isWritable: true },
8077
8152
  epochVaultUsdAta: {
8078
8153
  value: input.epochVaultUsdAta ?? null,
8079
8154
  isWritable: true
8080
8155
  },
8156
+ epochVaultBtcAta: {
8157
+ value: input.epochVaultBtcAta ?? null,
8158
+ isWritable: true
8159
+ },
8081
8160
  oneBtcVault: { value: input.oneBtcVault ?? null, isWritable: true },
8082
8161
  oneBtcVaultUsdAta: {
8083
8162
  value: input.oneBtcVaultUsdAta ?? null,
@@ -8222,61 +8301,6 @@ async function getRotateRoundInstructionAsync(input, config) {
8222
8301
  if (!accounts.oneBtcVault.value) {
8223
8302
  accounts.oneBtcVault.value = await findOneBtcVaultPda();
8224
8303
  }
8225
- if (!accounts.oneBtcVaultUsdAta.value) {
8226
- accounts.oneBtcVaultUsdAta.value = await getProgramDerivedAddress27({
8227
- programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
8228
- seeds: [
8229
- getAddressEncoder33().encode(
8230
- getAddressFromResolvedInstructionAccount17(
8231
- "oneBtcVault",
8232
- accounts.oneBtcVault.value
8233
- )
8234
- ),
8235
- getBytesEncoder60().encode(
8236
- new Uint8Array([
8237
- 6,
8238
- 221,
8239
- 246,
8240
- 225,
8241
- 215,
8242
- 101,
8243
- 161,
8244
- 147,
8245
- 217,
8246
- 203,
8247
- 225,
8248
- 70,
8249
- 206,
8250
- 235,
8251
- 121,
8252
- 172,
8253
- 28,
8254
- 180,
8255
- 133,
8256
- 237,
8257
- 95,
8258
- 91,
8259
- 55,
8260
- 145,
8261
- 58,
8262
- 140,
8263
- 245,
8264
- 133,
8265
- 126,
8266
- 255,
8267
- 0,
8268
- 169
8269
- ])
8270
- ),
8271
- getAddressEncoder33().encode(
8272
- getAddressFromResolvedInstructionAccount17(
8273
- "usdMint",
8274
- accounts.usdMint.value
8275
- )
8276
- )
8277
- ]
8278
- });
8279
- }
8280
8304
  if (!accounts.treasuryUsdAta.value) {
8281
8305
  accounts.treasuryUsdAta.value = await getProgramDerivedAddress27({
8282
8306
  programAddress: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
@@ -8350,9 +8374,12 @@ async function getRotateRoundInstructionAsync(input, config) {
8350
8374
  getAccountMeta("currentRound", accounts.currentRound),
8351
8375
  getAccountMeta("nextRound", accounts.nextRound),
8352
8376
  getAccountMeta("usdMint", accounts.usdMint),
8377
+ getAccountMeta("btcMint", accounts.btcMint),
8353
8378
  getAccountMeta("boardUsdAta", accounts.boardUsdAta),
8379
+ getAccountMeta("boardBtcAta", accounts.boardBtcAta),
8354
8380
  getAccountMeta("epochVault", accounts.epochVault),
8355
8381
  getAccountMeta("epochVaultUsdAta", accounts.epochVaultUsdAta),
8382
+ getAccountMeta("epochVaultBtcAta", accounts.epochVaultBtcAta),
8356
8383
  getAccountMeta("oneBtcVault", accounts.oneBtcVault),
8357
8384
  getAccountMeta("oneBtcVaultUsdAta", accounts.oneBtcVaultUsdAta),
8358
8385
  getAccountMeta("treasury", accounts.treasury),
@@ -8376,12 +8403,18 @@ function getRotateRoundInstruction(input, config) {
8376
8403
  currentRound: { value: input.currentRound ?? null, isWritable: true },
8377
8404
  nextRound: { value: input.nextRound ?? null, isWritable: true },
8378
8405
  usdMint: { value: input.usdMint ?? null, isWritable: false },
8406
+ btcMint: { value: input.btcMint ?? null, isWritable: false },
8379
8407
  boardUsdAta: { value: input.boardUsdAta ?? null, isWritable: true },
8408
+ boardBtcAta: { value: input.boardBtcAta ?? null, isWritable: true },
8380
8409
  epochVault: { value: input.epochVault ?? null, isWritable: true },
8381
8410
  epochVaultUsdAta: {
8382
8411
  value: input.epochVaultUsdAta ?? null,
8383
8412
  isWritable: true
8384
8413
  },
8414
+ epochVaultBtcAta: {
8415
+ value: input.epochVaultBtcAta ?? null,
8416
+ isWritable: true
8417
+ },
8385
8418
  oneBtcVault: { value: input.oneBtcVault ?? null, isWritable: true },
8386
8419
  oneBtcVaultUsdAta: {
8387
8420
  value: input.oneBtcVaultUsdAta ?? null,
@@ -8414,9 +8447,12 @@ function getRotateRoundInstruction(input, config) {
8414
8447
  getAccountMeta("currentRound", accounts.currentRound),
8415
8448
  getAccountMeta("nextRound", accounts.nextRound),
8416
8449
  getAccountMeta("usdMint", accounts.usdMint),
8450
+ getAccountMeta("btcMint", accounts.btcMint),
8417
8451
  getAccountMeta("boardUsdAta", accounts.boardUsdAta),
8452
+ getAccountMeta("boardBtcAta", accounts.boardBtcAta),
8418
8453
  getAccountMeta("epochVault", accounts.epochVault),
8419
8454
  getAccountMeta("epochVaultUsdAta", accounts.epochVaultUsdAta),
8455
+ getAccountMeta("epochVaultBtcAta", accounts.epochVaultBtcAta),
8420
8456
  getAccountMeta("oneBtcVault", accounts.oneBtcVault),
8421
8457
  getAccountMeta("oneBtcVaultUsdAta", accounts.oneBtcVaultUsdAta),
8422
8458
  getAccountMeta("treasury", accounts.treasury),
@@ -8432,12 +8468,12 @@ function getRotateRoundInstruction(input, config) {
8432
8468
  });
8433
8469
  }
8434
8470
  function parseRotateRoundInstruction(instruction) {
8435
- if (instruction.accounts.length < 18) {
8471
+ if (instruction.accounts.length < 21) {
8436
8472
  throw new SolanaError23(
8437
8473
  SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS23,
8438
8474
  {
8439
8475
  actualAccountMetas: instruction.accounts.length,
8440
- expectedAccountMetas: 18
8476
+ expectedAccountMetas: 21
8441
8477
  }
8442
8478
  );
8443
8479
  }
@@ -8456,9 +8492,12 @@ function parseRotateRoundInstruction(instruction) {
8456
8492
  currentRound: getNextAccount(),
8457
8493
  nextRound: getNextAccount(),
8458
8494
  usdMint: getNextAccount(),
8495
+ btcMint: getNextAccount(),
8459
8496
  boardUsdAta: getNextAccount(),
8497
+ boardBtcAta: getNextAccount(),
8460
8498
  epochVault: getNextAccount(),
8461
8499
  epochVaultUsdAta: getNextAccount(),
8500
+ epochVaultBtcAta: getNextAccount(),
8462
8501
  oneBtcVault: getNextAccount(),
8463
8502
  oneBtcVaultUsdAta: getNextAccount(),
8464
8503
  treasury: getNextAccount(),
@@ -11030,7 +11069,7 @@ function parseUpdateBoardRoundDurationInstruction(instruction) {
11030
11069
  };
11031
11070
  }
11032
11071
 
11033
- // src/generated/instructions/updateDeploymentSettleGraceDuration.ts
11072
+ // src/generated/instructions/updateDeployFees.ts
11034
11073
  import {
11035
11074
  combineCodec as combineCodec67,
11036
11075
  fixDecoderSize as fixDecoderSize50,
@@ -11039,8 +11078,8 @@ import {
11039
11078
  getBytesEncoder as getBytesEncoder72,
11040
11079
  getStructDecoder as getStructDecoder63,
11041
11080
  getStructEncoder as getStructEncoder63,
11042
- getU64Decoder as getU64Decoder40,
11043
- getU64Encoder as getU64Encoder40,
11081
+ getU32Decoder as getU32Decoder32,
11082
+ getU32Encoder as getU32Encoder32,
11044
11083
  SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS as SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS35,
11045
11084
  SolanaError as SolanaError35,
11046
11085
  transformEncoder as transformEncoder50
@@ -11048,37 +11087,40 @@ import {
11048
11087
  import {
11049
11088
  getAccountMetaFactory as getAccountMetaFactory35
11050
11089
  } from "@solana/program-client-core";
11051
- var UPDATE_DEPLOYMENT_SETTLE_GRACE_DURATION_DISCRIMINATOR = new Uint8Array([2, 212, 246, 89, 139, 64, 104, 74]);
11052
- function getUpdateDeploymentSettleGraceDurationDiscriminatorBytes() {
11090
+ var UPDATE_DEPLOY_FEES_DISCRIMINATOR = new Uint8Array([0, 170, 26, 215, 156, 171, 22, 68]);
11091
+ function getUpdateDeployFeesDiscriminatorBytes() {
11053
11092
  return fixEncoderSize60(getBytesEncoder72(), 8).encode(
11054
- UPDATE_DEPLOYMENT_SETTLE_GRACE_DURATION_DISCRIMINATOR
11093
+ UPDATE_DEPLOY_FEES_DISCRIMINATOR
11055
11094
  );
11056
11095
  }
11057
- function getUpdateDeploymentSettleGraceDurationInstructionDataEncoder() {
11096
+ function getUpdateDeployFeesInstructionDataEncoder() {
11058
11097
  return transformEncoder50(
11059
11098
  getStructEncoder63([
11060
11099
  ["discriminator", fixEncoderSize60(getBytesEncoder72(), 8)],
11061
- ["newGraceDuration", getU64Encoder40()]
11100
+ ["newStrikeFeeBps", getU32Encoder32()],
11101
+ ["newEpochFeeBps", getU32Encoder32()],
11102
+ ["newOneBtcFeeBps", getU32Encoder32()],
11103
+ ["newProtocolFeeBps", getU32Encoder32()]
11062
11104
  ]),
11063
- (value) => ({
11064
- ...value,
11065
- discriminator: UPDATE_DEPLOYMENT_SETTLE_GRACE_DURATION_DISCRIMINATOR
11066
- })
11105
+ (value) => ({ ...value, discriminator: UPDATE_DEPLOY_FEES_DISCRIMINATOR })
11067
11106
  );
11068
11107
  }
11069
- function getUpdateDeploymentSettleGraceDurationInstructionDataDecoder() {
11108
+ function getUpdateDeployFeesInstructionDataDecoder() {
11070
11109
  return getStructDecoder63([
11071
11110
  ["discriminator", fixDecoderSize50(getBytesDecoder50(), 8)],
11072
- ["newGraceDuration", getU64Decoder40()]
11111
+ ["newStrikeFeeBps", getU32Decoder32()],
11112
+ ["newEpochFeeBps", getU32Decoder32()],
11113
+ ["newOneBtcFeeBps", getU32Decoder32()],
11114
+ ["newProtocolFeeBps", getU32Decoder32()]
11073
11115
  ]);
11074
11116
  }
11075
- function getUpdateDeploymentSettleGraceDurationInstructionDataCodec() {
11117
+ function getUpdateDeployFeesInstructionDataCodec() {
11076
11118
  return combineCodec67(
11077
- getUpdateDeploymentSettleGraceDurationInstructionDataEncoder(),
11078
- getUpdateDeploymentSettleGraceDurationInstructionDataDecoder()
11119
+ getUpdateDeployFeesInstructionDataEncoder(),
11120
+ getUpdateDeployFeesInstructionDataDecoder()
11079
11121
  );
11080
11122
  }
11081
- async function getUpdateDeploymentSettleGraceDurationInstructionAsync(input, config) {
11123
+ async function getUpdateDeployFeesInstructionAsync(input, config) {
11082
11124
  const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
11083
11125
  const originalAccounts = {
11084
11126
  authority: { value: input.authority ?? null, isWritable: false },
@@ -11095,13 +11137,13 @@ async function getUpdateDeploymentSettleGraceDurationInstructionAsync(input, con
11095
11137
  getAccountMeta("authority", accounts.authority),
11096
11138
  getAccountMeta("satrushConfig", accounts.satrushConfig)
11097
11139
  ],
11098
- data: getUpdateDeploymentSettleGraceDurationInstructionDataEncoder().encode(
11140
+ data: getUpdateDeployFeesInstructionDataEncoder().encode(
11099
11141
  args
11100
11142
  ),
11101
11143
  programAddress
11102
11144
  });
11103
11145
  }
11104
- function getUpdateDeploymentSettleGraceDurationInstruction(input, config) {
11146
+ function getUpdateDeployFeesInstruction(input, config) {
11105
11147
  const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
11106
11148
  const originalAccounts = {
11107
11149
  authority: { value: input.authority ?? null, isWritable: false },
@@ -11115,13 +11157,13 @@ function getUpdateDeploymentSettleGraceDurationInstruction(input, config) {
11115
11157
  getAccountMeta("authority", accounts.authority),
11116
11158
  getAccountMeta("satrushConfig", accounts.satrushConfig)
11117
11159
  ],
11118
- data: getUpdateDeploymentSettleGraceDurationInstructionDataEncoder().encode(
11160
+ data: getUpdateDeployFeesInstructionDataEncoder().encode(
11119
11161
  args
11120
11162
  ),
11121
11163
  programAddress
11122
11164
  });
11123
11165
  }
11124
- function parseUpdateDeploymentSettleGraceDurationInstruction(instruction) {
11166
+ function parseUpdateDeployFeesInstruction(instruction) {
11125
11167
  if (instruction.accounts.length < 2) {
11126
11168
  throw new SolanaError35(
11127
11169
  SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS35,
@@ -11140,13 +11182,11 @@ function parseUpdateDeploymentSettleGraceDurationInstruction(instruction) {
11140
11182
  return {
11141
11183
  programAddress: instruction.programAddress,
11142
11184
  accounts: { authority: getNextAccount(), satrushConfig: getNextAccount() },
11143
- data: getUpdateDeploymentSettleGraceDurationInstructionDataDecoder().decode(
11144
- instruction.data
11145
- )
11185
+ data: getUpdateDeployFeesInstructionDataDecoder().decode(instruction.data)
11146
11186
  };
11147
11187
  }
11148
11188
 
11149
- // src/generated/instructions/updateEpochVaultIterationDuration.ts
11189
+ // src/generated/instructions/updateDeploymentSettleGraceDuration.ts
11150
11190
  import {
11151
11191
  combineCodec as combineCodec68,
11152
11192
  fixDecoderSize as fixDecoderSize51,
@@ -11155,8 +11195,8 @@ import {
11155
11195
  getBytesEncoder as getBytesEncoder73,
11156
11196
  getStructDecoder as getStructDecoder64,
11157
11197
  getStructEncoder as getStructEncoder64,
11158
- getU64Decoder as getU64Decoder41,
11159
- getU64Encoder as getU64Encoder41,
11198
+ getU64Decoder as getU64Decoder40,
11199
+ getU64Encoder as getU64Encoder40,
11160
11200
  SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS as SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS36,
11161
11201
  SolanaError as SolanaError36,
11162
11202
  transformEncoder as transformEncoder51
@@ -11164,37 +11204,37 @@ import {
11164
11204
  import {
11165
11205
  getAccountMetaFactory as getAccountMetaFactory36
11166
11206
  } from "@solana/program-client-core";
11167
- var UPDATE_EPOCH_VAULT_ITERATION_DURATION_DISCRIMINATOR = new Uint8Array([171, 103, 59, 229, 174, 188, 210, 121]);
11168
- function getUpdateEpochVaultIterationDurationDiscriminatorBytes() {
11207
+ var UPDATE_DEPLOYMENT_SETTLE_GRACE_DURATION_DISCRIMINATOR = new Uint8Array([2, 212, 246, 89, 139, 64, 104, 74]);
11208
+ function getUpdateDeploymentSettleGraceDurationDiscriminatorBytes() {
11169
11209
  return fixEncoderSize61(getBytesEncoder73(), 8).encode(
11170
- UPDATE_EPOCH_VAULT_ITERATION_DURATION_DISCRIMINATOR
11210
+ UPDATE_DEPLOYMENT_SETTLE_GRACE_DURATION_DISCRIMINATOR
11171
11211
  );
11172
11212
  }
11173
- function getUpdateEpochVaultIterationDurationInstructionDataEncoder() {
11213
+ function getUpdateDeploymentSettleGraceDurationInstructionDataEncoder() {
11174
11214
  return transformEncoder51(
11175
11215
  getStructEncoder64([
11176
11216
  ["discriminator", fixEncoderSize61(getBytesEncoder73(), 8)],
11177
- ["newIterationDuration", getU64Encoder41()]
11217
+ ["newGraceDuration", getU64Encoder40()]
11178
11218
  ]),
11179
11219
  (value) => ({
11180
11220
  ...value,
11181
- discriminator: UPDATE_EPOCH_VAULT_ITERATION_DURATION_DISCRIMINATOR
11221
+ discriminator: UPDATE_DEPLOYMENT_SETTLE_GRACE_DURATION_DISCRIMINATOR
11182
11222
  })
11183
11223
  );
11184
11224
  }
11185
- function getUpdateEpochVaultIterationDurationInstructionDataDecoder() {
11225
+ function getUpdateDeploymentSettleGraceDurationInstructionDataDecoder() {
11186
11226
  return getStructDecoder64([
11187
11227
  ["discriminator", fixDecoderSize51(getBytesDecoder51(), 8)],
11188
- ["newIterationDuration", getU64Decoder41()]
11228
+ ["newGraceDuration", getU64Decoder40()]
11189
11229
  ]);
11190
11230
  }
11191
- function getUpdateEpochVaultIterationDurationInstructionDataCodec() {
11231
+ function getUpdateDeploymentSettleGraceDurationInstructionDataCodec() {
11192
11232
  return combineCodec68(
11193
- getUpdateEpochVaultIterationDurationInstructionDataEncoder(),
11194
- getUpdateEpochVaultIterationDurationInstructionDataDecoder()
11233
+ getUpdateDeploymentSettleGraceDurationInstructionDataEncoder(),
11234
+ getUpdateDeploymentSettleGraceDurationInstructionDataDecoder()
11195
11235
  );
11196
11236
  }
11197
- async function getUpdateEpochVaultIterationDurationInstructionAsync(input, config) {
11237
+ async function getUpdateDeploymentSettleGraceDurationInstructionAsync(input, config) {
11198
11238
  const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
11199
11239
  const originalAccounts = {
11200
11240
  authority: { value: input.authority ?? null, isWritable: false },
@@ -11211,13 +11251,13 @@ async function getUpdateEpochVaultIterationDurationInstructionAsync(input, confi
11211
11251
  getAccountMeta("authority", accounts.authority),
11212
11252
  getAccountMeta("satrushConfig", accounts.satrushConfig)
11213
11253
  ],
11214
- data: getUpdateEpochVaultIterationDurationInstructionDataEncoder().encode(
11254
+ data: getUpdateDeploymentSettleGraceDurationInstructionDataEncoder().encode(
11215
11255
  args
11216
11256
  ),
11217
11257
  programAddress
11218
11258
  });
11219
11259
  }
11220
- function getUpdateEpochVaultIterationDurationInstruction(input, config) {
11260
+ function getUpdateDeploymentSettleGraceDurationInstruction(input, config) {
11221
11261
  const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
11222
11262
  const originalAccounts = {
11223
11263
  authority: { value: input.authority ?? null, isWritable: false },
@@ -11231,13 +11271,13 @@ function getUpdateEpochVaultIterationDurationInstruction(input, config) {
11231
11271
  getAccountMeta("authority", accounts.authority),
11232
11272
  getAccountMeta("satrushConfig", accounts.satrushConfig)
11233
11273
  ],
11234
- data: getUpdateEpochVaultIterationDurationInstructionDataEncoder().encode(
11274
+ data: getUpdateDeploymentSettleGraceDurationInstructionDataEncoder().encode(
11235
11275
  args
11236
11276
  ),
11237
11277
  programAddress
11238
11278
  });
11239
11279
  }
11240
- function parseUpdateEpochVaultIterationDurationInstruction(instruction) {
11280
+ function parseUpdateDeploymentSettleGraceDurationInstruction(instruction) {
11241
11281
  if (instruction.accounts.length < 2) {
11242
11282
  throw new SolanaError36(
11243
11283
  SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS36,
@@ -11256,13 +11296,13 @@ function parseUpdateEpochVaultIterationDurationInstruction(instruction) {
11256
11296
  return {
11257
11297
  programAddress: instruction.programAddress,
11258
11298
  accounts: { authority: getNextAccount(), satrushConfig: getNextAccount() },
11259
- data: getUpdateEpochVaultIterationDurationInstructionDataDecoder().decode(
11299
+ data: getUpdateDeploymentSettleGraceDurationInstructionDataDecoder().decode(
11260
11300
  instruction.data
11261
11301
  )
11262
11302
  };
11263
11303
  }
11264
11304
 
11265
- // src/generated/instructions/updateMinDeployUsdAmount.ts
11305
+ // src/generated/instructions/updateEpochVaultIterationDuration.ts
11266
11306
  import {
11267
11307
  combineCodec as combineCodec69,
11268
11308
  fixDecoderSize as fixDecoderSize52,
@@ -11271,8 +11311,8 @@ import {
11271
11311
  getBytesEncoder as getBytesEncoder74,
11272
11312
  getStructDecoder as getStructDecoder65,
11273
11313
  getStructEncoder as getStructEncoder65,
11274
- getU64Decoder as getU64Decoder42,
11275
- getU64Encoder as getU64Encoder42,
11314
+ getU64Decoder as getU64Decoder41,
11315
+ getU64Encoder as getU64Encoder41,
11276
11316
  SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS as SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS37,
11277
11317
  SolanaError as SolanaError37,
11278
11318
  transformEncoder as transformEncoder52
@@ -11280,37 +11320,37 @@ import {
11280
11320
  import {
11281
11321
  getAccountMetaFactory as getAccountMetaFactory37
11282
11322
  } from "@solana/program-client-core";
11283
- var UPDATE_MIN_DEPLOY_USD_AMOUNT_DISCRIMINATOR = new Uint8Array([187, 108, 89, 178, 249, 101, 187, 33]);
11284
- function getUpdateMinDeployUsdAmountDiscriminatorBytes() {
11323
+ var UPDATE_EPOCH_VAULT_ITERATION_DURATION_DISCRIMINATOR = new Uint8Array([171, 103, 59, 229, 174, 188, 210, 121]);
11324
+ function getUpdateEpochVaultIterationDurationDiscriminatorBytes() {
11285
11325
  return fixEncoderSize62(getBytesEncoder74(), 8).encode(
11286
- UPDATE_MIN_DEPLOY_USD_AMOUNT_DISCRIMINATOR
11326
+ UPDATE_EPOCH_VAULT_ITERATION_DURATION_DISCRIMINATOR
11287
11327
  );
11288
11328
  }
11289
- function getUpdateMinDeployUsdAmountInstructionDataEncoder() {
11329
+ function getUpdateEpochVaultIterationDurationInstructionDataEncoder() {
11290
11330
  return transformEncoder52(
11291
11331
  getStructEncoder65([
11292
11332
  ["discriminator", fixEncoderSize62(getBytesEncoder74(), 8)],
11293
- ["newMinDeployUsdAmount", getU64Encoder42()]
11333
+ ["newIterationDuration", getU64Encoder41()]
11294
11334
  ]),
11295
11335
  (value) => ({
11296
11336
  ...value,
11297
- discriminator: UPDATE_MIN_DEPLOY_USD_AMOUNT_DISCRIMINATOR
11337
+ discriminator: UPDATE_EPOCH_VAULT_ITERATION_DURATION_DISCRIMINATOR
11298
11338
  })
11299
11339
  );
11300
11340
  }
11301
- function getUpdateMinDeployUsdAmountInstructionDataDecoder() {
11341
+ function getUpdateEpochVaultIterationDurationInstructionDataDecoder() {
11302
11342
  return getStructDecoder65([
11303
11343
  ["discriminator", fixDecoderSize52(getBytesDecoder52(), 8)],
11304
- ["newMinDeployUsdAmount", getU64Decoder42()]
11344
+ ["newIterationDuration", getU64Decoder41()]
11305
11345
  ]);
11306
11346
  }
11307
- function getUpdateMinDeployUsdAmountInstructionDataCodec() {
11347
+ function getUpdateEpochVaultIterationDurationInstructionDataCodec() {
11308
11348
  return combineCodec69(
11309
- getUpdateMinDeployUsdAmountInstructionDataEncoder(),
11310
- getUpdateMinDeployUsdAmountInstructionDataDecoder()
11349
+ getUpdateEpochVaultIterationDurationInstructionDataEncoder(),
11350
+ getUpdateEpochVaultIterationDurationInstructionDataDecoder()
11311
11351
  );
11312
11352
  }
11313
- async function getUpdateMinDeployUsdAmountInstructionAsync(input, config) {
11353
+ async function getUpdateEpochVaultIterationDurationInstructionAsync(input, config) {
11314
11354
  const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
11315
11355
  const originalAccounts = {
11316
11356
  authority: { value: input.authority ?? null, isWritable: false },
@@ -11327,13 +11367,13 @@ async function getUpdateMinDeployUsdAmountInstructionAsync(input, config) {
11327
11367
  getAccountMeta("authority", accounts.authority),
11328
11368
  getAccountMeta("satrushConfig", accounts.satrushConfig)
11329
11369
  ],
11330
- data: getUpdateMinDeployUsdAmountInstructionDataEncoder().encode(
11370
+ data: getUpdateEpochVaultIterationDurationInstructionDataEncoder().encode(
11331
11371
  args
11332
11372
  ),
11333
11373
  programAddress
11334
11374
  });
11335
11375
  }
11336
- function getUpdateMinDeployUsdAmountInstruction(input, config) {
11376
+ function getUpdateEpochVaultIterationDurationInstruction(input, config) {
11337
11377
  const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
11338
11378
  const originalAccounts = {
11339
11379
  authority: { value: input.authority ?? null, isWritable: false },
@@ -11347,13 +11387,13 @@ function getUpdateMinDeployUsdAmountInstruction(input, config) {
11347
11387
  getAccountMeta("authority", accounts.authority),
11348
11388
  getAccountMeta("satrushConfig", accounts.satrushConfig)
11349
11389
  ],
11350
- data: getUpdateMinDeployUsdAmountInstructionDataEncoder().encode(
11390
+ data: getUpdateEpochVaultIterationDurationInstructionDataEncoder().encode(
11351
11391
  args
11352
11392
  ),
11353
11393
  programAddress
11354
11394
  });
11355
11395
  }
11356
- function parseUpdateMinDeployUsdAmountInstruction(instruction) {
11396
+ function parseUpdateEpochVaultIterationDurationInstruction(instruction) {
11357
11397
  if (instruction.accounts.length < 2) {
11358
11398
  throw new SolanaError37(
11359
11399
  SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS37,
@@ -11372,13 +11412,13 @@ function parseUpdateMinDeployUsdAmountInstruction(instruction) {
11372
11412
  return {
11373
11413
  programAddress: instruction.programAddress,
11374
11414
  accounts: { authority: getNextAccount(), satrushConfig: getNextAccount() },
11375
- data: getUpdateMinDeployUsdAmountInstructionDataDecoder().decode(
11415
+ data: getUpdateEpochVaultIterationDurationInstructionDataDecoder().decode(
11376
11416
  instruction.data
11377
11417
  )
11378
11418
  };
11379
11419
  }
11380
11420
 
11381
- // src/generated/instructions/updateStrikeTriggerModulus.ts
11421
+ // src/generated/instructions/updateMinDeployUsdAmount.ts
11382
11422
  import {
11383
11423
  combineCodec as combineCodec70,
11384
11424
  fixDecoderSize as fixDecoderSize53,
@@ -11387,8 +11427,8 @@ import {
11387
11427
  getBytesEncoder as getBytesEncoder75,
11388
11428
  getStructDecoder as getStructDecoder66,
11389
11429
  getStructEncoder as getStructEncoder66,
11390
- getU16Decoder as getU16Decoder21,
11391
- getU16Encoder as getU16Encoder21,
11430
+ getU64Decoder as getU64Decoder42,
11431
+ getU64Encoder as getU64Encoder42,
11392
11432
  SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS as SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS38,
11393
11433
  SolanaError as SolanaError38,
11394
11434
  transformEncoder as transformEncoder53
@@ -11396,37 +11436,37 @@ import {
11396
11436
  import {
11397
11437
  getAccountMetaFactory as getAccountMetaFactory38
11398
11438
  } from "@solana/program-client-core";
11399
- var UPDATE_STRIKE_TRIGGER_MODULUS_DISCRIMINATOR = new Uint8Array([241, 172, 229, 62, 191, 163, 60, 186]);
11400
- function getUpdateStrikeTriggerModulusDiscriminatorBytes() {
11439
+ var UPDATE_MIN_DEPLOY_USD_AMOUNT_DISCRIMINATOR = new Uint8Array([187, 108, 89, 178, 249, 101, 187, 33]);
11440
+ function getUpdateMinDeployUsdAmountDiscriminatorBytes() {
11401
11441
  return fixEncoderSize63(getBytesEncoder75(), 8).encode(
11402
- UPDATE_STRIKE_TRIGGER_MODULUS_DISCRIMINATOR
11442
+ UPDATE_MIN_DEPLOY_USD_AMOUNT_DISCRIMINATOR
11403
11443
  );
11404
11444
  }
11405
- function getUpdateStrikeTriggerModulusInstructionDataEncoder() {
11445
+ function getUpdateMinDeployUsdAmountInstructionDataEncoder() {
11406
11446
  return transformEncoder53(
11407
11447
  getStructEncoder66([
11408
11448
  ["discriminator", fixEncoderSize63(getBytesEncoder75(), 8)],
11409
- ["newModulus", getU16Encoder21()]
11449
+ ["newMinDeployUsdAmount", getU64Encoder42()]
11410
11450
  ]),
11411
11451
  (value) => ({
11412
11452
  ...value,
11413
- discriminator: UPDATE_STRIKE_TRIGGER_MODULUS_DISCRIMINATOR
11453
+ discriminator: UPDATE_MIN_DEPLOY_USD_AMOUNT_DISCRIMINATOR
11414
11454
  })
11415
11455
  );
11416
11456
  }
11417
- function getUpdateStrikeTriggerModulusInstructionDataDecoder() {
11457
+ function getUpdateMinDeployUsdAmountInstructionDataDecoder() {
11418
11458
  return getStructDecoder66([
11419
11459
  ["discriminator", fixDecoderSize53(getBytesDecoder53(), 8)],
11420
- ["newModulus", getU16Decoder21()]
11460
+ ["newMinDeployUsdAmount", getU64Decoder42()]
11421
11461
  ]);
11422
11462
  }
11423
- function getUpdateStrikeTriggerModulusInstructionDataCodec() {
11463
+ function getUpdateMinDeployUsdAmountInstructionDataCodec() {
11424
11464
  return combineCodec70(
11425
- getUpdateStrikeTriggerModulusInstructionDataEncoder(),
11426
- getUpdateStrikeTriggerModulusInstructionDataDecoder()
11465
+ getUpdateMinDeployUsdAmountInstructionDataEncoder(),
11466
+ getUpdateMinDeployUsdAmountInstructionDataDecoder()
11427
11467
  );
11428
11468
  }
11429
- async function getUpdateStrikeTriggerModulusInstructionAsync(input, config) {
11469
+ async function getUpdateMinDeployUsdAmountInstructionAsync(input, config) {
11430
11470
  const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
11431
11471
  const originalAccounts = {
11432
11472
  authority: { value: input.authority ?? null, isWritable: false },
@@ -11443,13 +11483,13 @@ async function getUpdateStrikeTriggerModulusInstructionAsync(input, config) {
11443
11483
  getAccountMeta("authority", accounts.authority),
11444
11484
  getAccountMeta("satrushConfig", accounts.satrushConfig)
11445
11485
  ],
11446
- data: getUpdateStrikeTriggerModulusInstructionDataEncoder().encode(
11486
+ data: getUpdateMinDeployUsdAmountInstructionDataEncoder().encode(
11447
11487
  args
11448
11488
  ),
11449
11489
  programAddress
11450
11490
  });
11451
11491
  }
11452
- function getUpdateStrikeTriggerModulusInstruction(input, config) {
11492
+ function getUpdateMinDeployUsdAmountInstruction(input, config) {
11453
11493
  const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
11454
11494
  const originalAccounts = {
11455
11495
  authority: { value: input.authority ?? null, isWritable: false },
@@ -11463,13 +11503,13 @@ function getUpdateStrikeTriggerModulusInstruction(input, config) {
11463
11503
  getAccountMeta("authority", accounts.authority),
11464
11504
  getAccountMeta("satrushConfig", accounts.satrushConfig)
11465
11505
  ],
11466
- data: getUpdateStrikeTriggerModulusInstructionDataEncoder().encode(
11506
+ data: getUpdateMinDeployUsdAmountInstructionDataEncoder().encode(
11467
11507
  args
11468
11508
  ),
11469
11509
  programAddress
11470
11510
  });
11471
11511
  }
11472
- function parseUpdateStrikeTriggerModulusInstruction(instruction) {
11512
+ function parseUpdateMinDeployUsdAmountInstruction(instruction) {
11473
11513
  if (instruction.accounts.length < 2) {
11474
11514
  throw new SolanaError38(
11475
11515
  SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS38,
@@ -11488,13 +11528,13 @@ function parseUpdateStrikeTriggerModulusInstruction(instruction) {
11488
11528
  return {
11489
11529
  programAddress: instruction.programAddress,
11490
11530
  accounts: { authority: getNextAccount(), satrushConfig: getNextAccount() },
11491
- data: getUpdateStrikeTriggerModulusInstructionDataDecoder().decode(
11531
+ data: getUpdateMinDeployUsdAmountInstructionDataDecoder().decode(
11492
11532
  instruction.data
11493
11533
  )
11494
11534
  };
11495
11535
  }
11496
11536
 
11497
- // src/generated/instructions/updateUnclaimedHashrateBps.ts
11537
+ // src/generated/instructions/updateStrikeTriggerModulus.ts
11498
11538
  import {
11499
11539
  combineCodec as combineCodec71,
11500
11540
  fixDecoderSize as fixDecoderSize54,
@@ -11503,8 +11543,8 @@ import {
11503
11543
  getBytesEncoder as getBytesEncoder76,
11504
11544
  getStructDecoder as getStructDecoder67,
11505
11545
  getStructEncoder as getStructEncoder67,
11506
- getU32Decoder as getU32Decoder32,
11507
- getU32Encoder as getU32Encoder32,
11546
+ getU16Decoder as getU16Decoder21,
11547
+ getU16Encoder as getU16Encoder21,
11508
11548
  SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS as SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS39,
11509
11549
  SolanaError as SolanaError39,
11510
11550
  transformEncoder as transformEncoder54
@@ -11512,37 +11552,37 @@ import {
11512
11552
  import {
11513
11553
  getAccountMetaFactory as getAccountMetaFactory39
11514
11554
  } 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() {
11555
+ var UPDATE_STRIKE_TRIGGER_MODULUS_DISCRIMINATOR = new Uint8Array([241, 172, 229, 62, 191, 163, 60, 186]);
11556
+ function getUpdateStrikeTriggerModulusDiscriminatorBytes() {
11517
11557
  return fixEncoderSize64(getBytesEncoder76(), 8).encode(
11518
- UPDATE_UNCLAIMED_HASHRATE_BPS_DISCRIMINATOR
11558
+ UPDATE_STRIKE_TRIGGER_MODULUS_DISCRIMINATOR
11519
11559
  );
11520
11560
  }
11521
- function getUpdateUnclaimedHashrateBpsInstructionDataEncoder() {
11561
+ function getUpdateStrikeTriggerModulusInstructionDataEncoder() {
11522
11562
  return transformEncoder54(
11523
11563
  getStructEncoder67([
11524
11564
  ["discriminator", fixEncoderSize64(getBytesEncoder76(), 8)],
11525
- ["newUnclaimedHashrateBps", getU32Encoder32()]
11565
+ ["newModulus", getU16Encoder21()]
11526
11566
  ]),
11527
11567
  (value) => ({
11528
11568
  ...value,
11529
- discriminator: UPDATE_UNCLAIMED_HASHRATE_BPS_DISCRIMINATOR
11569
+ discriminator: UPDATE_STRIKE_TRIGGER_MODULUS_DISCRIMINATOR
11530
11570
  })
11531
11571
  );
11532
11572
  }
11533
- function getUpdateUnclaimedHashrateBpsInstructionDataDecoder() {
11573
+ function getUpdateStrikeTriggerModulusInstructionDataDecoder() {
11534
11574
  return getStructDecoder67([
11535
11575
  ["discriminator", fixDecoderSize54(getBytesDecoder54(), 8)],
11536
- ["newUnclaimedHashrateBps", getU32Decoder32()]
11576
+ ["newModulus", getU16Decoder21()]
11537
11577
  ]);
11538
11578
  }
11539
- function getUpdateUnclaimedHashrateBpsInstructionDataCodec() {
11579
+ function getUpdateStrikeTriggerModulusInstructionDataCodec() {
11540
11580
  return combineCodec71(
11541
- getUpdateUnclaimedHashrateBpsInstructionDataEncoder(),
11542
- getUpdateUnclaimedHashrateBpsInstructionDataDecoder()
11581
+ getUpdateStrikeTriggerModulusInstructionDataEncoder(),
11582
+ getUpdateStrikeTriggerModulusInstructionDataDecoder()
11543
11583
  );
11544
11584
  }
11545
- async function getUpdateUnclaimedHashrateBpsInstructionAsync(input, config) {
11585
+ async function getUpdateStrikeTriggerModulusInstructionAsync(input, config) {
11546
11586
  const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
11547
11587
  const originalAccounts = {
11548
11588
  authority: { value: input.authority ?? null, isWritable: false },
@@ -11559,13 +11599,13 @@ async function getUpdateUnclaimedHashrateBpsInstructionAsync(input, config) {
11559
11599
  getAccountMeta("authority", accounts.authority),
11560
11600
  getAccountMeta("satrushConfig", accounts.satrushConfig)
11561
11601
  ],
11562
- data: getUpdateUnclaimedHashrateBpsInstructionDataEncoder().encode(
11602
+ data: getUpdateStrikeTriggerModulusInstructionDataEncoder().encode(
11563
11603
  args
11564
11604
  ),
11565
11605
  programAddress
11566
11606
  });
11567
11607
  }
11568
- function getUpdateUnclaimedHashrateBpsInstruction(input, config) {
11608
+ function getUpdateStrikeTriggerModulusInstruction(input, config) {
11569
11609
  const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
11570
11610
  const originalAccounts = {
11571
11611
  authority: { value: input.authority ?? null, isWritable: false },
@@ -11579,13 +11619,13 @@ function getUpdateUnclaimedHashrateBpsInstruction(input, config) {
11579
11619
  getAccountMeta("authority", accounts.authority),
11580
11620
  getAccountMeta("satrushConfig", accounts.satrushConfig)
11581
11621
  ],
11582
- data: getUpdateUnclaimedHashrateBpsInstructionDataEncoder().encode(
11622
+ data: getUpdateStrikeTriggerModulusInstructionDataEncoder().encode(
11583
11623
  args
11584
11624
  ),
11585
11625
  programAddress
11586
11626
  });
11587
11627
  }
11588
- function parseUpdateUnclaimedHashrateBpsInstruction(instruction) {
11628
+ function parseUpdateStrikeTriggerModulusInstruction(instruction) {
11589
11629
  if (instruction.accounts.length < 2) {
11590
11630
  throw new SolanaError39(
11591
11631
  SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS39,
@@ -11604,50 +11644,166 @@ function parseUpdateUnclaimedHashrateBpsInstruction(instruction) {
11604
11644
  return {
11605
11645
  programAddress: instruction.programAddress,
11606
11646
  accounts: { authority: getNextAccount(), satrushConfig: getNextAccount() },
11607
- data: getUpdateUnclaimedHashrateBpsInstructionDataDecoder().decode(
11647
+ data: getUpdateStrikeTriggerModulusInstructionDataDecoder().decode(
11608
11648
  instruction.data
11609
11649
  )
11610
11650
  };
11611
11651
  }
11612
11652
 
11613
- // src/generated/instructions/withdrawProtocolFees.ts
11653
+ // src/generated/instructions/updateUnclaimedHashrateBps.ts
11614
11654
  import {
11615
11655
  combineCodec as combineCodec72,
11616
11656
  fixDecoderSize as fixDecoderSize55,
11617
11657
  fixEncoderSize as fixEncoderSize65,
11618
- getAddressEncoder as getAddressEncoder40,
11619
11658
  getBytesDecoder as getBytesDecoder55,
11620
11659
  getBytesEncoder as getBytesEncoder77,
11621
- getProgramDerivedAddress as getProgramDerivedAddress34,
11622
11660
  getStructDecoder as getStructDecoder68,
11623
11661
  getStructEncoder as getStructEncoder68,
11662
+ getU32Decoder as getU32Decoder33,
11663
+ getU32Encoder as getU32Encoder33,
11624
11664
  SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS as SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS40,
11625
11665
  SolanaError as SolanaError40,
11626
11666
  transformEncoder as transformEncoder55
11627
11667
  } from "@solana/kit";
11628
11668
  import {
11629
- getAccountMetaFactory as getAccountMetaFactory40,
11669
+ getAccountMetaFactory as getAccountMetaFactory40
11670
+ } from "@solana/program-client-core";
11671
+ var UPDATE_UNCLAIMED_HASHRATE_BPS_DISCRIMINATOR = new Uint8Array([237, 38, 26, 14, 73, 161, 208, 157]);
11672
+ function getUpdateUnclaimedHashrateBpsDiscriminatorBytes() {
11673
+ return fixEncoderSize65(getBytesEncoder77(), 8).encode(
11674
+ UPDATE_UNCLAIMED_HASHRATE_BPS_DISCRIMINATOR
11675
+ );
11676
+ }
11677
+ function getUpdateUnclaimedHashrateBpsInstructionDataEncoder() {
11678
+ return transformEncoder55(
11679
+ getStructEncoder68([
11680
+ ["discriminator", fixEncoderSize65(getBytesEncoder77(), 8)],
11681
+ ["newUnclaimedHashrateBps", getU32Encoder33()]
11682
+ ]),
11683
+ (value) => ({
11684
+ ...value,
11685
+ discriminator: UPDATE_UNCLAIMED_HASHRATE_BPS_DISCRIMINATOR
11686
+ })
11687
+ );
11688
+ }
11689
+ function getUpdateUnclaimedHashrateBpsInstructionDataDecoder() {
11690
+ return getStructDecoder68([
11691
+ ["discriminator", fixDecoderSize55(getBytesDecoder55(), 8)],
11692
+ ["newUnclaimedHashrateBps", getU32Decoder33()]
11693
+ ]);
11694
+ }
11695
+ function getUpdateUnclaimedHashrateBpsInstructionDataCodec() {
11696
+ return combineCodec72(
11697
+ getUpdateUnclaimedHashrateBpsInstructionDataEncoder(),
11698
+ getUpdateUnclaimedHashrateBpsInstructionDataDecoder()
11699
+ );
11700
+ }
11701
+ async function getUpdateUnclaimedHashrateBpsInstructionAsync(input, config) {
11702
+ const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
11703
+ const originalAccounts = {
11704
+ authority: { value: input.authority ?? null, isWritable: false },
11705
+ satrushConfig: { value: input.satrushConfig ?? null, isWritable: true }
11706
+ };
11707
+ const accounts = originalAccounts;
11708
+ const args = { ...input };
11709
+ if (!accounts.satrushConfig.value) {
11710
+ accounts.satrushConfig.value = await findSatrushConfigPda();
11711
+ }
11712
+ const getAccountMeta = getAccountMetaFactory40(programAddress, "programId");
11713
+ return Object.freeze({
11714
+ accounts: [
11715
+ getAccountMeta("authority", accounts.authority),
11716
+ getAccountMeta("satrushConfig", accounts.satrushConfig)
11717
+ ],
11718
+ data: getUpdateUnclaimedHashrateBpsInstructionDataEncoder().encode(
11719
+ args
11720
+ ),
11721
+ programAddress
11722
+ });
11723
+ }
11724
+ function getUpdateUnclaimedHashrateBpsInstruction(input, config) {
11725
+ const programAddress = config?.programAddress ?? SATRUSH_PROGRAM_ADDRESS;
11726
+ const originalAccounts = {
11727
+ authority: { value: input.authority ?? null, isWritable: false },
11728
+ satrushConfig: { value: input.satrushConfig ?? null, isWritable: true }
11729
+ };
11730
+ const accounts = originalAccounts;
11731
+ const args = { ...input };
11732
+ const getAccountMeta = getAccountMetaFactory40(programAddress, "programId");
11733
+ return Object.freeze({
11734
+ accounts: [
11735
+ getAccountMeta("authority", accounts.authority),
11736
+ getAccountMeta("satrushConfig", accounts.satrushConfig)
11737
+ ],
11738
+ data: getUpdateUnclaimedHashrateBpsInstructionDataEncoder().encode(
11739
+ args
11740
+ ),
11741
+ programAddress
11742
+ });
11743
+ }
11744
+ function parseUpdateUnclaimedHashrateBpsInstruction(instruction) {
11745
+ if (instruction.accounts.length < 2) {
11746
+ throw new SolanaError40(
11747
+ SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS40,
11748
+ {
11749
+ actualAccountMetas: instruction.accounts.length,
11750
+ expectedAccountMetas: 2
11751
+ }
11752
+ );
11753
+ }
11754
+ let accountIndex = 0;
11755
+ const getNextAccount = () => {
11756
+ const accountMeta = instruction.accounts[accountIndex];
11757
+ accountIndex += 1;
11758
+ return accountMeta;
11759
+ };
11760
+ return {
11761
+ programAddress: instruction.programAddress,
11762
+ accounts: { authority: getNextAccount(), satrushConfig: getNextAccount() },
11763
+ data: getUpdateUnclaimedHashrateBpsInstructionDataDecoder().decode(
11764
+ instruction.data
11765
+ )
11766
+ };
11767
+ }
11768
+
11769
+ // src/generated/instructions/withdrawProtocolFees.ts
11770
+ import {
11771
+ combineCodec as combineCodec73,
11772
+ fixDecoderSize as fixDecoderSize56,
11773
+ fixEncoderSize as fixEncoderSize66,
11774
+ getAddressEncoder as getAddressEncoder40,
11775
+ getBytesDecoder as getBytesDecoder56,
11776
+ getBytesEncoder as getBytesEncoder78,
11777
+ getProgramDerivedAddress as getProgramDerivedAddress34,
11778
+ getStructDecoder as getStructDecoder69,
11779
+ getStructEncoder as getStructEncoder69,
11780
+ SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS as SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS41,
11781
+ SolanaError as SolanaError41,
11782
+ transformEncoder as transformEncoder56
11783
+ } from "@solana/kit";
11784
+ import {
11785
+ getAccountMetaFactory as getAccountMetaFactory41,
11630
11786
  getAddressFromResolvedInstructionAccount as getAddressFromResolvedInstructionAccount24
11631
11787
  } from "@solana/program-client-core";
11632
11788
  var WITHDRAW_PROTOCOL_FEES_DISCRIMINATOR = new Uint8Array([11, 68, 165, 98, 18, 208, 134, 73]);
11633
11789
  function getWithdrawProtocolFeesDiscriminatorBytes() {
11634
- return fixEncoderSize65(getBytesEncoder77(), 8).encode(
11790
+ return fixEncoderSize66(getBytesEncoder78(), 8).encode(
11635
11791
  WITHDRAW_PROTOCOL_FEES_DISCRIMINATOR
11636
11792
  );
11637
11793
  }
11638
11794
  function getWithdrawProtocolFeesInstructionDataEncoder() {
11639
- return transformEncoder55(
11640
- getStructEncoder68([["discriminator", fixEncoderSize65(getBytesEncoder77(), 8)]]),
11795
+ return transformEncoder56(
11796
+ getStructEncoder69([["discriminator", fixEncoderSize66(getBytesEncoder78(), 8)]]),
11641
11797
  (value) => ({ ...value, discriminator: WITHDRAW_PROTOCOL_FEES_DISCRIMINATOR })
11642
11798
  );
11643
11799
  }
11644
11800
  function getWithdrawProtocolFeesInstructionDataDecoder() {
11645
- return getStructDecoder68([
11646
- ["discriminator", fixDecoderSize55(getBytesDecoder55(), 8)]
11801
+ return getStructDecoder69([
11802
+ ["discriminator", fixDecoderSize56(getBytesDecoder56(), 8)]
11647
11803
  ]);
11648
11804
  }
11649
11805
  function getWithdrawProtocolFeesInstructionDataCodec() {
11650
- return combineCodec72(
11806
+ return combineCodec73(
11651
11807
  getWithdrawProtocolFeesInstructionDataEncoder(),
11652
11808
  getWithdrawProtocolFeesInstructionDataDecoder()
11653
11809
  );
@@ -11695,7 +11851,7 @@ async function getWithdrawProtocolFeesInstructionAsync(input, config) {
11695
11851
  accounts.treasury.value
11696
11852
  )
11697
11853
  ),
11698
- getBytesEncoder77().encode(
11854
+ getBytesEncoder78().encode(
11699
11855
  new Uint8Array([
11700
11856
  6,
11701
11857
  221,
@@ -11750,7 +11906,7 @@ async function getWithdrawProtocolFeesInstructionAsync(input, config) {
11750
11906
  accounts.treasury.value
11751
11907
  )
11752
11908
  ),
11753
- getBytesEncoder77().encode(
11909
+ getBytesEncoder78().encode(
11754
11910
  new Uint8Array([
11755
11911
  6,
11756
11912
  221,
@@ -11805,7 +11961,7 @@ async function getWithdrawProtocolFeesInstructionAsync(input, config) {
11805
11961
  accounts.feeRecipient.value
11806
11962
  )
11807
11963
  ),
11808
- getBytesEncoder77().encode(
11964
+ getBytesEncoder78().encode(
11809
11965
  new Uint8Array([
11810
11966
  6,
11811
11967
  221,
@@ -11860,7 +12016,7 @@ async function getWithdrawProtocolFeesInstructionAsync(input, config) {
11860
12016
  accounts.feeRecipient.value
11861
12017
  )
11862
12018
  ),
11863
- getBytesEncoder77().encode(
12019
+ getBytesEncoder78().encode(
11864
12020
  new Uint8Array([
11865
12021
  6,
11866
12022
  221,
@@ -11914,7 +12070,7 @@ async function getWithdrawProtocolFeesInstructionAsync(input, config) {
11914
12070
  if (!accounts.systemProgram.value) {
11915
12071
  accounts.systemProgram.value = "11111111111111111111111111111111";
11916
12072
  }
11917
- const getAccountMeta = getAccountMetaFactory40(programAddress, "programId");
12073
+ const getAccountMeta = getAccountMetaFactory41(programAddress, "programId");
11918
12074
  return Object.freeze({
11919
12075
  accounts: [
11920
12076
  getAccountMeta("authority", accounts.authority),
@@ -11971,7 +12127,7 @@ function getWithdrawProtocolFeesInstruction(input, config) {
11971
12127
  if (!accounts.systemProgram.value) {
11972
12128
  accounts.systemProgram.value = "11111111111111111111111111111111";
11973
12129
  }
11974
- const getAccountMeta = getAccountMetaFactory40(programAddress, "programId");
12130
+ const getAccountMeta = getAccountMetaFactory41(programAddress, "programId");
11975
12131
  return Object.freeze({
11976
12132
  accounts: [
11977
12133
  getAccountMeta("authority", accounts.authority),
@@ -11994,8 +12150,8 @@ function getWithdrawProtocolFeesInstruction(input, config) {
11994
12150
  }
11995
12151
  function parseWithdrawProtocolFeesInstruction(instruction) {
11996
12152
  if (instruction.accounts.length < 13) {
11997
- throw new SolanaError40(
11998
- SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS40,
12153
+ throw new SolanaError41(
12154
+ SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS41,
11999
12155
  {
12000
12156
  actualAccountMetas: instruction.accounts.length,
12001
12157
  expectedAccountMetas: 13
@@ -12055,7 +12211,7 @@ function identifySatrushAccount(account) {
12055
12211
  const data = "data" in account ? account.data : account;
12056
12212
  if (containsBytes(
12057
12213
  data,
12058
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12214
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12059
12215
  new Uint8Array([79, 48, 160, 63, 153, 132, 240, 56])
12060
12216
  ),
12061
12217
  0
@@ -12064,7 +12220,7 @@ function identifySatrushAccount(account) {
12064
12220
  }
12065
12221
  if (containsBytes(
12066
12222
  data,
12067
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12223
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12068
12224
  new Uint8Array([100, 209, 6, 66, 115, 53, 132, 9])
12069
12225
  ),
12070
12226
  0
@@ -12073,7 +12229,7 @@ function identifySatrushAccount(account) {
12073
12229
  }
12074
12230
  if (containsBytes(
12075
12231
  data,
12076
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12232
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12077
12233
  new Uint8Array([75, 243, 246, 41, 173, 130, 196, 91])
12078
12234
  ),
12079
12235
  0
@@ -12082,7 +12238,7 @@ function identifySatrushAccount(account) {
12082
12238
  }
12083
12239
  if (containsBytes(
12084
12240
  data,
12085
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12241
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12086
12242
  new Uint8Array([116, 108, 198, 176, 193, 190, 91, 125])
12087
12243
  ),
12088
12244
  0
@@ -12091,7 +12247,7 @@ function identifySatrushAccount(account) {
12091
12247
  }
12092
12248
  if (containsBytes(
12093
12249
  data,
12094
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12250
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12095
12251
  new Uint8Array([121, 238, 146, 107, 234, 24, 227, 31])
12096
12252
  ),
12097
12253
  0
@@ -12100,7 +12256,7 @@ function identifySatrushAccount(account) {
12100
12256
  }
12101
12257
  if (containsBytes(
12102
12258
  data,
12103
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12259
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12104
12260
  new Uint8Array([223, 113, 15, 54, 123, 122, 140, 100])
12105
12261
  ),
12106
12262
  0
@@ -12109,7 +12265,7 @@ function identifySatrushAccount(account) {
12109
12265
  }
12110
12266
  if (containsBytes(
12111
12267
  data,
12112
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12268
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12113
12269
  new Uint8Array([134, 90, 53, 34, 240, 221, 175, 212])
12114
12270
  ),
12115
12271
  0
@@ -12118,7 +12274,7 @@ function identifySatrushAccount(account) {
12118
12274
  }
12119
12275
  if (containsBytes(
12120
12276
  data,
12121
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12277
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12122
12278
  new Uint8Array([255, 64, 185, 130, 97, 37, 230, 219])
12123
12279
  ),
12124
12280
  0
@@ -12127,7 +12283,7 @@ function identifySatrushAccount(account) {
12127
12283
  }
12128
12284
  if (containsBytes(
12129
12285
  data,
12130
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12286
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12131
12287
  new Uint8Array([190, 205, 75, 222, 220, 249, 43, 126])
12132
12288
  ),
12133
12289
  0
@@ -12136,7 +12292,7 @@ function identifySatrushAccount(account) {
12136
12292
  }
12137
12293
  if (containsBytes(
12138
12294
  data,
12139
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12295
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12140
12296
  new Uint8Array([16, 128, 211, 70, 213, 109, 108, 216])
12141
12297
  ),
12142
12298
  0
@@ -12145,7 +12301,7 @@ function identifySatrushAccount(account) {
12145
12301
  }
12146
12302
  if (containsBytes(
12147
12303
  data,
12148
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12304
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12149
12305
  new Uint8Array([209, 64, 180, 169, 40, 181, 110, 236])
12150
12306
  ),
12151
12307
  0
@@ -12154,7 +12310,7 @@ function identifySatrushAccount(account) {
12154
12310
  }
12155
12311
  if (containsBytes(
12156
12312
  data,
12157
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12313
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12158
12314
  new Uint8Array([87, 127, 165, 51, 73, 78, 116, 174])
12159
12315
  ),
12160
12316
  0
@@ -12163,7 +12319,7 @@ function identifySatrushAccount(account) {
12163
12319
  }
12164
12320
  if (containsBytes(
12165
12321
  data,
12166
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12322
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12167
12323
  new Uint8Array([113, 169, 164, 118, 148, 217, 160, 200])
12168
12324
  ),
12169
12325
  0
@@ -12172,7 +12328,7 @@ function identifySatrushAccount(account) {
12172
12328
  }
12173
12329
  if (containsBytes(
12174
12330
  data,
12175
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12331
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12176
12332
  new Uint8Array([97, 10, 251, 68, 215, 103, 124, 183])
12177
12333
  ),
12178
12334
  0
@@ -12181,14 +12337,14 @@ function identifySatrushAccount(account) {
12181
12337
  }
12182
12338
  if (containsBytes(
12183
12339
  data,
12184
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12340
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12185
12341
  new Uint8Array([238, 239, 123, 238, 89, 1, 168, 253])
12186
12342
  ),
12187
12343
  0
12188
12344
  )) {
12189
12345
  return 14 /* Treasury */;
12190
12346
  }
12191
- throw new SolanaError41(
12347
+ throw new SolanaError42(
12192
12348
  SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT,
12193
12349
  { accountData: data, programName: "satrush" }
12194
12350
  );
@@ -12228,19 +12384,20 @@ var SatrushInstruction = /* @__PURE__ */ ((SatrushInstruction2) => {
12228
12384
  SatrushInstruction2[SatrushInstruction2["TriggerEpochDraw"] = 31] = "TriggerEpochDraw";
12229
12385
  SatrushInstruction2[SatrushInstruction2["TriggerOneBtcDraw"] = 32] = "TriggerOneBtcDraw";
12230
12386
  SatrushInstruction2[SatrushInstruction2["UpdateBoardRoundDuration"] = 33] = "UpdateBoardRoundDuration";
12231
- SatrushInstruction2[SatrushInstruction2["UpdateDeploymentSettleGraceDuration"] = 34] = "UpdateDeploymentSettleGraceDuration";
12232
- SatrushInstruction2[SatrushInstruction2["UpdateEpochVaultIterationDuration"] = 35] = "UpdateEpochVaultIterationDuration";
12233
- SatrushInstruction2[SatrushInstruction2["UpdateMinDeployUsdAmount"] = 36] = "UpdateMinDeployUsdAmount";
12234
- SatrushInstruction2[SatrushInstruction2["UpdateStrikeTriggerModulus"] = 37] = "UpdateStrikeTriggerModulus";
12235
- SatrushInstruction2[SatrushInstruction2["UpdateUnclaimedHashrateBps"] = 38] = "UpdateUnclaimedHashrateBps";
12236
- SatrushInstruction2[SatrushInstruction2["WithdrawProtocolFees"] = 39] = "WithdrawProtocolFees";
12387
+ SatrushInstruction2[SatrushInstruction2["UpdateDeployFees"] = 34] = "UpdateDeployFees";
12388
+ SatrushInstruction2[SatrushInstruction2["UpdateDeploymentSettleGraceDuration"] = 35] = "UpdateDeploymentSettleGraceDuration";
12389
+ SatrushInstruction2[SatrushInstruction2["UpdateEpochVaultIterationDuration"] = 36] = "UpdateEpochVaultIterationDuration";
12390
+ SatrushInstruction2[SatrushInstruction2["UpdateMinDeployUsdAmount"] = 37] = "UpdateMinDeployUsdAmount";
12391
+ SatrushInstruction2[SatrushInstruction2["UpdateStrikeTriggerModulus"] = 38] = "UpdateStrikeTriggerModulus";
12392
+ SatrushInstruction2[SatrushInstruction2["UpdateUnclaimedHashrateBps"] = 39] = "UpdateUnclaimedHashrateBps";
12393
+ SatrushInstruction2[SatrushInstruction2["WithdrawProtocolFees"] = 40] = "WithdrawProtocolFees";
12237
12394
  return SatrushInstruction2;
12238
12395
  })(SatrushInstruction || {});
12239
12396
  function identifySatrushInstruction(instruction) {
12240
12397
  const data = "data" in instruction ? instruction.data : instruction;
12241
12398
  if (containsBytes(
12242
12399
  data,
12243
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12400
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12244
12401
  new Uint8Array([90, 201, 98, 189, 106, 249, 86, 109])
12245
12402
  ),
12246
12403
  0
@@ -12249,7 +12406,7 @@ function identifySatrushInstruction(instruction) {
12249
12406
  }
12250
12407
  if (containsBytes(
12251
12408
  data,
12252
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12409
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12253
12410
  new Uint8Array([4, 48, 106, 230, 146, 124, 140, 167])
12254
12411
  ),
12255
12412
  0
@@ -12258,7 +12415,7 @@ function identifySatrushInstruction(instruction) {
12258
12415
  }
12259
12416
  if (containsBytes(
12260
12417
  data,
12261
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12418
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12262
12419
  new Uint8Array([87, 135, 14, 43, 190, 79, 45, 212])
12263
12420
  ),
12264
12421
  0
@@ -12267,7 +12424,7 @@ function identifySatrushInstruction(instruction) {
12267
12424
  }
12268
12425
  if (containsBytes(
12269
12426
  data,
12270
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12427
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12271
12428
  new Uint8Array([226, 196, 170, 104, 125, 21, 190, 232])
12272
12429
  ),
12273
12430
  0
@@ -12276,7 +12433,7 @@ function identifySatrushInstruction(instruction) {
12276
12433
  }
12277
12434
  if (containsBytes(
12278
12435
  data,
12279
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12436
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12280
12437
  new Uint8Array([53, 168, 61, 211, 206, 81, 133, 175])
12281
12438
  ),
12282
12439
  0
@@ -12285,7 +12442,7 @@ function identifySatrushInstruction(instruction) {
12285
12442
  }
12286
12443
  if (containsBytes(
12287
12444
  data,
12288
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12445
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12289
12446
  new Uint8Array([196, 77, 168, 181, 6, 119, 249, 154])
12290
12447
  ),
12291
12448
  0
@@ -12294,7 +12451,7 @@ function identifySatrushInstruction(instruction) {
12294
12451
  }
12295
12452
  if (containsBytes(
12296
12453
  data,
12297
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12454
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12298
12455
  new Uint8Array([241, 89, 98, 124, 223, 205, 215, 104])
12299
12456
  ),
12300
12457
  0
@@ -12303,7 +12460,7 @@ function identifySatrushInstruction(instruction) {
12303
12460
  }
12304
12461
  if (containsBytes(
12305
12462
  data,
12306
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12463
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12307
12464
  new Uint8Array([27, 23, 127, 47, 147, 184, 239, 190])
12308
12465
  ),
12309
12466
  0
@@ -12312,7 +12469,7 @@ function identifySatrushInstruction(instruction) {
12312
12469
  }
12313
12470
  if (containsBytes(
12314
12471
  data,
12315
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12472
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12316
12473
  new Uint8Array([80, 74, 10, 29, 63, 106, 63, 192])
12317
12474
  ),
12318
12475
  0
@@ -12321,7 +12478,7 @@ function identifySatrushInstruction(instruction) {
12321
12478
  }
12322
12479
  if (containsBytes(
12323
12480
  data,
12324
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12481
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12325
12482
  new Uint8Array([11, 123, 237, 176, 25, 240, 59, 135])
12326
12483
  ),
12327
12484
  0
@@ -12330,7 +12487,7 @@ function identifySatrushInstruction(instruction) {
12330
12487
  }
12331
12488
  if (containsBytes(
12332
12489
  data,
12333
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12490
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12334
12491
  new Uint8Array([181, 42, 174, 200, 192, 21, 27, 187])
12335
12492
  ),
12336
12493
  0
@@ -12339,7 +12496,7 @@ function identifySatrushInstruction(instruction) {
12339
12496
  }
12340
12497
  if (containsBytes(
12341
12498
  data,
12342
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12499
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12343
12500
  new Uint8Array([251, 62, 143, 106, 218, 1, 162, 181])
12344
12501
  ),
12345
12502
  0
@@ -12348,7 +12505,7 @@ function identifySatrushInstruction(instruction) {
12348
12505
  }
12349
12506
  if (containsBytes(
12350
12507
  data,
12351
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12508
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12352
12509
  new Uint8Array([149, 14, 81, 88, 230, 226, 234, 37])
12353
12510
  ),
12354
12511
  0
@@ -12357,7 +12514,7 @@ function identifySatrushInstruction(instruction) {
12357
12514
  }
12358
12515
  if (containsBytes(
12359
12516
  data,
12360
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12517
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12361
12518
  new Uint8Array([81, 129, 130, 38, 99, 204, 224, 177])
12362
12519
  ),
12363
12520
  0
@@ -12366,7 +12523,7 @@ function identifySatrushInstruction(instruction) {
12366
12523
  }
12367
12524
  if (containsBytes(
12368
12525
  data,
12369
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12526
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12370
12527
  new Uint8Array([69, 146, 29, 218, 228, 29, 229, 241])
12371
12528
  ),
12372
12529
  0
@@ -12375,7 +12532,7 @@ function identifySatrushInstruction(instruction) {
12375
12532
  }
12376
12533
  if (containsBytes(
12377
12534
  data,
12378
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12535
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12379
12536
  new Uint8Array([156, 160, 69, 94, 108, 6, 145, 211])
12380
12537
  ),
12381
12538
  0
@@ -12384,7 +12541,7 @@ function identifySatrushInstruction(instruction) {
12384
12541
  }
12385
12542
  if (containsBytes(
12386
12543
  data,
12387
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12544
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12388
12545
  new Uint8Array([195, 44, 245, 180, 58, 206, 203, 229])
12389
12546
  ),
12390
12547
  0
@@ -12393,7 +12550,7 @@ function identifySatrushInstruction(instruction) {
12393
12550
  }
12394
12551
  if (containsBytes(
12395
12552
  data,
12396
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12553
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12397
12554
  new Uint8Array([96, 175, 39, 171, 158, 44, 117, 18])
12398
12555
  ),
12399
12556
  0
@@ -12402,7 +12559,7 @@ function identifySatrushInstruction(instruction) {
12402
12559
  }
12403
12560
  if (containsBytes(
12404
12561
  data,
12405
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12562
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12406
12563
  new Uint8Array([159, 29, 126, 216, 29, 240, 141, 61])
12407
12564
  ),
12408
12565
  0
@@ -12411,7 +12568,7 @@ function identifySatrushInstruction(instruction) {
12411
12568
  }
12412
12569
  if (containsBytes(
12413
12570
  data,
12414
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12571
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12415
12572
  new Uint8Array([254, 98, 217, 51, 25, 88, 140, 45])
12416
12573
  ),
12417
12574
  0
@@ -12420,7 +12577,7 @@ function identifySatrushInstruction(instruction) {
12420
12577
  }
12421
12578
  if (containsBytes(
12422
12579
  data,
12423
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12580
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12424
12581
  new Uint8Array([193, 31, 240, 159, 30, 224, 157, 85])
12425
12582
  ),
12426
12583
  0
@@ -12429,7 +12586,7 @@ function identifySatrushInstruction(instruction) {
12429
12586
  }
12430
12587
  if (containsBytes(
12431
12588
  data,
12432
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12589
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12433
12590
  new Uint8Array([212, 191, 100, 136, 18, 213, 42, 72])
12434
12591
  ),
12435
12592
  0
@@ -12438,7 +12595,7 @@ function identifySatrushInstruction(instruction) {
12438
12595
  }
12439
12596
  if (containsBytes(
12440
12597
  data,
12441
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12598
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12442
12599
  new Uint8Array([3, 245, 202, 88, 161, 29, 51, 141])
12443
12600
  ),
12444
12601
  0
@@ -12447,7 +12604,7 @@ function identifySatrushInstruction(instruction) {
12447
12604
  }
12448
12605
  if (containsBytes(
12449
12606
  data,
12450
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12607
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12451
12608
  new Uint8Array([89, 228, 101, 114, 103, 98, 126, 229])
12452
12609
  ),
12453
12610
  0
@@ -12456,7 +12613,7 @@ function identifySatrushInstruction(instruction) {
12456
12613
  }
12457
12614
  if (containsBytes(
12458
12615
  data,
12459
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12616
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12460
12617
  new Uint8Array([222, 36, 211, 175, 4, 220, 2, 251])
12461
12618
  ),
12462
12619
  0
@@ -12465,7 +12622,7 @@ function identifySatrushInstruction(instruction) {
12465
12622
  }
12466
12623
  if (containsBytes(
12467
12624
  data,
12468
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12625
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12469
12626
  new Uint8Array([249, 111, 122, 103, 93, 86, 76, 198])
12470
12627
  ),
12471
12628
  0
@@ -12474,7 +12631,7 @@ function identifySatrushInstruction(instruction) {
12474
12631
  }
12475
12632
  if (containsBytes(
12476
12633
  data,
12477
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12634
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12478
12635
  new Uint8Array([82, 124, 95, 215, 213, 107, 134, 122])
12479
12636
  ),
12480
12637
  0
@@ -12483,7 +12640,7 @@ function identifySatrushInstruction(instruction) {
12483
12640
  }
12484
12641
  if (containsBytes(
12485
12642
  data,
12486
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12643
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12487
12644
  new Uint8Array([61, 147, 13, 247, 164, 34, 14, 57])
12488
12645
  ),
12489
12646
  0
@@ -12492,7 +12649,7 @@ function identifySatrushInstruction(instruction) {
12492
12649
  }
12493
12650
  if (containsBytes(
12494
12651
  data,
12495
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12652
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12496
12653
  new Uint8Array([86, 168, 42, 98, 2, 164, 250, 185])
12497
12654
  ),
12498
12655
  0
@@ -12501,7 +12658,7 @@ function identifySatrushInstruction(instruction) {
12501
12658
  }
12502
12659
  if (containsBytes(
12503
12660
  data,
12504
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12661
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12505
12662
  new Uint8Array([129, 112, 9, 43, 91, 154, 157, 135])
12506
12663
  ),
12507
12664
  0
@@ -12510,7 +12667,7 @@ function identifySatrushInstruction(instruction) {
12510
12667
  }
12511
12668
  if (containsBytes(
12512
12669
  data,
12513
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12670
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12514
12671
  new Uint8Array([1, 96, 199, 199, 107, 118, 193, 87])
12515
12672
  ),
12516
12673
  0
@@ -12519,7 +12676,7 @@ function identifySatrushInstruction(instruction) {
12519
12676
  }
12520
12677
  if (containsBytes(
12521
12678
  data,
12522
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12679
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12523
12680
  new Uint8Array([93, 12, 139, 55, 235, 88, 37, 117])
12524
12681
  ),
12525
12682
  0
@@ -12528,7 +12685,7 @@ function identifySatrushInstruction(instruction) {
12528
12685
  }
12529
12686
  if (containsBytes(
12530
12687
  data,
12531
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12688
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12532
12689
  new Uint8Array([252, 210, 238, 28, 169, 118, 28, 11])
12533
12690
  ),
12534
12691
  0
@@ -12537,7 +12694,7 @@ function identifySatrushInstruction(instruction) {
12537
12694
  }
12538
12695
  if (containsBytes(
12539
12696
  data,
12540
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12697
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12541
12698
  new Uint8Array([12, 130, 188, 85, 167, 187, 204, 183])
12542
12699
  ),
12543
12700
  0
@@ -12546,59 +12703,68 @@ function identifySatrushInstruction(instruction) {
12546
12703
  }
12547
12704
  if (containsBytes(
12548
12705
  data,
12549
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12706
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12707
+ new Uint8Array([0, 170, 26, 215, 156, 171, 22, 68])
12708
+ ),
12709
+ 0
12710
+ )) {
12711
+ return 34 /* UpdateDeployFees */;
12712
+ }
12713
+ if (containsBytes(
12714
+ data,
12715
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12550
12716
  new Uint8Array([2, 212, 246, 89, 139, 64, 104, 74])
12551
12717
  ),
12552
12718
  0
12553
12719
  )) {
12554
- return 34 /* UpdateDeploymentSettleGraceDuration */;
12720
+ return 35 /* UpdateDeploymentSettleGraceDuration */;
12555
12721
  }
12556
12722
  if (containsBytes(
12557
12723
  data,
12558
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12724
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12559
12725
  new Uint8Array([171, 103, 59, 229, 174, 188, 210, 121])
12560
12726
  ),
12561
12727
  0
12562
12728
  )) {
12563
- return 35 /* UpdateEpochVaultIterationDuration */;
12729
+ return 36 /* UpdateEpochVaultIterationDuration */;
12564
12730
  }
12565
12731
  if (containsBytes(
12566
12732
  data,
12567
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12733
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12568
12734
  new Uint8Array([187, 108, 89, 178, 249, 101, 187, 33])
12569
12735
  ),
12570
12736
  0
12571
12737
  )) {
12572
- return 36 /* UpdateMinDeployUsdAmount */;
12738
+ return 37 /* UpdateMinDeployUsdAmount */;
12573
12739
  }
12574
12740
  if (containsBytes(
12575
12741
  data,
12576
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12742
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12577
12743
  new Uint8Array([241, 172, 229, 62, 191, 163, 60, 186])
12578
12744
  ),
12579
12745
  0
12580
12746
  )) {
12581
- return 37 /* UpdateStrikeTriggerModulus */;
12747
+ return 38 /* UpdateStrikeTriggerModulus */;
12582
12748
  }
12583
12749
  if (containsBytes(
12584
12750
  data,
12585
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12751
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12586
12752
  new Uint8Array([237, 38, 26, 14, 73, 161, 208, 157])
12587
12753
  ),
12588
12754
  0
12589
12755
  )) {
12590
- return 38 /* UpdateUnclaimedHashrateBps */;
12756
+ return 39 /* UpdateUnclaimedHashrateBps */;
12591
12757
  }
12592
12758
  if (containsBytes(
12593
12759
  data,
12594
- fixEncoderSize66(getBytesEncoder78(), 8).encode(
12760
+ fixEncoderSize67(getBytesEncoder79(), 8).encode(
12595
12761
  new Uint8Array([11, 68, 165, 98, 18, 208, 134, 73])
12596
12762
  ),
12597
12763
  0
12598
12764
  )) {
12599
- return 39 /* WithdrawProtocolFees */;
12765
+ return 40 /* WithdrawProtocolFees */;
12600
12766
  }
12601
- throw new SolanaError41(
12767
+ throw new SolanaError42(
12602
12768
  SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION,
12603
12769
  { instructionData: data, programName: "satrush" }
12604
12770
  );
@@ -12844,50 +13010,57 @@ function parseSatrushInstruction(instruction) {
12844
13010
  ...parseUpdateBoardRoundDurationInstruction(instruction)
12845
13011
  };
12846
13012
  }
12847
- case 34 /* UpdateDeploymentSettleGraceDuration */: {
13013
+ case 34 /* UpdateDeployFees */: {
12848
13014
  assertIsInstructionWithAccounts(instruction);
12849
13015
  return {
12850
- instructionType: 34 /* UpdateDeploymentSettleGraceDuration */,
13016
+ instructionType: 34 /* UpdateDeployFees */,
13017
+ ...parseUpdateDeployFeesInstruction(instruction)
13018
+ };
13019
+ }
13020
+ case 35 /* UpdateDeploymentSettleGraceDuration */: {
13021
+ assertIsInstructionWithAccounts(instruction);
13022
+ return {
13023
+ instructionType: 35 /* UpdateDeploymentSettleGraceDuration */,
12851
13024
  ...parseUpdateDeploymentSettleGraceDurationInstruction(instruction)
12852
13025
  };
12853
13026
  }
12854
- case 35 /* UpdateEpochVaultIterationDuration */: {
13027
+ case 36 /* UpdateEpochVaultIterationDuration */: {
12855
13028
  assertIsInstructionWithAccounts(instruction);
12856
13029
  return {
12857
- instructionType: 35 /* UpdateEpochVaultIterationDuration */,
13030
+ instructionType: 36 /* UpdateEpochVaultIterationDuration */,
12858
13031
  ...parseUpdateEpochVaultIterationDurationInstruction(instruction)
12859
13032
  };
12860
13033
  }
12861
- case 36 /* UpdateMinDeployUsdAmount */: {
13034
+ case 37 /* UpdateMinDeployUsdAmount */: {
12862
13035
  assertIsInstructionWithAccounts(instruction);
12863
13036
  return {
12864
- instructionType: 36 /* UpdateMinDeployUsdAmount */,
13037
+ instructionType: 37 /* UpdateMinDeployUsdAmount */,
12865
13038
  ...parseUpdateMinDeployUsdAmountInstruction(instruction)
12866
13039
  };
12867
13040
  }
12868
- case 37 /* UpdateStrikeTriggerModulus */: {
13041
+ case 38 /* UpdateStrikeTriggerModulus */: {
12869
13042
  assertIsInstructionWithAccounts(instruction);
12870
13043
  return {
12871
- instructionType: 37 /* UpdateStrikeTriggerModulus */,
13044
+ instructionType: 38 /* UpdateStrikeTriggerModulus */,
12872
13045
  ...parseUpdateStrikeTriggerModulusInstruction(instruction)
12873
13046
  };
12874
13047
  }
12875
- case 38 /* UpdateUnclaimedHashrateBps */: {
13048
+ case 39 /* UpdateUnclaimedHashrateBps */: {
12876
13049
  assertIsInstructionWithAccounts(instruction);
12877
13050
  return {
12878
- instructionType: 38 /* UpdateUnclaimedHashrateBps */,
13051
+ instructionType: 39 /* UpdateUnclaimedHashrateBps */,
12879
13052
  ...parseUpdateUnclaimedHashrateBpsInstruction(instruction)
12880
13053
  };
12881
13054
  }
12882
- case 39 /* WithdrawProtocolFees */: {
13055
+ case 40 /* WithdrawProtocolFees */: {
12883
13056
  assertIsInstructionWithAccounts(instruction);
12884
13057
  return {
12885
- instructionType: 39 /* WithdrawProtocolFees */,
13058
+ instructionType: 40 /* WithdrawProtocolFees */,
12886
13059
  ...parseWithdrawProtocolFeesInstruction(instruction)
12887
13060
  };
12888
13061
  }
12889
13062
  default:
12890
- throw new SolanaError41(
13063
+ throw new SolanaError42(
12891
13064
  SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE,
12892
13065
  { instructionType, programName: "satrush" }
12893
13066
  );
@@ -12982,7 +13155,7 @@ function satrushProgram() {
12982
13155
  ),
12983
13156
  closeOneBtcTicket: (input) => addSelfPlanAndSendFunctions(
12984
13157
  client,
12985
- getCloseOneBtcTicketInstruction(input)
13158
+ getCloseOneBtcTicketInstructionAsync(input)
12986
13159
  ),
12987
13160
  closeRound: (input) => addSelfPlanAndSendFunctions(
12988
13161
  client,
@@ -13072,6 +13245,10 @@ function satrushProgram() {
13072
13245
  client,
13073
13246
  getUpdateBoardRoundDurationInstructionAsync(input)
13074
13247
  ),
13248
+ updateDeployFees: (input) => addSelfPlanAndSendFunctions(
13249
+ client,
13250
+ getUpdateDeployFeesInstructionAsync(input)
13251
+ ),
13075
13252
  updateDeploymentSettleGraceDuration: (input) => addSelfPlanAndSendFunctions(
13076
13253
  client,
13077
13254
  getUpdateDeploymentSettleGraceDurationInstructionAsync(input)
@@ -13172,6 +13349,8 @@ var SATRUSH_ERROR__INVALID_EPOCH_ITERATION_DURATION = 6048;
13172
13349
  var SATRUSH_ERROR__INVALID_UNCLAIMED_HASHRATE_BPS = 6049;
13173
13350
  var SATRUSH_ERROR__INVALID_STRIKE_TRIGGER_MODULUS = 6050;
13174
13351
  var SATRUSH_ERROR__INVALID_SWAP_BPS = 6051;
13352
+ var SATRUSH_ERROR__INVALID_MINT_DATA = 6052;
13353
+ var SATRUSH_ERROR__INVALID_DEPLOY_FEES = 6053;
13175
13354
  var satrushErrorMessages;
13176
13355
  if (process.env["NODE_ENV"] !== "production") {
13177
13356
  satrushErrorMessages = {
@@ -13196,9 +13375,11 @@ if (process.env["NODE_ENV"] !== "production") {
13196
13375
  [SATRUSH_ERROR__INVALID_AUTOMATION_AMOUNT]: `Automation amount must be greater than zero`,
13197
13376
  [SATRUSH_ERROR__INVALID_AUTOMATION_STRATEGY_MASK]: `Selection mask does not match the automation strategy`,
13198
13377
  [SATRUSH_ERROR__INVALID_CLAIM_AMOUNT]: `Claim amount must be greater than zero`,
13378
+ [SATRUSH_ERROR__INVALID_DEPLOY_FEES]: `Deploy fee legs must each be at least 1 bps and sum to exactly 800 bps`,
13199
13379
  [SATRUSH_ERROR__INVALID_DEPLOYMENT_AMOUNT]: `Deployment amount must be greater than zero`,
13200
13380
  [SATRUSH_ERROR__INVALID_ENTROPY]: `Entropy value is invalid`,
13201
13381
  [SATRUSH_ERROR__INVALID_EPOCH_ITERATION_DURATION]: `Epoch iteration duration must be greater than zero`,
13382
+ [SATRUSH_ERROR__INVALID_MINT_DATA]: `Mint account data is too short to contain the decimals field`,
13202
13383
  [SATRUSH_ERROR__INVALID_ROUND_DURATION]: `Round duration must be greater than zero`,
13203
13384
  [SATRUSH_ERROR__INVALID_ROUND_ID]: `Invalid round id supplied to create round`,
13204
13385
  [SATRUSH_ERROR__INVALID_SELECTION_MASK]: `Selection mask must pick between 1 and 21 tiles within the 21-bit range`,
@@ -13256,7 +13437,7 @@ import {
13256
13437
  getAddressEncoder as getAddressEncoder41,
13257
13438
  getProgramDerivedAddress as getProgramDerivedAddress35,
13258
13439
  getU16Encoder as getU16Encoder22,
13259
- getU32Encoder as getU32Encoder33
13440
+ getU32Encoder as getU32Encoder34
13260
13441
  } from "@solana/kit";
13261
13442
  async function getSatrushConfigAddress() {
13262
13443
  return await getProgramDerivedAddress35({
@@ -13279,7 +13460,7 @@ async function getBoardAddress() {
13279
13460
  async function getRoundAddress(roundId) {
13280
13461
  return await getProgramDerivedAddress35({
13281
13462
  programAddress: SATRUSH_PROGRAM_ADDRESS,
13282
- seeds: ["round", getU32Encoder33().encode(roundId)]
13463
+ seeds: ["round", getU32Encoder34().encode(roundId)]
13283
13464
  });
13284
13465
  }
13285
13466
  async function getPublicDeploymentAddress(authority, roundId) {
@@ -13288,7 +13469,7 @@ async function getPublicDeploymentAddress(authority, roundId) {
13288
13469
  seeds: [
13289
13470
  "public_deployment",
13290
13471
  getAddressEncoder41().encode(authority),
13291
- getU32Encoder33().encode(roundId)
13472
+ getU32Encoder34().encode(roundId)
13292
13473
  ]
13293
13474
  });
13294
13475
  }
@@ -13313,7 +13494,7 @@ async function getEpochVaultAddress() {
13313
13494
  async function getEpochVaultIterationAddress(iterationId) {
13314
13495
  return await getProgramDerivedAddress35({
13315
13496
  programAddress: SATRUSH_PROGRAM_ADDRESS,
13316
- seeds: ["epoch_vault_iteration", getU32Encoder33().encode(iterationId)]
13497
+ seeds: ["epoch_vault_iteration", getU32Encoder34().encode(iterationId)]
13317
13498
  });
13318
13499
  }
13319
13500
  async function getEpochVaultEntryAddress(iterationId, authority) {
@@ -13321,7 +13502,7 @@ async function getEpochVaultEntryAddress(iterationId, authority) {
13321
13502
  programAddress: SATRUSH_PROGRAM_ADDRESS,
13322
13503
  seeds: [
13323
13504
  "epoch_vault_entry",
13324
- getU32Encoder33().encode(iterationId),
13505
+ getU32Encoder34().encode(iterationId),
13325
13506
  getAddressEncoder41().encode(authority)
13326
13507
  ]
13327
13508
  });
@@ -13331,7 +13512,7 @@ async function getEpochVaultPageAddress(iterationId, pageIndex) {
13331
13512
  programAddress: SATRUSH_PROGRAM_ADDRESS,
13332
13513
  seeds: [
13333
13514
  "epoch_vault_page",
13334
- getU32Encoder33().encode(iterationId),
13515
+ getU32Encoder34().encode(iterationId),
13335
13516
  getU16Encoder22().encode(pageIndex)
13336
13517
  ]
13337
13518
  });
@@ -13345,7 +13526,7 @@ async function getOneBtcVaultAddress() {
13345
13526
  async function getOneBtcVaultIterationAddress(iterationId) {
13346
13527
  return await getProgramDerivedAddress35({
13347
13528
  programAddress: SATRUSH_PROGRAM_ADDRESS,
13348
- seeds: ["one_btc_vault_iteration", getU32Encoder33().encode(iterationId)]
13529
+ seeds: ["one_btc_vault_iteration", getU32Encoder34().encode(iterationId)]
13349
13530
  });
13350
13531
  }
13351
13532
  async function getTreasuryAddress() {
@@ -13512,6 +13693,8 @@ var HASHRATE_DECIMALS = 2;
13512
13693
  var HASHRATE_PER_TICKET = 100n;
13513
13694
  var LOYALTY_WEIGHT = 1n;
13514
13695
  var SKILL_WEIGHT = 1n;
13696
+ var STRIKE_BOOST_ROUNDS = 240;
13697
+ var STRIKE_BOOST_HASHRATE_MULTIPLIER = 2n;
13515
13698
  function getHashrateUiAmount(hashrate) {
13516
13699
  assertU64(hashrate, "hashrate");
13517
13700
  const whole = hashrate / HASHRATE_PER_TICKET;
@@ -13527,9 +13710,10 @@ var ZERO_REWARD = {
13527
13710
  skillPoints: 0n,
13528
13711
  total: 0n
13529
13712
  };
13530
- function hashrateReward(stake, streak, covered, totalTiles, usdUnit) {
13713
+ function hashrateReward(stake, streak, covered, totalTiles, usdUnit, hashrateMultiplier = 1n) {
13531
13714
  assertU64(stake, "stake");
13532
13715
  assertU64(usdUnit, "usdUnit");
13716
+ assertU64(hashrateMultiplier, "hashrateMultiplier");
13533
13717
  if (stake === 0n || covered === 0) {
13534
13718
  return ZERO_REWARD;
13535
13719
  }
@@ -13537,9 +13721,9 @@ function hashrateReward(stake, streak, covered, totalTiles, usdUnit) {
13537
13721
  const denom = coveredBig * usdUnit;
13538
13722
  const skillNum = stake * (SKILL_WEIGHT * BigInt(totalTiles));
13539
13723
  const loyaltyNum = stake * (LOYALTY_WEIGHT * BigInt(streak) * coveredBig);
13540
- const total = (loyaltyNum + skillNum) / denom;
13724
+ const total = (loyaltyNum + skillNum) / denom * hashrateMultiplier;
13541
13725
  assertU64(total, "hashrate reward total");
13542
- const skillPoints = skillNum / denom;
13726
+ const skillPoints = skillNum / denom * hashrateMultiplier;
13543
13727
  const loyaltyPoints = total - skillPoints;
13544
13728
  return { loyaltyPoints, skillPoints, total };
13545
13729
  }
@@ -13681,8 +13865,10 @@ export {
13681
13865
  SATRUSH_ERROR__INVALID_AUTOMATION_STRATEGY_MASK,
13682
13866
  SATRUSH_ERROR__INVALID_CLAIM_AMOUNT,
13683
13867
  SATRUSH_ERROR__INVALID_DEPLOYMENT_AMOUNT,
13868
+ SATRUSH_ERROR__INVALID_DEPLOY_FEES,
13684
13869
  SATRUSH_ERROR__INVALID_ENTROPY,
13685
13870
  SATRUSH_ERROR__INVALID_EPOCH_ITERATION_DURATION,
13871
+ SATRUSH_ERROR__INVALID_MINT_DATA,
13686
13872
  SATRUSH_ERROR__INVALID_ROUND_DURATION,
13687
13873
  SATRUSH_ERROR__INVALID_ROUND_ID,
13688
13874
  SATRUSH_ERROR__INVALID_SELECTION_MASK,
@@ -13718,6 +13904,8 @@ export {
13718
13904
  SETTLE_DEPLOY_PUBLIC_DISCRIMINATOR,
13719
13905
  SHARE_OFFSET,
13720
13906
  SKILL_WEIGHT,
13907
+ STRIKE_BOOST_HASHRATE_MULTIPLIER,
13908
+ STRIKE_BOOST_ROUNDS,
13721
13909
  SWAP_EPOCH_STAKE_DISCRIMINATOR,
13722
13910
  SWAP_ONE_BTC_STAKE_DISCRIMINATOR,
13723
13911
  SWAP_ROUND_STAKE_DISCRIMINATOR,
@@ -13731,6 +13919,7 @@ export {
13731
13919
  TRIGGER_ONE_BTC_DRAW_DISCRIMINATOR,
13732
13920
  UPDATE_BOARD_ROUND_DURATION_DISCRIMINATOR,
13733
13921
  UPDATE_DEPLOYMENT_SETTLE_GRACE_DURATION_DISCRIMINATOR,
13922
+ UPDATE_DEPLOY_FEES_DISCRIMINATOR,
13734
13923
  UPDATE_EPOCH_VAULT_ITERATION_DURATION_DISCRIMINATOR,
13735
13924
  UPDATE_MIN_DEPLOY_USD_AMOUNT_DISCRIMINATOR,
13736
13925
  UPDATE_STRIKE_TRIGGER_MODULUS_DISCRIMINATOR,
@@ -13909,6 +14098,7 @@ export {
13909
14098
  getCloseOneBtcIterationInstructionDataEncoder,
13910
14099
  getCloseOneBtcTicketDiscriminatorBytes,
13911
14100
  getCloseOneBtcTicketInstruction,
14101
+ getCloseOneBtcTicketInstructionAsync,
13912
14102
  getCloseOneBtcTicketInstructionDataCodec,
13913
14103
  getCloseOneBtcTicketInstructionDataDecoder,
13914
14104
  getCloseOneBtcTicketInstructionDataEncoder,
@@ -14174,6 +14364,12 @@ export {
14174
14364
  getUpdateBoardRoundDurationInstructionDataCodec,
14175
14365
  getUpdateBoardRoundDurationInstructionDataDecoder,
14176
14366
  getUpdateBoardRoundDurationInstructionDataEncoder,
14367
+ getUpdateDeployFeesDiscriminatorBytes,
14368
+ getUpdateDeployFeesInstruction,
14369
+ getUpdateDeployFeesInstructionAsync,
14370
+ getUpdateDeployFeesInstructionDataCodec,
14371
+ getUpdateDeployFeesInstructionDataDecoder,
14372
+ getUpdateDeployFeesInstructionDataEncoder,
14177
14373
  getUpdateDeploymentSettleGraceDurationDiscriminatorBytes,
14178
14374
  getUpdateDeploymentSettleGraceDurationInstruction,
14179
14375
  getUpdateDeploymentSettleGraceDurationInstructionAsync,
@@ -14253,6 +14449,7 @@ export {
14253
14449
  parseTriggerEpochDrawInstruction,
14254
14450
  parseTriggerOneBtcDrawInstruction,
14255
14451
  parseUpdateBoardRoundDurationInstruction,
14452
+ parseUpdateDeployFeesInstruction,
14256
14453
  parseUpdateDeploymentSettleGraceDurationInstruction,
14257
14454
  parseUpdateEpochVaultIterationDurationInstruction,
14258
14455
  parseUpdateMinDeployUsdAmountInstruction,