@haven_ai/sdk 0.5.0-alpha.1 → 0.6.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.
@@ -67,6 +67,13 @@ interface PaymentRequest {
67
67
  * second approval. Same contract as /machine-payments/send. Max 128 chars.
68
68
  */
69
69
  idempotencyKey?: string;
70
+ /**
71
+ * #3329: redeem against this open task budget's child delegation instead
72
+ * of the agent's budget delegation directly — `[task child, budget]`. The
73
+ * backend refuses (404/409) when the id is unknown, not open, or its
74
+ * token/recipient/parent disagree with this request.
75
+ */
76
+ taskBudgetId?: string;
70
77
  }
71
78
  interface SignData {
72
79
  /** The hash to sign (keccak256, 0x-prefixed) */
@@ -262,6 +269,16 @@ interface X402AuthorizationOptions {
262
269
  * fetch.
263
270
  */
264
271
  delegateAddress?: string;
272
+ /**
273
+ * #3329: redeem against this open task budget's child delegation for the
274
+ * funding leg / erc7710 settlement child instead of the agent's budget
275
+ * delegation directly. Same refusal contract as `PaymentRequest.taskBudgetId`.
276
+ * On the EIP-3009 funding leg (`authorizeX402`, `fetch()`, `payX402Quote()`)
277
+ * a task budget's recipient pin is compared with the agent's own delegate
278
+ * wallet, so a merchant-pinned task budget is refused there
279
+ * (`task_budget_recipient_mismatch`); it pays through erc7710 only (#3378).
280
+ */
281
+ taskBudgetId?: string;
265
282
  }
266
283
  /**
267
284
  * Keyless x402 construct result.
@@ -704,7 +721,105 @@ interface HavenAgentSummary extends HavenAgent {
704
721
  */
705
722
  spend_authority_readiness: HavenAgentReadiness;
706
723
  allowances: HavenAgentAllowanceSummary[];
724
+ /**
725
+ * #3329: open, unexpired task budgets — a derived VIEW, same discipline as
726
+ * {@link HavenAgentSummary.allowances}. Populated from
727
+ * `GET /task-budgets?status=open`; empty (never throws) against a backend
728
+ * that predates #3329's route (a 404 there is treated as "no task
729
+ * budgets", not a fetch failure).
730
+ */
731
+ taskBudgets: HavenTaskBudgetSummary[];
732
+ }
733
+ /** #3329: task-budget lifecycle status, as the wire names it. */
734
+ type HavenTaskBudgetStatus = 'pending' | 'open' | 'closing' | 'closed';
735
+ /** #3329: `RawTaskBudget`, camelCased — what every SDK task-budget method returns. */
736
+ interface HavenTaskBudget {
737
+ id: string;
738
+ agentId: string;
739
+ chainId: number;
740
+ tokenAddress: string;
741
+ recipientAddress: string | null;
742
+ parentDelegationHash: string;
743
+ delegationHash: string;
744
+ label: string | null;
745
+ maxAtomic: string;
746
+ status: HavenTaskBudgetStatus;
747
+ expiresAt: number;
748
+ isExpired: boolean;
749
+ createdAt: string;
750
+ openedAt: string | null;
751
+ closedAt: string | null;
752
+ closeTxHash: string | null;
707
753
  }
