@haven_ai/sdk 0.1.22-alpha.0 → 0.1.23-alpha.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.
package/dist/index.js CHANGED
@@ -102,7 +102,23 @@ var AgentPaymentFailureCode = {
102
102
  * mechanical: re-send merchant_url, tool_name, arguments, and
103
103
  * mcp_transport explicitly (the version-skew path).
104
104
  */
105
- MerchantCallContextUnavailable: "MERCHANT_CALL_CONTEXT_UNAVAILABLE"
105
+ MerchantCallContextUnavailable: "MERCHANT_CALL_CONTEXT_UNAVAILABLE",
106
+ /**
107
+ * #1351: the caller supplied BOTH the atomic `max_amount` and the
108
+ * human-denominated `max_amount_human` cap for one purchase. Haven refuses
109
+ * to guess which the user meant — the two differ by a factor of 10^decimals,
110
+ * so picking wrong is exactly the silent-overspend this cap exists to
111
+ * prevent. Rejected before any merchant probe, funding intent, or signature.
112
+ */
113
+ AmbiguousMaxAmount: "AMBIGUOUS_MAX_AMOUNT",
114
+ /**
115
+ * #1351: a human-denominated cap was supplied, but it cannot be converted to
116
+ * atomic units against THIS quote — either the quote's asset has no known
117
+ * decimals on its network, or the cap carries more fraction digits than the
118
+ * asset can represent (truncating it would silently change the user's cap).
119
+ * The fallback is the exact atomic `max_amount`.
120
+ */
121
+ MaxAmountUnconvertible: "MAX_AMOUNT_UNCONVERTIBLE"
106
122
  };
107
123
  var AgentPaymentRail = {
108
124
  /** Standard Haven payment from the user's Safe through an approved delegate allowance. */
@@ -157,7 +173,9 @@ var AgentPaymentFailureCodeDescriptions = {
157
173
  [AgentPaymentFailureCode.PaymentWindowExpired]: "The x402 funding/quote window expired before the signer or hosted settle step could finish. Re-quote via haven_pay_mcp_tool with the same idempotency key to avoid duplicate funding.",
158
174
  [AgentPaymentFailureCode.MerchantRejectedAfterFunding]: "The Haven funding leg succeeded, but the merchant rejected the paid retry. Stop retrying the merchant and reconcile stranded delegate funds with haven_sweep_delegate.",
159
175
  [AgentPaymentFailureCode.MerchantUnresponsiveAfterFunding]: "The Haven funding leg succeeded, but the merchant did not answer the paid retry before the timeout. The merchant may still settle late \u2014 check haven_get_payment_status (and retry haven_complete_mcp_tool once) BEFORE sweeping; sweep only if no settlement appears.",
160
- [AgentPaymentFailureCode.MerchantCallContextUnavailable]: "merchant_url/tool_name were omitted and no stored merchant call context is available for this payment_id. Re-send merchant_url, tool_name, arguments, and mcp_transport explicitly."
176
+ [AgentPaymentFailureCode.MerchantCallContextUnavailable]: "merchant_url/tool_name were omitted and no stored merchant call context is available for this payment_id. Re-send merchant_url, tool_name, arguments, and mcp_transport explicitly.",
177
+ [AgentPaymentFailureCode.AmbiguousMaxAmount]: "Both max_amount (atomic units) and max_amount_human (whole tokens) were supplied for one purchase. Nothing was contacted and nothing was spent. Re-send with exactly ONE: max_amount_human for a cap the user stated in tokens, max_amount for an exact atomic figure.",
178
+ [AgentPaymentFailureCode.MaxAmountUnconvertible]: "max_amount_human could not be converted to atomic units against this quote's asset \u2014 either its decimals are unknown to Haven or the cap has more decimal places than the asset supports. Nothing was spent. Round the cap, or re-send it as an exact atomic max_amount."
161
179
  };
162
180
  var AgentPaymentWarningCode = {
163
181
  /** No max_amount cap was supplied — the live quoted price was accepted as-is. */
@@ -1092,8 +1110,7 @@ var HavenClient = class {
1092
1110
  400
1093
1111
  );
1094
1112
  }
1095
- const agent = await this.getAgent();
1096
- const fundingTo = agent.delegateAddress;
1113
+ const fundingTo = options.delegateAddress ?? (await this.getAgent()).delegateAddress;
1097
1114
  if (!fundingTo) {
1098
1115
  throw new HavenApiError("Authenticated agent has no delegate address registered.", 502);
1099
1116
  }
@@ -1102,13 +1119,25 @@ var HavenClient = class {
1102
1119
  url: paymentRequired.resource.url,
1103
1120
  payTo: fundingTo,
1104
1121
  merchantPayTo: option.payTo,
1122
+ // #1360: this path ALWAYS means the EIP-3009 funding leg (payTo is the
1123
+ // agent's own delegate EOA). Saying so explicitly turns a stale/rotated
1124
+ // delegate address into the backend's LOUD shape-mismatch 400 instead
1125
+ // of a silent reroute to the erc7710 settlement branch (the #1358
1126
+ // review's open-budget misroute). Legacy-rail backends ignore the field.
1127
+ settlementScheme: "eip3009",
1105
1128
  amount: x402AuthorizationAmount(option),
1106
1129
  asset: option.asset,
1107
1130
  network: option.network,
1108
1131
  description: paymentRequired.resource.description,
1109
1132
  idempotencyKey,
1110
1133
  // #1307: persisted so the settle leg can rehydrate it by payment_id.
1111
- ...options.mcpCallContext ? { mcpCallContext: options.mcpCallContext } : {}
1134
+ ...options.mcpCallContext ? { mcpCallContext: options.mcpCallContext } : {},
1135
+ // #1355: persisted so the SIGN leg can rehydrate it by payment_id — the
1136
+ // local signer's context fetch then carries the 402 PaymentRequired and
1137
+ // the agent passes only payment_id. Bounded: the backend rejects >64KB,
1138
+ // so an oversized blob is omitted here (signer falls back to the
1139
+ // caller-supplied copy) rather than failing the intent.
1140
+ ...new TextEncoder().encode(JSON.stringify(paymentRequired)).length <= 65536 ? { paymentRequired } : {}
1112
1141
  });
