@haven_ai/sdk 0.0.0-dev.202610011057.1c1da3f → 0.0.0-dev.202610011720.e9283da
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/{base64-xQSrAgWq.d.cts → base64-D5TUHBwR.d.cts} +35 -2
- package/dist/{base64-xQSrAgWq.d.ts → base64-D5TUHBwR.d.ts} +35 -2
- package/dist/{chunk-PUAJJDMB.js → chunk-BRELGKWM.js} +12 -3
- package/dist/chunk-BRELGKWM.js.map +1 -0
- package/dist/{chunk-4EE4ESOI.js → chunk-F7YWQMUI.js} +14 -5
- package/dist/chunk-F7YWQMUI.js.map +1 -0
- package/dist/{chunk-OYVHR3IT.cjs → chunk-QOVX5WEX.cjs} +12 -3
- package/dist/chunk-QOVX5WEX.cjs.map +1 -0
- package/dist/{chunk-AUFAHNQU.cjs → chunk-XZA2KTSJ.cjs} +45 -35
- package/dist/chunk-XZA2KTSJ.cjs.map +1 -0
- package/dist/edge.cjs +93 -89
- package/dist/edge.d.cts +2 -2
- package/dist/edge.d.ts +2 -2
- package/dist/edge.js +4 -4
- package/dist/index.cjs +330 -309
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -2
- package/dist/index.d.ts +8 -2
- package/dist/index.js +24 -7
- package/dist/index.js.map +1 -1
- package/dist/test-support.cjs +18 -18
- package/dist/test-support.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-4EE4ESOI.js.map +0 -1
- package/dist/chunk-AUFAHNQU.cjs.map +0 -1
- package/dist/chunk-OYVHR3IT.cjs.map +0 -1
- package/dist/chunk-PUAJJDMB.js.map +0 -1
|
@@ -133,6 +133,12 @@ interface PaymentIntent {
|
|
|
133
133
|
expiresAt: string;
|
|
134
134
|
/** Data needed to sign the payment */
|
|
135
135
|
signData: SignData;
|
|
136
|
+
/**
|
|
137
|
+
* #3528: the additive, WARNING-GRADE prepare hints. Present only when the
|
|
138
|
+
* recipient is one of the owner's own Haven accounts (`SELF_TRANSFER`);
|
|
139
|
+
* advisory — never blocks, never replaces a refusal.
|
|
140
|
+
*/
|
|
141
|
+
warnings?: AgentPaymentWarning[];
|
|
136
142
|
}
|
|
137
143
|
type PaymentStatus = 'pending_signature' | 'submitted' | 'confirmed' | 'pending_approval' | 'approved' | 'proposed' | 'executed' | 'rejected' | 'expired' | 'failed';
|
|
138
144
|
interface PaymentResult {
|
|
@@ -351,6 +357,12 @@ interface X402Intent {
|
|
|
351
357
|
expectedTypedDataHash?: string;
|
|
352
358
|
/** Delegate EOA the funding transfer tops up (the x402 payer). */
|
|
353
359
|
fundingTo: string;
|
|
360
|
+
/**
|
|
361
|
+
* #3528: the additive, WARNING-GRADE prepare hints. Present only when the
|
|
362
|
+
* recipient (the merchant on erc7710, the delegate EOA on a 3009 funding
|
|
363
|
+
* leg) is one of the owner's own Haven accounts; advisory — never blocks.
|
|
364
|
+
*/
|
|
365
|
+
warnings?: AgentPaymentWarning[];
|
|
354
366
|
}
|
|
355
367
|
interface X402ExpectedContext {
|
|
356
368
|
paymentId: string;
|
|
@@ -1523,6 +1535,15 @@ declare const AgentPaymentWarningCode: {
|
|
|
1523
1535
|
* settlement can no longer land at all.
|
|
1524
1536
|
*/
|
|
1525
1537
|
readonly SettlementUnconfirmed: "SETTLEMENT_UNCONFIRMED";
|
|
1538
|
+
/**
|
|
1539
|
+
* #3528: the recipient of the just-prepared payment is one of the owner's
|
|
1540
|
+
* own Haven accounts. WARNING-GRADE and advisory only — a self-transfer is
|
|
1541
|
+
* legitimate (sweeping between own accounts), and the on-chain authority
|
|
1542
|
+
* for the send is unchanged either way. Carried on the prepare surfaces
|
|
1543
|
+
* (`POST /payments`, both `POST /x402` legs, and the MCP tools that front
|
|
1544
|
+
* them); it never blocks and never replaces a refusal.
|
|
1545
|
+
*/
|
|
1546
|
+
readonly SelfTransfer: "SELF_TRANSFER";
|
|
1526
1547
|
};
|
|
1527
1548
|
type AgentPaymentWarningCode = (typeof AgentPaymentWarningCode)[keyof typeof AgentPaymentWarningCode];
|
|
1528
1549
|
interface AgentPaymentWarning {
|
|
@@ -2212,7 +2233,7 @@ declare function buildSweepAuthorizationMessage(auth: SweepAuthorization): strin
|
|
|
2212
2233
|
* This SDK's own version. Owned by `scripts/release-bump.mjs`, which rewrites
|
|
2213
2234
|
* it with the package version on every release — never hand-edit it.
|
|
2214
2235
|
*/
|
|
2215
|
-
declare const SDK_VERSION = "0.0.0-dev.
|
|
2236
|
+
declare const SDK_VERSION = "0.0.0-dev.202610011720.e9283da";
|
|
2216
2237
|
/** The request header every published Haven client sends. */
|
|
2217
2238
|
declare const HAVEN_CLIENT_HEADER = "X-Haven-Client";
|
|
2218
2239
|
/** `<package>/<version>` — the value of {@link HAVEN_CLIENT_HEADER}. */
|
|
@@ -2751,6 +2772,18 @@ declare function selectX402SettlementScheme(accepts: X402PaymentOption[], opts:
|
|
|
2751
2772
|
delegationRail: boolean;
|
|
2752
2773
|
}): X402SchemeSelection | null;
|
|
2753
2774
|
declare function x402AuthorizationAmount(option: X402PaymentOption): string;
|
|
2775
|
+
/**
|
|
2776
|
+
* #3528: map a prepare response's raw `warnings` array onto the typed
|
|
2777
|
+
* `AgentPaymentWarning` shape. Verbatim pass-through per entry (code +
|
|
2778
|
+
* message); `undefined` when the backend sent none — the field stays
|
|
2779
|
+
* ABSENT, never an empty array, so a stranger's prepare is unchanged on the
|
|
2780
|
+
* wire. Unknown codes are relayed as-is: warnings are advisory by contract
|
|
2781
|
+
* (#1308), so a newer backend may add one an older SDK must not swallow.
|
|
2782
|
+
*/
|
|
2783
|
+
declare function mapRawWarnings(raw: Array<{
|
|
2784
|
+
code: string;
|
|
2785
|
+
message: string;
|
|
2786
|
+
}> | undefined): AgentPaymentWarning[] | undefined;
|
|
2754
2787
|
/**
|
|
2755
2788
|
* Canonical Haven-authenticated x402 expected context, recomputed byte-for-byte
|
|
2756
2789
|
* by the edge signer before it signs anything.
|
|
@@ -3314,4 +3347,4 @@ declare function encodeBase64Json(value: unknown): string;
|
|
|
3314
3347
|
*/
|
|
3315
3348
|
declare function decodeBase64Json<T>(value: string, label?: string): T;
|
|
3316
3349
|
|
|
3317
|
-
export { AgentPaymentNextAction as $, type AgentPaymentWarning as A, type X402Erc7710Settlement as B, type CloseTaskBudgetResult as C, type X402McpCallContext as D, type SignData as E, type ResumeAuthorizedX402Input as F, type ResumeX402PaymentInput as G, type HavenClientConfig as H, type X402ResumeState as I, type X402McpTransport as J, type X402MerchantCallContext as K, HavenError as L, AGENT_PAYMENT_FAILURE_CODE_VALUES as M, AGENT_PAYMENT_NEXT_ACTION_VALUES as N, type OpenTaskBudgetResult as O, type PaymentRequest as P, AGENT_PAYMENT_PHASE_VALUES as Q, type RawPaymentParties as R, type SweepResult as S, type TaskBudgetSignContext as T, AGENT_PAYMENT_RAIL_VALUES as U, type AgentNextStep as V, type AgentPaymentEnumSchema as W, type X402PaymentRequired as X, AgentPaymentFailureCode as Y, AgentPaymentFailureCodeDescriptions as Z, AgentPaymentFailureCodeSchema as _, type HavenClientUpdate as a, type SweepConfirmation as a$, AgentPaymentNextActionDescriptions as a0, AgentPaymentNextActionSchema as a1, AgentPaymentPhase as a2, AgentPaymentPhaseDescriptions as a3, AgentPaymentPhaseSchema as a4, AgentPaymentRail as a5, AgentPaymentRailDescriptions as a6, AgentPaymentRailSchema as a7, type AgentPaymentSummary as a8, AgentPaymentWarningCode as a9, MAX_TASK_BUDGET_TTL_SECONDS as aA, type MachinePaymentRail as aB, MerchantTimeoutError as aC, NEXT_TOOL_SERVER_NAMES as aD, NEXT_TOOL_SERVER_ROLES as aE, type NextStep as aF, type NextStepArguments as aG, type NextStepHandoff as aH, type NextStepInput as aI, type NextStepTarget as aJ, type NextStepTargets as aK, type NextToolServerRole as aL, PACKED_USER_OPERATION_FIELDS as aM, type PaymentFee as aN, type PaymentNextAction as aO, type PaymentPhase as aP, type PaymentStatus as aQ, ROOT_AUTHORITY as aR, SDK_CLIENT_IDENTITY as aS, SDK_VERSION as aT, SIGNER_UPDATE_FALLBACK as aU, SWEEP_BASE_CHAIN_ID as aV, SWEEP_BASE_SEPOLIA_CHAIN_ID as aW, SWEEP_BASE_SEPOLIA_USDC_ADDRESS as aX, SWEEP_BASE_USDC_ADDRESS as aY, type SettlementChildExpectation as aZ, SignerRefusalCode as a_, type AgentPurchaseSummary as aa, CONNECTOR_PACKAGE_NAME as ab, type CatalogSubmissionAccepted as ac, DEFAULT_CONFIRMATION_TIMEOUT_MS as ad, DEFAULT_NEXT_TOOL_BY_ACTION as ae, DIRECT_SIGN_CONTEXT_VERSION as af, ENTRY_POINT_V07 as ag, ERC7710_ASSET_TRANSFER_METHOD as ah, HAVEN_CLIENT_HEADER as ai, HAVEN_CONNECTOR_CHANNEL as aj, HAVEN_MINIMUM_NODE_VERSION as ak, HYBRID_DELEGATOR_DOMAIN_NAME as al, HYBRID_DELEGATOR_DOMAIN_VERSION as am, type HavenAgentAllowanceSummary as an, type HavenAgentReadiness as ao, type HavenAllowance as ap, HavenApiError as aq, type HavenCatalogMerchant as ar, type HavenListScope as as, HavenPaymentStateError as at, HavenSigningError as au, HavenTimeoutError as av, HavenTypedDataRefusedError as aw, HavenUnsupportedSignerVersionError as ax, HavenUserOpBindingError as ay, HavenZeroSettlementHashError as az, type PaymentResult as b,
|
|
3350
|
+
export { AgentPaymentNextAction as $, type AgentPaymentWarning as A, type X402Erc7710Settlement as B, type CloseTaskBudgetResult as C, type X402McpCallContext as D, type SignData as E, type ResumeAuthorizedX402Input as F, type ResumeX402PaymentInput as G, type HavenClientConfig as H, type X402ResumeState as I, type X402McpTransport as J, type X402MerchantCallContext as K, HavenError as L, AGENT_PAYMENT_FAILURE_CODE_VALUES as M, AGENT_PAYMENT_NEXT_ACTION_VALUES as N, type OpenTaskBudgetResult as O, type PaymentRequest as P, AGENT_PAYMENT_PHASE_VALUES as Q, type RawPaymentParties as R, type SweepResult as S, type TaskBudgetSignContext as T, AGENT_PAYMENT_RAIL_VALUES as U, type AgentNextStep as V, type AgentPaymentEnumSchema as W, type X402PaymentRequired as X, AgentPaymentFailureCode as Y, AgentPaymentFailureCodeDescriptions as Z, AgentPaymentFailureCodeSchema as _, type HavenClientUpdate as a, type SweepConfirmation as a$, AgentPaymentNextActionDescriptions as a0, AgentPaymentNextActionSchema as a1, AgentPaymentPhase as a2, AgentPaymentPhaseDescriptions as a3, AgentPaymentPhaseSchema as a4, AgentPaymentRail as a5, AgentPaymentRailDescriptions as a6, AgentPaymentRailSchema as a7, type AgentPaymentSummary as a8, AgentPaymentWarningCode as a9, MAX_TASK_BUDGET_TTL_SECONDS as aA, type MachinePaymentRail as aB, MerchantTimeoutError as aC, NEXT_TOOL_SERVER_NAMES as aD, NEXT_TOOL_SERVER_ROLES as aE, type NextStep as aF, type NextStepArguments as aG, type NextStepHandoff as aH, type NextStepInput as aI, type NextStepTarget as aJ, type NextStepTargets as aK, type NextToolServerRole as aL, PACKED_USER_OPERATION_FIELDS as aM, type PaymentFee as aN, type PaymentNextAction as aO, type PaymentPhase as aP, type PaymentStatus as aQ, ROOT_AUTHORITY as aR, SDK_CLIENT_IDENTITY as aS, SDK_VERSION as aT, SIGNER_UPDATE_FALLBACK as aU, SWEEP_BASE_CHAIN_ID as aV, SWEEP_BASE_SEPOLIA_CHAIN_ID as aW, SWEEP_BASE_SEPOLIA_USDC_ADDRESS as aX, SWEEP_BASE_USDC_ADDRESS as aY, type SettlementChildExpectation as aZ, SignerRefusalCode as a_, type AgentPurchaseSummary as aa, CONNECTOR_PACKAGE_NAME as ab, type CatalogSubmissionAccepted as ac, DEFAULT_CONFIRMATION_TIMEOUT_MS as ad, DEFAULT_NEXT_TOOL_BY_ACTION as ae, DIRECT_SIGN_CONTEXT_VERSION as af, ENTRY_POINT_V07 as ag, ERC7710_ASSET_TRANSFER_METHOD as ah, HAVEN_CLIENT_HEADER as ai, HAVEN_CONNECTOR_CHANNEL as aj, HAVEN_MINIMUM_NODE_VERSION as ak, HYBRID_DELEGATOR_DOMAIN_NAME as al, HYBRID_DELEGATOR_DOMAIN_VERSION as am, type HavenAgentAllowanceSummary as an, type HavenAgentReadiness as ao, type HavenAllowance as ap, HavenApiError as aq, type HavenCatalogMerchant as ar, type HavenListScope as as, HavenPaymentStateError as at, HavenSigningError as au, HavenTimeoutError as av, HavenTypedDataRefusedError as aw, HavenUnsupportedSignerVersionError as ax, HavenUserOpBindingError as ay, HavenZeroSettlementHashError as az, type PaymentResult as b, parsePaymentRequiredResponse as b$, type SweepEip712Domain as b0, type SweepEntry as b1, type SweepExpectedAuth as b2, type SweepPreparation as b3, type SweepSubmitResult as b4, type SweepTypedData as b5, TASK_SIGN_CONTEXT_VERSION as b6, TRANSFER_WITH_AUTHORIZATION_TYPES as b7, TYPED_DATA_NOT_ALLOWED as b8, type TaskBudgetCloseExpectation as b9, buildSweepTypedData as bA, buildX402ExpectedMessage as bB, compareNodeVersions as bC, connectorRerunCommand as bD, connectorSpec as bE, connectorUpgradeCommand as bF, createNextStepBuilder as bG, decodeBase64Json as bH, decodeBase64Utf8 as bI, defaultNextToolFor as bJ, deriveDelegateAccountAddress as bK, encodeBase64Json as bL, encodeBase64Utf8 as bM, encodePaymentProof as bN, hashDelegation as bO, havenClientIdentity as bP, isConnectorChannel as bQ, isErc7710Option as bR, isPackedUserOperationTypedData as bS, isSupportedNodeVersion as bT, isSweepableChain as bU, isTaskChildTypedData as bV, mapRawWarnings as bW, normalizePaymentRequired as bX, packedUserOperationHash as bY, parseNextTool as bZ, parsePaymentRequired as b_, type TaskChildExpectation as ba, type TaskChildTypedData as bb, type UnsupportedNodeVersionMessageOptions as bc, X402AlreadySettledError as bd, X402Erc7710AlreadySettledError as be, type X402ExpectedAuth as bf, type X402ExpectedContext as bg, type X402PaymentHeaderContext as bh, X402PaymentHeaderValidationError as bi, type X402PaymentOption as bj, type X402RequestSnapshot as bk, type X402SchemeSelection as bl, X402TaskBudgetMismatchError as bm, X402UnexpectedStatusError as bn, X402_LEGACY_PAYMENT_HEADER_NAME as bo, X402_MAX_AUTHORIZATION_WINDOW_SECONDS as bp, X402_PAYMENT_HEADER_NAME as bq, X402_PAYMENT_HEADER_NAMES_SENT as br, X402_PAYMENT_REQUIRED_HEADER_NAME as bs, X402_PAYMENT_RESPONSE_HEADER_NAME as bt, X402_SETTLEMENT_FORWARD_MARGIN_SECONDS as bu, assertBoundDirectPaymentUserOp as bv, assertOwnTaskBudgetCloseUserOp as bw, assertOwnTaskChild as bx, assertUserOpTypedDataBinding as by, buildSweepAuthorizationMessage as bz, type PaymentIntent as c, readClientUpdate as c0, renderNextTool as c1, resolveConnectorChannel as c2, resolveTokenBySymbol as c3, resolveTokenFromAddress as c4, selectErc7710PaymentOption as c5, selectPaymentOption as c6, selectStandardPaymentOption as c7, selectX402SettlementScheme as c8, signerUpdateFallback as c9, sweepUsdcAddress as ca, sweepUsdcDomain as cb, toStandardPaymentRequirements as cc, unsupportedNodeVersionMessage as cd, validateStandardX402PaymentHeader as ce, verifySettlementChild as cf, x402AssetTransferMethod as cg, x402AuthorizationAmount as ch, x402FacilitatorAddresses as ci, x402V2PaymentEnvelope as cj, type DelegationForHashing as ck, CAVEAT_ENFORCERS as cl, CAVEAT_TYPEHASH as cm, DELEGATION_MANAGER as cn, DELEGATION_TYPEHASH as co, DIRECT_PAYMENT_CHAIN_IDS as cp, EXECUTE_ABI as cq, HYBRID_DELEGATOR_IMPLEMENTATION as cr, MAX_SETTLEMENT_WINDOW_SECONDS as cs, SIMPLE_FACTORY_ADDRESS as ct, type SettlementChildTypedData as cu, assertFundingLegPaysDelegate as cv, assertOwnSettlementChild as cw, chainIdForNetwork as cx, isSettlementChildTypedData as cy, 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 SubmitSubBudgetResult as u, type HavenPendingSubBudgetSignature as v, type CloseSubBudgetResult as w, type PaymentResumeState as x, type X402Receipt as y, type X402Quote as z };
|
|
@@ -133,6 +133,12 @@ interface PaymentIntent {
|
|
|
133
133
|
expiresAt: string;
|
|
134
134
|
/** Data needed to sign the payment */
|
|
135
135
|
signData: SignData;
|
|
136
|
+
/**
|
|
137
|
+
* #3528: the additive, WARNING-GRADE prepare hints. Present only when the
|
|
138
|
+
* recipient is one of the owner's own Haven accounts (`SELF_TRANSFER`);
|
|
139
|
+
* advisory — never blocks, never replaces a refusal.
|
|
140
|
+
*/
|
|
141
|
+
warnings?: AgentPaymentWarning[];
|
|
136
142
|
}
|
|
137
143
|
type PaymentStatus = 'pending_signature' | 'submitted' | 'confirmed' | 'pending_approval' | 'approved' | 'proposed' | 'executed' | 'rejected' | 'expired' | 'failed';
|
|
138
144
|
interface PaymentResult {
|
|
@@ -351,6 +357,12 @@ interface X402Intent {
|
|
|
351
357
|
expectedTypedDataHash?: string;
|
|
352
358
|
/** Delegate EOA the funding transfer tops up (the x402 payer). */
|
|
353
359
|
fundingTo: string;
|
|
360
|
+
/**
|
|
361
|
+
* #3528: the additive, WARNING-GRADE prepare hints. Present only when the
|
|
362
|
+
* recipient (the merchant on erc7710, the delegate EOA on a 3009 funding
|
|
363
|
+
* leg) is one of the owner's own Haven accounts; advisory — never blocks.
|
|
364
|
+
*/
|
|
365
|
+
warnings?: AgentPaymentWarning[];
|
|
354
366
|
}
|
|
355
367
|
interface X402ExpectedContext {
|
|
356
368
|
paymentId: string;
|
|
@@ -1523,6 +1535,15 @@ declare const AgentPaymentWarningCode: {
|
|
|
1523
1535
|
* settlement can no longer land at all.
|
|
1524
1536
|
*/
|
|
1525
1537
|
readonly SettlementUnconfirmed: "SETTLEMENT_UNCONFIRMED";
|
|
1538
|
+
/**
|
|
1539
|
+
* #3528: the recipient of the just-prepared payment is one of the owner's
|
|
1540
|
+
* own Haven accounts. WARNING-GRADE and advisory only — a self-transfer is
|
|
1541
|
+
* legitimate (sweeping between own accounts), and the on-chain authority
|
|
1542
|
+
* for the send is unchanged either way. Carried on the prepare surfaces
|
|
1543
|
+
* (`POST /payments`, both `POST /x402` legs, and the MCP tools that front
|
|
1544
|
+
* them); it never blocks and never replaces a refusal.
|
|
1545
|
+
*/
|
|
1546
|
+
readonly SelfTransfer: "SELF_TRANSFER";
|
|
1526
1547
|
};
|
|
1527
1548
|
type AgentPaymentWarningCode = (typeof AgentPaymentWarningCode)[keyof typeof AgentPaymentWarningCode];
|
|
1528
1549
|
interface AgentPaymentWarning {
|
|
@@ -2212,7 +2233,7 @@ declare function buildSweepAuthorizationMessage(auth: SweepAuthorization): strin
|
|
|
2212
2233
|
* This SDK's own version. Owned by `scripts/release-bump.mjs`, which rewrites
|
|
2213
2234
|
* it with the package version on every release — never hand-edit it.
|
|
2214
2235
|
*/
|
|
2215
|
-
declare const SDK_VERSION = "0.0.0-dev.
|
|
2236
|
+
declare const SDK_VERSION = "0.0.0-dev.202610011720.e9283da";
|
|
2216
2237
|
/** The request header every published Haven client sends. */
|
|
2217
2238
|
declare const HAVEN_CLIENT_HEADER = "X-Haven-Client";
|
|
2218
2239
|
/** `<package>/<version>` — the value of {@link HAVEN_CLIENT_HEADER}. */
|
|
@@ -2751,6 +2772,18 @@ declare function selectX402SettlementScheme(accepts: X402PaymentOption[], opts:
|
|
|
2751
2772
|
delegationRail: boolean;
|
|
2752
2773
|
}): X402SchemeSelection | null;
|
|
2753
2774
|
declare function x402AuthorizationAmount(option: X402PaymentOption): string;
|
|
2775
|
+
/**
|
|
2776
|
+
* #3528: map a prepare response's raw `warnings` array onto the typed
|
|
2777
|
+
* `AgentPaymentWarning` shape. Verbatim pass-through per entry (code +
|
|
2778
|
+
* message); `undefined` when the backend sent none — the field stays
|
|
2779
|
+
* ABSENT, never an empty array, so a stranger's prepare is unchanged on the
|
|
2780
|
+
* wire. Unknown codes are relayed as-is: warnings are advisory by contract
|
|
2781
|
+
* (#1308), so a newer backend may add one an older SDK must not swallow.
|
|
2782
|
+
*/
|
|
2783
|
+
declare function mapRawWarnings(raw: Array<{
|
|
2784
|
+
code: string;
|
|
2785
|
+
message: string;
|
|
2786
|
+
}> | undefined): AgentPaymentWarning[] | undefined;
|
|
2754
2787
|
/**
|
|
2755
2788
|
* Canonical Haven-authenticated x402 expected context, recomputed byte-for-byte
|
|
2756
2789
|
* by the edge signer before it signs anything.
|
|
@@ -3314,4 +3347,4 @@ declare function encodeBase64Json(value: unknown): string;
|
|
|
3314
3347
|
*/
|
|
3315
3348
|
declare function decodeBase64Json<T>(value: string, label?: string): T;
|
|
3316
3349
|
|
|
3317
|
-
export { AgentPaymentNextAction as $, type AgentPaymentWarning as A, type X402Erc7710Settlement as B, type CloseTaskBudgetResult as C, type X402McpCallContext as D, type SignData as E, type ResumeAuthorizedX402Input as F, type ResumeX402PaymentInput as G, type HavenClientConfig as H, type X402ResumeState as I, type X402McpTransport as J, type X402MerchantCallContext as K, HavenError as L, AGENT_PAYMENT_FAILURE_CODE_VALUES as M, AGENT_PAYMENT_NEXT_ACTION_VALUES as N, type OpenTaskBudgetResult as O, type PaymentRequest as P, AGENT_PAYMENT_PHASE_VALUES as Q, type RawPaymentParties as R, type SweepResult as S, type TaskBudgetSignContext as T, AGENT_PAYMENT_RAIL_VALUES as U, type AgentNextStep as V, type AgentPaymentEnumSchema as W, type X402PaymentRequired as X, AgentPaymentFailureCode as Y, AgentPaymentFailureCodeDescriptions as Z, AgentPaymentFailureCodeSchema as _, type HavenClientUpdate as a, type SweepConfirmation as a$, AgentPaymentNextActionDescriptions as a0, AgentPaymentNextActionSchema as a1, AgentPaymentPhase as a2, AgentPaymentPhaseDescriptions as a3, AgentPaymentPhaseSchema as a4, AgentPaymentRail as a5, AgentPaymentRailDescriptions as a6, AgentPaymentRailSchema as a7, type AgentPaymentSummary as a8, AgentPaymentWarningCode as a9, MAX_TASK_BUDGET_TTL_SECONDS as aA, type MachinePaymentRail as aB, MerchantTimeoutError as aC, NEXT_TOOL_SERVER_NAMES as aD, NEXT_TOOL_SERVER_ROLES as aE, type NextStep as aF, type NextStepArguments as aG, type NextStepHandoff as aH, type NextStepInput as aI, type NextStepTarget as aJ, type NextStepTargets as aK, type NextToolServerRole as aL, PACKED_USER_OPERATION_FIELDS as aM, type PaymentFee as aN, type PaymentNextAction as aO, type PaymentPhase as aP, type PaymentStatus as aQ, ROOT_AUTHORITY as aR, SDK_CLIENT_IDENTITY as aS, SDK_VERSION as aT, SIGNER_UPDATE_FALLBACK as aU, SWEEP_BASE_CHAIN_ID as aV, SWEEP_BASE_SEPOLIA_CHAIN_ID as aW, SWEEP_BASE_SEPOLIA_USDC_ADDRESS as aX, SWEEP_BASE_USDC_ADDRESS as aY, type SettlementChildExpectation as aZ, SignerRefusalCode as a_, type AgentPurchaseSummary as aa, CONNECTOR_PACKAGE_NAME as ab, type CatalogSubmissionAccepted as ac, DEFAULT_CONFIRMATION_TIMEOUT_MS as ad, DEFAULT_NEXT_TOOL_BY_ACTION as ae, DIRECT_SIGN_CONTEXT_VERSION as af, ENTRY_POINT_V07 as ag, ERC7710_ASSET_TRANSFER_METHOD as ah, HAVEN_CLIENT_HEADER as ai, HAVEN_CONNECTOR_CHANNEL as aj, HAVEN_MINIMUM_NODE_VERSION as ak, HYBRID_DELEGATOR_DOMAIN_NAME as al, HYBRID_DELEGATOR_DOMAIN_VERSION as am, type HavenAgentAllowanceSummary as an, type HavenAgentReadiness as ao, type HavenAllowance as ap, HavenApiError as aq, type HavenCatalogMerchant as ar, type HavenListScope as as, HavenPaymentStateError as at, HavenSigningError as au, HavenTimeoutError as av, HavenTypedDataRefusedError as aw, HavenUnsupportedSignerVersionError as ax, HavenUserOpBindingError as ay, HavenZeroSettlementHashError as az, type PaymentResult as b,
|
|
3350
|
+
export { AgentPaymentNextAction as $, type AgentPaymentWarning as A, type X402Erc7710Settlement as B, type CloseTaskBudgetResult as C, type X402McpCallContext as D, type SignData as E, type ResumeAuthorizedX402Input as F, type ResumeX402PaymentInput as G, type HavenClientConfig as H, type X402ResumeState as I, type X402McpTransport as J, type X402MerchantCallContext as K, HavenError as L, AGENT_PAYMENT_FAILURE_CODE_VALUES as M, AGENT_PAYMENT_NEXT_ACTION_VALUES as N, type OpenTaskBudgetResult as O, type PaymentRequest as P, AGENT_PAYMENT_PHASE_VALUES as Q, type RawPaymentParties as R, type SweepResult as S, type TaskBudgetSignContext as T, AGENT_PAYMENT_RAIL_VALUES as U, type AgentNextStep as V, type AgentPaymentEnumSchema as W, type X402PaymentRequired as X, AgentPaymentFailureCode as Y, AgentPaymentFailureCodeDescriptions as Z, AgentPaymentFailureCodeSchema as _, type HavenClientUpdate as a, type SweepConfirmation as a$, AgentPaymentNextActionDescriptions as a0, AgentPaymentNextActionSchema as a1, AgentPaymentPhase as a2, AgentPaymentPhaseDescriptions as a3, AgentPaymentPhaseSchema as a4, AgentPaymentRail as a5, AgentPaymentRailDescriptions as a6, AgentPaymentRailSchema as a7, type AgentPaymentSummary as a8, AgentPaymentWarningCode as a9, MAX_TASK_BUDGET_TTL_SECONDS as aA, type MachinePaymentRail as aB, MerchantTimeoutError as aC, NEXT_TOOL_SERVER_NAMES as aD, NEXT_TOOL_SERVER_ROLES as aE, type NextStep as aF, type NextStepArguments as aG, type NextStepHandoff as aH, type NextStepInput as aI, type NextStepTarget as aJ, type NextStepTargets as aK, type NextToolServerRole as aL, PACKED_USER_OPERATION_FIELDS as aM, type PaymentFee as aN, type PaymentNextAction as aO, type PaymentPhase as aP, type PaymentStatus as aQ, ROOT_AUTHORITY as aR, SDK_CLIENT_IDENTITY as aS, SDK_VERSION as aT, SIGNER_UPDATE_FALLBACK as aU, SWEEP_BASE_CHAIN_ID as aV, SWEEP_BASE_SEPOLIA_CHAIN_ID as aW, SWEEP_BASE_SEPOLIA_USDC_ADDRESS as aX, SWEEP_BASE_USDC_ADDRESS as aY, type SettlementChildExpectation as aZ, SignerRefusalCode as a_, type AgentPurchaseSummary as aa, CONNECTOR_PACKAGE_NAME as ab, type CatalogSubmissionAccepted as ac, DEFAULT_CONFIRMATION_TIMEOUT_MS as ad, DEFAULT_NEXT_TOOL_BY_ACTION as ae, DIRECT_SIGN_CONTEXT_VERSION as af, ENTRY_POINT_V07 as ag, ERC7710_ASSET_TRANSFER_METHOD as ah, HAVEN_CLIENT_HEADER as ai, HAVEN_CONNECTOR_CHANNEL as aj, HAVEN_MINIMUM_NODE_VERSION as ak, HYBRID_DELEGATOR_DOMAIN_NAME as al, HYBRID_DELEGATOR_DOMAIN_VERSION as am, type HavenAgentAllowanceSummary as an, type HavenAgentReadiness as ao, type HavenAllowance as ap, HavenApiError as aq, type HavenCatalogMerchant as ar, type HavenListScope as as, HavenPaymentStateError as at, HavenSigningError as au, HavenTimeoutError as av, HavenTypedDataRefusedError as aw, HavenUnsupportedSignerVersionError as ax, HavenUserOpBindingError as ay, HavenZeroSettlementHashError as az, type PaymentResult as b, parsePaymentRequiredResponse as b$, type SweepEip712Domain as b0, type SweepEntry as b1, type SweepExpectedAuth as b2, type SweepPreparation as b3, type SweepSubmitResult as b4, type SweepTypedData as b5, TASK_SIGN_CONTEXT_VERSION as b6, TRANSFER_WITH_AUTHORIZATION_TYPES as b7, TYPED_DATA_NOT_ALLOWED as b8, type TaskBudgetCloseExpectation as b9, buildSweepTypedData as bA, buildX402ExpectedMessage as bB, compareNodeVersions as bC, connectorRerunCommand as bD, connectorSpec as bE, connectorUpgradeCommand as bF, createNextStepBuilder as bG, decodeBase64Json as bH, decodeBase64Utf8 as bI, defaultNextToolFor as bJ, deriveDelegateAccountAddress as bK, encodeBase64Json as bL, encodeBase64Utf8 as bM, encodePaymentProof as bN, hashDelegation as bO, havenClientIdentity as bP, isConnectorChannel as bQ, isErc7710Option as bR, isPackedUserOperationTypedData as bS, isSupportedNodeVersion as bT, isSweepableChain as bU, isTaskChildTypedData as bV, mapRawWarnings as bW, normalizePaymentRequired as bX, packedUserOperationHash as bY, parseNextTool as bZ, parsePaymentRequired as b_, type TaskChildExpectation as ba, type TaskChildTypedData as bb, type UnsupportedNodeVersionMessageOptions as bc, X402AlreadySettledError as bd, X402Erc7710AlreadySettledError as be, type X402ExpectedAuth as bf, type X402ExpectedContext as bg, type X402PaymentHeaderContext as bh, X402PaymentHeaderValidationError as bi, type X402PaymentOption as bj, type X402RequestSnapshot as bk, type X402SchemeSelection as bl, X402TaskBudgetMismatchError as bm, X402UnexpectedStatusError as bn, X402_LEGACY_PAYMENT_HEADER_NAME as bo, X402_MAX_AUTHORIZATION_WINDOW_SECONDS as bp, X402_PAYMENT_HEADER_NAME as bq, X402_PAYMENT_HEADER_NAMES_SENT as br, X402_PAYMENT_REQUIRED_HEADER_NAME as bs, X402_PAYMENT_RESPONSE_HEADER_NAME as bt, X402_SETTLEMENT_FORWARD_MARGIN_SECONDS as bu, assertBoundDirectPaymentUserOp as bv, assertOwnTaskBudgetCloseUserOp as bw, assertOwnTaskChild as bx, assertUserOpTypedDataBinding as by, buildSweepAuthorizationMessage as bz, type PaymentIntent as c, readClientUpdate as c0, renderNextTool as c1, resolveConnectorChannel as c2, resolveTokenBySymbol as c3, resolveTokenFromAddress as c4, selectErc7710PaymentOption as c5, selectPaymentOption as c6, selectStandardPaymentOption as c7, selectX402SettlementScheme as c8, signerUpdateFallback as c9, sweepUsdcAddress as ca, sweepUsdcDomain as cb, toStandardPaymentRequirements as cc, unsupportedNodeVersionMessage as cd, validateStandardX402PaymentHeader as ce, verifySettlementChild as cf, x402AssetTransferMethod as cg, x402AuthorizationAmount as ch, x402FacilitatorAddresses as ci, x402V2PaymentEnvelope as cj, type DelegationForHashing as ck, CAVEAT_ENFORCERS as cl, CAVEAT_TYPEHASH as cm, DELEGATION_MANAGER as cn, DELEGATION_TYPEHASH as co, DIRECT_PAYMENT_CHAIN_IDS as cp, EXECUTE_ABI as cq, HYBRID_DELEGATOR_IMPLEMENTATION as cr, MAX_SETTLEMENT_WINDOW_SECONDS as cs, SIMPLE_FACTORY_ADDRESS as ct, type SettlementChildTypedData as cu, assertFundingLegPaysDelegate as cv, assertOwnSettlementChild as cw, chainIdForNetwork as cx, isSettlementChildTypedData as cy, 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 SubmitSubBudgetResult as u, type HavenPendingSubBudgetSignature as v, type CloseSubBudgetResult as w, type PaymentResumeState as x, type X402Receipt as y, type X402Quote as z };
|
|
@@ -310,7 +310,16 @@ var AgentPaymentWarningCode = {
|
|
|
310
310
|
* money moved". Carries the intent's `expires_at`: after that instant the
|
|
311
311
|
* settlement can no longer land at all.
|
|
312
312
|
*/
|
|
313
|
-
SettlementUnconfirmed: "SETTLEMENT_UNCONFIRMED"
|
|
313
|
+
SettlementUnconfirmed: "SETTLEMENT_UNCONFIRMED",
|
|
314
|
+
/**
|
|
315
|
+
* #3528: the recipient of the just-prepared payment is one of the owner's
|
|
316
|
+
* own Haven accounts. WARNING-GRADE and advisory only — a self-transfer is
|
|
317
|
+
* legitimate (sweeping between own accounts), and the on-chain authority
|
|
318
|
+
* for the send is unchanged either way. Carried on the prepare surfaces
|
|
319
|
+
* (`POST /payments`, both `POST /x402` legs, and the MCP tools that front
|
|
320
|
+
* them); it never blocks and never replaces a refusal.
|
|
321
|
+
*/
|
|
322
|
+
SelfTransfer: "SELF_TRANSFER"
|
|
314
323
|
};
|
|
315
324
|
var AgentPaymentRailDescriptions = {
|
|
316
325
|
[AgentPaymentRail.Direct]: "Standard Haven payment from the user-controlled account, redeeming the agent's on-chain budget delegation.",
|
|
@@ -1016,5 +1025,5 @@ function assertRedeemsOwnBudgetDelegation(redeemCalldata, ownAccount) {
|
|
|
1016
1025
|
}
|
|
1017
1026
|
|
|
1018
1027
|
export { AGENT_PAYMENT_FAILURE_CODE_VALUES, AGENT_PAYMENT_NEXT_ACTION_VALUES, AGENT_PAYMENT_PHASE_VALUES, AGENT_PAYMENT_RAIL_VALUES, AgentPaymentFailureCode, AgentPaymentFailureCodeDescriptions, AgentPaymentFailureCodeSchema, AgentPaymentNextAction, AgentPaymentNextActionDescriptions, AgentPaymentNextActionSchema, AgentPaymentPhase, AgentPaymentPhaseDescriptions, AgentPaymentPhaseSchema, AgentPaymentRail, AgentPaymentRailDescriptions, AgentPaymentRailSchema, AgentPaymentWarningCode, CAVEAT_ENFORCERS, CONNECTOR_PACKAGE_NAME, DEFAULT_CONFIRMATION_TIMEOUT_MS, DELEGATION_MANAGER, DELEGATION_TUPLE_COMPONENTS, DIRECT_SIGN_CONTEXT_VERSION, ENTRY_POINT_V07, HAVEN_CONNECTOR_CHANNEL, HYBRID_DELEGATOR_DOMAIN_NAME, HYBRID_DELEGATOR_DOMAIN_VERSION, HYBRID_DELEGATOR_IMPLEMENTATION, HavenApiError, HavenError, HavenPaymentStateError, HavenSigningError, HavenTimeoutError, HavenUnsupportedSignerVersionError, HavenUserOpBindingError, HavenZeroSettlementHashError, MAX_SETTLEMENT_WINDOW_SECONDS, MerchantTimeoutError, PACKED_USER_OPERATION_FIELDS, REDEEM_DELEGATIONS_ABI, ROOT_AUTHORITY, SIGNER_UPDATE_FALLBACK, SIMPLE_FACTORY_ADDRESS, SINGLE_DEFAULT_MODE, SignerRefusalCode, TASK_SIGN_CONTEXT_VERSION, X402AlreadySettledError, X402Erc7710AlreadySettledError, X402TaskBudgetMismatchError, X402UnexpectedStatusError, assertRedeemsOwnBudgetDelegation, assertUserOpTypedDataBinding, chainIdForNetwork, connectorRerunCommand, connectorSpec, connectorUpgradeCommand, deriveDelegateAccountAddress, isConnectorChannel, isPackedUserOperationTypedData, isSettlementChildTypedData, packedUserOperationHash, resolveConnectorChannel, signerUpdateFallback, verifySettlementChild };
|
|
1019
|
-
//# sourceMappingURL=chunk-
|
|
1020
|
-
//# sourceMappingURL=chunk-
|
|
1028
|
+
//# sourceMappingURL=chunk-BRELGKWM.js.map
|
|
1029
|
+
//# sourceMappingURL=chunk-BRELGKWM.js.map
|