754
+ /**
755
+ * #3329: the condensed row `getAgentSummary()` carries per open, unexpired
756
+ * task budget — enough to render a "reserved by open task budgets" line and
757
+ * a task-budget list without a second read.
758
+ */
759
+ interface HavenTaskBudgetSummary {
760
+ id: string;
761
+ label: string | null;
762
+ tokenAddress: string;
763
+ maxAtomic: string;
764
+ maxDisplay: string;
765
+ recipientAddress: string | null;
766
+ expiresAt: number;
767
+ }
768
+ /** #3329: `POST /task-budgets` and `POST /task-budgets/:id/close` — the sign-then-submit envelope. */
769
+ interface HavenTaskBudgetSignData {
770
+ signature_scheme: 'eip712_delegation' | 'eip712_userop';
771
+ typed_data: Record<string, unknown>;
772
+ }
773
+ interface OpenTaskBudgetResult {
774
+ taskBudget: HavenTaskBudget;
775
+ signData: HavenTaskBudgetSignData;
776
+ nextAction: string;
777
+ instructions: string;
778
+ }
779
+ interface CloseTaskBudgetResult {
780
+ taskBudget: HavenTaskBudget;
781
+ status: HavenTaskBudgetStatus;
782
+ /** Present only when the close needed a signature (an OPEN, unexpired budget). */
783
+ signData?: HavenTaskBudgetSignData;
784
+ nextAction?: string;
785
+ }
786
+ interface SubmitTaskBudgetResult {
787
+ taskBudget: HavenTaskBudget;
788
+ status: HavenTaskBudgetStatus;
789
+ /** Present only once the close UserOp lands (`status === 'closed'` from `closing`). */
790
+ closeTxHash?: string;
791
+ }
792
+ /** #3329: `GET /task-budgets/:id/sign-context` — `purpose: 'open'` shape. */
793
+ interface TaskBudgetOpenSignContext {
794
+ taskBudgetId: string;
795
+ purpose: 'open';
796
+ taskSignContextVersion: number;
797
+ typedData: Record<string, unknown>;
798
+ expected: {
799
+ delegateAccount: string;
800
+ chainId: number;
801
+ tokenAddress: string;
802
+ maxAmountAtomic: string;
803
+ recipientAddress: string | null;
804
+ expiresAt: number;
805
+ parentDelegationHash: string;
806
+ };
807
+ }
808
+ /** #3329: `GET /task-budgets/:id/sign-context` — `purpose: 'close'` shape. */
809
+ interface TaskBudgetCloseSignContext {
810
+ taskBudgetId: string;
811
+ purpose: 'close';
812
+ taskSignContextVersion: number;
813
+ typedData: Record<string, unknown>;
814
+ userOperation: Record<string, unknown>;
815
+ userOpHash: string;
816
+ expected: {
817
+ delegateAccount: string;
818
+ chainId: number;
819
+ delegationHash: string;
820
+ };
821
+ }
822
+ type TaskBudgetSignContext = TaskBudgetOpenSignContext | TaskBudgetCloseSignContext;
708
823
  /**
709
824
  * #2960 — one party vocabulary for "who paid" a Haven payment, additive
710
825
  * alongside every existing lone `payer*`/`*Address` field (same discipline
@@ -755,8 +870,6 @@ interface HavenPaymentReceipt {
755
870
  * receipt analogue, because no protocol means no evidence row.
756
871
  */
757
872
  source: string;
758
- /** @deprecated (#3134) twin of {@link source}; removed once all three release clocks have moved — see `mapPaymentReceipt`. */
759
- rail: string;
760
873
  /**
761
874
  * #3134: the evidence row's recorded proof status, under the transactions
762
875
  * feed's name. Same name, different nullability: `string` here because a
@@ -764,8 +877,6 @@ interface HavenPaymentReceipt {
764
877
  * LEFT JOIN to none (#3132) — do not share a non-null-asserting helper.
765
878
  */
766
879
  paymentProofStatus: string;
767
- /** @deprecated (#3134) twin of {@link paymentProofStatus}; removed once all three release clocks have moved — see `mapPaymentReceipt`. */
768
- proofStatus: string;
769
880
  /**
770
881
  * @deprecated (#2998) meaning depends on the settlement scheme — the
771
882
  * account → delegate funding transaction on eip3009, the (only) settlement
@@ -785,12 +896,8 @@ interface HavenPaymentReceipt {
785
896
  chainId: number;
786
897
  /** #3134: the paid resource, under the transactions feed's protocol-prefixed name (`string | null` there; a receipt always has one). */
787
898
  x402ResourceUrl: string;
788
- /** @deprecated (#3134) twin of {@link x402ResourceUrl}; removed once all three release clocks have moved — see `mapPaymentReceipt`. */
789
- resourceUrl: string;
790
899
  /** #3134: the merchant paid, under the transactions feed's protocol-prefixed name. */
791
900
  x402MerchantAddress: string | null;
792
- /** @deprecated (#3134) twin of {@link x402MerchantAddress}; removed once all three release clocks have moved — see `mapPaymentReceipt`. */
793
- merchantAddress: string | null;
794
901
  payerAddress: string;
795
902
  /** #2960: additive alongside `payerAddress` above (`parties.treasury_account` only). */
796
903
  parties?: PaymentParties;
@@ -1794,7 +1901,7 @@ declare function buildSweepAuthorizationMessage(auth: SweepAuthorization): strin
1794
1901
  * This SDK's own version. Owned by `scripts/release-bump.mjs`, which rewrites
1795
1902
  * it with the package version on every release — never hand-edit it.
