@haven_ai/sdk 0.0.0-dev.202609241737.2d2b91b → 0.0.0-dev.202609241802.ea320de
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/README.md +1 -1
- package/dist/{base64-fVc9Cnn-.d.cts → base64-CPxbmyU9.d.cts} +16 -16
- package/dist/{base64-fVc9Cnn-.d.ts → base64-CPxbmyU9.d.ts} +16 -16
- package/dist/{chunk-YGSM2WRP.js → chunk-FR5R26V3.js} +6 -6
- package/dist/chunk-FR5R26V3.js.map +1 -0
- package/dist/{chunk-CSWZXQ2L.cjs → chunk-M57KOLAN.cjs} +6 -6
- package/dist/chunk-M57KOLAN.cjs.map +1 -0
- package/dist/edge.cjs +32 -32
- package/dist/edge.d.cts +1 -1
- package/dist/edge.d.ts +1 -1
- package/dist/edge.js +2 -2
- package/dist/index.cjs +260 -259
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -6
- package/dist/index.d.ts +7 -6
- package/dist/index.js +6 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-CSWZXQ2L.cjs.map +0 -1
- package/dist/chunk-YGSM2WRP.js.map +0 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RawPaymentParties, H as HavenClientConfig, P as PaymentRequest, a as PaymentResult, b as PaymentIntent, X as X402PaymentRequired, c as X402AuthorizationOptions, d as X402Intent, e as PaymentStatusResult, f as HavenAgent, g as HavenAgentSummary, S as SweepResult, h as SweepPrepareResponse, i as SweepAuthorization, j as SweepSubmitResponse, k as HavenAllowanceSummary, l as HavenBalanceCoverage, m as PostPurchaseAllowanceSummary, A as AgentPaymentWarning, n as HavenCatalogEntry, o as HavenCatalogSubmission, p as HavenPaymentReceipt, q as HavenPaymentReceiptsPage, r as PaymentResumeState, s as X402Receipt, t as X402Quote, u as X402Erc7710Settlement, v as X402McpCallContext, w as SignData, x as ResumeAuthorizedX402Input, y as ResumeX402PaymentInput, z as X402ResumeState, B as X402McpTransport, C as X402MerchantCallContext, D as HavenError } from './base64-
|
|
2
|
-
export { E as AGENT_PAYMENT_FAILURE_CODE_VALUES, F as AGENT_PAYMENT_NEXT_ACTION_VALUES, G as AGENT_PAYMENT_PHASE_VALUES, I as AGENT_PAYMENT_RAIL_VALUES, J as AgentNextStep, K as AgentPaymentEnumSchema, L as AgentPaymentFailureCode, M as AgentPaymentFailureCodeDescriptions, N as AgentPaymentFailureCodeSchema, O as AgentPaymentNextAction, Q as AgentPaymentNextActionDescriptions, T as AgentPaymentNextActionSchema, U as AgentPaymentPhase, V as AgentPaymentPhaseDescriptions, W as AgentPaymentPhaseSchema, Y as AgentPaymentRail, Z as AgentPaymentRailDescriptions, _ as AgentPaymentRailSchema, $ as AgentPaymentSummary, a0 as AgentPaymentWarningCode, a1 as AgentPurchaseSummary, a2 as CONNECTOR_PACKAGE_NAME, a3 as CatalogSubmissionAccepted, a4 as DEFAULT_CONFIRMATION_TIMEOUT_MS, a5 as DEFAULT_NEXT_TOOL_BY_ACTION, a6 as DIRECT_SIGN_CONTEXT_VERSION, a7 as ENTRY_POINT_V07, a8 as ERC7710_ASSET_TRANSFER_METHOD, a9 as HAVEN_CONNECTOR_CHANNEL, aa as HAVEN_MINIMUM_NODE_VERSION, ab as HYBRID_DELEGATOR_DOMAIN_NAME, ac as HYBRID_DELEGATOR_DOMAIN_VERSION, ad as HavenAgentAllowanceSummary, ae as HavenAgentReadiness, af as HavenAllowance, ag as HavenApiError, ah as HavenCatalogMerchant, ai as HavenListScope, aj as HavenPaymentStateError, ak as HavenSigningError, al as HavenTimeoutError, am as HavenUnsupportedSignerVersionError, an as HavenUserOpBindingError, ao as HavenZeroSettlementHashError, ap as MachinePaymentRail, aq as MerchantTimeoutError, ar as NEXT_TOOL_SERVER_NAMES, as as NEXT_TOOL_SERVER_ROLES, at as NextStep, au as NextStepArguments, av as NextStepHandoff, aw as NextStepInput, ax as NextStepTarget, ay as NextStepTargets, az as NextToolServerRole, aA as PACKED_USER_OPERATION_FIELDS, aB as PaymentFee, aC as PaymentNextAction, aD as PaymentPhase, aE as PaymentStatus, aF as SIGNER_UPDATE_FALLBACK, aG as SWEEP_BASE_CHAIN_ID, aH as SWEEP_BASE_SEPOLIA_CHAIN_ID, aI as SWEEP_BASE_SEPOLIA_USDC_ADDRESS, aJ as SWEEP_BASE_USDC_ADDRESS, aK as SignerRefusalCode, aL as SweepConfirmation, aM as SweepEip712Domain, aN as SweepEntry, aO as SweepExpectedAuth, aP as SweepPreparation, aQ as SweepSubmitResult, aR as SweepTypedData, aS as TRANSFER_WITH_AUTHORIZATION_TYPES, aT as UnsupportedNodeVersionMessageOptions, aU as X402AlreadySettledError, aV as X402ExpectedAuth, aW as X402ExpectedContext, aX as X402PaymentHeaderContext, aY as X402PaymentHeaderValidationError, aZ as X402PaymentOption, a_ as X402RequestSnapshot, a$ as X402SchemeSelection, b0 as X402UnexpectedStatusError, b1 as X402_LEGACY_PAYMENT_HEADER_NAME, b2 as X402_MAX_AUTHORIZATION_WINDOW_SECONDS, b3 as X402_PAYMENT_HEADER_NAME, b4 as X402_PAYMENT_HEADER_NAMES_SENT, b5 as X402_PAYMENT_REQUIRED_HEADER_NAME, b6 as X402_PAYMENT_RESPONSE_HEADER_NAME, b7 as X402_SETTLEMENT_FORWARD_MARGIN_SECONDS, b8 as assertUserOpTypedDataBinding, b9 as buildSweepAuthorizationMessage, ba as buildSweepTypedData, bb as buildX402ExpectedMessage, bc as compareNodeVersions, bd as connectorRerunCommand, be as connectorSpec, bf as createNextStepBuilder, bg as decodeBase64Json, bh as decodeBase64Utf8, bi as defaultNextToolFor, bj as encodeBase64Json, bk as encodeBase64Utf8, bl as encodePaymentProof, bm as isConnectorChannel, bn as isErc7710Option, bo as isPackedUserOperationTypedData, bp as isSupportedNodeVersion, bq as isSweepableChain, br as normalizePaymentRequired, bs as packedUserOperationHash, bt as parseNextTool, bu as parsePaymentRequired, bv as parsePaymentRequiredResponse, bw as renderNextTool, bx as resolveConnectorChannel, by as resolveTokenFromAddress, bz as selectErc7710PaymentOption, bA as selectPaymentOption, bB as selectStandardPaymentOption, bC as selectX402SettlementScheme, bD as signerUpdateFallback, bE as sweepUsdcAddress, bF as sweepUsdcDomain, bG as toStandardPaymentRequirements, bH as unsupportedNodeVersionMessage, bI as validateStandardX402PaymentHeader, bJ as x402AssetTransferMethod, bK as x402AuthorizationAmount, bL as x402FacilitatorAddresses, bM as x402V2PaymentEnvelope } from './base64-
|
|
1
|
+
import { R as RawPaymentParties, H as HavenClientConfig, P as PaymentRequest, a as PaymentResult, b as PaymentIntent, X as X402PaymentRequired, c as X402AuthorizationOptions, d as X402Intent, e as PaymentStatusResult, f as HavenAgent, g as HavenAgentSummary, S as SweepResult, h as SweepPrepareResponse, i as SweepAuthorization, j as SweepSubmitResponse, k as HavenAllowanceSummary, l as HavenBalanceCoverage, m as PostPurchaseAllowanceSummary, A as AgentPaymentWarning, n as HavenCatalogEntry, o as HavenCatalogSubmission, p as HavenPaymentReceipt, q as HavenPaymentReceiptsPage, r as PaymentResumeState, s as X402Receipt, t as X402Quote, u as X402Erc7710Settlement, v as X402McpCallContext, w as SignData, x as ResumeAuthorizedX402Input, y as ResumeX402PaymentInput, z as X402ResumeState, B as X402McpTransport, C as X402MerchantCallContext, D as HavenError } from './base64-CPxbmyU9.cjs';
|
|
2
|
+
export { E as AGENT_PAYMENT_FAILURE_CODE_VALUES, F as AGENT_PAYMENT_NEXT_ACTION_VALUES, G as AGENT_PAYMENT_PHASE_VALUES, I as AGENT_PAYMENT_RAIL_VALUES, J as AgentNextStep, K as AgentPaymentEnumSchema, L as AgentPaymentFailureCode, M as AgentPaymentFailureCodeDescriptions, N as AgentPaymentFailureCodeSchema, O as AgentPaymentNextAction, Q as AgentPaymentNextActionDescriptions, T as AgentPaymentNextActionSchema, U as AgentPaymentPhase, V as AgentPaymentPhaseDescriptions, W as AgentPaymentPhaseSchema, Y as AgentPaymentRail, Z as AgentPaymentRailDescriptions, _ as AgentPaymentRailSchema, $ as AgentPaymentSummary, a0 as AgentPaymentWarningCode, a1 as AgentPurchaseSummary, a2 as CONNECTOR_PACKAGE_NAME, a3 as CatalogSubmissionAccepted, a4 as DEFAULT_CONFIRMATION_TIMEOUT_MS, a5 as DEFAULT_NEXT_TOOL_BY_ACTION, a6 as DIRECT_SIGN_CONTEXT_VERSION, a7 as ENTRY_POINT_V07, a8 as ERC7710_ASSET_TRANSFER_METHOD, a9 as HAVEN_CONNECTOR_CHANNEL, aa as HAVEN_MINIMUM_NODE_VERSION, ab as HYBRID_DELEGATOR_DOMAIN_NAME, ac as HYBRID_DELEGATOR_DOMAIN_VERSION, ad as HavenAgentAllowanceSummary, ae as HavenAgentReadiness, af as HavenAllowance, ag as HavenApiError, ah as HavenCatalogMerchant, ai as HavenListScope, aj as HavenPaymentStateError, ak as HavenSigningError, al as HavenTimeoutError, am as HavenUnsupportedSignerVersionError, an as HavenUserOpBindingError, ao as HavenZeroSettlementHashError, ap as MachinePaymentRail, aq as MerchantTimeoutError, ar as NEXT_TOOL_SERVER_NAMES, as as NEXT_TOOL_SERVER_ROLES, at as NextStep, au as NextStepArguments, av as NextStepHandoff, aw as NextStepInput, ax as NextStepTarget, ay as NextStepTargets, az as NextToolServerRole, aA as PACKED_USER_OPERATION_FIELDS, aB as PaymentFee, aC as PaymentNextAction, aD as PaymentPhase, aE as PaymentStatus, aF as SIGNER_UPDATE_FALLBACK, aG as SWEEP_BASE_CHAIN_ID, aH as SWEEP_BASE_SEPOLIA_CHAIN_ID, aI as SWEEP_BASE_SEPOLIA_USDC_ADDRESS, aJ as SWEEP_BASE_USDC_ADDRESS, aK as SignerRefusalCode, aL as SweepConfirmation, aM as SweepEip712Domain, aN as SweepEntry, aO as SweepExpectedAuth, aP as SweepPreparation, aQ as SweepSubmitResult, aR as SweepTypedData, aS as TRANSFER_WITH_AUTHORIZATION_TYPES, aT as UnsupportedNodeVersionMessageOptions, aU as X402AlreadySettledError, aV as X402ExpectedAuth, aW as X402ExpectedContext, aX as X402PaymentHeaderContext, aY as X402PaymentHeaderValidationError, aZ as X402PaymentOption, a_ as X402RequestSnapshot, a$ as X402SchemeSelection, b0 as X402UnexpectedStatusError, b1 as X402_LEGACY_PAYMENT_HEADER_NAME, b2 as X402_MAX_AUTHORIZATION_WINDOW_SECONDS, b3 as X402_PAYMENT_HEADER_NAME, b4 as X402_PAYMENT_HEADER_NAMES_SENT, b5 as X402_PAYMENT_REQUIRED_HEADER_NAME, b6 as X402_PAYMENT_RESPONSE_HEADER_NAME, b7 as X402_SETTLEMENT_FORWARD_MARGIN_SECONDS, b8 as assertUserOpTypedDataBinding, b9 as buildSweepAuthorizationMessage, ba as buildSweepTypedData, bb as buildX402ExpectedMessage, bc as compareNodeVersions, bd as connectorRerunCommand, be as connectorSpec, bf as createNextStepBuilder, bg as decodeBase64Json, bh as decodeBase64Utf8, bi as defaultNextToolFor, bj as encodeBase64Json, bk as encodeBase64Utf8, bl as encodePaymentProof, bm as isConnectorChannel, bn as isErc7710Option, bo as isPackedUserOperationTypedData, bp as isSupportedNodeVersion, bq as isSweepableChain, br as normalizePaymentRequired, bs as packedUserOperationHash, bt as parseNextTool, bu as parsePaymentRequired, bv as parsePaymentRequiredResponse, bw as renderNextTool, bx as resolveConnectorChannel, by as resolveTokenFromAddress, bz as selectErc7710PaymentOption, bA as selectPaymentOption, bB as selectStandardPaymentOption, bC as selectX402SettlementScheme, bD as signerUpdateFallback, bE as sweepUsdcAddress, bF as sweepUsdcDomain, bG as toStandardPaymentRequirements, bH as unsupportedNodeVersionMessage, bI as validateStandardX402PaymentHeader, bJ as x402AssetTransferMethod, bK as x402AuthorizationAmount, bL as x402FacilitatorAddresses, bM as x402V2PaymentEnvelope } from './base64-CPxbmyU9.cjs';
|
|
3
3
|
import 'x402/types';
|
|
4
4
|
import 'viem';
|
|
5
5
|
|
|
@@ -262,11 +262,12 @@ declare class HavenClient {
|
|
|
262
262
|
*/
|
|
263
263
|
getAgentSummary(): Promise<HavenAgentSummary>;
|
|
264
264
|
/**
|
|
265
|
-
* Sweep stranded USDC and ETH from the delegate EOA back to the
|
|
265
|
+
* Sweep stranded USDC and ETH from the delegate EOA back to the agent's Haven account.
|
|
266
266
|
*
|
|
267
267
|
* The delegate key held by this client signs and submits the transfer transactions
|
|
268
268
|
* directly — Haven's backend never handles the key or constructs signed txs
|
|
269
|
-
* (CASP/MiCA Red Line #2). Funds always go to the
|
|
269
|
+
* (CASP/MiCA Red Line #2). Funds always go to the Haven account linked to this agent
|
|
270
|
+
* (`accountAddress` from `getAgent()`).
|
|
270
271
|
*
|
|
271
272
|
* Requires `chainRpcs` to be set for the agent's chain in `HavenClientConfig`.
|
|
272
273
|
*/
|
|
@@ -624,7 +625,7 @@ declare class HavenClient {
|
|
|
624
625
|
* collapses an SSE JSON-RPC response to its `result`.
|
|
625
626
|
*/
|
|
626
627
|
/**
|
|
627
|
-
* Wait for a payment's
|
|
628
|
+
* Wait for a payment's account→delegate funding tx to reach ≥1 on-chain
|
|
628
629
|
* confirmation. The hosted x402 completion path MUST call this after funding
|
|
629
630
|
* and before delivering the merchant payment header, so the merchant's
|
|
630
631
|
* balanceOf(delegate) / transferWithAuthorization verification sees the funded
|
|
@@ -798,7 +799,7 @@ declare const havenTools: {
|
|
|
798
799
|
/**
|
|
799
800
|
* Sign a hash using raw ECDSA (no Ethereum message prefix).
|
|
800
801
|
*
|
|
801
|
-
* This matches what Safe's
|
|
802
|
+
* This matches what the retired Safe AllowanceModule rail's `checkSignature` expected —
|
|
802
803
|
* a direct ecrecover over the hash, NOT the "\x19Ethereum Signed Message" variant.
|
|
803
804
|
*
|
|
804
805
|
* Uses ethers.SigningKey.sign() instead of wallet.signMessage() to avoid the prefix.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as RawPaymentParties, H as HavenClientConfig, P as PaymentRequest, a as PaymentResult, b as PaymentIntent, X as X402PaymentRequired, c as X402AuthorizationOptions, d as X402Intent, e as PaymentStatusResult, f as HavenAgent, g as HavenAgentSummary, S as SweepResult, h as SweepPrepareResponse, i as SweepAuthorization, j as SweepSubmitResponse, k as HavenAllowanceSummary, l as HavenBalanceCoverage, m as PostPurchaseAllowanceSummary, A as AgentPaymentWarning, n as HavenCatalogEntry, o as HavenCatalogSubmission, p as HavenPaymentReceipt, q as HavenPaymentReceiptsPage, r as PaymentResumeState, s as X402Receipt, t as X402Quote, u as X402Erc7710Settlement, v as X402McpCallContext, w as SignData, x as ResumeAuthorizedX402Input, y as ResumeX402PaymentInput, z as X402ResumeState, B as X402McpTransport, C as X402MerchantCallContext, D as HavenError } from './base64-
|
|
2
|
-
export { E as AGENT_PAYMENT_FAILURE_CODE_VALUES, F as AGENT_PAYMENT_NEXT_ACTION_VALUES, G as AGENT_PAYMENT_PHASE_VALUES, I as AGENT_PAYMENT_RAIL_VALUES, J as AgentNextStep, K as AgentPaymentEnumSchema, L as AgentPaymentFailureCode, M as AgentPaymentFailureCodeDescriptions, N as AgentPaymentFailureCodeSchema, O as AgentPaymentNextAction, Q as AgentPaymentNextActionDescriptions, T as AgentPaymentNextActionSchema, U as AgentPaymentPhase, V as AgentPaymentPhaseDescriptions, W as AgentPaymentPhaseSchema, Y as AgentPaymentRail, Z as AgentPaymentRailDescriptions, _ as AgentPaymentRailSchema, $ as AgentPaymentSummary, a0 as AgentPaymentWarningCode, a1 as AgentPurchaseSummary, a2 as CONNECTOR_PACKAGE_NAME, a3 as CatalogSubmissionAccepted, a4 as DEFAULT_CONFIRMATION_TIMEOUT_MS, a5 as DEFAULT_NEXT_TOOL_BY_ACTION, a6 as DIRECT_SIGN_CONTEXT_VERSION, a7 as ENTRY_POINT_V07, a8 as ERC7710_ASSET_TRANSFER_METHOD, a9 as HAVEN_CONNECTOR_CHANNEL, aa as HAVEN_MINIMUM_NODE_VERSION, ab as HYBRID_DELEGATOR_DOMAIN_NAME, ac as HYBRID_DELEGATOR_DOMAIN_VERSION, ad as HavenAgentAllowanceSummary, ae as HavenAgentReadiness, af as HavenAllowance, ag as HavenApiError, ah as HavenCatalogMerchant, ai as HavenListScope, aj as HavenPaymentStateError, ak as HavenSigningError, al as HavenTimeoutError, am as HavenUnsupportedSignerVersionError, an as HavenUserOpBindingError, ao as HavenZeroSettlementHashError, ap as MachinePaymentRail, aq as MerchantTimeoutError, ar as NEXT_TOOL_SERVER_NAMES, as as NEXT_TOOL_SERVER_ROLES, at as NextStep, au as NextStepArguments, av as NextStepHandoff, aw as NextStepInput, ax as NextStepTarget, ay as NextStepTargets, az as NextToolServerRole, aA as PACKED_USER_OPERATION_FIELDS, aB as PaymentFee, aC as PaymentNextAction, aD as PaymentPhase, aE as PaymentStatus, aF as SIGNER_UPDATE_FALLBACK, aG as SWEEP_BASE_CHAIN_ID, aH as SWEEP_BASE_SEPOLIA_CHAIN_ID, aI as SWEEP_BASE_SEPOLIA_USDC_ADDRESS, aJ as SWEEP_BASE_USDC_ADDRESS, aK as SignerRefusalCode, aL as SweepConfirmation, aM as SweepEip712Domain, aN as SweepEntry, aO as SweepExpectedAuth, aP as SweepPreparation, aQ as SweepSubmitResult, aR as SweepTypedData, aS as TRANSFER_WITH_AUTHORIZATION_TYPES, aT as UnsupportedNodeVersionMessageOptions, aU as X402AlreadySettledError, aV as X402ExpectedAuth, aW as X402ExpectedContext, aX as X402PaymentHeaderContext, aY as X402PaymentHeaderValidationError, aZ as X402PaymentOption, a_ as X402RequestSnapshot, a$ as X402SchemeSelection, b0 as X402UnexpectedStatusError, b1 as X402_LEGACY_PAYMENT_HEADER_NAME, b2 as X402_MAX_AUTHORIZATION_WINDOW_SECONDS, b3 as X402_PAYMENT_HEADER_NAME, b4 as X402_PAYMENT_HEADER_NAMES_SENT, b5 as X402_PAYMENT_REQUIRED_HEADER_NAME, b6 as X402_PAYMENT_RESPONSE_HEADER_NAME, b7 as X402_SETTLEMENT_FORWARD_MARGIN_SECONDS, b8 as assertUserOpTypedDataBinding, b9 as buildSweepAuthorizationMessage, ba as buildSweepTypedData, bb as buildX402ExpectedMessage, bc as compareNodeVersions, bd as connectorRerunCommand, be as connectorSpec, bf as createNextStepBuilder, bg as decodeBase64Json, bh as decodeBase64Utf8, bi as defaultNextToolFor, bj as encodeBase64Json, bk as encodeBase64Utf8, bl as encodePaymentProof, bm as isConnectorChannel, bn as isErc7710Option, bo as isPackedUserOperationTypedData, bp as isSupportedNodeVersion, bq as isSweepableChain, br as normalizePaymentRequired, bs as packedUserOperationHash, bt as parseNextTool, bu as parsePaymentRequired, bv as parsePaymentRequiredResponse, bw as renderNextTool, bx as resolveConnectorChannel, by as resolveTokenFromAddress, bz as selectErc7710PaymentOption, bA as selectPaymentOption, bB as selectStandardPaymentOption, bC as selectX402SettlementScheme, bD as signerUpdateFallback, bE as sweepUsdcAddress, bF as sweepUsdcDomain, bG as toStandardPaymentRequirements, bH as unsupportedNodeVersionMessage, bI as validateStandardX402PaymentHeader, bJ as x402AssetTransferMethod, bK as x402AuthorizationAmount, bL as x402FacilitatorAddresses, bM as x402V2PaymentEnvelope } from './base64-
|
|
1
|
+
import { R as RawPaymentParties, H as HavenClientConfig, P as PaymentRequest, a as PaymentResult, b as PaymentIntent, X as X402PaymentRequired, c as X402AuthorizationOptions, d as X402Intent, e as PaymentStatusResult, f as HavenAgent, g as HavenAgentSummary, S as SweepResult, h as SweepPrepareResponse, i as SweepAuthorization, j as SweepSubmitResponse, k as HavenAllowanceSummary, l as HavenBalanceCoverage, m as PostPurchaseAllowanceSummary, A as AgentPaymentWarning, n as HavenCatalogEntry, o as HavenCatalogSubmission, p as HavenPaymentReceipt, q as HavenPaymentReceiptsPage, r as PaymentResumeState, s as X402Receipt, t as X402Quote, u as X402Erc7710Settlement, v as X402McpCallContext, w as SignData, x as ResumeAuthorizedX402Input, y as ResumeX402PaymentInput, z as X402ResumeState, B as X402McpTransport, C as X402MerchantCallContext, D as HavenError } from './base64-CPxbmyU9.js';
|
|
2
|
+
export { E as AGENT_PAYMENT_FAILURE_CODE_VALUES, F as AGENT_PAYMENT_NEXT_ACTION_VALUES, G as AGENT_PAYMENT_PHASE_VALUES, I as AGENT_PAYMENT_RAIL_VALUES, J as AgentNextStep, K as AgentPaymentEnumSchema, L as AgentPaymentFailureCode, M as AgentPaymentFailureCodeDescriptions, N as AgentPaymentFailureCodeSchema, O as AgentPaymentNextAction, Q as AgentPaymentNextActionDescriptions, T as AgentPaymentNextActionSchema, U as AgentPaymentPhase, V as AgentPaymentPhaseDescriptions, W as AgentPaymentPhaseSchema, Y as AgentPaymentRail, Z as AgentPaymentRailDescriptions, _ as AgentPaymentRailSchema, $ as AgentPaymentSummary, a0 as AgentPaymentWarningCode, a1 as AgentPurchaseSummary, a2 as CONNECTOR_PACKAGE_NAME, a3 as CatalogSubmissionAccepted, a4 as DEFAULT_CONFIRMATION_TIMEOUT_MS, a5 as DEFAULT_NEXT_TOOL_BY_ACTION, a6 as DIRECT_SIGN_CONTEXT_VERSION, a7 as ENTRY_POINT_V07, a8 as ERC7710_ASSET_TRANSFER_METHOD, a9 as HAVEN_CONNECTOR_CHANNEL, aa as HAVEN_MINIMUM_NODE_VERSION, ab as HYBRID_DELEGATOR_DOMAIN_NAME, ac as HYBRID_DELEGATOR_DOMAIN_VERSION, ad as HavenAgentAllowanceSummary, ae as HavenAgentReadiness, af as HavenAllowance, ag as HavenApiError, ah as HavenCatalogMerchant, ai as HavenListScope, aj as HavenPaymentStateError, ak as HavenSigningError, al as HavenTimeoutError, am as HavenUnsupportedSignerVersionError, an as HavenUserOpBindingError, ao as HavenZeroSettlementHashError, ap as MachinePaymentRail, aq as MerchantTimeoutError, ar as NEXT_TOOL_SERVER_NAMES, as as NEXT_TOOL_SERVER_ROLES, at as NextStep, au as NextStepArguments, av as NextStepHandoff, aw as NextStepInput, ax as NextStepTarget, ay as NextStepTargets, az as NextToolServerRole, aA as PACKED_USER_OPERATION_FIELDS, aB as PaymentFee, aC as PaymentNextAction, aD as PaymentPhase, aE as PaymentStatus, aF as SIGNER_UPDATE_FALLBACK, aG as SWEEP_BASE_CHAIN_ID, aH as SWEEP_BASE_SEPOLIA_CHAIN_ID, aI as SWEEP_BASE_SEPOLIA_USDC_ADDRESS, aJ as SWEEP_BASE_USDC_ADDRESS, aK as SignerRefusalCode, aL as SweepConfirmation, aM as SweepEip712Domain, aN as SweepEntry, aO as SweepExpectedAuth, aP as SweepPreparation, aQ as SweepSubmitResult, aR as SweepTypedData, aS as TRANSFER_WITH_AUTHORIZATION_TYPES, aT as UnsupportedNodeVersionMessageOptions, aU as X402AlreadySettledError, aV as X402ExpectedAuth, aW as X402ExpectedContext, aX as X402PaymentHeaderContext, aY as X402PaymentHeaderValidationError, aZ as X402PaymentOption, a_ as X402RequestSnapshot, a$ as X402SchemeSelection, b0 as X402UnexpectedStatusError, b1 as X402_LEGACY_PAYMENT_HEADER_NAME, b2 as X402_MAX_AUTHORIZATION_WINDOW_SECONDS, b3 as X402_PAYMENT_HEADER_NAME, b4 as X402_PAYMENT_HEADER_NAMES_SENT, b5 as X402_PAYMENT_REQUIRED_HEADER_NAME, b6 as X402_PAYMENT_RESPONSE_HEADER_NAME, b7 as X402_SETTLEMENT_FORWARD_MARGIN_SECONDS, b8 as assertUserOpTypedDataBinding, b9 as buildSweepAuthorizationMessage, ba as buildSweepTypedData, bb as buildX402ExpectedMessage, bc as compareNodeVersions, bd as connectorRerunCommand, be as connectorSpec, bf as createNextStepBuilder, bg as decodeBase64Json, bh as decodeBase64Utf8, bi as defaultNextToolFor, bj as encodeBase64Json, bk as encodeBase64Utf8, bl as encodePaymentProof, bm as isConnectorChannel, bn as isErc7710Option, bo as isPackedUserOperationTypedData, bp as isSupportedNodeVersion, bq as isSweepableChain, br as normalizePaymentRequired, bs as packedUserOperationHash, bt as parseNextTool, bu as parsePaymentRequired, bv as parsePaymentRequiredResponse, bw as renderNextTool, bx as resolveConnectorChannel, by as resolveTokenFromAddress, bz as selectErc7710PaymentOption, bA as selectPaymentOption, bB as selectStandardPaymentOption, bC as selectX402SettlementScheme, bD as signerUpdateFallback, bE as sweepUsdcAddress, bF as sweepUsdcDomain, bG as toStandardPaymentRequirements, bH as unsupportedNodeVersionMessage, bI as validateStandardX402PaymentHeader, bJ as x402AssetTransferMethod, bK as x402AuthorizationAmount, bL as x402FacilitatorAddresses, bM as x402V2PaymentEnvelope } from './base64-CPxbmyU9.js';
|
|
3
3
|
import 'x402/types';
|
|
4
4
|
import 'viem';
|
|
5
5
|
|
|
@@ -262,11 +262,12 @@ declare class HavenClient {
|
|
|
262
262
|
*/
|
|
263
263
|
getAgentSummary(): Promise<HavenAgentSummary>;
|
|
264
264
|
/**
|
|
265
|
-
* Sweep stranded USDC and ETH from the delegate EOA back to the
|
|
265
|
+
* Sweep stranded USDC and ETH from the delegate EOA back to the agent's Haven account.
|
|
266
266
|
*
|
|
267
267
|
* The delegate key held by this client signs and submits the transfer transactions
|
|
268
268
|
* directly — Haven's backend never handles the key or constructs signed txs
|
|
269
|
-
* (CASP/MiCA Red Line #2). Funds always go to the
|
|
269
|
+
* (CASP/MiCA Red Line #2). Funds always go to the Haven account linked to this agent
|
|
270
|
+
* (`accountAddress` from `getAgent()`).
|
|
270
271
|
*
|
|
271
272
|
* Requires `chainRpcs` to be set for the agent's chain in `HavenClientConfig`.
|
|
272
273
|
*/
|
|
@@ -624,7 +625,7 @@ declare class HavenClient {
|
|
|
624
625
|
* collapses an SSE JSON-RPC response to its `result`.
|
|
625
626
|
*/
|
|
626
627
|
/**
|
|
627
|
-
* Wait for a payment's
|
|
628
|
+
* Wait for a payment's account→delegate funding tx to reach ≥1 on-chain
|
|
628
629
|
* confirmation. The hosted x402 completion path MUST call this after funding
|
|
629
630
|
* and before delivering the merchant payment header, so the merchant's
|
|
630
631
|
* balanceOf(delegate) / transferWithAuthorization verification sees the funded
|
|
@@ -798,7 +799,7 @@ declare const havenTools: {
|
|
|
798
799
|
/**
|
|
799
800
|
* Sign a hash using raw ECDSA (no Ethereum message prefix).
|
|
800
801
|
*
|
|
801
|
-
* This matches what Safe's
|
|
802
|
+
* This matches what the retired Safe AllowanceModule rail's `checkSignature` expected —
|
|
802
803
|
* a direct ecrecover over the hash, NOT the "\x19Ethereum Signed Message" variant.
|
|
803
804
|
*
|
|
804
805
|
* Uses ethers.SigningKey.sign() instead of wallet.signMessage() to avoid the prefix.
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { HavenSigningError, HavenError, DEFAULT_CONFIRMATION_TIMEOUT_MS, selectStandardPaymentOption, HavenApiError, buildX402IdempotencyKey, x402AuthorizationAmount, assertUserOpTypedDataBinding, AgentPaymentRail, AgentPaymentPhase, HavenTimeoutError, X402UnexpectedStatusError, parsePaymentRequiredResponse, X402AlreadySettledError, x402PaymentHeaderNamesSent, AgentPaymentWarningCode, resolveTokenFromAddress, isSweepableChain, sweepUsdcAddress, MerchantTimeoutError, x402PaymentHeaderNamesFor, X402_PAYMENT_HEADER_NAMES, AgentPaymentNextAction, toStandardPaymentRequirements, decodeBase64Json, encodeBase64Json, x402V2PaymentEnvelope, HavenPaymentStateError, HavenZeroSettlementHashError, selectX402SettlementScheme, selectErc7710PaymentOption, isErc7710Option, x402AssetTransferMethod, normalizePaymentRequired } from './chunk-
|
|
2
|
-
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, CONNECTOR_PACKAGE_NAME, DEFAULT_CONFIRMATION_TIMEOUT_MS, DEFAULT_NEXT_TOOL_BY_ACTION, DIRECT_SIGN_CONTEXT_VERSION, ENTRY_POINT_V07, ERC7710_ASSET_TRANSFER_METHOD, HAVEN_CONNECTOR_CHANNEL, HAVEN_MINIMUM_NODE_VERSION, HYBRID_DELEGATOR_DOMAIN_NAME, HYBRID_DELEGATOR_DOMAIN_VERSION, HavenApiError, HavenError, HavenPaymentStateError, HavenSigningError, HavenTimeoutError, HavenUnsupportedSignerVersionError, HavenUserOpBindingError, HavenZeroSettlementHashError, MerchantTimeoutError, NEXT_TOOL_SERVER_NAMES, NEXT_TOOL_SERVER_ROLES, PACKED_USER_OPERATION_FIELDS, SIGNER_UPDATE_FALLBACK, SWEEP_BASE_CHAIN_ID, SWEEP_BASE_SEPOLIA_CHAIN_ID, SWEEP_BASE_SEPOLIA_USDC_ADDRESS, SWEEP_BASE_USDC_ADDRESS, SignerRefusalCode, TRANSFER_WITH_AUTHORIZATION_TYPES, X402AlreadySettledError, X402PaymentHeaderValidationError, X402UnexpectedStatusError, X402_LEGACY_PAYMENT_HEADER_NAME, X402_MAX_AUTHORIZATION_WINDOW_SECONDS, X402_PAYMENT_HEADER_NAME, X402_PAYMENT_HEADER_NAMES_SENT, X402_PAYMENT_REQUIRED_HEADER_NAME, X402_PAYMENT_RESPONSE_HEADER_NAME, X402_SETTLEMENT_FORWARD_MARGIN_SECONDS, assertUserOpTypedDataBinding, buildSweepAuthorizationMessage, buildSweepTypedData, buildX402ExpectedMessage, compareNodeVersions, connectorRerunCommand, connectorSpec, createNextStepBuilder, decodeBase64Json, decodeBase64Utf8, defaultNextToolFor, encodeBase64Json, encodeBase64Utf8, encodePaymentProof, isConnectorChannel, isErc7710Option, isPackedUserOperationTypedData, isSupportedNodeVersion, isSweepableChain, normalizePaymentRequired, packedUserOperationHash, parseNextTool, parsePaymentRequired, parsePaymentRequiredResponse, renderNextTool, resolveConnectorChannel, resolveTokenFromAddress, selectErc7710PaymentOption, selectPaymentOption, selectStandardPaymentOption, selectX402SettlementScheme, signerUpdateFallback, sweepUsdcAddress, sweepUsdcDomain, toStandardPaymentRequirements, unsupportedNodeVersionMessage, validateStandardX402PaymentHeader, x402AssetTransferMethod, x402AuthorizationAmount, x402FacilitatorAddresses, x402V2PaymentEnvelope } from './chunk-
|
|
1
|
+
import { HavenSigningError, HavenError, DEFAULT_CONFIRMATION_TIMEOUT_MS, selectStandardPaymentOption, HavenApiError, buildX402IdempotencyKey, x402AuthorizationAmount, assertUserOpTypedDataBinding, AgentPaymentRail, AgentPaymentPhase, HavenTimeoutError, X402UnexpectedStatusError, parsePaymentRequiredResponse, X402AlreadySettledError, x402PaymentHeaderNamesSent, AgentPaymentWarningCode, resolveTokenFromAddress, isSweepableChain, sweepUsdcAddress, MerchantTimeoutError, x402PaymentHeaderNamesFor, X402_PAYMENT_HEADER_NAMES, AgentPaymentNextAction, toStandardPaymentRequirements, decodeBase64Json, encodeBase64Json, x402V2PaymentEnvelope, HavenPaymentStateError, HavenZeroSettlementHashError, selectX402SettlementScheme, selectErc7710PaymentOption, isErc7710Option, x402AssetTransferMethod, normalizePaymentRequired } from './chunk-FR5R26V3.js';
|
|
2
|
+
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, CONNECTOR_PACKAGE_NAME, DEFAULT_CONFIRMATION_TIMEOUT_MS, DEFAULT_NEXT_TOOL_BY_ACTION, DIRECT_SIGN_CONTEXT_VERSION, ENTRY_POINT_V07, ERC7710_ASSET_TRANSFER_METHOD, HAVEN_CONNECTOR_CHANNEL, HAVEN_MINIMUM_NODE_VERSION, HYBRID_DELEGATOR_DOMAIN_NAME, HYBRID_DELEGATOR_DOMAIN_VERSION, HavenApiError, HavenError, HavenPaymentStateError, HavenSigningError, HavenTimeoutError, HavenUnsupportedSignerVersionError, HavenUserOpBindingError, HavenZeroSettlementHashError, MerchantTimeoutError, NEXT_TOOL_SERVER_NAMES, NEXT_TOOL_SERVER_ROLES, PACKED_USER_OPERATION_FIELDS, SIGNER_UPDATE_FALLBACK, SWEEP_BASE_CHAIN_ID, SWEEP_BASE_SEPOLIA_CHAIN_ID, SWEEP_BASE_SEPOLIA_USDC_ADDRESS, SWEEP_BASE_USDC_ADDRESS, SignerRefusalCode, TRANSFER_WITH_AUTHORIZATION_TYPES, X402AlreadySettledError, X402PaymentHeaderValidationError, X402UnexpectedStatusError, X402_LEGACY_PAYMENT_HEADER_NAME, X402_MAX_AUTHORIZATION_WINDOW_SECONDS, X402_PAYMENT_HEADER_NAME, X402_PAYMENT_HEADER_NAMES_SENT, X402_PAYMENT_REQUIRED_HEADER_NAME, X402_PAYMENT_RESPONSE_HEADER_NAME, X402_SETTLEMENT_FORWARD_MARGIN_SECONDS, assertUserOpTypedDataBinding, buildSweepAuthorizationMessage, buildSweepTypedData, buildX402ExpectedMessage, compareNodeVersions, connectorRerunCommand, connectorSpec, createNextStepBuilder, decodeBase64Json, decodeBase64Utf8, defaultNextToolFor, encodeBase64Json, encodeBase64Utf8, encodePaymentProof, isConnectorChannel, isErc7710Option, isPackedUserOperationTypedData, isSupportedNodeVersion, isSweepableChain, normalizePaymentRequired, packedUserOperationHash, parseNextTool, parsePaymentRequired, parsePaymentRequiredResponse, renderNextTool, resolveConnectorChannel, resolveTokenFromAddress, selectErc7710PaymentOption, selectPaymentOption, selectStandardPaymentOption, selectX402SettlementScheme, signerUpdateFallback, sweepUsdcAddress, sweepUsdcDomain, toStandardPaymentRequirements, unsupportedNodeVersionMessage, validateStandardX402PaymentHeader, x402AssetTransferMethod, x402AuthorizationAmount, x402FacilitatorAddresses, x402V2PaymentEnvelope } from './chunk-FR5R26V3.js';
|
|
3
3
|
import { hashTypedData } from 'viem';
|
|
4
4
|
import { ethers } from 'ethers';
|
|
5
5
|
import { AsyncLocalStorage } from 'async_hooks';
|
|
@@ -2653,11 +2653,12 @@ var HavenClient = class {
|
|
|
2653
2653
|
return this.accountReads.getAgentSummary();
|
|
2654
2654
|
}
|
|
2655
2655
|
/**
|
|
2656
|
-
* Sweep stranded USDC and ETH from the delegate EOA back to the
|
|
2656
|
+
* Sweep stranded USDC and ETH from the delegate EOA back to the agent's Haven account.
|
|
2657
2657
|
*
|
|
2658
2658
|
* The delegate key held by this client signs and submits the transfer transactions
|
|
2659
2659
|
* directly — Haven's backend never handles the key or constructs signed txs
|
|
2660
|
-
* (CASP/MiCA Red Line #2). Funds always go to the
|
|
2660
|
+
* (CASP/MiCA Red Line #2). Funds always go to the Haven account linked to this agent
|
|
2661
|
+
* (`accountAddress` from `getAgent()`).
|
|
2661
2662
|
*
|
|
2662
2663
|
* Requires `chainRpcs` to be set for the agent's chain in `HavenClientConfig`.
|
|
2663
2664
|
*/
|
|
@@ -3207,7 +3208,7 @@ var HavenClient = class {
|
|
|
3207
3208
|
* collapses an SSE JSON-RPC response to its `result`.
|
|
3208
3209
|
*/
|
|
3209
3210
|
/**
|
|
3210
|
-
* Wait for a payment's
|
|
3211
|
+
* Wait for a payment's account→delegate funding tx to reach ≥1 on-chain
|
|
3211
3212
|
* confirmation. The hosted x402 completion path MUST call this after funding
|
|
3212
3213
|
* and before delivering the merchant payment header, so the merchant's
|
|
3213
3214
|
* balanceOf(delegate) / transferWithAuthorization verification sees the funded
|