@haven_ai/sdk 0.5.0-alpha.1 → 0.7.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,21 @@ 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;
77
+ /**
78
+ * #3330: redeem against this open sub-budget's grant (this agent is the
79
+ * sub-agent B) instead of the agent's budget delegation directly —
80
+ * `[grant, parent-child, budget]`. The backend refuses (404/409) when the
81
+ * id is unknown, not open, or its token/recipient/parent disagree with
82
+ * this request. Mutually exclusive with `taskBudgetId`.
83
+ */
84
+ subBudgetId?: string;
70
85
  }
71
86
  interface SignData {
72
87
  /** The hash to sign (keccak256, 0x-prefixed) */
@@ -262,6 +277,31 @@ interface X402AuthorizationOptions {
262
277
  * fetch.
263
278
  */
264
279
  delegateAddress?: string;
280
+ /**
281
+ * #3329: redeem against this open task budget's child delegation for the
282
+ * funding leg / erc7710 settlement child instead of the agent's budget
283
+ * delegation directly. Same refusal contract as `PaymentRequest.taskBudgetId`.
284
+ * On the EIP-3009 funding leg (`authorizeX402`, `fetch()`, `payX402Quote()`)
285
+ * a task budget's recipient pin is compared with the agent's own delegate
286
+ * wallet, so a merchant-pinned task budget is refused there
287
+ * (`task_budget_recipient_mismatch`); it pays through erc7710 only (#3378).
288
+ * #3392: the receipt cache and in-flight map record this id per entry —
289
+ * reusing an idempotency key under a DIFFERENT budget throws
290
+ * `X402TaskBudgetMismatchError` before any network call; pay again under a
291
+ * new key instead.
292
+ */
293
+ taskBudgetId?: string;
294
+ /**
295
+ * #3330: redeem against this open sub-budget's grant (this agent is the
296
+ * sub-agent B) for the funding leg / erc7710 settlement instead of the
297
+ * agent's budget delegation directly. Same refusal contract as
298
+ * `PaymentRequest.subBudgetId`; mutually exclusive with `taskBudgetId`.
299
+ * The receipt cache and in-flight map pin this id per entry exactly as
300
+ * they pin `taskBudgetId` (#3392) — a key reused under a different
301
+ * authorizing child throws the typed mismatch error before any network
302
+ * call.
303
+ */
304
+ subBudgetId?: string;
265
305
  }
266
306
  /**
267
307
  * Keyless x402 construct result.
@@ -676,7 +716,7 @@ interface HavenAgentAllowanceSummary {
676
716
  remainingAtomic: string;
677
717
  /** Human-readable remaining, e.g. "4.96 USDC". */
678
718
  remainingDisplay: string;
679
- /** Configured allowance amount (atomic) the owner granted. */
719
+ /** Configured allowance amount in whole token units (human decimal, e.g. "1.00" — NOT atomic; on-chain.amount is the atomic figure). */
680
720
  configuredAmount: string;
681
721
  resetPeriodMin: number;
682
722
  isResetPending: boolean;
@@ -704,7 +744,105 @@ interface HavenAgentSummary extends HavenAgent {
704
744
  */
705
745
  spend_authority_readiness: HavenAgentReadiness;
706
746
  allowances: HavenAgentAllowanceSummary[];
747
+ /**
748
+ * #3329: open, unexpired task budgets — a derived VIEW, same discipline as
749
+ * {@link HavenAgentSummary.allowances}. Populated from
750
+ * `GET /task-budgets?status=open`; empty (never throws) against a backend
751
+ * that predates #3329's route (a 404 there is treated as "no task
752
+ * budgets", not a fetch failure).
753
+ */
754
+ taskBudgets: HavenTaskBudgetSummary[];
755
+ }
756
+ /** #3329: task-budget lifecycle status, as the wire names it. */
757
+ type HavenTaskBudgetStatus = 'pending' | 'open' | 'closing' | 'closed';
758
+ /** #3329: `RawTaskBudget`, camelCased — what every SDK task-budget method returns. */
759
+ interface HavenTaskBudget {
760
+ id: string;
761
+ agentId: string;
762
+ chainId: number;
763
+ tokenAddress: string;
764
+ recipientAddress: string | null;
765
+ parentDelegationHash: string;
766
+ delegationHash: string;
767
+ label: string | null;
768
+ maxAtomic: string;
769
+ status: HavenTaskBudgetStatus;
770
+ expiresAt: number;
771
+ isExpired: boolean;
772
+ createdAt: string;
773
+ openedAt: string | null;
774
+ closedAt: string | null;
775
+ closeTxHash: string | null;
707
776
  }
777
+ /**
778
+ * #3329: the condensed row `getAgentSummary()` carries per open, unexpired
779
+ * task budget — enough to render a "reserved by open task budgets" line and
780
+ * a task-budget list without a second read.
781
+ */
782
+ interface HavenTaskBudgetSummary {
783
+ id: string;
784
+ label: string | null;
785
+ tokenAddress: string;
786
+ maxAtomic: string;
787
+ maxDisplay: string;
788
+ recipientAddress: string | null;
789
+ expiresAt: number;
790
+ }
791
+ /** #3329: `POST /task-budgets` and `POST /task-budgets/:id/close` — the sign-then-submit envelope. */
792
+ interface HavenTaskBudgetSignData {
793
+ signature_scheme: 'eip712_delegation' | 'eip712_userop';
794
+ typed_data: Record<string, unknown>;
795
+ }
796
+ interface OpenTaskBudgetResult {
797
+ taskBudget: HavenTaskBudget;
798
+ signData: HavenTaskBudgetSignData;
799
+ nextAction: string;
800
+ instructions: string;
801
+ }
802
+ interface CloseTaskBudgetResult {
803
+ taskBudget: HavenTaskBudget;
804
+ status: HavenTaskBudgetStatus;
805
+ /** Present only when the close needed a signature (an OPEN, unexpired budget). */
806
+ signData?: HavenTaskBudgetSignData;
807
+ nextAction?: string;
808
+ }
809
+ interface SubmitTaskBudgetResult {
810
+ taskBudget: HavenTaskBudget;
811
+ status: HavenTaskBudgetStatus;
812
+ /** Present only once the close UserOp lands (`status === 'closed'` from `closing`). */
813
+ closeTxHash?: string;
814
+ }
815
+ /** #3329: `GET /task-budgets/:id/sign-context` — `purpose: 'open'` shape. */
816
+ interface TaskBudgetOpenSignContext {
817
+ taskBudgetId: string;
818
+ purpose: 'open';
819
+ taskSignContextVersion: number;
820
+ typedData: Record<string, unknown>;
821
+ expected: {
822
+ delegateAccount: string;
823
+ chainId: number;
824
+ tokenAddress: string;
825
+ maxAmountAtomic: string;
826
+ recipientAddress: string | null;
827
+ expiresAt: number;
828
+ parentDelegationHash: string;
829
+ };
830
+ }
831
+ /** #3329: `GET /task-budgets/:id/sign-context` — `purpose: 'close'` shape. */
832
+ interface TaskBudgetCloseSignContext {
833
+ taskBudgetId: string;
834
+ purpose: 'close';
835
+ taskSignContextVersion: number;
836
+ typedData: Record<string, unknown>;
837
+ userOperation: Record<string, unknown>;
838
+ userOpHash: string;
839
+ expected: {
840
+ delegateAccount: string;
841
+ chainId: number;
842
+ delegationHash: string;
843
+ };
844
+ }
845
+ type TaskBudgetSignContext = TaskBudgetOpenSignContext | TaskBudgetCloseSignContext;
708
846
  /**
709
847
  * #2960 — one party vocabulary for "who paid" a Haven payment, additive
710
848
  * alongside every existing lone `payer*`/`*Address` field (same discipline
@@ -716,6 +854,33 @@ interface PaymentParties {
716
854
  delegate: string | null;
717
855
  delegateAccount: string | null;
718
856
  merchant: string | null;
857
+ /**
858
+ * #3332: the paying agent's owner's company details — additive, present
859
+ * only when the backend has `HAVEN_OWNER_COMPANY_DETAILS` on AND the owner
860
+ * saved details; absent (not `undefined`-valued, the KEY is absent)
861
+ * otherwise. `viesStatus: 'valid'` means VIES accepted the VAT number —
862
+ * never render that as "verified" (see Haven's agent-passport docs on the
863
+ * same naming discipline).
864
+ *
865
+ * Present only on the receipt surfaces — `GET /payments/:id/receipt` and
866
+ * `GET /machine-payments/receipts` (`HavenClient.getReceipt()`,
867
+ * `listReceipts()`/`listReceiptsPage()`) — never on `GET
868
+ * /machine-payments/:id/status` (`getPaymentStatus`) or the evidence-attach echo,
869
+ * even with the feature on: those report payment/settlement state, not the
870
+ * buyer's company details (out of scope for #3332, see
871
+ * docs/product/owner-company-details.md).
872
+ */
873
+ buyer?: PaymentPartiesBuyer;
874
+ }
875
+ interface PaymentPartiesBuyer {
876
+ legalName: string;
877
+ /** ISO 3166-1 alpha-2. */
878
+ country: string;
879
+ /** For a sole trader this IS the personal identity number. */
880
+ orgNumber: string;
881
+ vatNumber: string | null;
882
+ viesStatus: 'pending' | 'valid' | 'invalid' | 'not_verifiable' | null;
883
+ viesCheckedAt: string | null;
719
884
  }
