@lucid-agents/taskmarket 1.49.0 → 1.50.0

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.
Files changed (25) hide show
  1. package/dist/agent-compatibility.json +1 -1
  2. package/dist/{api-3AM2K2OD.js → api-SXHSD3WO.js} +2 -2
  3. package/dist/{channels-UVUKKHEH.js → channels-4YOMV7R7.js} +4 -4
  4. package/dist/{chunk-ZI6J2FVP.js → chunk-6VZBAHQC.js} +3 -3
  5. package/dist/{chunk-JJWVZVQL.js → chunk-C7557KRB.js} +1 -1
  6. package/dist/{chunk-4PIW55SU.js → chunk-CGUFHUIV.js} +1 -1
  7. package/dist/{chunk-QASNNRSL.js → chunk-EJ7KUYME.js} +36 -21
  8. package/dist/{chunk-E7DQ6PHQ.js → chunk-EVCG557X.js} +1 -1
  9. package/dist/{chunk-ZBIB5Z72.js → chunk-EYHXTVYK.js} +2 -2
  10. package/dist/{chunk-VROY6UJU.js → chunk-FGW2NNPQ.js} +3 -3
  11. package/dist/{chunk-BD7EUFMK.js → chunk-M5WTLXDY.js} +1 -1
  12. package/dist/{chunk-KMDMP37P.js → chunk-MY5CD4PT.js} +8 -8
  13. package/dist/{chunk-JPFNNGT5.js → chunk-PZI3QQO4.js} +5 -5
  14. package/dist/{chunk-IPLFBE4Z.js → chunk-V5S4LCIE.js} +4 -4
  15. package/dist/{chunk-5FEFXZWX.js → chunk-YBSZTSJE.js} +1 -1
  16. package/dist/{doctor-62ESHY26.js → doctor-FACAMASV.js} +9 -9
  17. package/dist/index.js +833 -1833
  18. package/dist/{launch-QN325T4P.js → launch-K5666QYB.js} +11 -11
  19. package/dist/pi-extensions/xgate.cjs +118 -118
  20. package/dist/{read-auth-YVFCEAQN.js → read-auth-EFE6NQFG.js} +3 -3
  21. package/dist/{reconcile-ZQUH7Z7P.js → reconcile-Q4MJXXR3.js} +4 -4
  22. package/dist/{status-BCKUXLAQ.js → status-YKFKGTMQ.js} +9 -9
  23. package/dist/{sync-pull-YDX4D4XW.js → sync-pull-AN2M344W.js} +4 -4
  24. package/dist/{task-access-grants-Z2P4RHFL.js → task-access-grants-MN5WXHHQ.js} +2 -2
  25. package/package.json +8 -11
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  listWorkerSubmissions,
15
15
  submitTaskFiles,
16
16
  taskRequirementsOf
17
- } from "./chunk-KMDMP37P.js";
17
+ } from "./chunk-MY5CD4PT.js";
18
18
  import {
19
19
  ComputeCreditError,
20
20
  applyComputeCreditSetup,
@@ -43,14 +43,14 @@ import {
43
43
  withSelectedChain,
44
44
  x402FeePost,
45
45
  x402PaymentProtocol
46
- } from "./chunk-IPLFBE4Z.js";
46
+ } from "./chunk-V5S4LCIE.js";
47
47
  import {
48
48
  signReadAuth
49
- } from "./chunk-ZBIB5Z72.js";
49
+ } from "./chunk-EYHXTVYK.js";
50
50
  import {
51
51
  saveTaskAccessGrant,
52
52
  taskAccessGrantHeaders
53
- } from "./chunk-BD7EUFMK.js";
53
+ } from "./chunk-M5WTLXDY.js";
54
54
  import {
55
55
  MPP_TEMPO_DEFAULT_VALIDITY_SECONDS,
56
56
  X402PayError,
@@ -69,7 +69,7 @@ import {
69
69
  setX402PolicyRuleEnabled,
70
70
  signSponsoredTempoTransfer,
71
71
  signTaskmarketFeePayment
72
- } from "./chunk-JJWVZVQL.js";
72
+ } from "./chunk-C7557KRB.js";
73
73
  import {
74
74
  ALL_NETWORKS,
75
75
  ApiError,
@@ -135,7 +135,7 @@ import {
135
135
  withErrorContext,
136
136
  withIdempotentWrite,
137
137
  withTapSignature
138
- } from "./chunk-E7DQ6PHQ.js";
138
+ } from "./chunk-EVCG557X.js";
139
139
  import {
140
140
  AGENT_AVATAR_MAX_BYTES,
141
141
  AGENT_HIRES_ROLES,
@@ -409,7 +409,7 @@ import {
409
409
  vaultCallGasLimit7702,
410
410
  verifiersUnsupportedOnChain,
411
411
  viemChainFor
412
- } from "./chunk-QASNNRSL.js";
412
+ } from "./chunk-EJ7KUYME.js";
413
413
  import "./chunk-S7SJMJ2I.js";
414
414
 
415
415
  // src/index.ts
