@haven_ai/sdk 0.1.37-alpha.0 → 0.2.0-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.d.cts CHANGED
@@ -23,7 +23,13 @@ interface PaymentReceipt {
23
23
  amount: string;
24
24
  amountSek: string | null;
25
25
  recipient: string;
26
+ /** @deprecated since #2907 — read `account`; removed in #2914 (the release after the naming window). Same value as `account`. */
26
27
  safe: string;
28
+ /**
29
+ * The payer's smart-account address (#2907 twin of `safe`). Optional for
30
+ * the window: a server from before the twin emits `safe` only.
31
+ */
32
+ account?: string;
27
33
  chainId: number;
28
34
  settledAt: string | null;
29
35
  resourceUrl: string | null;
@@ -138,7 +144,14 @@ interface SignData {
138
144
  };
139
145
  /** Breakdown of values that were hashed — useful for debugging */
140
146
  components: {
147
+ /** @deprecated #2908 — same value as `payer_account`; the server drops it at #2914. */
141
148
  safe: string;
149
+ /**
150
+ * #2907 — the account-vocabulary twin of `safe`: the PAYER account
151
+ * (the user's smart account). Not to be confused with `account`, which on
152
+ * the funding shapes holds the DELEGATE account address.
153
+ */
154
+ payer_account?: string;
142
155
  token: string;
143
156
  to: string;
144
157
  amount: string;
@@ -522,6 +535,15 @@ interface HavenAgent {
522
535
  id: string;
523
536
  name: string;
524
537
  status: string;
538
+ /**
539
+ * The agent's Haven account (smart account) address — #2908, the
540
+ * account-vocabulary name. Same value as {@link HavenAgent.safeAddress}.
541
+ */
542
+ accountAddress: string;
543
+ /**
544
+ * @deprecated #2908 — same value as {@link HavenAgent.accountAddress}.
545
+ * Removed in the release after the one carrying #2908 (#2914).
546
+ */
525
547
  safeAddress: string;
526
548
  delegateAddress: string;
527
549
  chainId: number;
@@ -563,6 +585,12 @@ interface HavenAllowance {
563
585
  }
564
586
  interface HavenAllowanceSummary {
565
587
  agentId: string;
588
+ /** #2908 — the account-vocabulary name; same value as `safeAddress`. */
589
+ accountAddress: string;
590
+ /**
591
+ * @deprecated #2908 — same value as {@link HavenAllowanceSummary.accountAddress}.
592
+ * Removed in the release after the one carrying #2908 (#2914).
593
+ */
566
594
  safeAddress: string;
567
595
  delegateAddress: string;
568
596
  chainId: number;
@@ -843,9 +871,14 @@ declare const AgentPaymentNextAction: {
843
871
  */
844
872
  readonly PaymentWindowExpired: "payment_window_expired";
845
873
  /**
846
- * Stop and tell the user that the originating Safe needs to be funded or
874
+ * Stop and tell the user that the originating account needs to be funded or
847
875
  * the agent's per-token allowance needs to be raised before the payment
848
876
  * can succeed. A user approval will not fix this state on its own.
877
+ *
878
+ * #2908: the wire twin `fund_account_or_raise_allowance`
879
+ * ({@link AgentPaymentNextActionAccountAlias}) means the same thing; the
880
+ * server keeps emitting THIS value until #2914. Compare via
881
+ * {@link canonicalAgentPaymentNextAction}.
849
882
  */
850
883
  readonly FundSafeOrRaiseAllowance: "fund_safe_or_raise_allowance";
851
884
  /**
@@ -856,6 +889,39 @@ declare const AgentPaymentNextAction: {
856
889
  readonly SweepStrandedFunds: "sweep_stranded_funds";
857
890
  };
858
891
  type AgentPaymentNextAction = (typeof AgentPaymentNextAction)[keyof typeof AgentPaymentNextAction];
892
+ /**
893
+ * #2908 (naming epic #2906): the account-vocabulary twin of
894
+ * {@link AgentPaymentNextAction.FundSafeOrRaiseAllowance}. The server ACCEPTS
895
+ * and DOCUMENTS this value from #2907 but keeps EMITTING the old one through
896
+ * the compatibility window; the emitted value flips at #2914.
897
+ *
898
+ * Deliberately declared beside `AgentPaymentNextAction` rather than inside
899
+ * it: the backend keeps a hand-mirror of that const, parity-pinned key-for-key
900
+ * and value-for-value (`agent-payment-taxonomy.parity.test.ts`), and the
901
+ * served `x-enumDescriptions` are the SDK's strings verbatim. Both consts
902
+ * move together at #2914; until then this alias is how a client handles both
903
+ * wire values without forking the taxonomy.
904
+ */
905
+ declare const AgentPaymentNextActionAccountAlias: {
906
+ /** Account-vocabulary twin of `fund_safe_or_raise_allowance`; same meaning. */
907
+ readonly FundAccountOrRaiseAllowance: "fund_account_or_raise_allowance";
908
+ };
909
+ type AgentPaymentNextActionAccountAlias = (typeof AgentPaymentNextActionAccountAlias)[keyof typeof AgentPaymentNextActionAccountAlias];
910
+ /** Every `next_action` value a server may put on the wire during the #2908 window. */
911
+ type AgentPaymentNextActionWire = AgentPaymentNextAction | AgentPaymentNextActionAccountAlias;
912
+ /**
913
+ * Collapse the #2908 account-vocabulary alias onto its canonical taxonomy
914
+ * value, and pass every other value through untouched.
915
+ *
916
+ * This is the one seam a `switch` over `AgentPaymentNextAction` needs: a
917
+ * case on `FundSafeOrRaiseAllowance` matches a server that emits either
918
+ * spelling, and no case falls through because the alias arrived. Unknown
919
+ * strings are returned as-is (the SDK never invents a value), so the return
920
+ * type is exactly the input type widened by the canonical value.
921
+ */
922
+ declare function canonicalAgentPaymentNextAction<T extends string | null | undefined>(value: T): Exclude<T, AgentPaymentNextActionAccountAlias> | typeof AgentPaymentNextAction.FundSafeOrRaiseAllowance;
923
+ /** True for EITHER spelling of the fund-or-raise-allowance next action (#2908). */
924
+ declare function isFundAccountOrRaiseAllowance(value: string | null | undefined): boolean;
859
925
  declare const AgentPaymentFailureCode: {
860
926
  /** A merchant-authoritative x402 price exceeds the caller's pre-funding max_amount cap. */
861
927
  readonly PriceExceedsMax: "PRICE_EXCEEDS_MAX";
@@ -992,7 +1058,15 @@ interface AgentPaymentWarning {
992
1058
  * (payment_required) are named in `reason` and taken from the SAME response.
993
1059
  */
994
1060
  interface AgentNextStep {
995
- next_action: AgentPaymentNextAction;
1061
+ /**
1062
+ * From `AgentPaymentNextAction`, widened by the #2908 account-vocabulary
1063
+ * alias for the compatibility window: the hosted server keeps emitting
1064
+ * `fund_safe_or_raise_allowance` until #2914, but a client compiled against
1065
+ * this type must not reject `fund_account_or_raise_allowance` when the flip
1066
+ * lands. Compare through {@link canonicalAgentPaymentNextAction} or
1067
+ * {@link isFundAccountOrRaiseAllowance}, never by one literal.
1068
+ */
1069
+ next_action: AgentPaymentNextActionWire;
996
1070
  /**
997
1071
  * Claude-family namespaced tool name for the next call
998
1072
  * (`mcp__<server>__<tool>`), when one exists.
@@ -2234,7 +2308,7 @@ declare const toolDescriptions: {
2234
2308
  readonly getAgent: {
2235
2309
  readonly summary: "Return the authenticated agent identity AND its live spend authority in one call: Haven wallet, delegate, chain, raw status, spend_authority_readiness, and per-token remaining allowance (atomic + human-readable). The recommended first call in a new session to confirm who you are and whether Haven will let you spend right now.";
2236
2310
  readonly selectionGuidance: "Use this as the one-shot orientation/bootstrap at the start of a session, or whenever you need to confirm identity together with whether the agent can spend right now. For a detailed per-token breakdown (configured vs spent vs reset window) use haven_get_allowances.";
2237
- readonly behavior: "Reads identity plus the live spend-authority snapshot in one shot — the agent's active on-chain budget delegation. spend_authority_readiness (readiness is a deprecated alias, same value) is \"ready\" when at least one token has remaining spend authority, \"needs_approval\" when the agent is active but has none, and \"revoked\" when the credential is not active. It covers hosted identity + on-chain spend authority ONLY — the hosted server cannot see the LOCAL signer, so \"ready\" does not mean the signer can start; verify the signer with a signer tool call or connect --doctor. An over-budget payment is declined before any money moves: there is no approval queue, so ask the owner to grant or raise the budget in Haven rather than waiting for an approval. allowances[] carries remainingAtomic and remainingDisplay per token. Identity fields (id, name, status, safeAddress, delegateAddress, chainId) are unchanged from before.";
2311
+ readonly behavior: "Reads identity plus the live spend-authority snapshot in one shot — the agent's active on-chain budget delegation. spend_authority_readiness (readiness is a deprecated alias, same value) is \"ready\" when at least one token has remaining spend authority, \"needs_approval\" when the agent is active but has none, and \"revoked\" when the credential is not active. It covers hosted identity + on-chain spend authority ONLY — the hosted server cannot see the LOCAL signer, so \"ready\" does not mean the signer can start; verify the signer with a signer tool call or connect --doctor. An over-budget payment is declined before any money moves: there is no approval queue, so ask the owner to grant or raise the budget in Haven rather than waiting for an approval. allowances[] carries remainingAtomic and remainingDisplay per token. Identity fields: id, name, status, accountAddress (safeAddress: deprecated alias, same value), delegateAddress, chainId.";
2238
2312
  readonly nextActionGuidance: "";
2239
2313
  };
2240
2314
  readonly getAllowances: {
@@ -2274,7 +2348,7 @@ declare const toolDescriptions: {
2274
2348
  readonly nextActionGuidance: "Give the verify_token and the well-known instructions (from getCatalogSubmissionStatus) to the merchant so they can publish the proof line, then poll the submission status until it reaches verified_payable or failed.";
2275
2349
  };
2276
2350
  readonly sweep_delegate: {
2277
- readonly summary: "Sweep stranded USDC and/or ETH from the delegate wallet back to the originating Safe.";
2351
+ readonly summary: "Sweep stranded USDC and/or ETH from the delegate wallet back to the originating account.";
2278
2352
  readonly selectionGuidance: string;
2279
2353
  readonly behavior: string;
2280
2354
  readonly nextActionGuidance: string;
@@ -2710,6 +2784,74 @@ interface UnsupportedNodeVersionMessageOptions {
2710
2784
  */
2711
2785
  declare function unsupportedNodeVersionMessage(options: UnsupportedNodeVersionMessageOptions): string;
2712
2786
 
2787
+ /**
2788
+ * #2908 (naming epic #2906, phase 1): the account-vocabulary reads and the
2789
+ * dual-name emissions every published package shares during the one-release
2790
+ * compatibility window.
2791
+ *
2792
+ * The rule, stated once: READ both names and prefer the new; EMIT both names
2793
+ * with the same value; WRITE only the new. The old names on server responses
2794
+ * are removed by #2914, one release after the one that carries this module.
2795
+ * The credential-FILE fallbacks (`safe_address` / `safeAddress` in a file on
2796
+ * disk) are NOT part of that window — they are permanent, because a file that
2797
+ * was written before this release never rewrites itself.
2798
+ *
2799
+ * Kept as tiny pure functions so a reader has exactly one fallback chain per
2800
+ * shape and a test can mutate it: dropping the new name fails the new-shape
2801
+ * test, dropping the old name fails the old-shape test.
2802
+ */
2803
+ /**
2804
+ * The account address off a snake_case server shape, new name first.
2805
+ *
2806
+ * `account_address` is the P0 (#2907) twin the server emits beside
2807
+ * `safe_address`; an older server emits only `safe_address`. A missing pair
2808
+ * resolves to `undefined` rather than an empty string so callers can tell
2809
+ * "absent" from "blank".
2810
+ */
2811
+ declare function readAccountAddress(raw: {
2812
+ account_address?: string | null;
2813
+ safe_address?: string | null;
2814
+ }): string | undefined;
2815
+ /**
2816
+ * The account id off a snake_case server shape, new name first
2817
+ * (`account_id`, the #2907 twin of `safe_id`).
2818
+ */
2819
+ declare function readAccountId(raw: {
2820
+ account_id?: string | null;
2821
+ safe_id?: string | null;
2822
+ }): string | undefined;
2823
+ /**
2824
+ * Both camelCase names for one address, for the SDK's public shapes (and the
2825
+ * hosted MCP outputs that spread them). Same value under both keys; the
2826
+ * `safeAddress` key is the deprecated one and goes at #2914.
2827
+ */
2828
+ declare function accountAddressTwins(address: string | undefined): {
2829
+ accountAddress: string;
2830
+ safeAddress: string;
2831
+ };
2832
+ /**
2833
+ * The x402 receipt's `payer` off a funding-authorization response, in the
2834
+ * order the issue pins (#2908): the explicit `payer`, then the top-level
2835
+ * account address (new name, then old), then the `sign_data.components`
2836
+ * twins — `payer_account` (the #2907 twin) before `safe`.
2837
+ *
2838
+ * `components.account` is deliberately NOT in this chain: on the funding
2839
+ * shapes it holds the DELEGATE account address, a different address, and
2840
+ * reading it here would silently corrupt the receipt's payer.
2841
+ */
2842
+ declare function readX402ReceiptPayer(raw: {
2843
+ payer?: string;
2844
+ account_address?: string;
2845
+ safe_address?: string;
2846
+ sign_data?: {
2847
+ components?: {
2848
+ payer_account?: string;
2849
+ safe?: string;
2850
+ account?: string;
2851
+ };
2852
+ };
2853
+ }): string | undefined;
2854
+
2713
2855
  /**
2714
2856
  * x402 protocol support for the Haven SDK.
2715
2857
  *
@@ -3058,4 +3200,4 @@ declare function discoverMerchantMcpUrl(inputUrl: string): Promise<string | null
3058
3200
  /** Trailing-slash/percent-case echoes compare equal; unparseable never does. */
3059
3201
  declare function sameUrl(a: string, b: string): boolean;
3060
3202
 
3061
- export { AGENT_APPROVAL_RELAY_JSON_SENTENCE, AGENT_APPROVAL_RELAY_PROSE_SENTENCE, AGENT_COMMAND_MODIFICATION_SENTENCE, AGENT_JSON_MODE_SENTENCE, AGENT_LOCAL_KEY_SENTENCE, AGENT_NETWORK_ACCESS_SENTENCE, AGENT_ONBOARDING_PROMPT, AGENT_PAYMENT_FAILURE_CODE_VALUES, AGENT_PAYMENT_NEXT_ACTION_VALUES, AGENT_PAYMENT_PHASE_VALUES, AGENT_PAYMENT_RAIL_VALUES, AGENT_README_SECTION_MD, AGENT_SECRET_HYGIENE_SENTENCE, AGENT_WIRING_COLLISION_RELAY_SENTENCE, type AgentNextStep, type AgentPaymentEnumSchema, AgentPaymentFailureCode, AgentPaymentFailureCodeDescriptions, AgentPaymentFailureCodeSchema, AgentPaymentNextAction, AgentPaymentNextActionDescriptions, AgentPaymentNextActionSchema, AgentPaymentPhase, AgentPaymentPhaseDescriptions, AgentPaymentPhaseSchema, AgentPaymentRail, AgentPaymentRailDescriptions, AgentPaymentRailSchema, type AgentPaymentSummary, type AgentPaymentWarning, AgentPaymentWarningCode, type AgentPurchaseSummary, CONNECTOR_PACKAGE_NAME, type CatalogSubmissionAccepted, type ClaudeTool, DEFAULT_CONFIRMATION_TIMEOUT_MS, DISCOVERY_MAX_BYTES, ERC7710_ASSET_TRANSFER_METHOD, HAVEN_AGENT_RUNBOOK_MD, HAVEN_CONNECTOR_CHANNEL, HAVEN_MINIMUM_NODE_VERSION, HAVEN_SKILL_BODY_MD, HAVEN_SKILL_MD, type HavenAgent, type HavenAgentAllowanceSummary, type HavenAgentReadiness, type HavenAgentSummary, type HavenAllowance, type HavenAllowanceSummary, HavenApiError, type HavenCatalogEntry, type HavenCatalogSubmission, HavenClient, type HavenClientConfig, HavenError, type HavenPaymentReceipt, HavenPaymentStateError, HavenSigningError, HavenTimeoutError, HavenUnsupportedSignerVersionError, MERCHANT_DISCOVERY_PATHS, type MachinePaymentRail, MerchantTimeoutError, type OpenAITool, type PaymentFee, type PaymentIntent, type PaymentNextAction, type PaymentPhase, type PaymentReceipt, type PaymentRequest, type PaymentResult, type PaymentResumeState, type PaymentStatus, type PaymentStatusResult, type PostPurchaseAllowanceSummary, RECEIPT_VERSION, type ReceiptVerification, type ResumeAuthorizedX402Input, type ResumeX402PaymentInput, SIGNER_UPDATE_FALLBACK, SKILL_FOLDER_NAME, SWEEP_BASE_CHAIN_ID, SWEEP_BASE_SEPOLIA_CHAIN_ID, SWEEP_BASE_SEPOLIA_USDC_ADDRESS, SWEEP_BASE_USDC_ADDRESS, type SharedToolKey, type SignData, SignerRefusalCode, type SweepAuthorization, type SweepConfirmation, type SweepEip712Domain, type SweepEntry, type SweepExpectedAuth, type SweepPreparation, type SweepPrepareResponse, type SweepResult, type SweepSubmitResponse, type SweepSubmitResult, type SweepTypedData, TRANSFER_WITH_AUTHORIZATION_TYPES, type ToolDescription, type UnsupportedNodeVersionMessageOptions, X402AlreadySettledError, type X402AuthorizationOptions, type X402Erc7710Settlement, type X402ExpectedAuth, type X402ExpectedContext, type X402Intent, type X402McpCallContext, type X402McpTransport, type X402MerchantCallContext, type X402MerchantOutcome, type X402MerchantOutcomeReport, type X402PaymentHeaderContext, X402PaymentHeaderValidationError, type X402PaymentOption, type X402PaymentRequired, type X402Quote, type X402Receipt, type X402RequestSnapshot, type X402ResumeState, type X402SchemeSelection, X402UnexpectedStatusError, X402_LEGACY_PAYMENT_HEADER_NAME, X402_MAX_AUTHORIZATION_WINDOW_SECONDS, X402_PAYMENT_HEADER_NAME, X402_PAYMENT_HEADER_NAMES_SENT, X402_PAYMENT_REQUIRED_HEADER_NAME, X402_PAYMENT_RESPONSE_HEADER_NAME, X402_SETTLEMENT_FORWARD_MARGIN_SECONDS, addressFromKey, buildSweepAuthorizationMessage, buildSweepTypedData, buildX402ExpectedMessage, compareNodeVersions, composeDescription, connectorRerunCommand, connectorSpec, decodeBase64Json, decodeBase64Utf8, discoverMerchantMcpUrl, encodeBase64Json, encodeBase64Utf8, encodePaymentProof, havenTools, isConnectorChannel, isErc7710Option, isSupportedNodeVersion, isSweepableChain, normalizePaymentRequired, parsePaymentRequired, parsePaymentRequiredResponse, resolveConnectorChannel, resolveTokenFromAddress, sameUrl, selectErc7710PaymentOption, selectPaymentOption, selectStandardPaymentOption, selectX402SettlementScheme, signHash, signUserOpTypedDataForDelegation, signerUpdateFallback, sweepUsdcAddress, sweepUsdcDomain, toStandardPaymentRequirements, toolDescriptions, unsupportedNodeVersionMessage, validateStandardX402PaymentHeader, verifyPaymentReceipt, verifySignature, x402AssetTransferMethod, x402AuthorizationAmount, x402FacilitatorAddresses, x402V2PaymentEnvelope };
3203
+ export { AGENT_APPROVAL_RELAY_JSON_SENTENCE, AGENT_APPROVAL_RELAY_PROSE_SENTENCE, AGENT_COMMAND_MODIFICATION_SENTENCE, AGENT_JSON_MODE_SENTENCE, AGENT_LOCAL_KEY_SENTENCE, AGENT_NETWORK_ACCESS_SENTENCE, AGENT_ONBOARDING_PROMPT, AGENT_PAYMENT_FAILURE_CODE_VALUES, AGENT_PAYMENT_NEXT_ACTION_VALUES, AGENT_PAYMENT_PHASE_VALUES, AGENT_PAYMENT_RAIL_VALUES, AGENT_README_SECTION_MD, AGENT_SECRET_HYGIENE_SENTENCE, AGENT_WIRING_COLLISION_RELAY_SENTENCE, type AgentNextStep, type AgentPaymentEnumSchema, AgentPaymentFailureCode, AgentPaymentFailureCodeDescriptions, AgentPaymentFailureCodeSchema, AgentPaymentNextAction, AgentPaymentNextActionAccountAlias, AgentPaymentNextActionDescriptions, AgentPaymentNextActionSchema, type AgentPaymentNextActionWire, AgentPaymentPhase, AgentPaymentPhaseDescriptions, AgentPaymentPhaseSchema, AgentPaymentRail, AgentPaymentRailDescriptions, AgentPaymentRailSchema, type AgentPaymentSummary, type AgentPaymentWarning, AgentPaymentWarningCode, type AgentPurchaseSummary, CONNECTOR_PACKAGE_NAME, type CatalogSubmissionAccepted, type ClaudeTool, DEFAULT_CONFIRMATION_TIMEOUT_MS, DISCOVERY_MAX_BYTES, ERC7710_ASSET_TRANSFER_METHOD, HAVEN_AGENT_RUNBOOK_MD, HAVEN_CONNECTOR_CHANNEL, HAVEN_MINIMUM_NODE_VERSION, HAVEN_SKILL_BODY_MD, HAVEN_SKILL_MD, type HavenAgent, type HavenAgentAllowanceSummary, type HavenAgentReadiness, type HavenAgentSummary, type HavenAllowance, type HavenAllowanceSummary, HavenApiError, type HavenCatalogEntry, type HavenCatalogSubmission, HavenClient, type HavenClientConfig, HavenError, type HavenPaymentReceipt, HavenPaymentStateError, HavenSigningError, HavenTimeoutError, HavenUnsupportedSignerVersionError, MERCHANT_DISCOVERY_PATHS, type MachinePaymentRail, MerchantTimeoutError, type OpenAITool, type PaymentFee, type PaymentIntent, type PaymentNextAction, type PaymentPhase, type PaymentReceipt, type PaymentRequest, type PaymentResult, type PaymentResumeState, type PaymentStatus, type PaymentStatusResult, type PostPurchaseAllowanceSummary, RECEIPT_VERSION, type ReceiptVerification, type ResumeAuthorizedX402Input, type ResumeX402PaymentInput, SIGNER_UPDATE_FALLBACK, SKILL_FOLDER_NAME, SWEEP_BASE_CHAIN_ID, SWEEP_BASE_SEPOLIA_CHAIN_ID, SWEEP_BASE_SEPOLIA_USDC_ADDRESS, SWEEP_BASE_USDC_ADDRESS, type SharedToolKey, type SignData, SignerRefusalCode, type SweepAuthorization, type SweepConfirmation, type SweepEip712Domain, type SweepEntry, type SweepExpectedAuth, type SweepPreparation, type SweepPrepareResponse, type SweepResult, type SweepSubmitResponse, type SweepSubmitResult, type SweepTypedData, TRANSFER_WITH_AUTHORIZATION_TYPES, type ToolDescription, type UnsupportedNodeVersionMessageOptions, X402AlreadySettledError, type X402AuthorizationOptions, type X402Erc7710Settlement, type X402ExpectedAuth, type X402ExpectedContext, type X402Intent, type X402McpCallContext, type X402McpTransport, type X402MerchantCallContext, type X402MerchantOutcome, type X402MerchantOutcomeReport, type X402PaymentHeaderContext, X402PaymentHeaderValidationError, type X402PaymentOption, type X402PaymentRequired, type X402Quote, type X402Receipt, type X402RequestSnapshot, type X402ResumeState, type X402SchemeSelection, X402UnexpectedStatusError, X402_LEGACY_PAYMENT_HEADER_NAME, X402_MAX_AUTHORIZATION_WINDOW_SECONDS, X402_PAYMENT_HEADER_NAME, X402_PAYMENT_HEADER_NAMES_SENT, X402_PAYMENT_REQUIRED_HEADER_NAME, X402_PAYMENT_RESPONSE_HEADER_NAME, X402_SETTLEMENT_FORWARD_MARGIN_SECONDS, accountAddressTwins, addressFromKey, buildSweepAuthorizationMessage, buildSweepTypedData, buildX402ExpectedMessage, canonicalAgentPaymentNextAction, compareNodeVersions, composeDescription, connectorRerunCommand, connectorSpec, decodeBase64Json, decodeBase64Utf8, discoverMerchantMcpUrl, encodeBase64Json, encodeBase64Utf8, encodePaymentProof, havenTools, isConnectorChannel, isErc7710Option, isFundAccountOrRaiseAllowance, isSupportedNodeVersion, isSweepableChain, normalizePaymentRequired, parsePaymentRequired, parsePaymentRequiredResponse, readAccountAddress, readAccountId, readX402ReceiptPayer, resolveConnectorChannel, resolveTokenFromAddress, sameUrl, selectErc7710PaymentOption, selectPaymentOption, selectStandardPaymentOption, selectX402SettlementScheme, signHash, signUserOpTypedDataForDelegation, signerUpdateFallback, sweepUsdcAddress, sweepUsdcDomain, toStandardPaymentRequirements, toolDescriptions, unsupportedNodeVersionMessage, validateStandardX402PaymentHeader, verifyPaymentReceipt, verifySignature, x402AssetTransferMethod, x402AuthorizationAmount, x402FacilitatorAddresses, x402V2PaymentEnvelope };
package/dist/index.d.ts CHANGED
@@ -23,7 +23,13 @@ interface PaymentReceipt {
23
23
  amount: string;
24
24
  amountSek: string | null;
25
25
  recipient: string;
26
+ /** @deprecated since #2907 — read `account`; removed in #2914 (the release after the naming window). Same value as `account`. */
26
27
  safe: string;
28
+ /**
29
+ * The payer's smart-account address (#2907 twin of `safe`). Optional for
30
+ * the window: a server from before the twin emits `safe` only.
31
+ */
32
+ account?: string;
27
33
  chainId: number;
28
34
  settledAt: string | null;
29
35
  resourceUrl: string | null;
@@ -138,7 +144,14 @@ interface SignData {
138
144
  };
139
145
  /** Breakdown of values that were hashed — useful for debugging */
140
146
  components: {
147
+ /** @deprecated #2908 — same value as `payer_account`; the server drops it at #2914. */
141
148
  safe: string;
149
+ /**
150
+ * #2907 — the account-vocabulary twin of `safe`: the PAYER account
151
+ * (the user's smart account). Not to be confused with `account`, which on
152
+ * the funding shapes holds the DELEGATE account address.
153
+ */
154
+ payer_account?: string;
142
155
  token: string;
143
156
  to: string;
144
157
  amount: string;
@@ -522,6 +535,15 @@ interface HavenAgent {
522
535
  id: string;
523
536
  name: string;
524
537
  status: string;
538
+ /**
539
+ * The agent's Haven account (smart account) address — #2908, the
540
+ * account-vocabulary name. Same value as {@link HavenAgent.safeAddress}.
541
+ */
542
+ accountAddress: string;
543
+ /**
544
+ * @deprecated #2908 — same value as {@link HavenAgent.accountAddress}.
545
+ * Removed in the release after the one carrying #2908 (#2914).
546
+ */
525
547
  safeAddress: string;
526
548
  delegateAddress: string;
527
549
  chainId: number;
@@ -563,6 +585,12 @@ interface HavenAllowance {
563
585
  }
564
586
  interface HavenAllowanceSummary {
565
587
  agentId: string;
588
+ /** #2908 — the account-vocabulary name; same value as `safeAddress`. */
589
+ accountAddress: string;
590
+ /**
591
+ * @deprecated #2908 — same value as {@link HavenAllowanceSummary.accountAddress}.
592
+ * Removed in the release after the one carrying #2908 (#2914).
593
+ */
566
594
  safeAddress: string;
567
595
  delegateAddress: string;
568
596
  chainId: number;
@@ -843,9 +871,14 @@ declare const AgentPaymentNextAction: {
843
871
  */
844
872
  readonly PaymentWindowExpired: "payment_window_expired";
845
873
  /**
846
- * Stop and tell the user that the originating Safe needs to be funded or
874
+ * Stop and tell the user that the originating account needs to be funded or
847
875
  * the agent's per-token allowance needs to be raised before the payment
848
876
  * can succeed. A user approval will not fix this state on its own.
877
+ *
878
+ * #2908: the wire twin `fund_account_or_raise_allowance`
879
+ * ({@link AgentPaymentNextActionAccountAlias}) means the same thing; the
880
+ * server keeps emitting THIS value until #2914. Compare via
881
+ * {@link canonicalAgentPaymentNextAction}.
849
882
  */
850
883
  readonly FundSafeOrRaiseAllowance: "fund_safe_or_raise_allowance";
851
884
  /**
@@ -856,6 +889,39 @@ declare const AgentPaymentNextAction: {
856
889
  readonly SweepStrandedFunds: "sweep_stranded_funds";
857
890
  };
858
891
  type AgentPaymentNextAction = (typeof AgentPaymentNextAction)[keyof typeof AgentPaymentNextAction];
892
+ /**
893
+ * #2908 (naming epic #2906): the account-vocabulary twin of
894
+ * {@link AgentPaymentNextAction.FundSafeOrRaiseAllowance}. The server ACCEPTS
895
+ * and DOCUMENTS this value from #2907 but keeps EMITTING the old one through
896
+ * the compatibility window; the emitted value flips at #2914.
897
+ *
898
+ * Deliberately declared beside `AgentPaymentNextAction` rather than inside
899
+ * it: the backend keeps a hand-mirror of that const, parity-pinned key-for-key
900
+ * and value-for-value (`agent-payment-taxonomy.parity.test.ts`), and the
901
+ * served `x-enumDescriptions` are the SDK's strings verbatim. Both consts
902
+ * move together at #2914; until then this alias is how a client handles both
903
+ * wire values without forking the taxonomy.
904
+ */
905
+ declare const AgentPaymentNextActionAccountAlias: {
906
+ /** Account-vocabulary twin of `fund_safe_or_raise_allowance`; same meaning. */
907
+ readonly FundAccountOrRaiseAllowance: "fund_account_or_raise_allowance";
908
+ };
909
+ type AgentPaymentNextActionAccountAlias = (typeof AgentPaymentNextActionAccountAlias)[keyof typeof AgentPaymentNextActionAccountAlias];
910
+ /** Every `next_action` value a server may put on the wire during the #2908 window. */
911
+ type AgentPaymentNextActionWire = AgentPaymentNextAction | AgentPaymentNextActionAccountAlias;
912
+ /**
913
+ * Collapse the #2908 account-vocabulary alias onto its canonical taxonomy
914
+ * value, and pass every other value through untouched.
915
+ *
916
+ * This is the one seam a `switch` over `AgentPaymentNextAction` needs: a
917
+ * case on `FundSafeOrRaiseAllowance` matches a server that emits either
918
+ * spelling, and no case falls through because the alias arrived. Unknown
919
+ * strings are returned as-is (the SDK never invents a value), so the return
920
+ * type is exactly the input type widened by the canonical value.
921
+ */
922
+ declare function canonicalAgentPaymentNextAction<T extends string | null | undefined>(value: T): Exclude<T, AgentPaymentNextActionAccountAlias> | typeof AgentPaymentNextAction.FundSafeOrRaiseAllowance;
923
+ /** True for EITHER spelling of the fund-or-raise-allowance next action (#2908). */
924
+ declare function isFundAccountOrRaiseAllowance(value: string | null | undefined): boolean;
859
925
  declare const AgentPaymentFailureCode: {
860
926
  /** A merchant-authoritative x402 price exceeds the caller's pre-funding max_amount cap. */
861
927
  readonly PriceExceedsMax: "PRICE_EXCEEDS_MAX";
@@ -992,7 +1058,15 @@ interface AgentPaymentWarning {
992
1058
  * (payment_required) are named in `reason` and taken from the SAME response.
993
1059
  */
994
1060
  interface AgentNextStep {
995
- next_action: AgentPaymentNextAction;
1061
+ /**
1062
+ * From `AgentPaymentNextAction`, widened by the #2908 account-vocabulary
1063
+ * alias for the compatibility window: the hosted server keeps emitting
1064
+ * `fund_safe_or_raise_allowance` until #2914, but a client compiled against
1065
+ * this type must not reject `fund_account_or_raise_allowance` when the flip
1066
+ * lands. Compare through {@link canonicalAgentPaymentNextAction} or
1067
+ * {@link isFundAccountOrRaiseAllowance}, never by one literal.
1068
+ */
1069
+ next_action: AgentPaymentNextActionWire;
996
1070
  /**
997
1071
  * Claude-family namespaced tool name for the next call
998
1072
  * (`mcp__<server>__<tool>`), when one exists.
@@ -2234,7 +2308,7 @@ declare const toolDescriptions: {
2234
2308
  readonly getAgent: {
2235
2309
  readonly summary: "Return the authenticated agent identity AND its live spend authority in one call: Haven wallet, delegate, chain, raw status, spend_authority_readiness, and per-token remaining allowance (atomic + human-readable). The recommended first call in a new session to confirm who you are and whether Haven will let you spend right now.";
2236
2310
  readonly selectionGuidance: "Use this as the one-shot orientation/bootstrap at the start of a session, or whenever you need to confirm identity together with whether the agent can spend right now. For a detailed per-token breakdown (configured vs spent vs reset window) use haven_get_allowances.";
2237
- readonly behavior: "Reads identity plus the live spend-authority snapshot in one shot — the agent's active on-chain budget delegation. spend_authority_readiness (readiness is a deprecated alias, same value) is \"ready\" when at least one token has remaining spend authority, \"needs_approval\" when the agent is active but has none, and \"revoked\" when the credential is not active. It covers hosted identity + on-chain spend authority ONLY — the hosted server cannot see the LOCAL signer, so \"ready\" does not mean the signer can start; verify the signer with a signer tool call or connect --doctor. An over-budget payment is declined before any money moves: there is no approval queue, so ask the owner to grant or raise the budget in Haven rather than waiting for an approval. allowances[] carries remainingAtomic and remainingDisplay per token. Identity fields (id, name, status, safeAddress, delegateAddress, chainId) are unchanged from before.";
2311
+ readonly behavior: "Reads identity plus the live spend-authority snapshot in one shot — the agent's active on-chain budget delegation. spend_authority_readiness (readiness is a deprecated alias, same value) is \"ready\" when at least one token has remaining spend authority, \"needs_approval\" when the agent is active but has none, and \"revoked\" when the credential is not active. It covers hosted identity + on-chain spend authority ONLY — the hosted server cannot see the LOCAL signer, so \"ready\" does not mean the signer can start; verify the signer with a signer tool call or connect --doctor. An over-budget payment is declined before any money moves: there is no approval queue, so ask the owner to grant or raise the budget in Haven rather than waiting for an approval. allowances[] carries remainingAtomic and remainingDisplay per token. Identity fields: id, name, status, accountAddress (safeAddress: deprecated alias, same value), delegateAddress, chainId.";
2238
2312
  readonly nextActionGuidance: "";
2239
2313
  };
2240
2314
  readonly getAllowances: {
@@ -2274,7 +2348,7 @@ declare const toolDescriptions: {
2274
2348
  readonly nextActionGuidance: "Give the verify_token and the well-known instructions (from getCatalogSubmissionStatus) to the merchant so they can publish the proof line, then poll the submission status until it reaches verified_payable or failed.";
2275
2349
  };
2276
2350
  readonly sweep_delegate: {
2277
- readonly summary: "Sweep stranded USDC and/or ETH from the delegate wallet back to the originating Safe.";
2351
+ readonly summary: "Sweep stranded USDC and/or ETH from the delegate wallet back to the originating account.";
2278
2352
  readonly selectionGuidance: string;
2279
2353
  readonly behavior: string;
2280
2354
  readonly nextActionGuidance: string;
@@ -2710,6 +2784,74 @@ interface UnsupportedNodeVersionMessageOptions {
2710
2784
  */
2711
2785
  declare function unsupportedNodeVersionMessage(options: UnsupportedNodeVersionMessageOptions): string;
2712
2786
 
2787
+ /**
2788
+ * #2908 (naming epic #2906, phase 1): the account-vocabulary reads and the
2789
+ * dual-name emissions every published package shares during the one-release
2790
+ * compatibility window.
2791
+ *
2792
+ * The rule, stated once: READ both names and prefer the new; EMIT both names
2793
+ * with the same value; WRITE only the new. The old names on server responses
2794
+ * are removed by #2914, one release after the one that carries this module.
2795
+ * The credential-FILE fallbacks (`safe_address` / `safeAddress` in a file on
2796
+ * disk) are NOT part of that window — they are permanent, because a file that
2797
+ * was written before this release never rewrites itself.
2798
+ *
2799
+ * Kept as tiny pure functions so a reader has exactly one fallback chain per
2800
+ * shape and a test can mutate it: dropping the new name fails the new-shape
2801
+ * test, dropping the old name fails the old-shape test.
2802
+ */
2803
+ /**
2804
+ * The account address off a snake_case server shape, new name first.
2805
+ *
2806
+ * `account_address` is the P0 (#2907) twin the server emits beside
2807
+ * `safe_address`; an older server emits only `safe_address`. A missing pair
2808
+ * resolves to `undefined` rather than an empty string so callers can tell
2809
+ * "absent" from "blank".
2810
+ */
2811
+ declare function readAccountAddress(raw: {
2812
+ account_address?: string | null;
2813
+ safe_address?: string | null;
2814
+ }): string | undefined;
2815
+ /**
2816
+ * The account id off a snake_case server shape, new name first
2817
+ * (`account_id`, the #2907 twin of `safe_id`).
2818
+ */
2819
+ declare function readAccountId(raw: {
2820
+ account_id?: string | null;
2821
+ safe_id?: string | null;
2822
+ }): string | undefined;
2823
+ /**
2824
+ * Both camelCase names for one address, for the SDK's public shapes (and the
2825
+ * hosted MCP outputs that spread them). Same value under both keys; the
2826
+ * `safeAddress` key is the deprecated one and goes at #2914.
2827
+ */
2828
+ declare function accountAddressTwins(address: string | undefined): {
2829
+ accountAddress: string;
2830
+ safeAddress: string;
2831
+ };
2832
+ /**
2833
+ * The x402 receipt's `payer` off a funding-authorization response, in the
2834
+ * order the issue pins (#2908): the explicit `payer`, then the top-level
2835
+ * account address (new name, then old), then the `sign_data.components`
2836
+ * twins — `payer_account` (the #2907 twin) before `safe`.
2837
+ *
2838
+ * `components.account` is deliberately NOT in this chain: on the funding
2839
+ * shapes it holds the DELEGATE account address, a different address, and
2840
+ * reading it here would silently corrupt the receipt's payer.
2841
+ */
2842
+ declare function readX402ReceiptPayer(raw: {
2843
+ payer?: string;
2844
+ account_address?: string;
2845
+ safe_address?: string;
2846
+ sign_data?: {
2847
+ components?: {
2848
+ payer_account?: string;
2849
+ safe?: string;
2850
+ account?: string;
2851
+ };
2852
+ };
2853
+ }): string | undefined;
2854
+
2713
2855
  /**
2714
2856
  * x402 protocol support for the Haven SDK.
2715
2857
  *
@@ -3058,4 +3200,4 @@ declare function discoverMerchantMcpUrl(inputUrl: string): Promise<string | null
3058
3200
  /** Trailing-slash/percent-case echoes compare equal; unparseable never does. */
3059
3201
  declare function sameUrl(a: string, b: string): boolean;
3060
3202
 
3061
- export { AGENT_APPROVAL_RELAY_JSON_SENTENCE, AGENT_APPROVAL_RELAY_PROSE_SENTENCE, AGENT_COMMAND_MODIFICATION_SENTENCE, AGENT_JSON_MODE_SENTENCE, AGENT_LOCAL_KEY_SENTENCE, AGENT_NETWORK_ACCESS_SENTENCE, AGENT_ONBOARDING_PROMPT, AGENT_PAYMENT_FAILURE_CODE_VALUES, AGENT_PAYMENT_NEXT_ACTION_VALUES, AGENT_PAYMENT_PHASE_VALUES, AGENT_PAYMENT_RAIL_VALUES, AGENT_README_SECTION_MD, AGENT_SECRET_HYGIENE_SENTENCE, AGENT_WIRING_COLLISION_RELAY_SENTENCE, type AgentNextStep, type AgentPaymentEnumSchema, AgentPaymentFailureCode, AgentPaymentFailureCodeDescriptions, AgentPaymentFailureCodeSchema, AgentPaymentNextAction, AgentPaymentNextActionDescriptions, AgentPaymentNextActionSchema, AgentPaymentPhase, AgentPaymentPhaseDescriptions, AgentPaymentPhaseSchema, AgentPaymentRail, AgentPaymentRailDescriptions, AgentPaymentRailSchema, type AgentPaymentSummary, type AgentPaymentWarning, AgentPaymentWarningCode, type AgentPurchaseSummary, CONNECTOR_PACKAGE_NAME, type CatalogSubmissionAccepted, type ClaudeTool, DEFAULT_CONFIRMATION_TIMEOUT_MS, DISCOVERY_MAX_BYTES, ERC7710_ASSET_TRANSFER_METHOD, HAVEN_AGENT_RUNBOOK_MD, HAVEN_CONNECTOR_CHANNEL, HAVEN_MINIMUM_NODE_VERSION, HAVEN_SKILL_BODY_MD, HAVEN_SKILL_MD, type HavenAgent, type HavenAgentAllowanceSummary, type HavenAgentReadiness, type HavenAgentSummary, type HavenAllowance, type HavenAllowanceSummary, HavenApiError, type HavenCatalogEntry, type HavenCatalogSubmission, HavenClient, type HavenClientConfig, HavenError, type HavenPaymentReceipt, HavenPaymentStateError, HavenSigningError, HavenTimeoutError, HavenUnsupportedSignerVersionError, MERCHANT_DISCOVERY_PATHS, type MachinePaymentRail, MerchantTimeoutError, type OpenAITool, type PaymentFee, type PaymentIntent, type PaymentNextAction, type PaymentPhase, type PaymentReceipt, type PaymentRequest, type PaymentResult, type PaymentResumeState, type PaymentStatus, type PaymentStatusResult, type PostPurchaseAllowanceSummary, RECEIPT_VERSION, type ReceiptVerification, type ResumeAuthorizedX402Input, type ResumeX402PaymentInput, SIGNER_UPDATE_FALLBACK, SKILL_FOLDER_NAME, SWEEP_BASE_CHAIN_ID, SWEEP_BASE_SEPOLIA_CHAIN_ID, SWEEP_BASE_SEPOLIA_USDC_ADDRESS, SWEEP_BASE_USDC_ADDRESS, type SharedToolKey, type SignData, SignerRefusalCode, type SweepAuthorization, type SweepConfirmation, type SweepEip712Domain, type SweepEntry, type SweepExpectedAuth, type SweepPreparation, type SweepPrepareResponse, type SweepResult, type SweepSubmitResponse, type SweepSubmitResult, type SweepTypedData, TRANSFER_WITH_AUTHORIZATION_TYPES, type ToolDescription, type UnsupportedNodeVersionMessageOptions, X402AlreadySettledError, type X402AuthorizationOptions, type X402Erc7710Settlement, type X402ExpectedAuth, type X402ExpectedContext, type X402Intent, type X402McpCallContext, type X402McpTransport, type X402MerchantCallContext, type X402MerchantOutcome, type X402MerchantOutcomeReport, type X402PaymentHeaderContext, X402PaymentHeaderValidationError, type X402PaymentOption, type X402PaymentRequired, type X402Quote, type X402Receipt, type X402RequestSnapshot, type X402ResumeState, type X402SchemeSelection, X402UnexpectedStatusError, X402_LEGACY_PAYMENT_HEADER_NAME, X402_MAX_AUTHORIZATION_WINDOW_SECONDS, X402_PAYMENT_HEADER_NAME, X402_PAYMENT_HEADER_NAMES_SENT, X402_PAYMENT_REQUIRED_HEADER_NAME, X402_PAYMENT_RESPONSE_HEADER_NAME, X402_SETTLEMENT_FORWARD_MARGIN_SECONDS, addressFromKey, buildSweepAuthorizationMessage, buildSweepTypedData, buildX402ExpectedMessage, compareNodeVersions, composeDescription, connectorRerunCommand, connectorSpec, decodeBase64Json, decodeBase64Utf8, discoverMerchantMcpUrl, encodeBase64Json, encodeBase64Utf8, encodePaymentProof, havenTools, isConnectorChannel, isErc7710Option, isSupportedNodeVersion, isSweepableChain, normalizePaymentRequired, parsePaymentRequired, parsePaymentRequiredResponse, resolveConnectorChannel, resolveTokenFromAddress, sameUrl, selectErc7710PaymentOption, selectPaymentOption, selectStandardPaymentOption, selectX402SettlementScheme, signHash, signUserOpTypedDataForDelegation, signerUpdateFallback, sweepUsdcAddress, sweepUsdcDomain, toStandardPaymentRequirements, toolDescriptions, unsupportedNodeVersionMessage, validateStandardX402PaymentHeader, verifyPaymentReceipt, verifySignature, x402AssetTransferMethod, x402AuthorizationAmount, x402FacilitatorAddresses, x402V2PaymentEnvelope };
3203
+ export { AGENT_APPROVAL_RELAY_JSON_SENTENCE, AGENT_APPROVAL_RELAY_PROSE_SENTENCE, AGENT_COMMAND_MODIFICATION_SENTENCE, AGENT_JSON_MODE_SENTENCE, AGENT_LOCAL_KEY_SENTENCE, AGENT_NETWORK_ACCESS_SENTENCE, AGENT_ONBOARDING_PROMPT, AGENT_PAYMENT_FAILURE_CODE_VALUES, AGENT_PAYMENT_NEXT_ACTION_VALUES, AGENT_PAYMENT_PHASE_VALUES, AGENT_PAYMENT_RAIL_VALUES, AGENT_README_SECTION_MD, AGENT_SECRET_HYGIENE_SENTENCE, AGENT_WIRING_COLLISION_RELAY_SENTENCE, type AgentNextStep, type AgentPaymentEnumSchema, AgentPaymentFailureCode, AgentPaymentFailureCodeDescriptions, AgentPaymentFailureCodeSchema, AgentPaymentNextAction, AgentPaymentNextActionAccountAlias, AgentPaymentNextActionDescriptions, AgentPaymentNextActionSchema, type AgentPaymentNextActionWire, AgentPaymentPhase, AgentPaymentPhaseDescriptions, AgentPaymentPhaseSchema, AgentPaymentRail, AgentPaymentRailDescriptions, AgentPaymentRailSchema, type AgentPaymentSummary, type AgentPaymentWarning, AgentPaymentWarningCode, type AgentPurchaseSummary, CONNECTOR_PACKAGE_NAME, type CatalogSubmissionAccepted, type ClaudeTool, DEFAULT_CONFIRMATION_TIMEOUT_MS, DISCOVERY_MAX_BYTES, ERC7710_ASSET_TRANSFER_METHOD, HAVEN_AGENT_RUNBOOK_MD, HAVEN_CONNECTOR_CHANNEL, HAVEN_MINIMUM_NODE_VERSION, HAVEN_SKILL_BODY_MD, HAVEN_SKILL_MD, type HavenAgent, type HavenAgentAllowanceSummary, type HavenAgentReadiness, type HavenAgentSummary, type HavenAllowance, type HavenAllowanceSummary, HavenApiError, type HavenCatalogEntry, type HavenCatalogSubmission, HavenClient, type HavenClientConfig, HavenError, type HavenPaymentReceipt, HavenPaymentStateError, HavenSigningError, HavenTimeoutError, HavenUnsupportedSignerVersionError, MERCHANT_DISCOVERY_PATHS, type MachinePaymentRail, MerchantTimeoutError, type OpenAITool, type PaymentFee, type PaymentIntent, type PaymentNextAction, type PaymentPhase, type PaymentReceipt, type PaymentRequest, type PaymentResult, type PaymentResumeState, type PaymentStatus, type PaymentStatusResult, type PostPurchaseAllowanceSummary, RECEIPT_VERSION, type ReceiptVerification, type ResumeAuthorizedX402Input, type ResumeX402PaymentInput, SIGNER_UPDATE_FALLBACK, SKILL_FOLDER_NAME, SWEEP_BASE_CHAIN_ID, SWEEP_BASE_SEPOLIA_CHAIN_ID, SWEEP_BASE_SEPOLIA_USDC_ADDRESS, SWEEP_BASE_USDC_ADDRESS, type SharedToolKey, type SignData, SignerRefusalCode, type SweepAuthorization, type SweepConfirmation, type SweepEip712Domain, type SweepEntry, type SweepExpectedAuth, type SweepPreparation, type SweepPrepareResponse, type SweepResult, type SweepSubmitResponse, type SweepSubmitResult, type SweepTypedData, TRANSFER_WITH_AUTHORIZATION_TYPES, type ToolDescription, type UnsupportedNodeVersionMessageOptions, X402AlreadySettledError, type X402AuthorizationOptions, type X402Erc7710Settlement, type X402ExpectedAuth, type X402ExpectedContext, type X402Intent, type X402McpCallContext, type X402McpTransport, type X402MerchantCallContext, type X402MerchantOutcome, type X402MerchantOutcomeReport, type X402PaymentHeaderContext, X402PaymentHeaderValidationError, type X402PaymentOption, type X402PaymentRequired, type X402Quote, type X402Receipt, type X402RequestSnapshot, type X402ResumeState, type X402SchemeSelection, X402UnexpectedStatusError, X402_LEGACY_PAYMENT_HEADER_NAME, X402_MAX_AUTHORIZATION_WINDOW_SECONDS, X402_PAYMENT_HEADER_NAME, X402_PAYMENT_HEADER_NAMES_SENT, X402_PAYMENT_REQUIRED_HEADER_NAME, X402_PAYMENT_RESPONSE_HEADER_NAME, X402_SETTLEMENT_FORWARD_MARGIN_SECONDS, accountAddressTwins, addressFromKey, buildSweepAuthorizationMessage, buildSweepTypedData, buildX402ExpectedMessage, canonicalAgentPaymentNextAction, compareNodeVersions, composeDescription, connectorRerunCommand, connectorSpec, decodeBase64Json, decodeBase64Utf8, discoverMerchantMcpUrl, encodeBase64Json, encodeBase64Utf8, encodePaymentProof, havenTools, isConnectorChannel, isErc7710Option, isFundAccountOrRaiseAllowance, isSupportedNodeVersion, isSweepableChain, normalizePaymentRequired, parsePaymentRequired, parsePaymentRequiredResponse, readAccountAddress, readAccountId, readX402ReceiptPayer, resolveConnectorChannel, resolveTokenFromAddress, sameUrl, selectErc7710PaymentOption, selectPaymentOption, selectStandardPaymentOption, selectX402SettlementScheme, signHash, signUserOpTypedDataForDelegation, signerUpdateFallback, sweepUsdcAddress, sweepUsdcDomain, toStandardPaymentRequirements, toolDescriptions, unsupportedNodeVersionMessage, validateStandardX402PaymentHeader, verifyPaymentReceipt, verifySignature, x402AssetTransferMethod, x402AuthorizationAmount, x402FacilitatorAddresses, x402V2PaymentEnvelope };