@lucid-agents/taskmarket 1.50.0 → 1.52.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-SXHSD3WO.js → api-Z62WOOLX.js} +2 -2
  3. package/dist/{channels-4YOMV7R7.js → channels-GBQLRNED.js} +4 -4
  4. package/dist/{chunk-V5S4LCIE.js → chunk-523X35HE.js} +4 -4
  5. package/dist/{chunk-6VZBAHQC.js → chunk-6UDGOZHP.js} +3 -3
  6. package/dist/{chunk-C7557KRB.js → chunk-G4MAYAZW.js} +13 -25
  7. package/dist/{chunk-EJ7KUYME.js → chunk-JAFX6DHV.js} +3725 -2926
  8. package/dist/{chunk-EYHXTVYK.js → chunk-K3Y73YWH.js} +2 -2
  9. package/dist/{chunk-M5WTLXDY.js → chunk-KU66VTU6.js} +1 -1
  10. package/dist/{chunk-PZI3QQO4.js → chunk-LZ2P3FIL.js} +5 -5
  11. package/dist/{chunk-CGUFHUIV.js → chunk-N5L4URHF.js} +1 -1
  12. package/dist/{chunk-FGW2NNPQ.js → chunk-PXQP62WF.js} +3 -3
  13. package/dist/{chunk-MY5CD4PT.js → chunk-QSOEZINA.js} +8 -8
  14. package/dist/{chunk-YBSZTSJE.js → chunk-RMK5EAPR.js} +1 -1
  15. package/dist/{chunk-EVCG557X.js → chunk-XREEFYEQ.js} +6 -2
  16. package/dist/{doctor-FACAMASV.js → doctor-3LW4N6KW.js} +9 -9
  17. package/dist/index.js +1964 -300
  18. package/dist/{launch-K5666QYB.js → launch-2YOUARKA.js} +11 -11
  19. package/dist/pi-extensions/xgate.cjs +19 -10
  20. package/dist/{read-auth-EFE6NQFG.js → read-auth-IBCYKPKD.js} +3 -3
  21. package/dist/{reconcile-Q4MJXXR3.js → reconcile-7DVTUPJ6.js} +4 -4
  22. package/dist/{status-YKFKGTMQ.js → status-3GNXUWOL.js} +9 -9
  23. package/dist/{sync-pull-AN2M344W.js → sync-pull-MIEB5XAF.js} +4 -4
  24. package/dist/{task-access-grants-MN5WXHHQ.js → task-access-grants-5B3CSCP4.js} +2 -2
  25. package/package.json +3 -2
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ import {
14
14
  listWorkerSubmissions,
15
15
  submitTaskFiles,
16
16
  taskRequirementsOf
17
- } from "./chunk-MY5CD4PT.js";
17
+ } from "./chunk-QSOEZINA.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-V5S4LCIE.js";
46
+ } from "./chunk-523X35HE.js";
47
47
  import {
48
48
  signReadAuth
49
- } from "./chunk-EYHXTVYK.js";
49
+ } from "./chunk-K3Y73YWH.js";
50
50
  import {
51
51
  saveTaskAccessGrant,
52
52
  taskAccessGrantHeaders
53
- } from "./chunk-M5WTLXDY.js";
53
+ } from "./chunk-KU66VTU6.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-C7557KRB.js";
72
+ } from "./chunk-G4MAYAZW.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-EVCG557X.js";
138
+ } from "./chunk-XREEFYEQ.js";
139
139
  import {
140
140
  AGENT_AVATAR_MAX_BYTES,
141
141
  AGENT_HIRES_ROLES,
@@ -154,6 +154,7 @@ import {
154
154
  AgentListingSchema,
155
155
  AgentMessageEnvelopeSchema,
156
156
  AgentServiceRecordsResponseSchema,
157
+ AgentShopfrontPublicSchema,
157
158
  AgentTimeSeriesInputSchema,
158
159
  AgentUserSkillArchiveWriteSchema,
159
160
  AgentUserSkillBundleWriteSchema,
@@ -183,6 +184,7 @@ import {
183
184
  HIRE_LISTING_HIDDEN,
184
185
  HIRE_MAX_ACCEPT_WINDOW_SECS,
185
186
  HIRE_MIN_ACCEPT_WINDOW_SECS,
187
+ HIRE_OWNER_CONFIRMS_NOTICE,
186
188
  HIRE_SERVICE_ID_MAX_LENGTH,
187
189
  HOOK_BIT_FEE,
188
190
  HOOK_BIT_ON_CALL,
@@ -234,12 +236,16 @@ import {
234
236
  RejectOutcome,
235
237
  RelayBridgeFundingConfigOutputSchema,
236
238
  RelayBridgeRouteIdSchema,
239
+ SERVICE_HIRE_ACCEPT_POLICIES,
240
+ SHOP_HANDLE_REGEX,
237
241
  SOLANA_CHAIN_IDS,
238
242
  SPONSORED_VAULT_7702,
239
243
  STANDARD_X402_ACTION_AMOUNT,
240
244
  SUGGESTION_PROPOSAL_STATUSES,
241
245
  SUGGESTION_SCHEDULE_MAX_TASKS_PER_RUN,
246
+ ServiceHireAcceptPolicySchema,
242
247
  SetMarketEventPreferenceInputSchema,
248
+ ShopHandleResolveResultSchema,
243
249
  SponsoredTaskRewardStateSchema,
244
250
  SponsoredTaskWorkerRewardClaimStatusSchema,
245
251
  SubmissionReviewAssessmentInputSchema,
@@ -370,7 +376,9 @@ import {
370
376
  matchesAnyGlob,
371
377
  needsYouKindForIntent,
372
378
  normalizeReferenceCode,
379
+ normalizeShopHandle,
373
380
  normalizeWorkflowTemplateTags,
381
+ ownerConfirmsHire,
374
382
  parseIsoDurationSeconds,
375
383
  parseScheduleCadence,
376
384
  paymentTokenSymbol,
@@ -409,7 +417,7 @@ import {
409
417
  vaultCallGasLimit7702,
410
418
  verifiersUnsupportedOnChain,
411
419
  viemChainFor
412
- } from "./chunk-EJ7KUYME.js";
420
+ } from "./chunk-JAFX6DHV.js";
413
421
  import "./chunk-S7SJMJ2I.js";
414
422
 
415
423
  // src/index.ts
@@ -668,16 +676,16 @@ function recoverableFailure(message, status) {
668
676
  const quoted = /"amount":"(\d+)"/.exec(message)?.[1];
669
677
  const required = quoted !== void 0 ? BigInt(quoted) : void 0;
670
678
  const chainId = selectedNetworkOrUndefined()?.chainId;
671
- let address2;
679
+ let address3;
672
680
  try {
673
681
  const keystore = JSON.parse(fs2.readFileSync(getKeystorePath(), "utf8"));
674
- if (typeof keystore.walletAddress === "string") address2 = keystore.walletAddress;
682
+ if (typeof keystore.walletAddress === "string") address3 = keystore.walletAddress;
675
683
  } catch {
676
684
  }
677
685
  return {
678
686
  code: "insufficient_funds",
679
687
  next: nextForInsufficientFunds(
680
- address2 !== void 0 && chainId !== void 0 ? { address: address2, chainId } : void 0,
688
+ address3 !== void 0 && chainId !== void 0 ? { address: address3, chainId } : void 0,
681
689
  required
682
690
  ),
683
691
  ...quoted !== void 0 ? { required: { baseUnits: quoted } } : {}
@@ -771,10 +779,10 @@ function agentIdForChain(keystore, chainId) {
771
779
  function withAgentIdForChain(keystore, chainId, agentId) {
772
780
  return { ...keystore, agentIds: { ...keystore.agentIds, [String(chainId)]: agentId } };
773
781
  }
774
- async function lookupAgentId(address2, chainId = selectedNetwork().chainId) {
782
+ async function lookupAgentId(address3, chainId = selectedNetwork().chainId) {
775
783
  try {
776
784
  const res = await fetch(
777
- `${apiUrl()}/api/identity/status?address=${address2}&chainId=${chainId}`
785
+ `${apiUrl()}/api/identity/status?address=${address3}&chainId=${chainId}`
778
786
  );
779
787
  if (!res.ok) return null;
780
788
  const data = await res.json();
@@ -783,12 +791,12 @@ async function lookupAgentId(address2, chainId = selectedNetwork().chainId) {
783
791
  return null;
784
792
  }
785
793
  }
786
- async function pollAgentId(address2, maxWaitMs = 6e4) {
794
+ async function pollAgentId(address3, maxWaitMs = 6e4) {
787
795
  const interval = 3e3;
788
796
  const deadline = Date.now() + maxWaitMs;
789
797
  while (Date.now() < deadline) {
790
798
  await new Promise((r) => setTimeout(r, interval));
791
- const agentId = await lookupAgentId(address2);
799
+ const agentId = await lookupAgentId(address3);
792
800
  if (agentId) return agentId;
793
801
  }
794
802
  return null;
@@ -1867,11 +1875,11 @@ function getErrorMessage(code, context = {}) {
1867
1875
  return `${decodingAdviceMessage}\``;
1868
1876
  }
1869
1877
  }
1870
- function isSolanaError(e4, code) {
1871
- const isSolanaError2 = e4 instanceof Error && e4.name === "SolanaError";
1872
- if (isSolanaError2) {
1878
+ function isSolanaError(e5, code) {
1879
+ const isSolanaError22 = e5 instanceof Error && e5.name === "SolanaError";
1880
+ if (isSolanaError22) {
1873
1881
  if (code !== void 0) {
1874
- return e4.context.__code === code;
1882
+ return e5.context.__code === code;
1875
1883
  }
1876
1884
  return true;
1877
1885
  }
@@ -2428,10 +2436,10 @@ function decodeAccount(encodedAccount, decoder) {
2428
2436
  });
2429
2437
  }
2430
2438
  }
2431
- function parseBase64RpcAccount(address2, rpcAccount) {
2432
- if (!rpcAccount) return Object.freeze({ address: address2, exists: false });
2439
+ function parseBase64RpcAccount(address3, rpcAccount) {
2440
+ if (!rpcAccount) return Object.freeze({ address: address3, exists: false });
2433
2441
  const data = getBase64Encoder().encode(rpcAccount.data[0]);
2434
- return Object.freeze({ ...parseBaseAccount(rpcAccount), address: address2, data, exists: true });
2442
+ return Object.freeze({ ...parseBaseAccount(rpcAccount), address: address3, data, exists: true });
2435
2443
  }
2436
2444
  function parseBaseAccount(rpcAccount) {
2437
2445
  return Object.freeze({
@@ -2441,10 +2449,10 @@ function parseBaseAccount(rpcAccount) {
2441
2449
  space: rpcAccount.space
2442
2450
  });
2443
2451
  }
2444
- async function fetchEncodedAccount(rpc, address2, config = {}) {
2452
+ async function fetchEncodedAccount(rpc, address3, config = {}) {
2445
2453
  const { abortSignal, ...rpcConfig } = config;
2446
- const response = await rpc.getAccountInfo(address2, { ...rpcConfig, encoding: "base64" }).send({ abortSignal });
2447
- return parseBase64RpcAccount(address2, response.value);
2454
+ const response = await rpc.getAccountInfo(address3, { ...rpcConfig, encoding: "base64" }).send({ abortSignal });
2455
+ return parseBase64RpcAccount(address3, response.value);
2448
2456
  }
2449
2457
 
2450
2458
  // ../../node_modules/.pnpm/@solana+assertions@8.4.0_typescript@5.7.3/node_modules/@solana/assertions/dist/index.node.mjs
@@ -2694,16 +2702,16 @@ async function getProgramDerivedAddress({
2694
2702
  let bumpSeed = 255;
2695
2703
  while (bumpSeed > 0) {
2696
2704
  try {
2697
- const address2 = await createProgramDerivedAddress({
2705
+ const address22 = await createProgramDerivedAddress({
2698
2706
  programAddress,
2699
2707
  seeds: [...seeds, new Uint8Array([bumpSeed])]
2700
2708
  });
2701
- return [address2, bumpSeed];
2702
- } catch (e4) {
2703
- if (isSolanaError(e4, SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE)) {
2709
+ return [address22, bumpSeed];
2710
+ } catch (e5) {
2711
+ if (isSolanaError(e5, SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE)) {
2704
2712
  bumpSeed--;
2705
2713
  } else {
2706
- throw e4;
2714
+ throw e5;
2707
2715
  }
2708
2716
  }
2709
2717
  }
@@ -3224,16 +3232,16 @@ function pipe(init, ...fns) {
3224
3232
  }
3225
3233
 
3226
3234
  // ../../node_modules/.pnpm/@solana+instructions@8.4.0_typescript@5.7.3/node_modules/@solana/instructions/dist/index.node.mjs
3227
- var AccountRole = /* @__PURE__ */ ((AccountRole2) => {
3228
- AccountRole2[AccountRole2["WRITABLE_SIGNER"] = /* 3 */
3235
+ var AccountRole = /* @__PURE__ */ ((AccountRole22) => {
3236
+ AccountRole22[AccountRole22["WRITABLE_SIGNER"] = /* 3 */
3229
3237
  3] = "WRITABLE_SIGNER";
3230
- AccountRole2[AccountRole2["READONLY_SIGNER"] = /* 2 */
3238
+ AccountRole22[AccountRole22["READONLY_SIGNER"] = /* 2 */
3231
3239
  2] = "READONLY_SIGNER";
3232
- AccountRole2[AccountRole2["WRITABLE"] = /* 1 */
3240
+ AccountRole22[AccountRole22["WRITABLE"] = /* 1 */
3233
3241
  1] = "WRITABLE";
3234
- AccountRole2[AccountRole2["READONLY"] = /* 0 */
3242
+ AccountRole22[AccountRole22["READONLY"] = /* 0 */
3235
3243
  0] = "READONLY";
3236
- return AccountRole2;
3244
+ return AccountRole22;
3237
3245
  })(AccountRole || {});
3238
3246
  var IS_SIGNER_BITMASK = 2;
3239
3247
  var IS_WRITABLE_BITMASK = 1;
@@ -3523,8 +3531,8 @@ function getCompiledTransactionMessageEncoder() {
3523
3531
  }
3524
3532
  );
3525
3533
  }
3526
- function upsert(addressMap, address2, update) {
3527
- addressMap[address2] = update(addressMap[address2] ?? { role: AccountRole.READONLY });
3534
+ function upsert(addressMap, address3, update) {
3535
+ addressMap[address3] = update(addressMap[address3] ?? { role: AccountRole.READONLY });
3528
3536
  }
3529
3537
  var TYPE2 = /* @__PURE__ */ Symbol("AddressMapTypeProperty");
3530
3538
  function getAddressMapFromInstructions(feePayer, instructions) {
@@ -3638,8 +3646,8 @@ function getOrderedAccountsFromAddressMap(addressMap) {
3638
3646
  }
3639
3647
  addressComparator ||= getAddressComparator();
3640
3648
  return addressComparator(leftAddress, rightAddress);
3641
- }).map(([address2, addressMeta]) => ({
3642
- address: address2,
3649
+ }).map(([address3, addressMeta]) => ({
3650
+ address: address3,
3643
3651
  ...addressMeta
3644
3652
  }));
3645
3653
  return orderedAccounts;
@@ -3680,7 +3688,7 @@ function getCompiledInstructions(instructions, orderedAccounts) {
3680
3688
  return instructions.map(({ accounts, data, programAddress }) => {
3681
3689
  return {
3682
3690
  programAddressIndex: accountIndex[programAddress],
3683
- ...accounts ? { accountIndices: accounts.map(({ address: address2 }) => accountIndex[address2]) } : null,
3691
+ ...accounts ? { accountIndices: accounts.map(({ address: address3 }) => accountIndex[address3]) } : null,
3684
3692
  ...data ? { data } : null
3685
3693
  };
3686
3694
  });
@@ -3737,8 +3745,8 @@ function compileTransactionMessage(transactionMessage) {
3737
3745
  version: transactionMessage.version
3738
3746
  };
3739
3747
  }
3740
- function upsert2(addressMap, address2, update) {
3741
- addressMap[address2] = update(addressMap[address2] ?? { role: AccountRole.READONLY });
3748
+ function upsert2(addressMap, address3, update) {
3749
+ addressMap[address3] = update(addressMap[address3] ?? { role: AccountRole.READONLY });
3742
3750
  }
3743
3751
  var TYPE22 = /* @__PURE__ */ Symbol("AddressMapTypeProperty");
3744
3752
  function getAddressMapFromInstructions2(feePayer, instructions) {
@@ -3906,8 +3914,8 @@ function getOrderedAccountsFromAddressMap2(addressMap) {
3906
3914
  } else {
3907
3915
  return addressComparator(leftAddress, rightAddress);
3908
3916
  }
3909
- }).map(([address2, addressMeta]) => ({
3910
- address: address2,
3917
+ }).map(([address3, addressMeta]) => ({
3918
+ address: address3,
3911
3919
  ...addressMeta
3912
3920
  }));
3913
3921
  return orderedAccounts;
@@ -3945,7 +3953,7 @@ function getCompiledInstructions2(instructions, orderedAccounts) {
3945
3953
  return instructions.map(({ accounts, data, programAddress }) => {
3946
3954
  return {
3947
3955
  programAddressIndex: accountIndex[programAddress],
3948
- ...accounts ? { accountIndices: accounts.map(({ address: address2 }) => accountIndex[address2]) } : null,
3956
+ ...accounts ? { accountIndices: accounts.map(({ address: address3 }) => accountIndex[address3]) } : null,
3949
3957
  ...data ? { data } : null
3950
3958
  };
3951
3959
  });
@@ -3953,7 +3961,7 @@ function getCompiledInstructions2(instructions, orderedAccounts) {
3953
3961
  function getCompiledStaticAccounts(orderedAccounts) {
3954
3962
  const firstLookupTableAccountIndex = orderedAccounts.findIndex((account) => "lookupTableAddress" in account);
3955
3963
  const orderedStaticAccounts = firstLookupTableAccountIndex === -1 ? orderedAccounts : orderedAccounts.slice(0, firstLookupTableAccountIndex);
3956
- return orderedStaticAccounts.map(({ address: address2 }) => address2);
3964
+ return orderedStaticAccounts.map(({ address: address3 }) => address3);
3957
3965
  }
3958
3966
  function compileTransactionMessage2(transactionMessage) {
3959
3967
  const addressMap = getAddressMapFromInstructions2(
@@ -4036,7 +4044,7 @@ function getInstructionHeader(instruction, accountIndex) {
4036
4044
  }
4037
4045
  function getInstructionPayload(instruction, accountIndex) {
4038
4046
  return {
4039
- instructionAccountIndices: instruction.accounts?.map(({ address: address2 }) => accountIndex[address2]) ?? [],
4047
+ instructionAccountIndices: instruction.accounts?.map(({ address: address3 }) => accountIndex[address3]) ?? [],
4040
4048
  instructionData: instruction.data ?? new Uint8Array()
4041
4049
  };
4042
4050
  }
@@ -4486,11 +4494,11 @@ async function partiallySignTransaction(keyPairs, transaction) {
4486
4494
  let unexpectedSigners;
4487
4495
  await Promise.all(
4488
4496
  keyPairs.map(async (keyPair) => {
4489
- const address2 = await getAddressFromPublicKey(keyPair.publicKey);
4490
- const existingSignature = transaction.signatures[address2];
4497
+ const address3 = await getAddressFromPublicKey(keyPair.publicKey);
4498
+ const existingSignature = transaction.signatures[address3];
4491
4499
  if (existingSignature === void 0) {
4492
4500
  unexpectedSigners ||= /* @__PURE__ */ new Set();
4493
- unexpectedSigners.add(address2);
4501
+ unexpectedSigners.add(address3);
4494
4502
  return;
4495
4503
  }
4496
4504
  if (unexpectedSigners) {
@@ -4501,7 +4509,7 @@ async function partiallySignTransaction(keyPairs, transaction) {
4501
4509
  return;
4502
4510
  }
4503
4511
  newSignatures ||= {};
4504
- newSignatures[address2] = newSignature;
4512
+ newSignatures[address3] = newSignature;
4505
4513
  })
4506
4514
  );
4507
4515
  if (unexpectedSigners && unexpectedSigners.size > 0) {
@@ -4524,9 +4532,9 @@ async function partiallySignTransaction(keyPairs, transaction) {
4524
4532
  }
4525
4533
  function assertIsFullySignedTransaction(transaction) {
4526
4534
  const missingSigs = [];
4527
- Object.entries(transaction.signatures).forEach(([address2, signatureBytes2]) => {
4535
+ Object.entries(transaction.signatures).forEach(([address3, signatureBytes2]) => {
4528
4536
  if (!signatureBytes2) {
4529
- missingSigs.push(address2);
4537
+ missingSigs.push(address3);
4530
4538
  }
4531
4539
  });
4532
4540
  if (missingSigs.length > 0) {
@@ -5727,19 +5735,19 @@ function setTransactionMessageFeePayerSigner(feePayer, transactionMessage) {
5727
5735
  return out;
5728
5736
  }
5729
5737
  async function createSignerFromKeyPair(keyPair) {
5730
- const address2 = await getAddressFromPublicKey(keyPair.publicKey);
5738
+ const address3 = await getAddressFromPublicKey(keyPair.publicKey);
5731
5739
  const out = {
5732
- address: address2,
5740
+ address: address3,
5733
5741
  keyPair,
5734
5742
  signMessages: (messages) => Promise.all(
5735
5743
  messages.map(
5736
- async (message) => Object.freeze({ [address2]: await signBytes(keyPair.privateKey, message.content) })
5744
+ async (message) => Object.freeze({ [address3]: await signBytes(keyPair.privateKey, message.content) })
5737
5745
  )
5738
5746
  ),
5739
5747
  signTransactions: (transactions) => Promise.all(
5740
5748
  transactions.map(async (transaction) => {
5741
5749
  const signedTransaction = await partiallySignTransaction([keyPair], transaction);
5742
- return Object.freeze({ [address2]: signedTransaction.signatures[address2] });
5750
+ return Object.freeze({ [address3]: signedTransaction.signatures[address3] });
5743
5751
  })
5744
5752
  )
5745
5753
  };
@@ -5751,9 +5759,9 @@ async function createKeyPairSignerFromBytes(bytes, extractable) {
5751
5759
  async function createKeyPairSignerFromPrivateKeyBytes(bytes, extractable) {
5752
5760
  return await createSignerFromKeyPair(await createKeyPairFromPrivateKeyBytes(bytes, extractable));
5753
5761
  }
5754
- function createNoopSigner(address2) {
5762
+ function createNoopSigner(address3) {
5755
5763
  const out = {
5756
- address: address2,
5764
+ address: address3,
5757
5765
  signMessages: (messages) => Promise.resolve(messages.map(() => Object.freeze({}))),
5758
5766
  signTransactions: (transactions) => Promise.resolve(transactions.map(() => Object.freeze({})))
5759
5767
  };
@@ -5834,10 +5842,1366 @@ async function signModifyingAndPartialTransactionSigners(transaction, modifyingS
5834
5842
  }
5835
5843
  var o2 = globalThis.TextEncoder;
5836
5844
 
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
5845
+ // ../../node_modules/.pnpm/@solana+errors@8.4.0_typescript@6.0.3/node_modules/@solana/errors/dist/index.node.mjs
5846
+ var SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED2 = 1;
5847
+ var SOLANA_ERROR__INVALID_NONCE2 = 2;
5848
+ var SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND2 = 3;
5849
+ var SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE2 = 4;
5850
+ var SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH2 = 5;
5851
+ var SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE2 = 6;
5852
+ var SOLANA_ERROR__MALFORMED_BIGINT_STRING2 = 7;
5853
+ var SOLANA_ERROR__MALFORMED_NUMBER_STRING2 = 8;
5854
+ var SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE2 = 9;
5855
+ var SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR2 = 10;
5856
+ var SOLANA_ERROR__FAILED_TO_SEND_TRANSACTION2 = 11;
5857
+ var SOLANA_ERROR__FAILED_TO_SEND_TRANSACTIONS2 = 12;
5858
+ var SOLANA_ERROR__FAILED_TO_SIGN_TRANSACTION2 = 13;
5859
+ var SOLANA_ERROR__FAILED_TO_SIGN_TRANSACTIONS2 = 14;
5860
+ var SOLANA_ERROR__JSON_RPC__PARSE_ERROR2 = -32700;
5861
+ var SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR2 = -32603;
5862
+ var SOLANA_ERROR__JSON_RPC__INVALID_PARAMS2 = -32602;
5863
+ var SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND2 = -32601;
5864
+ var SOLANA_ERROR__JSON_RPC__INVALID_REQUEST2 = -32600;
5865
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SLOT_HISTORY2 = -32021;
5866
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_FILTER_TRANSACTION_NOT_FOUND2 = -32020;
5867
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_UNREACHABLE2 = -32019;
5868
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_NOT_EPOCH_BOUNDARY2 = -32018;
5869
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_EPOCH_REWARDS_PERIOD_ACTIVE2 = -32017;
5870
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED2 = -32016;
5871
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION2 = -32015;
5872
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET2 = -32014;
5873
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH2 = -32013;
5874
+ var SOLANA_ERROR__JSON_RPC__SCAN_ERROR2 = -32012;
5875
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE2 = -32011;
5876
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX2 = -32010;
5877
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED2 = -32009;
5878
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT2 = -32008;
5879
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED2 = -32007;
5880
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE2 = -32006;
5881
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY2 = -32005;
5882
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE2 = -32004;
5883
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE2 = -32003;
5884
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE2 = -32002;
5885
+ var SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP2 = -32001;
5886
+ var SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH2 = 28e5;
5887
+ var SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE2 = 2800001;
5888
+ var SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS2 = 2800002;
5889
+ var SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY2 = 2800003;
5890
+ var SOLANA_ERROR__ADDRESSES__MALFORMED_PDA2 = 2800004;
5891
+ var SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE2 = 2800005;
5892
+ var SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED2 = 2800006;
5893
+ var SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED2 = 2800007;
5894
+ var SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE2 = 2800008;
5895
+ var SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED2 = 2800009;
5896
+ var SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER2 = 2800010;
5897
+ var SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS2 = 2800011;
5898
+ var SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND2 = 323e4;
5899
+ var SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND2 = 32300001;
5900
+ var SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT2 = 3230002;
5901
+ var SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT2 = 3230003;
5902
+ var SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED2 = 3230004;
5903
+ var SOLANA_ERROR__SUBTLE_CRYPTO__DISALLOWED_IN_INSECURE_CONTEXT2 = 361e4;
5904
+ var SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED2 = 3610001;
5905
+ var SOLANA_ERROR__SUBTLE_CRYPTO__ED25519_ALGORITHM_UNIMPLEMENTED2 = 3610002;
5906
+ var SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED2 = 3610003;
5907
+ var SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED2 = 3610004;
5908
+ var SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED2 = 3610005;
5909
+ var SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED2 = 3610006;
5910
+ var SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY2 = 3610007;
5911
+ var SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED2 = 3611e3;
5912
+ var SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH2 = 3704e3;
5913
+ var SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH2 = 3704001;
5914
+ var SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH2 = 3704002;
5915
+ var SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE2 = 3704003;
5916
+ var SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY2 = 3704004;
5917
+ var SOLANA_ERROR__KEYS__INVALID_BASE58_IN_GRIND_REGEX2 = 3704005;
5918
+ var SOLANA_ERROR__KEYS__WRITE_KEY_PAIR_UNSUPPORTED_ENVIRONMENT2 = 3704006;
5919
+ var SOLANA_ERROR__FS__UNSUPPORTED_ENVIRONMENT2 = 3712e3;
5920
+ var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS2 = 4128e3;
5921
+ var SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA2 = 4128001;
5922
+ var SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH2 = 4128002;
5923
+ var SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN2 = 4615e3;
5924
+ var SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR2 = 4615001;
5925
+ var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT2 = 4615002;
5926
+ var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA2 = 4615003;
5927
+ var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA2 = 4615004;
5928
+ var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL2 = 4615005;
5929
+ var SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS2 = 4615006;
5930
+ var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID2 = 4615007;
5931
+ var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE2 = 4615008;
5932
+ var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED2 = 4615009;
5933
+ var SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT2 = 4615010;
5934
+ var SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION2 = 4615011;
5935
+ var SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID2 = 4615012;
5936
+ var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND2 = 4615013;
5937
+ var SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED2 = 4615014;
5938
+ var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE2 = 4615015;
5939
+ var SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED2 = 4615016;
5940
+ var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX2 = 4615017;
5941
+ var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED2 = 4615018;
5942
+ var SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED2 = 4615019;
5943
+ var SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS2 = 4615020;
5944
+ var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED2 = 4615021;
5945
+ var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE2 = 4615022;
5946
+ var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED2 = 4615023;
5947
+ var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING2 = 4615024;
5948
+ var SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC2 = 4615025;
5949
+ var SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM2 = 4615026;
5950
+ var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR2 = 4615027;
5951
+ var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED2 = 4615028;
5952
+ var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE2 = 4615029;
5953
+ var SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT2 = 4615030;
5954
+ var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID2 = 4615031;
5955
+ var SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH2 = 4615032;
5956
+ var SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT2 = 4615033;
5957
+ var SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED2 = 4615034;
5958
+ var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED2 = 4615035;
5959
+ var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS2 = 4615036;
5960
+ var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC2 = 4615037;
5961
+ var SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED2 = 4615038;
5962
+ var SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION2 = 4615039;
5963
+ var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE2 = 4615040;
5964
+ var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE2 = 4615041;
5965
+ var SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE2 = 4615042;
5966
+ var SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE2 = 4615043;
5967
+ var SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY2 = 4615044;
5968
+ var SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR2 = 4615045;
5969
+ var SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT2 = 4615046;
5970
+ var SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER2 = 4615047;
5971
+ var SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW2 = 4615048;
5972
+ var SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR2 = 4615049;
5973
+ var SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER2 = 4615050;
5974
+ var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED2 = 4615051;
5975
+ var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED2 = 4615052;
5976
+ var SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED2 = 4615053;
5977
+ var SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS2 = 4615054;
5978
+ var SOLANA_ERROR__SIGNER__ADDRESS_CANNOT_HAVE_MULTIPLE_SIGNERS2 = 5508e3;
5979
+ var SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER2 = 5508001;
5980
+ var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER2 = 5508002;
5981
+ var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER2 = 5508003;
5982
+ var SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER2 = 5508004;
5983
+ var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER2 = 5508005;
5984
+ var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER2 = 5508006;
5985
+ var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER2 = 5508007;
5986
+ var SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER2 = 5508008;
5987
+ var SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS2 = 5508009;
5988
+ var SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING2 = 5508010;
5989
+ var SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED2 = 5508011;
5990
+ var SOLANA_ERROR__SIGNER__WALLET_ACCOUNT_CANNOT_SIGN_TRANSACTION2 = 5508012;
5991
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__MAXIMUM_LENGTH_EXCEEDED2 = 5607e3;
5992
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__RESTRICTED_ASCII_BODY_CHARACTER_OUT_OF_RANGE2 = 5607001;
5993
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__APPLICATION_DOMAIN_STRING_LENGTH_OUT_OF_RANGE2 = 5607002;
5994
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__INVALID_APPLICATION_DOMAIN_BYTE_LENGTH2 = 5607003;
5995
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__NUM_SIGNATURES_MISMATCH2 = 5607004;
5996
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__NUM_REQUIRED_SIGNERS_CANNOT_BE_ZERO2 = 5607005;
5997
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__VERSION_NUMBER_NOT_SUPPORTED2 = 5607006;
5998
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__MESSAGE_FORMAT_MISMATCH2 = 5607007;
5999
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__MESSAGE_LENGTH_MISMATCH2 = 5607008;
6000
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__MESSAGE_MUST_BE_NON_EMPTY2 = 5607009;
6001
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__NUM_ENVELOPE_SIGNATURES_CANNOT_BE_ZERO2 = 5607010;
6002
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATURES_MISSING2 = 5607011;
6003
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__ENVELOPE_SIGNERS_MISMATCH2 = 5607012;
6004
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__ADDRESSES_CANNOT_SIGN_OFFCHAIN_MESSAGE2 = 5607013;
6005
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__UNEXPECTED_VERSION2 = 5607014;
6006
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATORIES_MUST_BE_SORTED2 = 5607015;
6007
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATORIES_MUST_BE_UNIQUE2 = 5607016;
6008
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATURE_VERIFICATION_FAILURE2 = 5607017;
6009
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__CONTENT_DOES_NOT_MATCH_EXPECTED2 = 5607018;
6010
+ var SOLANA_ERROR__OFFCHAIN_MESSAGE__REQUIRED_SIGNATORIES_DO_NOT_MATCH_EXPECTED2 = 5607019;
6011
+ var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_CANNOT_PAY_FEES2 = 5663e3;
6012
+ var SOLANA_ERROR__TRANSACTION__INVOKED_PROGRAMS_MUST_NOT_BE_WRITABLE2 = 5663001;
6013
+ var SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME2 = 5663002;
6014
+ var SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME2 = 5663003;
6015
+ var SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE2 = 5663004;
6016
+ var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING2 = 5663005;
6017
+ var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_INDEX_OUT_OF_RANGE2 = 5663006;
6018
+ var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND2 = 5663007;
6019
+ var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING2 = 5663008;
6020
+ var SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING2 = 5663009;
6021
+ var SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING2 = 5663010;
6022
+ var SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING2 = 5663011;
6023
+ var SOLANA_ERROR__TRANSACTION__FEE_PAYER_SIGNATURE_MISSING2 = 5663012;
6024
+ var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING2 = 5663013;
6025
+ var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE2 = 5663014;
6026
+ var SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION2 = 5663015;
6027
+ var SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES2 = 5663016;
6028
+ var SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH2 = 5663017;
6029
+ var SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_COMPUTE_LIMIT2 = 5663018;
6030
+ var SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_COMPUTE_LIMIT2 = 5663019;
6031
+ var SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT2 = 5663020;
6032
+ var SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_NOT_SUPPORTED2 = 5663021;
6033
+ var SOLANA_ERROR__TRANSACTION__NONCE_ACCOUNT_CANNOT_BE_IN_LOOKUP_TABLE2 = 5663022;
6034
+ var SOLANA_ERROR__TRANSACTION__MALFORMED_MESSAGE_BYTES2 = 5663023;
6035
+ var SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_MESSAGE_BYTES2 = 5663024;
6036
+ var SOLANA_ERROR__TRANSACTION__CANNOT_DECODE_EMPTY_TRANSACTION_BYTES2 = 5663025;
6037
+ var SOLANA_ERROR__TRANSACTION__VERSION_ZERO_MUST_BE_ENCODED_WITH_SIGNATURES_FIRST2 = 5663026;
6038
+ var SOLANA_ERROR__TRANSACTION__SIGNATURE_COUNT_TOO_HIGH_FOR_TRANSACTION_BYTES2 = 5663027;
6039
+ var SOLANA_ERROR__TRANSACTION__INVALID_CONFIG_MASK_PRIORITY_FEE_BITS2 = 5663028;
6040
+ var SOLANA_ERROR__TRANSACTION__INVALID_NONCE_ACCOUNT_INDEX2 = 5663029;
6041
+ var SOLANA_ERROR__TRANSACTION__INVALID_CONFIG_VALUE_KIND2 = 5663030;
6042
+ var SOLANA_ERROR__TRANSACTION__INSTRUCTION_HEADERS_PAYLOADS_MISMATCH2 = 5663031;
6043
+ var SOLANA_ERROR__TRANSACTION__TOO_MANY_SIGNER_ADDRESSES2 = 5663032;
6044
+ var SOLANA_ERROR__TRANSACTION__TOO_MANY_ACCOUNT_ADDRESSES2 = 5663033;
6045
+ var SOLANA_ERROR__TRANSACTION__TOO_MANY_INSTRUCTIONS2 = 5663034;
6046
+ var SOLANA_ERROR__TRANSACTION__TOO_MANY_ACCOUNTS_IN_INSTRUCTION2 = 5663035;
6047
+ var SOLANA_ERROR__TRANSACTION__FAILED_TO_ESTIMATE_LOADED_ACCOUNTS_DATA_SIZE_LIMIT2 = 5663036;
6048
+ var SOLANA_ERROR__TRANSACTION__FAILED_WHEN_SIMULATING_TO_ESTIMATE_RESOURCE_LIMITS2 = 5663037;
6049
+ var SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_ACCOUNT_INDEX_OUT_OF_RANGE2 = 5663038;
6050
+ var SOLANA_ERROR__TRANSACTION__COMPUTE_UNIT_LIMIT_OUT_OF_RANGE2 = 5663039;
6051
+ var SOLANA_ERROR__TRANSACTION__INVALID_HEAP_SIZE2 = 5663040;
6052
+ var SOLANA_ERROR__TRANSACTION_INTROSPECTION__CANNOT_DECODE_JSON_PARSED_TRANSACTION2 = 5664e3;
6053
+ var SOLANA_ERROR__TRANSACTION_INTROSPECTION__UNRECOGNIZED_GET_TRANSACTION_RESPONSE2 = 5664001;
6054
+ var SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN2 = 705e4;
6055
+ var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE2 = 7050001;
6056
+ var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE2 = 7050002;
6057
+ var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND2 = 7050003;
6058
+ var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND2 = 7050004;
6059
+ var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE2 = 7050005;
6060
+ var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE2 = 7050006;
6061
+ var SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED2 = 7050007;
6062
+ var SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND2 = 7050008;
6063
+ var SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP2 = 7050009;
6064
+ var SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE2 = 7050010;
6065
+ var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX2 = 7050011;
6066
+ var SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE2 = 7050012;
6067
+ var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION2 = 7050013;
6068
+ var SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE2 = 7050014;
6069
+ var SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE2 = 7050015;
6070
+ var SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING2 = 7050016;
6071
+ var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT2 = 7050017;
6072
+ var SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION2 = 7050018;
6073
+ var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT2 = 7050019;
6074
+ var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT2 = 7050020;
6075
+ var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT2 = 7050021;
6076
+ var SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS2 = 7050022;
6077
+ var SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND2 = 7050023;
6078
+ var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER2 = 7050024;
6079
+ var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA2 = 7050025;
6080
+ var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX2 = 7050026;
6081
+ var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT2 = 7050027;
6082
+ var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT2 = 7050028;
6083
+ var SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT2 = 7050029;
6084
+ var SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION2 = 7050030;
6085
+ var SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT2 = 7050031;
6086
+ var SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED2 = 7050032;
6087
+ var SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT2 = 7050033;
6088
+ var SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED2 = 7050034;
6089
+ var SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED2 = 7050035;
6090
+ var SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION2 = 7050036;
6091
+ var SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_CANNOT_ACCOMMODATE_PLAN2 = 7618e3;
6092
+ var SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_PACKER_ALREADY_COMPLETE2 = 7618001;
6093
+ var SOLANA_ERROR__INSTRUCTION_PLANS__EMPTY_INSTRUCTION_PLAN2 = 7618002;
6094
+ var SOLANA_ERROR__INSTRUCTION_PLANS__FAILED_TO_EXECUTE_TRANSACTION_PLAN2 = 7618003;
6095
+ var SOLANA_ERROR__INSTRUCTION_PLANS__NON_DIVISIBLE_TRANSACTION_PLANS_NOT_SUPPORTED2 = 7618004;
6096
+ var SOLANA_ERROR__INSTRUCTION_PLANS__FAILED_SINGLE_TRANSACTION_PLAN_RESULT_NOT_FOUND2 = 7618005;
6097
+ var SOLANA_ERROR__INSTRUCTION_PLANS__UNEXPECTED_INSTRUCTION_PLAN2 = 7618006;
6098
+ var SOLANA_ERROR__INSTRUCTION_PLANS__UNEXPECTED_TRANSACTION_PLAN2 = 7618007;
6099
+ var SOLANA_ERROR__INSTRUCTION_PLANS__UNEXPECTED_TRANSACTION_PLAN_RESULT2 = 7618008;
6100
+ var SOLANA_ERROR__INSTRUCTION_PLANS__EXPECTED_SUCCESSFUL_TRANSACTION_PLAN_RESULT2 = 7618009;
6101
+ var SOLANA_ERROR__INSTRUCTION_PLANS__MAX_INSTRUCTIONS_PER_TRANSACTION_EXCEEDED2 = 7618010;
6102
+ var SOLANA_ERROR__INSTRUCTION_PLANS__INVALID_MAX_INSTRUCTIONS_PER_TRANSACTION2 = 7618011;
6103
+ var SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_REJECTED_BY_PACKER2 = 7618012;
6104
+ var SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY2 = 8078e3;
6105
+ var SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH2 = 8078001;
6106
+ var SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH2 = 8078002;
6107
+ var SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH2 = 8078003;
6108
+ var SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH2 = 8078004;
6109
+ var SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH2 = 8078005;
6110
+ var SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH2 = 8078006;
6111
+ var SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS2 = 8078007;
6112
+ var SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE2 = 8078008;
6113
+ var SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT2 = 8078009;
6114
+ var SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT2 = 8078010;
6115
+ var SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE2 = 8078011;
6116
+ var SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE2 = 8078012;
6117
+ var SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH2 = 8078013;
6118
+ var SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE2 = 8078014;
6119
+ var SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT2 = 8078015;
6120
+ var SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE2 = 8078016;
6121
+ var SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE2 = 8078017;
6122
+ var SOLANA_ERROR__CODECS__INVALID_CONSTANT2 = 8078018;
6123
+ var SOLANA_ERROR__CODECS__EXPECTED_ZERO_VALUE_TO_MATCH_ITEM_FIXED_SIZE2 = 8078019;
6124
+ var SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL2 = 8078020;
6125
+ var SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES2 = 8078021;
6126
+ var SOLANA_ERROR__CODECS__CANNOT_USE_LEXICAL_VALUES_AS_ENUM_DISCRIMINATORS2 = 8078022;
6127
+ var SOLANA_ERROR__CODECS__EXPECTED_DECODER_TO_CONSUME_ENTIRE_BYTE_ARRAY2 = 8078023;
6128
+ var SOLANA_ERROR__CODECS__INVALID_PATTERN_MATCH_VALUE2 = 8078024;
6129
+ var SOLANA_ERROR__CODECS__INVALID_PATTERN_MATCH_BYTES2 = 8078025;
6130
+ var SOLANA_ERROR__CODECS__INVALID_UTF8_BYTES2 = 8078026;
6131
+ var SOLANA_ERROR__CODECS__INVALID_UTF8_STRING2 = 8078027;
6132
+ var SOLANA_ERROR__CODECS__SENTINEL_MISSING_AT_END_OF_BYTES2 = 8078028;
6133
+ var SOLANA_ERROR__CODECS__SENTINEL_MUST_NOT_BE_EMPTY2 = 8078029;
6134
+ var SOLANA_ERROR__FIXED_POINTS__INVALID_TOTAL_BITS2 = 809e4;
6135
+ var SOLANA_ERROR__FIXED_POINTS__INVALID_FRACTIONAL_BITS2 = 8090001;
6136
+ var SOLANA_ERROR__FIXED_POINTS__INVALID_DECIMALS2 = 8090002;
6137
+ var SOLANA_ERROR__FIXED_POINTS__FRACTIONAL_BITS_EXCEED_TOTAL_BITS2 = 8090003;
6138
+ var SOLANA_ERROR__FIXED_POINTS__VALUE_OUT_OF_RANGE2 = 8090004;
6139
+ var SOLANA_ERROR__FIXED_POINTS__INVALID_STRING2 = 8090005;
6140
+ var SOLANA_ERROR__FIXED_POINTS__INVALID_ZERO_DENOMINATOR_RATIO2 = 8090006;
6141
+ var SOLANA_ERROR__FIXED_POINTS__ARITHMETIC_OVERFLOW2 = 8090007;
6142
+ var SOLANA_ERROR__FIXED_POINTS__SHAPE_MISMATCH2 = 8090008;
6143
+ var SOLANA_ERROR__FIXED_POINTS__DIVISION_BY_ZERO2 = 8090009;
6144
+ var SOLANA_ERROR__FIXED_POINTS__STRICT_MODE_PRECISION_LOSS2 = 8090010;
6145
+ var SOLANA_ERROR__FIXED_POINTS__MALFORMED_RAW_VALUE2 = 8090011;
6146
+ var SOLANA_ERROR__FIXED_POINTS__TOTAL_BITS_NOT_BYTE_ALIGNED2 = 8090012;
6147
+ var SOLANA_ERROR__RPC__INTEGER_OVERFLOW2 = 81e5;
6148
+ var SOLANA_ERROR__RPC__TRANSPORT_HTTP_HEADER_FORBIDDEN2 = 8100001;
6149
+ var SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR2 = 8100002;
6150
+ var SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD2 = 8100003;
6151
+ var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CANNOT_CREATE_SUBSCRIPTION_PLAN2 = 819e4;
6152
+ var SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID2 = 8190001;
6153
+ var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED2 = 8190002;
6154
+ var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED2 = 8190003;
6155
+ var SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT2 = 8190004;
6156
+ var SOLANA_ERROR__SUBSCRIBABLE__RETRY_NOT_SUPPORTED2 = 8195e3;
6157
+ var SOLANA_ERROR__SUBSCRIBABLE__STREAM_CLOSED_WITHOUT_ERROR2 = 8195001;
6158
+ var SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS2 = 85e5;
6159
+ var SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE2 = 8500001;
6160
+ var SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION2 = 8500002;
6161
+ var SOLANA_ERROR__PROGRAM_CLIENTS__UNEXPECTED_RESOLVED_INSTRUCTION_INPUT_TYPE2 = 8500003;
6162
+ var SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_NON_NULL2 = 8500004;
6163
+ var SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_ACCOUNT_TYPE2 = 8500005;
6164
+ var SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT2 = 8500006;
6165
+ var SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_SIGNER2 = 8500007;
6166
+ var SOLANA_ERROR__WALLET__NOT_CONNECTED2 = 89e5;
6167
+ var SOLANA_ERROR__WALLET__NO_SIGNER_CONNECTED2 = 8900001;
6168
+ var SOLANA_ERROR__WALLET__SIGNER_NOT_AVAILABLE2 = 8900002;
6169
+ var SOLANA_ERROR__WALLET__ACCOUNT_NOT_AVAILABLE2 = 8900003;
6170
+ var SOLANA_ERROR__REACT__MISSING_PROVIDER2 = 9e6;
6171
+ var SOLANA_ERROR__REACT__MISSING_CAPABILITY2 = 9000001;
6172
+ var SOLANA_ERROR__REACT__SUBSCRIPTION_CLOSED_WITHOUT_ERROR2 = 9000002;
6173
+ var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_STATE_MISSING2 = 99e5;
6174
+ var SOLANA_ERROR__INVARIANT_VIOLATION__SUBSCRIPTION_ITERATOR_MUST_NOT_POLL_BEFORE_RESOLVING_EXISTING_MESSAGE_PROMISE2 = 9900001;
6175
+ var SOLANA_ERROR__INVARIANT_VIOLATION__CACHED_ABORTABLE_ITERABLE_CACHE_ENTRY_MISSING2 = 9900002;
6176
+ var SOLANA_ERROR__INVARIANT_VIOLATION__SWITCH_MUST_BE_EXHAUSTIVE2 = 9900003;
6177
+ var SOLANA_ERROR__INVARIANT_VIOLATION__DATA_PUBLISHER_CHANNEL_UNIMPLEMENTED2 = 9900004;
6178
+ var SOLANA_ERROR__INVARIANT_VIOLATION__INVALID_INSTRUCTION_PLAN_KIND2 = 9900005;
6179
+ var SOLANA_ERROR__INVARIANT_VIOLATION__INVALID_TRANSACTION_PLAN_KIND2 = 9900006;
6180
+ function encodeValue2(value) {
6181
+ if (Array.isArray(value)) {
6182
+ const commaSeparatedValues = value.map(encodeValue2).join(
6183
+ "%2C%20"
6184
+ /* ", " */
6185
+ );
6186
+ return "%5B" + commaSeparatedValues + /* "]" */
6187
+ "%5D";
6188
+ } else if (typeof value === "bigint") {
6189
+ return `${value}n`;
6190
+ } else {
6191
+ return encodeURIComponent(
6192
+ String(
6193
+ value != null && Object.getPrototypeOf(value) === null ? (
6194
+ // Plain objects with no prototype don't have a `toString` method.
6195
+ // Convert them before stringifying them.
6196
+ { ...value }
6197
+ ) : value
6198
+ )
6199
+ );
6200
+ }
6201
+ }
6202
+ function encodeObjectContextEntry2([key, value]) {
6203
+ return `${key}=${encodeValue2(value)}`;
6204
+ }
6205
+ function encodeContextObject2(context) {
6206
+ const searchParamsString = Object.entries(context).map(encodeObjectContextEntry2).join("&");
6207
+ return Buffer.from(searchParamsString, "utf8").toString("base64");
6208
+ }
6209
+ var SolanaErrorMessages2 = {
6210
+ [SOLANA_ERROR__ACCOUNTS__ACCOUNT_NOT_FOUND2]: "Account not found at address: $address",
6211
+ [SOLANA_ERROR__ACCOUNTS__EXPECTED_ALL_ACCOUNTS_TO_BE_DECODED2]: "Not all accounts were decoded. Encoded accounts found at addresses: $addresses.",
6212
+ [SOLANA_ERROR__ACCOUNTS__EXPECTED_DECODED_ACCOUNT2]: "Expected decoded account at address: $address",
6213
+ [SOLANA_ERROR__ACCOUNTS__FAILED_TO_DECODE_ACCOUNT2]: "Failed to decode account data at address: $address",
6214
+ [SOLANA_ERROR__ACCOUNTS__ONE_OR_MORE_ACCOUNTS_NOT_FOUND2]: "Accounts not found at addresses: $addresses",
6215
+ [SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED2]: "Unable to find a viable program address bump seed.",
6216
+ [SOLANA_ERROR__ADDRESSES__INVALID_BASE58_ENCODED_ADDRESS2]: "$putativeAddress is not a base58-encoded address.",
6217
+ [SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH2]: "Expected base58 encoded address to decode to a byte array of length 32. Actual length: $actualLength.",
6218
+ [SOLANA_ERROR__ADDRESSES__INVALID_ED25519_PUBLIC_KEY2]: "The `CryptoKey` must be an `Ed25519` public key.",
6219
+ [SOLANA_ERROR__ADDRESSES__INVALID_OFF_CURVE_ADDRESS2]: "$putativeOffCurveAddress is not a base58-encoded off-curve address.",
6220
+ [SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE2]: "Invalid seeds; point must fall off the Ed25519 curve.",
6221
+ [SOLANA_ERROR__ADDRESSES__MALFORMED_PDA2]: "Expected given program derived address to have the following format: [Address, ProgramDerivedAddressBump].",
6222
+ [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.",
6223
+ [SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED2]: "The seed at index $index with length $actual exceeds the maximum length of $maxSeedLength bytes.",
6224
+ [SOLANA_ERROR__ADDRESSES__PDA_BUMP_SEED_OUT_OF_RANGE2]: "Expected program derived address bump to be in the range [0, 255], got: $bump.",
6225
+ [SOLANA_ERROR__ADDRESSES__PDA_ENDS_WITH_PDA_MARKER2]: "Program address cannot end with PDA marker.",
6226
+ [SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE2]: "Expected base58-encoded address string of length in the range [32, 44]. Actual length: $actualLength.",
6227
+ [SOLANA_ERROR__BLOCKHASH_STRING_LENGTH_OUT_OF_RANGE2]: "Expected base58-encoded blockhash string of length in the range [32, 44]. Actual length: $actualLength.",
6228
+ [SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED2]: "The network has progressed past the last block for which this transaction could have been committed.",
6229
+ [SOLANA_ERROR__CODECS__CANNOT_DECODE_EMPTY_BYTE_ARRAY2]: "Codec [$codecDescription] cannot decode empty byte arrays.",
6230
+ [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`.",
6231
+ [SOLANA_ERROR__CODECS__ENCODED_BYTES_MUST_NOT_INCLUDE_SENTINEL2]: "Sentinel [$hexSentinel] must not be present in encoded bytes [$hexEncodedBytes].",
6232
+ [SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH2]: "Encoder and decoder must have the same fixed size, got [$encoderFixedSize] and [$decoderFixedSize].",
6233
+ [SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH2]: "Encoder and decoder must have the same max size, got [$encoderMaxSize] and [$decoderMaxSize].",
6234
+ [SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH2]: "Encoder and decoder must either both be fixed-size or variable-size.",
6235
+ [SOLANA_ERROR__CODECS__ENUM_DISCRIMINATOR_OUT_OF_RANGE2]: "Enum discriminator out of range. Expected a number in [$formattedValidDiscriminators], got $discriminator.",
6236
+ [SOLANA_ERROR__CODECS__EXPECTED_FIXED_LENGTH2]: "Expected a fixed-size codec, got a variable-size one.",
6237
+ [SOLANA_ERROR__CODECS__EXPECTED_POSITIVE_BYTE_LENGTH2]: "Codec [$codecDescription] expected a positive byte length, got $bytesLength.",
6238
+ [SOLANA_ERROR__CODECS__EXPECTED_VARIABLE_LENGTH2]: "Expected a variable-size codec, got a fixed-size one.",
6239
+ [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].",
6240
+ [SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH2]: "Codec [$codecDescription] expected $expected bytes, got $bytesLength.",
6241
+ [SOLANA_ERROR__CODECS__INVALID_CONSTANT2]: "Expected byte array constant [$hexConstant] to be present in data [$hexData] at offset [$offset].",
6242
+ [SOLANA_ERROR__CODECS__INVALID_DISCRIMINATED_UNION_VARIANT2]: "Invalid discriminated union variant. Expected one of [$variants], got $value.",
6243
+ [SOLANA_ERROR__CODECS__INVALID_ENUM_VARIANT2]: "Invalid enum variant. Expected one of [$stringValues] or a number in [$formattedNumericalValues], got $variant.",
6244
+ [SOLANA_ERROR__CODECS__INVALID_LITERAL_UNION_VARIANT2]: "Invalid literal union variant. Expected one of [$variants], got $value.",
6245
+ [SOLANA_ERROR__CODECS__INVALID_NUMBER_OF_ITEMS2]: "Expected [$codecDescription] to have $expected items, got $actual.",
6246
+ [SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE2]: "Invalid value $value for base $base with alphabet $alphabet.",
6247
+ [SOLANA_ERROR__CODECS__INVALID_UTF8_BYTES2]: "Invalid UTF-8 byte sequence at offset $offset.",
6248
+ [SOLANA_ERROR__CODECS__INVALID_UTF8_STRING2]: "Invalid UTF-8 string. Found a lone surrogate at index $index.",
6249
+ [SOLANA_ERROR__CODECS__LITERAL_UNION_DISCRIMINATOR_OUT_OF_RANGE2]: "Literal union discriminator out of range. Expected a number between $minRange and $maxRange, got $discriminator.",
6250
+ [SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE2]: "Codec [$codecDescription] expected number to be in the range [$min, $max], got $value.",
6251
+ [SOLANA_ERROR__CODECS__OFFSET_OUT_OF_RANGE2]: "Codec [$codecDescription] expected offset to be in the range [0, $bytesLength], got $offset.",
6252
+ [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.",
6253
+ [SOLANA_ERROR__CODECS__SENTINEL_MISSING_IN_DECODED_BYTES2]: "Expected sentinel [$hexSentinel] to be present in decoded bytes [$hexDecodedBytes].",
6254
+ [SOLANA_ERROR__CODECS__SENTINEL_MUST_NOT_BE_EMPTY2]: "The sentinel must not be empty.",
6255
+ [SOLANA_ERROR__CODECS__UNION_VARIANT_OUT_OF_RANGE2]: "Union variant out of range. Expected an index between $minRange and $maxRange, got $variant.",
6256
+ [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?",
6257
+ [SOLANA_ERROR__CODECS__INVALID_PATTERN_MATCH_VALUE2]: "Invalid pattern match value. The provided value does not match any of the specified patterns.",
6258
+ [SOLANA_ERROR__CODECS__INVALID_PATTERN_MATCH_BYTES2]: "Invalid pattern match bytes. The provided byte array does not match any of the specified patterns.",
6259
+ [SOLANA_ERROR__CRYPTO__RANDOM_VALUES_FUNCTION_UNIMPLEMENTED2]: "No random values implementation could be found.",
6260
+ [SOLANA_ERROR__FAILED_TO_SEND_TRANSACTION2]: "Failed to send transaction$causeMessage",
6261
+ [SOLANA_ERROR__FAILED_TO_SEND_TRANSACTIONS2]: "Failed to send transactions$causeMessages",
6262
+ [SOLANA_ERROR__FAILED_TO_SIGN_TRANSACTION2]: "Failed to sign transaction$causeMessage",
6263
+ [SOLANA_ERROR__FAILED_TO_SIGN_TRANSACTIONS2]: "Failed to sign transactions$causeMessages",
6264
+ [SOLANA_ERROR__FIXED_POINTS__ARITHMETIC_OVERFLOW2]: "Fixed-point operation `$operation` of kind `$kind` overflowed. Expected a raw bigint in [$min, $max], got $result.",
6265
+ [SOLANA_ERROR__FIXED_POINTS__DIVISION_BY_ZERO2]: "Fixed-point division by zero for value of kind `$kind` ($signedness, $totalBits bits).",
6266
+ [SOLANA_ERROR__FIXED_POINTS__FRACTIONAL_BITS_EXCEED_TOTAL_BITS2]: "`fractionalBits` ($fractionalBits) must not exceed `totalBits` ($totalBits).",
6267
+ [SOLANA_ERROR__FIXED_POINTS__INVALID_DECIMALS2]: "Invalid `decimals`. Expected a non-negative integer, got $decimals.",
6268
+ [SOLANA_ERROR__FIXED_POINTS__INVALID_FRACTIONAL_BITS2]: "Invalid `fractionalBits`. Expected a non-negative integer, got $fractionalBits.",
6269
+ [SOLANA_ERROR__FIXED_POINTS__INVALID_STRING2]: "Invalid string `$input` for fixed-point value of kind `$kind`.",
6270
+ [SOLANA_ERROR__FIXED_POINTS__INVALID_TOTAL_BITS2]: "Invalid `totalBits`. Expected a positive integer, got $totalBits.",
6271
+ [SOLANA_ERROR__FIXED_POINTS__INVALID_ZERO_DENOMINATOR_RATIO2]: "Invalid ratio $numerator/$denominator for fixed-point value of kind `$kind`. Denominator must be non-zero.",
6272
+ [SOLANA_ERROR__FIXED_POINTS__MALFORMED_RAW_VALUE2]: "Fixed-point value of kind `$kind` has a malformed `raw` field. Expected a bigint, got `$raw`.",
6273
+ [SOLANA_ERROR__FIXED_POINTS__SHAPE_MISMATCH2]: "Fixed-point `$operation` operation expected $expectedKind ($expectedSignedness, $expectedTotalBits bits, $expectedScale $expectedScaleLabel); got $actualKind ($actualSignedness, $actualTotalBits bits, $actualScale $actualScaleLabel).",
6274
+ [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.",
6275
+ [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.",
6276
+ [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.",
6277
+ [SOLANA_ERROR__FS__UNSUPPORTED_ENVIRONMENT2]: "Filesystem operation `$operation` is not supported in this environment.",
6278
+ [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_ALREADY_INITIALIZED2]: "Instruction requires an uninitialized account",
6279
+ [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_FAILED2]: "Instruction tries to borrow reference for an account which is already borrowed",
6280
+ [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_BORROW_OUTSTANDING2]: "Instruction left account with an outstanding borrowed reference",
6281
+ [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_SIZE_CHANGED2]: "Program other than the account's owner changed the size of the account data",
6282
+ [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_DATA_TOO_SMALL2]: "Account data too small for instruction",
6283
+ [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_EXECUTABLE2]: "Instruction expected an executable account",
6284
+ [SOLANA_ERROR__INSTRUCTION_ERROR__ACCOUNT_NOT_RENT_EXEMPT2]: "An account does not have enough lamports to be rent-exempt",
6285
+ [SOLANA_ERROR__INSTRUCTION_ERROR__ARITHMETIC_OVERFLOW2]: "Program arithmetic overflowed",
6286
+ [SOLANA_ERROR__INSTRUCTION_ERROR__BORSH_IO_ERROR2]: "Failed to serialize or deserialize account data",
6287
+ [SOLANA_ERROR__INSTRUCTION_ERROR__BUILTIN_PROGRAMS_MUST_CONSUME_COMPUTE_UNITS2]: "Builtin programs must consume compute units",
6288
+ [SOLANA_ERROR__INSTRUCTION_ERROR__CALL_DEPTH2]: "Cross-program invocation call depth too deep",
6289
+ [SOLANA_ERROR__INSTRUCTION_ERROR__COMPUTATIONAL_BUDGET_EXCEEDED2]: "Computational budget exceeded",
6290
+ [SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM2]: "Custom program error: #$code",
6291
+ [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_INDEX2]: "Instruction contains duplicate accounts",
6292
+ [SOLANA_ERROR__INSTRUCTION_ERROR__DUPLICATE_ACCOUNT_OUT_OF_SYNC2]: "Instruction modifications of multiply-passed account differ",
6293
+ [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_ACCOUNT_NOT_RENT_EXEMPT2]: "Executable accounts must be rent exempt",
6294
+ [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_DATA_MODIFIED2]: "Instruction changed executable accounts data",
6295
+ [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_LAMPORT_CHANGE2]: "Instruction changed the balance of an executable account",
6296
+ [SOLANA_ERROR__INSTRUCTION_ERROR__EXECUTABLE_MODIFIED2]: "Instruction changed executable bit of an account",
6297
+ [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_DATA_MODIFIED2]: "Instruction modified data of an account it does not own",
6298
+ [SOLANA_ERROR__INSTRUCTION_ERROR__EXTERNAL_ACCOUNT_LAMPORT_SPEND2]: "Instruction spent from the balance of an account it does not own",
6299
+ [SOLANA_ERROR__INSTRUCTION_ERROR__GENERIC_ERROR2]: "Generic instruction error",
6300
+ [SOLANA_ERROR__INSTRUCTION_ERROR__ILLEGAL_OWNER2]: "Provided owner is not allowed",
6301
+ [SOLANA_ERROR__INSTRUCTION_ERROR__IMMUTABLE2]: "Account is immutable",
6302
+ [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_AUTHORITY2]: "Incorrect authority provided",
6303
+ [SOLANA_ERROR__INSTRUCTION_ERROR__INCORRECT_PROGRAM_ID2]: "Incorrect program id for instruction",
6304
+ [SOLANA_ERROR__INSTRUCTION_ERROR__INSUFFICIENT_FUNDS2]: "Insufficient funds for instruction",
6305
+ [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_DATA2]: "Invalid account data for instruction",
6306
+ [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ACCOUNT_OWNER2]: "Invalid account owner",
6307
+ [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ARGUMENT2]: "Invalid program argument",
6308
+ [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_ERROR2]: "Program returned invalid error code",
6309
+ [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_INSTRUCTION_DATA2]: "Invalid instruction data",
6310
+ [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_REALLOC2]: "Failed to reallocate account data",
6311
+ [SOLANA_ERROR__INSTRUCTION_ERROR__INVALID_SEEDS2]: "Provided seeds do not result in a valid address",
6312
+ [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_DATA_ALLOCATIONS_EXCEEDED2]: "Accounts data allocations exceeded the maximum allowed per transaction",
6313
+ [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_ACCOUNTS_EXCEEDED2]: "Max accounts exceeded",
6314
+ [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_INSTRUCTION_TRACE_LENGTH_EXCEEDED2]: "Max instruction trace length exceeded",
6315
+ [SOLANA_ERROR__INSTRUCTION_ERROR__MAX_SEED_LENGTH_EXCEEDED2]: "Length of the seed is too long for address generation",
6316
+ [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_ACCOUNT2]: "An account required by the instruction is missing",
6317
+ [SOLANA_ERROR__INSTRUCTION_ERROR__MISSING_REQUIRED_SIGNATURE2]: "Missing required signature for instruction",
6318
+ [SOLANA_ERROR__INSTRUCTION_ERROR__MODIFIED_PROGRAM_ID2]: "Instruction illegally modified the program id of an account",
6319
+ [SOLANA_ERROR__INSTRUCTION_ERROR__NOT_ENOUGH_ACCOUNT_KEYS2]: "Insufficient account keys for instruction",
6320
+ [SOLANA_ERROR__INSTRUCTION_ERROR__PRIVILEGE_ESCALATION2]: "Cross-program invocation with unauthorized signer or writable account",
6321
+ [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_ENVIRONMENT_SETUP_FAILURE2]: "Failed to create program execution environment",
6322
+ [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPILE2]: "Program failed to compile",
6323
+ [SOLANA_ERROR__INSTRUCTION_ERROR__PROGRAM_FAILED_TO_COMPLETE2]: "Program failed to complete",
6324
+ [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_DATA_MODIFIED2]: "Instruction modified data of a read-only account",
6325
+ [SOLANA_ERROR__INSTRUCTION_ERROR__READONLY_LAMPORT_CHANGE2]: "Instruction changed the balance of a read-only account",
6326
+ [SOLANA_ERROR__INSTRUCTION_ERROR__REENTRANCY_NOT_ALLOWED2]: "Cross-program invocation reentrancy not allowed for this instruction",
6327
+ [SOLANA_ERROR__INSTRUCTION_ERROR__RENT_EPOCH_MODIFIED2]: "Instruction modified rent epoch of an account",
6328
+ [SOLANA_ERROR__INSTRUCTION_ERROR__UNBALANCED_INSTRUCTION2]: "Sum of account balances before and after instruction do not match",
6329
+ [SOLANA_ERROR__INSTRUCTION_ERROR__UNINITIALIZED_ACCOUNT2]: "Instruction requires an initialized account",
6330
+ [SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN2]: "The instruction failed with the error: $errorName",
6331
+ [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_PROGRAM_ID2]: "Unsupported program id",
6332
+ [SOLANA_ERROR__INSTRUCTION_ERROR__UNSUPPORTED_SYSVAR2]: "Unsupported sysvar",
6333
+ [SOLANA_ERROR__INVARIANT_VIOLATION__INVALID_INSTRUCTION_PLAN_KIND2]: "Invalid instruction plan kind: $kind.",
6334
+ [SOLANA_ERROR__INSTRUCTION_PLANS__EMPTY_INSTRUCTION_PLAN2]: "The provided instruction plan is empty.",
6335
+ [SOLANA_ERROR__INSTRUCTION_PLANS__FAILED_SINGLE_TRANSACTION_PLAN_RESULT_NOT_FOUND2]: "No failed transaction plan result was found in the provided transaction plan result.",
6336
+ [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.",
6337
+ [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.",
6338
+ [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.",
6339
+ [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.",
6340
+ [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).",
6341
+ [SOLANA_ERROR__INVARIANT_VIOLATION__INVALID_TRANSACTION_PLAN_KIND2]: "Invalid transaction plan kind: $kind.",
6342
+ [SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_PACKER_ALREADY_COMPLETE2]: "No more instructions to pack; the message packer has completed the instruction plan.",
6343
+ [SOLANA_ERROR__INSTRUCTION_PLANS__MESSAGE_REJECTED_BY_PACKER2]: "The message packer rejected the provided transaction message: $reason.",
6344
+ [SOLANA_ERROR__INSTRUCTION_PLANS__UNEXPECTED_INSTRUCTION_PLAN2]: "Unexpected instruction plan. Expected $expectedKind plan, got $actualKind plan.",
6345
+ [SOLANA_ERROR__INSTRUCTION_PLANS__UNEXPECTED_TRANSACTION_PLAN2]: "Unexpected transaction plan. Expected $expectedKind plan, got $actualKind plan.",
6346
+ [SOLANA_ERROR__INSTRUCTION_PLANS__UNEXPECTED_TRANSACTION_PLAN_RESULT2]: "Unexpected transaction plan result. Expected $expectedKind plan, got $actualKind plan.",
6347
+ [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.",
6348
+ [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_ACCOUNTS2]: "The instruction does not have any accounts.",
6349
+ [SOLANA_ERROR__INSTRUCTION__EXPECTED_TO_HAVE_DATA2]: "The instruction does not have any data.",
6350
+ [SOLANA_ERROR__INSTRUCTION__PROGRAM_ID_MISMATCH2]: "Expected instruction to have progress address $expectedProgramAddress, got $actualProgramAddress.",
6351
+ [SOLANA_ERROR__INVALID_BLOCKHASH_BYTE_LENGTH2]: "Expected base58 encoded blockhash to decode to a byte array of length 32. Actual length: $actualLength.",
6352
+ [SOLANA_ERROR__INVALID_NONCE2]: "The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",
6353
+ [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",
6354
+ [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.",
6355
+ [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",
6356
+ [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",
6357
+ [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",
6358
+ [SOLANA_ERROR__JSON_RPC__INTERNAL_ERROR2]: "JSON-RPC error: Internal JSON-RPC error ($__serverMessage)",
6359
+ [SOLANA_ERROR__JSON_RPC__INVALID_PARAMS2]: "JSON-RPC error: Invalid method parameter(s) ($__serverMessage)",
6360
+ [SOLANA_ERROR__JSON_RPC__INVALID_REQUEST2]: "JSON-RPC error: The JSON sent is not a valid `Request` object ($__serverMessage)",
6361
+ [SOLANA_ERROR__JSON_RPC__METHOD_NOT_FOUND2]: "JSON-RPC error: The method does not exist / is not available ($__serverMessage)",
6362
+ [SOLANA_ERROR__JSON_RPC__PARSE_ERROR2]: "JSON-RPC error: An error occurred on the server while parsing the JSON text ($__serverMessage)",
6363
+ [SOLANA_ERROR__JSON_RPC__SCAN_ERROR2]: "$__serverMessage",
6364
+ [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_CLEANED_UP2]: "$__serverMessage",
6365
+ [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_NOT_AVAILABLE2]: "$__serverMessage",
6366
+ [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_BLOCK_STATUS_NOT_AVAILABLE_YET2]: "$__serverMessage",
6367
+ [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_EPOCH_REWARDS_PERIOD_ACTIVE2]: "Epoch rewards period still active at slot $slot",
6368
+ [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_FILTER_TRANSACTION_NOT_FOUND2]: "$__serverMessage",
6369
+ [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_KEY_EXCLUDED_FROM_SECONDARY_INDEX2]: "$__serverMessage",
6370
+ [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_SLOT_SKIPPED2]: "$__serverMessage",
6371
+ [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_LONG_TERM_STORAGE_UNREACHABLE2]: "Failed to query long-term storage; please try again",
6372
+ [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_MIN_CONTEXT_SLOT_NOT_REACHED2]: "Minimum context slot has not been reached",
6373
+ [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NODE_UNHEALTHY2]: "Node is unhealthy; behind by $numSlotsBehind slots",
6374
+ [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SLOT_HISTORY2]: "No slot history",
6375
+ [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_NO_SNAPSHOT2]: "No snapshot",
6376
+ [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SEND_TRANSACTION_PREFLIGHT_FAILURE2]: "Transaction simulation failed",
6377
+ [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",
6378
+ [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_SLOT_SKIPPED2]: "$__serverMessage",
6379
+ [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_HISTORY_NOT_AVAILABLE2]: "Transaction history is not available from this node",
6380
+ [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_PRECOMPILE_VERIFICATION_FAILURE2]: "$__serverMessage",
6381
+ [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_LEN_MISMATCH2]: "Transaction signature length mismatch",
6382
+ [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_TRANSACTION_SIGNATURE_VERIFICATION_FAILURE2]: "Transaction signature verification failure",
6383
+ [SOLANA_ERROR__JSON_RPC__SERVER_ERROR_UNSUPPORTED_TRANSACTION_VERSION2]: "$__serverMessage",
6384
+ [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.",
6385
+ [SOLANA_ERROR__KEYS__INVALID_KEY_PAIR_BYTE_LENGTH2]: "Key pair bytes must be of length 64, got $byteLength.",
6386
+ [SOLANA_ERROR__KEYS__INVALID_PRIVATE_KEY_BYTE_LENGTH2]: "Expected private key bytes with length 32. Actual length: $actualLength.",
6387
+ [SOLANA_ERROR__KEYS__INVALID_SIGNATURE_BYTE_LENGTH2]: "Expected base58-encoded signature to decode to a byte array of length 64. Actual length: $actualLength.",
6388
+ [SOLANA_ERROR__KEYS__PUBLIC_KEY_MUST_MATCH_PRIVATE_KEY2]: "The provided private key does not match the provided public key.",
6389
+ [SOLANA_ERROR__KEYS__SIGNATURE_STRING_LENGTH_OUT_OF_RANGE2]: "Expected base58-encoded signature string of length in the range [64, 88]. Actual length: $actualLength.",
6390
+ [SOLANA_ERROR__KEYS__WRITE_KEY_PAIR_UNSUPPORTED_ENVIRONMENT2]: "Writing a key pair to disk is not supported in this environment.",
6391
+ [SOLANA_ERROR__LAMPORTS_OUT_OF_RANGE2]: "Lamports value must be in the range [0, 2e64-1]",
6392
+ [SOLANA_ERROR__MALFORMED_BIGINT_STRING2]: "`$value` cannot be parsed as a `BigInt`",
6393
+ [SOLANA_ERROR__MALFORMED_JSON_RPC_ERROR2]: "$message",
6394
+ [SOLANA_ERROR__MALFORMED_NUMBER_STRING2]: "`$value` cannot be parsed as a `Number`",
6395
+ [SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND2]: "No nonce account could be found at address `$nonceAccountAddress`",
6396
+ [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.",
6397
+ [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",
6398
+ [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.",
6399
+ [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.",
6400
+ [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]`.",
6401
+ [SOLANA_ERROR__OFFCHAIN_MESSAGE__MAXIMUM_LENGTH_EXCEEDED2]: "The message body provided has a byte-length of $actualBytes. The maximum allowable byte-length is $maxBytes",
6402
+ [SOLANA_ERROR__OFFCHAIN_MESSAGE__MESSAGE_FORMAT_MISMATCH2]: "Expected message format $expectedMessageFormat, got $actualMessageFormat",
6403
+ [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.",
6404
+ [SOLANA_ERROR__OFFCHAIN_MESSAGE__MESSAGE_MUST_BE_NON_EMPTY2]: "Offchain message content must be non-empty",
6405
+ [SOLANA_ERROR__OFFCHAIN_MESSAGE__NUM_REQUIRED_SIGNERS_CANNOT_BE_ZERO2]: "Offchain message must specify the address of at least one required signer",
6406
+ [SOLANA_ERROR__OFFCHAIN_MESSAGE__NUM_ENVELOPE_SIGNATURES_CANNOT_BE_ZERO2]: "Offchain message envelope must reserve space for at least one signature",
6407
+ [SOLANA_ERROR__OFFCHAIN_MESSAGE__NUM_SIGNATURES_MISMATCH2]: "The offchain message preamble specifies $numRequiredSignatures required signature(s), got $signaturesLength.",
6408
+ [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.",
6409
+ [SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATORIES_MUST_BE_SORTED2]: "The signatories of this offchain message must be listed in lexicographical order",
6410
+ [SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATORIES_MUST_BE_UNIQUE2]: "An address must be listed no more than once among the signatories of an offchain message",
6411
+ [SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATURES_MISSING2]: "Offchain message is missing signatures for addresses: $addresses.",
6412
+ [SOLANA_ERROR__OFFCHAIN_MESSAGE__SIGNATURE_VERIFICATION_FAILURE2]: "Offchain message signature verification failed. Signature mismatch for required signatories [$signatoriesWithInvalidSignatures]. Missing signatures for signatories [$signatoriesWithMissingSignatures]",
6413
+ [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].",
6414
+ [SOLANA_ERROR__OFFCHAIN_MESSAGE__UNEXPECTED_VERSION2]: "Expected offchain message version $expectedVersion. Got $actualVersion.",
6415
+ [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.",
6416
+ [SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_ACCOUNT2]: "The provided account could not be identified as an account from the $programName program.",
6417
+ [SOLANA_ERROR__PROGRAM_CLIENTS__FAILED_TO_IDENTIFY_INSTRUCTION2]: "The provided instruction could not be identified as an instruction from the $programName program.",
6418
+ [SOLANA_ERROR__PROGRAM_CLIENTS__INSUFFICIENT_ACCOUNT_METAS2]: "The provided instruction is missing some accounts. Expected at least $expectedAccountMetas account(s), got $actualAccountMetas.",
6419
+ [SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_NON_NULL2]: "Expected resolved instruction input '$inputName' to be non-null.",
6420
+ [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.",
6421
+ [SOLANA_ERROR__PROGRAM_CLIENTS__UNEXPECTED_RESOLVED_INSTRUCTION_INPUT_TYPE2]: "Expected resolved instruction input '$inputName' to be of type `$expectedType`.",
6422
+ [SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_ACCOUNT_TYPE2]: "Unrecognized account type '$accountType' for the $programName program.",
6423
+ [SOLANA_ERROR__PROGRAM_CLIENTS__UNRECOGNIZED_INSTRUCTION_TYPE2]: "Unrecognized instruction type '$instructionType' for the $programName program.",
6424
+ [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'.",
6425
+ [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CLOSED_BEFORE_MESSAGE_BUFFERED2]: "WebSocket was closed before payload could be added to the send buffer",
6426
+ [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_CONNECTION_CLOSED2]: "WebSocket connection closed",
6427
+ [SOLANA_ERROR__RPC_SUBSCRIPTIONS__CHANNEL_FAILED_TO_CONNECT2]: "WebSocket failed to connect",
6428
+ [SOLANA_ERROR__RPC_SUBSCRIPTIONS__EXPECTED_SERVER_SUBSCRIPTION_ID2]: "Failed to obtain a subscription id from the server",
6429
+ [SOLANA_ERROR__RPC__API_PLAN_MISSING_FOR_RPC_METHOD2]: "Could not find an API plan for RPC method: `$method`",
6430
+ [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`.",
6431
+ [SOLANA_ERROR__RPC__TRANSPORT_HTTP_ERROR2]: "HTTP error ($statusCode): $message",
6432
+ [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.",
6433
+ [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.",
6434
+ [SOLANA_ERROR__SIGNER__EXPECTED_KEY_PAIR_SIGNER2]: "The provided value does not implement the `KeyPairSigner` interface",
6435
+ [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_MODIFYING_SIGNER2]: "The provided value does not implement the `MessageModifyingSigner` interface",
6436
+ [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_PARTIAL_SIGNER2]: "The provided value does not implement the `MessagePartialSigner` interface",
6437
+ [SOLANA_ERROR__SIGNER__EXPECTED_MESSAGE_SIGNER2]: "The provided value does not implement any of the `MessageSigner` interfaces",
6438
+ [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_MODIFYING_SIGNER2]: "The provided value does not implement the `TransactionModifyingSigner` interface",
6439
+ [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_PARTIAL_SIGNER2]: "The provided value does not implement the `TransactionPartialSigner` interface",
6440
+ [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SENDING_SIGNER2]: "The provided value does not implement the `TransactionSendingSigner` interface",
6441
+ [SOLANA_ERROR__SIGNER__EXPECTED_TRANSACTION_SIGNER2]: "The provided value does not implement any of the `TransactionSigner` interfaces",
6442
+ [SOLANA_ERROR__SIGNER__TRANSACTION_CANNOT_HAVE_MULTIPLE_SENDING_SIGNERS2]: "More than one `TransactionSendingSigner` was identified.",
6443
+ [SOLANA_ERROR__SIGNER__TRANSACTION_SENDING_SIGNER_MISSING2]: "No `TransactionSendingSigner` was identified. Please provide a valid `TransactionWithSingleSendingSigner` transaction.",
6444
+ [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.",
6445
+ [SOLANA_ERROR__SIGNER__WALLET_MULTISIGN_UNIMPLEMENTED2]: "Wallet account signers do not support signing multiple messages/transactions in a single operation",
6446
+ [SOLANA_ERROR__SUBSCRIBABLE__RETRY_NOT_SUPPORTED2]: "This `ReactiveStreamStore` does not support retry. Use `createReactiveStoreFromDataPublisherFactory` to construct a retryable store.",
6447
+ [SOLANA_ERROR__SUBSCRIBABLE__STREAM_CLOSED_WITHOUT_ERROR2]: "The stream store closed in an error state but did not report an error.",
6448
+ [SOLANA_ERROR__SUBTLE_CRYPTO__CANNOT_EXPORT_NON_EXTRACTABLE_KEY2]: "Cannot export a non-extractable key.",
6449
+ [SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED2]: "No digest implementation could be found.",
6450
+ [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.",
6451
+ [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.",
6452
+ [SOLANA_ERROR__SUBTLE_CRYPTO__EXPORT_FUNCTION_UNIMPLEMENTED2]: "No key export implementation could be found.",
6453
+ [SOLANA_ERROR__SUBTLE_CRYPTO__GENERATE_FUNCTION_UNIMPLEMENTED2]: "No key generation implementation could be found.",
6454
+ [SOLANA_ERROR__SUBTLE_CRYPTO__SIGN_FUNCTION_UNIMPLEMENTED2]: "No signing implementation could be found.",
6455
+ [SOLANA_ERROR__SUBTLE_CRYPTO__VERIFY_FUNCTION_UNIMPLEMENTED2]: "No signature verification implementation could be found.",
6456
+ [SOLANA_ERROR__TIMESTAMP_OUT_OF_RANGE2]: "Timestamp value must be in the range [-(2n ** 63n), (2n ** 63n) - 1]. `$value` given",
6457
+ [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_BORROW_OUTSTANDING2]: "Transaction processing left an account with an outstanding borrowed reference",
6458
+ [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_IN_USE2]: "Account in use",
6459
+ [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_LOADED_TWICE2]: "Account loaded twice",
6460
+ [SOLANA_ERROR__TRANSACTION_ERROR__ACCOUNT_NOT_FOUND2]: "Attempt to debit an account but found no record of a prior credit.",
6461
+ [SOLANA_ERROR__TRANSACTION_ERROR__ADDRESS_LOOKUP_TABLE_NOT_FOUND2]: "Transaction loads an address table account that doesn't exist",
6462
+ [SOLANA_ERROR__TRANSACTION_ERROR__ALREADY_PROCESSED2]: "This transaction has already been processed",
6463
+ [SOLANA_ERROR__TRANSACTION_ERROR__BLOCKHASH_NOT_FOUND2]: "Blockhash not found",
6464
+ [SOLANA_ERROR__TRANSACTION_ERROR__CALL_CHAIN_TOO_DEEP2]: "Loader call chain is too deep",
6465
+ [SOLANA_ERROR__TRANSACTION_ERROR__CLUSTER_MAINTENANCE2]: "Transactions are currently disabled due to cluster maintenance",
6466
+ [SOLANA_ERROR__TRANSACTION_ERROR__DUPLICATE_INSTRUCTION2]: "Transaction contains a duplicate instruction ($index) that is not allowed",
6467
+ [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_FEE2]: "Insufficient funds for fee",
6468
+ [SOLANA_ERROR__TRANSACTION_ERROR__INSUFFICIENT_FUNDS_FOR_RENT2]: "Transaction results in an account ($accountIndex) with insufficient funds for rent",
6469
+ [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_FOR_FEE2]: "This account may not be used to pay transaction fees",
6470
+ [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ACCOUNT_INDEX2]: "Transaction contains an invalid account reference",
6471
+ [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_DATA2]: "Transaction loads an address table account with invalid data",
6472
+ [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_INDEX2]: "Transaction address table lookup uses an invalid index",
6473
+ [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_ADDRESS_LOOKUP_TABLE_OWNER2]: "Transaction loads an address table account with an invalid owner",
6474
+ [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_LOADED_ACCOUNTS_DATA_SIZE_LIMIT2]: "LoadedAccountsDataSizeLimit set for transaction must be greater than 0.",
6475
+ [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_PROGRAM_FOR_EXECUTION2]: "This program may not be used for executing instructions",
6476
+ [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_RENT_PAYING_ACCOUNT2]: "Transaction leaves an account with a lower balance than rent-exempt minimum",
6477
+ [SOLANA_ERROR__TRANSACTION_ERROR__INVALID_WRITABLE_ACCOUNT2]: "Transaction loads a writable account that cannot be written",
6478
+ [SOLANA_ERROR__TRANSACTION_ERROR__MAX_LOADED_ACCOUNTS_DATA_SIZE_EXCEEDED2]: "Transaction exceeded max loaded accounts data size cap",
6479
+ [SOLANA_ERROR__TRANSACTION_ERROR__MISSING_SIGNATURE_FOR_FEE2]: "Transaction requires a fee but has no signature present",
6480
+ [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_ACCOUNT_NOT_FOUND2]: "Attempt to load a program that does not exist",
6481
+ [SOLANA_ERROR__TRANSACTION_ERROR__PROGRAM_EXECUTION_TEMPORARILY_RESTRICTED2]: "Execution of the program referenced by account at index $accountIndex is temporarily restricted.",
6482
+ [SOLANA_ERROR__TRANSACTION_ERROR__RESANITIZATION_NEEDED2]: "ResanitizationNeeded",
6483
+ [SOLANA_ERROR__TRANSACTION_ERROR__SANITIZE_FAILURE2]: "Transaction failed to sanitize accounts offsets correctly",
6484
+ [SOLANA_ERROR__TRANSACTION_ERROR__SIGNATURE_FAILURE2]: "Transaction did not pass signature verification",
6485
+ [SOLANA_ERROR__TRANSACTION_ERROR__TOO_MANY_ACCOUNT_LOCKS2]: "Transaction locked too many accounts",
6486
+ [SOLANA_ERROR__TRANSACTION_ERROR__UNBALANCED_TRANSACTION2]: "Sum of account balances before and after transaction do not match",
6487
+ [SOLANA_ERROR__TRANSACTION_ERROR__UNKNOWN2]: "The transaction failed with the error `$errorName`",
6488
+ [SOLANA_ERROR__TRANSACTION_ERROR__UNSUPPORTED_VERSION2]: "Transaction version is unsupported",
6489
+ [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_BLOCK_LIMIT2]: "Transaction would exceed account data limit within the block",
6490
+ [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_ACCOUNT_DATA_TOTAL_LIMIT2]: "Transaction would exceed total account data limit",
6491
+ [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_ACCOUNT_COST_LIMIT2]: "Transaction would exceed max account limit within the block",
6492
+ [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_BLOCK_COST_LIMIT2]: "Transaction would exceed max Block Cost Limit",
6493
+ [SOLANA_ERROR__TRANSACTION_ERROR__WOULD_EXCEED_MAX_VOTE_COST_LIMIT2]: "Transaction would exceed max Vote Cost Limit",
6494
+ [SOLANA_ERROR__TRANSACTION__ADDRESSES_CANNOT_SIGN_TRANSACTION2]: "Attempted to sign a transaction with an address that is not a signer for it",
6495
+ [SOLANA_ERROR__TRANSACTION__ADDRESS_MISSING2]: "Transaction is missing an address at index: $index.",
6496
+ [SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_SIGNATURES2]: "Transaction has no expected signers therefore it cannot be encoded",
6497
+ [SOLANA_ERROR__TRANSACTION__COMPUTE_UNIT_LIMIT_OUT_OF_RANGE2]: "Transaction compute unit limit must be an integer in the range [0, $maxComputeUnitLimit]. `$computeUnitLimit` given",
6498
+ [SOLANA_ERROR__TRANSACTION__EXCEEDS_SIZE_LIMIT2]: "Transaction size $transactionSize exceeds limit of $transactionSizeLimit bytes",
6499
+ [SOLANA_ERROR__TRANSACTION__EXPECTED_BLOCKHASH_LIFETIME2]: "Transaction does not have a blockhash lifetime",
6500
+ [SOLANA_ERROR__TRANSACTION__EXPECTED_NONCE_LIFETIME2]: "Transaction is not a durable nonce transaction",
6501
+ [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_ADDRESS_LOOKUP_TABLE_CONTENTS_MISSING2]: "Contents of these address lookup tables unknown: $lookupTableAddresses",
6502
+ [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",
6503
+ [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_FEE_PAYER_MISSING2]: "No fee payer set in CompiledTransaction",
6504
+ [SOLANA_ERROR__TRANSACTION__FAILED_TO_DECOMPILE_INSTRUCTION_PROGRAM_ADDRESS_NOT_FOUND2]: "Could not find program address at index $index",
6505
+ [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",
6506
+ [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",
6507
+ [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",
6508
+ [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",
6509
+ [SOLANA_ERROR__TRANSACTION__FEE_PAYER_MISSING2]: "Transaction is missing a fee payer.",
6510
+ [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.",
6511
+ [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_FIRST_INSTRUCTION_MUST_BE_ADVANCE_NONCE2]: "Transaction first instruction is not advance nonce account instruction.",
6512
+ [SOLANA_ERROR__TRANSACTION__INVALID_NONCE_TRANSACTION_INSTRUCTIONS_MISSING2]: "Transaction with no instructions cannot be durable nonce transaction.",
6513
+ [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",
6514
+ [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",
6515
+ [SOLANA_ERROR__TRANSACTION__MESSAGE_SIGNATURES_MISMATCH2]: "The transaction message expected the transaction to have $numRequiredSignatures signatures, got $signaturesLength.",
6516
+ [SOLANA_ERROR__TRANSACTION__SIGNATURES_MISSING2]: "Transaction is missing signatures for addresses: $addresses.",
6517
+ [SOLANA_ERROR__TRANSACTION__VERSION_NUMBER_OUT_OF_RANGE2]: "Transaction version must be in the range [0, 127]. `$actualVersion` given",
6518
+ [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.",
6519
+ [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.",
6520
+ [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)",
6521
+ [SOLANA_ERROR__TRANSACTION__MALFORMED_MESSAGE_BYTES2]: "Transaction message bytes are malformed: $messageBytes",
6522
+ [SOLANA_ERROR__TRANSACTION__CANNOT_ENCODE_WITH_EMPTY_MESSAGE_BYTES2]: "Transaction message bytes are empty, so the transaction cannot be encoded",
6523
+ [SOLANA_ERROR__TRANSACTION__CANNOT_DECODE_EMPTY_TRANSACTION_BYTES2]: "Transaction bytes are empty, so no transaction can be decoded",
6524
+ [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.",
6525
+ [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.",
6526
+ [SOLANA_ERROR__TRANSACTION__INVALID_HEAP_SIZE2]: "Transaction heap size must be an integer multiple of $multipleOf bytes in the range [$minHeapSize, $maxHeapSize]. `$heapSize` given",
6527
+ [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.",
6528
+ [SOLANA_ERROR__TRANSACTION__INVALID_CONFIG_VALUE_KIND2]: "The transaction config value for $configName has the incorrect kind. Expected $expectedKind, got $actualKind.",
6529
+ [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.",
6530
+ [SOLANA_ERROR__TRANSACTION__TOO_MANY_SIGNER_ADDRESSES2]: "Transaction has $actualCount unique signer addresses but the maximum allowed is $maxAllowed",
6531
+ [SOLANA_ERROR__TRANSACTION__TOO_MANY_ACCOUNT_ADDRESSES2]: "Transaction has $actualCount unique account addresses but the maximum allowed is $maxAllowed",
6532
+ [SOLANA_ERROR__TRANSACTION__TOO_MANY_INSTRUCTIONS2]: "Transaction has $actualCount instructions but the maximum allowed is $maxAllowed",
6533
+ [SOLANA_ERROR__TRANSACTION__TOO_MANY_ACCOUNTS_IN_INSTRUCTION2]: "The instruction at index $instructionIndex has $actualCount account references but the maximum allowed is $maxAllowed",
6534
+ [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",
6535
+ [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'`",
6536
+ [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'`",
6537
+ [SOLANA_ERROR__REACT__MISSING_CAPABILITY2]: "`$hookName` requires the following capabilities to be installed on the client: [$capabilities]. $providerHint",
6538
+ [SOLANA_ERROR__REACT__MISSING_PROVIDER2]: "`$hookName` was called outside of a `ClientProvider`. Mount a `<ClientProvider client={client}>` in the ancestor tree.",
6539
+ [SOLANA_ERROR__REACT__SUBSCRIPTION_CLOSED_WITHOUT_ERROR2]: "The subscription closed in an error state but did not report an error.",
6540
+ [SOLANA_ERROR__WALLET__NOT_CONNECTED2]: "Cannot $operation: no wallet connected",
6541
+ [SOLANA_ERROR__WALLET__NO_SIGNER_CONNECTED2]: "No signing wallet connected (status: $status)",
6542
+ [SOLANA_ERROR__WALLET__SIGNER_NOT_AVAILABLE2]: "Connected wallet does not support signing",
6543
+ [SOLANA_ERROR__WALLET__ACCOUNT_NOT_AVAILABLE2]: 'Account $address is not available in wallet "$walletName"'
6544
+ };
6545
+ var INSTRUCTION_ERROR_RANGE_SIZE2 = 1e3;
6546
+ var START_INDEX2 = "i";
6547
+ var TYPE3 = "t";
6548
+ function getHumanReadableErrorMessage2(code, context = {}) {
6549
+ const messageFormatString = SolanaErrorMessages2[code];
6550
+ if (messageFormatString.length === 0) {
6551
+ return "";
6552
+ }
6553
+ let state;
6554
+ function commitStateUpTo(endIndex) {
6555
+ if (state[TYPE3] === 2) {
6556
+ const variableName = messageFormatString.slice(state[START_INDEX2] + 1, endIndex);
6557
+ fragments.push(
6558
+ variableName in context ? (
6559
+ // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
6560
+ `${context[variableName]}`
6561
+ ) : `$${variableName}`
6562
+ );
6563
+ } else if (state[TYPE3] === 1) {
6564
+ fragments.push(messageFormatString.slice(state[START_INDEX2], endIndex));
6565
+ }
6566
+ }
6567
+ const fragments = [];
6568
+ messageFormatString.split("").forEach((char, ii) => {
6569
+ if (ii === 0) {
6570
+ state = {
6571
+ [START_INDEX2]: 0,
6572
+ [TYPE3]: messageFormatString[0] === "\\" ? 0 : messageFormatString[0] === "$" ? 2 : 1
6573
+ /* Text */
6574
+ };
6575
+ return;
6576
+ }
6577
+ let nextState;
6578
+ switch (state[TYPE3]) {
6579
+ case 0:
6580
+ nextState = {
6581
+ [START_INDEX2]: ii,
6582
+ [TYPE3]: 1
6583
+ /* Text */
6584
+ };
6585
+ break;
6586
+ case 1:
6587
+ if (char === "\\") {
6588
+ nextState = {
6589
+ [START_INDEX2]: ii,
6590
+ [TYPE3]: 0
6591
+ /* EscapeSequence */
6592
+ };
6593
+ } else if (char === "$") {
6594
+ nextState = {
6595
+ [START_INDEX2]: ii,
6596
+ [TYPE3]: 2
6597
+ /* Variable */
6598
+ };
6599
+ }
6600
+ break;
6601
+ case 2:
6602
+ if (char === "\\") {
6603
+ nextState = {
6604
+ [START_INDEX2]: ii,
6605
+ [TYPE3]: 0
6606
+ /* EscapeSequence */
6607
+ };
6608
+ } else if (char === "$") {
6609
+ nextState = {
6610
+ [START_INDEX2]: ii,
6611
+ [TYPE3]: 2
6612
+ /* Variable */
6613
+ };
6614
+ } else if (!char.match(/\w/)) {
6615
+ nextState = {
6616
+ [START_INDEX2]: ii,
6617
+ [TYPE3]: 1
6618
+ /* Text */
6619
+ };
6620
+ }
6621
+ break;
6622
+ }
6623
+ if (nextState) {
6624
+ if (state !== nextState) {
6625
+ commitStateUpTo(ii);
6626
+ }
6627
+ state = nextState;
6628
+ }
6629
+ });
6630
+ commitStateUpTo();
6631
+ let message = fragments.join("");
6632
+ if (code >= SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN2 && code < SOLANA_ERROR__INSTRUCTION_ERROR__UNKNOWN2 + INSTRUCTION_ERROR_RANGE_SIZE2 && "index" in context) {
6633
+ message += ` (instruction #${context.index + 1})`;
6634
+ }
6635
+ return message;
6636
+ }
6637
+ function getErrorMessage2(code, context = {}) {
6638
+ if (process.env.NODE_ENV !== "production") {
6639
+ return getHumanReadableErrorMessage2(code, context);
6640
+ } else {
6641
+ let decodingAdviceMessage = `Solana error #${code}; Decode this error by running \`npx @solana/errors decode -- ${code}`;
6642
+ if (Object.keys(context).length) {
6643
+ decodingAdviceMessage += ` '${encodeContextObject2(context)}'`;
6644
+ }
6645
+ return `${decodingAdviceMessage}\``;
6646
+ }
6647
+ }
6648
+ function isSolanaError2(e5, code) {
6649
+ const isSolanaError22 = e5 instanceof Error && e5.name === "SolanaError";
6650
+ if (isSolanaError22) {
6651
+ if (code !== void 0) {
6652
+ return e5.context.__code === code;
6653
+ }
6654
+ return true;
6655
+ }
6656
+ return false;
6657
+ }
6658
+ var SolanaError2 = class extends Error {
6659
+ /**
6660
+ * Indicates the root cause of this {@link SolanaError}, if any.
6661
+ *
6662
+ * For example, a transaction error might have an instruction error as its root cause. In this
6663
+ * case, you will be able to access the instruction error on the transaction error as `cause`.
6664
+ */
6665
+ cause = this.cause;
6666
+ /**
6667
+ * Contains context that can assist in understanding or recovering from a {@link SolanaError}.
6668
+ */
6669
+ context;
6670
+ constructor(...[code, contextAndErrorOptions]) {
6671
+ let context;
6672
+ let errorOptions;
6673
+ if (contextAndErrorOptions) {
6674
+ Object.entries(Object.getOwnPropertyDescriptors(contextAndErrorOptions)).forEach(([name, descriptor]) => {
6675
+ if (name === "cause") {
6676
+ errorOptions = { cause: descriptor.value };
6677
+ } else {
6678
+ if (context === void 0) {
6679
+ context = {
6680
+ __code: code
6681
+ };
6682
+ }
6683
+ Object.defineProperty(context, name, descriptor);
6684
+ }
6685
+ });
6686
+ }
6687
+ const message = getErrorMessage2(code, context);
6688
+ super(message, errorOptions);
6689
+ this.context = Object.freeze(
6690
+ context === void 0 ? {
6691
+ __code: code
6692
+ } : context
6693
+ );
6694
+ this.name = "SolanaError";
6695
+ }
6696
+ };
6697
+
6698
+ // ../../node_modules/.pnpm/@solana+codecs-core@8.4.0_typescript@6.0.3/node_modules/@solana/codecs-core/dist/index.node.mjs
6699
+ function padBytes2(bytes, length) {
6700
+ if (bytes.length >= length) return bytes;
6701
+ const paddedBytes = new Uint8Array(length).fill(0);
6702
+ paddedBytes.set(bytes);
6703
+ return paddedBytes;
6704
+ }
6705
+ var fixBytes2 = (bytes, length) => padBytes2(bytes.length <= length ? bytes : bytes.slice(0, length), length);
6706
+ function getEncodedSize2(value, encoder) {
6707
+ return "fixedSize" in encoder ? encoder.fixedSize : encoder.getSizeFromValue(value);
6708
+ }
6709
+ function createEncoder2(encoder) {
6710
+ return Object.freeze({
6711
+ ...encoder,
6712
+ encode: (value) => {
6713
+ const bytes = new Uint8Array(getEncodedSize2(value, encoder));
6714
+ encoder.write(value, bytes, 0);
6715
+ return bytes;
6716
+ }
6717
+ });
6718
+ }
6719
+ function createDecoder2(decoder) {
6720
+ return Object.freeze({
6721
+ ...decoder,
6722
+ decode: (bytes, offset = 0) => decoder.read(bytes, offset)[0]
6723
+ });
6724
+ }
6725
+ function isFixedSize2(codec) {
6726
+ return "fixedSize" in codec && typeof codec.fixedSize === "number";
6727
+ }
6728
+ function isVariableSize2(codec) {
6729
+ return !isFixedSize2(codec);
6730
+ }
6731
+ function combineCodec2(encoder, decoder) {
6732
+ if (isFixedSize2(encoder) !== isFixedSize2(decoder)) {
6733
+ throw new SolanaError2(SOLANA_ERROR__CODECS__ENCODER_DECODER_SIZE_COMPATIBILITY_MISMATCH2);
6734
+ }
6735
+ if (isFixedSize2(encoder) && isFixedSize2(decoder) && encoder.fixedSize !== decoder.fixedSize) {
6736
+ throw new SolanaError2(SOLANA_ERROR__CODECS__ENCODER_DECODER_FIXED_SIZE_MISMATCH2, {
6737
+ decoderFixedSize: decoder.fixedSize,
6738
+ encoderFixedSize: encoder.fixedSize
6739
+ });
6740
+ }
6741
+ if (!isFixedSize2(encoder) && !isFixedSize2(decoder) && encoder.maxSize !== decoder.maxSize) {
6742
+ throw new SolanaError2(SOLANA_ERROR__CODECS__ENCODER_DECODER_MAX_SIZE_MISMATCH2, {
6743
+ decoderMaxSize: decoder.maxSize,
6744
+ encoderMaxSize: encoder.maxSize
6745
+ });
6746
+ }
6747
+ return {
6748
+ ...decoder,
6749
+ ...encoder,
6750
+ decode: decoder.decode,
6751
+ encode: encoder.encode,
6752
+ read: decoder.read,
6753
+ write: encoder.write
6754
+ };
6755
+ }
6756
+ function assertByteArrayHasEnoughBytesForCodec2(codecDescription, expected, bytes, offset = 0) {
6757
+ const bytesLength = bytes.length - offset;
6758
+ if (bytesLength < expected) {
6759
+ throw new SolanaError2(SOLANA_ERROR__CODECS__INVALID_BYTE_LENGTH2, {
6760
+ bytesLength,
6761
+ codecDescription,
6762
+ expected
6763
+ });
6764
+ }
6765
+ }
6766
+ function fixEncoderSize2(encoder, fixedBytes) {
6767
+ return createEncoder2({
6768
+ fixedSize: fixedBytes,
6769
+ write: (value, bytes, offset) => {
6770
+ const variableByteArray = encoder.encode(value);
6771
+ const fixedByteArray = variableByteArray.length > fixedBytes ? variableByteArray.slice(0, fixedBytes) : variableByteArray;
6772
+ bytes.set(fixedByteArray, offset);
6773
+ return offset + fixedBytes;
6774
+ }
6775
+ });
6776
+ }
6777
+ function fixDecoderSize2(decoder, fixedBytes) {
6778
+ return createDecoder2({
6779
+ fixedSize: fixedBytes,
6780
+ read: (bytes, offset) => {
6781
+ assertByteArrayHasEnoughBytesForCodec2("fixCodecSize", fixedBytes, bytes, offset);
6782
+ if (offset > 0 || bytes.length > fixedBytes) {
6783
+ bytes = bytes.slice(offset, offset + fixedBytes);
6784
+ }
6785
+ if (isFixedSize2(decoder)) {
6786
+ bytes = fixBytes2(bytes, decoder.fixedSize);
6787
+ }
6788
+ const [value] = decoder.read(bytes, 0);
6789
+ return [value, offset + fixedBytes];
6790
+ }
6791
+ });
6792
+ }
6793
+ function transformEncoder2(encoder, unmap) {
6794
+ return createEncoder2({
6795
+ ...isVariableSize2(encoder) ? { ...encoder, getSizeFromValue: (value) => encoder.getSizeFromValue(unmap(value)) } : encoder,
6796
+ write: (value, bytes, offset) => encoder.write(unmap(value), bytes, offset)
6797
+ });
6798
+ }
6799
+
6800
+ // ../../node_modules/.pnpm/@solana+codecs-strings@8.4.0_typescript@6.0.3/node_modules/@solana/codecs-strings/dist/index.node.mjs
6801
+ function assertValidBaseString3(alphabet4, testValue, givenValue = testValue) {
6802
+ if (!testValue.match(new RegExp(`^[${alphabet4}]*$`))) {
6803
+ throw new SolanaError2(SOLANA_ERROR__CODECS__INVALID_STRING_FOR_BASE2, {
6804
+ alphabet: alphabet4,
6805
+ base: alphabet4.length,
6806
+ value: givenValue
6807
+ });
6808
+ }
6809
+ }
6810
+ var getBaseXEncoder3 = (alphabet4) => {
6811
+ return createEncoder2({
6812
+ getSizeFromValue: (value) => {
6813
+ const [leadingZeroes, tailChars] = partitionLeadingZeroes3(value, alphabet4[0]);
6814
+ if (!tailChars) return value.length;
6815
+ const base10Number = getBigIntFromBaseX3(tailChars, alphabet4);
6816
+ return leadingZeroes.length + Math.ceil(base10Number.toString(16).length / 2);
6817
+ },
6818
+ write(value, bytes, offset) {
6819
+ assertValidBaseString3(alphabet4, value);
6820
+ if (value === "") return offset;
6821
+ const [leadingZeroes, tailChars] = partitionLeadingZeroes3(value, alphabet4[0]);
6822
+ if (!tailChars) {
6823
+ bytes.set(new Uint8Array(leadingZeroes.length).fill(0), offset);
6824
+ return offset + leadingZeroes.length;
6825
+ }
6826
+ let base10Number = getBigIntFromBaseX3(tailChars, alphabet4);
6827
+ const tailBytes = [];
6828
+ while (base10Number > 0n) {
6829
+ tailBytes.unshift(Number(base10Number % 256n));
6830
+ base10Number /= 256n;
6831
+ }
6832
+ const bytesToAdd = [...Array(leadingZeroes.length).fill(0), ...tailBytes];
6833
+ bytes.set(bytesToAdd, offset);
6834
+ return offset + bytesToAdd.length;
6835
+ }
6836
+ });
6837
+ };
6838
+ var getBaseXDecoder2 = (alphabet4) => {
6839
+ return createDecoder2({
6840
+ read(rawBytes, offset) {
6841
+ const bytes = offset === 0 || offset <= -rawBytes.byteLength ? rawBytes : rawBytes.slice(offset);
6842
+ if (bytes.length === 0) return ["", rawBytes.length];
6843
+ let trailIndex = bytes.findIndex((n) => n !== 0);
6844
+ trailIndex = trailIndex === -1 ? bytes.length : trailIndex;
6845
+ const leadingZeroes = alphabet4[0].repeat(trailIndex);
6846
+ if (trailIndex === bytes.length) return [leadingZeroes, rawBytes.length];
6847
+ const base10Number = bytes.slice(trailIndex).reduce((sum, byte) => sum * 256n + BigInt(byte), 0n);
6848
+ const tailChars = getBaseXFromBigInt2(base10Number, alphabet4);
6849
+ return [leadingZeroes + tailChars, rawBytes.length];
6850
+ }
6851
+ });
6852
+ };
6853
+ function partitionLeadingZeroes3(value, zeroCharacter) {
6854
+ const [leadingZeros, tailChars] = value.split(new RegExp(`((?!${zeroCharacter}).*)`));
6855
+ return [leadingZeros, tailChars];
6856
+ }
6857
+ function getBigIntFromBaseX3(value, alphabet4) {
6858
+ const base = BigInt(alphabet4.length);
6859
+ let sum = 0n;
6860
+ for (const char of value) {
6861
+ sum *= base;
6862
+ sum += BigInt(alphabet4.indexOf(char));
6863
+ }
6864
+ return sum;
6865
+ }
6866
+ function getBaseXFromBigInt2(value, alphabet4) {
6867
+ const base = BigInt(alphabet4.length);
6868
+ const tailChars = [];
6869
+ while (value > 0n) {
6870
+ tailChars.unshift(alphabet4[Number(value % base)]);
6871
+ value /= base;
6872
+ }
6873
+ return tailChars.join("");
6874
+ }
6875
+ var alphabet23 = "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";
6876
+ var getBase58Encoder3 = () => getBaseXEncoder3(alphabet23);
6877
+ var getBase58Decoder2 = () => getBaseXDecoder2(alphabet23);
6878
+ var e4 = globalThis.TextDecoder;
6879
+ var o3 = globalThis.TextEncoder;
6880
+
6881
+ // ../../node_modules/.pnpm/@solana+assertions@8.4.0_typescript@6.0.3/node_modules/@solana/assertions/dist/index.node.mjs
6882
+ function assertDigestCapabilityIsAvailable2() {
6883
+ if (typeof globalThis.crypto === "undefined" || typeof globalThis.crypto.subtle?.digest !== "function") {
6884
+ throw new SolanaError2(SOLANA_ERROR__SUBTLE_CRYPTO__DIGEST_UNIMPLEMENTED2);
6885
+ }
6886
+ }
6887
+
6888
+ // ../../node_modules/.pnpm/@solana+addresses@8.4.0_typescript@6.0.3/node_modules/@solana/addresses/dist/index.node.mjs
6889
+ var memoizedBase58Encoder2;
6890
+ var memoizedBase58Decoder2;
6891
+ function getMemoizedBase58Encoder2() {
6892
+ if (!memoizedBase58Encoder2) memoizedBase58Encoder2 = getBase58Encoder3();
6893
+ return memoizedBase58Encoder2;
6894
+ }
6895
+ function getMemoizedBase58Decoder2() {
6896
+ if (!memoizedBase58Decoder2) memoizedBase58Decoder2 = getBase58Decoder2();
6897
+ return memoizedBase58Decoder2;
6898
+ }
6899
+ function assertIsAddress2(putativeAddress) {
6900
+ if (
6901
+ // Lowest address (32 bytes of zeroes)
6902
+ putativeAddress.length < 32 || // Highest address (32 bytes of 255)
6903
+ putativeAddress.length > 44
6904
+ ) {
6905
+ throw new SolanaError2(SOLANA_ERROR__ADDRESSES__STRING_LENGTH_OUT_OF_RANGE2, {
6906
+ actualLength: putativeAddress.length
6907
+ });
6908
+ }
6909
+ const base58Encoder = getMemoizedBase58Encoder2();
6910
+ const bytes = base58Encoder.encode(putativeAddress);
6911
+ const numBytes = bytes.byteLength;
6912
+ if (numBytes !== 32) {
6913
+ throw new SolanaError2(SOLANA_ERROR__ADDRESSES__INVALID_BYTE_LENGTH2, {
6914
+ actualLength: numBytes
6915
+ });
6916
+ }
6917
+ }
6918
+ function address2(putativeAddress) {
6919
+ assertIsAddress2(putativeAddress);
6920
+ return putativeAddress;
6921
+ }
6922
+ function getAddressEncoder2() {
6923
+ return transformEncoder2(
6924
+ fixEncoderSize2(getMemoizedBase58Encoder2(), 32),
6925
+ (putativeAddress) => address2(putativeAddress)
6926
+ );
6927
+ }
6928
+ function getAddressDecoder2() {
6929
+ return fixDecoderSize2(getMemoizedBase58Decoder2(), 32);
6930
+ }
6931
+ function getAddressCodec2() {
6932
+ return combineCodec2(getAddressEncoder2(), getAddressDecoder2());
6933
+ }
6934
+ var D2 = 37095705934669439343138083508754565189542113879843219016388785533085940283555n;
6935
+ var P2 = 57896044618658097711785492504343953926634992332820282019728792003956564819949n;
6936
+ var RM12 = 19681161376707505956807079304988542015446066515923890162744021073123829784752n;
6937
+ function mod2(a) {
6938
+ const r = a % P2;
6939
+ return r >= 0n ? r : P2 + r;
6940
+ }
6941
+ function pow22(x, power) {
6942
+ let r = x;
6943
+ while (power-- > 0n) {
6944
+ r *= r;
6945
+ r %= P2;
6946
+ }
6947
+ return r;
6948
+ }
6949
+ function pow_2_252_32(x) {
6950
+ const x2 = x * x % P2;
6951
+ const b2 = x2 * x % P2;
6952
+ const b4 = pow22(b2, 2n) * b2 % P2;
6953
+ const b5 = pow22(b4, 1n) * x % P2;
6954
+ const b10 = pow22(b5, 5n) * b5 % P2;
6955
+ const b20 = pow22(b10, 10n) * b10 % P2;
6956
+ const b40 = pow22(b20, 20n) * b20 % P2;
6957
+ const b80 = pow22(b40, 40n) * b40 % P2;
6958
+ const b160 = pow22(b80, 80n) * b80 % P2;
6959
+ const b240 = pow22(b160, 80n) * b80 % P2;
6960
+ const b250 = pow22(b240, 10n) * b10 % P2;
6961
+ const pow_p_5_8 = pow22(b250, 2n) * x % P2;
6962
+ return pow_p_5_8;
6963
+ }
6964
+ function uvRatio2(u, v) {
6965
+ const v3 = mod2(v * v * v);
6966
+ const v7 = mod2(v3 * v3 * v);
6967
+ const pow = pow_2_252_32(u * v7);
6968
+ let x = mod2(u * v3 * pow);
6969
+ const vx2 = mod2(v * x * x);
6970
+ const root1 = x;
6971
+ const root2 = mod2(x * RM12);
6972
+ const useRoot1 = vx2 === u;
6973
+ const useRoot2 = vx2 === mod2(-u);
6974
+ const noRoot = vx2 === mod2(-u * RM12);
6975
+ if (useRoot1) x = root1;
6976
+ if (useRoot2 || noRoot) x = root2;
6977
+ if ((mod2(x) & 1n) === 1n) x = mod2(-x);
6978
+ if (!useRoot1 && !useRoot2) {
6979
+ return null;
6980
+ }
6981
+ return x;
6982
+ }
6983
+ function pointIsOnCurve2(y, lastByte) {
6984
+ const y2 = mod2(y * y);
6985
+ const u = mod2(y2 - 1n);
6986
+ const v = mod2(D2 * y2 + 1n);
6987
+ const x = uvRatio2(u, v);
6988
+ if (x === null) {
6989
+ return false;
6990
+ }
6991
+ const isLastByteOdd = (lastByte & 128) !== 0;
6992
+ if (x === 0n && isLastByteOdd) {
6993
+ return false;
6994
+ }
6995
+ return true;
6996
+ }
6997
+ function byteToHex2(byte) {
6998
+ const hexString = byte.toString(16);
6999
+ if (hexString.length === 1) {
7000
+ return `0${hexString}`;
7001
+ } else {
7002
+ return hexString;
7003
+ }
7004
+ }
7005
+ function decompressPointBytes2(bytes) {
7006
+ const hexString = bytes.reduce((acc, byte, ii) => `${byteToHex2(ii === 31 ? byte & -129 : byte)}${acc}`, "");
7007
+ const integerLiteralString = `0x${hexString}`;
7008
+ return BigInt(integerLiteralString);
7009
+ }
7010
+ function compressedPointBytesAreOnCurve2(bytes) {
7011
+ if (bytes.byteLength !== 32) {
7012
+ return false;
7013
+ }
7014
+ const y = decompressPointBytes2(bytes);
7015
+ return pointIsOnCurve2(y, bytes[31]);
7016
+ }
7017
+ var MAX_SEED_LENGTH2 = 32;
7018
+ var MAX_SEEDS2 = 16;
7019
+ var PDA_MARKER_BYTES2 = [
7020
+ // The string 'ProgramDerivedAddress'
7021
+ 80,
7022
+ 114,
7023
+ 111,
7024
+ 103,
7025
+ 114,
7026
+ 97,
7027
+ 109,
7028
+ 68,
7029
+ 101,
7030
+ 114,
7031
+ 105,
7032
+ 118,
7033
+ 101,
7034
+ 100,
7035
+ 65,
7036
+ 100,
7037
+ 100,
7038
+ 114,
7039
+ 101,
7040
+ 115,
7041
+ 115
7042
+ ];
7043
+ async function createProgramDerivedAddress2({ programAddress, seeds }) {
7044
+ assertDigestCapabilityIsAvailable2();
7045
+ if (seeds.length > MAX_SEEDS2) {
7046
+ throw new SolanaError2(SOLANA_ERROR__ADDRESSES__MAX_NUMBER_OF_PDA_SEEDS_EXCEEDED2, {
7047
+ actual: seeds.length,
7048
+ maxSeeds: MAX_SEEDS2
7049
+ });
7050
+ }
7051
+ let textEncoder;
7052
+ const seedBytes = seeds.reduce((acc, seed, ii) => {
7053
+ const bytes = typeof seed === "string" ? (textEncoder ||= new TextEncoder()).encode(seed) : seed;
7054
+ if (bytes.byteLength > MAX_SEED_LENGTH2) {
7055
+ throw new SolanaError2(SOLANA_ERROR__ADDRESSES__MAX_PDA_SEED_LENGTH_EXCEEDED2, {
7056
+ actual: bytes.byteLength,
7057
+ index: ii,
7058
+ maxSeedLength: MAX_SEED_LENGTH2
7059
+ });
7060
+ }
7061
+ acc.push(...bytes);
7062
+ return acc;
7063
+ }, []);
7064
+ const base58EncodedAddressCodec = getAddressCodec2();
7065
+ const programAddressBytes = base58EncodedAddressCodec.encode(programAddress);
7066
+ const addressBytesBuffer = await crypto.subtle.digest(
7067
+ "SHA-256",
7068
+ new Uint8Array([...seedBytes, ...programAddressBytes, ...PDA_MARKER_BYTES2])
7069
+ );
7070
+ const addressBytes = new Uint8Array(addressBytesBuffer);
7071
+ if (compressedPointBytesAreOnCurve2(addressBytes)) {
7072
+ throw new SolanaError2(SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE2);
7073
+ }
7074
+ return base58EncodedAddressCodec.decode(addressBytes);
7075
+ }
7076
+ async function getProgramDerivedAddress2({
7077
+ programAddress,
7078
+ seeds
7079
+ }) {
7080
+ let bumpSeed = 255;
7081
+ while (bumpSeed > 0) {
7082
+ try {
7083
+ const address22 = await createProgramDerivedAddress2({
7084
+ programAddress,
7085
+ seeds: [...seeds, new Uint8Array([bumpSeed])]
7086
+ });
7087
+ return [address22, bumpSeed];
7088
+ } catch (e5) {
7089
+ if (isSolanaError2(e5, SOLANA_ERROR__ADDRESSES__INVALID_SEEDS_POINT_ON_CURVE2)) {
7090
+ bumpSeed--;
7091
+ } else {
7092
+ throw e5;
7093
+ }
7094
+ }
7095
+ }
7096
+ throw new SolanaError2(SOLANA_ERROR__ADDRESSES__FAILED_TO_FIND_VIABLE_PDA_BUMP_SEED2);
7097
+ }
7098
+
7099
+ // ../../node_modules/.pnpm/@solana+codecs-numbers@8.4.0_typescript@6.0.3/node_modules/@solana/codecs-numbers/dist/index.node.mjs
7100
+ function assertNumberIsBetweenForCodec2(codecDescription, min, max, value) {
7101
+ if (value < min || value > max) {
7102
+ throw new SolanaError2(SOLANA_ERROR__CODECS__NUMBER_OUT_OF_RANGE2, {
7103
+ codecDescription,
7104
+ max,
7105
+ min,
7106
+ value
7107
+ });
7108
+ }
7109
+ }
7110
+ function isLittleEndian2(config) {
7111
+ return config?.endian === 1 ? false : true;
7112
+ }
7113
+ function numberEncoderFactory2(input) {
7114
+ return createEncoder2({
7115
+ fixedSize: input.size,
7116
+ write(value, bytes, offset) {
7117
+ if (input.range) {
7118
+ assertNumberIsBetweenForCodec2(input.name, input.range[0], input.range[1], value);
7119
+ }
7120
+ const arrayBuffer = new ArrayBuffer(input.size);
7121
+ input.set(new DataView(arrayBuffer), value, isLittleEndian2(input.config));
7122
+ bytes.set(new Uint8Array(arrayBuffer), offset);
7123
+ return offset + input.size;
7124
+ }
7125
+ });
7126
+ }
7127
+ var getU64Encoder2 = (config = {}) => numberEncoderFactory2({
7128
+ config,
7129
+ name: "u64",
7130
+ range: [0n, BigInt("0xffffffffffffffff")],
7131
+ set: (view, value, le) => view.setBigUint64(0, BigInt(value), le),
7132
+ size: 8
7133
+ });
7134
+ var getU8Encoder2 = () => numberEncoderFactory2({
7135
+ name: "u8",
7136
+ range: [0, Number("0xff")],
7137
+ set: (view, value) => view.setUint8(0, Number(value)),
7138
+ size: 1
7139
+ });
7140
+
7141
+ // ../../node_modules/.pnpm/@solana+codecs-data-structures@8.4.0_typescript@6.0.3/node_modules/@solana/codecs-data-structures/dist/index.node.mjs
7142
+ function sumCodecSizes2(sizes) {
7143
+ return sizes.reduce((all, size) => all === null || size === null ? null : all + size, 0);
7144
+ }
7145
+ function getFixedSize2(codec) {
7146
+ return isFixedSize2(codec) ? codec.fixedSize : null;
7147
+ }
7148
+ function getMaxSize2(codec) {
7149
+ return isFixedSize2(codec) ? codec.fixedSize : codec.maxSize ?? null;
7150
+ }
7151
+ function getStructEncoder2(fields) {
7152
+ const fieldCodecs = fields.map(([, codec]) => codec);
7153
+ const fixedSize = sumCodecSizes2(fieldCodecs.map(getFixedSize2));
7154
+ const maxSize = sumCodecSizes2(fieldCodecs.map(getMaxSize2)) ?? void 0;
7155
+ return createEncoder2({
7156
+ ...fixedSize === null ? {
7157
+ getSizeFromValue: (value) => fields.map(([key, codec]) => getEncodedSize2(value[key], codec)).reduce((all, one) => all + one, 0),
7158
+ maxSize
7159
+ } : { fixedSize },
7160
+ write: (struct, bytes, offset) => {
7161
+ fields.forEach(([key, codec]) => {
7162
+ offset = codec.write(struct[key], bytes, offset);
7163
+ });
7164
+ return offset;
7165
+ }
7166
+ });
7167
+ }
7168
+
7169
+ // ../../node_modules/.pnpm/@solana+instructions@8.4.0_typescript@6.0.3/node_modules/@solana/instructions/dist/index.node.mjs
7170
+ var AccountRole2 = /* @__PURE__ */ ((AccountRole22) => {
7171
+ AccountRole22[AccountRole22["WRITABLE_SIGNER"] = /* 3 */
7172
+ 3] = "WRITABLE_SIGNER";
7173
+ AccountRole22[AccountRole22["READONLY_SIGNER"] = /* 2 */
7174
+ 2] = "READONLY_SIGNER";
7175
+ AccountRole22[AccountRole22["WRITABLE"] = /* 1 */
7176
+ 1] = "WRITABLE";
7177
+ AccountRole22[AccountRole22["READONLY"] = /* 0 */
7178
+ 0] = "READONLY";
7179
+ return AccountRole22;
7180
+ })(AccountRole2 || {});
7181
+ var IS_SIGNER_BITMASK2 = 2;
7182
+ function upgradeRoleToSigner2(role) {
7183
+ return role | IS_SIGNER_BITMASK2;
7184
+ }
7185
+
7186
+ // ../../node_modules/.pnpm/@solana+signers@8.4.0_typescript@6.0.3/node_modules/@solana/signers/dist/index.node.mjs
7187
+ function isTransactionModifyingSigner2(value) {
7188
+ return "modifyAndSignTransactions" in value && typeof value.modifyAndSignTransactions === "function";
7189
+ }
7190
+ function isTransactionPartialSigner2(value) {
7191
+ return "signTransactions" in value && typeof value.signTransactions === "function";
7192
+ }
7193
+ function isTransactionSendingSigner2(value) {
7194
+ return "signAndSendTransactions" in value && typeof value.signAndSendTransactions === "function";
7195
+ }
7196
+ function isTransactionSigner2(value) {
7197
+ return isTransactionPartialSigner2(value) || isTransactionModifyingSigner2(value) || isTransactionSendingSigner2(value);
7198
+ }
7199
+ var o4 = globalThis.TextEncoder;
7200
+
7201
+ // ../../node_modules/.pnpm/@solana+program-client-core@8.4.0_typescript@6.0.3/node_modules/@solana/program-client-core/dist/index.node.mjs
5838
7202
  function getNonNullResolvedInstructionInput(inputName, value) {
5839
7203
  if (value === null || value === void 0) {
5840
- throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_NON_NULL, {
7204
+ throw new SolanaError2(SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_NON_NULL2, {
5841
7205
  inputName
5842
7206
  });
5843
7207
  }
@@ -5857,7 +7221,7 @@ function getAccountMetaFactory(programAddress, optionalAccountStrategy) {
5857
7221
  return (inputName, account) => {
5858
7222
  if (!account.value) {
5859
7223
  if (optionalAccountStrategy === "omitted") return;
5860
- return Object.freeze({ address: programAddress, role: AccountRole.READONLY });
7224
+ return Object.freeze({ address: programAddress, role: AccountRole2.READONLY });
5861
7225
  }
5862
7226
  if (hasExplicitRole(account.value)) {
5863
7227
  return Object.freeze({
@@ -5869,14 +7233,14 @@ function getAccountMetaFactory(programAddress, optionalAccountStrategy) {
5869
7233
  const idlIsSigner = account.isSigner ?? "either";
5870
7234
  const isSigner = idlIsSigner !== false && isResolvedInstructionAccountSigner(account.value);
5871
7235
  if (!isSigner && idlIsSigner === true) {
5872
- throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_SIGNER, {
7236
+ throw new SolanaError2(SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_SIGNER2, {
5873
7237
  inputName
5874
7238
  });
5875
7239
  }
5876
- const writableRole = account.isWritable ? AccountRole.WRITABLE : AccountRole.READONLY;
7240
+ const writableRole = account.isWritable ? AccountRole2.WRITABLE : AccountRole2.READONLY;
5877
7241
  return Object.freeze({
5878
7242
  address: getAddressFromResolvedInstructionAccount(inputName, account.value),
5879
- role: isSigner ? upgradeRoleToSigner(writableRole) : writableRole,
7243
+ role: isSigner ? upgradeRoleToSigner2(writableRole) : writableRole,
5880
7244
  ...isSigner ? { signer: account.value } : {}
5881
7245
  });
5882
7246
  };
@@ -5885,7 +7249,7 @@ function hasExplicitRole(value) {
5885
7249
  return typeof value === "object" && "role" in value && typeof value.role === "number";
5886
7250
  }
5887
7251
  function isResolvedInstructionAccountSigner(value) {
5888
- return !!value && typeof value === "object" && "address" in value && typeof value.address === "string" && isTransactionSigner(value);
7252
+ return !!value && typeof value === "object" && "address" in value && typeof value.address === "string" && isTransactionSigner2(value);
5889
7253
  }
5890
7254
 
5891
7255
  // ../../node_modules/.pnpm/@solana-program+token@0.17.0_@solana+kit@8.4.0/node_modules/@solana-program/token/dist/src/index.mjs
@@ -5893,18 +7257,18 @@ async function findAssociatedTokenPda(seeds, config = {}) {
5893
7257
  const {
5894
7258
  programAddress = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
5895
7259
  } = config;
5896
- return await getProgramDerivedAddress({
7260
+ return await getProgramDerivedAddress2({
5897
7261
  programAddress,
5898
7262
  seeds: [
5899
- getAddressEncoder().encode(seeds.owner),
5900
- getAddressEncoder().encode(seeds.tokenProgram),
5901
- getAddressEncoder().encode(seeds.mint)
7263
+ getAddressEncoder2().encode(seeds.owner),
7264
+ getAddressEncoder2().encode(seeds.tokenProgram),
7265
+ getAddressEncoder2().encode(seeds.mint)
5902
7266
  ]
5903
7267
  });
5904
7268
  }
5905
7269
  var CREATE_ASSOCIATED_TOKEN_IDEMPOTENT_DISCRIMINATOR = 1;
5906
7270
  function getCreateAssociatedTokenIdempotentInstructionDataEncoder() {
5907
- return transformEncoder(getStructEncoder([["discriminator", getU8Encoder()]]), (value) => ({
7271
+ return transformEncoder2(getStructEncoder2([["discriminator", getU8Encoder2()]]), (value) => ({
5908
7272
  ...value,
5909
7273
  discriminator: CREATE_ASSOCIATED_TOKEN_IDEMPOTENT_DISCRIMINATOR
5910
7274
  }));
@@ -5942,11 +7306,11 @@ function getCreateAssociatedTokenIdempotentInstruction(input, config) {
5942
7306
  }
5943
7307
  var TRANSFER_CHECKED_DISCRIMINATOR = 12;
5944
7308
  function getTransferCheckedInstructionDataEncoder() {
5945
- return transformEncoder(
5946
- getStructEncoder([
5947
- ["discriminator", getU8Encoder()],
5948
- ["amount", getU64Encoder()],
5949
- ["decimals", getU8Encoder()]
7309
+ return transformEncoder2(
7310
+ getStructEncoder2([
7311
+ ["discriminator", getU8Encoder2()],
7312
+ ["amount", getU64Encoder2()],
7313
+ ["decimals", getU8Encoder2()]
5950
7314
  ]),
5951
7315
  (value) => ({ ...value, discriminator: TRANSFER_CHECKED_DISCRIMINATOR })
5952
7316
  );
@@ -6278,6 +7642,9 @@ async function signWalletWrite(scope, change) {
6278
7642
  }
6279
7643
 
6280
7644
  // src/lib/tap-enrol.ts
7645
+ var TAP_WAIT_POLL_INTERVAL_MS = 3e3;
7646
+ var TAP_WAIT_DEFAULT_TIMEOUT_SECONDS = 900;
7647
+ var TAP_WAIT_MAX_TIMEOUT_SECONDS = 3600;
6281
7648
  function verifierEnrolmentMessage(chainId) {
6282
7649
  return `TAP keys cannot be enrolled on chain ${chainId} from the CLI: TAP is off there, or the verifier's registrar is not available. The stored key stays unenrolled. To use a key the verifier issued, import it with 'taskmarket tap import --key-id <id> --key-file <path> --signature-agent <url> --force'.`;
6283
7650
  }
@@ -6316,11 +7683,80 @@ async function enrolTapKey(stored, chainId) {
6316
7683
  { chainId, publicKey: stored.publicKey, ...proof },
6317
7684
  { headers: auth.headers }
6318
7685
  );
6319
- return data;
7686
+ if (data.status === "card_verification_required") {
7687
+ if (typeof data.sessionId !== "string" || data.sessionId.length === 0 || typeof data.verificationUrl !== "string" || data.verificationUrl.length === 0 || typeof data.expiresAt !== "string" || data.expiresAt.length === 0 || typeof data.chainId !== "number") {
7688
+ throw new Error(
7689
+ `The card verification handoff answer is malformed: ${JSON.stringify(data)}`
7690
+ );
7691
+ }
7692
+ return {
7693
+ status: "card_verification_required",
7694
+ sessionId: data.sessionId,
7695
+ verificationUrl: data.verificationUrl,
7696
+ expiresAt: data.expiresAt,
7697
+ chainId: data.chainId
7698
+ };
7699
+ }
7700
+ return {
7701
+ status: "enrolled",
7702
+ enrolment: {
7703
+ keyId: data.keyId,
7704
+ algorithm: data.algorithm,
7705
+ chainId: data.chainId,
7706
+ ...typeof data.signatureAgent === "string" ? { signatureAgent: data.signatureAgent } : {}
7707
+ }
7708
+ };
6320
7709
  } catch (error) {
6321
7710
  throw explainEnrolFailure(error, chainId);
6322
7711
  }
6323
7712
  }
7713
+ async function readTapEnrolmentStatus(sessionId) {
7714
+ const auth = await signReadAuth();
7715
+ if (!auth || Object.keys(auth.headers).length === 0) {
7716
+ throw new Error("Checking TAP enrolment status needs a wallet. Run `taskmarket init` first.");
7717
+ }
7718
+ const data = await apiGet(`/api/tap/enrolments/${encodeURIComponent(sessionId)}`, {
7719
+ headers: auth.headers
7720
+ });
7721
+ if (typeof data !== "object" || data === null || data.status !== "pending" && data.status !== "completed" && data.status !== "expired" || typeof data.chainId !== "number") {
7722
+ throw new Error(`The TAP enrolment status answer is malformed: ${JSON.stringify(data)}`);
7723
+ }
7724
+ return data;
7725
+ }
7726
+ async function waitForTapEnrolment(sessionId, opts) {
7727
+ const pollIntervalMs = opts.pollIntervalMs ?? TAP_WAIT_POLL_INTERVAL_MS;
7728
+ const sleep4 = opts.sleep ?? ((ms2) => new Promise((r) => setTimeout(r, ms2)));
7729
+ const now = opts.now ?? (() => Date.now());
7730
+ const deadline = now() + opts.timeoutMs;
7731
+ while (true) {
7732
+ const state = await readTapEnrolmentStatus(sessionId);
7733
+ if (state.status === "completed") {
7734
+ if (typeof state.keyId !== "string" || state.keyId.length === 0) {
7735
+ throw new Error(
7736
+ `The completed TAP enrolment session has no key id: ${JSON.stringify(state)}`
7737
+ );
7738
+ }
7739
+ return {
7740
+ keyId: state.keyId,
7741
+ algorithm: state.algorithm,
7742
+ chainId: state.chainId,
7743
+ ...typeof state.signatureAgent === "string" ? { signatureAgent: state.signatureAgent } : {}
7744
+ };
7745
+ }
7746
+ if (state.status === "expired") {
7747
+ throw new Error(
7748
+ "The TAP card verification session expired before completion. Run 'taskmarket tap enrol' again to get a new verification link."
7749
+ );
7750
+ }
7751
+ const remainingMs = deadline - now();
7752
+ if (remainingMs <= 0) {
7753
+ throw new Error(
7754
+ "Timed out waiting for Visa card verification. Have the agent owner finish at the verification link or run 'taskmarket tap enrol' again."
7755
+ );
7756
+ }
7757
+ await sleep4(Math.min(pollIntervalMs, remainingMs));
7758
+ }
7759
+ }
6324
7760
  function withTapEnrolment(stored, enrolment) {
6325
7761
  if (typeof enrolment.keyId !== "string" || typeof enrolment.chainId !== "number") {
6326
7762
  throw new Error(`The enrolment answer has no key id: ${JSON.stringify(enrolment)}`);
@@ -6413,6 +7849,7 @@ async function addSolanaWallet() {
6413
7849
  await saveKeystore({ ...keystore, ...solanaKeystoreFields(dek, wallet) });
6414
7850
  printResult({ address: keystore.walletAddress, solanaAddress: wallet.address });
6415
7851
  }
7852
+ var TAP_CARD_VERIFICATION_NEXT_STEP = "Have the agent owner open verificationUrl in a browser to link a Visa card, then re-run 'taskmarket tap enrol' (or run with --wait).";
6416
7853
  async function tryEnrolTapKey(tapKey, chainId, warnings) {
6417
7854
  const retryCommand = "taskmarket tap enrol";
6418
7855
  if (chainId === void 0) {
@@ -6423,12 +7860,22 @@ async function tryEnrolTapKey(tapKey, chainId, warnings) {
6423
7860
  { retryCommand }
6424
7861
  )
6425
7862
  );
6426
- return tapKey;
7863
+ return { tapKey };
6427
7864
  }
6428
7865
  try {
6429
- const enrolled = withTapEnrolment(tapKey, await enrolTapKey(tapKey, chainId));
7866
+ const outcome = await enrolTapKey(tapKey, chainId);
7867
+ if (outcome.status === "card_verification_required") {
7868
+ return {
7869
+ tapKey,
7870
+ tapVerification: {
7871
+ ...outcome,
7872
+ nextStep: TAP_CARD_VERIFICATION_NEXT_STEP
7873
+ }
7874
+ };
7875
+ }
7876
+ const enrolled = withTapEnrolment(tapKey, outcome.enrolment);
6430
7877
  await saveKeystore({ ...await loadKeystore(), tapKey: enrolled });
6431
- return enrolled;
7878
+ return { tapKey: enrolled };
6432
7879
  } catch (err) {
6433
7880
  const reason = err?.envelope?.reason;
6434
7881
  warnings.push(
@@ -6438,7 +7885,7 @@ async function tryEnrolTapKey(tapKey, chainId, warnings) {
6438
7885
  { chainId, ...typeof reason === "string" ? { reason } : {}, retryCommand }
6439
7886
  )
6440
7887
  );
6441
- return tapKey;
7888
+ return { tapKey };
6442
7889
  }
6443
7890
  }
6444
7891
  async function addTapKey() {
@@ -6453,8 +7900,19 @@ async function addTapKey() {
6453
7900
  const created = storedTapKey(dek, null, generateTapKey(), /* @__PURE__ */ new Date(), "created");
6454
7901
  await saveKeystore({ ...keystore, tapKey: created });
6455
7902
  const warnings = [];
6456
- const tapKey = await tryEnrolTapKey(created, selectedNetworkOrUndefined()?.chainId, warnings);
6457
- printResult({ address: keystore.walletAddress, tapKey: tapKeySummary(tapKey) }, { warnings });
7903
+ const { tapKey, tapVerification } = await tryEnrolTapKey(
7904
+ created,
7905
+ selectedNetworkOrUndefined()?.chainId,
7906
+ warnings
7907
+ );
7908
+ printResult(
7909
+ {
7910
+ address: keystore.walletAddress,
7911
+ tapKey: tapKeySummary(tapKey),
7912
+ ...tapVerification ? { tapVerification } : {}
7913
+ },
7914
+ { warnings }
7915
+ );
6458
7916
  }
6459
7917
  var initCommand = new Command2("init").description(
6460
7918
  "Create and register this machine's agent wallet (one-time; refuses when a wallet exists)"
@@ -6481,7 +7939,7 @@ var initCommand = new Command2("init").description(
6481
7939
  return;
6482
7940
  }
6483
7941
  await ensureInitNetwork();
6484
- const { privateKey, address: address2 } = generateKeypair();
7942
+ const { privateKey, address: address3 } = generateKeypair();
6485
7943
  const solanaWallet = await generateSolanaKeypair();
6486
7944
  const publicKey = deriveCompressedPublicKey(privateKey);
6487
7945
  const legalBundle = LegalBundleSchema.parse(await apiGet("/api/legal/current"));
@@ -6489,11 +7947,11 @@ var initCommand = new Command2("init").description(
6489
7947
  assumeYes: Boolean(opts.yes),
6490
7948
  bundle: legalBundle,
6491
7949
  signMessage: (message) => privateKeyToAccount(privateKey).signMessage({ message }),
6492
- walletAddress: address2
7950
+ walletAddress: address3
6493
7951
  }) : void 0;
6494
7952
  const deviceRegisterSignature = await privateKeyToAccount(
6495
7953
  privateKey
6496
- ).signMessage({ message: buildDeviceRegisterMessage(address2) });
7954
+ ).signMessage({ message: buildDeviceRegisterMessage(address3) });
6497
7955
  const {
6498
7956
  deviceId,
6499
7957
  apiToken,
@@ -6503,14 +7961,14 @@ var initCommand = new Command2("init").description(
6503
7961
  legalReceipt: legalAcceptance?.receipt,
6504
7962
  publicKey,
6505
7963
  signature: deviceRegisterSignature,
6506
- walletAddress: address2
7964
+ walletAddress: address3
6507
7965
  });
6508
7966
  const encryptedKey = encryptPrivateKey(deviceEncryptionKey, privateKey);
6509
7967
  const createdTapKey = opts.tap ? storedTapKey(deviceEncryptionKey, null, generateTapKey(), /* @__PURE__ */ new Date(), "created") : void 0;
6510
7968
  let agentId = initialAgentId;
6511
7969
  const newKeystore = {
6512
7970
  encryptedKey,
6513
- walletAddress: address2,
7971
+ walletAddress: address3,
6514
7972
  deviceId,
6515
7973
  apiToken,
6516
7974
  agentId,
@@ -6537,7 +7995,7 @@ var initCommand = new Command2("init").description(
6537
7995
  return;
6538
7996
  }
6539
7997
  if (!agentId) {
6540
- agentId = await pollAgentId(address2);
7998
+ agentId = await pollAgentId(address3);
6541
7999
  if (agentId) {
6542
8000
  const keystore = await loadKeystore();
6543
8001
  await saveKeystore(
@@ -6560,10 +8018,10 @@ var initCommand = new Command2("init").description(
6560
8018
  renderFailure(err);
6561
8019
  return;
6562
8020
  }
6563
- const tapKey = createdTapKey ? await tryEnrolTapKey(createdTapKey, selectedNetwork().chainId, warnings) : void 0;
8021
+ const tapAttempt = createdTapKey ? await tryEnrolTapKey(createdTapKey, selectedNetwork().chainId, warnings) : void 0;
6564
8022
  printResult(
6565
8023
  {
6566
- address: address2,
8024
+ address: address3,
6567
8025
  agentId,
6568
8026
  solanaAddress: solanaWallet.address,
6569
8027
  network: chain?.networkName ?? networkInfo?.networkName,
@@ -6571,9 +8029,10 @@ var initCommand = new Command2("init").description(
6571
8029
  paymentMethod: chain?.paymentMethod,
6572
8030
  feeModel: chain?.feeModel,
6573
8031
  emailAddress,
6574
- ...tapKey ? { tapKey: tapKeySummary(tapKey) } : {}
8032
+ ...tapAttempt ? { tapKey: tapKeySummary(tapAttempt.tapKey) } : {},
8033
+ ...tapAttempt?.tapVerification ? { tapVerification: tapAttempt.tapVerification } : {}
6575
8034
  },
6576
- { warnings, next: nextAfterInit({ address: address2, chainId: selectedNetwork().chainId }) }
8035
+ { warnings, next: nextAfterInit({ address: address3, chainId: selectedNetwork().chainId }) }
6577
8036
  );
6578
8037
  });
6579
8038
 
@@ -6607,22 +8066,22 @@ var startCommand = new Command3("start").description(
6607
8066
  printError("No keystore found. Run `taskmarket init` first.");
6608
8067
  return;
6609
8068
  }
6610
- const address2 = auth.walletAddress;
8069
+ const address3 = auth.walletAddress;
6611
8070
  const chainId = selectedNetwork().chainId;
6612
8071
  const [balance, queue, withdrawal, open] = await Promise.all([
6613
8072
  settle(
6614
8073
  () => apiGet(
6615
- `/api/wallet/balance?${new URLSearchParams({ address: address2, chainId: String(chainId) })}`
8074
+ `/api/wallet/balance?${new URLSearchParams({ address: address3, chainId: String(chainId) })}`
6616
8075
  )
6617
8076
  ),
6618
8077
  settle(
6619
- () => apiGet(`/api/agents/action-queue?${new URLSearchParams({ address: address2, limit: "50" })}`, {
8078
+ () => apiGet(`/api/agents/action-queue?${new URLSearchParams({ address: address3, limit: "50" })}`, {
6620
8079
  headers: auth.headers
6621
8080
  })
6622
8081
  ),
6623
8082
  settle(
6624
8083
  () => apiGet(
6625
- `/api/wallet/withdrawal-address?${new URLSearchParams({ address: address2, chainId: String(chainId) })}`
8084
+ `/api/wallet/withdrawal-address?${new URLSearchParams({ address: address3, chainId: String(chainId) })}`
6626
8085
  )
6627
8086
  ),
6628
8087
  settle(
@@ -6636,7 +8095,7 @@ var startCommand = new Command3("start").description(
6636
8095
  const needsYou = queue ? queue.total : null;
6637
8096
  printResult(
6638
8097
  {
6639
- address: address2,
8098
+ address: address3,
6640
8099
  network: selectedNetwork().name,
6641
8100
  chainId,
6642
8101
  balance: balance ? {
@@ -6661,7 +8120,7 @@ var startCommand = new Command3("start").description(
6661
8120
  },
6662
8121
  {
6663
8122
  next: nextForHome({
6664
- address: address2,
8123
+ address: address3,
6665
8124
  chainId,
6666
8125
  balanceBaseUnits: balance?.balanceBaseUnits,
6667
8126
  needsYou: needsYou ?? 0,
@@ -7060,9 +8519,9 @@ identityCommand.command("status").description("Check identity registration statu
7060
8519
  identityCommand.command("feedback").description(
7061
8520
  "Show the agent your requester feedback is bound to and the protocol reputation feedback values"
7062
8521
  ).option("--address <address>", "Wallet to read (defaults to this wallet)").action(async (options) => {
7063
- const address2 = options.address ?? (await loadKeystore()).walletAddress;
8522
+ const address3 = options.address ?? (await loadKeystore()).walletAddress;
7064
8523
  const result = await apiGet(
7065
- `/api/identity/requester-feedback?address=${address2}&chainId=${selectedNetwork().chainId}`
8524
+ `/api/identity/requester-feedback?address=${address3}&chainId=${selectedNetwork().chainId}`
7066
8525
  );
7067
8526
  printResult(result);
7068
8527
  });
@@ -7174,12 +8633,12 @@ async function platformView(opts) {
7174
8633
  printResult(await apiGet(withChainId(`/api/stats/activity-heatmap?${query(input2)}`)));
7175
8634
  return true;
7176
8635
  }
7177
- let address2 = opts.address;
7178
- if (!address2 && !opts.agent) {
7179
- address2 = (await loadKeystore()).walletAddress;
8636
+ let address3 = opts.address;
8637
+ if (!address3 && !opts.agent) {
8638
+ address3 = (await loadKeystore()).walletAddress;
7180
8639
  }
7181
8640
  const input = parseInput(AgentTimeSeriesInputSchema, {
7182
- address: opts.agent ? void 0 : address2,
8641
+ address: opts.agent ? void 0 : address3,
7183
8642
  agentId: opts.agent,
7184
8643
  range: opts.range,
7185
8644
  bucket: opts.bucket
@@ -7194,20 +8653,20 @@ var statsCommand = new Command7("stats").description("View agent or platform-wid
7194
8653
  renderFailure(err);
7195
8654
  return;
7196
8655
  }
7197
- let address2 = opts.address;
7198
- if (!address2) {
8656
+ let address3 = opts.address;
8657
+ if (!address3) {
7199
8658
  const keystore = await loadKeystore();
7200
- address2 = keystore.walletAddress;
8659
+ address3 = keystore.walletAddress;
7201
8660
  }
7202
8661
  const statsQuery = withChainId(
7203
- opts.agent ? `/api/agents/stats?agentId=${opts.agent}` : `/api/agents/stats?address=${address2}`
8662
+ opts.agent ? `/api/agents/stats?agentId=${opts.agent}` : `/api/agents/stats?address=${address3}`
7204
8663
  );
7205
8664
  const [result, balanceResult, dreamsResult, exchangeRateResult] = await Promise.all([
7206
8665
  apiGet(statsQuery),
7207
8666
  apiGet(
7208
- `/api/wallet/balance?address=${address2}&chainId=${selectedNetwork().chainId}`
8667
+ `/api/wallet/balance?address=${address3}&chainId=${selectedNetwork().chainId}`
7209
8668
  ),
7210
- apiGet(withChainId(`/api/wallet/dreams-balance?address=${address2}`)).then(
8669
+ apiGet(withChainId(`/api/wallet/dreams-balance?address=${address3}`)).then(
7211
8670
  (r) => r
7212
8671
  ).catch(() => null),
7213
8672
  apiGet(withChainId("/api/wallet/exchange-rate")).then((r) => r).catch(() => null)
@@ -7333,11 +8792,11 @@ var statsCommand2 = new Command8("stats").description("Market totals and the act
7333
8792
  renderFailure(err);
7334
8793
  }
7335
8794
  });
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) => {
8795
+ 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) => {
7337
8796
  try {
7338
- if (!ADDRESS_PATTERN.test(address2)) throw new Error("address must be a 0x wallet address");
8797
+ if (!ADDRESS_PATTERN.test(address3)) throw new Error("address must be a 0x wallet address");
7339
8798
  const windowDays = parseRange(opts.range, "30");
7340
- const wanted = address2.toLowerCase();
8799
+ const wanted = address3.toLowerCase();
7341
8800
  const [snapshot, page] = await Promise.all([
7342
8801
  apiGet(snapshotPath(windowDays, NODE_LIMIT)),
7343
8802
  apiGet(
@@ -7373,8 +8832,8 @@ function directTarget(query4) {
7373
8832
  return { type: "task", id, command: `taskmarket task get ${id}` };
7374
8833
  }
7375
8834
  if (ADDRESS_PATTERN2.test(query4)) {
7376
- const address2 = query4.toLowerCase();
7377
- return { type: "address", address: address2, command: `taskmarket explorer address ${address2}` };
8835
+ const address3 = query4.toLowerCase();
8836
+ return { type: "address", address: address3, command: `taskmarket explorer address ${address3}` };
7378
8837
  }
7379
8838
  return null;
7380
8839
  }
@@ -8157,8 +9616,8 @@ function parseRequirementFilter(value, schema, flag) {
8157
9616
  }
8158
9617
 
8159
9618
  // src/lib/hook-registry.ts
8160
- async function fetchHookRegistry(address2) {
8161
- const query4 = address2 ? `?address=${address2}` : "";
9619
+ async function fetchHookRegistry(address3) {
9620
+ const query4 = address3 ? `?address=${address3}` : "";
8162
9621
  return await apiGet(withChainId(`/api/hooks/registry${query4}`));
8163
9622
  }
8164
9623
  async function describeHookListings(hooks, alwaysListed = [], known) {
@@ -8171,20 +9630,20 @@ async function describeHookListings(hooks, alwaysListed = [], known) {
8171
9630
  return null;
8172
9631
  }
8173
9632
  const listed = new Map(registry.listed.map((entry) => [entry.address.toLowerCase(), entry]));
8174
- const implicit = new Set(alwaysListed.map((address2) => address2.toLowerCase()));
9633
+ const implicit = new Set(alwaysListed.map((address3) => address3.toLowerCase()));
8175
9634
  const listings = [];
8176
9635
  const warnings = [];
8177
9636
  for (const raw of hooks) {
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 });
9637
+ const address3 = raw.toLowerCase();
9638
+ const entry = listed.get(address3);
9639
+ const isListed = entry !== void 0 || implicit.has(address3);
9640
+ listings.push({ address: address3, listed: isListed, name: entry?.name ?? null });
8182
9641
  if (!isListed) {
8183
9642
  warnings.push(
8184
9643
  cliWarning(
8185
9644
  "hook_unlisted",
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 }
9645
+ `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.`,
9646
+ { address: address3, chainId: registry.chainId }
8188
9647
  )
8189
9648
  );
8190
9649
  }
@@ -8766,8 +10225,8 @@ var FILLED_FLAGS = [
8766
10225
  ["evaluationWindow", "--evaluation-window"],
8767
10226
  ["evaluatorStake", "--evaluator-stake"]
8768
10227
  ];
8769
- async function fetchListedEvaluator(address2) {
8770
- const wallet = parseInput(EthAddressSchema, address2);
10228
+ async function fetchListedEvaluator(address3) {
10229
+ const wallet = parseInput(EthAddressSchema, address3);
8771
10230
  const params = new URLSearchParams({
8772
10231
  address: wallet,
8773
10232
  limit: "1",
@@ -8787,13 +10246,13 @@ async function fetchListedEvaluator(address2) {
8787
10246
  }
8788
10247
  return entry;
8789
10248
  }
8790
- async function evaluatorFlagsFromListing(address2, opts) {
10249
+ async function evaluatorFlagsFromListing(address3, opts) {
8791
10250
  for (const [key, flag] of FILLED_FLAGS) {
8792
10251
  if (opts[key] !== void 0) {
8793
10252
  throw new Error(`--evaluator-from-listing fills ${flag} from the listing; leave it out`);
8794
10253
  }
8795
10254
  }
8796
- const listing = await fetchListedEvaluator(address2);
10255
+ const listing = await fetchListedEvaluator(address3);
8797
10256
  const { feeBps, evaluationWindowHours, stakeUsd } = listing.service;
8798
10257
  return {
8799
10258
  listing,
@@ -9099,7 +10558,7 @@ var createCmd = new Command12("create").description("Create a new task (costs th
9099
10558
  "Only workers with one of these identities may claim, pitch, bid, submit proofs or submit work (comma-separated; any one is enough): erc8004:identity:registered, erc8004:reputation:reputable"
9100
10559
  ).option(
9101
10560
  "--require-verified <verifiers>",
9102
- "Only workers one of these verifiers passes may work on the task (comma-separated; any one is enough): tap:identity:known (any agent registered with TAP; the level to use) or tap:identity:verified (agents the verifier reviewed by hand; the verifier does not use this level yet). With --require-identity too, both must be met."
10561
+ "Only workers one of these verifiers passes may work on the task (comma-separated; any one is enough): tap:identity:verified (TAP Verified: any agent whose key the verifier lists). With --require-identity too, both must be met."
9103
10562
  ).option("--tags <tags>", "Comma-separated tags").option(
9104
10563
  "--capabilities <slugs>",
9105
10564
  "Comma-separated capability slugs the task needs, from `taskmarket capabilities` (active entries only; capped like a listing)"
@@ -9148,7 +10607,7 @@ var createCmd = new Command12("create").description("Create a new task (costs th
9148
10607
  "Attach the payout gate; it opens on its own this long from now, e.g. 48h, 7d (1h to 180d). Without --gated-by, link the gating task later with `taskmarket task link-gate`"
9149
10608
  ).option(
9150
10609
  "--gates <taskIds>",
9151
- "Make this task the gating task of your own gated tasks (repeat, or comma-separated; at most 16), each with a payout gate and no gating task yet: their payouts wait on this one. Not with --gated-by or --gate-deadline",
10610
+ "Make this task the gating task of your own gated tasks (repeat, or comma-separated; at most 16), each with a payout gate and no gating task yet: their payouts wait on this one. You must be each task's requester (the gate also accepts a project operator). Not with --gated-by or --gate-deadline",
9152
10611
  (value, previous = []) => [
9153
10612
  ...previous,
9154
10613
  ...value.split(",").map((id) => id.trim()).filter(Boolean)
@@ -9522,17 +10981,17 @@ async function runCreateTask(input, extra = {}) {
9522
10981
  const hookConfigs = /* @__PURE__ */ new Map();
9523
10982
  for (const raw of opts.hookConfig ?? []) {
9524
10983
  const separator = raw.indexOf("=");
9525
- const address2 = separator > 0 ? raw.slice(0, separator).trim() : "";
9526
- if (!ethAddrRe.test(address2)) {
10984
+ const address3 = separator > 0 ? raw.slice(0, separator).trim() : "";
10985
+ if (!ethAddrRe.test(address3)) {
9527
10986
  return void printError("--hook-config must be <address>=<config> with a valid hook address");
9528
10987
  }
9529
- if (!hooks.some((hook) => hook.toLowerCase() === address2.toLowerCase())) {
9530
- return void printError(`--hook-config names ${address2}, which is not attached with --hook`);
10988
+ if (!hooks.some((hook) => hook.toLowerCase() === address3.toLowerCase())) {
10989
+ return void printError(`--hook-config names ${address3}, which is not attached with --hook`);
9531
10990
  }
9532
- if (hookConfigs.has(address2.toLowerCase())) {
9533
- return void printError(`--hook-config is given twice for ${address2}`);
10991
+ if (hookConfigs.has(address3.toLowerCase())) {
10992
+ return void printError(`--hook-config is given twice for ${address3}`);
9534
10993
  }
9535
- hookConfigs.set(address2.toLowerCase(), raw.slice(separator + 1));
10994
+ hookConfigs.set(address3.toLowerCase(), raw.slice(separator + 1));
9536
10995
  }
9537
10996
  let hookRegistry = null;
9538
10997
  const needsRegistry = Boolean(opts.gateDeadline) || gatesTargets.length > 0 || [...hookConfigs.values()].some((value) => !value.trim().startsWith("0x"));
@@ -9870,7 +11329,7 @@ var listCmd = new Command13("list").alias("search").description("List available
9870
11329
  "Only tasks that require this worker identity: erc8004:identity:registered or erc8004:reputation:reputable"
9871
11330
  ).option(
9872
11331
  "--verified-by <verifier>",
9873
- "Only tasks that require this verifier: tap:identity:known or tap:identity:verified"
11332
+ "Only tasks that require this verifier: tap:identity:verified"
9874
11333
  ).option("--limit <n>", "Maximum results to return", "20").option(
9875
11334
  "--cursor <cursor>",
9876
11335
  "Cursor from previous page (nextCursor in JSON output); pass it with the same --sort and filters"
@@ -10053,12 +11512,12 @@ async function confirmStakeTerms(action, taskId, yes) {
10053
11512
  );
10054
11513
  return false;
10055
11514
  }
10056
- async function confirmStakeAffordable(address2, stake) {
11515
+ async function confirmStakeAffordable(address3, stake) {
10057
11516
  if (stake <= 0n) return true;
10058
11517
  let balance;
10059
11518
  try {
10060
11519
  const result = await apiGet(
10061
- `/api/wallet/balance?address=${address2}&chainId=${selectedNetwork().chainId}`
11520
+ `/api/wallet/balance?address=${address3}&chainId=${selectedNetwork().chainId}`
10062
11521
  );
10063
11522
  if (typeof result?.balanceBaseUnits !== "string") return true;
10064
11523
  balance = BigInt(result.balanceBaseUnits);
@@ -10897,12 +12356,12 @@ var listCmd2 = new Command20("list").description(
10897
12356
  if (tab === null) {
10898
12357
  return void printError(`--tab must be one of: ${HIRE_TABS.join(", ")}`);
10899
12358
  }
10900
- const address2 = opts.address ?? (await loadKeystore()).walletAddress;
12359
+ const address3 = opts.address ?? (await loadKeystore()).walletAddress;
10901
12360
  const result = await listTasks(cliTaskReadContext(), {
10902
12361
  status: "ALL",
10903
12362
  hire: true,
10904
12363
  // Offers to a worker are reserved hires; a requester's hires include quotes and requests.
10905
- ...opts.role === "worker" ? { hireKind: HireKind.enum.reserved, reservedWorker: address2 } : { requester: address2 },
12364
+ ...opts.role === "worker" ? { hireKind: HireKind.enum.reserved, reservedWorker: address3 } : { requester: address3 },
10906
12365
  hireState: opts.state,
10907
12366
  hireTab: tab,
10908
12367
  hireServiceId: opts.service,
@@ -11197,7 +12656,7 @@ var SubmissionPageSchema = TaskChildListSchema.pick({ cursor: true }).extend({
11197
12656
  });
11198
12657
  var submissionsCmd = new Command29("submissions").description("List submissions for a task").argument("<taskId>", "Task ID (0x-prefixed hex)").option(
11199
12658
  "--passed-check <provider>",
11200
- "Only submissions whose worker passed this check when submitting: erc8004:identity:registered, erc8004:reputation:reputable, tap:identity:known or tap:identity:verified"
12659
+ "Only submissions whose worker passed this check when submitting: erc8004:identity:registered, erc8004:reputation:reputable, or tap:identity:verified"
11201
12660
  ).option("--limit <n>", "Page size (1-500); without it every submission is listed").option("--cursor <id>", "Last returned id; read the following page").option("--ids <ids>", "Only these submissions: comma-separated ids (at most 50)").action(
11202
12661
  async (taskId, opts) => {
11203
12662
  const passedCheck = parseRequirementFilter(opts.passedCheck, CHECK_FILTER, "--passed-check");
@@ -11634,7 +13093,7 @@ var updateCmd = new Command41("update").description(
11634
13093
  "Replace the identity requirement (comma-separated, any one is enough: erc8004:identity:registered, erc8004:reputation:reputable; none clears it). Refused once a worker has committed."
11635
13094
  ).option(
11636
13095
  "--require-verified <verifiers>",
11637
- "Replace the verifier requirement (comma-separated, any one is enough: tap:identity:known, tap:identity:verified; none clears it). tap:identity:known accepts any agent registered with TAP; tap:identity:verified needs one the verifier reviewed by hand, a level it does not use yet. Refused once a worker has committed."
13096
+ "Replace the verifier requirement (comma-separated, any one is enough: tap:identity:verified; none clears it). tap:identity:verified (TAP Verified) accepts any agent whose key the verifier lists. Refused once a worker has committed."
11638
13097
  ).action(
11639
13098
  async (taskId, opts) => {
11640
13099
  const body = { taskId };
@@ -12055,7 +13514,7 @@ var unlockCmd = new Command49("unlock").description("Unlock a private task with
12055
13514
 
12056
13515
  // src/commands/task/invite.ts
12057
13516
  import { Command as Command50 } from "commander";
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) => {
13517
+ 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) => {
12059
13518
  const auth = await signReadAuth();
12060
13519
  if (!auth || Object.keys(auth.headers).length === 0) {
12061
13520
  printError("No keystore found. Run `taskmarket init` first.");
@@ -12064,7 +13523,7 @@ var inviteCmd = new Command50("invite").description("Invite a wallet to view a p
12064
13523
  try {
12065
13524
  const { data: result, idempotencyKey } = await apiPost(
12066
13525
  `/api/tasks/${taskId}/private-access/viewers`,
12067
- { taskId, viewerAddress: address2 },
13526
+ { taskId, viewerAddress: address3 },
12068
13527
  { headers: auth.headers }
12069
13528
  );
12070
13529
  printResult(result, { idempotencyKey });
@@ -12075,7 +13534,7 @@ var inviteCmd = new Command50("invite").description("Invite a wallet to view a p
12075
13534
 
12076
13535
  // src/commands/task/uninvite.ts
12077
13536
  import { Command as Command51 } from "commander";
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) => {
13537
+ 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) => {
12079
13538
  const auth = await signReadAuth();
12080
13539
  if (!auth || Object.keys(auth.headers).length === 0) {
12081
13540
  printError("No keystore found. Run `taskmarket init` first.");
@@ -12083,7 +13542,7 @@ var uninviteCmd = new Command51("uninvite").description("Remove a wallet from a
12083
13542
  }
12084
13543
  try {
12085
13544
  const { data: result, idempotencyKey } = await apiDelete(
12086
- `/api/tasks/${taskId}/private-access/viewers/${encodeURIComponent(address2)}`,
13545
+ `/api/tasks/${taskId}/private-access/viewers/${encodeURIComponent(address3)}`,
12087
13546
  { headers: auth.headers }
12088
13547
  );
12089
13548
  printResult(result, { idempotencyKey });
@@ -12496,7 +13955,7 @@ async function runAgentCommand(options) {
12496
13955
  try {
12497
13956
  const { assertAgentCompatibility } = await import("./compatibility-636WJOEX.js");
12498
13957
  const pi = assertAgentCompatibility();
12499
- const { runAgent } = await import("./launch-K5666QYB.js");
13958
+ const { runAgent } = await import("./launch-2YOUARKA.js");
12500
13959
  result = await runAgent({
12501
13960
  model: options.model,
12502
13961
  pi,
@@ -12569,25 +14028,25 @@ function wholeNumber(flag, value) {
12569
14028
  function hoursToSecs2(flag, value) {
12570
14029
  return Math.round(positiveNumber(flag, value) * HOUR);
12571
14030
  }
12572
- async function fetchListing(address2) {
14031
+ async function fetchListing(address3) {
12573
14032
  const auth = await signReadAuth();
12574
- const result = await apiGet(`/api/agents/${address2}/listing`, { headers: auth?.headers });
14033
+ const result = await apiGet(`/api/agents/${address3}/listing`, { headers: auth?.headers });
12575
14034
  return AgentListingSchema.parse(result);
12576
14035
  }
12577
- async function fetchServiceRecords(address2, chainId) {
14036
+ async function fetchServiceRecords(address3, chainId) {
12578
14037
  try {
12579
14038
  const params = new URLSearchParams({ chainId: String(chainId) });
12580
14039
  const parsed = AgentServiceRecordsResponseSchema.safeParse(
12581
- await apiGet(`/api/agents/${address2}/hires/services?${params.toString()}`)
14040
+ await apiGet(`/api/agents/${address3}/hires/services?${params.toString()}`)
12582
14041
  );
12583
14042
  return parsed.success ? parsed.data : null;
12584
14043
  } catch {
12585
14044
  return null;
12586
14045
  }
12587
14046
  }
12588
- async function fetchHireAvailability(address2) {
14047
+ async function fetchHireAvailability(address3) {
12589
14048
  try {
12590
- const params = new URLSearchParams({ worker: address2 });
14049
+ const params = new URLSearchParams({ worker: address3 });
12591
14050
  const parsed = HireAvailabilitySchema.safeParse(
12592
14051
  await apiGet(`/api/tasks/hire-availability?${params.toString()}`)
12593
14052
  );
@@ -12758,11 +14217,16 @@ function serviceInputFromStored(service) {
12758
14217
  deliveryPeriodSecs: service.deliveryPeriodSecs,
12759
14218
  ...service.acceptBySecs !== null ? { acceptBySecs: service.acceptBySecs } : {},
12760
14219
  ...service.terms ? { terms: service.terms } : {},
12761
- ...service.requiresEvaluator ? { requiresEvaluator: true } : {}
14220
+ ...service.requiresEvaluator ? { requiresEvaluator: true } : {},
14221
+ ...service.hireAcceptPolicy === "ask" ? { hireAcceptPolicy: "ask" } : {}
12762
14222
  };
12763
14223
  }
12764
14224
  if (service.kind === "quote") {
12765
- return { ...base, ...service.requiresEvaluator ? { requiresEvaluator: true } : {} };
14225
+ return {
14226
+ ...base,
14227
+ ...service.requiresEvaluator ? { requiresEvaluator: true } : {},
14228
+ ...service.hireAcceptPolicy === "ask" ? { hireAcceptPolicy: "ask" } : {}
14229
+ };
12766
14230
  }
12767
14231
  return {
12768
14232
  ...base,
@@ -12801,6 +14265,13 @@ function buildServiceInput(opts, base = {}) {
12801
14265
  if (opts.requiresEvaluator) service.requiresEvaluator = true;
12802
14266
  else delete service.requiresEvaluator;
12803
14267
  }
14268
+ if (opts.hirePolicy !== void 0) {
14269
+ const policy = parseInput(ServiceHireAcceptPolicySchema, opts.hirePolicy);
14270
+ if (service.kind === "evaluation") {
14271
+ throw new Error("--hire-policy applies only to fixed and quote services");
14272
+ }
14273
+ service.hireAcceptPolicy = policy;
14274
+ }
12804
14275
  return service;
12805
14276
  }
12806
14277
  function addServiceOptions(command) {
@@ -12813,7 +14284,10 @@ function addServiceOptions(command) {
12813
14284
  ).option("--title <title>", "Service title").option("--description <text>", "What the service covers").option("--deliverable <text>", "What the requester receives").option("--specialty <label>", "A specialty label or slug (repeatable; at least one)", collect3).option("--chain <chain>", "A chain requesters may pay on, by name or id (repeatable)", collect3).option("--all-chains", "Accept every chain you are registered on (the default)").option("--price <usd>", "fixed: price in USD, e.g. 25 or 12.50").option("--delivery <hours>", "fixed: delivery period in hours").option("--accept-by <hours>", "fixed: hours you have to accept a hire (default 72)").option("--terms-preset <name>", "fixed: settlement terms preset for hires").option("--fee-bps <bps>", "evaluation: your fee in basis points").option("--evaluation-window <hours>", "evaluation: hours you take to evaluate").option("--stake <usd>", "evaluation: stake the requester puts behind you, in USD").option(
12814
14285
  "--requires-evaluator",
12815
14286
  "fixed or quote: a hire of this service must name an evaluator before it is accepted"
12816
- ).option("--no-requires-evaluator", "fixed or quote: hires need no evaluator (the default)");
14287
+ ).option("--no-requires-evaluator", "fixed or quote: hires need no evaluator (the default)").option(
14288
+ "--hire-policy <policy>",
14289
+ `fixed or quote: hire acceptance policy (${SERVICE_HIRE_ACCEPT_POLICIES.join(" or ")}; default auto)`
14290
+ );
12817
14291
  }
12818
14292
  var serviceCommand = new Command58("service").description(
12819
14293
  "Your listing services: the priced offers requesters hire you for"
@@ -12879,9 +14353,9 @@ var availabilityCommand = new Command58("availability").description(
12879
14353
  });
12880
14354
  var listingCommand = new Command58("listing").description(
12881
14355
  "Show your listing, or another worker's, with whether it is taking hires now and each service's track record on the selected --network"
12882
- ).argument("[address]", "Wallet address; your own when left out").action(async (address2) => {
14356
+ ).argument("[address]", "Wallet address; your own when left out").action(async (address3) => {
12883
14357
  try {
12884
- const listing = address2 ? await fetchListing(address2) : await ownListing();
14358
+ const listing = address3 ? await fetchListing(address3) : await ownListing();
12885
14359
  const network = selectedNetworkOrUndefined();
12886
14360
  const [records, hireAvailability] = await Promise.all([
12887
14361
  network && listing.listed && listing.services.length > 0 ? fetchServiceRecords(listing.address, network.chainId) : null,
@@ -12930,13 +14404,13 @@ function agentManagementCommands() {
12930
14404
  const status = new Command59("status").description(
12931
14405
  "Show the agent channels (locked, charged, refundable), purchases with an unknown outcome, the sandbox and compute credit. Reads only."
12932
14406
  ).action(async () => {
12933
- const { collectAgentStatus } = await import("./status-YKFKGTMQ.js");
14407
+ const { collectAgentStatus } = await import("./status-3GNXUWOL.js");
12934
14408
  await run(() => collectAgentStatus());
12935
14409
  });
12936
14410
  const doctor = new Command59("doctor").description(
12937
14411
  "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."
12938
14412
  ).action(async () => {
12939
- const { runDoctor } = await import("./doctor-FACAMASV.js");
14413
+ const { runDoctor } = await import("./doctor-3LW4N6KW.js");
12940
14414
  const report = await run(() => runDoctor());
12941
14415
  if (report && !report.ok) process.exitCode = 1;
12942
14416
  });
@@ -12947,7 +14421,7 @@ function agentManagementCommands() {
12947
14421
  "Reconcile the open purchases of this channel, as status lists it; also reaches retired channels"
12948
14422
  ).action(
12949
14423
  async (invocationId, options) => {
12950
- const { reconcileChannelPurchases, reconcileInvocation } = await import("./reconcile-Q4MJXXR3.js");
14424
+ const { reconcileChannelPurchases, reconcileInvocation } = await import("./reconcile-7DVTUPJ6.js");
12951
14425
  const choice = { rail: options.rail, channel: options.channel };
12952
14426
  if (invocationId !== void 0) {
12953
14427
  await run(() => reconcileInvocation(invocationId, { choice }));
@@ -12979,7 +14453,7 @@ function agentManagementCommands() {
12979
14453
  `Not a USDC amount: ${options.amount} (digits, at most 6 decimals)`
12980
14454
  );
12981
14455
  }
12982
- const { openAgentChannels, requestTopUp, selectRail, withdrawalHatch } = await import("./channels-4YOMV7R7.js");
14456
+ const { openAgentChannels, requestTopUp, selectRail, withdrawalHatch } = await import("./channels-GBQLRNED.js");
12983
14457
  const { rails } = await openAgentChannels();
12984
14458
  const result = await requestTopUp(selectRail(rails, options.rail), amount2);
12985
14459
  return {
@@ -12999,8 +14473,8 @@ function agentManagementCommands() {
12999
14473
  await run(async () => {
13000
14474
  await requireExperimental();
13001
14475
  const { AGENT_VIEW_VERSION } = await import("./budget-view-J6L7X6EY.js");
13002
- const { closeChannel, openAgentChannels, selectChannel } = await import("./channels-4YOMV7R7.js");
13003
- const { reconcileLeasedPurchase } = await import("./reconcile-Q4MJXXR3.js");
14476
+ const { closeChannel, openAgentChannels, selectChannel } = await import("./channels-GBQLRNED.js");
14477
+ const { reconcileLeasedPurchase } = await import("./reconcile-7DVTUPJ6.js");
13004
14478
  const opened = await openAgentChannels();
13005
14479
  const { rail, retired } = selectChannel(opened, options);
13006
14480
  const result = await closeChannel(
@@ -13054,7 +14528,7 @@ function agentManagementCommands() {
13054
14528
  async (options) => {
13055
14529
  await run(async () => {
13056
14530
  await requireExperimental();
13057
- const { runPull } = await import("./sync-pull-AN2M344W.js");
14531
+ const { runPull } = await import("./sync-pull-MIEB5XAF.js");
13058
14532
  const { terminalPrompter } = await import("./prompter-LSICEYSQ.js");
13059
14533
  return runPull(options, {
13060
14534
  interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY),
@@ -13134,10 +14608,10 @@ var agentsCommand = new Command61("agents").description("Browse the worker direc
13134
14608
  "Filter by actor kind: agent, human (the web directory filtered to humans) or hosted"
13135
14609
  ).option(
13136
14610
  "--verified-by <verifier>",
13137
- "Only agents this verifier passed within the last 30 days: tap:identity:known (any agent registered with TAP) or tap:identity:verified (reviewed by hand; not yet used by the verifier)"
14611
+ "Only agents this verifier passed within the last 30 days: tap:identity:verified (TAP Verified: any agent whose key the verifier lists)"
13138
14612
  ).option(
13139
14613
  "--availability <availability>",
13140
- "available (open and under capacity), unavailable (paused or fully booked) or any",
14614
+ "available (open and under capacity), unavailable (paused, fully booked, at the daily hire limit, or a hosted shop that is not ready for hires) or any",
13141
14615
  DEFAULT_AVAILABILITY
13142
14616
  ).action(
13143
14617
  async (opts) => {
@@ -13200,21 +14674,86 @@ async function installedSkillsFor(wallet) {
13200
14674
  try {
13201
14675
  const parsed = AgentListingSchema.safeParse(await apiGet(`/api/agents/${wallet}/listing`));
13202
14676
  if (!parsed.success) return {};
13203
- const { hosted, installedSkills } = parsed.data;
13204
- return { hosted, installedSkills: hosted ? installedSkills : [] };
14677
+ const { hosted, installedSkills, services } = parsed.data;
14678
+ return {
14679
+ hosted,
14680
+ installedSkills: hosted ? installedSkills : [],
14681
+ services: parsed.data.hidden ? [] : services.filter((service) => !service.hidden).map(({ id, kind, hireAcceptPolicy }) => ({
14682
+ id,
14683
+ kind,
14684
+ hireAcceptPolicy,
14685
+ hireNotice: ownerConfirmsHire({ hosted }, { kind, hireAcceptPolicy }) ? HIRE_OWNER_CONFIRMS_NOTICE : null
14686
+ }))
14687
+ };
13205
14688
  } catch {
13206
14689
  return {};
13207
14690
  }
13208
14691
  }
14692
+ async function resolveAgentTarget(target) {
14693
+ if (target.startsWith("@")) {
14694
+ const handle = normalizeShopHandle(target);
14695
+ if (!handle || !SHOP_HANDLE_REGEX.test(handle)) {
14696
+ throw new Error(
14697
+ `Invalid shopfront handle "${target}". Expected @handle with 3 to 30 lowercase letters, digits, or hyphens.`
14698
+ );
14699
+ }
14700
+ let resolved;
14701
+ try {
14702
+ resolved = await apiGet(`/api/shopfronts/handle/${encodeURIComponent(handle)}`);
14703
+ } catch (err) {
14704
+ const status = err && typeof err === "object" && "status" in err && typeof err.status === "number" ? err.status : void 0;
14705
+ if (status === 404) {
14706
+ throw new Error(`Shopfront handle "@${handle}" not found`);
14707
+ }
14708
+ throw err;
14709
+ }
14710
+ const parsed = ShopHandleResolveResultSchema.safeParse(resolved);
14711
+ if (!parsed.success) {
14712
+ throw new Error(`Shopfront handle "@${handle}" could not be resolved`);
14713
+ }
14714
+ return parseInput(EthAddressSchema, parsed.data.walletAddress);
14715
+ }
14716
+ return parseInput(EthAddressSchema, target);
14717
+ }
14718
+ async function fetchPublicShopfront(wallet) {
14719
+ try {
14720
+ const parsed = AgentShopfrontPublicSchema.safeParse(
14721
+ await apiGet(`/api/shopfronts/${encodeURIComponent(wallet)}`)
14722
+ );
14723
+ if (!parsed.success) return null;
14724
+ const {
14725
+ handle,
14726
+ shopStatus,
14727
+ crew,
14728
+ samples,
14729
+ webring,
14730
+ trophies,
14731
+ guestbookEnabled,
14732
+ guestbookCount
14733
+ } = parsed.data;
14734
+ return {
14735
+ handle,
14736
+ shopStatus,
14737
+ crew,
14738
+ samples,
14739
+ webring,
14740
+ trophies,
14741
+ guestbookEnabled,
14742
+ guestbookCount
14743
+ };
14744
+ } catch {
14745
+ return null;
14746
+ }
14747
+ }
13209
14748
  agentsCommand.command("get").description(
13210
- "Show a worker's record (agent or human) on the selected --network, or on every chain"
13211
- ).argument("<address>", "Wallet address of the worker").option("--all-chains", "List the worker's records on every served chain").option(
14749
+ "Show a worker's record (agent or human) by wallet address or @handle on the selected --network, or on every chain"
14750
+ ).argument("<target>", "Wallet address or @handle of the worker").option("--all-chains", "List the worker's records on every served chain").option(
13212
14751
  "--hires",
13213
14752
  "Add the worker's hire record, each listed service's record (serviceRecords) and the workers it hired (see `taskmarket agents hires`)"
13214
- ).action(async (address2, opts) => {
14753
+ ).action(async (target, opts) => {
13215
14754
  let wallet;
13216
14755
  try {
13217
- wallet = parseInput(EthAddressSchema, address2);
14756
+ wallet = await resolveAgentTarget(target);
13218
14757
  } catch (err) {
13219
14758
  renderFailure(err);
13220
14759
  return;
@@ -13234,14 +14773,16 @@ agentsCommand.command("get").description(
13234
14773
  printResult(result);
13235
14774
  return;
13236
14775
  }
13237
- const [skills2, hireAvailability2] = await Promise.all([
14776
+ const [skills2, hireAvailability2, shopfront2] = await Promise.all([
13238
14777
  installedSkillsFor(wallet),
13239
- fetchHireAvailability(wallet)
14778
+ fetchHireAvailability(wallet),
14779
+ fetchPublicShopfront(wallet)
13240
14780
  ]);
13241
14781
  printResult({
13242
14782
  ...parsed.data,
13243
14783
  ...skills2,
13244
14784
  ...hireAvailability2 ? { hireAvailability: hireAvailability2 } : {},
14785
+ ...shopfront2 ? { shopfront: shopfront2 } : {},
13245
14786
  chains: parsed.data.chains.map((entry) => ({
13246
14787
  ...entry,
13247
14788
  earningsToken: paymentTokenSymbol(entry.chainId)
@@ -13251,12 +14792,18 @@ agentsCommand.command("get").description(
13251
14792
  }
13252
14793
  const { chainId } = selectedNetwork();
13253
14794
  const params = new URLSearchParams({ address: wallet, chainId: String(chainId) });
13254
- const [stats, skills, hireAvailability] = await Promise.all([
14795
+ const [stats, skills, hireAvailability, shopfront] = await Promise.all([
13255
14796
  apiGet(`/api/agents/stats?${params.toString()}`),
13256
14797
  installedSkillsFor(wallet),
13257
- fetchHireAvailability(wallet)
14798
+ fetchHireAvailability(wallet),
14799
+ fetchPublicShopfront(wallet)
13258
14800
  ]);
13259
- const record = stats && typeof stats === "object" ? { ...stats, ...skills, ...hireAvailability ? { hireAvailability } : {} } : stats;
14801
+ const record = stats && typeof stats === "object" ? {
14802
+ ...stats,
14803
+ ...skills,
14804
+ ...hireAvailability ? { hireAvailability } : {},
14805
+ ...shopfront ? { shopfront } : {}
14806
+ } : stats;
13260
14807
  if (!opts.hires) {
13261
14808
  printResult(record);
13262
14809
  return;
@@ -13289,9 +14836,9 @@ agentsCommand.command("hires").description(
13289
14836
  "--role <role>",
13290
14837
  `${AGENT_HIRES_ROLES.join(" (hires of this wallet) or ")} (hires this wallet made)`,
13291
14838
  "worker"
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) => {
14839
+ ).option("--limit <n>", "Maximum public hires to list (1 to 50)", "20").option("--offset <n>", "Public hires to skip", "0").action(async (address3, opts) => {
13293
14840
  try {
13294
- const wallet = parseInput(EthAddressSchema, address2);
14841
+ const wallet = parseInput(EthAddressSchema, address3);
13295
14842
  const role = parseInput(AgentHiresRoleSchema, opts.role);
13296
14843
  const limit = parseInput(AgentHiresInputSchema.shape.limit, Number(opts.limit));
13297
14844
  const offset = parseInput(AgentHiresInputSchema.shape.offset, Number(opts.offset));
@@ -13344,12 +14891,12 @@ agentsCommand.command("specialties").description("List the specialties workers a
13344
14891
  renderFailure(err);
13345
14892
  }
13346
14893
  });
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) => {
14894
+ 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) => {
13348
14895
  try {
13349
14896
  const auth = await signReadAuth();
13350
14897
  const signedIn = auth !== null && Object.keys(auth.headers).length > 0;
13351
14898
  const body = parseInput(AgentListingReportInputSchema, {
13352
- listingAddress: address2,
14899
+ listingAddress: address3,
13353
14900
  ...signedIn ? { walletAddress: auth.walletAddress } : {},
13354
14901
  ...opts.service ? { serviceId: opts.service } : {},
13355
14902
  reason: opts.reason,
@@ -13570,23 +15117,23 @@ var dashboardCommand = new Command62("dashboard").description(
13570
15117
  printError("No keystore found. Run `taskmarket init` first.");
13571
15118
  return;
13572
15119
  }
13573
- const address2 = auth.walletAddress;
15120
+ const address3 = auth.walletAddress;
13574
15121
  const chainId = selectedNetwork().chainId;
13575
15122
  const headers = auth.headers;
13576
15123
  const owner = new URLSearchParams({
13577
- owner: address2,
15124
+ owner: address3,
13578
15125
  status: "all",
13579
15126
  limit: String(AUTOMATIONS_READ_LIMIT)
13580
15127
  });
13581
15128
  const [queue, inbox, workflows, schedules, projects, balance, activity] = await Promise.all([
13582
15129
  settle2(
13583
- () => apiGet(`/api/agents/action-queue?${new URLSearchParams({ address: address2, limit: "50" })}`, {
15130
+ () => apiGet(`/api/agents/action-queue?${new URLSearchParams({ address: address3, limit: "50" })}`, {
13584
15131
  headers
13585
15132
  })
13586
15133
  ),
13587
15134
  settle2(
13588
15135
  () => apiGet(
13589
- `/api/agents/inbox?${new URLSearchParams({ address: address2, sort: "attention", limit: String(DASHBOARD_TASK_LIMIT) })}`,
15136
+ `/api/agents/inbox?${new URLSearchParams({ address: address3, sort: "attention", limit: String(DASHBOARD_TASK_LIMIT) })}`,
13590
15137
  { headers }
13591
15138
  )
13592
15139
  ),
@@ -13599,13 +15146,13 @@ var dashboardCommand = new Command62("dashboard").description(
13599
15146
  settle2(
13600
15147
  () => apiGet(
13601
15148
  withChainId(
13602
- `/api/projects?${new URLSearchParams({ address: address2, role: "owner", status: "open", limit: String(PROJECTS_READ_LIMIT) })}`
15149
+ `/api/projects?${new URLSearchParams({ address: address3, role: "owner", status: "open", limit: String(PROJECTS_READ_LIMIT) })}`
13603
15150
  )
13604
15151
  )
13605
15152
  ),
13606
15153
  settle2(
13607
15154
  () => apiGet(
13608
- `/api/wallet/balance?${new URLSearchParams({ address: address2, chainId: String(chainId) })}`
15155
+ `/api/wallet/balance?${new URLSearchParams({ address: address3, chainId: String(chainId) })}`
13609
15156
  )
13610
15157
  ),
13611
15158
  settle2(
@@ -13637,7 +15184,7 @@ var dashboardCommand = new Command62("dashboard").description(
13637
15184
  });
13638
15185
  printResult(
13639
15186
  withChainNames({
13640
- address: address2,
15187
+ address: address3,
13641
15188
  chainId,
13642
15189
  generatedAt: new Date(nowMs).toISOString(),
13643
15190
  needsYou,
@@ -13670,7 +15217,7 @@ var dashboardCommand = new Command62("dashboard").description(
13670
15217
  }),
13671
15218
  {
13672
15219
  next: nextForHome({
13673
- address: address2,
15220
+ address: address3,
13674
15221
  chainId,
13675
15222
  balanceBaseUnits: balance.value?.balanceBaseUnits,
13676
15223
  needsYou: needsYou.total,
@@ -13752,12 +15299,12 @@ var inboxCommand = new Command63("inbox").description(
13752
15299
  }
13753
15300
  return;
13754
15301
  }
13755
- const address2 = auth.walletAddress;
15302
+ const address3 = auth.walletAddress;
13756
15303
  const hasReadAuth = Object.keys(auth.headers).length > 0;
13757
- const inboxParams = new URLSearchParams({ address: address2 });
15304
+ const inboxParams = new URLSearchParams({ address: address3 });
13758
15305
  if (opts.tasksSort) inboxParams.set("sort", opts.tasksSort);
13759
15306
  if (tasksLimit !== void 0) inboxParams.set("limit", String(tasksLimit));
13760
- const actionParams = new URLSearchParams({ address: address2, limit: String(page.limit) });
15307
+ const actionParams = new URLSearchParams({ address: address3, limit: String(page.limit) });
13761
15308
  if (page.cursor) actionParams.set("cursor", page.cursor);
13762
15309
  if (opts.actionsOnly) {
13763
15310
  try {
@@ -13774,7 +15321,7 @@ var inboxCommand = new Command63("inbox").description(
13774
15321
  return;
13775
15322
  }
13776
15323
  const ownerParams = new URLSearchParams({
13777
- owner: address2,
15324
+ owner: address3,
13778
15325
  status: "needs_action",
13779
15326
  limit: "20"
13780
15327
  });
@@ -13914,9 +15461,9 @@ var depositCommand = new Command64("deposit").description(
13914
15461
  "--relay-route <routeId>",
13915
15462
  "Request a Relay deposit address for this wallet on an offered route (see fundingOptions.relayRoutes)"
13916
15463
  ).option("--amount <amount>", "Amount of the route origin stablecoin to send, for --relay-route").action(async (opts) => {
13917
- let address2;
15464
+ let address3;
13918
15465
  try {
13919
- address2 = await getWalletAddress();
15466
+ address3 = await getWalletAddress();
13920
15467
  } catch (err) {
13921
15468
  renderFailure(err, { fallback: "No keystore found. Run `taskmarket init` first." });
13922
15469
  return;
@@ -13945,7 +15492,7 @@ var depositCommand = new Command64("deposit").description(
13945
15492
  const chainId = chain.chainId;
13946
15493
  const tokenAddress = chain.tokenAddress;
13947
15494
  const data = {
13948
- address: address2,
15495
+ address: address3,
13949
15496
  network: chain.networkName,
13950
15497
  chainId,
13951
15498
  currency: paymentTokenSymbol(chainId),
@@ -13960,13 +15507,13 @@ var depositCommand = new Command64("deposit").description(
13960
15507
  return;
13961
15508
  }
13962
15509
  const balance = await apiGet(
13963
- `/api/wallet/balance?address=${address2}&chainId=${chainId}`
15510
+ `/api/wallet/balance?address=${address3}&chainId=${chainId}`
13964
15511
  ).catch(() => null);
13965
15512
  printResult(
13966
15513
  { ...data, fundingOptions },
13967
15514
  {
13968
15515
  next: nextForBalance({
13969
- address: address2,
15516
+ address: address3,
13970
15517
  chainId,
13971
15518
  balanceBaseUnits: balance?.balanceBaseUnits
13972
15519
  })
@@ -13991,7 +15538,7 @@ var depositCommand = new Command64("deposit").description(
13991
15538
  if (BigInt(amountBaseUnits) <= 0n) throw new Error("Enter a valid amount.");
13992
15539
  const deposit = await requestRelayBridgeDepositAddress({
13993
15540
  routeId,
13994
- recipient: address2,
15541
+ recipient: address3,
13995
15542
  amountBaseUnits
13996
15543
  });
13997
15544
  const route = RELAY_BRIDGE_ROUTES[routeId];
@@ -14001,7 +15548,7 @@ var depositCommand = new Command64("deposit").description(
14001
15548
  routeId,
14002
15549
  ...deposit,
14003
15550
  send: `${opts.amount} ${route.origin.symbol} on ${route.origin.chainName} to ${deposit.depositAddress}`,
14004
- credits: `${route.destination.symbol} on ${route.destination.chainName} to ${address2}`
15551
+ credits: `${route.destination.symbol} on ${route.destination.chainName} to ${address3}`
14005
15552
  }
14006
15553
  });
14007
15554
  } catch (err) {
@@ -14014,10 +15561,10 @@ import { Command as Command75 } from "commander";
14014
15561
 
14015
15562
  // src/commands/wallet/balance.ts
14016
15563
  import { Command as Command65 } from "commander";
14017
- function balancePath(address2, chainId) {
14018
- return `/api/wallet/balance?address=${address2}&chainId=${chainId}`;
15564
+ function balancePath(address3, chainId) {
15565
+ return `/api/wallet/balance?address=${address3}&chainId=${chainId}`;
14019
15566
  }
14020
- async function allChainBalances(address2) {
15567
+ async function allChainBalances(address3) {
14021
15568
  const raw = await apiGet("/trpc/network.info");
14022
15569
  const info = NetworkInfoSchema.safeParse(raw?.result?.data);
14023
15570
  if (!info.success) {
@@ -14033,7 +15580,7 @@ async function allChainBalances(address2) {
14033
15580
  tokenSymbol: chain.tokenSymbol
14034
15581
  };
14035
15582
  try {
14036
- const result = await apiGet(balancePath(address2, chain.chainId));
15583
+ const result = await apiGet(balancePath(address3, chain.chainId));
14037
15584
  return {
14038
15585
  ...base,
14039
15586
  tokenSymbol: result.tokenSymbol ?? chain.tokenSymbol,
@@ -14045,7 +15592,7 @@ async function allChainBalances(address2) {
14045
15592
  }
14046
15593
  })
14047
15594
  );
14048
- return { address: address2, chains };
15595
+ return { address: address3, chains };
14049
15596
  }
14050
15597
  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(
14051
15598
  "--all-chains",
@@ -14066,26 +15613,26 @@ var walletBalanceCommand = new Command65("balance").description("Show the wallet
14066
15613
  printResult(await readSolanaBalances(createRpc2(connection), connection, owner));
14067
15614
  return;
14068
15615
  }
14069
- let address2 = opts.address;
14070
- const ownWallet = !address2;
14071
- if (!address2) {
15616
+ let address3 = opts.address;
15617
+ const ownWallet = !address3;
15618
+ if (!address3) {
14072
15619
  const keystore = await loadKeystore();
14073
- address2 = keystore.walletAddress;
15620
+ address3 = keystore.walletAddress;
14074
15621
  }
14075
15622
  if (opts.allChains) {
14076
15623
  try {
14077
- printResult(await allChainBalances(address2));
15624
+ printResult(await allChainBalances(address3));
14078
15625
  } catch (err) {
14079
15626
  renderFailure(err, { fallback: "Failed to fetch network info from backend." });
14080
15627
  }
14081
15628
  return;
14082
15629
  }
14083
15630
  const chainId = selectedNetwork().chainId;
14084
- const result = await apiGet(balancePath(address2, chainId));
15631
+ const result = await apiGet(balancePath(address3, chainId));
14085
15632
  printResult(
14086
15633
  result,
14087
15634
  ownWallet ? {
14088
- next: nextForBalance({ address: address2, chainId, balanceBaseUnits: result.balanceBaseUnits })
15635
+ next: nextForBalance({ address: address3, chainId, balanceBaseUnits: result.balanceBaseUnits })
14089
15636
  } : void 0
14090
15637
  );
14091
15638
  }
@@ -14203,17 +15750,17 @@ var walletImportCommand = new Command66("import").description("Import an existin
14203
15750
  }
14204
15751
  const privateKey = normalizePrivateKey(rawKey);
14205
15752
  const account = privateKeyToAccount2(privateKey);
14206
- const address2 = account.address;
15753
+ const address3 = account.address;
14207
15754
  const publicKey = deriveCompressedPublicKey(privateKey);
14208
15755
  const legalBundle = LegalBundleSchema.parse(await apiGet("/api/legal/current"));
14209
15756
  const legalAcceptance = legalBundle.enforcementEnabled ? await acceptLegalBundle({
14210
15757
  assumeYes: Boolean(opts.yes),
14211
15758
  bundle: legalBundle,
14212
15759
  signMessage: (message) => account.signMessage({ message }),
14213
- walletAddress: address2
15760
+ walletAddress: address3
14214
15761
  }) : void 0;
14215
15762
  const deviceRegisterSignature = await account.signMessage({
14216
- message: buildDeviceRegisterMessage(address2)
15763
+ message: buildDeviceRegisterMessage(address3)
14217
15764
  });
14218
15765
  const {
14219
15766
  deviceId,
@@ -14224,13 +15771,13 @@ var walletImportCommand = new Command66("import").description("Import an existin
14224
15771
  legalReceipt: legalAcceptance?.receipt,
14225
15772
  publicKey,
14226
15773
  signature: deviceRegisterSignature,
14227
- walletAddress: address2
15774
+ walletAddress: address3
14228
15775
  });
14229
15776
  const encryptedKey = encryptPrivateKey(deviceEncryptionKey, privateKey);
14230
15777
  let agentId = initialAgentId;
14231
15778
  await saveKeystore({
14232
15779
  encryptedKey,
14233
- walletAddress: address2,
15780
+ walletAddress: address3,
14234
15781
  deviceId,
14235
15782
  apiToken,
14236
15783
  agentId,
@@ -14244,7 +15791,7 @@ var walletImportCommand = new Command66("import").description("Import an existin
14244
15791
  } : {}
14245
15792
  });
14246
15793
  if (!agentId) {
14247
- agentId = await pollAgentId(address2);
15794
+ agentId = await pollAgentId(address3);
14248
15795
  if (agentId) {
14249
15796
  const keystore = await loadKeystore();
14250
15797
  await saveKeystore(
@@ -14252,7 +15799,7 @@ var walletImportCommand = new Command66("import").description("Import an existin
14252
15799
  );
14253
15800
  }
14254
15801
  }
14255
- printResult({ address: address2, agentId }, { warnings: argvKeyWarnings(keySource) });
15802
+ printResult({ address: address3, agentId }, { warnings: argvKeyWarnings(keySource) });
14256
15803
  });
14257
15804
 
14258
15805
  // src/commands/wallet/set-withdrawal-address.ts
@@ -14274,19 +15821,19 @@ var WithdrawalAddressMismatchError = class extends Error {
14274
15821
  function pinnedWithdrawalAddress(keystore, chainId) {
14275
15822
  return keystore.withdrawalAddresses?.[String(chainId)] ?? keystore.withdrawalAddress;
14276
15823
  }
14277
- async function pinWithdrawalAddress(keystore, chainId, address2) {
15824
+ async function pinWithdrawalAddress(keystore, chainId, address3) {
14278
15825
  await saveKeystore({
14279
15826
  ...keystore,
14280
- withdrawalAddresses: { ...keystore.withdrawalAddresses, [String(chainId)]: address2 }
15827
+ withdrawalAddresses: { ...keystore.withdrawalAddresses, [String(chainId)]: address3 }
14281
15828
  });
14282
15829
  }
14283
15830
  function serverChainMismatch(requested, answered) {
14284
15831
  if (answered === void 0 || answered === requested) return void 0;
14285
15832
  return `Refusing to continue: the server answered for chain ${answered}, but this CLI asked for chain ${requested}. Nothing was pinned.`;
14286
15833
  }
14287
- async function fetchWithdrawalAddress(address2, chainId) {
15834
+ async function fetchWithdrawalAddress(address3, chainId) {
14288
15835
  const response = await apiGet(
14289
- `/api/wallet/withdrawal-address?address=${address2}&chainId=${chainId}`
15836
+ `/api/wallet/withdrawal-address?address=${address3}&chainId=${chainId}`
14290
15837
  );
14291
15838
  const mismatch = serverChainMismatch(chainId, response.chainId);
14292
15839
  if (mismatch) throw new Error(mismatch);
@@ -14336,8 +15883,8 @@ function isValidAddress(addr) {
14336
15883
  }
14337
15884
  var setWithdrawalAddressCommand = new Command67("set-withdrawal-address").description(
14338
15885
  "Set the withdrawal address for payment-token withdrawals on the selected network (once per chain, free)"
14339
- ).argument("<address>", "Ethereum address to receive withdrawals").action(async (address2) => {
14340
- if (!isValidAddress(address2)) {
15886
+ ).argument("<address>", "Ethereum address to receive withdrawals").action(async (address3) => {
15887
+ if (!isValidAddress(address3)) {
14341
15888
  printError("Invalid Ethereum address: must be 0x followed by 40 hex characters");
14342
15889
  return;
14343
15890
  }
@@ -14354,7 +15901,7 @@ var setWithdrawalAddressCommand = new Command67("set-withdrawal-address").descri
14354
15901
  const expiresAt = Math.floor(Date.now() / 1e3) + SIGNATURE_TTL_SECONDS;
14355
15902
  const message = buildSetWithdrawalAddressMessage({
14356
15903
  walletAddress,
14357
- withdrawalAddress: address2,
15904
+ withdrawalAddress: address3,
14358
15905
  chainId,
14359
15906
  nonce,
14360
15907
  expiresAt
@@ -14362,7 +15909,7 @@ var setWithdrawalAddressCommand = new Command67("set-withdrawal-address").descri
14362
15909
  const signature = await signMessage(message, keystore);
14363
15910
  const { data: result, idempotencyKey } = await apiPost("/api/wallet/set-withdrawal-address", {
14364
15911
  walletAddress,
14365
- withdrawalAddress: address2,
15912
+ withdrawalAddress: address3,
14366
15913
  signature,
14367
15914
  nonce,
14368
15915
  expiresAt,
@@ -14399,14 +15946,14 @@ import { Command as Command68 } from "commander";
14399
15946
  var getWithdrawalAddressCommand = new Command68("get-withdrawal-address").description(
14400
15947
  "Show the withdrawal address registered on the selected network, if any (the address is per chain)"
14401
15948
  ).option("--address <addr>", "Wallet address to check (defaults to own wallet)").action(async (opts) => {
14402
- let address2 = opts.address;
14403
- if (!address2) {
15949
+ let address3 = opts.address;
15950
+ if (!address3) {
14404
15951
  const keystore = await loadKeystore();
14405
- address2 = keystore.walletAddress;
15952
+ address3 = keystore.walletAddress;
14406
15953
  }
14407
15954
  const { chainId } = selectedNetwork();
14408
15955
  const result = await apiGet(
14409
- `/api/wallet/withdrawal-address?address=${address2}&chainId=${chainId}`
15956
+ `/api/wallet/withdrawal-address?address=${address3}&chainId=${chainId}`
14410
15957
  );
14411
15958
  printResult({ ...result, chainId: result.chainId ?? chainId });
14412
15959
  });
@@ -14516,12 +16063,12 @@ var revealRecoveryCodeCommand = new Command71("reveal-recovery-code").descriptio
14516
16063
  printError("No keystore found. Run `taskmarket init` first.");
14517
16064
  return;
14518
16065
  }
14519
- const address2 = keystore.walletAddress;
16066
+ const address3 = keystore.walletAddress;
14520
16067
  const { chainId } = selectedNetwork();
14521
- const message = buildRevealAccountRecoveryCodeMessage(address2, chainId);
16068
+ const message = buildRevealAccountRecoveryCodeMessage(address3, chainId);
14522
16069
  const signature = await signMessage(message, keystore);
14523
16070
  const { data: result, idempotencyKey } = await apiPost("/api/wallet/reveal-backfilled-recovery-code", {
14524
- address: address2,
16071
+ address: address3,
14525
16072
  signature,
14526
16073
  chainId
14527
16074
  });
@@ -15361,8 +16908,8 @@ function cachedInboxLookup(lookup, options = {}) {
15361
16908
  const now = options.now ?? Date.now;
15362
16909
  const maxEntries = options.maxEntries ?? 5e3;
15363
16910
  const cache = /* @__PURE__ */ new Map();
15364
- return async (address2) => {
15365
- const key = address2.toLowerCase();
16911
+ return async (address3) => {
16912
+ const key = address3.toLowerCase();
15366
16913
  const cached = cache.get(key);
15367
16914
  if (cached && cached.expiresAt > now()) {
15368
16915
  return cached.inboxId;
@@ -15698,12 +17245,12 @@ function devConversationId(a, b) {
15698
17245
  function createFileBus(dir) {
15699
17246
  fs7.mkdirSync(dir, { recursive: true });
15700
17247
  const logPath = (inboxId) => path4.join(dir, `inbox-${inboxId}.jsonl`);
15701
- const addressPath = (address2) => path4.join(dir, `address-${address2.toLowerCase()}`);
17248
+ const addressPath = (address3) => path4.join(dir, `address-${address3.toLowerCase()}`);
15702
17249
  return {
15703
- register: (address2, inboxId) => fs7.writeFileSync(addressPath(address2), inboxId),
15704
- lookup: (address2) => {
17250
+ register: (address3, inboxId) => fs7.writeFileSync(addressPath(address3), inboxId),
17251
+ lookup: (address3) => {
15705
17252
  try {
15706
- return fs7.readFileSync(addressPath(address2), "utf8").trim() || null;
17253
+ return fs7.readFileSync(addressPath(address3), "utf8").trim() || null;
15707
17254
  } catch {
15708
17255
  return null;
15709
17256
  }
@@ -15744,8 +17291,8 @@ async function createDevClient(input) {
15744
17291
  inboxId,
15745
17292
  installationId,
15746
17293
  dbPath,
15747
- async inboxIdForAddress(address2) {
15748
- return devInboxByAddress.get(address2.toLowerCase()) ?? fileBus?.lookup(address2) ?? null;
17294
+ async inboxIdForAddress(address3) {
17295
+ return devInboxByAddress.get(address3.toLowerCase()) ?? fileBus?.lookup(address3) ?? null;
15749
17296
  },
15750
17297
  async sendMessage(toInboxId, body) {
15751
17298
  const message = {
@@ -16268,7 +17815,7 @@ async function createProductionClient(input, env) {
16268
17815
  }
16269
17816
  const installationId = extractString(client, ["installationId", "installationID"]) ?? extractString(asObject(client)?.installation, ["id", "installationId"]) ?? input.existingInstallationId ?? randomUUID3();
16270
17817
  const cursor = loadXmtpCursor(xmtpCursorPath(defaultXmtpDbDir(), input.walletAddress));
16271
- const inboxIdForAddress = cachedInboxLookup(async (address2) => {
17818
+ const inboxIdForAddress = cachedInboxLookup(async (address3) => {
16272
17819
  const lookup = asObject(client)?.fetchInboxIdByIdentifier;
16273
17820
  if (typeof lookup !== "function") {
16274
17821
  throw new XmtpTransportError(
@@ -16277,7 +17824,7 @@ async function createProductionClient(input, env) {
16277
17824
  );
16278
17825
  }
16279
17826
  const resolved = await withRetry(
16280
- () => lookup.call(client, { identifier: address2, identifierKind: 0 }),
17827
+ () => lookup.call(client, { identifier: address3, identifierKind: 0 }),
16281
17828
  parseRetryAttempts()
16282
17829
  );
16283
17830
  return resolved ?? null;
@@ -16451,24 +17998,24 @@ async function createXmtpClient(input) {
16451
17998
  return createProductionClient(input, env);
16452
17999
  }
16453
18000
  var networkInboxLookups = /* @__PURE__ */ new Map();
16454
- async function lookupInboxIdOnNetwork(address2) {
18001
+ async function lookupInboxIdOnNetwork(address3) {
16455
18002
  const env = resolveXmtpEnv();
16456
18003
  let lookup = networkInboxLookups.get(env);
16457
18004
  if (!lookup) {
16458
18005
  lookup = env === "memory" ? memoryInboxLookup() : sdkNetworkInboxLookup(env);
16459
18006
  networkInboxLookups.set(env, lookup);
16460
18007
  }
16461
- return lookup(address2);
18008
+ return lookup(address3);
16462
18009
  }
16463
18010
  function memoryInboxLookup() {
16464
- return async (address2) => {
18011
+ return async (address3) => {
16465
18012
  const busDir = process.env.TASKMARKET_XMTP_MEMORY_DIR?.trim();
16466
- return devInboxByAddress.get(address2.toLowerCase()) ?? (busDir ? createFileBus(busDir).lookup(address2) : null);
18013
+ return devInboxByAddress.get(address3.toLowerCase()) ?? (busDir ? createFileBus(busDir).lookup(address3) : null);
16467
18014
  };
16468
18015
  }
16469
18016
  function sdkNetworkInboxLookup(env) {
16470
18017
  let backend;
16471
- return cachedInboxLookup(async (address2) => {
18018
+ return cachedInboxLookup(async (address3) => {
16472
18019
  assertXmtpSupported();
16473
18020
  const sdkModule = asObject(
16474
18021
  await import("@xmtp/node-sdk").catch((error) => {
@@ -16492,7 +18039,7 @@ function sdkNetworkInboxLookup(env) {
16492
18039
  backend ??= createBackend({ env });
16493
18040
  try {
16494
18041
  return await getInboxIdForIdentifier(await backend, {
16495
- identifier: address2,
18042
+ identifier: address3,
16496
18043
  identifierKind: 0
16497
18044
  });
16498
18045
  } catch (error) {
@@ -16789,7 +18336,7 @@ async function resolvePeerRuleInboxId(to, inboxIdOnNetwork = lookupInboxIdOnNetw
16789
18336
  if (isRawInboxId(to)) {
16790
18337
  return to;
16791
18338
  }
16792
- let address2 = to;
18339
+ let address3 = to;
16793
18340
  if (!isAddress3(to)) {
16794
18341
  const result = await apiGet(
16795
18342
  `/api/xmtp/resolve?agentId=${encodeURIComponent(to)}&chainId=${selectedNetwork().chainId}`
@@ -16797,11 +18344,11 @@ async function resolvePeerRuleInboxId(to, inboxIdOnNetwork = lookupInboxIdOnNetw
16797
18344
  if (!result.address) {
16798
18345
  throw new Error(`No XMTP inbox found for agent "${to}"`);
16799
18346
  }
16800
- address2 = result.address;
18347
+ address3 = result.address;
16801
18348
  }
16802
- const inboxId = await inboxIdOnNetwork(address2);
18349
+ const inboxId = await inboxIdOnNetwork(address3);
16803
18350
  if (!inboxId) {
16804
- throw new Error(`No XMTP inbox found on the XMTP network for address ${address2}`);
18351
+ throw new Error(`No XMTP inbox found on the XMTP network for address ${address3}`);
16805
18352
  }
16806
18353
  return inboxId;
16807
18354
  }
@@ -18359,8 +19906,8 @@ var VERIFIED_SENDER_VALUES = ["pass", "platform"];
18359
19906
  function isVerifiedSender(senderVerification) {
18360
19907
  return senderVerification != null && VERIFIED_SENDER_VALUES.includes(senderVerification);
18361
19908
  }
18362
- function domainOf(address2) {
18363
- return address2.slice(address2.lastIndexOf("@") + 1).trim().toLowerCase();
19909
+ function domainOf(address3) {
19910
+ return address3.slice(address3.lastIndexOf("@") + 1).trim().toLowerCase();
18364
19911
  }
18365
19912
  function replyNeedsVerifiedSender(original) {
18366
19913
  if (isVerifiedSender(original.senderVerification)) return false;
@@ -19460,12 +21007,12 @@ import { Command as Command107 } from "commander";
19460
21007
 
19461
21008
  // src/commands/requester/stats.ts
19462
21009
  import { Command as Command106 } from "commander";
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)) {
21010
+ var requesterStatsCmd = new Command106("stats").description("Get requester reputation stats for an address").argument("<address>", "Wallet address of the requester").action(async (address3) => {
21011
+ if (!/^0x[0-9a-fA-F]{40}$/.test(address3)) {
19465
21012
  printError("Address must be a 0x-prefixed 20-byte hex string");
19466
21013
  return;
19467
21014
  }
19468
- const data = await apiGet(`/api/requester/${address2}/stats`);
21015
+ const data = await apiGet(`/api/requester/${address3}/stats`);
19469
21016
  if (!data) {
19470
21017
  printError("No stats found for address");
19471
21018
  return;
@@ -23195,8 +24742,8 @@ function getConfigDecoder() {
23195
24742
  function decodeConfig(encodedAccount) {
23196
24743
  return decodeAccount(encodedAccount, getConfigDecoder());
23197
24744
  }
23198
- async function fetchMaybeConfig(rpc, address2, config) {
23199
- const maybeAccount = await fetchEncodedAccount(rpc, address2, config);
24745
+ async function fetchMaybeConfig(rpc, address3, config) {
24746
+ const maybeAccount = await fetchEncodedAccount(rpc, address3, config);
23200
24747
  return decodeConfig(maybeAccount);
23201
24748
  }
23202
24749
 
@@ -23324,11 +24871,65 @@ function getVaultDecoder() {
23324
24871
  function decodeVault(encodedAccount) {
23325
24872
  return decodeAccount(encodedAccount, getVaultDecoder());
23326
24873
  }
23327
- async function fetchMaybeVault(rpc, address2, config) {
23328
- const maybeAccount = await fetchEncodedAccount(rpc, address2, config);
24874
+ async function fetchMaybeVault(rpc, address3, config) {
24875
+ const maybeAccount = await fetchEncodedAccount(rpc, address3, config);
23329
24876
  return decodeVault(maybeAccount);
23330
24877
  }
23331
24878
 
24879
+ // ../../node_modules/.pnpm/@solana+program-client-core@8.4.0_typescript@5.7.3/node_modules/@solana/program-client-core/dist/index.node.mjs
24880
+ function getNonNullResolvedInstructionInput2(inputName, value) {
24881
+ if (value === null || value === void 0) {
24882
+ throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_NON_NULL, {
24883
+ inputName
24884
+ });
24885
+ }
24886
+ return value;
24887
+ }
24888
+ function getAddressFromResolvedInstructionAccount2(inputName, value) {
24889
+ const nonNullValue = getNonNullResolvedInstructionInput2(inputName, value);
24890
+ if (typeof value === "object" && "address" in nonNullValue) {
24891
+ return nonNullValue.address;
24892
+ }
24893
+ if (Array.isArray(nonNullValue)) {
24894
+ return nonNullValue[0];
24895
+ }
24896
+ return nonNullValue;
24897
+ }
24898
+ function getAccountMetaFactory2(programAddress, optionalAccountStrategy) {
24899
+ return (inputName, account) => {
24900
+ if (!account.value) {
24901
+ if (optionalAccountStrategy === "omitted") return;
24902
+ return Object.freeze({ address: programAddress, role: AccountRole.READONLY });
24903
+ }
24904
+ if (hasExplicitRole2(account.value)) {
24905
+ return Object.freeze({
24906
+ address: account.value.address,
24907
+ role: account.value.role,
24908
+ ..."signer" in account.value && account.value.signer ? { signer: account.value.signer } : {}
24909
+ });
24910
+ }
24911
+ const idlIsSigner = account.isSigner ?? "either";
24912
+ const isSigner = idlIsSigner !== false && isResolvedInstructionAccountSigner2(account.value);
24913
+ if (!isSigner && idlIsSigner === true) {
24914
+ throw new SolanaError(SOLANA_ERROR__PROGRAM_CLIENTS__RESOLVED_INSTRUCTION_INPUT_MUST_BE_SIGNER, {
24915
+ inputName
24916
+ });
24917
+ }
24918
+ const writableRole = account.isWritable ? AccountRole.WRITABLE : AccountRole.READONLY;
24919
+ return Object.freeze({
24920
+ address: getAddressFromResolvedInstructionAccount2(inputName, account.value),
24921
+ role: isSigner ? upgradeRoleToSigner(writableRole) : writableRole,
24922
+ ...isSigner ? { signer: account.value } : {}
24923
+ });
24924
+ };
24925
+ }
24926
+ function hasExplicitRole2(value) {
24927
+ return typeof value === "object" && "role" in value && typeof value.role === "number";
24928
+ }
24929
+ function isResolvedInstructionAccountSigner2(value) {
24930
+ return !!value && typeof value === "object" && "address" in value && typeof value.address === "string" && isTransactionSigner(value);
24931
+ }
24932
+
23332
24933
  // ../../packages/solana-sponsored-client/dist/generated/pdas/binding.js
23333
24934
  async function findBindingPda(seeds, config = {}) {
23334
24935
  const { programAddress = "STvau1t111111111111111111111111111111111111" } = config;
@@ -23401,7 +25002,7 @@ function getBindPayoutInstructionDataEncoder() {
23401
25002
  }
23402
25003
  async function getBindPayoutInstructionAsync(input, config) {
23403
25004
  const programAddress = config?.programAddress ?? SPONSORED_TASKS_PROGRAM_ADDRESS;
23404
- const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
25005
+ const getAccountMeta = getAccountMetaFactory2(programAddress, "programId");
23405
25006
  const originalAccounts = {
23406
25007
  config: { value: input.config ?? null, isSigner: false, isWritable: false },
23407
25008
  binding: { value: input.binding ?? null, isSigner: false, isWritable: true },
@@ -23417,8 +25018,8 @@ async function getBindPayoutInstructionAsync(input, config) {
23417
25018
  }
23418
25019
  if (!accounts.binding.value) {
23419
25020
  accounts.binding.value = await findBindingPda({
23420
- taskChainId: getNonNullResolvedInstructionInput("taskChainId", args.taskChainId),
23421
- agent: getNonNullResolvedInstructionInput("agent", args.agent)
25021
+ taskChainId: getNonNullResolvedInstructionInput2("taskChainId", args.taskChainId),
25022
+ agent: getNonNullResolvedInstructionInput2("agent", args.agent)
23422
25023
  }, { programAddress });
23423
25024
  }
23424
25025
  if (!accounts.systemProgram.value) {
@@ -23493,7 +25094,7 @@ function getCreateVaultInstructionDataEncoder() {
23493
25094
  }
23494
25095
  function getCreateVaultInstruction(input, config) {
23495
25096
  const programAddress = config?.programAddress ?? SPONSORED_TASKS_PROGRAM_ADDRESS;
23496
- const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
25097
+ const getAccountMeta = getAccountMetaFactory2(programAddress, "programId");
23497
25098
  const originalAccounts = {
23498
25099
  config: { value: input.config ?? null, isSigner: false, isWritable: false },
23499
25100
  sponsor: { value: input.sponsor ?? null, isSigner: true, isWritable: true },
@@ -23559,7 +25160,7 @@ function getEmergencyExitInstructionDataEncoder() {
23559
25160
  }
23560
25161
  function getEmergencyExitInstruction(input, config) {
23561
25162
  const programAddress = config?.programAddress ?? SPONSORED_TASKS_PROGRAM_ADDRESS;
23562
- const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
25163
+ const getAccountMeta = getAccountMetaFactory2(programAddress, "programId");
23563
25164
  const originalAccounts = {
23564
25165
  vault: { value: input.vault ?? null, isSigner: false, isWritable: true },
23565
25166
  sponsor: { value: input.sponsor ?? null, isSigner: true, isWritable: false },
@@ -23629,7 +25230,7 @@ function getFundInstructionDataEncoder() {
23629
25230
  }
23630
25231
  function getFundInstruction(input, config) {
23631
25232
  const programAddress = config?.programAddress ?? SPONSORED_TASKS_PROGRAM_ADDRESS;
23632
- const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
25233
+ const getAccountMeta = getAccountMetaFactory2(programAddress, "programId");
23633
25234
  const originalAccounts = {
23634
25235
  vault: { value: input.vault ?? null, isSigner: false, isWritable: true },
23635
25236
  mint: { value: input.mint ?? null, isSigner: false, isWritable: false },
@@ -23796,7 +25397,7 @@ function getSetManagersInstructionDataEncoder() {
23796
25397
  }
23797
25398
  function getSetManagersInstruction(input, config) {
23798
25399
  const programAddress = config?.programAddress ?? SPONSORED_TASKS_PROGRAM_ADDRESS;
23799
- const getAccountMeta = getAccountMetaFactory(programAddress, "programId");
25400
+ const getAccountMeta = getAccountMetaFactory2(programAddress, "programId");
23800
25401
  const originalAccounts = {
23801
25402
  vault: { value: input.vault ?? null, isSigner: false, isWritable: true },
23802
25403
  sponsor: { value: input.sponsor ?? null, isSigner: true, isWritable: false },
@@ -25154,16 +26755,16 @@ import { Command as Command116 } from "commander";
25154
26755
  var sponsoredTaskManagedCommand = new Command116("managed").description(
25155
26756
  "List the active Sponsored Task vaults an address can fund tasks from as an active manager (defaults to your wallet)"
25156
26757
  ).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) => {
25157
- let address2 = opts.address;
25158
- if (address2 === void 0) {
26758
+ let address3 = opts.address;
26759
+ if (address3 === void 0) {
25159
26760
  try {
25160
- address2 = (await loadKeystore()).walletAddress;
26761
+ address3 = (await loadKeystore()).walletAddress;
25161
26762
  } catch {
25162
26763
  printError("No keystore found. Run `taskmarket init` first, or pass --address.");
25163
26764
  return;
25164
26765
  }
25165
26766
  }
25166
- if (!/^0x[a-fA-F0-9]{40}$/.test(address2)) {
26767
+ if (!/^0x[a-fA-F0-9]{40}$/.test(address3)) {
25167
26768
  printError("Invalid Ethereum address for --address");
25168
26769
  return;
25169
26770
  }
@@ -25175,7 +26776,7 @@ var sponsoredTaskManagedCommand = new Command116("managed").description(
25175
26776
  const params = new URLSearchParams({ limit: String(limit) });
25176
26777
  if (opts.cursor) params.set("cursor", opts.cursor);
25177
26778
  const result = await apiGet(
25178
- `/api/sponsored-task-vaults/managed/${address2.toLowerCase()}?${params.toString()}`
26779
+ `/api/sponsored-task-vaults/managed/${address3.toLowerCase()}?${params.toString()}`
25179
26780
  );
25180
26781
  printResult(result);
25181
26782
  });
@@ -25526,7 +27127,7 @@ async function findEntitlement(vaultId, workerAddress, taskId, options = {}) {
25526
27127
  const entitlements = await apiGet(
25527
27128
  `/api/sponsored-task-vaults/${vaultId}/entitlements?workerAddress=${workerAddress}${query4}`
25528
27129
  );
25529
- const found = taskId ? entitlements.find((e4) => e4.taskId.toLowerCase() === taskId.toLowerCase()) : entitlements[0];
27130
+ const found = taskId ? entitlements.find((e5) => e5.taskId.toLowerCase() === taskId.toLowerCase()) : entitlements[0];
25530
27131
  if (found || !taskId || Date.now() + 3e3 > deadline) return found;
25531
27132
  await sleep4(3e3);
25532
27133
  }
@@ -25652,16 +27253,16 @@ var REWARD_STATES = SponsoredTaskRewardStateSchema.options;
25652
27253
  var CLAIM_STATUSES = SponsoredTaskWorkerRewardClaimStatusSchema.options;
25653
27254
  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(
25654
27255
  async (opts) => {
25655
- let address2 = opts.address;
25656
- if (address2 === void 0) {
27256
+ let address3 = opts.address;
27257
+ if (address3 === void 0) {
25657
27258
  try {
25658
- address2 = (await loadKeystore()).walletAddress;
27259
+ address3 = (await loadKeystore()).walletAddress;
25659
27260
  } catch {
25660
27261
  printError("No keystore found. Run `taskmarket init` first, or pass --address.");
25661
27262
  return;
25662
27263
  }
25663
27264
  }
25664
- if (!/^0x[a-fA-F0-9]{40}$/.test(address2)) {
27265
+ if (!/^0x[a-fA-F0-9]{40}$/.test(address3)) {
25665
27266
  printError("Invalid Ethereum address for --address");
25666
27267
  return;
25667
27268
  }
@@ -25683,7 +27284,7 @@ var sponsoredTaskRewardsCommand = new Command126("rewards").description("List Sp
25683
27284
  if (opts.claimStatus) params.set("claimStatus", opts.claimStatus);
25684
27285
  if (opts.cursor) params.set("cursor", opts.cursor);
25685
27286
  const result = await apiGet(
25686
- `/api/sponsored-task-rewards/workers/${address2.toLowerCase()}?${params.toString()}`
27287
+ `/api/sponsored-task-rewards/workers/${address3.toLowerCase()}?${params.toString()}`
25687
27288
  );
25688
27289
  printResult(withChainNames(result));
25689
27290
  }
@@ -28054,18 +29655,18 @@ var projectListCommand = new Command149("list").description(
28054
29655
  if (before !== void 0) funding.set("before", String(before));
28055
29656
  return void printResult(await apiGet(withChainId(`/api/projects?${funding.toString()}`)));
28056
29657
  }
28057
- let address2 = opts.address;
28058
- if (address2 === void 0) {
29658
+ let address3 = opts.address;
29659
+ if (address3 === void 0) {
28059
29660
  try {
28060
- address2 = (await loadKeystore()).walletAddress;
29661
+ address3 = (await loadKeystore()).walletAddress;
28061
29662
  } catch {
28062
29663
  return void printError(
28063
29664
  "No keystore found. Run `taskmarket init` first, or pass --address."
28064
29665
  );
28065
29666
  }
28066
29667
  }
28067
- if (!ADDRESS.test(address2)) return void printError("Invalid Ethereum address for --address");
28068
- const params = new URLSearchParams({ address: address2, role: opts.role });
29668
+ if (!ADDRESS.test(address3)) return void printError("Invalid Ethereum address for --address");
29669
+ const params = new URLSearchParams({ address: address3, role: opts.role });
28069
29670
  if (opts.open) params.set("status", "open");
28070
29671
  if (opts.finished) params.set("status", "finished");
28071
29672
  if (opts.limit !== void 0) params.set("limit", opts.limit.trim());
@@ -28909,9 +30510,9 @@ var listCommand10 = new Command154("list").description(
28909
30510
  );
28910
30511
  var showCommand8 = new Command154("show").description(
28911
30512
  "Show one hook on the selected --network: its registry listing, or its onchain observation marked unlisted"
28912
- ).argument("<address>", "Hook contract address").action(async (address2) => {
30513
+ ).argument("<address>", "Hook contract address").action(async (address3) => {
28913
30514
  try {
28914
- const input = parseInput(HookGetInputSchema, { address: address2 });
30515
+ const input = parseInput(HookGetInputSchema, { address: address3 });
28915
30516
  const registry = await fetchHookRegistry(input.address.toLowerCase());
28916
30517
  const wanted = input.address.toLowerCase();
28917
30518
  const listed = registry.listed.find((hook) => hook.address.toLowerCase() === wanted);
@@ -28932,9 +30533,9 @@ var encodeConfigCommand = new Command154("encode-config").description(
28932
30533
  ).argument("<address>", "Hook contract address").requiredOption(
28933
30534
  "--values <json>",
28934
30535
  "The values as a JSON array in schema order, or a JSON object keyed by field name"
28935
- ).action(async (address2, opts) => {
30536
+ ).action(async (address3, opts) => {
28936
30537
  try {
28937
- const input = parseInput(HookGetInputSchema, { address: address2 });
30538
+ const input = parseInput(HookGetInputSchema, { address: address3 });
28938
30539
  const wanted = input.address.toLowerCase();
28939
30540
  const registry = await fetchHookRegistry(wanted);
28940
30541
  const entry = registry.listed.find((hook) => hook.address.toLowerCase() === wanted);
@@ -29152,13 +30753,37 @@ tapCommand.command("create").description(
29152
30753
  renderFailure(err);
29153
30754
  }
29154
30755
  });
30756
+ var CARD_VERIFICATION_NEXT_STEP = "Have the agent owner open verificationUrl in a browser to link a Visa card, then re-run 'taskmarket tap enrol' (or run with --wait).";
30757
+ function parseWaitTimeoutSeconds(raw) {
30758
+ if (raw === void 0) return TAP_WAIT_DEFAULT_TIMEOUT_SECONDS;
30759
+ const trimmed = raw.trim();
30760
+ if (!/^\d+$/.test(trimmed)) {
30761
+ throw new Error(
30762
+ `--wait-timeout must be a positive integer between 1 and ${TAP_WAIT_MAX_TIMEOUT_SECONDS} seconds`
30763
+ );
30764
+ }
30765
+ const seconds = Number(trimmed);
30766
+ if (!Number.isSafeInteger(seconds) || seconds < 1 || seconds > TAP_WAIT_MAX_TIMEOUT_SECONDS) {
30767
+ throw new Error(
30768
+ `--wait-timeout must be a positive integer between 1 and ${TAP_WAIT_MAX_TIMEOUT_SECONDS} seconds`
30769
+ );
30770
+ }
30771
+ return seconds;
30772
+ }
29155
30773
  tapCommand.command("enrol").description(
29156
30774
  "Enrol the stored TAP key on the configured network's chain and store the key id it gets. On a chain that supports it, the key (ECDSA P-256) is registered with the verifier's directory and the directory URL is stored for Signature-Agent; elsewhere enrolment is refused."
29157
30775
  ).option(
29158
30776
  "--force",
29159
- "Enrol a key this CLI already enrolled on this chain again; the server replaces its previous key there"
30777
+ "Enrol a key this CLI already enrolled on this chain again: it keeps its key id unless the directory no longer resolves it, which registers it again"
30778
+ ).option(
30779
+ "--wait",
30780
+ "Wait for the owner to complete Visa card verification in a browser and save the issued key id"
30781
+ ).option(
30782
+ "--wait-timeout <seconds>",
30783
+ `Maximum seconds to wait with --wait (default: ${TAP_WAIT_DEFAULT_TIMEOUT_SECONDS})`
29160
30784
  ).action(async (opts) => {
29161
30785
  try {
30786
+ const waitTimeoutSeconds = parseWaitTimeoutSeconds(opts.waitTimeout);
29162
30787
  const keystore = await loadKeystore();
29163
30788
  const stored = keystore.tapKey;
29164
30789
  if (!stored) {
@@ -29177,8 +30802,33 @@ tapCommand.command("enrol").description(
29177
30802
  `The TAP key's key id ${stored.keyId} was not enrolled by 'tap enrol' on chain ${chainId}, so 'tap enrol --force' will not replace it. Use 'taskmarket tap remove' or 'taskmarket tap import --force' to replace the key.`
29178
30803
  );
29179
30804
  }
29180
- const enrolment = await enrolTapKey(stored, chainId);
29181
- const tapKey = withTapEnrolment(stored, enrolment);
30805
+ const outcome = await enrolTapKey(stored, chainId);
30806
+ if (outcome.status === "card_verification_required") {
30807
+ if (!opts.wait) {
30808
+ printResult({
30809
+ enrolled: false,
30810
+ status: "card_verification_required",
30811
+ chainId: outcome.chainId,
30812
+ sessionId: outcome.sessionId,
30813
+ verificationUrl: outcome.verificationUrl,
30814
+ expiresAt: outcome.expiresAt,
30815
+ nextStep: CARD_VERIFICATION_NEXT_STEP
30816
+ });
30817
+ return;
30818
+ }
30819
+ process.stderr.write(
30820
+ `Waiting for Visa card verification (expires ${outcome.expiresAt}): ${outcome.verificationUrl}
30821
+ `
30822
+ );
30823
+ const enrolment = await waitForTapEnrolment(outcome.sessionId, {
30824
+ timeoutMs: waitTimeoutSeconds * 1e3
30825
+ });
30826
+ const tapKey2 = withTapEnrolment(stored, enrolment);
30827
+ await saveKeystore({ ...keystore, tapKey: tapKey2 });
30828
+ printResult(tapKeySummary(tapKey2));
30829
+ return;
30830
+ }
30831
+ const tapKey = withTapEnrolment(stored, outcome.enrolment);
29182
30832
  await saveKeystore({ ...keystore, tapKey });
29183
30833
  printResult(tapKeySummary(tapKey));
29184
30834
  } catch (err) {
@@ -29264,7 +30914,7 @@ async function lookupListedService(worker, serviceId) {
29264
30914
  if (!service || service.hidden) {
29265
30915
  return { service: null, error: `Service ${serviceId} is not on this worker's listing` };
29266
30916
  }
29267
- return { service };
30917
+ return { service, hosted: listing.hosted === true };
29268
30918
  }
29269
30919
  async function lookupWorkerKind(worker) {
29270
30920
  try {
@@ -29282,7 +30932,10 @@ function hireEvaluatorError(opts, requiresEvaluator) {
29282
30932
  }
29283
30933
  var hireCommand = new Command157("hire").description(
29284
30934
  "Hire a worker, a human or an agent: create a claim task only that worker may accept or decline before the accept window ends (costs the reward, in the payment token). Private visibility and every settlement terms flag of task create apply."
29285
- ).argument("<worker>", "The worker's wallet address (a human or an agent)").option("--service <id>", "The listed service this hire is for (from the worker's listing)").option(
30935
+ ).argument("<worker>", "The worker's wallet address (a human or an agent)").option(
30936
+ "--service <id>",
30937
+ "The listed service this hire is for (from the worker's listing). Check `agents get <worker>` first: a service with a hireNotice is accepted only after its owner approves"
30938
+ ).option(
29286
30939
  "--requires-evaluator",
29287
30940
  "The service requires an evaluator, when this backend cannot read the listing (needs --evaluator)"
29288
30941
  );
@@ -29295,6 +30948,7 @@ hireCommand.action(async (worker, opts) => {
29295
30948
  let requiresEvaluator = Boolean(opts.requiresEvaluator);
29296
30949
  let acceptWindow = opts.acceptWindow;
29297
30950
  let serviceTitle = null;
30951
+ let hireAcceptPolicy = null;
29298
30952
  if (/^0x[0-9a-fA-F]{40}$/.test(worker)) {
29299
30953
  const lookup = await lookupListedService(worker, opts.service);
29300
30954
  if (lookup.error) {
@@ -29307,6 +30961,16 @@ hireCommand.action(async (worker, opts) => {
29307
30961
  if (lookup.service) {
29308
30962
  requiresEvaluator ||= Boolean(lookup.service.requiresEvaluator);
29309
30963
  serviceTitle = lookup.service.title ?? null;
30964
+ hireAcceptPolicy = lookup.service.hireAcceptPolicy === "ask" ? "ask" : "auto";
30965
+ if (ownerConfirmsHire(lookup, lookup.service)) {
30966
+ warnings.push(
30967
+ cliWarning(
30968
+ "owner_confirms_hire",
30969
+ `${HIRE_OWNER_CONFIRMS_NOTICE}: the worker accepts this hire only after its owner approves, so the answer can take longer.`,
30970
+ { serviceId: opts.service }
30971
+ )
30972
+ );
30973
+ }
29310
30974
  if (acceptWindow === void 0 && lookup.service.acceptBySecs) {
29311
30975
  acceptWindow = String(lookup.service.acceptBySecs / 3600);
29312
30976
  }
@@ -29337,7 +31001,7 @@ hireCommand.action(async (worker, opts) => {
29337
31001
  {
29338
31002
  warnings,
29339
31003
  hiredWorker: { address: worker, kind: await lookupWorkerKind(worker) },
29340
- ...opts.service ? { hiredService: { serviceId: opts.service, serviceTitle } } : {}
31004
+ ...opts.service ? { hiredService: { serviceId: opts.service, serviceTitle, hireAcceptPolicy } } : {}
29341
31005
  }
29342
31006
  );
29343
31007
  } catch (err) {