720
885
  /** @internal wire shape of {@link PaymentParties}. */
721
886
  interface RawPaymentParties {
@@ -723,6 +888,16 @@ interface RawPaymentParties {
723
888
  delegate: string | null;
724
889
  delegate_account: string | null;
725
890
  merchant: string | null;
891
+ buyer?: RawPaymentPartiesBuyer;
892
+ }
893
+ /** @internal wire shape of {@link PaymentPartiesBuyer}. */
894
+ interface RawPaymentPartiesBuyer {
895
+ legal_name: string;
896
+ country: string;
897
+ org_number: string;
898
+ vat_number: string | null;
899
+ vies_status: 'pending' | 'valid' | 'invalid' | 'not_verifiable' | null;
900
+ vies_checked_at: string | null;
726
901
  }
727
902
  /**
728
903
  * #3132 (owner decision 3 on #3130): what population a list row came from and
@@ -755,8 +930,6 @@ interface HavenPaymentReceipt {
755
930
  * receipt analogue, because no protocol means no evidence row.
756
931
  */
757
932
  source: string;
758
- /** @deprecated (#3134) twin of {@link source}; removed once all three release clocks have moved — see `mapPaymentReceipt`. */
759
- rail: string;
760
933
  /**
761
934
  * #3134: the evidence row's recorded proof status, under the transactions
762
935
  * feed's name. Same name, different nullability: `string` here because a
@@ -764,8 +937,6 @@ interface HavenPaymentReceipt {
764
937
  * LEFT JOIN to none (#3132) — do not share a non-null-asserting helper.
765
938
  */
766
939
  paymentProofStatus: string;
767
- /** @deprecated (#3134) twin of {@link paymentProofStatus}; removed once all three release clocks have moved — see `mapPaymentReceipt`. */
768
- proofStatus: string;
769
940
  /**
770
941
  * @deprecated (#2998) meaning depends on the settlement scheme — the
771
942
  * account → delegate funding transaction on eip3009, the (only) settlement
@@ -785,12 +956,8 @@ interface HavenPaymentReceipt {
785
956
  chainId: number;
786
957
  /** #3134: the paid resource, under the transactions feed's protocol-prefixed name (`string | null` there; a receipt always has one). */
787
958
  x402ResourceUrl: string;
788
- /** @deprecated (#3134) twin of {@link x402ResourceUrl}; removed once all three release clocks have moved — see `mapPaymentReceipt`. */
789
- resourceUrl: string;
790
959
  /** #3134: the merchant paid, under the transactions feed's protocol-prefixed name. */
791
960
  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
961
  payerAddress: string;
795
962
  /** #2960: additive alongside `payerAddress` above (`parties.treasury_account` only). */
796
963
  parties?: PaymentParties;
@@ -958,6 +1125,20 @@ declare const AgentPaymentPhase: {
958
1125
  * the funds.
959
1126
  */
960
1127
  readonly FundedButUnsettled: "funded_but_unsettled";
1128
+ /**
1129
+ * #3420: TERMINAL — a `submitted` erc7710 x402 intent whose settlement
1130
+ * window AND the sweep's last attribution chance have both passed with no
1131
+ * verified evidence. The sweep's tick (120s) only ever confirms a
1132
+ * transaction mined inside the payment's own settlement window (the child
1133
+ * delegation's on-chain `timestamp` caveat, plus the verifier's 120s
1134
+ * clock-skew allowance), so once authorize + window + skew is behind the
1135
+ * payment, no poll — and no sweep tick — can ever change the answer.
1136
+ * The paired `next_action` is `stop_and_tell_user`: tell the user the goods
1137
+ * were delivered but Haven holds no verified settlement evidence; reporting
1138
+ * a real settlement hash (`haven_report_settlement_evidence`) still works
1139
+ * at any age.
1140
+ */
1141
+ readonly DeliveredUnverified: "delivered_unverified";
961
1142
  };
962
1143
  type AgentPaymentPhase = (typeof AgentPaymentPhase)[keyof typeof AgentPaymentPhase];
963
1144
  declare const AgentPaymentNextAction: {
@@ -1115,7 +1296,7 @@ declare const AgentPaymentRail: {
1115
1296
  type AgentPaymentRail = (typeof AgentPaymentRail)[keyof typeof AgentPaymentRail];
1116
1297
  type PaymentPhase = AgentPaymentPhase;
1117
1298
  type PaymentNextAction = AgentPaymentNextAction;
1118
- declare const AGENT_PAYMENT_PHASE_VALUES: ("rejected" | "expired" | "failed" | "agent_signature_required" | "payment_submitted" | "payment_confirmed" | "user_approval_required" | "user_execution_required" | "waiting_for_additional_approvals" | "funding_sent" | "insufficient_funds" | "funded_but_unsettled")[];
1299
+ declare const AGENT_PAYMENT_PHASE_VALUES: ("rejected" | "expired" | "failed" | "agent_signature_required" | "payment_submitted" | "payment_confirmed" | "user_approval_required" | "user_execution_required" | "waiting_for_additional_approvals" | "funding_sent" | "insufficient_funds" | "funded_but_unsettled" | "delivered_unverified")[];
1119
1300
  declare const AGENT_PAYMENT_NEXT_ACTION_VALUES: ("sign_and_submit_payment" | "check_status_later" | "none" | "wait_for_user_approval" | "wait_for_user_to_complete_payment" | "retry_original_x402_request" | "stop_and_tell_user" | "request_again_if_user_still_wants_it" | "retry_with_explicit_context" | "payment_window_expired" | "fund_account_or_raise_allowance" | "sweep_stranded_funds" | "awaiting_settlement_evidence")[];
1120
1301
  declare const AGENT_PAYMENT_FAILURE_CODE_VALUES: ("PRICE_EXCEEDS_MAX" | "PAYMENT_WINDOW_EXPIRED" | "MERCHANT_REJECTED_AFTER_FUNDING" | "MERCHANT_UNRESPONSIVE_AFTER_FUNDING" | "MERCHANT_CALL_CONTEXT_UNAVAILABLE" | "AMBIGUOUS_MAX_AMOUNT" | "MAX_AMOUNT_UNCONVERTIBLE" | "MERCHANT_NOT_READY")[];
1121
1302
  declare const AGENT_PAYMENT_RAIL_VALUES: ("x402" | "mpp_demo" | "mpp_crypto" | "stripe_deposit" | "spt" | "direct" | "mpp")[];
@@ -1301,6 +1482,11 @@ interface PaymentStatusResult {
1301
1482
  expiresAt: string;
1302
1483
  chainId: number;
1303
1484
  message: string;
1485
+ /**
1486
+ * #3420: `true` = the merchant answered 2xx (a `machine_payment_evidence`
1487
+ * row records its response); absent = unknown. See the raw field's doc.
1488
+ */
1489
+ delivered?: boolean;
1304
1490
  /** Platform fee surfaced so it's never silently collected (#386). */
1305
1491
  fee?: PaymentFee | null;
1306
1492
  amountAtomic?: string | null;
@@ -1461,6 +1647,32 @@ declare class MerchantTimeoutError extends HavenApiError {
1461
1647
  readonly merchantErrorCode: "merchant_timeout";
1462
1648
  constructor(message: string);
1463
1649
  }
1650
+ /**
1651
+ * #3417: an erc7710 `POST /x402` authorize replayed a key whose payment to THIS
1652
+ * merchant for THIS resource has already settled. The backend returns
1653
+ * `200 { status: 'confirmed', tx_hash, to, resource_url }` and, correctly, no
1654
+ * `sign_data`, because nothing is left to sign
1655
+ * (`packages/backend/src/modules/x402/replay.ts`). Before this class the
1656
+ * erc7710 path read that answer as a scheme mismatch and threw a 500, which
1657
+ * hosted callers relayed as "transient, retry". Typed so a caller can report
1658
+ * the original settlement instead of retrying, and never signs anything.
1659
+ *
1660
+ * Only thrown when the confirmed row pays the merchant this request names, for
1661
+ * the resource it asked for. The backend's replay lookup is keyed on the
1662
+ * idempotency key alone, so a key reused for another payee or resource — or
1663
+ * first spent on an EIP-3009 funding leg, whose confirmed `tx_hash` proves only
1664
+ * that the delegate was funded — is refused as a 409 collision instead of read
1665
+ * as this settlement. Amount and the MCP tool call are not compared: on an MCP
1666
+ * merchant the resource is its endpoint, so a key reused for another tool
1667
+ * there is answered as that merchant's earlier payment. A `HavenError`, not a `HavenApiError`: nothing failed upstream.
1668
+ */
1669
+ declare class X402Erc7710AlreadySettledError extends HavenError {
1670
+ readonly paymentId: string;
1671
+ readonly txHash: string;
1672
+ readonly body?: unknown | undefined;
1673
+ readonly x402ErrorCode: "payment_already_settled";
1674
+ constructor(paymentId: string, txHash: string, body?: unknown | undefined);
1675
+ }
1464
1676
  declare class X402UnexpectedStatusError extends HavenApiError {
1465
1677
  readonly x402ErrorCode: "unexpected_non_402_status";
1466
1678
  /**
@@ -1519,6 +1731,33 @@ declare class HavenPaymentStateError extends HavenApiError {
1519
1731
  get phase(): PaymentPhase;
1520
1732
  get nextAction(): PaymentNextAction;
1521
1733
  }
1734
+ /**
1735
+ * #3392: the SDK's x402 receipt cache and in-flight map record the
1736
+ * `taskBudgetId` each entry was created under. A call reusing an idempotency
1737
+ * key whose cached/in-flight entry was created under a DIFFERENT task budget
1738
+ * is refused with this typed error BEFORE any network call — the alternative
1739
+ * was silently returning (or joining) a payment charged to another budget.
1740
+ * Typed rather than `HavenApiError`-shaped: no request was attempted, so
1741
+ * there is no HTTP status or response body to carry (the
1742
+ * `HavenZeroSettlementHashError` precedent). A caller that genuinely wants to
1743
+ * pay again under a different budget passes a new `idempotencyKey`.
1744
+ */
1745
+ declare class X402TaskBudgetMismatchError extends HavenError {
1746
+ /** The idempotency key whose cached entry was created under another budget. */
1747
+ readonly idempotencyKey: string;
1748
+ /** The budget the cached/in-flight entry was created under (undefined = none). */
1749
+ readonly entryTaskBudgetId: string | undefined;
1750
+ /** The budget this call named (undefined = none). */
1751
+ readonly requestedTaskBudgetId: string | undefined;
1752
+ readonly x402ErrorCode: "task_budget_mismatch";
1753
+ constructor(message: string,
1754
+ /** The idempotency key whose cached entry was created under another budget. */
1755
+ idempotencyKey: string,
1756
+ /** The budget the cached/in-flight entry was created under (undefined = none). */
1757
+ entryTaskBudgetId: string | undefined,
1758
+ /** The budget this call named (undefined = none). */
1759
+ requestedTaskBudgetId: string | undefined);
1760
+ }
1522
1761
  declare class HavenSigningError extends HavenError {
1523
1762
  constructor(message: string);
1524
1763
  }
@@ -1794,7 +2033,7 @@ declare function buildSweepAuthorizationMessage(auth: SweepAuthorization): strin
1794
2033
  * This SDK's own version. Owned by `scripts/release-bump.mjs`, which rewrites
1795
2034
  * it with the package version on every release — never hand-edit it.
1796
2035
  */
1797
- declare const SDK_VERSION = "0.5.0-alpha.1";
2036
+ declare const SDK_VERSION = "0.7.0-alpha.0";
1798
2037
  /** The request header every published Haven client sends. */
1799
2038
  declare const HAVEN_CLIENT_HEADER = "X-Haven-Client";
1800
2039
  /** `<package>/<version>` — the value of {@link HAVEN_CLIENT_HEADER}. */
@@ -2013,6 +2252,28 @@ declare function connectorRerunCommand(args?: string, options?: {
2013
2252
  channel?: string;
2014
2253
  npxFlags?: string;
2015
2254
  }): string;
2255
+ /**
2256
+ * The command every UPGRADE hint names (#3412): `npx -y @haven_ai/connect@<channel> --doctor`.
2257
+ *
2258
+ * A bare connector re-run is a SETUP command — on a machine that is already
2259
+ * set up it stops at "Missing --setup <hv_setup_...> setup token", so an
2260
+ * outdated signer, local MCP or connector told to "re-run the connector" was
2261
+ * handed a dead end. The flagless doctor works as pasted on an existing
2262
+ * install (#3210: it resolves the runtime from the setup record), diagnoses an
2263
+ * outdated signer, and prints the exact `--doctor --repair` line for the agent
2264
+ * it describes — with `--credentials-dir` whenever more than one agent lives on
2265
+ * the machine, so the repair cannot land on a different agent.
2266
+ *
2267
+ * `-y` because an upgrade hint is often run by an agent in a non-interactive
2268
+ * shell. `@haven_ai/core`'s `upgradeCommandFor` (the backend's
2269
+ * `client_update.upgrade_command`) cannot import this package, so it carries a
2270
+ * copy; `packages/backend/src/__tests__/connector-upgrade-command-parity.test.ts`
2271
+ * fails if the two ever disagree. Setup-time hints (identity restore,
2272
+ * mid-setup retry) legitimately stay on {@link connectorRerunCommand}.
2273
+ */
2274
+ declare function connectorUpgradeCommand(options?: {
2275
+ channel?: string;
2276
+ }): string;
2016
2277
 
2017
2278
  /**
2018
2279
  * The Node.js floor Haven's published packages support (#1161).
@@ -2365,6 +2626,19 @@ declare function resolveTokenFromAddress(address: string, network?: string): {
2365
2626
  symbol: string;
2366
2627
  decimals: number;
2367
2628
  } | null;
2629
+ /**
2630
+ * #3410: token decimals from a SYMBOL + CHAIN — the same registry
2631
+ * `resolveTokenFromAddress` reads, keyed the other way. The address-based
2632
+ * resolver needs the token's contract address, which the consent seed path
2633
+ * (setup-time credential files) does not carry; the symbol and chain it does
2634
+ * carry. Null when the symbol is not registered on that chain (unknown or
2635
+ * custom tokens) — callers must fall back to an explicit atomic label rather
2636
+ * than reading an atomic amount as whole tokens.
2637
+ */
2638
+ declare function resolveTokenBySymbol(chainId: number, symbol: string): {
2639
+ symbol: string;
2640
+ decimals: number;
2641
+ } | null;
2368
2642
 
2369
2643
  /**
2370
2644
  * #3271: the integrity check every client runs before signing a direct
@@ -2395,6 +2669,19 @@ declare function resolveTokenFromAddress(address: string, network?: string): {
2395
2669
  */
2396
2670
  /** Version of the direct-payment sign context (`GET /payments/:id/sign-context`). */
2397
2671
  declare const DIRECT_SIGN_CONTEXT_VERSION = 1;
2672
+ /**
2673
+ * #3419: version of the task-budget sign context (`GET
2674
+ * /task-budgets/:id/sign-context`), the sign-then-submit envelope every
2675
+ * `haven_sign { task_budget_id }` call fetches. The backend emits it
2676
+ * (`task-budget-service.ts`, `task_sign_context_version: 1`); the signer
2677
+ * derives its enforced set `SUPPORTED_TASK_SIGN_CONTEXT_VERSIONS` from this
2678
+ * constant — never a second literal — and the hosted/local task-budget
2679
+ * handoffs report it in `signer_compatibility.task_sign_context_version`.
2680
+ * The signer could not carry the single source itself (a published package
2681
+ * cannot host a constant the backend also serves), so it lives beside the
2682
+ * other binding constants here, exactly as `DIRECT_SIGN_CONTEXT_VERSION` does.
2683
+ */
2684
+ declare const TASK_SIGN_CONTEXT_VERSION = 1;
2398
2685
  /** The ERC-4337 v0.7 EntryPoint — the only one the delegation rail submits to. */
2399
2686
  declare const ENTRY_POINT_V07 = "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
2400
2687
  /**
@@ -2561,7 +2848,17 @@ interface SettlementChildTypedData {
2561
2848
  primaryType: string;
2562
2849
  message: Record<string, unknown>;
2563
2850
  }
2564
- /** True when this typed data is a delegation — the shape that must never be signed unbound. */
2851
+ /**
2852
+ * True when this typed data is a delegation — the shape that must never be
2853
+ * signed unbound. Excludes a SELF-delegation (`delegate === delegator`,
2854
+ * #3329): that is the shape of a task-budget child
2855
+ * (`task-budget-guards.ts`'s `isTaskChildTypedData`), a DIFFERENT typed-data
2856
+ * class verified by a different function against a different expectation. A
2857
+ * real settlement child's `delegate` is always a facilitator or
2858
+ * `ANY_BENEFICIARY` — never this account's own address — so narrowing here
2859
+ * costs this verifier nothing and keeps the two classes from ever
2860
+ * overlapping.
2861
+ */
2565
2862
  declare function isSettlementChildTypedData(value: unknown): value is SettlementChildTypedData;
2566
2863
  /**
2567
2864
  * Map an x402 network string to a chain id. Local on purpose (#1455 review):
@@ -2674,11 +2971,13 @@ declare function assertOwnSettlementChild(typedData: unknown, expectation: Settl
2674
2971
  * payTo = the delegate EOA, amountRaw)`), so the single execution must be
2675
2972
  * exactly `encodePacked(asset, 0, transfer(delegateAddress, amount))`.
2676
2973
  *
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.
2974
+ * `delegateAddress` is the signing key's OWN address — local, not from Haven —
2975
+ * so even a compromised Haven can at most move budget into the agent's own
2976
+ * EOA (the hot-delegate residual the sweep returns), never to an attacker.
2977
+ * `asset` and `amount` keep the leg consistent with what is being paid. Two
2978
+ * callers, two sources: the signer's x402 arm (#3281) passes the Haven-signed
2979
+ * expected context's; `HavenClient.signForData` (#3375) passes the 402 option
2980
+ * the SDK is paying, never the `/x402` response.
2682
2981
  *
2683
2982
  * Call ONLY after `assertBoundDirectPaymentUserOp` has passed on the same
2684
2983
  * typed data (it proves the `execute` → `redeemDelegations` shape this reads).
@@ -2690,6 +2989,114 @@ declare function assertFundingLegPaysDelegate(typedData: Record<string, unknown>
2690
2989
  amount: string;
2691
2990
  }): void;
2692
2991
 
2992
+ /**
2993
+ * Task budgets (#3329): independent verification of a task child delegation
2994
+ * and its close UserOp, mirroring `settlement-child.ts` / `direct-payment-
2995
+ * guard.ts` for a DIFFERENT typed-data class.
2996
+ *
2997
+ * A task budget's child is a SELF-delegation: the agent's own delegate
2998
+ * account grants itself a narrower, time-boxed slice of its budget
2999
+ * delegation (`delegate === delegator === the agent's own account`), chained
3000
+ * under the budget via `authority`. That is what separates it from an x402
3001
+ * settlement child, whose `delegate` is a facilitator/ANY_BENEFICIARY — never
3002
+ * the agent's own account. `isSettlementChildTypedData` (`settlement-
3003
+ * child.ts`) was narrowed to return `false` for a self-delegated payload so
3004
+ * the two classes cannot be confused by either verifier; this file is the
3005
+ * task-child counterpart, verified against a different expectation
3006
+ * (`GET /task-budgets/:id/sign-context`, never a merchant's 402).
3007
+ *
3008
+ * Two shapes, two functions:
3009
+ * - `assertOwnTaskChild` verifies the `Delegation` typed data signed to OPEN
3010
+ * a task budget.
3011
+ * - `assertOwnTaskBudgetCloseUserOp` verifies the `PackedUserOperation`
3012
+ * typed data signed to CLOSE one early (an on-chain
3013
+ * `disableDelegation(child)` call from the agent's own account) — an
3014
+ * authority-REDUCING action only, never a grant.
3015
+ *
3016
+ * `hashDelegation` below reproduces `@metamask/smart-accounts-kit/utils`'s
3017
+ * struct hash (via `@metamask/delegation-core`) byte-for-byte, WITHOUT taking
3018
+ * the kit as a runtime dependency (this package installs on users' machines —
3019
+ * same reasoning `delegate-account.ts` and `settlement-child.ts` give for
3020
+ * their own vendored constants). `DELEGATION_TYPEHASH` / `CAVEAT_TYPEHASH`
3021
+ * are pinned literals, cross-checked against the kit's own `hashDelegation`
3022
+ * by a test vector in `task-budget-guards.test.ts` (which imports the kit
3023
+ * ONLY in that test file).
3024
+ */
3025
+
3026
+ /** The backend's own ceiling (`MAX_TASK_BUDGET_TTL_SECONDS`), enforced again here. */
3027
+ declare const MAX_TASK_BUDGET_TTL_SECONDS = 86400;
3028
+ interface TaskChildTypedData {
3029
+ domain: {
3030
+ name?: string;
3031
+ version?: string;
3032
+ chainId?: number | string;
3033
+ verifyingContract?: string;
3034
+ };
3035
+ types: Record<string, unknown>;
3036
+ primaryType: string;
3037
+ message: Record<string, unknown>;
3038
+ }
3039
+ /**
3040
+ * True when this typed data is a task-budget child: a `Delegation` whose
3041
+ * `delegate` equals its own `delegator` (self-delegation). This is the ONLY
3042
+ * shape distinguishing it from an x402 settlement child (whose `delegate` is
3043
+ * a facilitator or `ANY_BENEFICIARY`) — `isSettlementChildTypedData` is
3044
+ * narrowed to return `false` for this same shape so the two verifiers never
3045
+ * overlap.
3046
+ */
3047
+ declare function isTaskChildTypedData(value: unknown): value is TaskChildTypedData;
3048
+ interface TaskChildExpectation {
3049
+ chainId: number;
3050
+ tokenAddress: string;
3051
+ maxAmountAtomic: string;
3052
+ recipientAddress: string | null;
3053
+ /** unix seconds — the `TimestampEnforcer`'s `beforeThreshold`. */
3054
+ expiresAt: number;
3055
+ parentDelegationHash: string;
3056
+ }
3057
+ /**
3058
+ * Verify a task-budget child delegation is EXACTLY what
3059
+ * `GET /task-budgets/:id/sign-context` (purpose `open`) declared, AND that
3060
+ * both `delegate` and `delegator` are this signer's OWN account. Throws
3061
+ * `HavenTypedDataRefusedError` (never returns) on any disagreement.
3062
+ */
3063
+ declare function assertOwnTaskChild(typedData: unknown, expected: TaskChildExpectation, delegateAddress: string, now?: number): void;
3064
+ interface TaskBudgetCloseExpectation {
3065
+ /** The child delegation's own struct hash (`agent_task_budgets.delegation_hash`). */
3066
+ delegationHash: string;
3067
+ }
3068
+ /**
3069
+ * Verify a task-budget close UserOp is EXACTLY an on-chain
3070
+ * `disableDelegation(child)` call from the agent's own delegate account —
3071
+ * authority-REDUCING only, never a grant. Throws `HavenTypedDataRefusedError`
3072
+ * (never returns) on any disagreement.
3073
+ */
3074
+ declare function assertOwnTaskBudgetCloseUserOp(typedData: Record<string, unknown>, expected: TaskBudgetCloseExpectation, delegateAddress: string): void;
3075
+ /**
3076
+ * `@metamask/delegation-core`'s `DELEGATION_TYPEHASH` — pinned, cross-checked
3077
+ * against the kit by a test vector in `task-budget-guards.test.ts`.
3078
+ */
3079
+ declare const DELEGATION_TYPEHASH: Hex;
3080
+ /** `@metamask/delegation-core`'s `CAVEAT_TYPEHASH` — pinned, same cross-check. */
3081
+ declare const CAVEAT_TYPEHASH: Hex;
3082
+ interface DelegationForHashing {
3083
+ delegate: Address;
3084
+ delegator: Address;
3085
+ authority: Hex;
3086
+ caveats: readonly {
3087
+ enforcer: Address;
3088
+ terms: Hex;
3089
+ }[];
3090
+ salt: bigint;
3091
+ }
3092
+ /**
3093
+ * Reproduces `@metamask/smart-accounts-kit/utils`'s `hashDelegation`
3094
+ * byte-for-byte, WITHOUT the kit at runtime (see the file header). Ignores
3095
+ * `signature` — the kit's own `hashDelegation` does the same (it hashes with
3096
+ * `signature: '0x'` regardless of what the caller passes).
3097
+ */
3098
+ declare function hashDelegation(delegation: DelegationForHashing): Hex;
3099
+
2693
3100
  /**
2694
3101
  * Runtime-agnostic base64 helpers — the single source of truth for the wire
2695
3102
  * encoding shared by the SDK and the edge signer (#325).
@@ -2728,4 +3135,4 @@ declare function encodeBase64Json(value: unknown): string;
2728
3135
  */
2729
3136
  declare function decodeBase64Json<T>(value: string, label?: string): T;
2730
3137
 
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 };
3138
+ 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, resolveTokenBySymbol as b$, type SweepPreparation as b0, type SweepSubmitResult as b1, type SweepTypedData as b2, TASK_SIGN_CONTEXT_VERSION as b3, TRANSFER_WITH_AUTHORIZATION_TYPES as b4, TYPED_DATA_NOT_ALLOWED as b5, type TaskBudgetCloseExpectation as b6, type TaskChildExpectation as b7, type TaskChildTypedData as b8, type UnsupportedNodeVersionMessageOptions as b9, connectorRerunCommand as bA, connectorSpec as bB, connectorUpgradeCommand as bC, createNextStepBuilder as bD, decodeBase64Json as bE, decodeBase64Utf8 as bF, defaultNextToolFor as bG, deriveDelegateAccountAddress as bH, encodeBase64Json as bI, encodeBase64Utf8 as bJ, encodePaymentProof as bK, hashDelegation as bL, havenClientIdentity as bM, isConnectorChannel as bN, isErc7710Option as bO, isPackedUserOperationTypedData as bP, isSupportedNodeVersion as bQ, isSweepableChain as bR, isTaskChildTypedData as bS, normalizePaymentRequired as bT, packedUserOperationHash as bU, parseNextTool as bV, parsePaymentRequired as bW, parsePaymentRequiredResponse as bX, readClientUpdate as bY, renderNextTool as bZ, resolveConnectorChannel as b_, X402AlreadySettledError as ba, X402Erc7710AlreadySettledError as bb, type X402ExpectedAuth as bc, type X402ExpectedContext as bd, type X402PaymentHeaderContext as be, X402PaymentHeaderValidationError as bf, type X402PaymentOption as bg, type X402RequestSnapshot as bh, type X402SchemeSelection as bi, X402TaskBudgetMismatchError as bj, X402UnexpectedStatusError as bk, X402_LEGACY_PAYMENT_HEADER_NAME as bl, X402_MAX_AUTHORIZATION_WINDOW_SECONDS as bm, X402_PAYMENT_HEADER_NAME as bn, X402_PAYMENT_HEADER_NAMES_SENT as bo, X402_PAYMENT_REQUIRED_HEADER_NAME as bp, X402_PAYMENT_RESPONSE_HEADER_NAME as bq, X402_SETTLEMENT_FORWARD_MARGIN_SECONDS as br, assertBoundDirectPaymentUserOp as bs, assertOwnTaskBudgetCloseUserOp as bt, assertOwnTaskChild as bu, assertUserOpTypedDataBinding as bv, buildSweepAuthorizationMessage as bw, buildSweepTypedData as bx, buildX402ExpectedMessage as by, compareNodeVersions as bz, type PaymentIntent as c, resolveTokenFromAddress as c0, selectErc7710PaymentOption as c1, selectPaymentOption as c2, selectStandardPaymentOption as c3, selectX402SettlementScheme as c4, signerUpdateFallback as c5, sweepUsdcAddress as c6, sweepUsdcDomain as c7, toStandardPaymentRequirements as c8, unsupportedNodeVersionMessage as c9, validateStandardX402PaymentHeader as ca, verifySettlementChild as cb, x402AssetTransferMethod as cc, x402AuthorizationAmount as cd, x402FacilitatorAddresses as ce, x402V2PaymentEnvelope as cf, type DelegationForHashing as cg, CAVEAT_ENFORCERS as ch, CAVEAT_TYPEHASH as ci, DELEGATION_MANAGER as cj, DELEGATION_TYPEHASH as ck, DIRECT_PAYMENT_CHAIN_IDS as cl, EXECUTE_ABI as cm, HYBRID_DELEGATOR_IMPLEMENTATION as cn, MAX_SETTLEMENT_WINDOW_SECONDS as co, SIMPLE_FACTORY_ADDRESS as cp, type SettlementChildTypedData as cq, assertFundingLegPaysDelegate as cr, assertOwnSettlementChild as cs, chainIdForNetwork as ct, isSettlementChildTypedData as cu, 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 };