@@ -668,16 +668,16 @@ function recoverableFailure(message, status) {
668
668
  const quoted = /"amount":"(\d+)"/.exec(message)?.[1];
669
669
  const required = quoted !== void 0 ? BigInt(quoted) : void 0;
670
670
  const chainId = selectedNetworkOrUndefined()?.chainId;
671
- let address3;
671
+ let address2;
672
672
  try {
673
673
  const keystore = JSON.parse(fs2.readFileSync(getKeystorePath(), "utf8"));
674
- if (typeof keystore.walletAddress === "string") address3 = keystore.walletAddress;
674
+ if (typeof keystore.walletAddress === "string") address2 = keystore.walletAddress;
675
675
  } catch {
676
676
  }
677
677
  return {
678
678
  code: "insufficient_funds",
679
679
  next: nextForInsufficientFunds(
680
- address3 !== void 0 && chainId !== void 0 ? { address: address3, chainId } : void 0,
680
+ address2 !== void 0 && chainId !== void 0 ? { address: address2, chainId } : void 0,
681
681
  required
682
682
  ),
683
683
  ...quoted !== void 0 ? { required: { baseUnits: quoted } } : {}
@@ -771,10 +771,10 @@ function agentIdForChain(keystore, chainId) {
771
771
  function withAgentIdForChain(keystore, chainId, agentId) {
772
772
  return { ...keystore, agentIds: { ...keystore.agentIds, [String(chainId)]: agentId } };
773
773
  }
774
- async function lookupAgentId(address3, chainId = selectedNetwork().chainId) {
774
+ async function lookupAgentId(address2, chainId = selectedNetwork().chainId) {
775
775
  try {
776
776
  const res = await fetch(
777
- `${apiUrl()}/api/identity/status?address=${address3}&chainId=${chainId}`
777
+ `${apiUrl()}/api/identity/status?address=${address2}&chainId=${chainId}`
778
778
  );
779
779
  if (!res.ok) return null;
780
780
  const data = await res.json();
@@ -783,12 +783,12 @@ async function lookupAgentId(address3, chainId = selectedNetwork().chainId) {
783
783
  return null;
784
784
  }
785
785
  }
786
- async function pollAgentId(address3, maxWaitMs = 6e4) {
786
+ async function pollAgentId(address2, maxWaitMs = 6e4) {
787
787
  const interval = 3e3;
788
788
  const deadline = Date.now() + maxWaitMs;
789
789
  while (Date.now() < deadline) {
790
790
  await new Promise((r) => setTimeout(r, interval));
791
- const agentId = await lookupAgentId(address3);
791
+ const agentId = await lookupAgentId(address2);
792
792
  if (agentId) return agentId;
793
793
  }
794
794
  return null;
@@ -1867,11 +1867,11 @@ function getErrorMessage(code, context = {}) {
1867
1867
  return `${decodingAdviceMessage}\``;
1868
1868
  }
1869
1869
  }
1870
- function isSolanaError(e5, code) {
1871
- const isSolanaError22 = e5 instanceof Error && e5.name === "SolanaError";
1872
- if (isSolanaError22) {
1870
+ function isSolanaError(e4, code) {
1871
+ const isSolanaError2 = e4 instanceof Error && e4.name === "SolanaError";
1872
+ if (isSolanaError2) {
1873
1873
  if (code !== void 0) {
1874
- return e5.context.__code === code;
1874
+ return e4.context.__code === code;
1875
1875
  }
1876
1876
  return true;
1877
1877
  }
@@ -2428,10 +2428,10 @@ function decodeAccount(encodedAccount, decoder) {
2428
2428
  });
2429
2429
  }
2430
2430
  }
2431
- function parseBase64RpcAccount(address3, rpcAccount) {
2432
- if (!rpcAccount) return Object.freeze({ address: address3, exists: false });
2431
+ function parseBase64RpcAccount(address2, rpcAccount) {
2432
+ if (!rpcAccount) return Object.freeze({ address: address2, exists: false });
2433
2433
  const data = getBase64Encoder().encode(rpcAccount.data[0]);
2434
- return Object.freeze({ ...parseBaseAccount(rpcAccount), address: address3, data, exists: true });
2434
+ return Object.freeze({ ...parseBaseAccount(rpcAccount), address: address2, data, exists: true });
2435
2435
  }
2436
2436
  function parseBaseAccount(rpcAccount) {
2437
2437
  return Object.freeze({
@@ -2441,10 +2441,10 @@ function parseBaseAccount(rpcAccount) {
2441
2441
  space: rpcAccount.space
2442
2442
  });
2443
2443
  }
2444
- async function fetchEncodedAccount(rpc, address3, config = {}) {
2444
+ async function fetchEncodedAccount(rpc, address2, config = {}) {
2445
2445
  const { abortSignal, ...rpcConfig } = config;
2446
- const response = await rpc.getAccountInfo(address3, { ...rpcConfig, encoding: "base64" }).send({ abortSignal });
2447
- return parseBase64RpcAccount(address3, response.value);
2446
+ const response = await rpc.getAccountInfo(address2, { ...rpcConfig, encoding: "base64" }).send({ abortSignal });
2447
+ return parseBase64RpcAccount(address2, response.value);
2448
2448
  }
2449
2449
 
2450
2450
  // ../../node_modules/.pnpm/@solana+assertions@8.4.0_typescript@5.7.3/node_modules/@solana/assertions/dist/index.node.mjs
@@ -2694,16 +2694,16 @@ async function getProgramDerivedAddress({
2694
2694
  let bumpSeed = 255;
2695
2695
  while (bumpSeed > 0) {
2696
2696
  try {
2697
- const address22 = await createProgramDerivedAddress({
2697
+ const address2 = await createProgramDerivedAddress({
2698
2698
  programAddress,
2699
2699
  seeds: [...seeds, new Uint8Array([bumpSeed])]
2700
2700
  });
2701
- return [address22, bumpSeed];
2702
- } catch (e5) {
2703
- if (isSolanaError(e5, SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE)) {
2701
+ return [address2, bumpSeed];
2702
+ } catch (e4) {
2703
+ if (isSolanaError(e4, SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE)) {
2704
2704
  bumpSeed--;
2705
2705
  } else {
2706
- throw e5;
2706
+ throw e4;
2707
2707
  }
2708
2708
  }
2709
2709
  }
@@ -3224,16 +3224,16 @@ function pipe(init, ...fns) {
3224
3224
  }
3225
3225
 
3226
3226
  // ../../node_modules/.pnpm/@solana+instructions@8.4.0_typescript@5.7.3/node_modules/@solana/instructions/dist/index.node.mjs
3227
- var AccountRole = /* @__PURE__ */ ((AccountRole22) => {
3228
- AccountRole22[AccountRole22["WRITABLE_SIGNER"] = /* 3 */
3227
+ var AccountRole = /* @__PURE__ */ ((AccountRole2) => {
3228
+ AccountRole2[AccountRole2["WRITABLE_SIGNER"] = /* 3 */
3229
3229
  3] = "WRITABLE_SIGNER";
3230
- AccountRole22[AccountRole22["READONLY_SIGNER"] = /* 2 */
3230
+ AccountRole2[AccountRole2["READONLY_SIGNER"] = /* 2 */
3231
3231
  2] = "READONLY_SIGNER";
3232
- AccountRole22[AccountRole22["WRITABLE"] = /* 1 */
3232
+ AccountRole2[AccountRole2["WRITABLE"] = /* 1 */
3233
3233
  1] = "WRITABLE";
3234
- AccountRole22[AccountRole22["READONLY"] = /* 0 */
3234
+ AccountRole2[AccountRole2["READONLY"] = /* 0 */
3235
3235
  0] = "READONLY";
3236
- return AccountRole22;
3236
+ return AccountRole2;
3237
3237
  })(AccountRole || {});
3238
3238
  var IS_SIGNER_BITMASK = 2;
3239
3239
  var IS_WRITABLE_BITMASK = 1;
@@ -3523,8 +3523,8 @@ function getCompiledTransactionMessageEncoder() {
3523
3523
  }
3524
3524
  );
3525
3525
  }
3526
- function upsert(addressMap, address3, update) {
3527
- addressMap[address3] = update(addressMap[address3] ?? { role: AccountRole.READONLY });
3526
+ function upsert(addressMap, address2, update) {
3527
+ addressMap[address2] = update(addressMap[address2] ?? { role: AccountRole.READONLY });
3528
3528
  }
3529
3529
  var TYPE2 = /* @__PURE__ */ Symbol("AddressMapTypeProperty");
3530
3530
  function getAddressMapFromInstructions(feePayer, instructions) {
@@ -3638,8 +3638,8 @@ function getOrderedAccountsFromAddressMap(addressMap) {
3638
3638
  }
3639
3639
  addressComparator ||= getAddressComparator();
3640
3640
  return addressComparator(leftAddress, rightAddress);
3641
- }).map(([address3, addressMeta]) => ({
3642
- address: address3,
3641
+ }).map(([address2, addressMeta]) => ({
3642
+ address: address2,
3643
3643
  ...addressMeta
3644
3644
  }));
3645
3645
  return orderedAccounts;
@@ -3680,7 +3680,7 @@ function getCompiledInstructions(instructions, orderedAccounts) {
3680
3680
  return instructions.map(({ accounts, data, programAddress }) => {
3681
3681
  return {
3682
3682
  programAddressIndex: accountIndex[programAddress],
3683
- ...accounts ? { accountIndices: accounts.map(({ address: address3 }) => accountIndex[address3]) } : null,
3683
+ ...accounts ? { accountIndices: accounts.map(({ address: address2 }) => accountIndex[address2]) } : null,
3684
3684
  ...data ? { data } : null
3685
3685
  };
3686
3686
  });
@@ -3737,8 +3737,8 @@ function compileTransactionMessage(transactionMessage) {
3737
3737
  version: transactionMessage.version
3738
3738
  };
3739
3739
  }
3740
- function upsert2(addressMap, address3, update) {
3741
- addressMap[address3] = update(addressMap[address3] ?? { role: AccountRole.READONLY });
3740
+ function upsert2(addressMap, address2, update) {
3741
+ addressMap[address2] = update(addressMap[address2] ?? { role: AccountRole.READONLY });
3742
3742
  }
3743
3743
  var TYPE22 = /* @__PURE__ */ Symbol("AddressMapTypeProperty");
3744
3744
  function getAddressMapFromInstructions2(feePayer, instructions) {
@@ -3906,8 +3906,8 @@ function getOrderedAccountsFromAddressMap2(addressMap) {
3906
3906
  } else {
3907
3907
  return addressComparator(leftAddress, rightAddress);
3908
3908
  }
3909
- }).map(([address3, addressMeta]) => ({
3910
- address: address3,
3909
+ }).map(([address2, addressMeta]) => ({
3910
+ address: address2,
3911
3911
  ...addressMeta
3912
3912
  }));
3913
3913
  return orderedAccounts;
@@ -3945,7 +3945,7 @@ function getCompiledInstructions2(instructions, orderedAccounts) {
3945
3945
  return instructions.map(({ accounts, data, programAddress }) => {
3946
3946
  return {
3947
3947
  programAddressIndex: accountIndex[programAddress],
3948
- ...accounts ? { accountIndices: accounts.map(({ address: address3 }) => accountIndex[address3]) } : null,
3948
+ ...accounts ? { accountIndices: accounts.map(({ address: address2 }) => accountIndex[address2]) } : null,
3949
3949
  ...data ? { data } : null
3950
3950
  };
3951
3951
  });
@@ -3953,7 +3953,7 @@ function getCompiledInstructions2(instructions, orderedAccounts) {
3953
3953
  function getCompiledStaticAccounts(orderedAccounts) {
3954
3954
  const firstLookupTableAccountIndex = orderedAccounts.findIndex((account) => "lookupTableAddress" in account);
3955
3955
  const orderedStaticAccounts = firstLookupTableAccountIndex === -1 ? orderedAccounts : orderedAccounts.slice(0, firstLookupTableAccountIndex);
3956
- return orderedStaticAccounts.map(({ address: address3 }) => address3);
3956
+ return orderedStaticAccounts.map(({ address: address2 }) => address2);
3957
3957
  }
3958
3958
  function compileTransactionMessage2(transactionMessage) {
3959
3959
  const addressMap = getAddressMapFromInstructions2(
@@ -4036,7 +4036,7 @@ function getInstructionHeader(instruction, accountIndex) {
4036
4036
  }
4037
4037
  function getInstructionPayload(instruction, accountIndex) {
4038
4038
  return {
4039
- instructionAccountIndices: instruction.accounts?.map(({ address: address3 }) => accountIndex[address3]) ?? [],
4039
+ instructionAccountIndices: instruction.accounts?.map(({ address: address2 }) => accountIndex[address2]) ?? [],
4040
4040
  instructionData: instruction.data ?? new Uint8Array()
4041
4041
  };
4042
4042
  }
@@ -4486,11 +4486,11 @@ async function partiallySignTransaction(keyPairs, transaction) {
4486
4486
  let unexpectedSigners;
4487
4487
  await Promise.all(
4488
4488
  keyPairs.map(async (keyPair) => {
4489
- const address3 = await getAddressFromPublicKey(keyPair.publicKey);
4490
- const existingSignature = transaction.signatures[address3];
4489
+ const address2 = await getAddressFromPublicKey(keyPair.publicKey);
4490
+ const existingSignature = transaction.signatures[address2];
4491
4491
  if (existingSignature === void 0) {
4492
4492
  unexpectedSigners ||= /* @__PURE__ */ new Set();
4493
- unexpectedSigners.add(address3);
4493
+ unexpectedSigners.add(address2);
4494
4494
  return;
4495
4495
  }
4496
4496
  if (unexpectedSigners) {
@@ -4501,7 +4501,7 @@ async function partiallySignTransaction(keyPairs, transaction) {
4501
4501
  return;
4502
4502
  }
4503
4503
  newSignatures ||= {};
4504
- newSignatures[address3] = newSignature;
4504
+ newSignatures[address2] = newSignature;
4505
4505
  })
4506
4506
  );
4507
4507
  if (unexpectedSigners && unexpectedSigners.size > 0) {
@@ -4524,9 +4524,9 @@ async function partiallySignTransaction(keyPairs, transaction) {
4524
4524
  }
4525
4525
  function assertIsFullySignedTransaction(transaction) {
4526
4526
  const missingSigs = [];
4527
- Object.entries(transaction.signatures).forEach(([address3, signatureBytes2]) => {
4527
+ Object.entries(transaction.signatures).forEach(([address2, signatureBytes2]) => {
4528
4528
  if (!signatureBytes2) {
4529
- missingSigs.push(address3);
4529
+ missingSigs.push(address2);
4530
4530
  }
4531
4531
  });
4532
4532
  if (missingSigs.length > 0) {
@@ -5727,19 +5727,19 @@ function setTransactionMessageFeePayerSigner(feePayer, transactionMessage) {
5727
5727
  return out;
5728
5728
  }
5729
5729
  async function createSignerFromKeyPair(keyPair) {
5730
- const address3 = await getAddressFromPublicKey(keyPair.publicKey);
5730
+ const address2 = await getAddressFromPublicKey(keyPair.publicKey);
5731
5731
  const out = {
5732
- address: address3,
5732
+ address: address2,
5733
5733
  keyPair,
5734
5734
  signMessages: (messages) => Promise.all(
5735
5735
  messages.map(
5736
- async (message) => Object.freeze({ [address3]: await signBytes(keyPair.privateKey, message.content) })
5736
+ async (message) => Object.freeze({ [address2]: await signBytes(keyPair.privateKey, message.content) })
5737
5737
  )
5738
5738
  ),
5739
5739
  signTransactions: (transactions) => Promise.all(
5740
5740
  transactions.map(async (transaction) => {
5741
5741
  const signedTransaction = await partiallySignTransaction([keyPair], transaction);
5742
- return Object.freeze({ [address3]: signedTransaction.signatures[address3] });
5742
+ return Object.freeze({ [address2]: signedTransaction.signatures[address2] });
5743
5743
  })
5744
5744
  )
5745
5745
  };
@@ -5751,9 +5751,9 @@ async function createKeyPairSignerFromBytes(bytes, extractable) {
5751
5751
  async function createKeyPairSignerFromPrivateKeyBytes(bytes, extractable) {
5752
5752
  return await createSignerFromKeyPair(await createKeyPairFromPrivateKeyBytes(bytes, extractable));
5753
5753
  }
5754
- function createNoopSigner(address3) {
5754
+ function createNoopSigner(address2) {
5755
5755
  const out = {
5756
- address: address3,
5756
+ address: address2,
5757
5757
  signMessages: (messages) => Promise.resolve(messages.map(() => Object.freeze({}))),
5758
5758
  signTransactions: (transactions) => Promise.resolve(transactions.map(() => Object.freeze({})))
5759
5759
  };
@@ -5834,1366 +5834,10 @@ async function signModifyingAndPartialTransactionSigners(transaction, modifyingS
5834
5834
  }
5835
5835
  var o2 = globalThis.TextEncoder;
5836
5836
 
5837
- // ../../node_modules/.pnpm/@solana+errors@8.4.0_typescript@6.0.3/node_modules/@solana/errors/dist/index.node.mjs
5838
- var SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED2 = 1;
5839
- var SOLANA_ERROR__INVALID_NONCE2 = 2;
5840
- var SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND2 = 3;
5841
- var SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE2 = 4;
5842
- var SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH2 = 5;
5843
- var SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE2 = 6;
5844
- var SOLANA_ERROR__MALFORMED_BIGINT_STRING2 = 7;
5845
- var SOLANA_ERROR__MALFORMED_NUMBER_STRING2 = 8;
5846
- var SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE2 = 9;
5847
- var SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR2 = 10;
5848
- var SOLANA_ERROR__FAILED_TO_SEND_TRANSACTION2 = 11;
5849
- var SOLANA_ERROR__FAILED_TO_SEND_TRANSACTIONS2 = 12;
5850
- var SOLANA_ERROR__FAILED_TO_SIGN_TRANSACTION2 = 13;
5851
- var SOLANA_ERROR__FAILED_TO_SIGN_TRANSACTIONS2 = 14;
5852
- var SOLANA_ERROR__JSON_RPC__PARSE_ERROR2 = -32700;
5853
- var SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR2 = -32603;
5854
- var SOLANA_ERROR__JSON_RPC__INVALID_PARAMS2 = -32602;
5855
- var SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND2 = -32601;
5856
- var SOLANA_ERROR__JSON_RPC__INVALID_REQUEST2 = -32600;
5857
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SLOT_HISTORY2 = -32021;
5858
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_FILTER_TRANSACTION_NOT_FOUND2 = -32020;
5859
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_UNREACHABLE2 = -32019;
5860
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_NOT_EPOCH_BOUNDARY2 = -32018;
5861
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_EPOCH_REWARDS_PERIOD_ACTIVE2 = -32017;
5862
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED2 = -32016;
5863
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION2 = -32015;
5864
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET2 = -32014;
5865
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH2 = -32013;
5866
- var SOLANA_ERROR__JSON_RPC__SCAN_ERROR2 = -32012;
5867
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE2 = -32011;
5868
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX2 = -32010;
5869
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED2 = -32009;
5870
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT2 = -32008;
5871
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED2 = -32007;
5872
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE2 = -32006;
5873
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY2 = -32005;
5874
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE2 = -32004;
5875
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE2 = -32003;
5876
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE2 = -32002;
5877
- var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP2 = -32001;
5878
- var SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH2 = 28e5;
5879
- var SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE2 = 2800001;
5880
- var SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS2 = 2800002;
5881
- var SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY2 = 2800003;
5882
- var SOLANA_ERROR__ADDRESSES__MALFORMED_PDA2 = 2800004;
5883
- var SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE2 = 2800005;
5884
- var SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED2 = 2800006;
5885
- var SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED2 = 2800007;
5886
- var SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE2 = 2800008;
5887
- var SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED2 = 2800009;
5888
- var SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER2 = 2800010;
5889
- var SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS2 = 2800011;
5890
- var SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND2 = 323e4;
5891
- var SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND2 = 32300001;
5892
- var SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT2 = 3230002;
5893
- var SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT2 = 3230003;
5894
- var SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED2 = 3230004;
5895
- var SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT2 = 361e4;
5896
- var SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED2 = 3610001;
5897
- var SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED2 = 3610002;
5898
- var SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED2 = 3610003;
5899
- var SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED2 = 3610004;
5900
- var SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED2 = 3610005;
5901
- var SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED2 = 3610006;
5902
- var SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY2 = 3610007;
5903
- var SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED2 = 3611e3;
5904
- var SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH2 = 3704e3;
5905
- var SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH2 = 3704001;
5906
- var SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH2 = 3704002;
5907
- var SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE2 = 3704003;
5908
- var SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY2 = 3704004;
5909
- var SOLANA_ERROR__KEYS__INVALID_BASE58_IN_GRIND_REGEX2 = 3704005;
5910
- var SOLANA_ERROR__KEYS__WRITE_KEY_PAIR_UNSUPPORTED_ENVIRONMENT2 = 3704006;
5911
- var SOLANA_ERROR__FS__UNSUPPORTED_ENVIRONMENT2 = 3712e3;
5912
- var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS2 = 4128e3;
5913
- var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA2 = 4128001;
5914
- var SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH2 = 4128002;
5915
- var SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN2 = 4615e3;
5916
- var SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR2 = 4615001;
5917
- var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT2 = 4615002;
5918
- var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA2 = 4615003;
5919
- var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA2 = 4615004;
5920
- var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL2 = 4615005;
5921
- var SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS2 = 4615006;
5922
- var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID2 = 4615007;
5923
- var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE2 = 4615008;
5924
- var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED2 = 4615009;
5925
- var SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT2 = 4615010;
5926
- var SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION2 = 4615011;
5927
- var SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID2 = 4615012;
5928
- var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND2 = 4615013;
5929
- var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED2 = 4615014;
5930
- var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE2 = 4615015;
5931
- var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED2 = 4615016;
5932
- var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX2 = 4615017;
5933
- var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED2 = 4615018;
5934
- var SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED2 = 4615019;
5935
- var SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS2 = 4615020;
5936
- var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED2 = 4615021;
5937
- var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE2 = 4615022;
5938
- var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED2 = 4615023;
5939
- var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING2 = 4615024;
5940
- var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC2 = 4615025;
5941
- var SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM2 = 4615026;
5942
- var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR2 = 4615027;
5943
- var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED2 = 4615028;
5944
- var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE2 = 4615029;
5945
- var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT2 = 4615030;
5946
- var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID2 = 4615031;
5947
- var SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH2 = 4615032;
5948
- var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT2 = 4615033;
5949
- var SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED2 = 4615034;
5950
- var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED2 = 4615035;
5951
- var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS2 = 4615036;
5952
- var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC2 = 4615037;
5953
- var SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED2 = 4615038;
5954
- var SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION2 = 4615039;
5955
- var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE2 = 4615040;
5956
- var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE2 = 4615041;
5957
- var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE2 = 4615042;
5958
- var SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE2 = 4615043;
5959
- var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY2 = 4615044;
5960
- var SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR2 = 4615045;
5961
- var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT2 = 4615046;
5962
- var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER2 = 4615047;
5963
- var SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW2 = 4615048;
5964
- var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR2 = 4615049;
5965
- var SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER2 = 4615050;
5966
- var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED2 = 4615051;
5967
- var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED2 = 4615052;
5968
- var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED2 = 4615053;
5969
- var SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS2 = 4615054;
5970
- var SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS2 = 5508e3;
5971
- var SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER2 = 5508001;
5972
- var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER2 = 5508002;
5973
- var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER2 = 5508003;
5974
- var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER2 = 5508004;
5975
- var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER2 = 5508005;
5976
- var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER2 = 5508006;
5977
- var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER2 = 5508007;
5978
- var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER2 = 5508008;
5979
- var SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS2 = 5508009;
5980
- var SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING2 = 5508010;
5981
- var SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED2 = 5508011;
5982
- var SOLANA_ERROR__SIGNER__WALLET_ACCOUNT_CANNOT_SIGN_TRANSACTION2 = 5508012;
5983
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__MAXIMUM_LENGTH_EXCEEDED2 = 5607e3;
5984
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__RESTRICTED_ASCII_BODY_CHARACTER_OUT_OF_RANGE2 = 5607001;
5985
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__APPLICATION_DOMAIN_STRING_LENGTH_OUT_OF_RANGE2 = 5607002;
5986
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__INVALID_APPLICATION_DOMAIN_BYTE_LENGTH2 = 5607003;
5987
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__NUM_SIGNATURES_MISMATCH2 = 5607004;
5988
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__NUM_REQUIRED_SIGNERS_CANNOT_BE_ZERO2 = 5607005;
5989
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__VERSION_NUMBER_NOT_SUPPORTED2 = 5607006;
5990
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__MESSAGE_FORMAT_MISMATCH2 = 5607007;
5991
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__MESSAGE_LENGTH_MISMATCH2 = 5607008;
5992
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__MESSAGE_MUST_BE_NON_EMPTY2 = 5607009;
5993
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__NUM_ENVELOPE_SIGNATURES_CANNOT_BE_ZERO2 = 5607010;
5994
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATURES_MISSING2 = 5607011;
5995
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__ENVELOPE_SIGNERS_MISMATCH2 = 5607012;
5996
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__ADDRESSES_CANNOT_SIGN_OFFCHAIN_MESSAGE2 = 5607013;
5997
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__UNEXPECTED_VERSION2 = 5607014;
5998
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATORIES_MUST_BE_SORTED2 = 5607015;
5999
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATORIES_MUST_BE_UNIQUE2 = 5607016;
6000
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATURE_VERIFICATION_FAILURE2 = 5607017;
6001
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__CONTENT_DOES_NOT_MATCH_EXPECTED2 = 5607018;
6002
- var SOLANA_ERROR__OFFCHAIN_MESSAGE__REQUIRED_SIGNATORIES_DO_NOT_MATCH_EXPECTED2 = 5607019;
6003
- var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES2 = 5663e3;
6004
- var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE2 = 5663001;
6005
- var SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME2 = 5663002;
6006
- var SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME2 = 5663003;
6007
- var SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE2 = 5663004;
6008
- var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING2 = 5663005;
6009
- var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE2 = 5663006;
6010
- var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND2 = 5663007;
6011
- var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING2 = 5663008;
6012
- var SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING2 = 5663009;
6013
- var SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING2 = 5663010;
6014
- var SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING2 = 5663011;
6015
- var SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING2 = 5663012;
6016
- var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING2 = 5663013;
6017
- var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE2 = 5663014;
6018
- var SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION2 = 5663015;
6019
- var SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES2 = 5663016;
6020
- var SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH2 = 5663017;
6021
- var SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT2 = 5663018;
6022
- var SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT2 = 5663019;
6023
- var SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT2 = 5663020;
6024
- var SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_NOT_SUPPORTED2 = 5663021;
6025
- var SOLANA_ERROR__TRANSACTION__NONCE_ACCOUNT_CANNOT_BE_IN_LOOKUP_TABLE2 = 5663022;
6026
- var SOLANA_ERROR__TRANSACTION__MALFORMED_MESSAGE_BYTES2 = 5663023;
6027
- var SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_MESSAGE_BYTES2 = 5663024;
6028
- var SOLANA_ERROR__TRANSACTION__CANNOT_DECODE_EMPTY_TRANSACTION_BYTES2 = 5663025;
6029
- var SOLANA_ERROR__TRANSACTION__VERSION_ZERO_MUST_BE_ENCODED_WITH_SIGNATURES_FIRST2 = 5663026;
6030
- var SOLANA_ERROR__TRANSACTION__SIGNATURE_COUNT_TOO_HIGH_FOR_TRANSACTION_BYTES2 = 5663027;
6031
- var SOLANA_ERROR__TRANSACTION__INVALID_CONFIG_MASK_PRIORITY_FEE_BITS2 = 5663028;
6032
- var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_ACCOUNT_INDEX2 = 5663029;
6033
- var SOLANA_ERROR__TRANSACTION__INVALID_CONFIG_VALUE_KIND2 = 5663030;
6034
- var SOLANA_ERROR__TRANSACTION__INSTRUCTION_HEADERS_PAYLOADS_MISMATCH2 = 5663031;
6035
- var SOLANA_ERROR__TRANSACTION__TOO_MANY_SIGNER_ADDRESSES2 = 5663032;
6036
- var SOLANA_ERROR__TRANSACTION__TOO_MANY_ACCOUNT_ADDRESSES2 = 5663033;
6037
- var SOLANA_ERROR__TRANSACTION__TOO_MANY_INSTRUCTIONS2 = 5663034;
6038
- var SOLANA_ERROR__TRANSACTION__TOO_MANY_ACCOUNTS_IN_INSTRUCTION2 = 5663035;
6039
- var SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_LOADED_ACCOUNTS_DATA_SIZE_LIMIT2 = 5663036;
6040
- var SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_RESOURCE_LIMITS2 = 5663037;
6041
- var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_ACCOUNT_INDEX_OUT_OF_RANGE2 = 5663038;
6042
- var SOLANA_ERROR__TRANSACTION__COMPUTE_UNIT_LIMIT_OUT_OF_RANGE2 = 5663039;
6043
- var SOLANA_ERROR__TRANSACTION__INVALID_HEAP_SIZE2 = 5663040;
6044
- var SOLANA_ERROR__TRANSACTION_INTROSPECTION__CANNOT_DECODE_JSON_PARSED_TRANSACTION2 = 5664e3;
6045
- var SOLANA_ERROR__TRANSACTION_INTROSPECTION__UNRECOGNIZED_GET_TRANSACTION_RESPONSE2 = 5664001;
6046
- var SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN2 = 705e4;
6047
- var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE2 = 7050001;
6048
- var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE2 = 7050002;
6049
- var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND2 = 7050003;
6050
- var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND2 = 7050004;
6051
- var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE2 = 7050005;
6052
- var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE2 = 7050006;
6053
- var SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED2 = 7050007;
6054
- var SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND2 = 7050008;
6055
- var SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP2 = 7050009;
6056
- var SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE2 = 7050010;
6057
- var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX2 = 7050011;
6058
- var SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE2 = 7050012;
6059
- var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION2 = 7050013;
6060
- var SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE2 = 7050014;
6061
- var SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE2 = 7050015;
6062
- var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING2 = 7050016;
6063
- var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT2 = 7050017;
6064
- var SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION2 = 7050018;
6065
- var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT2 = 7050019;
6066
- var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT2 = 7050020;
6067
- var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT2 = 7050021;
6068
- var SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS2 = 7050022;
6069
- var SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND2 = 7050023;
6070
- var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER2 = 7050024;
6071
- var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA2 = 7050025;
6072
- var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX2 = 7050026;
6073
- var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT2 = 7050027;
6074
- var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT2 = 7050028;
6075
- var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT2 = 7050029;
6076
- var SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION2 = 7050030;
6077
- var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT2 = 7050031;
6078
- var SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED2 = 7050032;
6079
- var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT2 = 7050033;
6080
- var SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED2 = 7050034;
6081
- var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED2 = 7050035;
6082
- var SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION2 = 7050036;
6083
- var SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_CANNOT_ACCOMMODATE_PLAN2 = 7618e3;
6084
- var SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_PACKER_ALREADY_COMPLETE2 = 7618001;
6085
- var SOLANA_ERROR__INSTRUCTION_PLANS__EMPTY_INSTRUCTION_PLAN2 = 7618002;
6086
- var SOLANA_ERROR__INSTRUCTION_PLANS__FAILED_TO_EXECUTE_TRANSACTION_PLAN2 = 7618003;
6087
- var SOLANA_ERROR__INSTRUCTION_PLANS__NON_DIVISIBLE_TRANSACTION_PLANS_NOT_SUPPORTED2 = 7618004;
6088
- var SOLANA_ERROR__INSTRUCTION_PLANS__FAILED_SINGLE_TRANSACTION_PLAN_RESULT_NOT_FOUND2 = 7618005;
6089
- var SOLANA_ERROR__INSTRUCTION_PLANS__UNEXPECTED_INSTRUCTION_PLAN2 = 7618006;
6090
- var SOLANA_ERROR__INSTRUCTION_PLANS__UNEXPECTED_TRANSACTION_PLAN2 = 7618007;
6091
- var SOLANA_ERROR__INSTRUCTION_PLANS__UNEXPECTED_TRANSACTION_PLAN_RESULT2 = 7618008;
6092
- var SOLANA_ERROR__INSTRUCTION_PLANS__EXPECTED_SUCCESSFUL_TRANSACTION_PLAN_RESULT2 = 7618009;
6093
- var SOLANA_ERROR__INSTRUCTION_PLANS__MAX_INSTRUCTIONS_PER_TRANSACTION_EXCEEDED2 = 7618010;
6094
- var SOLANA_ERROR__INSTRUCTION_PLANS__INVALID_MAX_INSTRUCTIONS_PER_TRANSACTION2 = 7618011;
6095
- var SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_REJECTED_BY_PACKER2 = 7618012;
6096
- var SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY2 = 8078e3;
6097
- var SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH2 = 8078001;
6098
- var SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH2 = 8078002;
6099
- var SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH2 = 8078003;
6100
- var SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH2 = 8078004;
6101
- var SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH2 = 8078005;
6102
- var SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH2 = 8078006;
6103
- var SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS2 = 8078007;
6104
- var SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE2 = 8078008;
6105
- var SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT2 = 8078009;
6106
- var SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT2 = 8078010;
6107
- var SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE2 = 8078011;
6108
- var SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE2 = 8078012;
6109
- var SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH2 = 8078013;
6110
- var SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE2 = 8078014;
6111
- var SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT2 = 8078015;
6112
- var SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE2 = 8078016;
6113
- var SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE2 = 8078017;
6114
- var SOLANA_ERROR__CODECS__INVALID_CONSTANT2 = 8078018;
6115
- var SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE2 = 8078019;
6116
- var SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL2 = 8078020;
6117
- var SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES2 = 8078021;
6118
- var SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS2 = 8078022;
6119
- var SOLANA_ERROR__CODECS__EXPECTED_DECODER_TO_CONSUME_ENTIRE_BYTE_ARRAY2 = 8078023;
6120
- var SOLANA_ERROR__CODECS__INVALID_PATTERN_MATCH_VALUE2 = 8078024;
6121
- var SOLANA_ERROR__CODECS__INVALID_PATTERN_MATCH_BYTES2 = 8078025;
6122
- var SOLANA_ERROR__CODECS__INVALID_UTF8_BYTES2 = 8078026;
6123
- var SOLANA_ERROR__CODECS__INVALID_UTF8_STRING2 = 8078027;
6124
- var SOLANA_ERROR__CODECS__SENTINEL_MISSING_AT_END_OF_BYTES2 = 8078028;
6125
- var SOLANA_ERROR__CODECS__SENTINEL_MUST_NOT_BE_EMPTY2 = 8078029;
6126
- var SOLANA_ERROR__FIXED_POINTS__INVALID_TOTAL_BITS2 = 809e4;
6127
- var SOLANA_ERROR__FIXED_POINTS__INVALID_FRACTIONAL_BITS2 = 8090001;
6128
- var SOLANA_ERROR__FIXED_POINTS__INVALID_DECIMALS2 = 8090002;
6129
- var SOLANA_ERROR__FIXED_POINTS__FRACTIONAL_BITS_EXCEED_TOTAL_BITS2 = 8090003;
6130
- var SOLANA_ERROR__FIXED_POINTS__VALUE_OUT_OF_RANGE2 = 8090004;
6131
- var SOLANA_ERROR__FIXED_POINTS__INVALID_STRING2 = 8090005;
6132
- var SOLANA_ERROR__FIXED_POINTS__INVALID_ZERO_DENOMINATOR_RATIO2 = 8090006;
6133
- var SOLANA_ERROR__FIXED_POINTS__ARITHMETIC_OVERFLOW2 = 8090007;
6134
- var SOLANA_ERROR__FIXED_POINTS__SHAPE_MISMATCH2 = 8090008;
6135
- var SOLANA_ERROR__FIXED_POINTS__DIVISION_BY_ZERO2 = 8090009;
6136
- var SOLANA_ERROR__FIXED_POINTS__STRICT_MODE_PRECISION_LOSS2 = 8090010;
6137
- var SOLANA_ERROR__FIXED_POINTS__MALFORMED_RAW_VALUE2 = 8090011;
6138
- var SOLANA_ERROR__FIXED_POINTS__TOTAL_BITS_NOT_BYTE_ALIGNED2 = 8090012;
6139
- var SOLANA_ERROR__RPC__INTEGER_OVERFLOW2 = 81e5;
6140
- var SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN2 = 8100001;
6141
- var SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR2 = 8100002;
6142
- var SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD2 = 8100003;
6143
- var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN2 = 819e4;
6144
- var SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID2 = 8190001;
6145
- var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED2 = 8190002;
6146
- var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED2 = 8190003;
6147
- var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT2 = 8190004;
6148
- var SOLANA_ERROR__SUBSCRIBABLE__RETRY_NOT_SUPPORTED2 = 8195e3;
6149
- var SOLANA_ERROR__SUBSCRIBABLE__STREAM_CLOSED_WITHOUT_ERROR2 = 8195001;
6150
- var SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS2 = 85e5;
6151
- var SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE2 = 8500001;
6152
- var SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION2 = 8500002;
6153
- var SOLANA_ERROR__PROGRAM_CLIENTS__UNEXPECTED_RESOLVED_INSTRUCTION_INPUT_TYPE2 = 8500003;
6154
- var SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_NON_NULL2 = 8500004;
6155
- var SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_ACCOUNT_TYPE2 = 8500005;
6156
- var SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT2 = 8500006;
6157
- var SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_SIGNER2 = 8500007;
6158
- var SOLANA_ERROR__WALLET__NOT_CONNECTED2 = 89e5;
6159
- var SOLANA_ERROR__WALLET__NO_SIGNER_CONNECTED2 = 8900001;
6160
- var SOLANA_ERROR__WALLET__SIGNER_NOT_AVAILABLE2 = 8900002;
6161
- var SOLANA_ERROR__WALLET__ACCOUNT_NOT_AVAILABLE2 = 8900003;
6162
- var SOLANA_ERROR__REACT__MISSING_PROVIDER2 = 9e6;
6163
- var SOLANA_ERROR__REACT__MISSING_CAPABILITY2 = 9000001;
6164
- var SOLANA_ERROR__REACT__SUBSCRIPTION_CLOSED_WITHOUT_ERROR2 = 9000002;
6165
- var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING2 = 99e5;
6166
- var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE2 = 9900001;
6167
- var SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING2 = 9900002;
6168
- var SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE2 = 9900003;
6169
- var SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED2 = 9900004;
6170
- var SOLANA_ERROR__INVARIANT_VIOLATION__INVALID_INSTRUCTION_PLAN_KIND2 = 9900005;
6171
- var SOLANA_ERROR__INVARIANT_VIOLATION__INVALID_TRANSACTION_PLAN_KIND2 = 9900006;
6172
- function encodeValue2(value) {
6173
- if (Array.isArray(value)) {
6174
- const commaSeparatedValues = value.map(encodeValue2).join(
6175
- "%2C%20"
6176
- /* ", " */
6177
- );
6178
- return "%5B" + commaSeparatedValues + /* "]" */
6179
- "%5D";
6180
- } else if (typeof value === "bigint") {
6181
- return `${value}n`;
6182
- } else {
6183
- return encodeURIComponent(
6184
- String(
6185
- value != null && Object.getPrototypeOf(value) === null ? (
6186
- // Plain objects with no prototype don't have a `toString` method.
6187
- // Convert them before stringifying them.
6188
- { ...value }
6189
- ) : value
6190
- )
6191
- );
6192
- }
6193
- }
6194
- function encodeObjectContextEntry2([key, value]) {
6195
- return `${key}=${encodeValue2(value)}`;
6196
- }
6197
- function encodeContextObject2(context) {
6198
- const searchParamsString = Object.entries(context).map(encodeObjectContextEntry2).join("&");
6199
- return Buffer.from(searchParamsString, "utf8").toString("base64");
6200
- }
6201
- var SolanaErrorMessages2 = {
6202
- [SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND2]: "Account not found at address: $address",
6203
- [SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED2]: "Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",
6204
- [SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT2]: "Expected decoded account at address: $address",
6205
- [SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT2]: "Failed to decode account data at address: $address",
6206
- [SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND2]: "Accounts not found at addresses: $addresses",
6207
- [SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED2]: "Unable to find a viable program address bump seed.",
6208
- [SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS2]: "$putativeAddress is not a base58-encoded address.",
6209
- [SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH2]: "Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",
6210
- [SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY2]: "The `CryptoKey` must be an `Ed25519` public key.",
6211
- [SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS2]: "$putativeOffCurveAddress is not a base58-encoded off-curve address.",
6212
- [SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE2]: "Invalid seeds; point must fall off the Ed25519 curve.",
6213
- [SOLANA_ERROR__ADDRESSES__MALFORMED_PDA2]: "Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",
6214
- [SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED2]: "A maximum of $maxSeeds seeds, including the bump seed, may be supplied when creating an address. Received: $actual.",
6215
- [SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED2]: "The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",
6216
- [SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE2]: "Expected program derived address bump to be in the range [0, 255], got: $bump.",
6217
- [SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER2]: "Program address cannot end with PDA marker.",
6218
- [SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE2]: "Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",
6219
- [SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE2]: "Expected base58-encoded blockhash string of length in the range [32, 44]. Actual length: $actualLength.",
6220
- [SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED2]: "The network has progressed past the last block for which this transaction could have been committed.",
6221
- [SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY2]: "Codec [$codecDescription] cannot decode empty byte arrays.",
6222
- [SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS2]: "Enum codec cannot use lexical values [$stringValues] as discriminators. Either remove all lexical values or set `useValuesAsDiscriminators` to `false`.",
6223
- [SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL2]: "Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",
6224
- [SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH2]: "Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",
6225
- [SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH2]: "Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",
6226
- [SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH2]: "Encoder and decoder must either both be fixed-size or variable-size.",
6227
- [SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE2]: "Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",
6228
- [SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH2]: "Expected a fixed-size codec, got a variable-size one.",
6229
- [SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH2]: "Codec [$codecDescription] expected a positive byte length, got $bytesLength.",
6230
- [SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH2]: "Expected a variable-size codec, got a fixed-size one.",
6231
- [SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE2]: "Codec [$codecDescription] expected zero-value [$hexZeroValue] to have the same size as the provided fixed-size item [$expectedSize bytes].",
6232
- [SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH2]: "Codec [$codecDescription] expected $expected bytes, got $bytesLength.",
6233
- [SOLANA_ERROR__CODECS__INVALID_CONSTANT2]: "Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",
6234
- [SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT2]: "Invalid discriminated union variant. Expected one of [$variants], got $value.",
6235
- [SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT2]: "Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",
6236
- [SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT2]: "Invalid literal union variant. Expected one of [$variants], got $value.",
6237
- [SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS2]: "Expected [$codecDescription] to have $expected items, got $actual.",
6238
- [SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE2]: "Invalid value $value for base $base with alphabet $alphabet.",
6239
- [SOLANA_ERROR__CODECS__INVALID_UTF8_BYTES2]: "Invalid UTF-8 byte sequence at offset $offset.",
6240
- [SOLANA_ERROR__CODECS__INVALID_UTF8_STRING2]: "Invalid UTF-8 string. Found a lone surrogate at index $index.",
6241
- [SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE2]: "Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",
6242
- [SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE2]: "Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",
6243
- [SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE2]: "Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",
6244
- [SOLANA_ERROR__CODECS__SENTINEL_MISSING_AT_END_OF_BYTES2]: "Codec [$codecDescription] expected sentinel [$hexSentinel] to terminate the collection, but reached the end of the byte array without it.",
6245
- [SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES2]: "Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",
6246
- [SOLANA_ERROR__CODECS__SENTINEL_MUST_NOT_BE_EMPTY2]: "The sentinel must not be empty.",
6247
- [SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE2]: "Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",
6248
- [SOLANA_ERROR__CODECS__EXPECTED_DECODER_TO_CONSUME_ENTIRE_BYTE_ARRAY2]: "This decoder expected a byte array of exactly $expectedLength bytes, but $numExcessBytes unexpected excess bytes remained after decoding. Are you sure that you have chosen the correct decoder for this data?",
6249
- [SOLANA_ERROR__CODECS__INVALID_PATTERN_MATCH_VALUE2]: "Invalid pattern match value. The provided value does not match any of the specified patterns.",
6250
- [SOLANA_ERROR__CODECS__INVALID_PATTERN_MATCH_BYTES2]: "Invalid pattern match bytes. The provided byte array does not match any of the specified patterns.",
6251
- [SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED2]: "No random values implementation could be found.",
6252
- [SOLANA_ERROR__FAILED_TO_SEND_TRANSACTION2]: "Failed to send transaction$causeMessage",
6253
- [SOLANA_ERROR__FAILED_TO_SEND_TRANSACTIONS2]: "Failed to send transactions$causeMessages",
6254
- [SOLANA_ERROR__FAILED_TO_SIGN_TRANSACTION2]: "Failed to sign transaction$causeMessage",
6255
- [SOLANA_ERROR__FAILED_TO_SIGN_TRANSACTIONS2]: "Failed to sign transactions$causeMessages",
6256
- [SOLANA_ERROR__FIXED_POINTS__ARITHMETIC_OVERFLOW2]: "Fixed-point operation `$operation` of kind `$kind` overflowed. Expected a raw bigint in [$min, $max], got $result.",
6257
- [SOLANA_ERROR__FIXED_POINTS__DIVISION_BY_ZERO2]: "Fixed-point division by zero for value of kind `$kind` ($signedness, $totalBits bits).",
6258
- [SOLANA_ERROR__FIXED_POINTS__FRACTIONAL_BITS_EXCEED_TOTAL_BITS2]: "`fractionalBits` ($fractionalBits) must not exceed `totalBits` ($totalBits).",
6259
- [SOLANA_ERROR__FIXED_POINTS__INVALID_DECIMALS2]: "Invalid `decimals`. Expected a non-negative integer, got $decimals.",
6260
- [SOLANA_ERROR__FIXED_POINTS__INVALID_FRACTIONAL_BITS2]: "Invalid `fractionalBits`. Expected a non-negative integer, got $fractionalBits.",
6261
- [SOLANA_ERROR__FIXED_POINTS__INVALID_STRING2]: "Invalid string `$input` for fixed-point value of kind `$kind`.",
6262
- [SOLANA_ERROR__FIXED_POINTS__INVALID_TOTAL_BITS2]: "Invalid `totalBits`. Expected a positive integer, got $totalBits.",
6263
- [SOLANA_ERROR__FIXED_POINTS__INVALID_ZERO_DENOMINATOR_RATIO2]: "Invalid ratio $numerator/$denominator for fixed-point value of kind `$kind`. Denominator must be non-zero.",
6264
- [SOLANA_ERROR__FIXED_POINTS__MALFORMED_RAW_VALUE2]: "Fixed-point value of kind `$kind` has a malformed `raw` field. Expected a bigint, got `$raw`.",
6265
- [SOLANA_ERROR__FIXED_POINTS__SHAPE_MISMATCH2]: "Fixed-point `$operation` operation expected $expectedKind ($expectedSignedness, $expectedTotalBits bits, $expectedScale $expectedScaleLabel); got $actualKind ($actualSignedness, $actualTotalBits bits, $actualScale $actualScaleLabel).",
6266
- [SOLANA_ERROR__FIXED_POINTS__STRICT_MODE_PRECISION_LOSS2]: "Fixed-point operation `$operation` of kind `$kind` cannot be performed exactly; pass a rounding mode other than `strict` to allow a rounded result.",
6267
- [SOLANA_ERROR__FIXED_POINTS__TOTAL_BITS_NOT_BYTE_ALIGNED2]: "Fixed-point codec of kind `$kind` requires `totalBits` to be a multiple of 8; got $totalBits.",
6268
- [SOLANA_ERROR__FIXED_POINTS__VALUE_OUT_OF_RANGE2]: "Fixed-point value of kind `$kind` is out of range for $signedness $totalBits-bit storage. Expected a raw bigint in [$min, $max], got $raw.",
6269
- [SOLANA_ERROR__FS__UNSUPPORTED_ENVIRONMENT2]: "Filesystem operation `$operation` is not supported in this environment.",
6270
- [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED2]: "Instruction requires an uninitialized account",
6271
- [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED2]: "Instruction tries to borrow reference for an account which is already borrowed",
6272
- [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING2]: "Instruction left account with an outstanding borrowed reference",
6273
- [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED2]: "Program other than the account's owner changed the size of the account data",
6274
- [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL2]: "Account data too small for instruction",
6275
- [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE2]: "Instruction expected an executable account",
6276
- [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT2]: "An account does not have enough lamports to be rent-exempt",
6277
- [SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW2]: "Program arithmetic overflowed",
6278
- [SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR2]: "Failed to serialize or deserialize account data",
6279
- [SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS2]: "Builtin programs must consume compute units",
6280
- [SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH2]: "Cross-program invocation call depth too deep",
6281
- [SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED2]: "Computational budget exceeded",
6282
- [SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM2]: "Custom program error: #$code",
6283
- [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX2]: "Instruction contains duplicate accounts",
6284
- [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC2]: "Instruction modifications of multiply-passed account differ",
6285
- [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT2]: "Executable accounts must be rent exempt",
6286
- [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED2]: "Instruction changed executable accounts data",
6287
- [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE2]: "Instruction changed the balance of an executable account",
6288
- [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED2]: "Instruction changed executable bit of an account",
6289
- [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED2]: "Instruction modified data of an account it does not own",
6290
- [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND2]: "Instruction spent from the balance of an account it does not own",
6291
- [SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR2]: "Generic instruction error",
6292
- [SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER2]: "Provided owner is not allowed",
6293
- [SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE2]: "Account is immutable",
6294
- [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY2]: "Incorrect authority provided",
6295
- [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID2]: "Incorrect program id for instruction",
6296
- [SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS2]: "Insufficient funds for instruction",
6297
- [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA2]: "Invalid account data for instruction",
6298
- [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER2]: "Invalid account owner",
6299
- [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT2]: "Invalid program argument",
6300
- [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR2]: "Program returned invalid error code",
6301
- [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA2]: "Invalid instruction data",
6302
- [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC2]: "Failed to reallocate account data",
6303
- [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS2]: "Provided seeds do not result in a valid address",
6304
- [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED2]: "Accounts data allocations exceeded the maximum allowed per transaction",
6305
- [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED2]: "Max accounts exceeded",
6306
- [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED2]: "Max instruction trace length exceeded",
6307
- [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED2]: "Length of the seed is too long for address generation",
6308
- [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT2]: "An account required by the instruction is missing",
6309
- [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE2]: "Missing required signature for instruction",
6310
- [SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID2]: "Instruction illegally modified the program id of an account",
6311
- [SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS2]: "Insufficient account keys for instruction",
6312
- [SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION2]: "Cross-program invocation with unauthorized signer or writable account",
6313
- [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE2]: "Failed to create program execution environment",
6314
- [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE2]: "Program failed to compile",
6315
- [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE2]: "Program failed to complete",
6316
- [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED2]: "Instruction modified data of a read-only account",
6317
- [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE2]: "Instruction changed the balance of a read-only account",
6318
- [SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED2]: "Cross-program invocation reentrancy not allowed for this instruction",
6319
- [SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED2]: "Instruction modified rent epoch of an account",
6320
- [SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION2]: "Sum of account balances before and after instruction do not match",
6321
- [SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT2]: "Instruction requires an initialized account",
6322
- [SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN2]: "The instruction failed with the error: $errorName",
6323
- [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID2]: "Unsupported program id",
6324
- [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR2]: "Unsupported sysvar",
6325
- [SOLANA_ERROR__INVARIANT_VIOLATION__INVALID_INSTRUCTION_PLAN_KIND2]: "Invalid instruction plan kind: $kind.",
6326
- [SOLANA_ERROR__INSTRUCTION_PLANS__EMPTY_INSTRUCTION_PLAN2]: "The provided instruction plan is empty.",
6327
- [SOLANA_ERROR__INSTRUCTION_PLANS__FAILED_SINGLE_TRANSACTION_PLAN_RESULT_NOT_FOUND2]: "No failed transaction plan result was found in the provided transaction plan result.",
6328
- [SOLANA_ERROR__INSTRUCTION_PLANS__NON_DIVISIBLE_TRANSACTION_PLANS_NOT_SUPPORTED2]: "This transaction plan executor does not support non-divisible sequential plans. To support them, you may create your own executor such that multi-transaction atomicity is preserved \u2014 e.g. by targetting RPCs that support transaction bundles.",
6329
- [SOLANA_ERROR__INSTRUCTION_PLANS__FAILED_TO_EXECUTE_TRANSACTION_PLAN2]: "The provided transaction plan failed to execute. See the `transactionPlanResult` attribute for more details. Note that the `cause` property is deprecated, and a future version will not set it.",
6330
- [SOLANA_ERROR__INSTRUCTION_PLANS__INVALID_MAX_INSTRUCTIONS_PER_TRANSACTION2]: "The configured maximum of $maxInstructions instructions per transaction is invalid. It must be a positive integer no greater than the transaction format limit of $transactionInstructionLimit instructions per transaction. Provide a `maxInstructionsPerTransaction` (on the transaction planner) or `maxInstructions` (on the message packer) value between 1 and $transactionInstructionLimit.",
6331
- [SOLANA_ERROR__INSTRUCTION_PLANS__MAX_INSTRUCTIONS_PER_TRANSACTION_EXCEEDED2]: "Planning this transaction message would require $numInstructions instructions, which exceeds the configured maximum of $maxInstructions instructions per transaction. This limit is configurable, and intended to leave headroom for inner instructions which are included in the maximum instruction limit for transactions. Increase `maxInstructionsPerTransaction` on the transaction planner (or `maxInstructions` on the message packer) to allow more instructions per transaction.",
6332
- [SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_CANNOT_ACCOMMODATE_PLAN2]: "The provided message has insufficient capacity to accommodate the next instruction(s) in this plan. Expected at least $numBytesRequired free byte(s), got $numFreeBytes byte(s).",
6333
- [SOLANA_ERROR__INVARIANT_VIOLATION__INVALID_TRANSACTION_PLAN_KIND2]: "Invalid transaction plan kind: $kind.",
6334
- [SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_PACKER_ALREADY_COMPLETE2]: "No more instructions to pack; the message packer has completed the instruction plan.",
6335
- [SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_REJECTED_BY_PACKER2]: "The message packer rejected the provided transaction message: $reason.",
6336
- [SOLANA_ERROR__INSTRUCTION_PLANS__UNEXPECTED_INSTRUCTION_PLAN2]: "Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",
6337
- [SOLANA_ERROR__INSTRUCTION_PLANS__UNEXPECTED_TRANSACTION_PLAN2]: "Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",
6338
- [SOLANA_ERROR__INSTRUCTION_PLANS__UNEXPECTED_TRANSACTION_PLAN_RESULT2]: "Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",
6339
- [SOLANA_ERROR__INSTRUCTION_PLANS__EXPECTED_SUCCESSFUL_TRANSACTION_PLAN_RESULT2]: "Expected a successful transaction plan result. I.e. there is at least one failed or cancelled transaction in the plan.",
6340
- [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS2]: "The instruction does not have any accounts.",
6341
- [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA2]: "The instruction does not have any data.",
6342
- [SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH2]: "Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",
6343
- [SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH2]: "Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",
6344
- [SOLANA_ERROR__INVALID_NONCE2]: "The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",
6345
- [SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING2]: "Invariant violation: Found no abortable iterable cache entry for key `$cacheKey`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
6346
- [SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED2]: "Invariant violation: This data publisher does not publish to the channel named `$channelName`. Supported channels include $supportedChannelNames.",
6347
- [SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE2]: "Invariant violation: WebSocket message iterator state is corrupt; iterated without first resolving existing message promise. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
6348
- [SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING2]: "Invariant violation: WebSocket message iterator is missing state storage. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
6349
- [SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE2]: "Invariant violation: Switch statement non-exhaustive. Received unexpected value `$unexpectedValue`. It should be impossible to hit this error; please file an issue at https://sola.na/web3invariant",
6350
- [SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR2]: "JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",
6351
- [SOLANA_ERROR__JSON_RPC__INVALID_PARAMS2]: "JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",
6352
- [SOLANA_ERROR__JSON_RPC__INVALID_REQUEST2]: "JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",
6353
- [SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND2]: "JSON-RPC error: The method does not exist / is not available ($__serverMessage)",
6354
- [SOLANA_ERROR__JSON_RPC__PARSE_ERROR2]: "JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",
6355
- [SOLANA_ERROR__JSON_RPC__SCAN_ERROR2]: "$__serverMessage",
6356
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP2]: "$__serverMessage",
6357
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE2]: "$__serverMessage",
6358
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET2]: "$__serverMessage",
6359
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_EPOCH_REWARDS_PERIOD_ACTIVE2]: "Epoch rewards period still active at slot $slot",
6360
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_FILTER_TRANSACTION_NOT_FOUND2]: "$__serverMessage",
6361
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX2]: "$__serverMessage",
6362
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED2]: "$__serverMessage",
6363
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_UNREACHABLE2]: "Failed to query long-term storage; please try again",
6364
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED2]: "Minimum context slot has not been reached",
6365
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY2]: "Node is unhealthy; behind by $numSlotsBehind slots",
6366
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SLOT_HISTORY2]: "No slot history",
6367
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT2]: "No snapshot",
6368
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE2]: "Transaction simulation failed",
6369
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_NOT_EPOCH_BOUNDARY2]: "Rewards cannot be found because slot $slot is not the epoch boundary. This may be due to gap in the queried node's local ledger or long-term storage",
6370
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED2]: "$__serverMessage",
6371
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE2]: "Transaction history is not available from this node",
6372
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE2]: "$__serverMessage",
6373
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH2]: "Transaction signature length mismatch",
6374
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE2]: "Transaction signature verification failure",
6375
- [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION2]: "$__serverMessage",
6376
- [SOLANA_ERROR__KEYS__INVALID_BASE58_IN_GRIND_REGEX2]: "The grind regex `/$source/` contains the character `$character`, which is not in the base58 alphabet and can never match a Solana address.",
6377
- [SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH2]: "Key pair bytes must be of length 64, got $byteLength.",
6378
- [SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH2]: "Expected private key bytes with length 32. Actual length: $actualLength.",
6379
- [SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH2]: "Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",
6380
- [SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY2]: "The provided private key does not match the provided public key.",
6381
- [SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE2]: "Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",
6382
- [SOLANA_ERROR__KEYS__WRITE_KEY_PAIR_UNSUPPORTED_ENVIRONMENT2]: "Writing a key pair to disk is not supported in this environment.",
6383
- [SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE2]: "Lamports value must be in the range [0, 2e64-1]",
6384
- [SOLANA_ERROR__MALFORMED_BIGINT_STRING2]: "`$value` cannot be parsed as a `BigInt`",
6385
- [SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR2]: "$message",
6386
- [SOLANA_ERROR__MALFORMED_NUMBER_STRING2]: "`$value` cannot be parsed as a `Number`",
6387
- [SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND2]: "No nonce account could be found at address `$nonceAccountAddress`",
6388
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__INVALID_APPLICATION_DOMAIN_BYTE_LENGTH2]: "Expected base58 encoded application domain to decode to a byte array of length 32. Actual length: $actualLength.",
6389
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__ADDRESSES_CANNOT_SIGN_OFFCHAIN_MESSAGE2]: "Attempted to sign an offchain message with an address that is not a signer for it",
6390
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__APPLICATION_DOMAIN_STRING_LENGTH_OUT_OF_RANGE2]: "Expected base58-encoded application domain string of length in the range [32, 44]. Actual length: $actualLength.",
6391
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__CONTENT_DOES_NOT_MATCH_EXPECTED2]: "The content of the offchain message does not match the content that was expected. Expected content with a byte-length of $expectedBytes; got content with a byte-length of $actualBytes. The signer may have signed different data than was requested; do not trust its signature.",
6392
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__ENVELOPE_SIGNERS_MISMATCH2]: "The signer addresses in this offchain message envelope do not match the list of required signers in the message preamble. These unexpected signers were present in the envelope: `[$unexpectedSigners]`. These required signers were missing from the envelope `[$missingSigners]`.",
6393
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__MAXIMUM_LENGTH_EXCEEDED2]: "The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",
6394
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__MESSAGE_FORMAT_MISMATCH2]: "Expected message format $expectedMessageFormat, got $actualMessageFormat",
6395
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__MESSAGE_LENGTH_MISMATCH2]: "The message length specified in the message preamble is $specifiedLength bytes. The actual length of the message is $actualLength bytes.",
6396
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__MESSAGE_MUST_BE_NON_EMPTY2]: "Offchain message content must be non-empty",
6397
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__NUM_REQUIRED_SIGNERS_CANNOT_BE_ZERO2]: "Offchain message must specify the address of at least one required signer",
6398
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__NUM_ENVELOPE_SIGNATURES_CANNOT_BE_ZERO2]: "Offchain message envelope must reserve space for at least one signature",
6399
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__NUM_SIGNATURES_MISMATCH2]: "The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",
6400
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__REQUIRED_SIGNATORIES_DO_NOT_MATCH_EXPECTED2]: "The offchain message lists different required signatories than was expected. Expected [$expectedAddresses]. Got [$actualAddresses]. The signer may have signed different data than was requested; do not trust its signature.",
6401
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATORIES_MUST_BE_SORTED2]: "The signatories of this offchain message must be listed in lexicographical order",
6402
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATORIES_MUST_BE_UNIQUE2]: "An address must be listed no more than once among the signatories of an offchain message",
6403
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATURES_MISSING2]: "Offchain message is missing signatures for addresses: $addresses.",
6404
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATURE_VERIFICATION_FAILURE2]: "Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",
6405
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__RESTRICTED_ASCII_BODY_CHARACTER_OUT_OF_RANGE2]: "The message body provided contains characters whose codes fall outside the allowed range. In order to ensure clear-signing compatiblity with hardware wallets, the message may only contain line feeds and characters in the range [\\x20-\\x7e].",
6406
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__UNEXPECTED_VERSION2]: "Expected offchain message version $expectedVersion. Got $actualVersion.",
6407
- [SOLANA_ERROR__OFFCHAIN_MESSAGE__VERSION_NUMBER_NOT_SUPPORTED2]: "This version of Kit does not support decoding offchain messages with version $unsupportedVersion. The current max supported version is 0.",
6408
- [SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT2]: "The provided account could not be identified as an account from the $programName program.",
6409
- [SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION2]: "The provided instruction could not be identified as an instruction from the $programName program.",
6410
- [SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS2]: "The provided instruction is missing some accounts. Expected at least $expectedAccountMetas account(s), got $actualAccountMetas.",
6411
- [SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_NON_NULL2]: "Expected resolved instruction input '$inputName' to be non-null.",
6412
- [SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_SIGNER2]: "Expected resolved instruction input '$inputName' to be a `TransactionSigner` because the instruction requires this account to sign the transaction. If its signature is provided by other means, use `createNoopSigner()` from `@solana/signers` to satisfy this requirement.",
6413
- [SOLANA_ERROR__PROGRAM_CLIENTS__UNEXPECTED_RESOLVED_INSTRUCTION_INPUT_TYPE2]: "Expected resolved instruction input '$inputName' to be of type `$expectedType`.",
6414
- [SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_ACCOUNT_TYPE2]: "Unrecognized account type '$accountType' for the $programName program.",
6415
- [SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE2]: "Unrecognized instruction type '$instructionType' for the $programName program.",
6416
- [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN2]: "The notification name must end in 'Notifications' and the API must supply a subscription plan creator function for the notification '$notificationName'.",
6417
- [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED2]: "WebSocket was closed before payload could be added to the send buffer",
6418
- [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED2]: "WebSocket connection closed",
6419
- [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT2]: "WebSocket failed to connect",
6420
- [SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID2]: "Failed to obtain a subscription id from the server",
6421
- [SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD2]: "Could not find an API plan for RPC method: `$method`",
6422
- [SOLANA_ERROR__RPC__INTEGER_OVERFLOW2]: "The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",
6423
- [SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR2]: "HTTP error ($statusCode): $message",
6424
- [SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN2]: "HTTP header(s) forbidden: $headers. Learn more at https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_header_name.",
6425
- [SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS2]: "Multiple distinct signers were identified for address `$address`. Please ensure that you are using the same signer instance for each address.",
6426
- [SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER2]: "The provided value does not implement the `KeyPairSigner` interface",
6427
- [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER2]: "The provided value does not implement the `MessageModifyingSigner` interface",
6428
- [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER2]: "The provided value does not implement the `MessagePartialSigner` interface",
6429
- [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER2]: "The provided value does not implement any of the `MessageSigner` interfaces",
6430
- [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER2]: "The provided value does not implement the `TransactionModifyingSigner` interface",
6431
- [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER2]: "The provided value does not implement the `TransactionPartialSigner` interface",
6432
- [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER2]: "The provided value does not implement the `TransactionSendingSigner` interface",
6433
- [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER2]: "The provided value does not implement any of the `TransactionSigner` interfaces",
6434
- [SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS2]: "More than one `TransactionSendingSigner` was identified.",
6435
- [SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING2]: "No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",
6436
- [SOLANA_ERROR__SIGNER__WALLET_ACCOUNT_CANNOT_SIGN_TRANSACTION2]: "The wallet account $address cannot be used to create a transaction signer because it does not implement either the `solana:signTransaction` or `solana:signAndSendTransaction` feature. At least one of these features is required. The account supports the following features: $supportedFeatures.",
6437
- [SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED2]: "Wallet account signers do not support signing multiple messages/transactions in a single operation",
6438
- [SOLANA_ERROR__SUBSCRIBABLE__RETRY_NOT_SUPPORTED2]: "This `ReactiveStreamStore` does not support retry. Use `createReactiveStoreFromDataPublisherFactory` to construct a retryable store.",
6439
- [SOLANA_ERROR__SUBSCRIBABLE__STREAM_CLOSED_WITHOUT_ERROR2]: "The stream store closed in an error state but did not report an error.",
6440
- [SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY2]: "Cannot export a non-extractable key.",
6441
- [SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED2]: "No digest implementation could be found.",
6442
- [SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT2]: "Cryptographic operations are only allowed in secure browser contexts. Read more here: https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts.",
6443
- [SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED2]: "This runtime does not support the generation of Ed25519 key pairs.\n\nInstall @solana/webcrypto-ed25519-polyfill and call its `install` function before generating keys in environments that do not support Ed25519.\n\nFor a list of runtimes that currently support Ed25519 operations, visit https://github.com/WICG/webcrypto-secure-curves/issues/20.",
6444
- [SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED2]: "No key export implementation could be found.",
6445
- [SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED2]: "No key generation implementation could be found.",
6446
- [SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED2]: "No signing implementation could be found.",
6447
- [SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED2]: "No signature verification implementation could be found.",
6448
- [SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE2]: "Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",
6449
- [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING2]: "Transaction processing left an account with an outstanding borrowed reference",
6450
- [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE2]: "Account in use",
6451
- [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE2]: "Account loaded twice",
6452
- [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND2]: "Attempt to debit an account but found no record of a prior credit.",
6453
- [SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND2]: "Transaction loads an address table account that doesn't exist",
6454
- [SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED2]: "This transaction has already been processed",
6455
- [SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND2]: "Blockhash not found",
6456
- [SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP2]: "Loader call chain is too deep",
6457
- [SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE2]: "Transactions are currently disabled due to cluster maintenance",
6458
- [SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION2]: "Transaction contains a duplicate instruction ($index) that is not allowed",
6459
- [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE2]: "Insufficient funds for fee",
6460
- [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT2]: "Transaction results in an account ($accountIndex) with insufficient funds for rent",
6461
- [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE2]: "This account may not be used to pay transaction fees",
6462
- [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX2]: "Transaction contains an invalid account reference",
6463
- [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA2]: "Transaction loads an address table account with invalid data",
6464
- [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX2]: "Transaction address table lookup uses an invalid index",
6465
- [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER2]: "Transaction loads an address table account with an invalid owner",
6466
- [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT2]: "LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",
6467
- [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION2]: "This program may not be used for executing instructions",
6468
- [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT2]: "Transaction leaves an account with a lower balance than rent-exempt minimum",
6469
- [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT2]: "Transaction loads a writable account that cannot be written",
6470
- [SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED2]: "Transaction exceeded max loaded accounts data size cap",
6471
- [SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE2]: "Transaction requires a fee but has no signature present",
6472
- [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND2]: "Attempt to load a program that does not exist",
6473
- [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED2]: "Execution of the program referenced by account at index $accountIndex is temporarily restricted.",
6474
- [SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED2]: "ResanitizationNeeded",
6475
- [SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE2]: "Transaction failed to sanitize accounts offsets correctly",
6476
- [SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE2]: "Transaction did not pass signature verification",
6477
- [SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS2]: "Transaction locked too many accounts",
6478
- [SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION2]: "Sum of account balances before and after transaction do not match",
6479
- [SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN2]: "The transaction failed with the error `$errorName`",
6480
- [SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION2]: "Transaction version is unsupported",
6481
- [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT2]: "Transaction would exceed account data limit within the block",
6482
- [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT2]: "Transaction would exceed total account data limit",
6483
- [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT2]: "Transaction would exceed max account limit within the block",
6484
- [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT2]: "Transaction would exceed max Block Cost Limit",
6485
- [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT2]: "Transaction would exceed max Vote Cost Limit",
6486
- [SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION2]: "Attempted to sign a transaction with an address that is not a signer for it",
6487
- [SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING2]: "Transaction is missing an address at index: $index.",
6488
- [SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES2]: "Transaction has no expected signers therefore it cannot be encoded",
6489
- [SOLANA_ERROR__TRANSACTION__COMPUTE_UNIT_LIMIT_OUT_OF_RANGE2]: "Transaction compute unit limit must be an integer in the range [0, $maxComputeUnitLimit]. `$computeUnitLimit` given",
6490
- [SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT2]: "Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",
6491
- [SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME2]: "Transaction does not have a blockhash lifetime",
6492
- [SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME2]: "Transaction is not a durable nonce transaction",
6493
- [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING2]: "Contents of these address lookup tables unknown: $lookupTableAddresses",
6494
- [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE2]: "Lookup of address at index $highestRequestedIndex failed for lookup table `$lookupTableAddress`. Highest known index is $highestKnownIndex. The lookup table may have been extended since its contents were retrieved",
6495
- [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING2]: "No fee payer set in CompiledTransaction",
6496
- [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND2]: "Could not find program address at index $index",
6497
- [SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT2]: "Failed to estimate the compute unit consumption for this transaction message. This is likely because simulating the transaction failed. Inspect the `cause` property of this error to learn more",
6498
- [SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_LOADED_ACCOUNTS_DATA_SIZE_LIMIT2]: "Failed to estimate the loaded accounts data size for this transaction message. The RPC did not return a `loadedAccountsDataSize` value from simulation. This value is required for version 1 transactions",
6499
- [SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT2]: "Transaction failed when it was simulated in order to estimate the compute unit consumption. The compute unit estimate provided is for a transaction that failed when simulated and may not be representative of the compute units this transaction would consume if successful. Inspect the `cause` property of this error to learn more",
6500
- [SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_RESOURCE_LIMITS2]: "Transaction failed when it was simulated in order to estimate its resource limits. The resource limit estimates provided are for a transaction that failed when simulated and may not be representative of the resources this transaction would consume if successful. Inspect the `cause` property of this error to learn more",
6501
- [SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING2]: "Transaction is missing a fee payer.",
6502
- [SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING2]: "Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer.",
6503
- [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE2]: "Transaction first instruction is not advance nonce account instruction.",
6504
- [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING2]: "Transaction with no instructions cannot be durable nonce transaction.",
6505
- [SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES2]: "This transaction includes an address (`$programAddress`) which is both invoked and set as the fee payer. Program addresses may not pay fees",
6506
- [SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE2]: "This transaction includes an address (`$programAddress`) which is both invoked and marked writable. Program addresses may not be writable",
6507
- [SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH2]: "The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",
6508
- [SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING2]: "Transaction is missing signatures for addresses: $addresses.",
6509
- [SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE2]: "Transaction version must be in the range [0, 127]. `$actualVersion` given",
6510
- [SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_NOT_SUPPORTED2]: "This version of Kit does not support decoding transactions with version $unsupportedVersion. The current max supported version is 1.",
6511
- [SOLANA_ERROR__TRANSACTION__NONCE_ACCOUNT_CANNOT_BE_IN_LOOKUP_TABLE2]: "The transaction has a durable nonce lifetime (with nonce `$nonce`), but the nonce account address is in a lookup table. The lifetime constraint cannot be constructed without fetching the lookup tables for the transaction.",
6512
- [SOLANA_ERROR__TRANSACTION__INVALID_CONFIG_MASK_PRIORITY_FEE_BITS2]: "Invalid transaction config mask: $mask. Bits 0 and 1 must match (both set or both unset)",
6513
- [SOLANA_ERROR__TRANSACTION__MALFORMED_MESSAGE_BYTES2]: "Transaction message bytes are malformed: $messageBytes",
6514
- [SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_MESSAGE_BYTES2]: "Transaction message bytes are empty, so the transaction cannot be encoded",
6515
- [SOLANA_ERROR__TRANSACTION__CANNOT_DECODE_EMPTY_TRANSACTION_BYTES2]: "Transaction bytes are empty, so no transaction can be decoded",
6516
- [SOLANA_ERROR__TRANSACTION__VERSION_ZERO_MUST_BE_ENCODED_WITH_SIGNATURES_FIRST2]: "Transaction version 0 must be encoded with signatures first. This transaction was encoded with first byte $firstByte, which is expected to be a signature count for v0 transactions.",
6517
- [SOLANA_ERROR__TRANSACTION__SIGNATURE_COUNT_TOO_HIGH_FOR_TRANSACTION_BYTES2]: "The provided transaction bytes expect that there should be $numExpectedSignatures signatures, but the bytes are not long enough to contain a transaction message with this many signatures. The provided bytes are $transactionBytesLength bytes long.",
6518
- [SOLANA_ERROR__TRANSACTION__INVALID_HEAP_SIZE2]: "Transaction heap size must be an integer multiple of $multipleOf bytes in the range [$minHeapSize, $maxHeapSize]. `$heapSize` given",
6519
- [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_ACCOUNT_INDEX2]: "The transaction has a durable nonce lifetime, but the nonce account index is invalid. Expected a nonce account index less than $numberOfStaticAccounts, got $nonceAccountIndex.",
6520
- [SOLANA_ERROR__TRANSACTION__INVALID_CONFIG_VALUE_KIND2]: "The transaction config value for $configName has the incorrect kind. Expected $expectedKind, got $actualKind.",
6521
- [SOLANA_ERROR__TRANSACTION__INSTRUCTION_HEADERS_PAYLOADS_MISMATCH2]: "The transaction does not have the same number of instruction headers and instruction payloads. Got $numInstructionHeaders instruction headers, and $numInstructionPayloads instruction payloads.",
6522
- [SOLANA_ERROR__TRANSACTION__TOO_MANY_SIGNER_ADDRESSES2]: "Transaction has $actualCount unique signer addresses but the maximum allowed is $maxAllowed",
6523
- [SOLANA_ERROR__TRANSACTION__TOO_MANY_ACCOUNT_ADDRESSES2]: "Transaction has $actualCount unique account addresses but the maximum allowed is $maxAllowed",
6524
- [SOLANA_ERROR__TRANSACTION__TOO_MANY_INSTRUCTIONS2]: "Transaction has $actualCount instructions but the maximum allowed is $maxAllowed",
6525
- [SOLANA_ERROR__TRANSACTION__TOO_MANY_ACCOUNTS_IN_INSTRUCTION2]: "The instruction at index $instructionIndex has $actualCount account references but the maximum allowed is $maxAllowed",
6526
- [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_ACCOUNT_INDEX_OUT_OF_RANGE2]: "Could not find an account address at index $index while decompiling an instruction",
6527
- [SOLANA_ERROR__TRANSACTION_INTROSPECTION__CANNOT_DECODE_JSON_PARSED_TRANSACTION2]: "`getTransaction` responses fetched with `encoding: 'jsonParsed'` cannot be decoded. Re-fetch the transaction with `encoding: 'base64'`, `'base58'`, or `'json'`",
6528
- [SOLANA_ERROR__TRANSACTION_INTROSPECTION__UNRECOGNIZED_GET_TRANSACTION_RESPONSE2]: "Could not recognize the shape of this `getTransaction` response. Expected a response fetched with `encoding: 'base64'`, `'base58'`, or `'json'`",
6529
- [SOLANA_ERROR__REACT__MISSING_CAPABILITY2]: "`$hookName` requires the following capabilities to be installed on the client: [$capabilities]. $providerHint",
6530
- [SOLANA_ERROR__REACT__MISSING_PROVIDER2]: "`$hookName` was called outside of a `ClientProvider`. Mount a `<ClientProvider client={client}>` in the ancestor tree.",
6531
- [SOLANA_ERROR__REACT__SUBSCRIPTION_CLOSED_WITHOUT_ERROR2]: "The subscription closed in an error state but did not report an error.",
6532
- [SOLANA_ERROR__WALLET__NOT_CONNECTED2]: "Cannot $operation: no wallet connected",
6533
- [SOLANA_ERROR__WALLET__NO_SIGNER_CONNECTED2]: "No signing wallet connected (status: $status)",
6534
- [SOLANA_ERROR__WALLET__SIGNER_NOT_AVAILABLE2]: "Connected wallet does not support signing",
6535
- [SOLANA_ERROR__WALLET__ACCOUNT_NOT_AVAILABLE2]: 'Account $address is not available in wallet "$walletName"'
6536
- };
6537
- var INSTRUCTION_ERROR_RANGE_SIZE2 = 1e3;
6538
- var START_INDEX2 = "i";
6539
- var TYPE3 = "t";
6540
- function getHumanReadableErrorMessage2(code, context = {}) {
6541
- const messageFormatString = SolanaErrorMessages2[code];
6542
- if (messageFormatString.length === 0) {
6543
- return "";
6544
- }
6545
- let state;
6546
- function commitStateUpTo(endIndex) {
6547
- if (state[TYPE3] === 2) {
6548
- const variableName = messageFormatString.slice(state[START_INDEX2] + 1, endIndex);
6549
- fragments.push(
6550
- variableName in context ? (
6551
- // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
6552
- `${context[variableName]}`
6553
- ) : `$${variableName}`
6554
- );
6555
- } else if (state[TYPE3] === 1) {
6556
- fragments.push(messageFormatString.slice(state[START_INDEX2], endIndex));
6557
- }
6558
- }
6559
- const fragments = [];
6560
- messageFormatString.split("").forEach((char, ii) => {
6561
- if (ii === 0) {
6562
- state = {
6563
- [START_INDEX2]: 0,
6564
- [TYPE3]: messageFormatString[0] === "\\" ? 0 : messageFormatString[0] === "$" ? 2 : 1
6565
- /* Text */
6566
- };
6567
- return;
6568
- }
6569
- let nextState;
6570
- switch (state[TYPE3]) {
6571
- case 0:
6572
- nextState = {
6573
- [START_INDEX2]: ii,
6574
- [TYPE3]: 1
6575
- /* Text */
6576
- };
6577
- break;
6578
- case 1:
6579
- if (char === "\\") {
6580
- nextState = {
6581
- [START_INDEX2]: ii,
6582
- [TYPE3]: 0
6583
- /* EscapeSequence */
6584
- };
6585
- } else if (char === "$") {
6586
- nextState = {
6587
- [START_INDEX2]: ii,
6588
- [TYPE3]: 2
6589
- /* Variable */
6590
- };
6591
- }
6592
- break;
6593
- case 2:
6594
- if (char === "\\") {
6595
- nextState = {
6596
- [START_INDEX2]: ii,
6597
- [TYPE3]: 0
6598
- /* EscapeSequence */
6599
- };
6600
- } else if (char === "$") {
6601
- nextState = {
6602
- [START_INDEX2]: ii,
6603
- [TYPE3]: 2
6604
- /* Variable */
6605
- };
6606
- } else if (!char.match(/\w/)) {
6607
- nextState = {
6608
- [START_INDEX2]: ii,
6609
- [TYPE3]: 1
6610
- /* Text */
6611
- };
6612
- }
6613
- break;
6614
- }
6615
- if (nextState) {
6616
- if (state !== nextState) {
6617
- commitStateUpTo(ii);
6618
- }
6619
- state = nextState;
6620
- }
6621
- });
6622
- commitStateUpTo();
6623
- let message = fragments.join("");
6624
- if (code >= SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN2 && code < SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN2 + INSTRUCTION_ERROR_RANGE_SIZE2 && "index" in context) {
6625
- message += ` (instruction #${context.index + 1})`;
6626
- }
6627
- return message;
6628
- }
6629
- function getErrorMessage2(code, context = {}) {
6630
- if (process.env.NODE_ENV !== "production") {
6631
- return getHumanReadableErrorMessage2(code, context);
6632
- } else {
6633
- let decodingAdviceMessage = `Solana error #${code}; Decode this error by running \`npx @solana/errors decode -- ${code}`;
6634
- if (Object.keys(context).length) {
6635
- decodingAdviceMessage += ` '${encodeContextObject2(context)}'`;
6636
- }
6637
- return `${decodingAdviceMessage}\``;
6638
- }
6639
- }
6640
- function isSolanaError2(e5, code) {
6641
- const isSolanaError22 = e5 instanceof Error && e5.name === "SolanaError";
6642
- if (isSolanaError22) {
6643
- if (code !== void 0) {
6644
- return e5.context.__code === code;
6645
- }
6646
- return true;
6647
- }
6648
- return false;
6649
- }
6650
- var SolanaError2 = class extends Error {
6651
- /**
6652
- * Indicates the root cause of this {@link SolanaError}, if any.
6653
- *
6654
- * For example, a transaction error might have an instruction error as its root cause. In this
6655
- * case, you will be able to access the instruction error on the transaction error as `cause`.
6656
- */
6657
- cause = this.cause;
6658
- /**
6659
- * Contains context that can assist in understanding or recovering from a {@link SolanaError}.
6660
- */
6661
- context;
6662
- constructor(...[code, contextAndErrorOptions]) {
6663
- let context;
6664
- let errorOptions;
6665
- if (contextAndErrorOptions) {
6666
- Object.entries(Object.getOwnPropertyDescriptors(contextAndErrorOptions)).forEach(([name, descriptor]) => {
6667
- if (name === "cause") {
6668
- errorOptions = { cause: descriptor.value };
6669
- } else {
6670
- if (context === void 0) {
6671
- context = {
6672
- __code: code
6673
- };
6674
- }
6675
- Object.defineProperty(context, name, descriptor);
6676
- }
6677
- });
6678
- }
6679
- const message = getErrorMessage2(code, context);
6680
- super(message, errorOptions);
6681
- this.context = Object.freeze(
6682
- context === void 0 ? {
6683
- __code: code
6684
- } : context
6685
- );
6686
- this.name = "SolanaError";
6687
- }
6688
- };
6689
-
6690
- // ../../node_modules/.pnpm/@solana+codecs-core@8.4.0_typescript@6.0.3/node_modules/@solana/codecs-core/dist/index.node.mjs
6691
- function padBytes2(bytes, length) {
6692
- if (bytes.length >= length) return bytes;
6693
- const paddedBytes = new Uint8Array(length).fill(0);
6694
- paddedBytes.set(bytes);
6695
- return paddedBytes;
6696
- }
6697
- var fixBytes2 = (bytes, length) => padBytes2(bytes.length <= length ? bytes : bytes.slice(0, length), length);
6698
- function getEncodedSize2(value, encoder) {
6699
- return "fixedSize" in encoder ? encoder.fixedSize : encoder.getSizeFromValue(value);
6700
- }
6701
- function createEncoder2(encoder) {
6702
- return Object.freeze({
6703
- ...encoder,
6704
- encode: (value) => {
6705
- const bytes = new Uint8Array(getEncodedSize2(value, encoder));
6706
- encoder.write(value, bytes, 0);
6707
- return bytes;
6708
- }
6709
- });
6710
- }
6711
- function createDecoder2(decoder) {
6712
- return Object.freeze({
6713
- ...decoder,
6714
- decode: (bytes, offset = 0) => decoder.read(bytes, offset)[0]
6715
- });
6716
- }
6717
- function isFixedSize2(codec) {
6718
- return "fixedSize" in codec && typeof codec.fixedSize === "number";
6719
- }
6720
- function isVariableSize2(codec) {
6721
- return !isFixedSize2(codec);
6722
- }
6723
- function combineCodec2(encoder, decoder) {
6724
- if (isFixedSize2(encoder) !== isFixedSize2(decoder)) {
6725
- throw new SolanaError2(SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH2);
6726
- }
6727
- if (isFixedSize2(encoder) && isFixedSize2(decoder) && encoder.fixedSize !== decoder.fixedSize) {
6728
- throw new SolanaError2(SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH2, {
6729
- decoderFixedSize: decoder.fixedSize,
6730
- encoderFixedSize: encoder.fixedSize
6731
- });
6732
- }
6733
- if (!isFixedSize2(encoder) && !isFixedSize2(decoder) && encoder.maxSize !== decoder.maxSize) {
6734
- throw new SolanaError2(SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH2, {
6735
- decoderMaxSize: decoder.maxSize,
6736
- encoderMaxSize: encoder.maxSize
6737
- });
6738
- }
6739
- return {
6740
- ...decoder,
6741
- ...encoder,
6742
- decode: decoder.decode,
6743
- encode: encoder.encode,
6744
- read: decoder.read,
6745
- write: encoder.write
6746
- };
6747
- }
6748
- function assertByteArrayHasEnoughBytesForCodec2(codecDescription, expected, bytes, offset = 0) {
6749
- const bytesLength = bytes.length - offset;
6750
- if (bytesLength < expected) {
6751
- throw new SolanaError2(SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH2, {
6752
- bytesLength,
6753
- codecDescription,
6754
- expected
6755
- });
6756
- }
6757
- }
6758
- function fixEncoderSize2(encoder, fixedBytes) {
6759
- return createEncoder2({
6760
- fixedSize: fixedBytes,
6761
- write: (value, bytes, offset) => {
6762
- const variableByteArray = encoder.encode(value);
6763
- const fixedByteArray = variableByteArray.length > fixedBytes ? variableByteArray.slice(0, fixedBytes) : variableByteArray;
6764
- bytes.set(fixedByteArray, offset);
6765
- return offset + fixedBytes;
6766
- }
6767
- });
6768
- }
6769
- function fixDecoderSize2(decoder, fixedBytes) {
6770
- return createDecoder2({
6771
- fixedSize: fixedBytes,
6772
- read: (bytes, offset) => {
6773
- assertByteArrayHasEnoughBytesForCodec2("fixCodecSize", fixedBytes, bytes, offset);
6774
- if (offset > 0 || bytes.length > fixedBytes) {
6775
- bytes = bytes.slice(offset, offset + fixedBytes);
6776
- }
6777
- if (isFixedSize2(decoder)) {
6778
- bytes = fixBytes2(bytes, decoder.fixedSize);
6779
- }
6780
- const [value] = decoder.read(bytes, 0);
6781
- return [value, offset + fixedBytes];
6782
- }
6783
- });
6784
- }
6785
- function transformEncoder2(encoder, unmap) {
6786
- return createEncoder2({
6787
- ...isVariableSize2(encoder) ? { ...encoder, getSizeFromValue: (value) => encoder.getSizeFromValue(unmap(value)) } : encoder,
6788
- write: (value, bytes, offset) => encoder.write(unmap(value), bytes, offset)
6789
- });
6790
- }
6791
-
6792
- // ../../node_modules/.pnpm/@solana+codecs-strings@8.4.0_typescript@6.0.3/node_modules/@solana/codecs-strings/dist/index.node.mjs
6793
- function assertValidBaseString3(alphabet4, testValue, givenValue = testValue) {
6794
- if (!testValue.match(new RegExp(`^[${alphabet4}]*$`))) {
6795
- throw new SolanaError2(SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE2, {
6796
- alphabet: alphabet4,
6797
- base: alphabet4.length,
6798
- value: givenValue
6799
- });
6800
- }
6801
- }
6802
- var getBaseXEncoder3 = (alphabet4) => {
6803
- return createEncoder2({
6804
- getSizeFromValue: (value) => {
6805
- const [leadingZeroes, tailChars] = partitionLeadingZeroes3(value, alphabet4[0]);
6806
- if (!tailChars) return value.length;
6807
- const base10Number = getBigIntFromBaseX3(tailChars, alphabet4);
6808
- return leadingZeroes.length + Math.ceil(base10Number.toString(16).length / 2);
6809
- },
6810
- write(value, bytes, offset) {
6811
- assertValidBaseString3(alphabet4, value);
6812
- if (value === "") return offset;
6813
- const [leadingZeroes, tailChars] = partitionLeadingZeroes3(value, alphabet4[0]);
6814
- if (!tailChars) {
6815
- bytes.set(new Uint8Array(leadingZeroes.length).fill(0), offset);
6816
- return offset + leadingZeroes.length;
6817
- }
6818
- let base10Number = getBigIntFromBaseX3(tailChars, alphabet4);
6819
- const tailBytes = [];
6820
- while (base10Number > 0n) {
6821
- tailBytes.unshift(Number(base10Number % 256n));
6822
- base10Number /= 256n;
6823
- }
6824
- const bytesToAdd = [...Array(leadingZeroes.length).fill(0), ...tailBytes];
6825
- bytes.set(bytesToAdd, offset);
6826
- return offset + bytesToAdd.length;
6827
- }
6828
- });
6829
- };
6830
- var getBaseXDecoder2 = (alphabet4) => {
6831
- return createDecoder2({
6832
- read(rawBytes, offset) {
6833
- const bytes = offset === 0 || offset <= -rawBytes.byteLength ? rawBytes : rawBytes.slice(offset);
6834
- if (bytes.length === 0) return ["", rawBytes.length];
6835
- let trailIndex = bytes.findIndex((n) => n !== 0);
6836
- trailIndex = trailIndex === -1 ? bytes.length : trailIndex;
6837
- const leadingZeroes = alphabet4[0].repeat(trailIndex);
6838
- if (trailIndex === bytes.length) return [leadingZeroes, rawBytes.length];
6839
- const base10Number = bytes.slice(trailIndex).reduce((sum, byte) => sum * 256n + BigInt(byte), 0n);
6840
- const tailChars = getBaseXFromBigInt2(base10Number, alphabet4);
6841
- return [leadingZeroes + tailChars, rawBytes.length];
6842
- }
6843
- });
6844
- };
6845
- function partitionLeadingZeroes3(value, zeroCharacter) {
6846
- const [leadingZeros, tailChars] = value.split(new RegExp(`((?!${zeroCharacter}).*)`));
6847
- return [leadingZeros, tailChars];
6848
- }
6849
- function getBigIntFromBaseX3(value, alphabet4) {
6850
- const base = BigInt(alphabet4.length);
6851
- let sum = 0n;
6852
- for (const char of value) {
6853
- sum *= base;
6854
- sum += BigInt(alphabet4.indexOf(char));
6855
- }
6856
- return sum;
6857
- }
6858
- function getBaseXFromBigInt2(value, alphabet4) {
6859
- const base = BigInt(alphabet4.length);
6860
- const tailChars = [];
6861
- while (value > 0n) {
6862
- tailChars.unshift(alphabet4[Number(value % base)]);
6863
- value /= base;
6864
- }
6865
- return tailChars.join("");
6866
- }
6867
- var alphabet23 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
6868
- var getBase58Encoder3 = () => getBaseXEncoder3(alphabet23);
6869
- var getBase58Decoder2 = () => getBaseXDecoder2(alphabet23);
6870
- var e4 = globalThis.TextDecoder;
6871
- var o3 = globalThis.TextEncoder;
6872
-
6873
- // ../../node_modules/.pnpm/@solana+assertions@8.4.0_typescript@6.0.3/node_modules/@solana/assertions/dist/index.node.mjs
6874
- function assertDigestCapabilityIsAvailable2() {
6875
- if (typeof globalThis.crypto === "undefined" || typeof globalThis.crypto.subtle?.digest !== "function") {
6876
- throw new SolanaError2(SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED2);
6877
- }
6878
- }
6879
-
6880
- // ../../node_modules/.pnpm/@solana+addresses@8.4.0_typescript@6.0.3/node_modules/@solana/addresses/dist/index.node.mjs
6881
- var memoizedBase58Encoder2;
6882
- var memoizedBase58Decoder2;
6883
- function getMemoizedBase58Encoder2() {
6884
- if (!memoizedBase58Encoder2) memoizedBase58Encoder2 = getBase58Encoder3();
6885
- return memoizedBase58Encoder2;
6886
- }
6887
- function getMemoizedBase58Decoder2() {
6888
- if (!memoizedBase58Decoder2) memoizedBase58Decoder2 = getBase58Decoder2();
6889
- return memoizedBase58Decoder2;
6890
- }
6891
- function assertIsAddress2(putativeAddress) {
6892
- if (
6893
- // Lowest address (32 bytes of zeroes)
6894
- putativeAddress.length < 32 || // Highest address (32 bytes of 255)
6895
- putativeAddress.length > 44
6896
- ) {
6897
- throw new SolanaError2(SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE2, {
6898
- actualLength: putativeAddress.length
6899
- });
6900
- }
6901
- const base58Encoder = getMemoizedBase58Encoder2();
6902
- const bytes = base58Encoder.encode(putativeAddress);
6903
- const numBytes = bytes.byteLength;
6904
- if (numBytes !== 32) {
6905
- throw new SolanaError2(SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH2, {
6906
- actualLength: numBytes
6907
- });
6908
- }
6909
- }
6910
- function address2(putativeAddress) {
6911
- assertIsAddress2(putativeAddress);
6912
- return putativeAddress;
6913
- }
6914
- function getAddressEncoder2() {
6915
- return transformEncoder2(
6916
- fixEncoderSize2(getMemoizedBase58Encoder2(), 32),
6917
- (putativeAddress) => address2(putativeAddress)
6918
- );
6919
- }
6920
- function getAddressDecoder2() {
6921
- return fixDecoderSize2(getMemoizedBase58Decoder2(), 32);
6922
- }
6923
- function getAddressCodec2() {
6924
- return combineCodec2(getAddressEncoder2(), getAddressDecoder2());
6925
- }
6926
- var D2 = 37095705934669439343138083508754565189542113879843219016388785533085940283555n;
6927
- var P2 = 57896044618658097711785492504343953926634992332820282019728792003956564819949n;
6928
- var RM12 = 19681161376707505956807079304988542015446066515923890162744021073123829784752n;
6929
- function mod2(a) {
6930
- const r = a % P2;
6931
- return r >= 0n ? r : P2 + r;
6932
- }
6933
- function pow22(x, power) {
6934
- let r = x;
6935
- while (power-- > 0n) {
6936
- r *= r;
6937
- r %= P2;
6938
- }
6939
- return r;
6940
- }
6941
- function pow_2_252_32(x) {
6942
- const x2 = x * x % P2;
6943
- const b2 = x2 * x % P2;
6944
- const b4 = pow22(b2, 2n) * b2 % P2;
6945
- const b5 = pow22(b4, 1n) * x % P2;
6946
- const b10 = pow22(b5, 5n) * b5 % P2;
6947
- const b20 = pow22(b10, 10n) * b10 % P2;
6948
- const b40 = pow22(b20, 20n) * b20 % P2;
6949
- const b80 = pow22(b40, 40n) * b40 % P2;
6950
- const b160 = pow22(b80, 80n) * b80 % P2;
6951
- const b240 = pow22(b160, 80n) * b80 % P2;
6952
- const b250 = pow22(b240, 10n) * b10 % P2;
6953
- const pow_p_5_8 = pow22(b250, 2n) * x % P2;
6954
- return pow_p_5_8;
6955
- }
6956
- function uvRatio2(u, v) {
6957
- const v3 = mod2(v * v * v);
6958
- const v7 = mod2(v3 * v3 * v);
6959
- const pow = pow_2_252_32(u * v7);
6960
- let x = mod2(u * v3 * pow);
6961
- const vx2 = mod2(v * x * x);
6962
- const root1 = x;
6963
- const root2 = mod2(x * RM12);
6964
- const useRoot1 = vx2 === u;
6965
- const useRoot2 = vx2 === mod2(-u);
6966
- const noRoot = vx2 === mod2(-u * RM12);
6967
- if (useRoot1) x = root1;
6968
- if (useRoot2 || noRoot) x = root2;
6969
- if ((mod2(x) & 1n) === 1n) x = mod2(-x);
6970
- if (!useRoot1 && !useRoot2) {
6971
- return null;
6972
- }
6973
- return x;
6974
- }
6975
- function pointIsOnCurve2(y, lastByte) {
6976
- const y2 = mod2(y * y);
6977
- const u = mod2(y2 - 1n);
6978
- const v = mod2(D2 * y2 + 1n);
6979
- const x = uvRatio2(u, v);
6980
- if (x === null) {
6981
- return false;
6982
- }
6983
- const isLastByteOdd = (lastByte & 128) !== 0;
6984
- if (x === 0n && isLastByteOdd) {
6985
- return false;
6986
- }
6987
- return true;
6988
- }
6989
- function byteToHex2(byte) {
6990
- const hexString = byte.toString(16);
6991
- if (hexString.length === 1) {
6992
- return `0${hexString}`;
6993
- } else {
6994
- return hexString;
6995
- }
6996
- }
6997
- function decompressPointBytes2(bytes) {
6998
- const hexString = bytes.reduce((acc, byte, ii) => `${byteToHex2(ii === 31 ? byte & -129 : byte)}${acc}`, "");
6999
- const integerLiteralString = `0x${hexString}`;
7000
- return BigInt(integerLiteralString);
7001
- }
7002
- function compressedPointBytesAreOnCurve2(bytes) {
7003
- if (bytes.byteLength !== 32) {
7004
- return false;
7005
- }
7006
- const y = decompressPointBytes2(bytes);
7007
- return pointIsOnCurve2(y, bytes[31]);
7008
- }
7009
- var MAX_SEED_LENGTH2 = 32;
7010
- var MAX_SEEDS2 = 16;
7011
- var PDA_MARKER_BYTES2 = [
7012
- // The string 'ProgramDerivedAddress'
7013
- 80,
7014
- 114,
7015
- 111,
7016
- 103,
7017
- 114,
7018
- 97,
7019
- 109,
7020
- 68,
7021
- 101,
7022
- 114,
7023
- 105,
7024
- 118,
7025
- 101,
7026
- 100,
7027
- 65,
7028
- 100,
7029
- 100,
7030
- 114,
7031
- 101,
7032
- 115,
7033
- 115
7034
- ];
7035
- async function createProgramDerivedAddress2({ programAddress, seeds }) {
7036
- assertDigestCapabilityIsAvailable2();
7037
- if (seeds.length > MAX_SEEDS2) {
7038
- throw new SolanaError2(SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED2, {
7039
- actual: seeds.length,
7040
- maxSeeds: MAX_SEEDS2
7041
- });
7042
- }
7043
- let textEncoder;
7044
- const seedBytes = seeds.reduce((acc, seed, ii) => {
7045
- const bytes = typeof seed === "string" ? (textEncoder ||= new TextEncoder()).encode(seed) : seed;
7046
- if (bytes.byteLength > MAX_SEED_LENGTH2) {
7047
- throw new SolanaError2(SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED2, {
7048
- actual: bytes.byteLength,
7049
- index: ii,
7050
- maxSeedLength: MAX_SEED_LENGTH2
7051
- });
7052
- }
7053
- acc.push(...bytes);
7054
- return acc;
7055
- }, []);
7056
- const base58EncodedAddressCodec = getAddressCodec2();
7057
- const programAddressBytes = base58EncodedAddressCodec.encode(programAddress);
7058
- const addressBytesBuffer = await crypto.subtle.digest(
7059
- "SHA-256",
7060
- new Uint8Array([...seedBytes, ...programAddressBytes, ...PDA_MARKER_BYTES2])
7061
- );
7062
- const addressBytes = new Uint8Array(addressBytesBuffer);
7063
- if (compressedPointBytesAreOnCurve2(addressBytes)) {
7064
- throw new SolanaError2(SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE2);
7065
- }
7066
- return base58EncodedAddressCodec.decode(addressBytes);
7067
- }
7068
- async function getProgramDerivedAddress2({
7069
- programAddress,
7070
- seeds
7071
- }) {
7072
- let bumpSeed = 255;
7073
- while (bumpSeed > 0) {
7074
- try {
7075
- const address22 = await createProgramDerivedAddress2({
7076
- programAddress,
7077
- seeds: [...seeds, new Uint8Array([bumpSeed])]
7078
- });
7079
- return [address22, bumpSeed];
7080
- } catch (e5) {
7081
- if (isSolanaError2(e5, SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE2)) {
7082
- bumpSeed--;
7083
- } else {
7084
- throw e5;
7085
- }
7086
- }
7087
- }
7088
- throw new SolanaError2(SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED2);
7089
- }
7090
-
7091
- // ../../node_modules/.pnpm/@solana+codecs-numbers@8.4.0_typescript@6.0.3/node_modules/@solana/codecs-numbers/dist/index.node.mjs
7092
- function assertNumberIsBetweenForCodec2(codecDescription, min, max, value) {
7093
- if (value < min || value > max) {
7094
- throw new SolanaError2(SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE2, {
7095
- codecDescription,
7096
- max,
7097
- min,
7098
- value
7099
- });
7100
- }
7101
- }
7102
- function isLittleEndian2(config) {
7103
- return config?.endian === 1 ? false : true;
7104
- }
7105
- function numberEncoderFactory2(input) {
7106
- return createEncoder2({
7107
- fixedSize: input.size,
7108
- write(value, bytes, offset) {
7109
- if (input.range) {
7110
- assertNumberIsBetweenForCodec2(input.name, input.range[0], input.range[1], value);
7111
- }
7112
- const arrayBuffer = new ArrayBuffer(input.size);
7113
- input.set(new DataView(arrayBuffer), value, isLittleEndian2(input.config));
7114
- bytes.set(new Uint8Array(arrayBuffer), offset);
7115
- return offset + input.size;
7116
- }
7117
- });
7118
- }
7119
- var getU64Encoder2 = (config = {}) => numberEncoderFactory2({
7120
- config,
7121
- name: "u64",
7122
- range: [0n, BigInt("0xffffffffffffffff")],
7123
- set: (view, value, le) => view.setBigUint64(0, BigInt(value), le),
7124
- size: 8
7125
- });
7126
- var getU8Encoder2 = () => numberEncoderFactory2({
7127
- name: "u8",
7128
- range: [0, Number("0xff")],
7129
- set: (view, value) => view.setUint8(0, Number(value)),
7130
- size: 1
7131
- });
7132
-
7133
- // ../../node_modules/.pnpm/@solana+codecs-data-structures@8.4.0_typescript@6.0.3/node_modules/@solana/codecs-data-structures/dist/index.node.mjs
7134
- function sumCodecSizes2(sizes) {
7135
- return sizes.reduce((all, size) => all === null || size === null ? null : all + size, 0);
7136
- }
7137
- function getFixedSize2(codec) {
7138
- return isFixedSize2(codec) ? codec.fixedSize : null;
7139
- }
7140
- function getMaxSize2(codec) {
7141
- return isFixedSize2(codec) ? codec.fixedSize : codec.maxSize ?? null;
7142
- }
7143
- function getStructEncoder2(fields) {
7144
- const fieldCodecs = fields.map(([, codec]) => codec);
7145
- const fixedSize = sumCodecSizes2(fieldCodecs.map(getFixedSize2));
7146
- const maxSize = sumCodecSizes2(fieldCodecs.map(getMaxSize2)) ?? void 0;
7147
- return createEncoder2({
7148
- ...fixedSize === null ? {
7149
- getSizeFromValue: (value) => fields.map(([key, codec]) => getEncodedSize2(value[key], codec)).reduce((all, one) => all + one, 0),
7150
- maxSize
7151
- } : { fixedSize },
7152
- write: (struct, bytes, offset) => {
7153
- fields.forEach(([key, codec]) => {
7154
- offset = codec.write(struct[key], bytes, offset);
7155
- });
7156
- return offset;
7157
- }
7158
- });
7159
- }
7160
-
7161
- // ../../node_modules/.pnpm/@solana+instructions@8.4.0_typescript@6.0.3/node_modules/@solana/instructions/dist/index.node.mjs
7162
- var AccountRole2 = /* @__PURE__ */ ((AccountRole22) => {
7163
- AccountRole22[AccountRole22["WRITABLE_SIGNER"] = /* 3 */
7164
- 3] = "WRITABLE_SIGNER";
7165
- AccountRole22[AccountRole22["READONLY_SIGNER"] = /* 2 */
7166
- 2] = "READONLY_SIGNER";
7167
- AccountRole22[AccountRole22["WRITABLE"] = /* 1 */
7168
- 1] = "WRITABLE";
7169
- AccountRole22[AccountRole22["READONLY"] = /* 0 */
7170
- 0] = "READONLY";
7171
- return AccountRole22;
7172
- })(AccountRole2 || {});
7173
- var IS_SIGNER_BITMASK2 = 2;
7174
- function upgradeRoleToSigner2(role) {
7175
- return role | IS_SIGNER_BITMASK2;
7176
- }
7177
-
7178
- // ../../node_modules/.pnpm/@solana+signers@8.4.0_typescript@6.0.3/node_modules/@solana/signers/dist/index.node.mjs
7179
- function isTransactionModifyingSigner2(value) {
7180
- return "modifyAndSignTransactions" in value && typeof value.modifyAndSignTransactions === "function";
7181
- }
7182
- function isTransactionPartialSigner2(value) {
7183
- return "signTransactions" in value && typeof value.signTransactions === "function";
7184
- }
7185
- function isTransactionSendingSigner2(value) {
7186
- return "signAndSendTransactions" in value && typeof value.signAndSendTransactions === "function";
7187
- }
7188
- function isTransactionSigner2(value) {
7189
- return isTransactionPartialSigner2(value) || isTransactionModifyingSigner2(value) || isTransactionSendingSigner2(value);
7190
- }
7191
- var o4 = globalThis.TextEncoder;
7192
-
7193
- // ../../node_modules/.pnpm/@solana+program-client-core@8.4.0_typescript@6.0.3/node_modules/@solana/program-client-core/dist/index.node.mjs
5837
+ // ../../node_modules/.pnpm/@solana+program-client-core@8.4.0_typescript@5.7.3/node_modules/@solana/program-client-core/dist/index.node.mjs
7194
5838
  function getNonNullResolvedInstructionInput(inputName, value) {
7195
5839
  if (value === null || value === void 0) {
7196
- throw new SolanaError2(SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_NON_NULL2, {
5840
+ throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_NON_NULL, {
7197
5841
  inputName
7198
5842
  });
7199
5843
  }
@@ -7213,7 +5857,7 @@ function getAccountMetaFactory(programAddress, optionalAccountStrategy) {
7213
5857
  return (inputName, account) => {
7214
5858
  if (!account.value) {
7215
5859
  if (optionalAccountStrategy === "omitted") return;
7216
- return Object.freeze({ address: programAddress, role: AccountRole2.READONLY });
5860
+ return Object.freeze({ address: programAddress, role: AccountRole.READONLY });
7217
5861
  }
7218
5862
  if (hasExplicitRole(account.value)) {
7219
5863
  return Object.freeze({
@@ -7225,14 +5869,14 @@ function getAccountMetaFactory(programAddress, optionalAccountStrategy) {
7225
5869
  const idlIsSigner = account.isSigner ?? "either";
7226
5870
  const isSigner = idlIsSigner !== false && isResolvedInstructionAccountSigner(account.value);
7227
5871
  if (!isSigner && idlIsSigner === true) {
7228
- throw new SolanaError2(SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_SIGNER2, {
5872
+ throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_SIGNER, {
7229
5873
  inputName
7230
5874
  });
7231
5875
  }
7232
- const writableRole = account.isWritable ? AccountRole2.WRITABLE : AccountRole2.READONLY;
5876
+ const writableRole = account.isWritable ? AccountRole.WRITABLE : AccountRole.READONLY;
7233
5877
  return Object.freeze({
7234
5878
  address: getAddressFromResolvedInstructionAccount(inputName, account.value),
7235
- role: isSigner ? upgradeRoleToSigner2(writableRole) : writableRole,
5879
+ role: isSigner ? upgradeRoleToSigner(writableRole) : writableRole,
7236
5880
  ...isSigner ? { signer: account.value } : {}
7237
5881
  });
7238
5882
  };
@@ -7241,7 +5885,7 @@ function hasExplicitRole(value) {
7241
5885
  return typeof value === "object" && "role" in value && typeof value.role === "number";
7242
5886
  }
7243
5887
  function isResolvedInstructionAccountSigner(value) {
7244
- return !!value && typeof value === "object" && "address" in value && typeof value.address === "string" && isTransactionSigner2(value);
5888
+ return !!value && typeof value === "object" && "address" in value && typeof value.address === "string" && isTransactionSigner(value);
7245
5889
  }
7246
5890
 
7247
5891
  // ../../node_modules/.pnpm/@solana-program+token@0.17.0_@solana+kit@8.4.0/node_modules/@solana-program/token/dist/src/index.mjs
@@ -7249,18 +5893,18 @@ async function findAssociatedTokenPda(seeds, config = {}) {
7249
5893
  const {
7250
5894
  programAddress = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
7251
5895
  } = config;
7252
- return await getProgramDerivedAddress2({
5896
+ return await getProgramDerivedAddress({
7253
5897
  programAddress,
7254
5898
  seeds: [
7255
- getAddressEncoder2().encode(seeds.owner),
7256
- getAddressEncoder2().encode(seeds.tokenProgram),
7257
- getAddressEncoder2().encode(seeds.mint)
5899
+ getAddressEncoder().encode(seeds.owner),
5900
+ getAddressEncoder().encode(seeds.tokenProgram),
5901
+ getAddressEncoder().encode(seeds.mint)
7258
5902
  ]
7259
5903
  });
7260
5904
  }
7261
5905
  var CREATE_ASSOCIATED_TOKEN_IDEMPOTENT_DISCRIMINATOR = 1;
7262
5906
  function getCreateAssociatedTokenIdempotentInstructionDataEncoder() {
7263
- return transformEncoder2(getStructEncoder2([["discriminator", getU8Encoder2()]]), (value) => ({
5907
+ return transformEncoder(getStructEncoder([["discriminator", getU8Encoder()]]), (value) => ({
7264
5908
  ...value,
7265
5909
  discriminator: CREATE_ASSOCIATED_TOKEN_IDEMPOTENT_DISCRIMINATOR
7266
5910
  }));
@@ -7298,11 +5942,11 @@ function getCreateAssociatedTokenIdempotentInstruction(input, config) {
7298
5942
  }
7299
5943
  var TRANSFER_CHECKED_DISCRIMINATOR = 12;
7300
5944
  function getTransferCheckedInstructionDataEncoder() {
7301
- return transformEncoder2(
7302
- getStructEncoder2([
7303
- ["discriminator", getU8Encoder2()],
7304
- ["amount", getU64Encoder2()],
7305
- ["decimals", getU8Encoder2()]
5945
+ return transformEncoder(
5946
+ getStructEncoder([
5947
+ ["discriminator", getU8Encoder()],
5948
+ ["amount", getU64Encoder()],
5949
+ ["decimals", getU8Encoder()]
7306
5950
  ]),
7307
5951
  (value) => ({ ...value, discriminator: TRANSFER_CHECKED_DISCRIMINATOR })
7308
5952
  );
@@ -7837,7 +6481,7 @@ var initCommand = new Command2("init").description(
7837
6481
  return;
7838
6482
  }
7839
6483
  await ensureInitNetwork();
7840
- const { privateKey, address: address3 } = generateKeypair();
6484
+ const { privateKey, address: address2 } = generateKeypair();
7841
6485
  const solanaWallet = await generateSolanaKeypair();
7842
6486
  const publicKey = deriveCompressedPublicKey(privateKey);
7843
6487
  const legalBundle = LegalBundleSchema.parse(await apiGet("/api/legal/current"));
@@ -7845,11 +6489,11 @@ var initCommand = new Command2("init").description(
7845
6489
  assumeYes: Boolean(opts.yes),
7846
6490
  bundle: legalBundle,
7847
6491
  signMessage: (message) => privateKeyToAccount(privateKey).signMessage({ message }),
7848
- walletAddress: address3
6492
+ walletAddress: address2
7849
6493
  }) : void 0;
7850
6494
  const deviceRegisterSignature = await privateKeyToAccount(
7851
6495
  privateKey
7852
- ).signMessage({ message: buildDeviceRegisterMessage(address3) });
6496
+ ).signMessage({ message: buildDeviceRegisterMessage(address2) });
7853
6497
  const {
7854
6498
  deviceId,
7855
6499
  apiToken,
@@ -7859,14 +6503,14 @@ var initCommand = new Command2("init").description(
7859
6503
  legalReceipt: legalAcceptance?.receipt,
7860
6504
  publicKey,
7861
6505
  signature: deviceRegisterSignature,
7862
- walletAddress: address3
6506
+ walletAddress: address2
7863
6507
  });
7864
6508
  const encryptedKey = encryptPrivateKey(deviceEncryptionKey, privateKey);
7865
6509
  const createdTapKey = opts.tap ? storedTapKey(deviceEncryptionKey, null, generateTapKey(), /* @__PURE__ */ new Date(), "created") : void 0;
7866
6510
  let agentId = initialAgentId;
7867
6511
  const newKeystore = {
7868
6512
  encryptedKey,
7869
- walletAddress: address3,
6513
+ walletAddress: address2,
7870
6514
  deviceId,
7871
6515
  apiToken,
7872
6516
  agentId,
@@ -7893,7 +6537,7 @@ var initCommand = new Command2("init").description(
7893
6537
  return;
7894
6538
  }
7895
6539
  if (!agentId) {
7896
- agentId = await pollAgentId(address3);
6540
+ agentId = await pollAgentId(address2);
7897
6541
  if (agentId) {
7898
6542
  const keystore = await loadKeystore();
7899
6543
  await saveKeystore(
@@ -7919,7 +6563,7 @@ var initCommand = new Command2("init").description(
7919
6563
  const tapKey = createdTapKey ? await tryEnrolTapKey(createdTapKey, selectedNetwork().chainId, warnings) : void 0;
7920
6564
  printResult(
7921
6565
  {
7922
- address: address3,
6566
+ address: address2,
7923
6567
  agentId,
7924
6568
  solanaAddress: solanaWallet.address,
7925
6569
  network: chain?.networkName ?? networkInfo?.networkName,
@@ -7929,7 +6573,7 @@ var initCommand = new Command2("init").description(
7929
6573
  emailAddress,
7930
6574
  ...tapKey ? { tapKey: tapKeySummary(tapKey) } : {}
7931
6575
  },
7932
- { warnings, next: nextAfterInit({ address: address3, chainId: selectedNetwork().chainId }) }
6576
+ { warnings, next: nextAfterInit({ address: address2, chainId: selectedNetwork().chainId }) }
7933
6577
  );
7934
6578
  });
7935
6579
 
@@ -7963,22 +6607,22 @@ var startCommand = new Command3("start").description(
7963
6607
  printError("No keystore found. Run `taskmarket init` first.");
7964
6608
  return;
7965
6609
  }
7966
- const address3 = auth.walletAddress;
6610
+ const address2 = auth.walletAddress;
7967
6611
  const chainId = selectedNetwork().chainId;
7968
6612
  const [balance, queue, withdrawal, open] = await Promise.all([
7969
6613
  settle(
7970
6614
  () => apiGet(
7971
- `/api/wallet/balance?${new URLSearchParams({ address: address3, chainId: String(chainId) })}`
6615
+ `/api/wallet/balance?${new URLSearchParams({ address: address2, chainId: String(chainId) })}`
7972
6616
  )
7973
6617
  ),
7974
6618
  settle(
7975
- () => apiGet(`/api/agents/action-queue?${new URLSearchParams({ address: address3, limit: "50" })}`, {
6619
+ () => apiGet(`/api/agents/action-queue?${new URLSearchParams({ address: address2, limit: "50" })}`, {
7976
6620
  headers: auth.headers
7977
6621
  })
7978
6622
  ),
7979
6623
  settle(
7980
6624
  () => apiGet(
7981
- `/api/wallet/withdrawal-address?${new URLSearchParams({ address: address3, chainId: String(chainId) })}`
6625
+ `/api/wallet/withdrawal-address?${new URLSearchParams({ address: address2, chainId: String(chainId) })}`
7982
6626
  )
7983
6627
  ),
7984
6628
  settle(
@@ -7992,7 +6636,7 @@ var startCommand = new Command3("start").description(
7992
6636
  const needsYou = queue ? queue.total : null;
7993
6637
  printResult(
7994
6638
  {
7995
- address: address3,
6639
+ address: address2,
7996
6640
  network: selectedNetwork().name,
7997
6641
  chainId,
7998
6642
  balance: balance ? {
@@ -8017,7 +6661,7 @@ var startCommand = new Command3("start").description(
8017
6661
  },
8018
6662
  {
8019
6663
  next: nextForHome({
8020
- address: address3,
6664
+ address: address2,
8021
6665
  chainId,
8022
6666
  balanceBaseUnits: balance?.balanceBaseUnits,
8023
6667
  needsYou: needsYou ?? 0,
@@ -8416,9 +7060,9 @@ identityCommand.command("status").description("Check identity registration statu
8416
7060
  identityCommand.command("feedback").description(
8417
7061
  "Show the agent your requester feedback is bound to and the protocol reputation feedback values"
8418
7062
  ).option("--address <address>", "Wallet to read (defaults to this wallet)").action(async (options) => {
8419
- const address3 = options.address ?? (await loadKeystore()).walletAddress;
7063
+ const address2 = options.address ?? (await loadKeystore()).walletAddress;
8420
7064
  const result = await apiGet(
8421
- `/api/identity/requester-feedback?address=${address3}&chainId=${selectedNetwork().chainId}`
7065
+ `/api/identity/requester-feedback?address=${address2}&chainId=${selectedNetwork().chainId}`
8422
7066
  );
8423
7067
  printResult(result);
8424
7068
  });
@@ -8530,12 +7174,12 @@ async function platformView(opts) {
8530
7174
  printResult(await apiGet(withChainId(`/api/stats/activity-heatmap?${query(input2)}`)));
8531
7175
  return true;
8532
7176
  }
8533
- let address3 = opts.address;
8534
- if (!address3 && !opts.agent) {
8535
- address3 = (await loadKeystore()).walletAddress;
7177
+ let address2 = opts.address;
7178
+ if (!address2 && !opts.agent) {
7179
+ address2 = (await loadKeystore()).walletAddress;
8536
7180
  }
8537
7181
  const input = parseInput(AgentTimeSeriesInputSchema, {
8538
- address: opts.agent ? void 0 : address3,
7182
+ address: opts.agent ? void 0 : address2,
8539
7183
  agentId: opts.agent,
8540
7184
  range: opts.range,
8541
7185
  bucket: opts.bucket
@@ -8550,20 +7194,20 @@ var statsCommand = new Command7("stats").description("View agent or platform-wid
8550
7194
  renderFailure(err);
8551
7195
  return;
8552
7196
  }
8553
- let address3 = opts.address;
8554
- if (!address3) {
7197
+ let address2 = opts.address;
7198
+ if (!address2) {
8555
7199
  const keystore = await loadKeystore();
8556
- address3 = keystore.walletAddress;
7200
+ address2 = keystore.walletAddress;
8557
7201
  }
8558
7202
  const statsQuery = withChainId(
8559
- opts.agent ? `/api/agents/stats?agentId=${opts.agent}` : `/api/agents/stats?address=${address3}`
7203
+ opts.agent ? `/api/agents/stats?agentId=${opts.agent}` : `/api/agents/stats?address=${address2}`
8560
7204
  );
8561
7205
  const [result, balanceResult, dreamsResult, exchangeRateResult] = await Promise.all([
8562
7206
  apiGet(statsQuery),
8563
7207
  apiGet(
8564
- `/api/wallet/balance?address=${address3}&chainId=${selectedNetwork().chainId}`
7208
+ `/api/wallet/balance?address=${address2}&chainId=${selectedNetwork().chainId}`
8565
7209
  ),
8566
- apiGet(withChainId(`/api/wallet/dreams-balance?address=${address3}`)).then(
7210
+ apiGet(withChainId(`/api/wallet/dreams-balance?address=${address2}`)).then(
8567
7211
  (r) => r
8568
7212
  ).catch(() => null),
8569
7213
  apiGet(withChainId("/api/wallet/exchange-rate")).then((r) => r).catch(() => null)
@@ -8689,11 +7333,11 @@ var statsCommand2 = new Command8("stats").description("Market totals and the act
8689
7333
  renderFailure(err);
8690
7334
  }
8691
7335
  });
8692
- var addressCommand2 = new Command8("address").description("One wallet on the selected --network: earnings, completed tasks, rating, events").argument("<address>", "wallet address (0x...)").option("--range <days>", `Window in days: ${RANGES.join(", ")} (default 30)`).action(async (address3, opts) => {
7336
+ var addressCommand2 = new Command8("address").description("One wallet on the selected --network: earnings, completed tasks, rating, events").argument("<address>", "wallet address (0x...)").option("--range <days>", `Window in days: ${RANGES.join(", ")} (default 30)`).action(async (address2, opts) => {
8693
7337
  try {
8694
- if (!ADDRESS_PATTERN.test(address3)) throw new Error("address must be a 0x wallet address");
7338
+ if (!ADDRESS_PATTERN.test(address2)) throw new Error("address must be a 0x wallet address");
8695
7339
  const windowDays = parseRange(opts.range, "30");
8696
- const wanted = address3.toLowerCase();
7340
+ const wanted = address2.toLowerCase();
8697
7341
  const [snapshot, page] = await Promise.all([
8698
7342
  apiGet(snapshotPath(windowDays, NODE_LIMIT)),
8699
7343
  apiGet(
@@ -8729,8 +7373,8 @@ function directTarget(query4) {
8729
7373
  return { type: "task", id, command: `taskmarket task get ${id}` };
8730
7374
  }
8731
7375
  if (ADDRESS_PATTERN2.test(query4)) {
8732
- const address3 = query4.toLowerCase();
8733
- return { type: "address", address: address3, command: `taskmarket explorer address ${address3}` };
7376
+ const address2 = query4.toLowerCase();
7377
+ return { type: "address", address: address2, command: `taskmarket explorer address ${address2}` };
8734
7378
  }
8735
7379
  return null;
8736
7380
  }
@@ -9513,8 +8157,8 @@ function parseRequirementFilter(value, schema, flag) {
9513
8157
  }
9514
8158
 
9515
8159
  // src/lib/hook-registry.ts
9516
- async function fetchHookRegistry(address3) {
9517
- const query4 = address3 ? `?address=${address3}` : "";
8160
+ async function fetchHookRegistry(address2) {
8161
+ const query4 = address2 ? `?address=${address2}` : "";
9518
8162
  return await apiGet(withChainId(`/api/hooks/registry${query4}`));
9519
8163
  }
9520
8164
  async function describeHookListings(hooks, alwaysListed = [], known) {
@@ -9527,20 +8171,20 @@ async function describeHookListings(hooks, alwaysListed = [], known) {
9527
8171
  return null;
9528
8172
  }
9529
8173
  const listed = new Map(registry.listed.map((entry) => [entry.address.toLowerCase(), entry]));
9530
- const implicit = new Set(alwaysListed.map((address3) => address3.toLowerCase()));
8174
+ const implicit = new Set(alwaysListed.map((address2) => address2.toLowerCase()));
9531
8175
  const listings = [];
9532
8176
  const warnings = [];
9533
8177
  for (const raw of hooks) {
9534
- const address3 = raw.toLowerCase();
9535
- const entry = listed.get(address3);
9536
- const isListed = entry !== void 0 || implicit.has(address3);
9537
- listings.push({ address: address3, listed: isListed, name: entry?.name ?? null });
8178
+ const address2 = raw.toLowerCase();
8179
+ const entry = listed.get(address2);
8180
+ const isListed = entry !== void 0 || implicit.has(address2);
8181
+ listings.push({ address: address2, listed: isListed, name: entry?.name ?? null });
9538
8182
  if (!isListed) {
9539
8183
  warnings.push(
9540
8184
  cliWarning(
9541
8185
  "hook_unlisted",
9542
- `Hook ${address3} is not listed in the hook registry for chain ${registry.chainId}. It was attached as given; run \`taskmarket hooks list\` for listed hooks.`,
9543
- { address: address3, chainId: registry.chainId }
8186
+ `Hook ${address2} is not listed in the hook registry for chain ${registry.chainId}. It was attached as given; run \`taskmarket hooks list\` for listed hooks.`,
8187
+ { address: address2, chainId: registry.chainId }
9544
8188
  )
9545
8189
  );
9546
8190
  }
@@ -10122,8 +8766,8 @@ var FILLED_FLAGS = [
10122
8766
  ["evaluationWindow", "--evaluation-window"],
10123
8767
  ["evaluatorStake", "--evaluator-stake"]
10124
8768
  ];
10125
- async function fetchListedEvaluator(address3) {
10126
- const wallet = parseInput(EthAddressSchema, address3);
8769
+ async function fetchListedEvaluator(address2) {
8770
+ const wallet = parseInput(EthAddressSchema, address2);
10127
8771
  const params = new URLSearchParams({
10128
8772
  address: wallet,
10129
8773
  limit: "1",
@@ -10143,13 +8787,13 @@ async function fetchListedEvaluator(address3) {
10143
8787
  }
10144
8788
  return entry;
10145
8789
  }
10146
- async function evaluatorFlagsFromListing(address3, opts) {
8790
+ async function evaluatorFlagsFromListing(address2, opts) {
10147
8791
  for (const [key, flag] of FILLED_FLAGS) {
10148
8792
  if (opts[key] !== void 0) {
10149
8793
  throw new Error(`--evaluator-from-listing fills ${flag} from the listing; leave it out`);
10150
8794
  }
10151
8795
  }
10152
- const listing = await fetchListedEvaluator(address3);
8796
+ const listing = await fetchListedEvaluator(address2);
10153
8797
  const { feeBps, evaluationWindowHours, stakeUsd } = listing.service;
10154
8798
  return {
10155
8799
  listing,
@@ -10878,17 +9522,17 @@ async function runCreateTask(input, extra = {}) {
10878
9522
  const hookConfigs = /* @__PURE__ */ new Map();
10879
9523
  for (const raw of opts.hookConfig ?? []) {
10880
9524
  const separator = raw.indexOf("=");
10881
- const address3 = separator > 0 ? raw.slice(0, separator).trim() : "";
10882
- if (!ethAddrRe.test(address3)) {
9525
+ const address2 = separator > 0 ? raw.slice(0, separator).trim() : "";
9526
+ if (!ethAddrRe.test(address2)) {
10883
9527
  return void printError("--hook-config must be <address>=<config> with a valid hook address");
10884
9528
  }
10885
- if (!hooks.some((hook) => hook.toLowerCase() === address3.toLowerCase())) {
10886
- return void printError(`--hook-config names ${address3}, which is not attached with --hook`);
9529
+ if (!hooks.some((hook) => hook.toLowerCase() === address2.toLowerCase())) {
9530
+ return void printError(`--hook-config names ${address2}, which is not attached with --hook`);
10887
9531
  }
10888
- if (hookConfigs.has(address3.toLowerCase())) {
10889
- return void printError(`--hook-config is given twice for ${address3}`);
9532
+ if (hookConfigs.has(address2.toLowerCase())) {
9533
+ return void printError(`--hook-config is given twice for ${address2}`);
10890
9534
  }
10891
- hookConfigs.set(address3.toLowerCase(), raw.slice(separator + 1));
9535
+ hookConfigs.set(address2.toLowerCase(), raw.slice(separator + 1));
10892
9536
  }
10893
9537
  let hookRegistry = null;
10894
9538
  const needsRegistry = Boolean(opts.gateDeadline) || gatesTargets.length > 0 || [...hookConfigs.values()].some((value) => !value.trim().startsWith("0x"));
@@ -11409,12 +10053,12 @@ async function confirmStakeTerms(action, taskId, yes) {
11409
10053
  );
11410
10054
  return false;
11411
10055
  }
11412
- async function confirmStakeAffordable(address3, stake) {
10056
+ async function confirmStakeAffordable(address2, stake) {
11413
10057
  if (stake <= 0n) return true;
11414
10058
  let balance;
11415
10059
  try {
11416
10060
  const result = await apiGet(
11417
- `/api/wallet/balance?address=${address3}&chainId=${selectedNetwork().chainId}`
10061
+ `/api/wallet/balance?address=${address2}&chainId=${selectedNetwork().chainId}`
11418
10062
  );
11419
10063
  if (typeof result?.balanceBaseUnits !== "string") return true;
11420
10064
  balance = BigInt(result.balanceBaseUnits);
@@ -12253,12 +10897,12 @@ var listCmd2 = new Command20("list").description(
12253
10897
  if (tab === null) {
12254
10898
  return void printError(`--tab must be one of: ${HIRE_TABS.join(", ")}`);
12255
10899
  }
12256
- const address3 = opts.address ?? (await loadKeystore()).walletAddress;
10900
+ const address2 = opts.address ?? (await loadKeystore()).walletAddress;
12257
10901
  const result = await listTasks(cliTaskReadContext(), {
12258
10902
  status: "ALL",
12259
10903
  hire: true,
12260
10904
  // Offers to a worker are reserved hires; a requester's hires include quotes and requests.
12261
- ...opts.role === "worker" ? { hireKind: HireKind.enum.reserved, reservedWorker: address3 } : { requester: address3 },
10905
+ ...opts.role === "worker" ? { hireKind: HireKind.enum.reserved, reservedWorker: address2 } : { requester: address2 },
12262
10906
  hireState: opts.state,
12263
10907
  hireTab: tab,
12264
10908
  hireServiceId: opts.service,
@@ -13411,7 +12055,7 @@ var unlockCmd = new Command49("unlock").description("Unlock a private task with
13411
12055
 
13412
12056
  // src/commands/task/invite.ts
13413
12057
  import { Command as Command50 } from "commander";
13414
- var inviteCmd = new Command50("invite").description("Invite a wallet to view a private task (requester only)").argument("<taskId>", "Task ID (0x-prefixed hex)").argument("<address>", "Wallet address to invite").action(async (taskId, address3) => {
12058
+ var inviteCmd = new Command50("invite").description("Invite a wallet to view a private task (requester only)").argument("<taskId>", "Task ID (0x-prefixed hex)").argument("<address>", "Wallet address to invite").action(async (taskId, address2) => {
13415
12059
  const auth = await signReadAuth();
13416
12060
  if (!auth || Object.keys(auth.headers).length === 0) {
13417
12061
  printError("No keystore found. Run `taskmarket init` first.");
@@ -13420,7 +12064,7 @@ var inviteCmd = new Command50("invite").description("Invite a wallet to view a p
13420
12064
  try {
13421
12065
  const { data: result, idempotencyKey } = await apiPost(
13422
12066
  `/api/tasks/${taskId}/private-access/viewers`,
13423
- { taskId, viewerAddress: address3 },
12067
+ { taskId, viewerAddress: address2 },
13424
12068
  { headers: auth.headers }
13425
12069
  );
13426
12070
  printResult(result, { idempotencyKey });
@@ -13431,7 +12075,7 @@ var inviteCmd = new Command50("invite").description("Invite a wallet to view a p
13431
12075
 
13432
12076
  // src/commands/task/uninvite.ts
13433
12077
  import { Command as Command51 } from "commander";
13434
- var uninviteCmd = new Command51("uninvite").description("Remove a wallet from a private task's allowlist (requester only)").argument("<taskId>", "Task ID (0x-prefixed hex)").argument("<address>", "Wallet address to remove").action(async (taskId, address3) => {
12078
+ var uninviteCmd = new Command51("uninvite").description("Remove a wallet from a private task's allowlist (requester only)").argument("<taskId>", "Task ID (0x-prefixed hex)").argument("<address>", "Wallet address to remove").action(async (taskId, address2) => {
13435
12079
  const auth = await signReadAuth();
13436
12080
  if (!auth || Object.keys(auth.headers).length === 0) {
13437
12081
  printError("No keystore found. Run `taskmarket init` first.");
@@ -13439,7 +12083,7 @@ var uninviteCmd = new Command51("uninvite").description("Remove a wallet from a
13439
12083
  }
13440
12084
  try {
13441
12085
  const { data: result, idempotencyKey } = await apiDelete(
13442
- `/api/tasks/${taskId}/private-access/viewers/${encodeURIComponent(address3)}`,
12086
+ `/api/tasks/${taskId}/private-access/viewers/${encodeURIComponent(address2)}`,
13443
12087
  { headers: auth.headers }
13444
12088
  );
13445
12089
  printResult(result, { idempotencyKey });
@@ -13852,7 +12496,7 @@ async function runAgentCommand(options) {
13852
12496
  try {
13853
12497
  const { assertAgentCompatibility } = await import("./compatibility-636WJOEX.js");
13854
12498
  const pi = assertAgentCompatibility();
13855
- const { runAgent } = await import("./launch-QN325T4P.js");
12499
+ const { runAgent } = await import("./launch-K5666QYB.js");
13856
12500
  result = await runAgent({
13857
12501
  model: options.model,
13858
12502
  pi,
@@ -13925,25 +12569,25 @@ function wholeNumber(flag, value) {
13925
12569
  function hoursToSecs2(flag, value) {
13926
12570
  return Math.round(positiveNumber(flag, value) * HOUR);
13927
12571
  }
13928
- async function fetchListing(address3) {
12572
+ async function fetchListing(address2) {
13929
12573
  const auth = await signReadAuth();
13930
- const result = await apiGet(`/api/agents/${address3}/listing`, { headers: auth?.headers });
12574
+ const result = await apiGet(`/api/agents/${address2}/listing`, { headers: auth?.headers });
13931
12575
  return AgentListingSchema.parse(result);
13932
12576
  }
13933
- async function fetchServiceRecords(address3, chainId) {
12577
+ async function fetchServiceRecords(address2, chainId) {
13934
12578
  try {
13935
12579
  const params = new URLSearchParams({ chainId: String(chainId) });
13936
12580
  const parsed = AgentServiceRecordsResponseSchema.safeParse(
13937
- await apiGet(`/api/agents/${address3}/hires/services?${params.toString()}`)
12581
+ await apiGet(`/api/agents/${address2}/hires/services?${params.toString()}`)
13938
12582
  );
13939
12583
  return parsed.success ? parsed.data : null;
13940
12584
  } catch {
13941
12585
  return null;
13942
12586
  }
13943
12587
  }
13944
- async function fetchHireAvailability(address3) {
12588
+ async function fetchHireAvailability(address2) {
13945
12589
  try {
13946
- const params = new URLSearchParams({ worker: address3 });
12590
+ const params = new URLSearchParams({ worker: address2 });
13947
12591
  const parsed = HireAvailabilitySchema.safeParse(
13948
12592
  await apiGet(`/api/tasks/hire-availability?${params.toString()}`)
13949
12593
  );
@@ -14235,9 +12879,9 @@ var availabilityCommand = new Command58("availability").description(
14235
12879
  });
14236
12880
  var listingCommand = new Command58("listing").description(
14237
12881
  "Show your listing, or another worker's, with whether it is taking hires now and each service's track record on the selected --network"
14238
- ).argument("[address]", "Wallet address; your own when left out").action(async (address3) => {
12882
+ ).argument("[address]", "Wallet address; your own when left out").action(async (address2) => {
14239
12883
  try {
14240
- const listing = address3 ? await fetchListing(address3) : await ownListing();
12884
+ const listing = address2 ? await fetchListing(address2) : await ownListing();
14241
12885
  const network = selectedNetworkOrUndefined();
14242
12886
  const [records, hireAvailability] = await Promise.all([
14243
12887
  network && listing.listed && listing.services.length > 0 ? fetchServiceRecords(listing.address, network.chainId) : null,
@@ -14286,13 +12930,13 @@ function agentManagementCommands() {
14286
12930
  const status = new Command59("status").description(
14287
12931
  "Show the agent channels (locked, charged, refundable), purchases with an unknown outcome, the sandbox and compute credit. Reads only."
14288
12932
  ).action(async () => {
14289
- const { collectAgentStatus } = await import("./status-BCKUXLAQ.js");
12933
+ const { collectAgentStatus } = await import("./status-YKFKGTMQ.js");
14290
12934
  await run(() => collectAgentStatus());
14291
12935
  });
14292
12936
  const doctor = new Command59("doctor").description(
14293
12937
  "Check that the agent can start: Node and the bundled runtime, wallet and policy, channels, API, sandbox broker, host keys, xgate and RPC. Reads only."
14294
12938
  ).action(async () => {
14295
- const { runDoctor } = await import("./doctor-62ESHY26.js");
12939
+ const { runDoctor } = await import("./doctor-FACAMASV.js");
14296
12940
  const report = await run(() => runDoctor());
14297
12941
  if (report && !report.ok) process.exitCode = 1;
14298
12942
  });
@@ -14303,7 +12947,7 @@ function agentManagementCommands() {
14303
12947
  "Reconcile the open purchases of this channel, as status lists it; also reaches retired channels"
14304
12948
  ).action(
14305
12949
  async (invocationId, options) => {
14306
- const { reconcileChannelPurchases, reconcileInvocation } = await import("./reconcile-ZQUH7Z7P.js");
12950
+ const { reconcileChannelPurchases, reconcileInvocation } = await import("./reconcile-Q4MJXXR3.js");
14307
12951
  const choice = { rail: options.rail, channel: options.channel };
14308
12952
  if (invocationId !== void 0) {
14309
12953
  await run(() => reconcileInvocation(invocationId, { choice }));
@@ -14335,7 +12979,7 @@ function agentManagementCommands() {
14335
12979
  `Not a USDC amount: ${options.amount} (digits, at most 6 decimals)`
14336
12980
  );
14337
12981
  }
14338
- const { openAgentChannels, requestTopUp, selectRail, withdrawalHatch } = await import("./channels-UVUKKHEH.js");
12982
+ const { openAgentChannels, requestTopUp, selectRail, withdrawalHatch } = await import("./channels-4YOMV7R7.js");
14339
12983
  const { rails } = await openAgentChannels();
14340
12984
  const result = await requestTopUp(selectRail(rails, options.rail), amount2);
14341
12985
  return {
@@ -14355,8 +12999,8 @@ function agentManagementCommands() {
14355
12999
  await run(async () => {
14356
13000
  await requireExperimental();
14357
13001
  const { AGENT_VIEW_VERSION } = await import("./budget-view-J6L7X6EY.js");
14358
- const { closeChannel, openAgentChannels, selectChannel } = await import("./channels-UVUKKHEH.js");
14359
- const { reconcileLeasedPurchase } = await import("./reconcile-ZQUH7Z7P.js");
13002
+ const { closeChannel, openAgentChannels, selectChannel } = await import("./channels-4YOMV7R7.js");
13003
+ const { reconcileLeasedPurchase } = await import("./reconcile-Q4MJXXR3.js");
14360
13004
  const opened = await openAgentChannels();
14361
13005
  const { rail, retired } = selectChannel(opened, options);
14362
13006
  const result = await closeChannel(
@@ -14410,7 +13054,7 @@ function agentManagementCommands() {
14410
13054
  async (options) => {
14411
13055
  await run(async () => {
14412
13056
  await requireExperimental();
14413
- const { runPull } = await import("./sync-pull-YDX4D4XW.js");
13057
+ const { runPull } = await import("./sync-pull-AN2M344W.js");
14414
13058
  const { terminalPrompter } = await import("./prompter-LSICEYSQ.js");
14415
13059
  return runPull(options, {
14416
13060
  interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY),
@@ -14567,10 +13211,10 @@ agentsCommand.command("get").description(
14567
13211
  ).argument("<address>", "Wallet address of the worker").option("--all-chains", "List the worker's records on every served chain").option(
14568
13212
  "--hires",
14569
13213
  "Add the worker's hire record, each listed service's record (serviceRecords) and the workers it hired (see `taskmarket agents hires`)"
14570
- ).action(async (address3, opts) => {
13214
+ ).action(async (address2, opts) => {
14571
13215
  let wallet;
14572
13216
  try {
14573
- wallet = parseInput(EthAddressSchema, address3);
13217
+ wallet = parseInput(EthAddressSchema, address2);
14574
13218
  } catch (err) {
14575
13219
  renderFailure(err);
14576
13220
  return;
@@ -14645,9 +13289,9 @@ agentsCommand.command("hires").description(
14645
13289
  "--role <role>",
14646
13290
  `${AGENT_HIRES_ROLES.join(" (hires of this wallet) or ")} (hires this wallet made)`,
14647
13291
  "worker"
14648
- ).option("--limit <n>", "Maximum public hires to list (1 to 50)", "20").option("--offset <n>", "Public hires to skip", "0").action(async (address3, opts) => {
13292
+ ).option("--limit <n>", "Maximum public hires to list (1 to 50)", "20").option("--offset <n>", "Public hires to skip", "0").action(async (address2, opts) => {
14649
13293
  try {
14650
- const wallet = parseInput(EthAddressSchema, address3);
13294
+ const wallet = parseInput(EthAddressSchema, address2);
14651
13295
  const role = parseInput(AgentHiresRoleSchema, opts.role);
14652
13296
  const limit = parseInput(AgentHiresInputSchema.shape.limit, Number(opts.limit));
14653
13297
  const offset = parseInput(AgentHiresInputSchema.shape.offset, Number(opts.offset));
@@ -14700,12 +13344,12 @@ agentsCommand.command("specialties").description("List the specialties workers a
14700
13344
  renderFailure(err);
14701
13345
  }
14702
13346
  });
14703
- agentsCommand.command("report").description("Report a worker's listing, or one of its services, to Taskmarket staff").argument("<address>", "Wallet address of the reported worker").requiredOption("--reason <reason>", `One of: ${AGENT_LISTING_REPORT_REASONS.join(", ")}`).option("--service <serviceId>", "Report this service only").option("--note <text>", "What is wrong, for staff").action(async (address3, opts) => {
13347
+ agentsCommand.command("report").description("Report a worker's listing, or one of its services, to Taskmarket staff").argument("<address>", "Wallet address of the reported worker").requiredOption("--reason <reason>", `One of: ${AGENT_LISTING_REPORT_REASONS.join(", ")}`).option("--service <serviceId>", "Report this service only").option("--note <text>", "What is wrong, for staff").action(async (address2, opts) => {
14704
13348
  try {
14705
13349
  const auth = await signReadAuth();
14706
13350
  const signedIn = auth !== null && Object.keys(auth.headers).length > 0;
14707
13351
  const body = parseInput(AgentListingReportInputSchema, {
14708
- listingAddress: address3,
13352
+ listingAddress: address2,
14709
13353
  ...signedIn ? { walletAddress: auth.walletAddress } : {},
14710
13354
  ...opts.service ? { serviceId: opts.service } : {},
14711
13355
  reason: opts.reason,
@@ -14926,23 +13570,23 @@ var dashboardCommand = new Command62("dashboard").description(
14926
13570
  printError("No keystore found. Run `taskmarket init` first.");
14927
13571
  return;
14928
13572
  }
14929
- const address3 = auth.walletAddress;
13573
+ const address2 = auth.walletAddress;
14930
13574
  const chainId = selectedNetwork().chainId;
14931
13575
  const headers = auth.headers;
14932
13576
  const owner = new URLSearchParams({
14933
- owner: address3,
13577
+ owner: address2,
14934
13578
  status: "all",
14935
13579
  limit: String(AUTOMATIONS_READ_LIMIT)
14936
13580
  });
14937
13581
  const [queue, inbox, workflows, schedules, projects, balance, activity] = await Promise.all([
14938
13582
  settle2(
14939
- () => apiGet(`/api/agents/action-queue?${new URLSearchParams({ address: address3, limit: "50" })}`, {
13583
+ () => apiGet(`/api/agents/action-queue?${new URLSearchParams({ address: address2, limit: "50" })}`, {
14940
13584
  headers
14941
13585
  })
14942
13586
  ),
14943
13587
  settle2(
14944
13588
  () => apiGet(
14945
- `/api/agents/inbox?${new URLSearchParams({ address: address3, sort: "attention", limit: String(DASHBOARD_TASK_LIMIT) })}`,
13589
+ `/api/agents/inbox?${new URLSearchParams({ address: address2, sort: "attention", limit: String(DASHBOARD_TASK_LIMIT) })}`,
14946
13590
  { headers }
14947
13591
  )
14948
13592
  ),
@@ -14955,13 +13599,13 @@ var dashboardCommand = new Command62("dashboard").description(
14955
13599
  settle2(
14956
13600
  () => apiGet(
14957
13601
  withChainId(
14958
- `/api/projects?${new URLSearchParams({ address: address3, role: "owner", status: "open", limit: String(PROJECTS_READ_LIMIT) })}`
13602
+ `/api/projects?${new URLSearchParams({ address: address2, role: "owner", status: "open", limit: String(PROJECTS_READ_LIMIT) })}`
14959
13603
  )
14960
13604
  )
14961
13605
  ),
14962
13606
  settle2(
14963
13607
  () => apiGet(
14964
- `/api/wallet/balance?${new URLSearchParams({ address: address3, chainId: String(chainId) })}`
13608
+ `/api/wallet/balance?${new URLSearchParams({ address: address2, chainId: String(chainId) })}`
14965
13609
  )
14966
13610
  ),
14967
13611
  settle2(
@@ -14993,7 +13637,7 @@ var dashboardCommand = new Command62("dashboard").description(
14993
13637
  });
14994
13638
  printResult(
14995
13639
  withChainNames({
14996
- address: address3,
13640
+ address: address2,
14997
13641
  chainId,
14998
13642
  generatedAt: new Date(nowMs).toISOString(),
14999
13643
  needsYou,
@@ -15026,7 +13670,7 @@ var dashboardCommand = new Command62("dashboard").description(
15026
13670
  }),
15027
13671
  {
15028
13672
  next: nextForHome({
15029
- address: address3,
13673
+ address: address2,
15030
13674
  chainId,
15031
13675
  balanceBaseUnits: balance.value?.balanceBaseUnits,
15032
13676
  needsYou: needsYou.total,
@@ -15108,12 +13752,12 @@ var inboxCommand = new Command63("inbox").description(
15108
13752
  }
15109
13753
  return;
15110
13754
  }
15111
- const address3 = auth.walletAddress;
13755
+ const address2 = auth.walletAddress;
15112
13756
  const hasReadAuth = Object.keys(auth.headers).length > 0;
15113
- const inboxParams = new URLSearchParams({ address: address3 });
13757
+ const inboxParams = new URLSearchParams({ address: address2 });
15114
13758
  if (opts.tasksSort) inboxParams.set("sort", opts.tasksSort);
15115
13759
  if (tasksLimit !== void 0) inboxParams.set("limit", String(tasksLimit));
15116
- const actionParams = new URLSearchParams({ address: address3, limit: String(page.limit) });
13760
+ const actionParams = new URLSearchParams({ address: address2, limit: String(page.limit) });
15117
13761
  if (page.cursor) actionParams.set("cursor", page.cursor);
15118
13762
  if (opts.actionsOnly) {
15119
13763
  try {
@@ -15130,7 +13774,7 @@ var inboxCommand = new Command63("inbox").description(
15130
13774
  return;
15131
13775
  }
15132
13776
  const ownerParams = new URLSearchParams({
15133
- owner: address3,
13777
+ owner: address2,
15134
13778
  status: "needs_action",
15135
13779
  limit: "20"
15136
13780
  });
@@ -15270,9 +13914,9 @@ var depositCommand = new Command64("deposit").description(
15270
13914
  "--relay-route <routeId>",
15271
13915
  "Request a Relay deposit address for this wallet on an offered route (see fundingOptions.relayRoutes)"
15272
13916
  ).option("--amount <amount>", "Amount of the route origin stablecoin to send, for --relay-route").action(async (opts) => {
15273
- let address3;
13917
+ let address2;
15274
13918
  try {
15275
- address3 = await getWalletAddress();
13919
+ address2 = await getWalletAddress();
15276
13920
  } catch (err) {
15277
13921
  renderFailure(err, { fallback: "No keystore found. Run `taskmarket init` first." });
15278
13922
  return;
@@ -15301,7 +13945,7 @@ var depositCommand = new Command64("deposit").description(
15301
13945
  const chainId = chain.chainId;
15302
13946
  const tokenAddress = chain.tokenAddress;
15303
13947
  const data = {
15304
- address: address3,
13948
+ address: address2,
15305
13949
  network: chain.networkName,
15306
13950
  chainId,
15307
13951
  currency: paymentTokenSymbol(chainId),
@@ -15316,13 +13960,13 @@ var depositCommand = new Command64("deposit").description(
15316
13960
  return;
15317
13961
  }
15318
13962
  const balance = await apiGet(
15319
- `/api/wallet/balance?address=${address3}&chainId=${chainId}`
13963
+ `/api/wallet/balance?address=${address2}&chainId=${chainId}`
15320
13964
  ).catch(() => null);
15321
13965
  printResult(
15322
13966
  { ...data, fundingOptions },
15323
13967
  {
15324
13968
  next: nextForBalance({
15325
- address: address3,
13969
+ address: address2,
15326
13970
  chainId,
15327
13971
  balanceBaseUnits: balance?.balanceBaseUnits
15328
13972
  })
@@ -15347,7 +13991,7 @@ var depositCommand = new Command64("deposit").description(
15347
13991
  if (BigInt(amountBaseUnits) <= 0n) throw new Error("Enter a valid amount.");
15348
13992
  const deposit = await requestRelayBridgeDepositAddress({
15349
13993
  routeId,
15350
- recipient: address3,
13994
+ recipient: address2,
15351
13995
  amountBaseUnits
15352
13996
  });
15353
13997
  const route = RELAY_BRIDGE_ROUTES[routeId];
@@ -15357,7 +14001,7 @@ var depositCommand = new Command64("deposit").description(
15357
14001
  routeId,
15358
14002
  ...deposit,
15359
14003
  send: `${opts.amount} ${route.origin.symbol} on ${route.origin.chainName} to ${deposit.depositAddress}`,
15360
- credits: `${route.destination.symbol} on ${route.destination.chainName} to ${address3}`
14004
+ credits: `${route.destination.symbol} on ${route.destination.chainName} to ${address2}`
15361
14005
  }
15362
14006
  });
15363
14007
  } catch (err) {
@@ -15370,10 +14014,10 @@ import { Command as Command75 } from "commander";
15370
14014
 
15371
14015
  // src/commands/wallet/balance.ts
15372
14016
  import { Command as Command65 } from "commander";
15373
- function balancePath(address3, chainId) {
15374
- return `/api/wallet/balance?address=${address3}&chainId=${chainId}`;
14017
+ function balancePath(address2, chainId) {
14018
+ return `/api/wallet/balance?address=${address2}&chainId=${chainId}`;
15375
14019
  }
15376
- async function allChainBalances(address3) {
14020
+ async function allChainBalances(address2) {
15377
14021
  const raw = await apiGet("/trpc/network.info");
15378
14022
  const info = NetworkInfoSchema.safeParse(raw?.result?.data);
15379
14023
  if (!info.success) {
@@ -15389,7 +14033,7 @@ async function allChainBalances(address3) {
15389
14033
  tokenSymbol: chain.tokenSymbol
15390
14034
  };
15391
14035
  try {
15392
- const result = await apiGet(balancePath(address3, chain.chainId));
14036
+ const result = await apiGet(balancePath(address2, chain.chainId));
15393
14037
  return {
15394
14038
  ...base,
15395
14039
  tokenSymbol: result.tokenSymbol ?? chain.tokenSymbol,
@@ -15401,7 +14045,7 @@ async function allChainBalances(address3) {
15401
14045
  }
15402
14046
  })
15403
14047
  );
15404
- return { address: address3, chains };
14048
+ return { address: address2, chains };
15405
14049
  }
15406
14050
  var walletBalanceCommand = new Command65("balance").description("Show the wallet's payment-token balance on the selected network").option("--address <addr>", "Address to check (defaults to own wallet)").option(
15407
14051
  "--all-chains",
@@ -15422,26 +14066,26 @@ var walletBalanceCommand = new Command65("balance").description("Show the wallet
15422
14066
  printResult(await readSolanaBalances(createRpc2(connection), connection, owner));
15423
14067
  return;
15424
14068
  }
15425
- let address3 = opts.address;
15426
- const ownWallet = !address3;
15427
- if (!address3) {
14069
+ let address2 = opts.address;
14070
+ const ownWallet = !address2;
14071
+ if (!address2) {
15428
14072
  const keystore = await loadKeystore();
15429
- address3 = keystore.walletAddress;
14073
+ address2 = keystore.walletAddress;
15430
14074
  }
15431
14075
  if (opts.allChains) {
15432
14076
  try {
15433
- printResult(await allChainBalances(address3));
14077
+ printResult(await allChainBalances(address2));
15434
14078
  } catch (err) {
15435
14079
  renderFailure(err, { fallback: "Failed to fetch network info from backend." });
15436
14080
  }
15437
14081
  return;
15438
14082
  }
15439
14083
  const chainId = selectedNetwork().chainId;
15440
- const result = await apiGet(balancePath(address3, chainId));
14084
+ const result = await apiGet(balancePath(address2, chainId));
15441
14085
  printResult(
15442
14086
  result,
15443
14087
  ownWallet ? {
15444
- next: nextForBalance({ address: address3, chainId, balanceBaseUnits: result.balanceBaseUnits })
14088
+ next: nextForBalance({ address: address2, chainId, balanceBaseUnits: result.balanceBaseUnits })
15445
14089
  } : void 0
15446
14090
  );
15447
14091
  }
@@ -15559,17 +14203,17 @@ var walletImportCommand = new Command66("import").description("Import an existin
15559
14203
  }
15560
14204
  const privateKey = normalizePrivateKey(rawKey);
15561
14205
  const account = privateKeyToAccount2(privateKey);
15562
- const address3 = account.address;
14206
+ const address2 = account.address;
15563
14207
  const publicKey = deriveCompressedPublicKey(privateKey);
15564
14208
  const legalBundle = LegalBundleSchema.parse(await apiGet("/api/legal/current"));
15565
14209
  const legalAcceptance = legalBundle.enforcementEnabled ? await acceptLegalBundle({
15566
14210
  assumeYes: Boolean(opts.yes),
15567
14211
  bundle: legalBundle,
15568
14212
  signMessage: (message) => account.signMessage({ message }),
15569
- walletAddress: address3
14213
+ walletAddress: address2
15570
14214
  }) : void 0;
15571
14215
  const deviceRegisterSignature = await account.signMessage({
15572
- message: buildDeviceRegisterMessage(address3)
14216
+ message: buildDeviceRegisterMessage(address2)
15573
14217
  });
15574
14218
  const {
15575
14219
  deviceId,
@@ -15580,13 +14224,13 @@ var walletImportCommand = new Command66("import").description("Import an existin
15580
14224
  legalReceipt: legalAcceptance?.receipt,
15581
14225
  publicKey,
15582
14226
  signature: deviceRegisterSignature,
15583
- walletAddress: address3
14227
+ walletAddress: address2
15584
14228
  });
15585
14229
  const encryptedKey = encryptPrivateKey(deviceEncryptionKey, privateKey);
15586
14230
  let agentId = initialAgentId;
15587
14231
  await saveKeystore({
15588
14232
  encryptedKey,
15589
- walletAddress: address3,
14233
+ walletAddress: address2,
15590
14234
  deviceId,
15591
14235
  apiToken,
15592
14236
  agentId,
@@ -15600,7 +14244,7 @@ var walletImportCommand = new Command66("import").description("Import an existin
15600
14244
  } : {}
15601
14245
  });
15602
14246
  if (!agentId) {
15603
- agentId = await pollAgentId(address3);
14247
+ agentId = await pollAgentId(address2);
15604
14248
  if (agentId) {
15605
14249
  const keystore = await loadKeystore();
15606
14250
  await saveKeystore(
@@ -15608,7 +14252,7 @@ var walletImportCommand = new Command66("import").description("Import an existin
15608
14252
  );
15609
14253
  }
15610
14254
  }
15611
- printResult({ address: address3, agentId }, { warnings: argvKeyWarnings(keySource) });
14255
+ printResult({ address: address2, agentId }, { warnings: argvKeyWarnings(keySource) });
15612
14256
  });
15613
14257
 
15614
14258
  // src/commands/wallet/set-withdrawal-address.ts
@@ -15630,19 +14274,19 @@ var WithdrawalAddressMismatchError = class extends Error {
15630
14274
  function pinnedWithdrawalAddress(keystore, chainId) {
15631
14275
  return keystore.withdrawalAddresses?.[String(chainId)] ?? keystore.withdrawalAddress;
15632
14276
  }
15633
- async function pinWithdrawalAddress(keystore, chainId, address3) {
14277
+ async function pinWithdrawalAddress(keystore, chainId, address2) {
15634
14278
  await saveKeystore({
15635
14279
  ...keystore,
15636
- withdrawalAddresses: { ...keystore.withdrawalAddresses, [String(chainId)]: address3 }
14280
+ withdrawalAddresses: { ...keystore.withdrawalAddresses, [String(chainId)]: address2 }
15637
14281
  });
15638
14282
  }
15639
14283
  function serverChainMismatch(requested, answered) {
15640
14284
  if (answered === void 0 || answered === requested) return void 0;
15641
14285
  return `Refusing to continue: the server answered for chain ${answered}, but this CLI asked for chain ${requested}. Nothing was pinned.`;
15642
14286
  }
15643
- async function fetchWithdrawalAddress(address3, chainId) {
14287
+ async function fetchWithdrawalAddress(address2, chainId) {
15644
14288
  const response = await apiGet(
15645
- `/api/wallet/withdrawal-address?address=${address3}&chainId=${chainId}`
14289
+ `/api/wallet/withdrawal-address?address=${address2}&chainId=${chainId}`
15646
14290
  );
15647
14291
  const mismatch = serverChainMismatch(chainId, response.chainId);
15648
14292
  if (mismatch) throw new Error(mismatch);
@@ -15692,8 +14336,8 @@ function isValidAddress(addr) {
15692
14336
  }
15693
14337
  var setWithdrawalAddressCommand = new Command67("set-withdrawal-address").description(
15694
14338
  "Set the withdrawal address for payment-token withdrawals on the selected network (once per chain, free)"
15695
- ).argument("<address>", "Ethereum address to receive withdrawals").action(async (address3) => {
15696
- if (!isValidAddress(address3)) {
14339
+ ).argument("<address>", "Ethereum address to receive withdrawals").action(async (address2) => {
14340
+ if (!isValidAddress(address2)) {
15697
14341
  printError("Invalid Ethereum address: must be 0x followed by 40 hex characters");
15698
14342
  return;
15699
14343
  }
@@ -15710,7 +14354,7 @@ var setWithdrawalAddressCommand = new Command67("set-withdrawal-address").descri
15710
14354
  const expiresAt = Math.floor(Date.now() / 1e3) + SIGNATURE_TTL_SECONDS;
15711
14355
  const message = buildSetWithdrawalAddressMessage({
15712
14356
  walletAddress,
15713
- withdrawalAddress: address3,
14357
+ withdrawalAddress: address2,
15714
14358
  chainId,
15715
14359
  nonce,
15716
14360
  expiresAt
@@ -15718,7 +14362,7 @@ var setWithdrawalAddressCommand = new Command67("set-withdrawal-address").descri
15718
14362
  const signature = await signMessage(message, keystore);
15719
14363
  const { data: result, idempotencyKey } = await apiPost("/api/wallet/set-withdrawal-address", {
15720
14364
  walletAddress,
15721
- withdrawalAddress: address3,
14365
+ withdrawalAddress: address2,
15722
14366
  signature,
15723
14367
  nonce,
15724
14368
  expiresAt,
@@ -15755,14 +14399,14 @@ import { Command as Command68 } from "commander";
15755
14399
  var getWithdrawalAddressCommand = new Command68("get-withdrawal-address").description(
15756
14400
  "Show the withdrawal address registered on the selected network, if any (the address is per chain)"
15757
14401
  ).option("--address <addr>", "Wallet address to check (defaults to own wallet)").action(async (opts) => {
15758
- let address3 = opts.address;
15759
- if (!address3) {
14402
+ let address2 = opts.address;
14403
+ if (!address2) {
15760
14404
  const keystore = await loadKeystore();
15761
- address3 = keystore.walletAddress;
14405
+ address2 = keystore.walletAddress;
15762
14406
  }
15763
14407
  const { chainId } = selectedNetwork();
15764
14408
  const result = await apiGet(
15765
- `/api/wallet/withdrawal-address?address=${address3}&chainId=${chainId}`
14409
+ `/api/wallet/withdrawal-address?address=${address2}&chainId=${chainId}`
15766
14410
  );
15767
14411
  printResult({ ...result, chainId: result.chainId ?? chainId });
15768
14412
  });
@@ -15872,12 +14516,12 @@ var revealRecoveryCodeCommand = new Command71("reveal-recovery-code").descriptio
15872
14516
  printError("No keystore found. Run `taskmarket init` first.");
15873
14517
  return;
15874
14518
  }
15875
- const address3 = keystore.walletAddress;
14519
+ const address2 = keystore.walletAddress;
15876
14520
  const { chainId } = selectedNetwork();
15877
- const message = buildRevealAccountRecoveryCodeMessage(address3, chainId);
14521
+ const message = buildRevealAccountRecoveryCodeMessage(address2, chainId);
15878
14522
  const signature = await signMessage(message, keystore);
15879
14523
  const { data: result, idempotencyKey } = await apiPost("/api/wallet/reveal-backfilled-recovery-code", {
15880
- address: address3,
14524
+ address: address2,
15881
14525
  signature,
15882
14526
  chainId
15883
14527
  });
@@ -16717,8 +15361,8 @@ function cachedInboxLookup(lookup, options = {}) {
16717
15361
  const now = options.now ?? Date.now;
16718
15362
  const maxEntries = options.maxEntries ?? 5e3;
16719
15363
  const cache = /* @__PURE__ */ new Map();
16720
- return async (address3) => {
16721
- const key = address3.toLowerCase();
15364
+ return async (address2) => {
15365
+ const key = address2.toLowerCase();
16722
15366
  const cached = cache.get(key);
16723
15367
  if (cached && cached.expiresAt > now()) {
16724
15368
  return cached.inboxId;
@@ -17054,12 +15698,12 @@ function devConversationId(a, b) {
17054
15698
  function createFileBus(dir) {
17055
15699
  fs7.mkdirSync(dir, { recursive: true });
17056
15700
  const logPath = (inboxId) => path4.join(dir, `inbox-${inboxId}.jsonl`);
17057
- const addressPath = (address3) => path4.join(dir, `address-${address3.toLowerCase()}`);
15701
+ const addressPath = (address2) => path4.join(dir, `address-${address2.toLowerCase()}`);
17058
15702
  return {
17059
- register: (address3, inboxId) => fs7.writeFileSync(addressPath(address3), inboxId),
17060
- lookup: (address3) => {
15703
+ register: (address2, inboxId) => fs7.writeFileSync(addressPath(address2), inboxId),
15704
+ lookup: (address2) => {
17061
15705
  try {
17062
- return fs7.readFileSync(addressPath(address3), "utf8").trim() || null;
15706
+ return fs7.readFileSync(addressPath(address2), "utf8").trim() || null;
17063
15707
  } catch {
17064
15708
  return null;
17065
15709
  }
@@ -17100,8 +15744,8 @@ async function createDevClient(input) {
17100
15744
  inboxId,
17101
15745
  installationId,
17102
15746
  dbPath,
17103
- async inboxIdForAddress(address3) {
17104
- return devInboxByAddress.get(address3.toLowerCase()) ?? fileBus?.lookup(address3) ?? null;
15747
+ async inboxIdForAddress(address2) {
15748
+ return devInboxByAddress.get(address2.toLowerCase()) ?? fileBus?.lookup(address2) ?? null;
17105
15749
  },
17106
15750
  async sendMessage(toInboxId, body) {
17107
15751
  const message = {
@@ -17624,7 +16268,7 @@ async function createProductionClient(input, env) {
17624
16268
  }
17625
16269
  const installationId = extractString(client, ["installationId", "installationID"]) ?? extractString(asObject(client)?.installation, ["id", "installationId"]) ?? input.existingInstallationId ?? randomUUID3();
17626
16270
  const cursor = loadXmtpCursor(xmtpCursorPath(defaultXmtpDbDir(), input.walletAddress));
17627
- const inboxIdForAddress = cachedInboxLookup(async (address3) => {
16271
+ const inboxIdForAddress = cachedInboxLookup(async (address2) => {
17628
16272
  const lookup = asObject(client)?.fetchInboxIdByIdentifier;
17629
16273
  if (typeof lookup !== "function") {
17630
16274
  throw new XmtpTransportError(
@@ -17633,7 +16277,7 @@ async function createProductionClient(input, env) {
17633
16277
  );
17634
16278
  }
17635
16279
  const resolved = await withRetry(
17636
- () => lookup.call(client, { identifier: address3, identifierKind: 0 }),
16280
+ () => lookup.call(client, { identifier: address2, identifierKind: 0 }),
17637
16281
  parseRetryAttempts()
17638
16282
  );
17639
16283
  return resolved ?? null;
@@ -17807,24 +16451,24 @@ async function createXmtpClient(input) {
17807
16451
  return createProductionClient(input, env);
17808
16452
  }
17809
16453
  var networkInboxLookups = /* @__PURE__ */ new Map();
17810
- async function lookupInboxIdOnNetwork(address3) {
16454
+ async function lookupInboxIdOnNetwork(address2) {
17811
16455
  const env = resolveXmtpEnv();
17812
16456
  let lookup = networkInboxLookups.get(env);
17813
16457
  if (!lookup) {
17814
16458
  lookup = env === "memory" ? memoryInboxLookup() : sdkNetworkInboxLookup(env);
17815
16459
  networkInboxLookups.set(env, lookup);
17816
16460
  }
17817
- return lookup(address3);
16461
+ return lookup(address2);
17818
16462
  }
17819
16463
  function memoryInboxLookup() {
17820
- return async (address3) => {
16464
+ return async (address2) => {
17821
16465
  const busDir = process.env.TASKMARKET_XMTP_MEMORY_DIR?.trim();
17822
- return devInboxByAddress.get(address3.toLowerCase()) ?? (busDir ? createFileBus(busDir).lookup(address3) : null);
16466
+ return devInboxByAddress.get(address2.toLowerCase()) ?? (busDir ? createFileBus(busDir).lookup(address2) : null);
17823
16467
  };
17824
16468
  }
17825
16469
  function sdkNetworkInboxLookup(env) {
17826
16470
  let backend;
17827
- return cachedInboxLookup(async (address3) => {
16471
+ return cachedInboxLookup(async (address2) => {
17828
16472
  assertXmtpSupported();
17829
16473
  const sdkModule = asObject(
17830
16474
  await import("@xmtp/node-sdk").catch((error) => {
@@ -17848,7 +16492,7 @@ function sdkNetworkInboxLookup(env) {
17848
16492
  backend ??= createBackend({ env });
17849
16493
  try {
17850
16494
  return await getInboxIdForIdentifier(await backend, {
17851
- identifier: address3,
16495
+ identifier: address2,
17852
16496
  identifierKind: 0
17853
16497
  });
17854
16498
  } catch (error) {
@@ -18145,7 +16789,7 @@ async function resolvePeerRuleInboxId(to, inboxIdOnNetwork = lookupInboxIdOnNetw
18145
16789
  if (isRawInboxId(to)) {
18146
16790
  return to;
18147
16791
  }
18148
- let address3 = to;
16792
+ let address2 = to;
18149
16793
  if (!isAddress3(to)) {
18150
16794
  const result = await apiGet(
18151
16795
  `/api/xmtp/resolve?agentId=${encodeURIComponent(to)}&chainId=${selectedNetwork().chainId}`
@@ -18153,11 +16797,11 @@ async function resolvePeerRuleInboxId(to, inboxIdOnNetwork = lookupInboxIdOnNetw
18153
16797
  if (!result.address) {
18154
16798
  throw new Error(`No XMTP inbox found for agent "${to}"`);
18155
16799
  }
18156
- address3 = result.address;
16800
+ address2 = result.address;
18157
16801
  }
18158
- const inboxId = await inboxIdOnNetwork(address3);
16802
+ const inboxId = await inboxIdOnNetwork(address2);
18159
16803
  if (!inboxId) {
18160
- throw new Error(`No XMTP inbox found on the XMTP network for address ${address3}`);
16804
+ throw new Error(`No XMTP inbox found on the XMTP network for address ${address2}`);
18161
16805
  }
18162
16806
  return inboxId;
18163
16807
  }
@@ -19715,8 +18359,8 @@ var VERIFIED_SENDER_VALUES = ["pass", "platform"];
19715
18359
  function isVerifiedSender(senderVerification) {
19716
18360
  return senderVerification != null && VERIFIED_SENDER_VALUES.includes(senderVerification);
19717
18361
  }
19718
- function domainOf(address3) {
19719
- return address3.slice(address3.lastIndexOf("@") + 1).trim().toLowerCase();
18362
+ function domainOf(address2) {
18363
+ return address2.slice(address2.lastIndexOf("@") + 1).trim().toLowerCase();
19720
18364
  }
19721
18365
  function replyNeedsVerifiedSender(original) {
19722
18366
  if (isVerifiedSender(original.senderVerification)) return false;
@@ -20816,12 +19460,12 @@ import { Command as Command107 } from "commander";
20816
19460
 
20817
19461
  // src/commands/requester/stats.ts
20818
19462
  import { Command as Command106 } from "commander";
20819
- var requesterStatsCmd = new Command106("stats").description("Get requester reputation stats for an address").argument("<address>", "Wallet address of the requester").action(async (address3) => {
20820
- if (!/^0x[0-9a-fA-F]{40}$/.test(address3)) {
19463
+ var requesterStatsCmd = new Command106("stats").description("Get requester reputation stats for an address").argument("<address>", "Wallet address of the requester").action(async (address2) => {
19464
+ if (!/^0x[0-9a-fA-F]{40}$/.test(address2)) {
20821
19465
  printError("Address must be a 0x-prefixed 20-byte hex string");
20822
19466
  return;
20823
19467
  }
20824
- const data = await apiGet(`/api/requester/${address3}/stats`);
19468
+ const data = await apiGet(`/api/requester/${address2}/stats`);
20825
19469
  if (!data) {
20826
19470
  printError("No stats found for address");
20827
19471
  return;
@@ -21094,6 +19738,19 @@ var SponsoredTasksVaultV2ABI = [
21094
19738
  ],
21095
19739
  "stateMutability": "view"
21096
19740
  },
19741
+ {
19742
+ "type": "function",
19743
+ "name": "CONFIGURE_MANAGER_FOR_CHAIN_TYPEHASH",
19744
+ "inputs": [],
19745
+ "outputs": [
19746
+ {
19747
+ "name": "",
19748
+ "type": "bytes32",
19749
+ "internalType": "bytes32"
19750
+ }
19751
+ ],
19752
+ "stateMutability": "view"
19753
+ },
21097
19754
  {
21098
19755
  "type": "function",
21099
19756
  "name": "CONFIGURE_MANAGER_TYPEHASH",
@@ -21505,29 +20162,90 @@ var SponsoredTasksVaultV2ABI = [
21505
20162
  "internalType": "bytes32"
21506
20163
  },
21507
20164
  {
21508
- "name": "index",
20165
+ "name": "index",
20166
+ "type": "uint256",
20167
+ "internalType": "uint256"
20168
+ },
20169
+ {
20170
+ "name": "worker",
20171
+ "type": "address",
20172
+ "internalType": "address"
20173
+ },
20174
+ {
20175
+ "name": "destination",
20176
+ "type": "address",
20177
+ "internalType": "address"
20178
+ },
20179
+ {
20180
+ "name": "amount",
20181
+ "type": "uint256",
20182
+ "internalType": "uint256"
20183
+ },
20184
+ {
20185
+ "name": "nonce",
20186
+ "type": "uint256",
20187
+ "internalType": "uint256"
20188
+ },
20189
+ {
20190
+ "name": "deadline",
20191
+ "type": "uint256",
20192
+ "internalType": "uint256"
20193
+ },
20194
+ {
20195
+ "name": "signature",
20196
+ "type": "bytes",
20197
+ "internalType": "bytes"
20198
+ },
20199
+ {
20200
+ "name": "proof",
20201
+ "type": "bytes32[]",
20202
+ "internalType": "bytes32[]"
20203
+ }
20204
+ ],
20205
+ "outputs": [],
20206
+ "stateMutability": "nonpayable"
20207
+ },
20208
+ {
20209
+ "type": "function",
20210
+ "name": "configureManager",
20211
+ "inputs": [
20212
+ {
20213
+ "name": "manager",
20214
+ "type": "address",
20215
+ "internalType": "address"
20216
+ },
20217
+ {
20218
+ "name": "newCap",
21509
20219
  "type": "uint256",
21510
20220
  "internalType": "uint256"
21511
20221
  },
21512
20222
  {
21513
- "name": "worker",
21514
- "type": "address",
21515
- "internalType": "address"
21516
- },
20223
+ "name": "active",
20224
+ "type": "bool",
20225
+ "internalType": "bool"
20226
+ }
20227
+ ],
20228
+ "outputs": [],
20229
+ "stateMutability": "nonpayable"
20230
+ },
20231
+ {
20232
+ "type": "function",
20233
+ "name": "configureManagerBySig",
20234
+ "inputs": [
21517
20235
  {
21518
- "name": "destination",
20236
+ "name": "manager",
21519
20237
  "type": "address",
21520
20238
  "internalType": "address"
21521
20239
  },
21522
20240
  {
21523
- "name": "amount",
20241
+ "name": "newCap",
21524
20242
  "type": "uint256",
21525
20243
  "internalType": "uint256"
21526
20244
  },
21527
20245
  {
21528
- "name": "nonce",
21529
- "type": "uint256",
21530
- "internalType": "uint256"
20246
+ "name": "active",
20247
+ "type": "bool",
20248
+ "internalType": "bool"
21531
20249
  },
21532
20250
  {
21533
20251
  "name": "deadline",
@@ -21538,11 +20256,6 @@ var SponsoredTasksVaultV2ABI = [
21538
20256
  "name": "signature",
21539
20257
  "type": "bytes",
21540
20258
  "internalType": "bytes"
21541
- },
21542
- {
21543
- "name": "proof",
21544
- "type": "bytes32[]",
21545
- "internalType": "bytes32[]"
21546
20259
  }
21547
20260
  ],
21548
20261
  "outputs": [],
@@ -21550,8 +20263,13 @@ var SponsoredTasksVaultV2ABI = [
21550
20263
  },
21551
20264
  {
21552
20265
  "type": "function",
21553
- "name": "configureManager",
20266
+ "name": "configureManagerForChain",
21554
20267
  "inputs": [
20268
+ {
20269
+ "name": "taskChainId",
20270
+ "type": "uint256",
20271
+ "internalType": "uint256"
20272
+ },
21555
20273
  {
21556
20274
  "name": "manager",
21557
20275
  "type": "address",
@@ -21573,8 +20291,13 @@ var SponsoredTasksVaultV2ABI = [
21573
20291
  },
21574
20292
  {
21575
20293
  "type": "function",
21576
- "name": "configureManagerBySig",
20294
+ "name": "configureManagerForChainBySig",
21577
20295
  "inputs": [
20296
+ {
20297
+ "name": "taskChainId",
20298
+ "type": "uint256",
20299
+ "internalType": "uint256"
20300
+ },
21578
20301
  {
21579
20302
  "name": "manager",
21580
20303
  "type": "address",
@@ -21951,6 +20674,52 @@ var SponsoredTasksVaultV2ABI = [
21951
20674
  ],
21952
20675
  "stateMutability": "view"
21953
20676
  },
20677
+ {
20678
+ "type": "function",
20679
+ "name": "managerAccountForChain",
20680
+ "inputs": [
20681
+ {
20682
+ "name": "taskChainId",
20683
+ "type": "uint256",
20684
+ "internalType": "uint256"
20685
+ },
20686
+ {
20687
+ "name": "manager",
20688
+ "type": "address",
20689
+ "internalType": "address"
20690
+ }
20691
+ ],
20692
+ "outputs": [
20693
+ {
20694
+ "name": "account",
20695
+ "type": "tuple",
20696
+ "internalType": "struct SponsoredTaskTypes.ManagerAccount",
20697
+ "components": [
20698
+ {
20699
+ "name": "cap",
20700
+ "type": "uint256",
20701
+ "internalType": "uint256"
20702
+ },
20703
+ {
20704
+ "name": "reserved",
20705
+ "type": "uint256",
20706
+ "internalType": "uint256"
20707
+ },
20708
+ {
20709
+ "name": "spent",
20710
+ "type": "uint256",
20711
+ "internalType": "uint256"
20712
+ },
20713
+ {
20714
+ "name": "active",
20715
+ "type": "bool",
20716
+ "internalType": "bool"
20717
+ }
20718
+ ]
20719
+ }
20720
+ ],
20721
+ "stateMutability": "view"
20722
+ },
21954
20723
  {
21955
20724
  "type": "function",
21956
20725
  "name": "managerRemaining",
@@ -21970,6 +20739,30 @@ var SponsoredTasksVaultV2ABI = [
21970
20739
  ],
21971
20740
  "stateMutability": "view"
21972
20741
  },
20742
+ {
20743
+ "type": "function",
20744
+ "name": "managerRemainingForChain",
20745
+ "inputs": [
20746
+ {
20747
+ "name": "taskChainId",
20748
+ "type": "uint256",
20749
+ "internalType": "uint256"
20750
+ },
20751
+ {
20752
+ "name": "manager",
20753
+ "type": "address",
20754
+ "internalType": "address"
20755
+ }
20756
+ ],
20757
+ "outputs": [
20758
+ {
20759
+ "name": "",
20760
+ "type": "uint256",
20761
+ "internalType": "uint256"
20762
+ }
20763
+ ],
20764
+ "stateMutability": "view"
20765
+ },
21973
20766
  {
21974
20767
  "type": "function",
21975
20768
  "name": "owner",
@@ -22115,6 +20908,59 @@ var SponsoredTasksVaultV2ABI = [
22115
20908
  "outputs": [],
22116
20909
  "stateMutability": "nonpayable"
22117
20910
  },
20911
+ {
20912
+ "type": "function",
20913
+ "name": "reserveTaskForChain",
20914
+ "inputs": [
20915
+ {
20916
+ "name": "allocationId",
20917
+ "type": "bytes32",
20918
+ "internalType": "bytes32"
20919
+ },
20920
+ {
20921
+ "name": "taskChainId",
20922
+ "type": "uint256",
20923
+ "internalType": "uint256"
20924
+ },
20925
+ {
20926
+ "name": "taskId",
20927
+ "type": "bytes32",
20928
+ "internalType": "bytes32"
20929
+ },
20930
+ {
20931
+ "name": "manager",
20932
+ "type": "address",
20933
+ "internalType": "address"
20934
+ },
20935
+ {
20936
+ "name": "grossAmount",
20937
+ "type": "uint256",
20938
+ "internalType": "uint256"
20939
+ },
20940
+ {
20941
+ "name": "expectedEpoch",
20942
+ "type": "uint64",
20943
+ "internalType": "uint64"
20944
+ },
20945
+ {
20946
+ "name": "expectedFeeBps",
20947
+ "type": "uint16",
20948
+ "internalType": "uint16"
20949
+ },
20950
+ {
20951
+ "name": "expectedFeeRecipient",
20952
+ "type": "address",
20953
+ "internalType": "address"
20954
+ },
20955
+ {
20956
+ "name": "termsHash",
20957
+ "type": "bytes32",
20958
+ "internalType": "bytes32"
20959
+ }
20960
+ ],
20961
+ "outputs": [],
20962
+ "stateMutability": "nonpayable"
20963
+ },
22118
20964
  {
22119
20965
  "type": "function",
22120
20966
  "name": "settlementChain",
@@ -22141,6 +20987,25 @@ var SponsoredTasksVaultV2ABI = [
22141
20987
  ],
22142
20988
  "stateMutability": "view"
22143
20989
  },
20990
+ {
20991
+ "type": "function",
20992
+ "name": "sweepExited",
20993
+ "inputs": [
20994
+ {
20995
+ "name": "recipient",
20996
+ "type": "address",
20997
+ "internalType": "address"
20998
+ }
20999
+ ],
21000
+ "outputs": [
21001
+ {
21002
+ "name": "amount",
21003
+ "type": "uint256",
21004
+ "internalType": "uint256"
21005
+ }
21006
+ ],
21007
+ "stateMutability": "nonpayable"
21008
+ },
22144
21009
  {
22145
21010
  "type": "function",
22146
21011
  "name": "token",
@@ -22374,6 +21239,37 @@ var SponsoredTasksVaultV2ABI = [
22374
21239
  "inputs": [],
22375
21240
  "anonymous": false
22376
21241
  },
21242
+ {
21243
+ "type": "event",
21244
+ "name": "ExitedVaultSwept",
21245
+ "inputs": [
21246
+ {
21247
+ "name": "vaultId",
21248
+ "type": "bytes32",
21249
+ "indexed": true,
21250
+ "internalType": "bytes32"
21251
+ },
21252
+ {
21253
+ "name": "owner",
21254
+ "type": "address",
21255
+ "indexed": true,
21256
+ "internalType": "address"
21257
+ },
21258
+ {
21259
+ "name": "recipient",
21260
+ "type": "address",
21261
+ "indexed": true,
21262
+ "internalType": "address"
21263
+ },
21264
+ {
21265
+ "name": "amount",
21266
+ "type": "uint256",
21267
+ "indexed": false,
21268
+ "internalType": "uint256"
21269
+ }
21270
+ ],
21271
+ "anonymous": false
21272
+ },
22377
21273
  {
22378
21274
  "type": "event",
22379
21275
  "name": "FeeClaimed",
@@ -22397,37 +21293,80 @@ var SponsoredTasksVaultV2ABI = [
22397
21293
  "internalType": "address"
22398
21294
  },
22399
21295
  {
22400
- "name": "destination",
22401
- "type": "address",
21296
+ "name": "destination",
21297
+ "type": "address",
21298
+ "indexed": false,
21299
+ "internalType": "address"
21300
+ },
21301
+ {
21302
+ "name": "amount",
21303
+ "type": "uint256",
21304
+ "indexed": false,
21305
+ "internalType": "uint256"
21306
+ }
21307
+ ],
21308
+ "anonymous": false
21309
+ },
21310
+ {
21311
+ "type": "event",
21312
+ "name": "Initialized",
21313
+ "inputs": [
21314
+ {
21315
+ "name": "version",
21316
+ "type": "uint64",
21317
+ "indexed": false,
21318
+ "internalType": "uint64"
21319
+ }
21320
+ ],
21321
+ "anonymous": false
21322
+ },
21323
+ {
21324
+ "type": "event",
21325
+ "name": "ManagerConfigured",
21326
+ "inputs": [
21327
+ {
21328
+ "name": "manager",
21329
+ "type": "address",
21330
+ "indexed": true,
21331
+ "internalType": "address"
21332
+ },
21333
+ {
21334
+ "name": "cap",
21335
+ "type": "uint256",
21336
+ "indexed": false,
21337
+ "internalType": "uint256"
21338
+ },
21339
+ {
21340
+ "name": "reserved",
21341
+ "type": "uint256",
22402
21342
  "indexed": false,
22403
- "internalType": "address"
21343
+ "internalType": "uint256"
22404
21344
  },
22405
21345
  {
22406
- "name": "amount",
21346
+ "name": "spent",
22407
21347
  "type": "uint256",
22408
21348
  "indexed": false,
22409
21349
  "internalType": "uint256"
22410
- }
22411
- ],
22412
- "anonymous": false
22413
- },
22414
- {
22415
- "type": "event",
22416
- "name": "Initialized",
22417
- "inputs": [
21350
+ },
22418
21351
  {
22419
- "name": "version",
22420
- "type": "uint64",
21352
+ "name": "active",
21353
+ "type": "bool",
22421
21354
  "indexed": false,
22422
- "internalType": "uint64"
21355
+ "internalType": "bool"
22423
21356
  }
22424
21357
  ],
22425
21358
  "anonymous": false
22426
21359
  },
22427
21360
  {
22428
21361
  "type": "event",
22429
- "name": "ManagerConfigured",
21362
+ "name": "ManagerConfiguredForChain",
22430
21363
  "inputs": [
21364
+ {
21365
+ "name": "taskChainId",
21366
+ "type": "uint256",
21367
+ "indexed": true,
21368
+ "internalType": "uint256"
21369
+ },
22431
21370
  {
22432
21371
  "name": "manager",
22433
21372
  "type": "address",
@@ -23335,6 +22274,11 @@ var SponsoredTasksVaultV2ABI = [
23335
22274
  }
23336
22275
  ]
23337
22276
  },
22277
+ {
22278
+ "type": "error",
22279
+ "name": "TaskChainRequired",
22280
+ "inputs": []
22281
+ },
23338
22282
  {
23339
22283
  "type": "error",
23340
22284
  "name": "TaskIdRequired",
@@ -23403,6 +22347,11 @@ var SponsoredTasksVaultV2ABI = [
23403
22347
  "name": "VaultNotActive",
23404
22348
  "inputs": []
23405
22349
  },
22350
+ {
22351
+ "type": "error",
22352
+ "name": "VaultNotExited",
22353
+ "inputs": []
22354
+ },
23406
22355
  {
23407
22356
  "type": "error",
23408
22357
  "name": "ZeroAddress",
@@ -24246,8 +23195,8 @@ function getConfigDecoder() {
24246
23195
  function decodeConfig(encodedAccount) {
24247
23196
  return decodeAccount(encodedAccount, getConfigDecoder());
24248
23197
  }
24249
- async function fetchMaybeConfig(rpc, address3, config) {
24250
- const maybeAccount = await fetchEncodedAccount(rpc, address3, config);
23198
+ async function fetchMaybeConfig(rpc, address2, config) {
23199
+ const maybeAccount = await fetchEncodedAccount(rpc, address2, config);
24251
23200
  return decodeConfig(maybeAccount);
24252
23201
  }
24253
23202
 
@@ -24375,65 +23324,11 @@ function getVaultDecoder() {
24375
23324
  function decodeVault(encodedAccount) {
24376
23325
  return decodeAccount(encodedAccount, getVaultDecoder());
24377
23326
  }
24378
- async function fetchMaybeVault(rpc, address3, config) {
24379
- const maybeAccount = await fetchEncodedAccount(rpc, address3, config);
23327
+ async function fetchMaybeVault(rpc, address2, config) {
23328
+ const maybeAccount = await fetchEncodedAccount(rpc, address2, config);
24380
23329
  return decodeVault(maybeAccount);
24381
23330
  }
24382
23331
 
24383
- // ../../node_modules/.pnpm/@solana+program-client-core@8.4.0_typescript@5.7.3/node_modules/@solana/program-client-core/dist/index.node.mjs
24384
- function getNonNullResolvedInstructionInput2(inputName, value) {
24385
- if (value === null || value === void 0) {
24386
- throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_NON_NULL, {
24387
- inputName
24388
- });
24389
- }
24390
- return value;
24391
- }
24392
- function getAddressFromResolvedInstructionAccount2(inputName, value) {
24393
- const nonNullValue = getNonNullResolvedInstructionInput2(inputName, value);
24394
- if (typeof value === "object" && "address" in nonNullValue) {
24395
- return nonNullValue.address;
24396
- }
24397
- if (Array.isArray(nonNullValue)) {
24398
- return nonNullValue[0];
24399
- }
24400
- return nonNullValue;
24401
- }
24402
- function getAccountMetaFactory2(programAddress, optionalAccountStrategy) {
24403
- return (inputName, account) => {
24404
- if (!account.value) {
24405
- if (optionalAccountStrategy === "omitted") return;
24406
- return Object.freeze({ address: programAddress, role: AccountRole.READONLY });
24407
- }
24408
- if (hasExplicitRole2(account.value)) {
24409
- return Object.freeze({
24410
- address: account.value.address,
24411
- role: account.value.role,
24412
- ..."signer" in account.value && account.value.signer ? { signer: account.value.signer } : {}
24413
- });
24414
- }
24415
- const idlIsSigner = account.isSigner ?? "either";
24416
- const isSigner = idlIsSigner !== false && isResolvedInstructionAccountSigner2(account.value);
24417
- if (!isSigner && idlIsSigner === true) {
24418
- throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_SIGNER, {
24419
- inputName
24420
- });
24421
- }
24422
- const writableRole = account.isWritable ? AccountRole.WRITABLE : AccountRole.READONLY;
24423
- return Object.freeze({
24424
- address: getAddressFromResolvedInstructionAccount2(inputName, account.value),
24425
- role: isSigner ? upgradeRoleToSigner(writableRole) : writableRole,
24426
- ...isSigner ? { signer: account.value } : {}
24427
- });
24428
- };
24429
- }
24430
- function hasExplicitRole2(value) {
24431
- return typeof value === "object" && "role" in value && typeof value.role === "number";
24432
- }
24433
- function isResolvedInstructionAccountSigner2(value) {
24434
- return !!value && typeof value === "object" && "address" in value && typeof value.address === "string" && isTransactionSigner(value);
24435
- }
24436
-
24437
23332
  // ../../packages/solana-sponsored-client/dist/generated/pdas/binding.js
24438
23333
  async function findBindingPda(seeds, config = {}) {
24439
23334
  const { programAddress = "STvau1t111111111111111111111111111111111111" } = config;
@@ -24506,7 +23401,7 @@ function getBindPayoutInstructionDataEncoder() {
24506
23401
  }
24507
23402
  async function getBindPayoutInstructionAsync(input, config) {
24508
23403
  const programAddress = config?.programAddress ?? SPONSORED_TASKS_PROGRAM_ADDRESS;
24509
- const getAccountMeta = getAccountMetaFactory2(programAddress, "programId");
23404
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
24510
23405
  const originalAccounts = {
24511
23406
  config: { value: input.config ?? null, isSigner: false, isWritable: false },
24512
23407
  binding: { value: input.binding ?? null, isSigner: false, isWritable: true },
@@ -24522,8 +23417,8 @@ async function getBindPayoutInstructionAsync(input, config) {
24522
23417
  }
24523
23418
  if (!accounts.binding.value) {
24524
23419
  accounts.binding.value = await findBindingPda({
24525
- taskChainId: getNonNullResolvedInstructionInput2("taskChainId", args.taskChainId),
24526
- agent: getNonNullResolvedInstructionInput2("agent", args.agent)
23420
+ taskChainId: getNonNullResolvedInstructionInput("taskChainId", args.taskChainId),
23421
+ agent: getNonNullResolvedInstructionInput("agent", args.agent)
24527
23422
  }, { programAddress });
24528
23423
  }
24529
23424
  if (!accounts.systemProgram.value) {
@@ -24598,7 +23493,7 @@ function getCreateVaultInstructionDataEncoder() {
24598
23493
  }
24599
23494
  function getCreateVaultInstruction(input, config) {
24600
23495
  const programAddress = config?.programAddress ?? SPONSORED_TASKS_PROGRAM_ADDRESS;
24601
- const getAccountMeta = getAccountMetaFactory2(programAddress, "programId");
23496
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
24602
23497
  const originalAccounts = {
24603
23498
  config: { value: input.config ?? null, isSigner: false, isWritable: false },
24604
23499
  sponsor: { value: input.sponsor ?? null, isSigner: true, isWritable: true },
@@ -24664,7 +23559,7 @@ function getEmergencyExitInstructionDataEncoder() {
24664
23559
  }
24665
23560
  function getEmergencyExitInstruction(input, config) {
24666
23561
  const programAddress = config?.programAddress ?? SPONSORED_TASKS_PROGRAM_ADDRESS;
24667
- const getAccountMeta = getAccountMetaFactory2(programAddress, "programId");
23562
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
24668
23563
  const originalAccounts = {
24669
23564
  vault: { value: input.vault ?? null, isSigner: false, isWritable: true },
24670
23565
  sponsor: { value: input.sponsor ?? null, isSigner: true, isWritable: false },
@@ -24703,6 +23598,18 @@ function getEmergencyExitInstruction(input, config) {
24703
23598
  });
24704
23599
  }
24705
23600
 
23601
+ // ../../packages/solana-sponsored-client/dist/generated/instructions/extendDeadline.js
23602
+ var EXTEND_DEADLINE_DISCRIMINATOR = new Uint8Array([
23603
+ 18,
23604
+ 209,
23605
+ 27,
23606
+ 175,
23607
+ 87,
23608
+ 13,
23609
+ 213,
23610
+ 188
23611
+ ]);
23612
+
24706
23613
  // ../../packages/solana-sponsored-client/dist/generated/instructions/fund.js
24707
23614
  var FUND_DISCRIMINATOR = new Uint8Array([
24708
23615
  218,
@@ -24722,7 +23629,7 @@ function getFundInstructionDataEncoder() {
24722
23629
  }
24723
23630
  function getFundInstruction(input, config) {
24724
23631
  const programAddress = config?.programAddress ?? SPONSORED_TASKS_PROGRAM_ADDRESS;
24725
- const getAccountMeta = getAccountMetaFactory2(programAddress, "programId");
23632
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
24726
23633
  const originalAccounts = {
24727
23634
  vault: { value: input.vault ?? null, isSigner: false, isWritable: true },
24728
23635
  mint: { value: input.mint ?? null, isSigner: false, isWritable: false },
@@ -24889,7 +23796,7 @@ function getSetManagersInstructionDataEncoder() {
24889
23796
  }
24890
23797
  function getSetManagersInstruction(input, config) {
24891
23798
  const programAddress = config?.programAddress ?? SPONSORED_TASKS_PROGRAM_ADDRESS;
24892
- const getAccountMeta = getAccountMetaFactory2(programAddress, "programId");
23799
+ const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
24893
23800
  const originalAccounts = {
24894
23801
  vault: { value: input.vault ?? null, isSigner: false, isWritable: true },
24895
23802
  sponsor: { value: input.sponsor ?? null, isSigner: true, isWritable: false },
@@ -24934,6 +23841,18 @@ var SETTLE_DISCRIMINATOR = new Uint8Array([
24934
23841
  212
24935
23842
  ]);
24936
23843
 
23844
+ // ../../packages/solana-sponsored-client/dist/generated/instructions/sweepExited.js
23845
+ var SWEEP_EXITED_DISCRIMINATOR = new Uint8Array([
23846
+ 49,
23847
+ 51,
23848
+ 165,
23849
+ 229,
23850
+ 234,
23851
+ 130,
23852
+ 98,
23853
+ 7
23854
+ ]);
23855
+
24937
23856
  // ../../packages/solana-sponsored-client/dist/generated/programs/sponsoredTasks.js
24938
23857
  var SPONSORED_TASKS_PROGRAM_ADDRESS = "STvau1t111111111111111111111111111111111111";
24939
23858
  var SponsoredTasksAccount;
@@ -24950,22 +23869,24 @@ var SponsoredTasksEvent;
24950
23869
  SponsoredTasksEvent2[SponsoredTasksEvent2["AdminProposed"] = 1] = "AdminProposed";
24951
23870
  SponsoredTasksEvent2[SponsoredTasksEvent2["ClaimDelaySet"] = 2] = "ClaimDelaySet";
24952
23871
  SponsoredTasksEvent2[SponsoredTasksEvent2["ConfigInitialized"] = 3] = "ConfigInitialized";
24953
- SponsoredTasksEvent2[SponsoredTasksEvent2["FeeClaimed"] = 4] = "FeeClaimed";
24954
- SponsoredTasksEvent2[SponsoredTasksEvent2["FeeSet"] = 5] = "FeeSet";
24955
- SponsoredTasksEvent2[SponsoredTasksEvent2["ManagerConfigured"] = 6] = "ManagerConfigured";
24956
- SponsoredTasksEvent2[SponsoredTasksEvent2["ManagerRemoved"] = 7] = "ManagerRemoved";
24957
- SponsoredTasksEvent2[SponsoredTasksEvent2["PauseSet"] = 8] = "PauseSet";
24958
- SponsoredTasksEvent2[SponsoredTasksEvent2["PayoutBindingPending"] = 9] = "PayoutBindingPending";
24959
- SponsoredTasksEvent2[SponsoredTasksEvent2["PayoutBound"] = 10] = "PayoutBound";
24960
- SponsoredTasksEvent2[SponsoredTasksEvent2["SettlementInstalled"] = 11] = "SettlementInstalled";
24961
- SponsoredTasksEvent2[SponsoredTasksEvent2["SettlementRevoked"] = 12] = "SettlementRevoked";
24962
- SponsoredTasksEvent2[SponsoredTasksEvent2["SettlersChanged"] = 13] = "SettlersChanged";
24963
- SponsoredTasksEvent2[SponsoredTasksEvent2["SponsoredTaskClaimed"] = 14] = "SponsoredTaskClaimed";
24964
- SponsoredTasksEvent2[SponsoredTasksEvent2["TaskReleased"] = 15] = "TaskReleased";
24965
- SponsoredTasksEvent2[SponsoredTasksEvent2["TaskReserved"] = 16] = "TaskReserved";
24966
- SponsoredTasksEvent2[SponsoredTasksEvent2["VaultCreated"] = 17] = "VaultCreated";
24967
- SponsoredTasksEvent2[SponsoredTasksEvent2["VaultEmergencyExited"] = 18] = "VaultEmergencyExited";
24968
- SponsoredTasksEvent2[SponsoredTasksEvent2["VaultFunded"] = 19] = "VaultFunded";
23872
+ SponsoredTasksEvent2[SponsoredTasksEvent2["ExitedVaultSwept"] = 4] = "ExitedVaultSwept";
23873
+ SponsoredTasksEvent2[SponsoredTasksEvent2["FeeClaimed"] = 5] = "FeeClaimed";
23874
+ SponsoredTasksEvent2[SponsoredTasksEvent2["FeeSet"] = 6] = "FeeSet";
23875
+ SponsoredTasksEvent2[SponsoredTasksEvent2["ManagerConfigured"] = 7] = "ManagerConfigured";
23876
+ SponsoredTasksEvent2[SponsoredTasksEvent2["ManagerRemoved"] = 8] = "ManagerRemoved";
23877
+ SponsoredTasksEvent2[SponsoredTasksEvent2["PauseSet"] = 9] = "PauseSet";
23878
+ SponsoredTasksEvent2[SponsoredTasksEvent2["PayoutBindingPending"] = 10] = "PayoutBindingPending";
23879
+ SponsoredTasksEvent2[SponsoredTasksEvent2["PayoutBound"] = 11] = "PayoutBound";
23880
+ SponsoredTasksEvent2[SponsoredTasksEvent2["ReservationDeadlineExtended"] = 12] = "ReservationDeadlineExtended";
23881
+ SponsoredTasksEvent2[SponsoredTasksEvent2["SettlementInstalled"] = 13] = "SettlementInstalled";
23882
+ SponsoredTasksEvent2[SponsoredTasksEvent2["SettlementRevoked"] = 14] = "SettlementRevoked";
23883
+ SponsoredTasksEvent2[SponsoredTasksEvent2["SettlersChanged"] = 15] = "SettlersChanged";
23884
+ SponsoredTasksEvent2[SponsoredTasksEvent2["SponsoredTaskClaimed"] = 16] = "SponsoredTaskClaimed";
23885
+ SponsoredTasksEvent2[SponsoredTasksEvent2["TaskReleased"] = 17] = "TaskReleased";
23886
+ SponsoredTasksEvent2[SponsoredTasksEvent2["TaskReserved"] = 18] = "TaskReserved";
23887
+ SponsoredTasksEvent2[SponsoredTasksEvent2["VaultCreated"] = 19] = "VaultCreated";
23888
+ SponsoredTasksEvent2[SponsoredTasksEvent2["VaultEmergencyExited"] = 20] = "VaultEmergencyExited";
23889
+ SponsoredTasksEvent2[SponsoredTasksEvent2["VaultFunded"] = 21] = "VaultFunded";
24969
23890
  })(SponsoredTasksEvent || (SponsoredTasksEvent = {}));
24970
23891
  var SponsoredTasksInstruction;
24971
23892
  (function(SponsoredTasksInstruction2) {
@@ -24976,19 +23897,21 @@ var SponsoredTasksInstruction;
24976
23897
  SponsoredTasksInstruction2[SponsoredTasksInstruction2["ClaimFee"] = 4] = "ClaimFee";
24977
23898
  SponsoredTasksInstruction2[SponsoredTasksInstruction2["CreateVault"] = 5] = "CreateVault";
24978
23899
  SponsoredTasksInstruction2[SponsoredTasksInstruction2["EmergencyExit"] = 6] = "EmergencyExit";
24979
- SponsoredTasksInstruction2[SponsoredTasksInstruction2["Fund"] = 7] = "Fund";
24980
- SponsoredTasksInstruction2[SponsoredTasksInstruction2["InitConfig"] = 8] = "InitConfig";
24981
- SponsoredTasksInstruction2[SponsoredTasksInstruction2["Pause"] = 9] = "Pause";
24982
- SponsoredTasksInstruction2[SponsoredTasksInstruction2["Release"] = 10] = "Release";
24983
- SponsoredTasksInstruction2[SponsoredTasksInstruction2["ReleaseExpired"] = 11] = "ReleaseExpired";
24984
- SponsoredTasksInstruction2[SponsoredTasksInstruction2["Reserve"] = 12] = "Reserve";
24985
- SponsoredTasksInstruction2[SponsoredTasksInstruction2["RevokeSettlement"] = 13] = "RevokeSettlement";
24986
- SponsoredTasksInstruction2[SponsoredTasksInstruction2["SetAdmin"] = 14] = "SetAdmin";
24987
- SponsoredTasksInstruction2[SponsoredTasksInstruction2["SetClaimDelay"] = 15] = "SetClaimDelay";
24988
- SponsoredTasksInstruction2[SponsoredTasksInstruction2["SetFee"] = 16] = "SetFee";
24989
- SponsoredTasksInstruction2[SponsoredTasksInstruction2["SetManagers"] = 17] = "SetManagers";
24990
- SponsoredTasksInstruction2[SponsoredTasksInstruction2["SetSettlers"] = 18] = "SetSettlers";
24991
- SponsoredTasksInstruction2[SponsoredTasksInstruction2["Settle"] = 19] = "Settle";
23900
+ SponsoredTasksInstruction2[SponsoredTasksInstruction2["ExtendDeadline"] = 7] = "ExtendDeadline";
23901
+ SponsoredTasksInstruction2[SponsoredTasksInstruction2["Fund"] = 8] = "Fund";
23902
+ SponsoredTasksInstruction2[SponsoredTasksInstruction2["InitConfig"] = 9] = "InitConfig";
23903
+ SponsoredTasksInstruction2[SponsoredTasksInstruction2["Pause"] = 10] = "Pause";
23904
+ SponsoredTasksInstruction2[SponsoredTasksInstruction2["Release"] = 11] = "Release";
23905
+ SponsoredTasksInstruction2[SponsoredTasksInstruction2["ReleaseExpired"] = 12] = "ReleaseExpired";
23906
+ SponsoredTasksInstruction2[SponsoredTasksInstruction2["Reserve"] = 13] = "Reserve";
23907
+ SponsoredTasksInstruction2[SponsoredTasksInstruction2["RevokeSettlement"] = 14] = "RevokeSettlement";
23908
+ SponsoredTasksInstruction2[SponsoredTasksInstruction2["SetAdmin"] = 15] = "SetAdmin";
23909
+ SponsoredTasksInstruction2[SponsoredTasksInstruction2["SetClaimDelay"] = 16] = "SetClaimDelay";
23910
+ SponsoredTasksInstruction2[SponsoredTasksInstruction2["SetFee"] = 17] = "SetFee";
23911
+ SponsoredTasksInstruction2[SponsoredTasksInstruction2["SetManagers"] = 18] = "SetManagers";
23912
+ SponsoredTasksInstruction2[SponsoredTasksInstruction2["SetSettlers"] = 19] = "SetSettlers";
23913
+ SponsoredTasksInstruction2[SponsoredTasksInstruction2["Settle"] = 20] = "Settle";
23914
+ SponsoredTasksInstruction2[SponsoredTasksInstruction2["SweepExited"] = 21] = "SweepExited";
24992
23915
  })(SponsoredTasksInstruction || (SponsoredTasksInstruction = {}));
24993
23916
 
24994
23917
  // ../../packages/solana-sponsored-client/dist/generated/errors/sponsoredTasks.js
@@ -25034,6 +23957,9 @@ var SPONSORED_TASKS_ERROR__INVALID_CLUSTER_ID = 6038;
25034
23957
  var SPONSORED_TASKS_ERROR__PAYOUT_SIGNATURE_EXPIRED = 6039;
25035
23958
  var SPONSORED_TASKS_ERROR__INVALID_PAYOUT_NONCE = 6040;
25036
23959
  var SPONSORED_TASKS_ERROR__RESERVATION_NOT_EXPIRED = 6041;
23960
+ var SPONSORED_TASKS_ERROR__VAULT_NOT_EXITED = 6042;
23961
+ var SPONSORED_TASKS_ERROR__DEADLINE_TOO_FAR = 6043;
23962
+ var SPONSORED_TASKS_ERROR__PAYOUT_ACCOUNT_NOT_ASSOCIATED = 6044;
25037
23963
  var sponsoredTasksErrorMessages;
25038
23964
  if (process.env["NODE_ENV"] !== "production") {
25039
23965
  sponsoredTasksErrorMessages = {
@@ -25041,6 +23967,7 @@ if (process.env["NODE_ENV"] !== "production") {
25041
23967
  [SPONSORED_TASKS_ERROR__CLAIM_DELAY_NOT_ELAPSED]: `The settlement's claim delay has not passed`,
25042
23968
  [SPONSORED_TASKS_ERROR__CLAIM_INDEX_OUT_OF_BOUNDS]: `Award leaf index is not below the settlement's leaf count`,
25043
23969
  [SPONSORED_TASKS_ERROR__DEADLINE_IN_PAST]: `Reservation deadline is in the past`,
23970
+ [SPONSORED_TASKS_ERROR__DEADLINE_TOO_FAR]: `Reservation deadline is more than MAX_RESERVATION_SECS from now`,
25044
23971
  [SPONSORED_TASKS_ERROR__EPOCH_MISMATCH]: `Reservation belongs to an earlier vault epoch`,
25045
23972
  [SPONSORED_TASKS_ERROR__INSUFFICIENT_AVAILABLE]: `Reservation exceeds the vault's available balance`,
25046
23973
  [SPONSORED_TASKS_ERROR__INVALID_ADMIN]: `Admin must not be the zero key`,
@@ -25053,7 +23980,7 @@ if (process.env["NODE_ENV"] !== "production") {
25053
23980
  [SPONSORED_TASKS_ERROR__INVALID_PAYOUT_NONCE]: `Payout binding nonce must be below u64::MAX`,
25054
23981
  [SPONSORED_TASKS_ERROR__INVALID_PAYOUT_SIGNATURE]: `Payout binding signature is not from the agent`,
25055
23982
  [SPONSORED_TASKS_ERROR__INVALID_SETTLEMENT_TOTALS]: `Settlement totals do not add up or do not match the root`,
25056
- [SPONSORED_TASKS_ERROR__INVALID_SETTLERS]: `Settler set is empty, too large or has duplicates`,
23983
+ [SPONSORED_TASKS_ERROR__INVALID_SETTLERS]: `Settler set is empty, too large, has duplicates or the zero key`,
25057
23984
  [SPONSORED_TASKS_ERROR__INVALID_THRESHOLD]: `Threshold must be between 1 and the number of settlers`,
25058
23985
  [SPONSORED_TASKS_ERROR__MANAGER_ALLOWANCE_EXCEEDED]: `Reservation exceeds the manager's remaining allowance`,
25059
23986
  [SPONSORED_TASKS_ERROR__MANAGER_CHAIN_MISMATCH]: `Manager is on a different chain than the task`,
@@ -25066,6 +23993,7 @@ if (process.env["NODE_ENV"] !== "production") {
25066
23993
  [SPONSORED_TASKS_ERROR__NOT_SPONSOR]: `Caller is not the vault sponsor`,
25067
23994
  [SPONSORED_TASKS_ERROR__OVERFLOW]: `Arithmetic overflow`,
25068
23995
  [SPONSORED_TASKS_ERROR__PAUSED]: `Program is paused`,
23996
+ [SPONSORED_TASKS_ERROR__PAYOUT_ACCOUNT_NOT_ASSOCIATED]: `Destination is not the payout's associated token account`,
25069
23997
  [SPONSORED_TASKS_ERROR__PAYOUT_NOT_BOUND]: `Worker has no payout binding`,
25070
23998
  [SPONSORED_TASKS_ERROR__PAYOUT_SIGNATURE_EXPIRED]: `Payout binding signature has expired`,
25071
23999
  [SPONSORED_TASKS_ERROR__RESERVATION_NOT_EXPIRED]: `Reservation deadline has not passed`,
@@ -25078,6 +24006,7 @@ if (process.env["NODE_ENV"] !== "production") {
25078
24006
  [SPONSORED_TASKS_ERROR__TRANSFER_AMOUNT_MISMATCH]: `Vault received a different amount than was sent`,
25079
24007
  [SPONSORED_TASKS_ERROR__UNSUPPORTED_MINT_EXTENSION]: `Mint has an extension the vault does not accept`,
25080
24008
  [SPONSORED_TASKS_ERROR__VAULT_NOT_ACTIVE]: `Vault is not active`,
24009
+ [SPONSORED_TASKS_ERROR__VAULT_NOT_EXITED]: `Vault has not exited`,
25081
24010
  [SPONSORED_TASKS_ERROR__ZERO_AMOUNT]: `Amount must be greater than zero`
25082
24011
  };
25083
24012
  }
@@ -25130,6 +24059,18 @@ var CONFIG_INITIALIZED_EVENT_DISCRIMINATOR = new Uint8Array([
25130
24059
  91
25131
24060
  ]);
25132
24061
 
24062
+ // ../../packages/solana-sponsored-client/dist/generated/events/exitedVaultSwept.js
24063
+ var EXITED_VAULT_SWEPT_EVENT_DISCRIMINATOR = new Uint8Array([
24064
+ 253,
24065
+ 50,
24066
+ 228,
24067
+ 175,
24068
+ 185,
24069
+ 60,
24070
+ 9,
24071
+ 133
24072
+ ]);
24073
+
25133
24074
  // ../../packages/solana-sponsored-client/dist/generated/events/feeClaimed.js
25134
24075
  var FEE_CLAIMED_EVENT_DISCRIMINATOR = new Uint8Array([
25135
24076
  202,
@@ -25214,6 +24155,9 @@ var PAYOUT_BOUND_EVENT_DISCRIMINATOR = new Uint8Array([
25214
24155
  31
25215
24156
  ]);
25216
24157
 
24158
+ // ../../packages/solana-sponsored-client/dist/generated/events/reservationDeadlineExtended.js
24159
+ var RESERVATION_DEADLINE_EXTENDED_EVENT_DISCRIMINATOR = new Uint8Array([84, 139, 91, 136, 29, 55, 178, 64]);
24160
+
25217
24161
  // ../../packages/solana-sponsored-client/dist/generated/events/settlementInstalled.js
25218
24162
  var SETTLEMENT_INSTALLED_EVENT_DISCRIMINATOR = new Uint8Array([
25219
24163
  170,
@@ -26097,6 +25041,14 @@ async function configureSolana(opts, solanaChainId) {
26097
25041
  renderFailure(err);
26098
25042
  }
26099
25043
  }
25044
+ async function isChainScopedVault(publicClient, vault) {
25045
+ const version2 = await publicClient.readContract({
25046
+ address: vault,
25047
+ abi: SponsoredTasksVaultV2ABI,
25048
+ functionName: "VAULT_VERSION"
25049
+ });
25050
+ return Number(version2) >= 3;
25051
+ }
26100
25052
  async function configure(opts) {
26101
25053
  const vaultChainId = opts.chainId;
26102
25054
  if (isSolanaChainId(vaultChainId)) return configureSolana(opts, vaultChainId);
@@ -26110,16 +25062,44 @@ async function configure(opts) {
26110
25062
  keystore,
26111
25063
  opts.chainId
26112
25064
  );
25065
+ const vault = opts.vault;
25066
+ const manager = opts.manager;
25067
+ const remote = isSettlerModeChainId(vaultChainId);
25068
+ if (!remote && opts.managerChainId !== void 0 && opts.managerChainId !== vaultChainId) {
25069
+ printError(
25070
+ `--manager-chain-id must be the vault's own chain (${vaultChainId}) for this vault: its tasks are created only on that chain. Leave the option out.`
25071
+ );
25072
+ return;
25073
+ }
25074
+ const managerChainId = opts.managerChainId !== void 0 && opts.managerChainId !== vaultChainId ? opts.managerChainId : void 0;
25075
+ const chainScoped = remote || managerChainId !== void 0 ? await isChainScopedVault(publicClient, vault) : false;
25076
+ if (chainScoped && remote && managerChainId === void 0) {
25077
+ printError(
25078
+ "--manager-chain-id is required for this vault: the chain the manager creates tasks on (base, tempo, 8453 or 4217). Its allowance is spent only by tasks from that chain."
25079
+ );
25080
+ return;
25081
+ }
25082
+ if (!chainScoped && managerChainId !== void 0) {
25083
+ printError(
25084
+ "--manager-chain-id does not apply to this vault: it predates per-chain allowances, so one allowance covers every task chain it serves. Leave the option out."
25085
+ );
25086
+ return;
25087
+ }
26113
25088
  let cap;
26114
25089
  if (opts.cap !== void 0) {
26115
25090
  cap = BigInt(opts.cap);
26116
25091
  } else {
26117
- const current = await publicClient.readContract({
26118
- address: opts.vault,
25092
+ const current = await (managerChainId !== void 0 ? publicClient.readContract({
25093
+ address: vault,
25094
+ abi: SponsoredTasksVaultV2ABI,
25095
+ functionName: "managerAccountForChain",
25096
+ args: [BigInt(managerChainId), manager]
25097
+ }) : publicClient.readContract({
25098
+ address: vault,
26119
25099
  abi: SponsoredTasksVaultV2ABI,
26120
25100
  functionName: "managerAccount",
26121
- args: [opts.manager]
26122
- });
25101
+ args: [manager]
25102
+ }));
26123
25103
  cap = current.reserved + current.spent;
26124
25104
  }
26125
25105
  const { txHash, feePayer } = await writeSponsoredTaskVaultContract({
@@ -26127,15 +25107,18 @@ async function configure(opts) {
26127
25107
  publicClient,
26128
25108
  walletClient,
26129
25109
  relay,
26130
- address: opts.vault,
25110
+ address: vault,
26131
25111
  abi: SponsoredTasksVaultV2ABI,
26132
- functionName: "configureManager",
26133
- args: [opts.manager, cap, opts.active]
25112
+ ...managerChainId !== void 0 ? {
25113
+ functionName: "configureManagerForChain",
25114
+ args: [BigInt(managerChainId), manager, cap, opts.active]
25115
+ } : { functionName: "configureManager", args: [manager, cap, opts.active] }
26134
25116
  });
26135
25117
  printResult({
26136
25118
  txHash,
26137
25119
  ...feePayer ? { feePayer } : {},
26138
25120
  manager: opts.manager,
25121
+ ...managerChainId !== void 0 ? { managerChainId } : {},
26139
25122
  spendCap: cap.toString(),
26140
25123
  active: opts.active
26141
25124
  });
@@ -26149,7 +25132,7 @@ sponsoredTaskManagersCommand.command("add").description("Authorize a manager wit
26149
25132
  chainOption("--chain-id", "vault")
26150
25133
  ).requiredOption("--manager <address>", "Manager EVM address to authorize").requiredOption("--cap <baseUnits>", "Spend cap, in the project token base units").option(
26151
25134
  "--manager-chain-id <chain>",
26152
- "Solana vaults: the chain the manager creates tasks on, by name or id (base, tempo, 8453 or 4217)",
25135
+ "The chain the manager creates tasks on, by name or id (base, tempo, 8453 or 4217): required for a Solana vault and a remote EVM vault from rev031",
26153
25136
  chainOption("--manager-chain-id", "market")
26154
25137
  ).option("--program-id <address>", "Solana vaults: override the cluster's program id").action((opts) => configure({ ...opts, active: true }));
26155
25138
  sponsoredTaskManagersCommand.command("remove").description("Deactivate a manager (does not reclaim tokens already reserved)").requiredOption("--vault <address>", "Vault address (base58 for a Solana vault)").requiredOption(
@@ -26158,7 +25141,7 @@ sponsoredTaskManagersCommand.command("remove").description("Deactivate a manager
26158
25141
  chainOption("--chain-id", "vault")
26159
25142
  ).requiredOption("--manager <address>", "Manager EVM address to deactivate").option(
26160
25143
  "--manager-chain-id <chain>",
26161
- "Solana vaults: the chain the manager creates tasks on, by name or id (base, tempo, 8453 or 4217)",
25144
+ "The chain the manager creates tasks on, by name or id (base, tempo, 8453 or 4217): required for a Solana vault and a remote EVM vault from rev031",
26162
25145
  chainOption("--manager-chain-id", "market")
26163
25146
  ).option("--program-id <address>", "Solana vaults: override the cluster's program id").action((opts) => configure({ ...opts, active: false }));
26164
25147
  sponsoredTaskManagersCommand.command("list").description("List a vault authorized managers").requiredOption("--vault-id <id>", "Vault id").action(async (opts) => {
@@ -26171,16 +25154,16 @@ import { Command as Command116 } from "commander";
26171
25154
  var sponsoredTaskManagedCommand = new Command116("managed").description(
26172
25155
  "List the active Sponsored Task vaults an address can fund tasks from as an active manager (defaults to your wallet)"
26173
25156
  ).option("--address <address>", "Manager address (defaults to your wallet)").option("--limit <n>", "Max vaults to return (1-100)", "50").option("--cursor <vaultId>", "Pagination cursor from a previous nextCursor").action(async (opts) => {
26174
- let address3 = opts.address;
26175
- if (address3 === void 0) {
25157
+ let address2 = opts.address;
25158
+ if (address2 === void 0) {
26176
25159
  try {
26177
- address3 = (await loadKeystore()).walletAddress;
25160
+ address2 = (await loadKeystore()).walletAddress;
26178
25161
  } catch {
26179
25162
  printError("No keystore found. Run `taskmarket init` first, or pass --address.");
26180
25163
  return;
26181
25164
  }
26182
25165
  }
26183
- if (!/^0x[a-fA-F0-9]{40}$/.test(address3)) {
25166
+ if (!/^0x[a-fA-F0-9]{40}$/.test(address2)) {
26184
25167
  printError("Invalid Ethereum address for --address");
26185
25168
  return;
26186
25169
  }
@@ -26192,7 +25175,7 @@ var sponsoredTaskManagedCommand = new Command116("managed").description(
26192
25175
  const params = new URLSearchParams({ limit: String(limit) });
26193
25176
  if (opts.cursor) params.set("cursor", opts.cursor);
26194
25177
  const result = await apiGet(
26195
- `/api/sponsored-task-vaults/managed/${address3.toLowerCase()}?${params.toString()}`
25178
+ `/api/sponsored-task-vaults/managed/${address2.toLowerCase()}?${params.toString()}`
26196
25179
  );
26197
25180
  printResult(result);
26198
25181
  });
@@ -26543,7 +25526,7 @@ async function findEntitlement(vaultId, workerAddress, taskId, options = {}) {
26543
25526
  const entitlements = await apiGet(
26544
25527
  `/api/sponsored-task-vaults/${vaultId}/entitlements?workerAddress=${workerAddress}${query4}`
26545
25528
  );
26546
- const found = taskId ? entitlements.find((e5) => e5.taskId.toLowerCase() === taskId.toLowerCase()) : entitlements[0];
25529
+ const found = taskId ? entitlements.find((e4) => e4.taskId.toLowerCase() === taskId.toLowerCase()) : entitlements[0];
26547
25530
  if (found || !taskId || Date.now() + 3e3 > deadline) return found;
26548
25531
  await sleep4(3e3);
26549
25532
  }
@@ -26669,16 +25652,16 @@ var REWARD_STATES = SponsoredTaskRewardStateSchema.options;
26669
25652
  var CLAIM_STATUSES = SponsoredTaskWorkerRewardClaimStatusSchema.options;
26670
25653
  var sponsoredTaskRewardsCommand = new Command126("rewards").description("List Sponsored Task rewards across every vault (defaults to your wallet)").option("--address <address>", "Worker address (defaults to your wallet)").option("--state <state>", `Reward state: ${REWARD_STATES.join(", ")}`).option("--claim-status <status>", `Claim status: ${CLAIM_STATUSES.join(", ")}`).option("--limit <n>", "Max rewards to return (1-100)", "50").option("--cursor <cursor>", "Pagination cursor from a previous nextCursor").action(
26671
25654
  async (opts) => {
26672
- let address3 = opts.address;
26673
- if (address3 === void 0) {
25655
+ let address2 = opts.address;
25656
+ if (address2 === void 0) {
26674
25657
  try {
26675
- address3 = (await loadKeystore()).walletAddress;
25658
+ address2 = (await loadKeystore()).walletAddress;
26676
25659
  } catch {
26677
25660
  printError("No keystore found. Run `taskmarket init` first, or pass --address.");
26678
25661
  return;
26679
25662
  }
26680
25663
  }
26681
- if (!/^0x[a-fA-F0-9]{40}$/.test(address3)) {
25664
+ if (!/^0x[a-fA-F0-9]{40}$/.test(address2)) {
26682
25665
  printError("Invalid Ethereum address for --address");
26683
25666
  return;
26684
25667
  }
@@ -26700,7 +25683,7 @@ var sponsoredTaskRewardsCommand = new Command126("rewards").description("List Sp
26700
25683
  if (opts.claimStatus) params.set("claimStatus", opts.claimStatus);
26701
25684
  if (opts.cursor) params.set("cursor", opts.cursor);
26702
25685
  const result = await apiGet(
26703
- `/api/sponsored-task-rewards/workers/${address3.toLowerCase()}?${params.toString()}`
25686
+ `/api/sponsored-task-rewards/workers/${address2.toLowerCase()}?${params.toString()}`
26704
25687
  );
26705
25688
  printResult(withChainNames(result));
26706
25689
  }
@@ -27784,8 +26767,82 @@ var projectFundCommand = new Command138("fund").description(
27784
26767
  });
27785
26768
 
27786
26769
  // src/commands/project/grant.ts
26770
+ import { Command as Command140 } from "commander";
26771
+
26772
+ // src/commands/project/limits.ts
27787
26773
  import { Command as Command139 } from "commander";
27788
- function grantBody(projectId, opts) {
26774
+ function limitFields(opts, now = /* @__PURE__ */ new Date()) {
26775
+ const body = {};
26776
+ if (opts.expires !== void 0) {
26777
+ const at = parseEndsAt(opts.expires, now, "--expires");
26778
+ if (typeof at !== "string") return at;
26779
+ body.expiresAt = Math.floor(new Date(at).getTime() / 1e3);
26780
+ }
26781
+ if (opts.modes !== void 0) {
26782
+ const modes = opts.modes.split(",").map((m) => m.trim().toLowerCase());
26783
+ const unknown = modes.filter((m) => !GRANT_MODE_NAMES.includes(m));
26784
+ if (modes.length === 0 || unknown.length > 0) {
26785
+ return { error: `--modes takes a comma-separated list of: ${GRANT_MODE_NAMES.join(", ")}` };
26786
+ }
26787
+ body.allowedModes = [...new Set(modes)];
26788
+ }
26789
+ if (opts.maxReward !== void 0) {
26790
+ const max = parseAmount(opts.maxReward, "--max-reward");
26791
+ if (typeof max !== "string") return max;
26792
+ if (BigInt(max) <= 0n) return { error: "--max-reward must be greater than zero" };
26793
+ body.maxRewardPerTask = max;
26794
+ }
26795
+ if (opts.periodBudget === void 0 !== (opts.period === void 0)) {
26796
+ return { error: "--period-budget and --period go together: pass both or neither" };
26797
+ }
26798
+ if (opts.periodBudget !== void 0 && opts.period !== void 0) {
26799
+ if (opts.period !== "weekly" && opts.period !== "monthly") {
26800
+ return { error: "--period must be weekly or monthly" };
26801
+ }
26802
+ const periodCap = parseAmount(opts.periodBudget, "--period-budget");
26803
+ if (typeof periodCap !== "string") return periodCap;
26804
+ if (BigInt(periodCap) <= 0n) return { error: "--period-budget must be greater than zero" };
26805
+ body.periodCap = periodCap;
26806
+ body.period = opts.period;
26807
+ }
26808
+ return body;
26809
+ }
26810
+ function limitsBody(projectId, opts, now = /* @__PURE__ */ new Date()) {
26811
+ if (!ADDRESS.test(opts.operator)) {
26812
+ return { error: "--operator must be a wallet address (0x + 40 hex chars)" };
26813
+ }
26814
+ const fields = limitFields(opts, now);
26815
+ if ("error" in fields) return fields;
26816
+ return { projectId, operator: opts.operator, ...fields };
26817
+ }
26818
+ function withLimitFlags(command) {
26819
+ return command.option(
26820
+ "--expires <time>",
26821
+ "The operator cannot draw after this time: ISO 8601 or a duration such as 30d"
26822
+ ).option(
26823
+ "--modes <list>",
26824
+ `Task modes the operator may create, comma separated (${GRANT_MODE_NAMES.join(", ")}); default every mode`
26825
+ ).option(
26826
+ "--max-reward <amount>",
26827
+ "The most one task may hold from the budget (reward plus evaluator stake), in the payment token"
26828
+ ).option("--period-budget <amount>", "The most the operator may draw per period. Needs --period").option("--period <period>", "weekly (7 days) or monthly (30 days). Needs --period-budget");
26829
+ }
26830
+ var projectLimitsCommand = withLimitFlags(
26831
+ new Command139("limits").description(
26832
+ "Advanced. Set all of an operator's limits as the project owner, stated whole: a flag you leave out is no limit of that kind (costs 0.001 in the payment token; contract revision 29 or later). The limits bound the operator on top of its cap: an expiry, the task modes it may create, the most one task may hold, and a budget per week or month. From contract revision 31 the operator accepts the limits with the terms, so on a pending grant it must accept again after a change. For the platform runner, `project automations on` takes --expires, --period-budget and --period"
26833
+ ).argument("<projectId>", "Project id").requiredOption("--operator <address>", "The operator whose limits to set")
26834
+ ).action(async (id, opts) => {
26835
+ const projectId = parseProjectId(id);
26836
+ if (typeof projectId !== "number") return void printError(projectId.error);
26837
+ const body = limitsBody(projectId, opts);
26838
+ if ("error" in body) return void printError(String(body.error));
26839
+ await postProjectWrite(`/api/projects/${projectId}/grants/${opts.operator}/limits`, body, {
26840
+ maxAmount: ACTION_FEE_MAX_AMOUNT
26841
+ });
26842
+ });
26843
+
26844
+ // src/commands/project/grant.ts
26845
+ function grantBody(projectId, opts, now = /* @__PURE__ */ new Date()) {
27789
26846
  if (!ADDRESS.test(opts.operator)) {
27790
26847
  return { error: "--operator must be a wallet address (0x + 40 hex chars)" };
27791
26848
  }
@@ -27798,30 +26855,35 @@ function grantBody(projectId, opts) {
27798
26855
  if (typeof parsed !== "string") return parsed;
27799
26856
  cap = parsed;
27800
26857
  }
26858
+ const limits = limitFields(opts, now);
26859
+ if ("error" in limits) return limits;
27801
26860
  return {
27802
26861
  projectId,
27803
26862
  operator: opts.operator,
27804
26863
  cap,
27805
26864
  requesterOfRecord: opts.requesterOfRecord,
27806
26865
  ownerOverride: opts.ownerOverride,
27807
- revokeRemovesControl: opts.revokeRemovesControl
26866
+ revokeRemovesControl: opts.revokeRemovesControl,
26867
+ ...limits
27808
26868
  };
27809
26869
  }
27810
- var projectGrantCommand = new Command139("grant").description(
27811
- "Grant a wallet (an agent or a person) the right to create tasks from the project's budget under the terms below. It can spend only after it accepts, which freezes the terms; until then a new grant replaces them, and a revoked operator can be granted again, back to pending (costs 0.001 in the payment token)"
27812
- ).argument("<projectId>", "Project id").requiredOption("--operator <address>", "The wallet granted the right to spend the budget").option(
27813
- "--cap <amount>",
27814
- "The most the operator's tasks may draw from the budget in total, net of refunds (payouts keep counting, refunds free it), in the payment token (default: no cap beyond the budget)"
27815
- ).option(
27816
- "--requester-of-record <who>",
27817
- "Who is task.requester on the operator's tasks, whom ratings and reputation follow: owner or operator",
27818
- "owner"
27819
- ).option(
27820
- "--no-owner-override",
27821
- "Only the operator acts on its tasks; by default the owner may also accept, reject or cancel them"
27822
- ).option(
27823
- "--no-revoke-removes-control",
27824
- "On revoke, let the operator finish the tasks it created instead of passing them to the owner"
26870
+ var projectGrantCommand = withLimitFlags(
26871
+ new Command140("grant").description(
26872
+ "Grant a wallet (an agent or a person) the right to create tasks from the project's budget under the terms and limits below; a limit flag you leave out is no limit of that kind. It can spend only after it accepts, which freezes the terms (from contract revision 31 the operator accepts the limits with them); until then a new grant replaces them, and a revoked operator can be granted again, back to pending (costs 0.001 in the payment token; limits need contract revision 29 or later)"
26873
+ ).argument("<projectId>", "Project id").requiredOption("--operator <address>", "The wallet granted the right to spend the budget").option(
26874
+ "--cap <amount>",
26875
+ "The most the operator's tasks may draw from the budget in total, net of refunds (payouts keep counting, refunds free it), in the payment token (default: no cap beyond the budget)"
26876
+ ).option(
26877
+ "--requester-of-record <who>",
26878
+ "Who is task.requester on the operator's tasks, whom ratings and reputation follow: owner or operator",
26879
+ "owner"
26880
+ ).option(
26881
+ "--no-owner-override",
26882
+ "Only the operator acts on its tasks; by default the owner may also accept, reject or cancel them"
26883
+ ).option(
26884
+ "--no-revoke-removes-control",
26885
+ "On revoke, let the operator finish the tasks it created instead of passing them to the owner"
26886
+ )
27825
26887
  ).action(async (id, opts) => {
27826
26888
  const projectId = parseProjectId(id);
27827
26889
  if (typeof projectId !== "number") return void printError(projectId.error);
@@ -27833,7 +26895,7 @@ var projectGrantCommand = new Command139("grant").description(
27833
26895
  });
27834
26896
 
27835
26897
  // src/commands/project/review.ts
27836
- import { Command as Command140 } from "commander";
26898
+ import { Command as Command141 } from "commander";
27837
26899
  function reviewEvaluator(opts) {
27838
26900
  if (opts.evaluator !== void 0 && opts.off) {
27839
26901
  return { error: "Pass --evaluator <address> or --off, not both" };
@@ -27848,7 +26910,7 @@ function reviewEvaluator(opts) {
27848
26910
  }
27849
26911
  return opts.evaluator;
27850
26912
  }
27851
- var projectReviewCommand = new Command140("review").description(
26913
+ var projectReviewCommand = new Command141("review").description(
27852
26914
  "Read, set or clear the project's review default, as its owner. With an evaluator set, every task created through the API from the project gets that evaluator, and a project task that names a different one is refused. Enforced by the API, not the contract. Setting or clearing costs 0.001 in the payment token; reading is free"
27853
26915
  ).argument("<projectId>", "Project id").option("--evaluator <address>", "The evaluator every project task gets").option("--off", "Turn the review default off: each task's requester reviews it again").action(async (id, opts) => {
27854
26916
  const projectId = parseProjectId(id);
@@ -27890,8 +26952,8 @@ async function ownerEvaluatorWarnings(evaluator) {
27890
26952
  }
27891
26953
 
27892
26954
  // src/commands/project/raise-cap.ts
27893
- import { Command as Command141 } from "commander";
27894
- var projectRaiseCapCommand = new Command141("raise-cap").description(
26955
+ import { Command as Command142 } from "commander";
26956
+ var projectRaiseCapCommand = new Command142("raise-cap").description(
27895
26957
  "Advanced. Raise any operator's spending cap in place, as the project owner (costs 0.001 in the payment token). For the platform runner use `project automations on --cap <higher amount>`, which takes the same path. The new cap must be above the current one, which must be set; a cap is never lowered, and a revoked operator is granted again instead"
27896
26958
  ).argument("<projectId>", "Project id").requiredOption("--operator <address>", "The operator whose cap to raise").requiredOption("--cap <amount>", "The new cap in the payment token, above the current cap").action(async (id, opts) => {
27897
26959
  const projectId = parseProjectId(id);
@@ -27909,8 +26971,8 @@ var projectRaiseCapCommand = new Command141("raise-cap").description(
27909
26971
  });
27910
26972
 
27911
26973
  // src/commands/project/lower-cap.ts
27912
- import { Command as Command142 } from "commander";
27913
- var projectLowerCapCommand = new Command142("lower-cap").description(
26974
+ import { Command as Command143 } from "commander";
26975
+ var projectLowerCapCommand = new Command143("lower-cap").description(
27914
26976
  "Advanced. Lower an operator's lifetime spending cap in place, as the project owner (costs 0.001 in the payment token; contract revision 29 or later). The new cap must be below the current one (any cap lowers a grant that has none) and at least what the operator already draws (committed). To raise a cap use `project raise-cap`; for the platform runner, `project automations on --cap`"
27915
26977
  ).argument("<projectId>", "Project id").requiredOption("--operator <address>", "The operator whose cap to lower").requiredOption(
27916
26978
  "--cap <amount>",
@@ -27931,68 +26993,6 @@ var projectLowerCapCommand = new Command142("lower-cap").description(
27931
26993
  );
27932
26994
  });
27933
26995
 
27934
- // src/commands/project/limits.ts
27935
- import { Command as Command143 } from "commander";
27936
- function limitsBody(projectId, opts, now = /* @__PURE__ */ new Date()) {
27937
- if (!ADDRESS.test(opts.operator)) {
27938
- return { error: "--operator must be a wallet address (0x + 40 hex chars)" };
27939
- }
27940
- const body = { projectId, operator: opts.operator };
27941
- if (opts.expires !== void 0) {
27942
- const at = parseEndsAt(opts.expires, now, "--expires");
27943
- if (typeof at !== "string") return at;
27944
- body.expiresAt = Math.floor(new Date(at).getTime() / 1e3);
27945
- }
27946
- if (opts.modes !== void 0) {
27947
- const modes = opts.modes.split(",").map((m) => m.trim().toLowerCase());
27948
- const unknown = modes.filter((m) => !GRANT_MODE_NAMES.includes(m));
27949
- if (modes.length === 0 || unknown.length > 0) {
27950
- return { error: `--modes takes a comma-separated list of: ${GRANT_MODE_NAMES.join(", ")}` };
27951
- }
27952
- body.allowedModes = [...new Set(modes)];
27953
- }
27954
- if (opts.maxReward !== void 0) {
27955
- const max = parseAmount(opts.maxReward, "--max-reward");
27956
- if (typeof max !== "string") return max;
27957
- if (BigInt(max) <= 0n) return { error: "--max-reward must be greater than zero" };
27958
- body.maxRewardPerTask = max;
27959
- }
27960
- if (opts.periodBudget === void 0 !== (opts.period === void 0)) {
27961
- return { error: "--period-budget and --period go together: pass both or neither" };
27962
- }
27963
- if (opts.periodBudget !== void 0 && opts.period !== void 0) {
27964
- if (opts.period !== "weekly" && opts.period !== "monthly") {
27965
- return { error: "--period must be weekly or monthly" };
27966
- }
27967
- const periodCap = parseAmount(opts.periodBudget, "--period-budget");
27968
- if (typeof periodCap !== "string") return periodCap;
27969
- if (BigInt(periodCap) <= 0n) return { error: "--period-budget must be greater than zero" };
27970
- body.periodCap = periodCap;
27971
- body.period = opts.period;
27972
- }
27973
- return body;
27974
- }
27975
- var projectLimitsCommand = new Command143("limits").description(
27976
- "Advanced. Set all of an operator's limits as the project owner, stated whole: a flag you leave out is no limit of that kind (costs 0.001 in the payment token; contract revision 29 or later). The limits bound the operator on top of its cap: an expiry, the task modes it may create, the most one task may hold, and a budget per week or month. For the platform runner, `project automations on` takes --expires, --period-budget and --period"
27977
- ).argument("<projectId>", "Project id").requiredOption("--operator <address>", "The operator whose limits to set").option(
27978
- "--expires <time>",
27979
- "The operator cannot draw after this time: ISO 8601 or a duration such as 30d"
27980
- ).option(
27981
- "--modes <list>",
27982
- `Task modes the operator may create, comma separated (${GRANT_MODE_NAMES.join(", ")}); default every mode`
27983
- ).option(
27984
- "--max-reward <amount>",
27985
- "The most one task may hold from the budget (reward plus evaluator stake), in the payment token"
27986
- ).option("--period-budget <amount>", "The most the operator may draw per period. Needs --period").option("--period <period>", "weekly (7 days) or monthly (30 days). Needs --period-budget").action(async (id, opts) => {
27987
- const projectId = parseProjectId(id);
27988
- if (typeof projectId !== "number") return void printError(projectId.error);
27989
- const body = limitsBody(projectId, opts);
27990
- if ("error" in body) return void printError(String(body.error));
27991
- await postProjectWrite(`/api/projects/${projectId}/grants/${opts.operator}/limits`, body, {
27992
- maxAmount: ACTION_FEE_MAX_AMOUNT
27993
- });
27994
- });
27995
-
27996
26996
  // src/commands/project/revoke.ts
27997
26997
  import { Command as Command144 } from "commander";
27998
26998
  var projectRevokeCommand = new Command144("revoke").description(
@@ -29054,18 +28054,18 @@ var projectListCommand = new Command149("list").description(
29054
28054
  if (before !== void 0) funding.set("before", String(before));
29055
28055
  return void printResult(await apiGet(withChainId(`/api/projects?${funding.toString()}`)));
29056
28056
  }
29057
- let address3 = opts.address;
29058
- if (address3 === void 0) {
28057
+ let address2 = opts.address;
28058
+ if (address2 === void 0) {
29059
28059
  try {
29060
- address3 = (await loadKeystore()).walletAddress;
28060
+ address2 = (await loadKeystore()).walletAddress;
29061
28061
  } catch {
29062
28062
  return void printError(
29063
28063
  "No keystore found. Run `taskmarket init` first, or pass --address."
29064
28064
  );
29065
28065
  }
29066
28066
  }
29067
- if (!ADDRESS.test(address3)) return void printError("Invalid Ethereum address for --address");
29068
- const params = new URLSearchParams({ address: address3, role: opts.role });
28067
+ if (!ADDRESS.test(address2)) return void printError("Invalid Ethereum address for --address");
28068
+ const params = new URLSearchParams({ address: address2, role: opts.role });
29069
28069
  if (opts.open) params.set("status", "open");
29070
28070
  if (opts.finished) params.set("status", "finished");
29071
28071
  if (opts.limit !== void 0) params.set("limit", opts.limit.trim());
@@ -29909,9 +28909,9 @@ var listCommand10 = new Command154("list").description(
29909
28909
  );
29910
28910
  var showCommand8 = new Command154("show").description(
29911
28911
  "Show one hook on the selected --network: its registry listing, or its onchain observation marked unlisted"
29912
- ).argument("<address>", "Hook contract address").action(async (address3) => {
28912
+ ).argument("<address>", "Hook contract address").action(async (address2) => {
29913
28913
  try {
29914
- const input = parseInput(HookGetInputSchema, { address: address3 });
28914
+ const input = parseInput(HookGetInputSchema, { address: address2 });
29915
28915
  const registry = await fetchHookRegistry(input.address.toLowerCase());
29916
28916
  const wanted = input.address.toLowerCase();
29917
28917
  const listed = registry.listed.find((hook) => hook.address.toLowerCase() === wanted);
@@ -29932,9 +28932,9 @@ var encodeConfigCommand = new Command154("encode-config").description(
29932
28932
  ).argument("<address>", "Hook contract address").requiredOption(
29933
28933
  "--values <json>",
29934
28934
  "The values as a JSON array in schema order, or a JSON object keyed by field name"
29935
- ).action(async (address3, opts) => {
28935
+ ).action(async (address2, opts) => {
29936
28936
  try {
29937
- const input = parseInput(HookGetInputSchema, { address: address3 });
28937
+ const input = parseInput(HookGetInputSchema, { address: address2 });
29938
28938
  const wanted = input.address.toLowerCase();
29939
28939
  const registry = await fetchHookRegistry(wanted);
29940
28940
  const entry = registry.listed.find((hook) => hook.address.toLowerCase() === wanted);