1796
1903
  */
1797
- declare const SDK_VERSION = "0.5.0-alpha.1";
1904
+ declare const SDK_VERSION = "0.6.0-alpha.0";
1798
1905
  /** The request header every published Haven client sends. */
1799
1906
  declare const HAVEN_CLIENT_HEADER = "X-Haven-Client";
1800
1907
  /** `<package>/<version>` — the value of {@link HAVEN_CLIENT_HEADER}. */
@@ -2561,7 +2668,17 @@ interface SettlementChildTypedData {
2561
2668
  primaryType: string;
2562
2669
  message: Record<string, unknown>;
2563
2670
  }
2564
- /** True when this typed data is a delegation — the shape that must never be signed unbound. */
2671
+ /**
2672
+ * True when this typed data is a delegation — the shape that must never be
2673
+ * signed unbound. Excludes a SELF-delegation (`delegate === delegator`,
2674
+ * #3329): that is the shape of a task-budget child
2675
+ * (`task-budget-guards.ts`'s `isTaskChildTypedData`), a DIFFERENT typed-data
2676
+ * class verified by a different function against a different expectation. A
2677
+ * real settlement child's `delegate` is always a facilitator or
2678
+ * `ANY_BENEFICIARY` — never this account's own address — so narrowing here
2679
+ * costs this verifier nothing and keeps the two classes from ever
2680
+ * overlapping.
2681
+ */
2565
2682
  declare function isSettlementChildTypedData(value: unknown): value is SettlementChildTypedData;