1113
1142
  if (raw.status !== "pending_signature") {
1114
1143
  this.throwPaymentStateError("x402 payment", raw);
@@ -1240,6 +1269,17 @@ var HavenClient = class {
1240
1269
  * Get the agent identity tied to this API key.
1241
1270
  */
1242
1271
  async getAgent() {
1272
+ if (this.agentInFlight) return this.agentInFlight;
1273
+ const request = this.fetchAgent();
1274
+ this.agentInFlight = request;
1275
+ request.finally(() => {
1276
+ this.agentInFlight = null;
1277
+ }).catch(() => {
1278
+ });
1279
+ return request;
1280
+ }
1281
+ agentInFlight = null;
1282
+ async fetchAgent() {
1243
1283
  const raw = await this.get("/machine-payments/agent");
1244
1284
  return {
1245
1285
  id: raw.id,
@@ -1438,6 +1478,7 @@ var HavenClient = class {
1438
1478
  */
1439
1479
  async getPostPurchaseAllowanceSummary(paymentId) {
1440
1480
  const unavailable = (detail) => ({
1481
+ payment: null,
1441
1482
  allowance: null,
1442
1483
  warnings: [
1443
1484
  {
@@ -1446,27 +1487,38 @@ var HavenClient = class {
1446
1487
  }
1447
1488
  ]
1448
1489
  });
1490
+ const [statusResult, agentResult, allowanceResult] = await Promise.allSettled([
1491
+ this.getPaymentStatus(paymentId),
1492
+ this.getAgent(),
1493
+ this.getAllowances()
1494
+ ]);
1495
+ if (statusResult.status === "rejected") {
1496
+ return unavailable(statusResult.reason instanceof Error ? statusResult.reason.message : String(statusResult.reason));
1497
+ }
1498
+ const status = statusResult.value;
1499
+ if (agentResult.status === "rejected") {
1500
+ return { ...unavailable(agentResult.reason instanceof Error ? agentResult.reason.message : String(agentResult.reason)), payment: status };
1501
+ }
1502
+ if (allowanceResult.status === "rejected") {
1503
+ return { ...unavailable(allowanceResult.reason instanceof Error ? allowanceResult.reason.message : String(allowanceResult.reason)), payment: status };
1504
+ }
1449
1505
  try {
1450
- const [status, agent, allowanceSummary] = await Promise.all([
1451
- this.getPaymentStatus(paymentId),
1452
- this.getAgent(),
1453
- this.getAllowances()
1454
- ]);
1455
1506
  const tokenAddress = status.asset ?? status.x402?.asset ?? null;
1456
1507
  if (!tokenAddress) {
1457
- return unavailable("the settled payment does not carry a resolvable token address");
1508
+ return { ...unavailable("the settled payment does not carry a resolvable token address"), payment: status };
1458
1509
  }
1459
- const rail = agent.executionRail;
1510
+ const rail = agentResult.value.executionRail;
1460
1511
  const source = rail === "delegation" ? "active_delegations" : "allowance_module";
1461
- const match = allowanceSummary.allowances.find(
1512
+ const match = allowanceResult.value.allowances.find(
1462
1513
  (a) => a.tokenAddress.toLowerCase() === tokenAddress.toLowerCase()
1463
1514
  );
1464
1515
  if (!match) {
1465
- return unavailable("no allowance/budget row matches the settled token");
1516
+ return { ...unavailable("no allowance/budget row matches the settled token"), payment: status };
1466
1517
  }
1467
1518
  const token = resolveTokenFromAddress(match.tokenAddress);
1468
1519
  const remainingDisplay = token ? `${formatAtomicAmount(safeBigInt(match.onchain.remaining), token.decimals)} ${match.tokenSymbol}` : void 0;
1469
1520
  return {
1521
+ payment: status,
1470
1522
  allowance: {
1471
1523
  rail,
1472
1524
  remaining_atomic: match.onchain.remaining,
@@ -1514,6 +1566,7 @@ var HavenClient = class {
1514
1566
  async discoverTools(options = {}) {
1515
1567
  const params = new URLSearchParams();
1516
1568
  if (options.category) params.set("category", options.category);
1569
+ if (options.search !== void 0) params.set("search", options.search);
1517
1570
  if (options.rail) params.set("rail", options.rail);
1518
1571
  const query = params.size > 0 ? `?${params.toString()}` : "";
1519
1572
  const raw = await this.get(`/catalog${query}`);
@@ -1705,7 +1758,11 @@ var HavenClient = class {
1705
1758
  asset: option.asset,
1706
1759
  network: option.network,
1707
1760
  description: paymentRequired.resource.description,
1708
- idempotencyKey
1761
+ idempotencyKey,
1762
+ // #1360: same explicit funding-leg declaration as createX402Intent —
1763
+ // this local-key path derives payTo from the key (never stale), but the
1764
+ // declaration keeps both writers of the 3009 shape loud-by-default.
1765
+ settlementScheme: "eip3009"
1709
1766
  });
1710
1767
  if (raw.success && raw.tx_hash) {
1711
1768
  const receipt2 = this.mapX402ReceiptFromAuthorization(paymentRequired, option, paymentHeader, raw);
@@ -2908,6 +2965,11 @@ var HavenClient = class {
2908
2965
  amountAtomic: x402AuthorizationAmount(option),
2909
2966
  amount: decimalFromUsdcAtomic(x402AuthorizationAmount(option)),
2910
2967
  token: token?.symbol ?? "USDC",
2968
+ // #1351: null when the asset is unrecognised on this network — the
2969
+ // `token` fallback above is a LABEL, not evidence of 6 decimals, and a
2970
+ // human-denominated cap must fail closed rather than convert against a
2971
+ // guess. Same resolution as `token`, so the two never disagree.
2972
+ decimals: token?.decimals ?? null,
2911
2973
  asset: option.asset,
2912
2974
  network: option.network,
2913
2975
  chainId: chainIdOrNull(option.network),
@@ -3522,8 +3584,8 @@ var toolDescriptions = {
3522
3584
  discoverTools: {
3523
3585
  summary: "Step 1 of a purchase: discover payable services from Haven's curated merchant catalog \u2014 names, prices, and which pay tool to use next.",
3524
3586
  selectionGuidance: "Use this when the user asks what the agent can buy, pay for, or which paid services exist \u2014 or when you need a resource URL for a service the user described. Do NOT use for balance, budget, or spend-limit questions \u2014 use haven_get_allowances. Do NOT use to pay \u2014 each returned entry names the pay tool to use next.",
3525
- behavior: "Use each entry's suggested_tool field first \u2014 it names the exact next call. Read-only lookup against Haven's curated catalog; entries are periodically re-verified against the live merchant and degraded entries are flagged. Returns name, description, price, rail, resource URL, tool_name, tool_arguments, and suggested_tool. The catalog price (price_display/price_atomic, marked price_is_indicative) is a last-verified hint, NOT authoritative \u2014 the real price comes from the merchant's live 402 at pay time. Never creates a payment, signature, or approval.",
3526
- nextActionGuidance: "Pick an entry and pay it with the tool named in suggested_tool, passing the entry's resource_url, tool_name, and tool_arguments for MCP merchants. Confirm the price from the live pay-tool result (not the catalog), and pass max_amount when the user has a cap."
3587
+ behavior: "Use each entry's suggested_tool field first \u2014 it names the exact next call. Read-only lookup against Haven's curated catalog; entries are periodically re-verified against the live merchant and degraded entries are flagged. Use category for a case-insensitive category filter (for example, VPN or vpn), or search for a product name, category, or description term. Returns name, description, price, rail, resource URL, tool_name, tool_arguments, and suggested_tool. The catalog price (price_display/price_atomic, marked price_is_indicative) is a last-verified hint, NOT authoritative \u2014 the real price comes from the merchant's live 402 at pay time. Never creates a payment, signature, or approval.",
3588
+ nextActionGuidance: `Pick an entry and pay it with the tool named in suggested_tool, passing the entry's resource_url, tool_name, and tool_arguments for MCP merchants. Confirm the price from the live pay-tool result (not the catalog), and pass the user's cap as max_amount_human in whole tokens ("no more than 1 USDC" \u2192 max_amount_human: "1") \u2014 never convert it to atomic units by hand (#1351).`
3527
3589
  },
3528
3590
  sweep_delegate: {
3529
3591
  summary: "Sweep stranded USDC and/or ETH from the delegate wallet back to the originating Safe.",
@@ -3835,10 +3897,13 @@ normal, not an error.
3835
3897
 
3836
3898
  1. \`mcp__haven__haven_discover_tools\` to find a payable service and its
3837
3899
  \`catalog_id\`.
3838
- 2. \`mcp__haven__haven_prepare_catalog_purchase\` with \`catalog_id\` and
3839
- \`max_amount\`. \`max_amount\` (atomic units) is REQUIRED on this tool, and
3840
- is best practice on every paid call below too \u2014 it caps what the LIVE
3841
- merchant quote may charge, checked before any funding intent is created.
3900
+ 2. \`mcp__haven__haven_prepare_catalog_purchase\` with \`catalog_id\` and a
3901
+ spending cap. A cap is REQUIRED on this tool and is best practice on every
3902
+ paid call below too \u2014 it caps what the LIVE merchant quote may charge,
3903
+ checked before any funding intent is created. Write it the way the user
3904
+ said it: \`max_amount_human\` is whole tokens, so "no more than 1 USDC" is
3905
+ \`max_amount_human: "1"\`. (\`max_amount\` is the atomic-unit form, where
3906
+ "1" means 0.000001 USDC \u2014 do not convert by hand, and never send both.)
3842
3907
  3. Then FOLLOW THE RESPONSE'S GUIDANCE FIELDS: \`next_action\`, \`next_tool\`,
3843
3908
  and \`next_arguments\` name the exact next call \u2014 act on those first; the
3844
3909
  prose in this section is fallback and debugging detail. If the catalog
@@ -3846,9 +3911,11 @@ normal, not an error.
3846
3911
  \`mcp__haven__haven_pay_mcp_tool\` (merchant URL, tool name, arguments) as
3847
3912
  the manual fallback.
3848
3913
 
3849
- **Signing:** \`mcp__haven-signer__haven_sign_x402\` with \`payment_id\` and
3850
- \`payment_required\` ONLY \u2014 the local signer fetches the exact signing bytes
3851
- itself, so never relay \`typed_data\` yourself. Fallback for an older signer
3914
+ **Signing:** \`mcp__haven-signer__haven_sign_x402\` with \`payment_id\` ONLY \u2014
3915
+ the local signer fetches the exact signing bytes AND \`payment_required\`
3916
+ itself, so never relay \`typed_data\` or the 402 blob yourself. If the signer
3917
+ reports its fetched context carried no \`payment_required\` (older backend),
3918
+ re-call with \`payment_required\` added verbatim. Fallback for an older signer
3852
3919
  or backend: re-run the quote/prepare tool with the SAME \`idempotency_key\`
3853
3920
  plus \`include_signing_payload=true\`, then pass \`payload_hash\`,
3854
3921
  \`x402_expected\` (the nested \`x402.expected\` object), and
@@ -3918,8 +3985,14 @@ present and surface \`message\` or \`error\` verbatim. Common cases:
3918
3985
  - \`pending_approval\`: queued for the user's approval (see above).
3919
3986
  - \`insufficient_funds\`: the Haven wallet doesn't hold enough of that token.
3920
3987
  Suggest the user add funds in the Haven dashboard.
3921
- - \`PRICE_EXCEEDS_MAX\`: the live merchant price exceeded your \`max_amount\`.
3922
- No funds moved; ask the user before retrying with a higher cap.
3988
+ - \`PRICE_EXCEEDS_MAX\`: the live merchant price exceeded your cap. No funds
3989
+ moved; ask the user before retrying with a higher one.
3990
+ - \`AMBIGUOUS_MAX_AMOUNT\`: you sent both \`max_amount\` and
3991
+ \`max_amount_human\`. Nothing was contacted or spent \u2014 re-send with exactly
3992
+ one (\`max_amount_human\` for a cap the user stated in tokens).
3993
+ - \`MAX_AMOUNT_UNCONVERTIBLE\`: \`max_amount_human\` does not fit this quote's
3994
+ asset \u2014 unknown decimals, or more decimal places than the asset supports.
3995
+ Round the cap, or send an exact atomic \`max_amount\`.
3923
3996
  - \`PAYMENT_WINDOW_EXPIRED\`: re-run the quote/prepare tool with the same
3924
3997
  \`idempotency_key\`, then sign the fresh payload.
3925
3998
  - \`MERCHANT_REJECTED_AFTER_FUNDING\`: the merchant refused the paid retry.
@@ -3938,10 +4011,12 @@ present and surface \`message\` or \`error\` verbatim. Common cases:
3938
4011
  ## Reporting after a purchase
3939
4012
 
3940
4013
  A settled \`mcp__haven__haven_settle_mcp_tool\` response carries
3941
- \`agent_summary\` and the remaining post-purchase allowance in \`allowance\` \u2014
3942
- report the amount paid and what is left from those fields directly. Do not
3943
- call \`haven_get_agent\` or \`haven_get_allowances\` again just to report a
3944
- purchase you already made.
4014
+ \`agent_summary.purchase_summary\` and the remaining post-purchase allowance
4015
+ in \`allowance\` \u2014 report the product, Haven-derived payment/transaction
4016
+ fields, and what is left from those fields directly. \`result\` is optional
4017
+ raw merchant evidence; never use it to decide whether the purchase was paid.
4018
+ Do not call \`haven_get_agent\` or \`haven_get_allowances\` again just to
4019
+ report a purchase you already made.
3945
4020
 
3946
4021
  ## Revoke
3947
4022
 
@@ -3952,7 +4027,7 @@ for that credential.
3952
4027
  var SKILL_FOLDER_NAME = "haven-pay";
3953
4028
 
3954
4029
  // src/node-version.ts
3955
- var HAVEN_MINIMUM_NODE_VERSION = "24.0.0";
4030
+ var HAVEN_MINIMUM_NODE_VERSION = "22.0.0";
3956
4031
  function parseNodeVersion(value) {
3957
4032
  const match = value.trim().match(/^v?(\d+)(?:\.(\d+))?(?:\.(\d+))?/);
3958
4033
  if (!match) return [0, 0, 0];
@@ -4139,6 +4214,6 @@ function sameUrl(a, b) {
4139
4214
  }
4140
4215
  }
4141
4216
 
4142
- export { AGENT_PAYMENT_FAILURE_CODE_VALUES, AGENT_PAYMENT_NEXT_ACTION_VALUES, AGENT_PAYMENT_PHASE_VALUES, AGENT_PAYMENT_RAIL_VALUES, AgentPaymentFailureCode, AgentPaymentFailureCodeDescriptions, AgentPaymentFailureCodeSchema, AgentPaymentNextAction, AgentPaymentNextActionDescriptions, AgentPaymentNextActionSchema, AgentPaymentPhase, AgentPaymentPhaseDescriptions, AgentPaymentPhaseSchema, AgentPaymentRail, AgentPaymentRailDescriptions, AgentPaymentRailSchema, AgentPaymentWarningCode, DISCOVERY_MAX_BYTES, HAVEN_MINIMUM_NODE_VERSION, HAVEN_SKILL_MD, HavenApiError, HavenClient, HavenError, HavenPaymentStateError, HavenSigningError, HavenTimeoutError, HavenUnsupportedSignerVersionError, MERCHANT_DISCOVERY_PATHS, MerchantTimeoutError, RECEIPT_VERSION, SIGNER_UPDATE_FALLBACK, SKILL_FOLDER_NAME, SWEEP_BASE_CHAIN_ID, SWEEP_BASE_SEPOLIA_CHAIN_ID, SWEEP_BASE_SEPOLIA_USDC_ADDRESS, SWEEP_BASE_USDC_ADDRESS, SignerRefusalCode, TRANSFER_WITH_AUTHORIZATION_TYPES, X402UnexpectedStatusError, X402_MAX_AUTHORIZATION_WINDOW_SECONDS, X402_SETTLEMENT_FORWARD_MARGIN_SECONDS, addressFromKey, buildMachinePaymentIdempotencyKey, buildSweepAuthorizationMessage, buildSweepTypedData, buildX402ExpectedMessage, compareNodeVersions, composeDescription, decodeBase64Json, decodeBase64Utf8, discoverMerchantMcpUrl, encodeBase64Json, encodeBase64Utf8, encodeMachinePaymentProof, encodePaymentProof, havenTools, isSupportedNodeVersion, isSweepableChain, parseMachinePaymentChallenge, parseMachinePaymentChallengeResponse, parsePaymentRequired, parsePaymentRequiredResponse, sameUrl, selectPaymentOption, selectStandardPaymentOption, signHash, signUserOpTypedDataForDelegation, sweepUsdcAddress, sweepUsdcDomain, toStandardPaymentRequirements, toolDescriptions, unsupportedNodeVersionMessage, verifyPaymentReceipt, verifySignature, x402AuthorizationAmount };
4217
+ export { AGENT_PAYMENT_FAILURE_CODE_VALUES, AGENT_PAYMENT_NEXT_ACTION_VALUES, AGENT_PAYMENT_PHASE_VALUES, AGENT_PAYMENT_RAIL_VALUES, AgentPaymentFailureCode, AgentPaymentFailureCodeDescriptions, AgentPaymentFailureCodeSchema, AgentPaymentNextAction, AgentPaymentNextActionDescriptions, AgentPaymentNextActionSchema, AgentPaymentPhase, AgentPaymentPhaseDescriptions, AgentPaymentPhaseSchema, AgentPaymentRail, AgentPaymentRailDescriptions, AgentPaymentRailSchema, AgentPaymentWarningCode, DISCOVERY_MAX_BYTES, HAVEN_MINIMUM_NODE_VERSION, HAVEN_SKILL_MD, HavenApiError, HavenClient, HavenError, HavenPaymentStateError, HavenSigningError, HavenTimeoutError, HavenUnsupportedSignerVersionError, MERCHANT_DISCOVERY_PATHS, MerchantTimeoutError, RECEIPT_VERSION, SIGNER_UPDATE_FALLBACK, SKILL_FOLDER_NAME, SWEEP_BASE_CHAIN_ID, SWEEP_BASE_SEPOLIA_CHAIN_ID, SWEEP_BASE_SEPOLIA_USDC_ADDRESS, SWEEP_BASE_USDC_ADDRESS, SignerRefusalCode, TRANSFER_WITH_AUTHORIZATION_TYPES, X402UnexpectedStatusError, X402_MAX_AUTHORIZATION_WINDOW_SECONDS, X402_SETTLEMENT_FORWARD_MARGIN_SECONDS, addressFromKey, buildMachinePaymentIdempotencyKey, buildSweepAuthorizationMessage, buildSweepTypedData, buildX402ExpectedMessage, compareNodeVersions, composeDescription, decodeBase64Json, decodeBase64Utf8, discoverMerchantMcpUrl, encodeBase64Json, encodeBase64Utf8, encodeMachinePaymentProof, encodePaymentProof, havenTools, isSupportedNodeVersion, isSweepableChain, parseMachinePaymentChallenge, parseMachinePaymentChallengeResponse, parsePaymentRequired, parsePaymentRequiredResponse, resolveTokenFromAddress, sameUrl, selectPaymentOption, selectStandardPaymentOption, signHash, signUserOpTypedDataForDelegation, sweepUsdcAddress, sweepUsdcDomain, toStandardPaymentRequirements, toolDescriptions, unsupportedNodeVersionMessage, verifyPaymentReceipt, verifySignature, x402AuthorizationAmount };
4143
4218
  //# sourceMappingURL=index.js.map
4144
4219
  //# sourceMappingURL=index.js.map