@haven_ai/sdk 0.0.0-dev.202610011855.be225fc → 0.0.0-dev.202610012014.8404a4d
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-DNvA2BeD.d.cts → base64-Csep8OCB.d.cts} +2 -35
- package/dist/{base64-DNvA2BeD.d.ts → base64-Csep8OCB.d.ts} +2 -35
- package/dist/{chunk-5NN7FCQE.js → chunk-76DEDJG3.js} +3 -12
- package/dist/chunk-76DEDJG3.js.map +1 -0
- package/dist/{chunk-43QYHBKU.cjs → chunk-D4WF6CBR.cjs} +35 -45
- package/dist/chunk-D4WF6CBR.cjs.map +1 -0
- package/dist/{chunk-LKDLWE5K.js → chunk-O7LMGVFH.js} +5 -14
- package/dist/chunk-O7LMGVFH.js.map +1 -0
- package/dist/{chunk-BF4QXGBW.cjs → chunk-Q4C67QNN.cjs} +3 -12
- package/dist/chunk-Q4C67QNN.cjs.map +1 -0
- package/dist/edge.cjs +89 -93
- package/dist/edge.d.cts +2 -2
- package/dist/edge.d.ts +2 -2
- package/dist/edge.js +4 -4
- package/dist/index.cjs +310 -331
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -14
- package/dist/index.d.ts +8 -14
- package/dist/index.js +7 -24
- 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-43QYHBKU.cjs.map +0 -1
- package/dist/chunk-5NN7FCQE.js.map +0 -1
- package/dist/chunk-BF4QXGBW.cjs.map +0 -1
- package/dist/chunk-LKDLWE5K.js.map +0 -1
|
@@ -133,12 +133,6 @@ 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[];
|
|
142
136
|
}
|
|
143
137
|
type PaymentStatus = 'pending_signature' | 'submitted' | 'confirmed' | 'pending_approval' | 'approved' | 'proposed' | 'executed' | 'rejected' | 'expired' | 'failed';
|
|
144
138
|
interface PaymentResult {
|
|
@@ -357,12 +351,6 @@ interface X402Intent {
|
|
|
357
351
|
expectedTypedDataHash?: string;
|
|
358
352
|
/** Delegate EOA the funding transfer tops up (the x402 payer). */
|
|
359
353
|
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[];
|
|
366
354
|
}
|
|
367
355
|
interface X402ExpectedContext {
|
|
368
356
|
paymentId: string;
|
|
@@ -1587,15 +1575,6 @@ declare const AgentPaymentWarningCode: {
|
|
|
1587
1575
|
* settlement can no longer land at all.
|
|
1588
1576
|
*/
|
|
1589
1577
|
readonly SettlementUnconfirmed: "SETTLEMENT_UNCONFIRMED";
|
|
1590
|
-
/**
|
|
1591
|
-
* #3528: the recipient of the just-prepared payment is one of the owner's
|
|
1592
|
-
* own Haven accounts. WARNING-GRADE and advisory only — a self-transfer is
|
|
1593
|
-
* legitimate (sweeping between own accounts), and the on-chain authority
|
|
1594
|
-
* for the send is unchanged either way. Carried on the prepare surfaces
|
|
1595
|
-
* (`POST /payments`, both `POST /x402` legs, and the MCP tools that front
|
|
1596
|
-
* them); it never blocks and never replaces a refusal.
|
|
1597
|
-
*/
|
|
1598
|
-
readonly SelfTransfer: "SELF_TRANSFER";
|
|
1599
1578
|
};
|
|
1600
1579
|
type AgentPaymentWarningCode = (typeof AgentPaymentWarningCode)[keyof typeof AgentPaymentWarningCode];
|
|
1601
1580
|
interface AgentPaymentWarning {
|
|
@@ -2292,7 +2271,7 @@ declare function buildSweepAuthorizationMessage(auth: SweepAuthorization): strin
|
|
|
2292
2271
|
* This SDK's own version. Owned by `scripts/release-bump.mjs`, which rewrites
|
|
2293
2272
|
* it with the package version on every release — never hand-edit it.
|
|
2294
2273
|
*/
|
|
2295
|
-
declare const SDK_VERSION = "0.0.0-dev.
|
|
2274
|
+
declare const SDK_VERSION = "0.0.0-dev.202610012014.8404a4d";
|
|
2296
2275
|
/** The request header every published Haven client sends. */
|
|
2297
2276
|
declare const HAVEN_CLIENT_HEADER = "X-Haven-Client";
|
|
2298
2277
|
/** `<package>/<version>` — the value of {@link HAVEN_CLIENT_HEADER}. */
|
|
@@ -2831,18 +2810,6 @@ declare function selectX402SettlementScheme(accepts: X402PaymentOption[], opts:
|
|
|
2831
2810
|
delegationRail: boolean;
|
|
2832
2811
|
}): X402SchemeSelection | null;
|
|
2833
2812
|
declare function x402AuthorizationAmount(option: X402PaymentOption): string;
|
|
2834
|
-
/**
|
|
2835
|
-
* #3528: map a prepare response's raw `warnings` array onto the typed
|
|
2836
|
-
* `AgentPaymentWarning` shape. Verbatim pass-through per entry (code +
|
|
2837
|
-
* message); `undefined` when the backend sent none — the field stays
|
|
2838
|
-
* ABSENT, never an empty array, so a stranger's prepare is unchanged on the
|
|
2839
|
-
* wire. Unknown codes are relayed as-is: warnings are advisory by contract
|
|
2840
|
-
* (#1308), so a newer backend may add one an older SDK must not swallow.
|
|
2841
|
-
*/
|
|
2842
|
-
declare function mapRawWarnings(raw: Array<{
|
|
2843
|
-
code: string;
|
|
2844
|
-
message: string;
|
|
2845
|
-
}> | undefined): AgentPaymentWarning[] | undefined;
|
|
2846
2813
|
/**
|
|
2847
2814
|
* Canonical Haven-authenticated x402 expected context, recomputed byte-for-byte
|
|
2848
2815
|
* by the edge signer before it signs anything.
|
|
@@ -3406,4 +3373,4 @@ declare function encodeBase64Json(value: unknown): string;
|
|
|
3406
3373
|
*/
|
|
3407
3374
|
declare function decodeBase64Json<T>(value: string, label?: string): T;
|
|
3408
3375
|
|
|
3409
|
-
export { AgentPaymentFailureCodeSchema as $, type AgentPaymentWarning as A, type BudgetPrecheckResult as B, type CloseTaskBudgetResult as C, type X402Erc7710Settlement as D, type X402McpCallContext as E, type SignData as F, type ResumeAuthorizedX402Input as G, type HavenClientConfig as H, type ResumeX402PaymentInput as I, type X402ResumeState as J, type X402McpTransport as K, type X402MerchantCallContext as L, HavenError as M, AGENT_PAYMENT_FAILURE_CODE_VALUES as N, type OpenTaskBudgetResult as O, type PaymentRequest as P, AGENT_PAYMENT_NEXT_ACTION_VALUES as Q, type RawPaymentParties as R, type SweepResult as S, type TaskBudgetSignContext as T, AGENT_PAYMENT_PHASE_VALUES as U, AGENT_PAYMENT_RAIL_VALUES as V, type AgentNextStep as W, type X402PaymentRequired as X, type AgentPaymentEnumSchema as Y, AgentPaymentFailureCode as Z, AgentPaymentFailureCodeDescriptions as _, type HavenClientUpdate as a, SignerRefusalCode as a$, AgentPaymentNextAction as a0, AgentPaymentNextActionDescriptions as a1, AgentPaymentNextActionSchema as a2, AgentPaymentPhase as a3, AgentPaymentPhaseDescriptions as a4, AgentPaymentPhaseSchema as a5, AgentPaymentRail as a6, AgentPaymentRailDescriptions as a7, AgentPaymentRailSchema as a8, type AgentPaymentSummary as a9, HavenZeroSettlementHashError as aA, MAX_TASK_BUDGET_TTL_SECONDS as aB, type MachinePaymentRail as aC, MerchantTimeoutError as aD, NEXT_TOOL_SERVER_NAMES as aE, NEXT_TOOL_SERVER_ROLES as aF, type NextStep as aG, type NextStepArguments as aH, type NextStepHandoff as aI, type NextStepInput as aJ, type NextStepTarget as aK, type NextStepTargets as aL, type NextToolServerRole as aM, PACKED_USER_OPERATION_FIELDS as aN, type PaymentFee as aO, type PaymentNextAction as aP, type PaymentPhase as aQ, type PaymentStatus as aR, ROOT_AUTHORITY as aS, SDK_CLIENT_IDENTITY as aT, SDK_VERSION as aU, SIGNER_UPDATE_FALLBACK as aV, SWEEP_BASE_CHAIN_ID as aW, SWEEP_BASE_SEPOLIA_CHAIN_ID as aX, SWEEP_BASE_SEPOLIA_USDC_ADDRESS as aY, SWEEP_BASE_USDC_ADDRESS as aZ, type SettlementChildExpectation as a_, AgentPaymentWarningCode as aa, type AgentPurchaseSummary as ab, CONNECTOR_PACKAGE_NAME as ac, type CatalogSubmissionAccepted as ad, DEFAULT_CONFIRMATION_TIMEOUT_MS as ae, DEFAULT_NEXT_TOOL_BY_ACTION as af, DIRECT_SIGN_CONTEXT_VERSION as ag, ENTRY_POINT_V07 as ah, ERC7710_ASSET_TRANSFER_METHOD as ai, HAVEN_CLIENT_HEADER as aj, HAVEN_CONNECTOR_CHANNEL as ak, HAVEN_MINIMUM_NODE_VERSION as al, HYBRID_DELEGATOR_DOMAIN_NAME as am, HYBRID_DELEGATOR_DOMAIN_VERSION as an, type HavenAgentAllowanceSummary as ao, type HavenAgentReadiness as ap, type HavenAllowance as aq, HavenApiError as ar, type HavenCatalogMerchant as as, type HavenListScope as at, HavenPaymentStateError as au, HavenSigningError as av, HavenTimeoutError as aw, HavenTypedDataRefusedError as ax, HavenUnsupportedSignerVersionError as ay, HavenUserOpBindingError as az, type PaymentResult as b,
|
|
3376
|
+
export { AgentPaymentFailureCodeSchema as $, type AgentPaymentWarning as A, type BudgetPrecheckResult as B, type CloseTaskBudgetResult as C, type X402Erc7710Settlement as D, type X402McpCallContext as E, type SignData as F, type ResumeAuthorizedX402Input as G, type HavenClientConfig as H, type ResumeX402PaymentInput as I, type X402ResumeState as J, type X402McpTransport as K, type X402MerchantCallContext as L, HavenError as M, AGENT_PAYMENT_FAILURE_CODE_VALUES as N, type OpenTaskBudgetResult as O, type PaymentRequest as P, AGENT_PAYMENT_NEXT_ACTION_VALUES as Q, type RawPaymentParties as R, type SweepResult as S, type TaskBudgetSignContext as T, AGENT_PAYMENT_PHASE_VALUES as U, AGENT_PAYMENT_RAIL_VALUES as V, type AgentNextStep as W, type X402PaymentRequired as X, type AgentPaymentEnumSchema as Y, AgentPaymentFailureCode as Z, AgentPaymentFailureCodeDescriptions as _, type HavenClientUpdate as a, SignerRefusalCode as a$, AgentPaymentNextAction as a0, AgentPaymentNextActionDescriptions as a1, AgentPaymentNextActionSchema as a2, AgentPaymentPhase as a3, AgentPaymentPhaseDescriptions as a4, AgentPaymentPhaseSchema as a5, AgentPaymentRail as a6, AgentPaymentRailDescriptions as a7, AgentPaymentRailSchema as a8, type AgentPaymentSummary as a9, HavenZeroSettlementHashError as aA, MAX_TASK_BUDGET_TTL_SECONDS as aB, type MachinePaymentRail as aC, MerchantTimeoutError as aD, NEXT_TOOL_SERVER_NAMES as aE, NEXT_TOOL_SERVER_ROLES as aF, type NextStep as aG, type NextStepArguments as aH, type NextStepHandoff as aI, type NextStepInput as aJ, type NextStepTarget as aK, type NextStepTargets as aL, type NextToolServerRole as aM, PACKED_USER_OPERATION_FIELDS as aN, type PaymentFee as aO, type PaymentNextAction as aP, type PaymentPhase as aQ, type PaymentStatus as aR, ROOT_AUTHORITY as aS, SDK_CLIENT_IDENTITY as aT, SDK_VERSION as aU, SIGNER_UPDATE_FALLBACK as aV, SWEEP_BASE_CHAIN_ID as aW, SWEEP_BASE_SEPOLIA_CHAIN_ID as aX, SWEEP_BASE_SEPOLIA_USDC_ADDRESS as aY, SWEEP_BASE_USDC_ADDRESS as aZ, type SettlementChildExpectation as a_, AgentPaymentWarningCode as aa, type AgentPurchaseSummary as ab, CONNECTOR_PACKAGE_NAME as ac, type CatalogSubmissionAccepted as ad, DEFAULT_CONFIRMATION_TIMEOUT_MS as ae, DEFAULT_NEXT_TOOL_BY_ACTION as af, DIRECT_SIGN_CONTEXT_VERSION as ag, ENTRY_POINT_V07 as ah, ERC7710_ASSET_TRANSFER_METHOD as ai, HAVEN_CLIENT_HEADER as aj, HAVEN_CONNECTOR_CHANNEL as ak, HAVEN_MINIMUM_NODE_VERSION as al, HYBRID_DELEGATOR_DOMAIN_NAME as am, HYBRID_DELEGATOR_DOMAIN_VERSION as an, type HavenAgentAllowanceSummary as ao, type HavenAgentReadiness as ap, type HavenAllowance as aq, HavenApiError as ar, type HavenCatalogMerchant as as, type HavenListScope as at, HavenPaymentStateError as au, HavenSigningError as av, HavenTimeoutError as aw, HavenTypedDataRefusedError as ax, HavenUnsupportedSignerVersionError as ay, HavenUserOpBindingError as az, type PaymentResult as b, parsePaymentRequiredResponse as b$, type SweepConfirmation as b0, type SweepEip712Domain as b1, type SweepEntry as b2, type SweepExpectedAuth as b3, type SweepPreparation as b4, type SweepSubmitResult as b5, type SweepTypedData as b6, TASK_SIGN_CONTEXT_VERSION as b7, TRANSFER_WITH_AUTHORIZATION_TYPES as b8, TYPED_DATA_NOT_ALLOWED as b9, buildSweepAuthorizationMessage as bA, buildSweepTypedData as bB, buildX402ExpectedMessage as bC, compareNodeVersions as bD, connectorRerunCommand as bE, connectorSpec as bF, connectorUpgradeCommand as bG, createNextStepBuilder as bH, decodeBase64Json as bI, decodeBase64Utf8 as bJ, defaultNextToolFor as bK, deriveDelegateAccountAddress as bL, encodeBase64Json as bM, encodeBase64Utf8 as bN, encodePaymentProof as bO, hashDelegation as bP, havenClientIdentity as bQ, isConnectorChannel as bR, isErc7710Option as bS, isPackedUserOperationTypedData as bT, isSupportedNodeVersion as bU, isSweepableChain as bV, isTaskChildTypedData as bW, normalizePaymentRequired as bX, packedUserOperationHash as bY, parseNextTool as bZ, parsePaymentRequired as b_, type TaskBudgetCloseExpectation as ba, type TaskChildExpectation as bb, type TaskChildTypedData as bc, type UnsupportedNodeVersionMessageOptions as bd, X402AlreadySettledError as be, X402Erc7710AlreadySettledError as bf, type X402ExpectedAuth as bg, type X402ExpectedContext as bh, type X402PaymentHeaderContext as bi, X402PaymentHeaderValidationError as bj, type X402PaymentOption as bk, type X402RequestSnapshot as bl, type X402SchemeSelection as bm, X402TaskBudgetMismatchError as bn, X402UnexpectedStatusError as bo, X402_LEGACY_PAYMENT_HEADER_NAME as bp, X402_MAX_AUTHORIZATION_WINDOW_SECONDS as bq, X402_PAYMENT_HEADER_NAME as br, X402_PAYMENT_HEADER_NAMES_SENT as bs, X402_PAYMENT_REQUIRED_HEADER_NAME as bt, X402_PAYMENT_RESPONSE_HEADER_NAME as bu, X402_SETTLEMENT_FORWARD_MARGIN_SECONDS as bv, assertBoundDirectPaymentUserOp as bw, assertOwnTaskBudgetCloseUserOp as bx, assertOwnTaskChild as by, assertUserOpTypedDataBinding 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,12 +133,6 @@ 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[];
|
|
142
136
|
}
|
|
143
137
|
type PaymentStatus = 'pending_signature' | 'submitted' | 'confirmed' | 'pending_approval' | 'approved' | 'proposed' | 'executed' | 'rejected' | 'expired' | 'failed';
|
|
144
138
|
interface PaymentResult {
|
|
@@ -357,12 +351,6 @@ interface X402Intent {
|
|
|
357
351
|
expectedTypedDataHash?: string;
|
|
358
352
|
/** Delegate EOA the funding transfer tops up (the x402 payer). */
|
|
359
353
|
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[];
|
|
366
354
|
}
|
|
367
355
|
interface X402ExpectedContext {
|
|
368
356
|
paymentId: string;
|
|
@@ -1587,15 +1575,6 @@ declare const AgentPaymentWarningCode: {
|
|
|
1587
1575
|
* settlement can no longer land at all.
|
|
1588
1576
|
*/
|
|
1589
1577
|
readonly SettlementUnconfirmed: "SETTLEMENT_UNCONFIRMED";
|
|
1590
|
-
/**
|
|
1591
|
-
* #3528: the recipient of the just-prepared payment is one of the owner's
|
|
1592
|
-
* own Haven accounts. WARNING-GRADE and advisory only — a self-transfer is
|
|
1593
|
-
* legitimate (sweeping between own accounts), and the on-chain authority
|
|
1594
|
-
* for the send is unchanged either way. Carried on the prepare surfaces
|
|
1595
|
-
* (`POST /payments`, both `POST /x402` legs, and the MCP tools that front
|
|
1596
|
-
* them); it never blocks and never replaces a refusal.
|
|
1597
|
-
*/
|
|
1598
|
-
readonly SelfTransfer: "SELF_TRANSFER";
|
|
1599
1578
|
};
|
|
1600
1579
|
type AgentPaymentWarningCode = (typeof AgentPaymentWarningCode)[keyof typeof AgentPaymentWarningCode];
|
|
1601
1580
|
interface AgentPaymentWarning {
|
|
@@ -2292,7 +2271,7 @@ declare function buildSweepAuthorizationMessage(auth: SweepAuthorization): strin
|
|
|
2292
2271
|
* This SDK's own version. Owned by `scripts/release-bump.mjs`, which rewrites
|
|
2293
2272
|
* it with the package version on every release — never hand-edit it.
|
|
2294
2273
|
*/
|
|
2295
|
-
declare const SDK_VERSION = "0.0.0-dev.
|
|
2274
|
+
declare const SDK_VERSION = "0.0.0-dev.202610012014.8404a4d";
|
|
2296
2275
|
/** The request header every published Haven client sends. */
|
|
2297
2276
|
declare const HAVEN_CLIENT_HEADER = "X-Haven-Client";
|
|
2298
2277
|
/** `<package>/<version>` — the value of {@link HAVEN_CLIENT_HEADER}. */
|
|
@@ -2831,18 +2810,6 @@ declare function selectX402SettlementScheme(accepts: X402PaymentOption[], opts:
|
|
|
2831
2810
|
delegationRail: boolean;
|
|
2832
2811
|
}): X402SchemeSelection | null;
|
|
2833
2812
|
declare function x402AuthorizationAmount(option: X402PaymentOption): string;
|
|
2834
|
-
/**
|
|
2835
|
-
* #3528: map a prepare response's raw `warnings` array onto the typed
|
|
2836
|
-
* `AgentPaymentWarning` shape. Verbatim pass-through per entry (code +
|
|
2837
|
-
* message); `undefined` when the backend sent none — the field stays
|
|
2838
|
-
* ABSENT, never an empty array, so a stranger's prepare is unchanged on the
|
|
2839
|
-
* wire. Unknown codes are relayed as-is: warnings are advisory by contract
|
|
2840
|
-
* (#1308), so a newer backend may add one an older SDK must not swallow.
|
|
2841
|
-
*/
|
|
2842
|
-
declare function mapRawWarnings(raw: Array<{
|
|
2843
|
-
code: string;
|
|
2844
|
-
message: string;
|
|
2845
|
-
}> | undefined): AgentPaymentWarning[] | undefined;
|
|
2846
2813
|
/**
|
|
2847
2814
|
* Canonical Haven-authenticated x402 expected context, recomputed byte-for-byte
|
|
2848
2815
|
* by the edge signer before it signs anything.
|
|
@@ -3406,4 +3373,4 @@ declare function encodeBase64Json(value: unknown): string;
|
|
|
3406
3373
|
*/
|
|
3407
3374
|
declare function decodeBase64Json<T>(value: string, label?: string): T;
|
|
3408
3375
|
|
|
3409
|
-
export { AgentPaymentFailureCodeSchema as $, type AgentPaymentWarning as A, type BudgetPrecheckResult as B, type CloseTaskBudgetResult as C, type X402Erc7710Settlement as D, type X402McpCallContext as E, type SignData as F, type ResumeAuthorizedX402Input as G, type HavenClientConfig as H, type ResumeX402PaymentInput as I, type X402ResumeState as J, type X402McpTransport as K, type X402MerchantCallContext as L, HavenError as M, AGENT_PAYMENT_FAILURE_CODE_VALUES as N, type OpenTaskBudgetResult as O, type PaymentRequest as P, AGENT_PAYMENT_NEXT_ACTION_VALUES as Q, type RawPaymentParties as R, type SweepResult as S, type TaskBudgetSignContext as T, AGENT_PAYMENT_PHASE_VALUES as U, AGENT_PAYMENT_RAIL_VALUES as V, type AgentNextStep as W, type X402PaymentRequired as X, type AgentPaymentEnumSchema as Y, AgentPaymentFailureCode as Z, AgentPaymentFailureCodeDescriptions as _, type HavenClientUpdate as a, SignerRefusalCode as a$, AgentPaymentNextAction as a0, AgentPaymentNextActionDescriptions as a1, AgentPaymentNextActionSchema as a2, AgentPaymentPhase as a3, AgentPaymentPhaseDescriptions as a4, AgentPaymentPhaseSchema as a5, AgentPaymentRail as a6, AgentPaymentRailDescriptions as a7, AgentPaymentRailSchema as a8, type AgentPaymentSummary as a9, HavenZeroSettlementHashError as aA, MAX_TASK_BUDGET_TTL_SECONDS as aB, type MachinePaymentRail as aC, MerchantTimeoutError as aD, NEXT_TOOL_SERVER_NAMES as aE, NEXT_TOOL_SERVER_ROLES as aF, type NextStep as aG, type NextStepArguments as aH, type NextStepHandoff as aI, type NextStepInput as aJ, type NextStepTarget as aK, type NextStepTargets as aL, type NextToolServerRole as aM, PACKED_USER_OPERATION_FIELDS as aN, type PaymentFee as aO, type PaymentNextAction as aP, type PaymentPhase as aQ, type PaymentStatus as aR, ROOT_AUTHORITY as aS, SDK_CLIENT_IDENTITY as aT, SDK_VERSION as aU, SIGNER_UPDATE_FALLBACK as aV, SWEEP_BASE_CHAIN_ID as aW, SWEEP_BASE_SEPOLIA_CHAIN_ID as aX, SWEEP_BASE_SEPOLIA_USDC_ADDRESS as aY, SWEEP_BASE_USDC_ADDRESS as aZ, type SettlementChildExpectation as a_, AgentPaymentWarningCode as aa, type AgentPurchaseSummary as ab, CONNECTOR_PACKAGE_NAME as ac, type CatalogSubmissionAccepted as ad, DEFAULT_CONFIRMATION_TIMEOUT_MS as ae, DEFAULT_NEXT_TOOL_BY_ACTION as af, DIRECT_SIGN_CONTEXT_VERSION as ag, ENTRY_POINT_V07 as ah, ERC7710_ASSET_TRANSFER_METHOD as ai, HAVEN_CLIENT_HEADER as aj, HAVEN_CONNECTOR_CHANNEL as ak, HAVEN_MINIMUM_NODE_VERSION as al, HYBRID_DELEGATOR_DOMAIN_NAME as am, HYBRID_DELEGATOR_DOMAIN_VERSION as an, type HavenAgentAllowanceSummary as ao, type HavenAgentReadiness as ap, type HavenAllowance as aq, HavenApiError as ar, type HavenCatalogMerchant as as, type HavenListScope as at, HavenPaymentStateError as au, HavenSigningError as av, HavenTimeoutError as aw, HavenTypedDataRefusedError as ax, HavenUnsupportedSignerVersionError as ay, HavenUserOpBindingError as az, type PaymentResult as b,
|
|
3376
|
+
export { AgentPaymentFailureCodeSchema as $, type AgentPaymentWarning as A, type BudgetPrecheckResult as B, type CloseTaskBudgetResult as C, type X402Erc7710Settlement as D, type X402McpCallContext as E, type SignData as F, type ResumeAuthorizedX402Input as G, type HavenClientConfig as H, type ResumeX402PaymentInput as I, type X402ResumeState as J, type X402McpTransport as K, type X402MerchantCallContext as L, HavenError as M, AGENT_PAYMENT_FAILURE_CODE_VALUES as N, type OpenTaskBudgetResult as O, type PaymentRequest as P, AGENT_PAYMENT_NEXT_ACTION_VALUES as Q, type RawPaymentParties as R, type SweepResult as S, type TaskBudgetSignContext as T, AGENT_PAYMENT_PHASE_VALUES as U, AGENT_PAYMENT_RAIL_VALUES as V, type AgentNextStep as W, type X402PaymentRequired as X, type AgentPaymentEnumSchema as Y, AgentPaymentFailureCode as Z, AgentPaymentFailureCodeDescriptions as _, type HavenClientUpdate as a, SignerRefusalCode as a$, AgentPaymentNextAction as a0, AgentPaymentNextActionDescriptions as a1, AgentPaymentNextActionSchema as a2, AgentPaymentPhase as a3, AgentPaymentPhaseDescriptions as a4, AgentPaymentPhaseSchema as a5, AgentPaymentRail as a6, AgentPaymentRailDescriptions as a7, AgentPaymentRailSchema as a8, type AgentPaymentSummary as a9, HavenZeroSettlementHashError as aA, MAX_TASK_BUDGET_TTL_SECONDS as aB, type MachinePaymentRail as aC, MerchantTimeoutError as aD, NEXT_TOOL_SERVER_NAMES as aE, NEXT_TOOL_SERVER_ROLES as aF, type NextStep as aG, type NextStepArguments as aH, type NextStepHandoff as aI, type NextStepInput as aJ, type NextStepTarget as aK, type NextStepTargets as aL, type NextToolServerRole as aM, PACKED_USER_OPERATION_FIELDS as aN, type PaymentFee as aO, type PaymentNextAction as aP, type PaymentPhase as aQ, type PaymentStatus as aR, ROOT_AUTHORITY as aS, SDK_CLIENT_IDENTITY as aT, SDK_VERSION as aU, SIGNER_UPDATE_FALLBACK as aV, SWEEP_BASE_CHAIN_ID as aW, SWEEP_BASE_SEPOLIA_CHAIN_ID as aX, SWEEP_BASE_SEPOLIA_USDC_ADDRESS as aY, SWEEP_BASE_USDC_ADDRESS as aZ, type SettlementChildExpectation as a_, AgentPaymentWarningCode as aa, type AgentPurchaseSummary as ab, CONNECTOR_PACKAGE_NAME as ac, type CatalogSubmissionAccepted as ad, DEFAULT_CONFIRMATION_TIMEOUT_MS as ae, DEFAULT_NEXT_TOOL_BY_ACTION as af, DIRECT_SIGN_CONTEXT_VERSION as ag, ENTRY_POINT_V07 as ah, ERC7710_ASSET_TRANSFER_METHOD as ai, HAVEN_CLIENT_HEADER as aj, HAVEN_CONNECTOR_CHANNEL as ak, HAVEN_MINIMUM_NODE_VERSION as al, HYBRID_DELEGATOR_DOMAIN_NAME as am, HYBRID_DELEGATOR_DOMAIN_VERSION as an, type HavenAgentAllowanceSummary as ao, type HavenAgentReadiness as ap, type HavenAllowance as aq, HavenApiError as ar, type HavenCatalogMerchant as as, type HavenListScope as at, HavenPaymentStateError as au, HavenSigningError as av, HavenTimeoutError as aw, HavenTypedDataRefusedError as ax, HavenUnsupportedSignerVersionError as ay, HavenUserOpBindingError as az, type PaymentResult as b, parsePaymentRequiredResponse as b$, type SweepConfirmation as b0, type SweepEip712Domain as b1, type SweepEntry as b2, type SweepExpectedAuth as b3, type SweepPreparation as b4, type SweepSubmitResult as b5, type SweepTypedData as b6, TASK_SIGN_CONTEXT_VERSION as b7, TRANSFER_WITH_AUTHORIZATION_TYPES as b8, TYPED_DATA_NOT_ALLOWED as b9, buildSweepAuthorizationMessage as bA, buildSweepTypedData as bB, buildX402ExpectedMessage as bC, compareNodeVersions as bD, connectorRerunCommand as bE, connectorSpec as bF, connectorUpgradeCommand as bG, createNextStepBuilder as bH, decodeBase64Json as bI, decodeBase64Utf8 as bJ, defaultNextToolFor as bK, deriveDelegateAccountAddress as bL, encodeBase64Json as bM, encodeBase64Utf8 as bN, encodePaymentProof as bO, hashDelegation as bP, havenClientIdentity as bQ, isConnectorChannel as bR, isErc7710Option as bS, isPackedUserOperationTypedData as bT, isSupportedNodeVersion as bU, isSweepableChain as bV, isTaskChildTypedData as bW, normalizePaymentRequired as bX, packedUserOperationHash as bY, parseNextTool as bZ, parsePaymentRequired as b_, type TaskBudgetCloseExpectation as ba, type TaskChildExpectation as bb, type TaskChildTypedData as bc, type UnsupportedNodeVersionMessageOptions as bd, X402AlreadySettledError as be, X402Erc7710AlreadySettledError as bf, type X402ExpectedAuth as bg, type X402ExpectedContext as bh, type X402PaymentHeaderContext as bi, X402PaymentHeaderValidationError as bj, type X402PaymentOption as bk, type X402RequestSnapshot as bl, type X402SchemeSelection as bm, X402TaskBudgetMismatchError as bn, X402UnexpectedStatusError as bo, X402_LEGACY_PAYMENT_HEADER_NAME as bp, X402_MAX_AUTHORIZATION_WINDOW_SECONDS as bq, X402_PAYMENT_HEADER_NAME as br, X402_PAYMENT_HEADER_NAMES_SENT as bs, X402_PAYMENT_REQUIRED_HEADER_NAME as bt, X402_PAYMENT_RESPONSE_HEADER_NAME as bu, X402_SETTLEMENT_FORWARD_MARGIN_SECONDS as bv, assertBoundDirectPaymentUserOp as bw, assertOwnTaskBudgetCloseUserOp as bx, assertOwnTaskChild as by, assertUserOpTypedDataBinding 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,16 +310,7 @@ 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"
|
|
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"
|
|
313
|
+
SettlementUnconfirmed: "SETTLEMENT_UNCONFIRMED"
|
|
323
314
|
};
|
|
324
315
|
var AgentPaymentRailDescriptions = {
|
|
325
316
|
[AgentPaymentRail.Direct]: "Standard Haven payment from the user-controlled account, redeeming the agent's on-chain budget delegation.",
|
|
@@ -1025,5 +1016,5 @@ function assertRedeemsOwnBudgetDelegation(redeemCalldata, ownAccount) {
|
|
|
1025
1016
|
}
|
|
1026
1017
|
|
|
1027
1018
|
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 };
|
|
1028
|
-
//# sourceMappingURL=chunk-
|
|
1029
|
-
//# sourceMappingURL=chunk-
|
|
1019
|
+
//# sourceMappingURL=chunk-76DEDJG3.js.map
|
|
1020
|
+
//# sourceMappingURL=chunk-76DEDJG3.js.map
|