2566
2683
  /**
2567
2684
  * Map an x402 network string to a chain id. Local on purpose (#1455 review):
@@ -2674,11 +2791,13 @@ declare function assertOwnSettlementChild(typedData: unknown, expectation: Settl
2674
2791
  * payTo = the delegate EOA, amountRaw)`), so the single execution must be
2675
2792
  * exactly `encodePacked(asset, 0, transfer(delegateAddress, amount))`.
2676
2793
  *
2677
- * `delegateAddress` is the signer's OWN key address — local, not from Haven —
2678
- * so even a compromised binding key can at most move budget into the agent's
2679
- * own EOA (the hot-delegate residual the sweep returns), never to an attacker.
2680
- * `asset` and `amount` come from the Haven-signed expected context and keep
2681
- * the leg consistent with what Haven declared.
2794
+ * `delegateAddress` is the signing key's OWN address — local, not from Haven —
2795
+ * so even a compromised Haven can at most move budget into the agent's own
2796
+ * EOA (the hot-delegate residual the sweep returns), never to an attacker.
2797
+ * `asset` and `amount` keep the leg consistent with what is being paid. Two
2798
+ * callers, two sources: the signer's x402 arm (#3281) passes the Haven-signed
2799
+ * expected context's; `HavenClient.signForData` (#3375) passes the 402 option
2800
+ * the SDK is paying, never the `/x402` response.
2682
2801
  *
2683
2802
  * Call ONLY after `assertBoundDirectPaymentUserOp` has passed on the same
2684
2803
  * typed data (it proves the `execute` → `redeemDelegations` shape this reads).
@@ -2690,6 +2809,114 @@ declare function assertFundingLegPaysDelegate(typedData: Record<string, unknown>
2690
2809
  amount: string;
2691
2810
  }): void;
2692
2811
 
2812
+ /**
2813
+ * Task budgets (#3329): independent verification of a task child delegation
2814
+ * and its close UserOp, mirroring `settlement-child.ts` / `direct-payment-
2815
+ * guard.ts` for a DIFFERENT typed-data class.
2816
+ *
2817
+ * A task budget's child is a SELF-delegation: the agent's own delegate
2818
+ * account grants itself a narrower, time-boxed slice of its budget
2819
+ * delegation (`delegate === delegator === the agent's own account`), chained
2820
+ * under the budget via `authority`. That is what separates it from an x402
2821
+ * settlement child, whose `delegate` is a facilitator/ANY_BENEFICIARY — never
2822
+ * the agent's own account. `isSettlementChildTypedData` (`settlement-
2823
+ * child.ts`) was narrowed to return `false` for a self-delegated payload so
2824
+ * the two classes cannot be confused by either verifier; this file is the
2825
+ * task-child counterpart, verified against a different expectation
2826
+ * (`GET /task-budgets/:id/sign-context`, never a merchant's 402).
2827
+ *
2828
+ * Two shapes, two functions:
2829
+ * - `assertOwnTaskChild` verifies the `Delegation` typed data signed to OPEN
2830
+ * a task budget.
2831
+ * - `assertOwnTaskBudgetCloseUserOp` verifies the `PackedUserOperation`
2832
+ * typed data signed to CLOSE one early (an on-chain
2833
+ * `disableDelegation(child)` call from the agent's own account) — an
2834
+ * authority-REDUCING action only, never a grant.
2835
+ *
2836
+ * `hashDelegation` below reproduces `@metamask/smart-accounts-kit/utils`'s
2837
+ * struct hash (via `@metamask/delegation-core`) byte-for-byte, WITHOUT taking
2838
+ * the kit as a runtime dependency (this package installs on users' machines —
2839
+ * same reasoning `delegate-account.ts` and `settlement-child.ts` give for
2840
+ * their own vendored constants). `DELEGATION_TYPEHASH` / `CAVEAT_TYPEHASH`
2841
+ * are pinned literals, cross-checked against the kit's own `hashDelegation`
2842
+ * by a test vector in `task-budget-guards.test.ts` (which imports the kit
2843
+ * ONLY in that test file).
2844
+ */
2845
+
2846
+ /** The backend's own ceiling (`MAX_TASK_BUDGET_TTL_SECONDS`), enforced again here. */
2847
+ declare const MAX_TASK_BUDGET_TTL_SECONDS = 86400;
2848
+ interface TaskChildTypedData {
2849
+ domain: {
2850
+ name?: string;
2851
+ version?: string;
2852
+ chainId?: number | string;
2853
+ verifyingContract?: string;
2854
+ };
2855
+ types: Record<string, unknown>;
2856
+ primaryType: string;
2857
+ message: Record<string, unknown>;
2858
+ }
2859
+ /**
2860
+ * True when this typed data is a task-budget child: a `Delegation` whose
2861
+ * `delegate` equals its own `delegator` (self-delegation). This is the ONLY
2862
+ * shape distinguishing it from an x402 settlement child (whose `delegate` is
2863
+ * a facilitator or `ANY_BENEFICIARY`) — `isSettlementChildTypedData` is
2864
+ * narrowed to return `false` for this same shape so the two verifiers never
2865
+ * overlap.
2866
+ */
2867
+ declare function isTaskChildTypedData(value: unknown): value is TaskChildTypedData;
2868
+ interface TaskChildExpectation {
2869
+ chainId: number;
2870
+ tokenAddress: string;
2871
+ maxAmountAtomic: string;
2872
+ recipientAddress: string | null;
2873
+ /** unix seconds — the `TimestampEnforcer`'s `beforeThreshold`. */
2874
+ expiresAt: number;
2875
+ parentDelegationHash: string;
2876
+ }
2877
+ /**
2878
+ * Verify a task-budget child delegation is EXACTLY what
2879
+ * `GET /task-budgets/:id/sign-context` (purpose `open`) declared, AND that
2880
+ * both `delegate` and `delegator` are this signer's OWN account. Throws
2881
+ * `HavenTypedDataRefusedError` (never returns) on any disagreement.
2882
+ */
2883
+ declare function assertOwnTaskChild(typedData: unknown, expected: TaskChildExpectation, delegateAddress: string, now?: number): void;
2884
+ interface TaskBudgetCloseExpectation {
2885
+ /** The child delegation's own struct hash (`agent_task_budgets.delegation_hash`). */
2886
+ delegationHash: string;
2887
+ }
2888
+ /**
2889
+ * Verify a task-budget close UserOp is EXACTLY an on-chain
2890
+ * `disableDelegation(child)` call from the agent's own delegate account —
2891
+ * authority-REDUCING only, never a grant. Throws `HavenTypedDataRefusedError`
2892
+ * (never returns) on any disagreement.
2893
+ */
2894
+ declare function assertOwnTaskBudgetCloseUserOp(typedData: Record<string, unknown>, expected: TaskBudgetCloseExpectation, delegateAddress: string): void;
2895
+ /**
2896
+ * `@metamask/delegation-core`'s `DELEGATION_TYPEHASH` — pinned, cross-checked
2897
+ * against the kit by a test vector in `task-budget-guards.test.ts`.
2898
+ */
2899
+ declare const DELEGATION_TYPEHASH: Hex;
2900
+ /** `@metamask/delegation-core`'s `CAVEAT_TYPEHASH` — pinned, same cross-check. */
2901
+ declare const CAVEAT_TYPEHASH: Hex;
2902
+ interface DelegationForHashing {
2903
+ delegate: Address;
2904
+ delegator: Address;
2905
+ authority: Hex;
2906
+ caveats: readonly {
2907
+ enforcer: Address;
2908
+ terms: Hex;
2909
+ }[];
2910
+ salt: bigint;
2911
+ }
2912
+ /**
2913
+ * Reproduces `@metamask/smart-accounts-kit/utils`'s `hashDelegation`
2914
+ * byte-for-byte, WITHOUT the kit at runtime (see the file header). Ignores
2915
+ * `signature` — the kit's own `hashDelegation` does the same (it hashes with
2916
+ * `signature: '0x'` regardless of what the caller passes).
2917
+ */
2918
+ declare function hashDelegation(delegation: DelegationForHashing): Hex;
2919
+
2693
2920
  /**
2694
2921
  * Runtime-agnostic base64 helpers — the single source of truth for the wire
2695
2922
  * encoding shared by the SDK and the edge signer (#325).
@@ -2728,4 +2955,4 @@ declare function encodeBase64Json(value: unknown): string;
2728
2955
  */
2729
2956
  declare function decodeBase64Json<T>(value: string, label?: string): T;
2730
2957
 
2731
- export { AgentPaymentRailSchema as $, type AgentPaymentWarning as A, type X402ResumeState as B, type X402McpTransport as C, type X402MerchantCallContext as D, HavenError as E, AGENT_PAYMENT_FAILURE_CODE_VALUES as F, AGENT_PAYMENT_NEXT_ACTION_VALUES as G, type HavenClientConfig as H, AGENT_PAYMENT_PHASE_VALUES as I, AGENT_PAYMENT_RAIL_VALUES as J, type AgentNextStep as K, type AgentPaymentEnumSchema as L, AgentPaymentFailureCode as M, AgentPaymentFailureCodeDescriptions as N, AgentPaymentFailureCodeSchema as O, type PaymentRequest as P, AgentPaymentNextAction as Q, type RawPaymentParties as R, type SweepResult as S, AgentPaymentNextActionDescriptions as T, AgentPaymentNextActionSchema as U, AgentPaymentPhase as V, AgentPaymentPhaseDescriptions as W, type X402PaymentRequired as X, AgentPaymentPhaseSchema as Y, AgentPaymentRail as Z, AgentPaymentRailDescriptions as _, type HavenClientUpdate as a, type UnsupportedNodeVersionMessageOptions as a$, type AgentPaymentSummary as a0, AgentPaymentWarningCode as a1, type AgentPurchaseSummary as a2, CONNECTOR_PACKAGE_NAME as a3, type CatalogSubmissionAccepted as a4, DEFAULT_CONFIRMATION_TIMEOUT_MS as a5, DEFAULT_NEXT_TOOL_BY_ACTION as a6, DIRECT_SIGN_CONTEXT_VERSION as a7, ENTRY_POINT_V07 as a8, ERC7710_ASSET_TRANSFER_METHOD as a9, type NextStepTarget as aA, type NextStepTargets as aB, type NextToolServerRole as aC, PACKED_USER_OPERATION_FIELDS as aD, type PaymentFee as aE, type PaymentNextAction as aF, type PaymentPhase as aG, type PaymentStatus as aH, ROOT_AUTHORITY as aI, SDK_CLIENT_IDENTITY as aJ, SDK_VERSION as aK, SIGNER_UPDATE_FALLBACK as aL, SWEEP_BASE_CHAIN_ID as aM, SWEEP_BASE_SEPOLIA_CHAIN_ID as aN, SWEEP_BASE_SEPOLIA_USDC_ADDRESS as aO, SWEEP_BASE_USDC_ADDRESS as aP, type SettlementChildExpectation as aQ, SignerRefusalCode as aR, type SweepConfirmation as aS, type SweepEip712Domain as aT, type SweepEntry as aU, type SweepExpectedAuth as aV, type SweepPreparation as aW, type SweepSubmitResult as aX, type SweepTypedData as aY, TRANSFER_WITH_AUTHORIZATION_TYPES as aZ, TYPED_DATA_NOT_ALLOWED as a_, HAVEN_CLIENT_HEADER as aa, HAVEN_CONNECTOR_CHANNEL as ab, HAVEN_MINIMUM_NODE_VERSION as ac, HYBRID_DELEGATOR_DOMAIN_NAME as ad, HYBRID_DELEGATOR_DOMAIN_VERSION as ae, type HavenAgentAllowanceSummary as af, type HavenAgentReadiness as ag, type HavenAllowance as ah, HavenApiError as ai, type HavenCatalogMerchant as aj, type HavenListScope as ak, HavenPaymentStateError as al, HavenSigningError as am, HavenTimeoutError as an, HavenTypedDataRefusedError as ao, HavenUnsupportedSignerVersionError as ap, HavenUserOpBindingError as aq, HavenZeroSettlementHashError as ar, type MachinePaymentRail as as, MerchantTimeoutError as at, NEXT_TOOL_SERVER_NAMES as au, NEXT_TOOL_SERVER_ROLES as av, type NextStep as aw, type NextStepArguments as ax, type NextStepHandoff as ay, type NextStepInput as az, type PaymentResult as b, DELEGATION_MANAGER as b$, X402AlreadySettledError as b0, type X402ExpectedAuth as b1, type X402ExpectedContext as b2, type X402PaymentHeaderContext as b3, X402PaymentHeaderValidationError as b4, type X402PaymentOption as b5, type X402RequestSnapshot as b6, type X402SchemeSelection as b7, X402UnexpectedStatusError as b8, X402_LEGACY_PAYMENT_HEADER_NAME as b9, isSupportedNodeVersion as bA, isSweepableChain as bB, normalizePaymentRequired as bC, packedUserOperationHash as bD, parseNextTool as bE, parsePaymentRequired as bF, parsePaymentRequiredResponse as bG, readClientUpdate as bH, renderNextTool as bI, resolveConnectorChannel as bJ, resolveTokenFromAddress as bK, selectErc7710PaymentOption as bL, selectPaymentOption as bM, selectStandardPaymentOption as bN, selectX402SettlementScheme as bO, signerUpdateFallback as bP, sweepUsdcAddress as bQ, sweepUsdcDomain as bR, toStandardPaymentRequirements as bS, unsupportedNodeVersionMessage as bT, validateStandardX402PaymentHeader as bU, verifySettlementChild as bV, x402AssetTransferMethod as bW, x402AuthorizationAmount as bX, x402FacilitatorAddresses as bY, x402V2PaymentEnvelope as bZ, CAVEAT_ENFORCERS as b_, X402_MAX_AUTHORIZATION_WINDOW_SECONDS as ba, X402_PAYMENT_HEADER_NAME as bb, X402_PAYMENT_HEADER_NAMES_SENT as bc, X402_PAYMENT_REQUIRED_HEADER_NAME as bd, X402_PAYMENT_RESPONSE_HEADER_NAME as be, X402_SETTLEMENT_FORWARD_MARGIN_SECONDS as bf, assertBoundDirectPaymentUserOp as bg, assertUserOpTypedDataBinding as bh, buildSweepAuthorizationMessage as bi, buildSweepTypedData as bj, buildX402ExpectedMessage as bk, compareNodeVersions as bl, connectorRerunCommand as bm, connectorSpec as bn, createNextStepBuilder as bo, decodeBase64Json as bp, decodeBase64Utf8 as bq, defaultNextToolFor as br, deriveDelegateAccountAddress as bs, encodeBase64Json as bt, encodeBase64Utf8 as bu, encodePaymentProof as bv, havenClientIdentity as bw, isConnectorChannel as bx, isErc7710Option as by, isPackedUserOperationTypedData as bz, type PaymentIntent as c, DIRECT_PAYMENT_CHAIN_IDS as c0, EXECUTE_ABI as c1, HYBRID_DELEGATOR_IMPLEMENTATION as c2, MAX_SETTLEMENT_WINDOW_SECONDS as c3, SIMPLE_FACTORY_ADDRESS as c4, type SettlementChildTypedData as c5, assertFundingLegPaysDelegate as c6, assertOwnSettlementChild as c7, chainIdForNetwork as c8, isSettlementChildTypedData as c9, type X402AuthorizationOptions as d, type X402Intent as e, type PaymentStatusResult as f, type HavenAgent as g, type HavenAgentSummary as h, type SweepPrepareResponse as i, type SweepAuthorization as j, type SweepSubmitResponse as k, type HavenAllowanceSummary as l, type HavenBalanceCoverage as m, type PostPurchaseAllowanceSummary as n, type HavenCatalogEntry as o, type HavenCatalogSubmission as p, type HavenPaymentReceipt as q, type HavenPaymentReceiptsPage as r, type PaymentResumeState as s, type X402Receipt as t, type X402Quote as u, type X402Erc7710Settlement as v, type X402McpCallContext as w, type SignData as x, type ResumeAuthorizedX402Input as y, type ResumeX402PaymentInput as z };
2958
+ export { AgentPaymentPhase as $, type AgentPaymentWarning as A, type ResumeAuthorizedX402Input as B, type CloseTaskBudgetResult as C, type ResumeX402PaymentInput as D, type X402ResumeState as E, type X402McpTransport as F, type X402MerchantCallContext as G, type HavenClientConfig as H, HavenError as I, AGENT_PAYMENT_FAILURE_CODE_VALUES as J, AGENT_PAYMENT_NEXT_ACTION_VALUES as K, AGENT_PAYMENT_PHASE_VALUES as L, AGENT_PAYMENT_RAIL_VALUES as M, type AgentNextStep as N, type OpenTaskBudgetResult as O, type PaymentRequest as P, type AgentPaymentEnumSchema as Q, type RawPaymentParties as R, type SweepResult as S, type TaskBudgetSignContext as T, AgentPaymentFailureCode as U, AgentPaymentFailureCodeDescriptions as V, AgentPaymentFailureCodeSchema as W, type X402PaymentRequired as X, AgentPaymentNextAction as Y, AgentPaymentNextActionDescriptions as Z, AgentPaymentNextActionSchema as _, type HavenClientUpdate as a, type SweepExpectedAuth as a$, AgentPaymentPhaseDescriptions as a0, AgentPaymentPhaseSchema as a1, AgentPaymentRail as a2, AgentPaymentRailDescriptions as a3, AgentPaymentRailSchema as a4, type AgentPaymentSummary as a5, AgentPaymentWarningCode as a6, type AgentPurchaseSummary as a7, CONNECTOR_PACKAGE_NAME as a8, type CatalogSubmissionAccepted as a9, NEXT_TOOL_SERVER_NAMES as aA, NEXT_TOOL_SERVER_ROLES as aB, type NextStep as aC, type NextStepArguments as aD, type NextStepHandoff as aE, type NextStepInput as aF, type NextStepTarget as aG, type NextStepTargets as aH, type NextToolServerRole as aI, PACKED_USER_OPERATION_FIELDS as aJ, type PaymentFee as aK, type PaymentNextAction as aL, type PaymentPhase as aM, type PaymentStatus as aN, ROOT_AUTHORITY as aO, SDK_CLIENT_IDENTITY as aP, SDK_VERSION as aQ, SIGNER_UPDATE_FALLBACK as aR, SWEEP_BASE_CHAIN_ID as aS, SWEEP_BASE_SEPOLIA_CHAIN_ID as aT, SWEEP_BASE_SEPOLIA_USDC_ADDRESS as aU, SWEEP_BASE_USDC_ADDRESS as aV, type SettlementChildExpectation as aW, SignerRefusalCode as aX, type SweepConfirmation as aY, type SweepEip712Domain as aZ, type SweepEntry as a_, DEFAULT_CONFIRMATION_TIMEOUT_MS as aa, DEFAULT_NEXT_TOOL_BY_ACTION as ab, DIRECT_SIGN_CONTEXT_VERSION as ac, ENTRY_POINT_V07 as ad, ERC7710_ASSET_TRANSFER_METHOD as ae, HAVEN_CLIENT_HEADER as af, HAVEN_CONNECTOR_CHANNEL as ag, HAVEN_MINIMUM_NODE_VERSION as ah, HYBRID_DELEGATOR_DOMAIN_NAME as ai, HYBRID_DELEGATOR_DOMAIN_VERSION as aj, type HavenAgentAllowanceSummary as ak, type HavenAgentReadiness as al, type HavenAllowance as am, HavenApiError as an, type HavenCatalogMerchant as ao, type HavenListScope as ap, HavenPaymentStateError as aq, HavenSigningError as ar, HavenTimeoutError as as, HavenTypedDataRefusedError as at, HavenUnsupportedSignerVersionError as au, HavenUserOpBindingError as av, HavenZeroSettlementHashError as aw, MAX_TASK_BUDGET_TTL_SECONDS as ax, type MachinePaymentRail as ay, MerchantTimeoutError as az, type PaymentResult as b, selectX402SettlementScheme as b$, type SweepPreparation as b0, type SweepSubmitResult as b1, type SweepTypedData as b2, TRANSFER_WITH_AUTHORIZATION_TYPES as b3, TYPED_DATA_NOT_ALLOWED as b4, type TaskBudgetCloseExpectation as b5, type TaskChildExpectation as b6, type TaskChildTypedData as b7, type UnsupportedNodeVersionMessageOptions as b8, X402AlreadySettledError as b9, decodeBase64Json as bA, decodeBase64Utf8 as bB, defaultNextToolFor as bC, deriveDelegateAccountAddress as bD, encodeBase64Json as bE, encodeBase64Utf8 as bF, encodePaymentProof as bG, hashDelegation as bH, havenClientIdentity as bI, isConnectorChannel as bJ, isErc7710Option as bK, isPackedUserOperationTypedData as bL, isSupportedNodeVersion as bM, isSweepableChain as bN, isTaskChildTypedData as bO, normalizePaymentRequired as bP, packedUserOperationHash as bQ, parseNextTool as bR, parsePaymentRequired as bS, parsePaymentRequiredResponse as bT, readClientUpdate as bU, renderNextTool as bV, resolveConnectorChannel as bW, resolveTokenFromAddress as bX, selectErc7710PaymentOption as bY, selectPaymentOption as bZ, selectStandardPaymentOption as b_, type X402ExpectedAuth as ba, type X402ExpectedContext as bb, type X402PaymentHeaderContext as bc, X402PaymentHeaderValidationError as bd, type X402PaymentOption as be, type X402RequestSnapshot as bf, type X402SchemeSelection as bg, X402UnexpectedStatusError as bh, X402_LEGACY_PAYMENT_HEADER_NAME as bi, X402_MAX_AUTHORIZATION_WINDOW_SECONDS as bj, X402_PAYMENT_HEADER_NAME as bk, X402_PAYMENT_HEADER_NAMES_SENT as bl, X402_PAYMENT_REQUIRED_HEADER_NAME as bm, X402_PAYMENT_RESPONSE_HEADER_NAME as bn, X402_SETTLEMENT_FORWARD_MARGIN_SECONDS as bo, assertBoundDirectPaymentUserOp as bp, assertOwnTaskBudgetCloseUserOp as bq, assertOwnTaskChild as br, assertUserOpTypedDataBinding as bs, buildSweepAuthorizationMessage as bt, buildSweepTypedData as bu, buildX402ExpectedMessage as bv, compareNodeVersions as bw, connectorRerunCommand as bx, connectorSpec as by, createNextStepBuilder as bz, type PaymentIntent as c, signerUpdateFallback as c0, sweepUsdcAddress as c1, sweepUsdcDomain as c2, toStandardPaymentRequirements as c3, unsupportedNodeVersionMessage as c4, validateStandardX402PaymentHeader as c5, verifySettlementChild as c6, x402AssetTransferMethod as c7, x402AuthorizationAmount as c8, x402FacilitatorAddresses as c9, x402V2PaymentEnvelope as ca, CAVEAT_ENFORCERS as cb, CAVEAT_TYPEHASH as cc, DELEGATION_MANAGER as cd, DELEGATION_TYPEHASH as ce, DIRECT_PAYMENT_CHAIN_IDS as cf, type DelegationForHashing as cg, EXECUTE_ABI as ch, HYBRID_DELEGATOR_IMPLEMENTATION as ci, MAX_SETTLEMENT_WINDOW_SECONDS as cj, SIMPLE_FACTORY_ADDRESS as ck, type SettlementChildTypedData as cl, assertFundingLegPaysDelegate as cm, assertOwnSettlementChild as cn, chainIdForNetwork as co, isSettlementChildTypedData as cp, type X402AuthorizationOptions as d, type X402Intent as e, type PaymentStatusResult as f, type HavenAgent as g, type HavenAgentSummary as h, type SweepPrepareResponse as i, type SweepAuthorization as j, type SweepSubmitResponse as k, type HavenAllowanceSummary as l, type HavenBalanceCoverage as m, type PostPurchaseAllowanceSummary as n, type HavenCatalogEntry as o, type HavenCatalogSubmission as p, type HavenPaymentReceipt as q, type HavenPaymentReceiptsPage as r, type HavenTaskBudget as s, type SubmitTaskBudgetResult as t, type PaymentResumeState as u, type X402Receipt as v, type X402Quote as w, type X402Erc7710Settlement as x, type X402McpCallContext as y, type SignData as z };