@haven_ai/sdk 0.1.30-alpha.0 → 0.1.32-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +110 -91
- package/dist/index.cjs +175 -109
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +127 -37
- package/dist/index.d.ts +127 -37
- package/dist/index.js +175 -109
- package/dist/index.js.map +1 -1
- package/examples/mcp-x402-sse.ts +2 -2
- package/examples/x402_openapi_python.py +8 -3
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -442,6 +442,17 @@ interface X402Quote {
|
|
|
442
442
|
idempotencyKey: string;
|
|
443
443
|
paymentRequired: X402PaymentRequired;
|
|
444
444
|
accepted: X402PaymentOption;
|
|
445
|
+
/**
|
|
446
|
+
* #2054: which selector produced `accepted`, and therefore which entry every
|
|
447
|
+
* amount on this quote describes. `'standard'` is the untagged,
|
|
448
|
+
* EIP-3009-settleable entry; `'erc7710'` means the merchant advertises NO
|
|
449
|
+
* standard entry, so the quote describes its erc7710 one — settleable only
|
|
450
|
+
* from a delegation-rail account, a fact the quote layer cannot see (the
|
|
451
|
+
* rail is a property of the ACCOUNT, not of the 402). This field is
|
|
452
|
+
* descriptive: the actual settlement scheme is still chosen later, with the
|
|
453
|
+
* rail in hand, by `selectX402SettlementScheme`.
|
|
454
|
+
*/
|
|
455
|
+
acceptedScheme: 'standard' | 'erc7710';
|
|
445
456
|
request: X402RequestSnapshot;
|
|
446
457
|
mcpTransport?: X402McpTransport;
|
|
447
458
|
resourceUrl: string;
|
|
@@ -762,33 +773,40 @@ declare const AgentPaymentPhase: {
|
|
|
762
773
|
readonly PaymentSubmitted: "payment_submitted";
|
|
763
774
|
/** The direct payment is confirmed; the agent does not need to do more for this payment id. */
|
|
764
775
|
readonly PaymentConfirmed: "payment_confirmed";
|
|
765
|
-
/**
|
|
776
|
+
/**
|
|
777
|
+
* #2115: RETIRED wire value — no live rail produces it. It described the
|
|
778
|
+
* Safe rail's approval queue, which no longer exists. Kept so a stored value
|
|
779
|
+
* still typechecks; see `AgentPaymentPhaseDescriptions` below for the
|
|
780
|
+
* agent-visible wording, which this comment used to contradict.
|
|
781
|
+
*/
|
|
766
782
|
readonly UserApprovalRequired: "user_approval_required";
|
|
767
|
-
/**
|
|
783
|
+
/** #2115: RETIRED wire value — no live rail produces it. Stop and tell the user. */
|
|
768
784
|
readonly UserExecutionRequired: "user_execution_required";
|
|
769
|
-
/**
|
|
785
|
+
/** #2115: RETIRED wire value — no live rail produces it. Stop and tell the user. */
|
|
770
786
|
readonly WaitingForAdditionalApprovals: "waiting_for_additional_approvals";
|
|
771
787
|
/** The Haven funding leg was sent; the agent can continue the merchant/protocol leg. */
|
|
772
788
|
readonly FundingSent: "funding_sent";
|
|
773
|
-
/** The
|
|
789
|
+
/** The payment was rejected and cannot proceed; the agent should stop and tell the user. */
|
|
774
790
|
readonly Rejected: "rejected";
|
|
775
|
-
/** The payment
|
|
791
|
+
/** The payment expired before completion. */
|
|
776
792
|
readonly Expired: "expired";
|
|
777
793
|
/** Haven could not complete the payment; the agent should stop and surface the failure. */
|
|
778
794
|
readonly Failed: "failed";
|
|
779
795
|
/**
|
|
780
796
|
* Pre-flight check determined the delegate's existing balance plus the
|
|
781
|
-
* remaining on-chain
|
|
782
|
-
* payment intent was created.
|
|
783
|
-
*
|
|
784
|
-
*
|
|
797
|
+
* remaining on-chain budget cannot cover the requested amount, so no
|
|
798
|
+
* payment intent was created. The account must be funded or the agent's
|
|
799
|
+
* budget raised before retrying — #2115: the old wording contrasted this
|
|
800
|
+
* with `UserApprovalRequired` as if that were a live alternative, and named
|
|
801
|
+
* the retired rail's Safe and per-token allowance as the fix.
|
|
785
802
|
*/
|
|
786
803
|
readonly InsufficientFunds: "insufficient_funds";
|
|
787
804
|
/**
|
|
788
|
-
* Haven's funding leg (
|
|
789
|
-
* merchant rejected the x402 retry. The delegate
|
|
790
|
-
* USDC that was never settled to the merchant. The
|
|
791
|
-
* the user, and wait for the sweep flow to reclaim
|
|
805
|
+
* Haven's funding leg (account → delegate, the #946 EIP-3009 bridge)
|
|
806
|
+
* confirmed on-chain, but the merchant rejected the x402 retry. The delegate
|
|
807
|
+
* wallet may hold stranded USDC that was never settled to the merchant. The
|
|
808
|
+
* agent should stop, tell the user, and wait for the sweep flow to reclaim
|
|
809
|
+
* the funds.
|
|
792
810
|
*/
|
|
793
811
|
readonly FundedButUnsettled: "funded_but_unsettled";
|
|
794
812
|
};
|
|
@@ -800,9 +818,12 @@ declare const AgentPaymentNextAction: {
|
|
|
800
818
|
readonly CheckStatusLater: "check_status_later";
|
|
801
819
|
/** No further agent action is required for this payment id. */
|
|
802
820
|
readonly None: "none";
|
|
803
|
-
/**
|
|
821
|
+
/**
|
|
822
|
+
* #2115: RETIRED wire value — no live rail produces it and nothing maps to
|
|
823
|
+
* it. Stop and tell the user rather than polling; no approval will arrive.
|
|
824
|
+
*/
|
|
804
825
|
readonly WaitForUserApproval: "wait_for_user_approval";
|
|
805
|
-
/**
|
|
826
|
+
/** #2115: RETIRED wire value — no live rail produces it. Stop and tell the user rather than polling. */
|
|
806
827
|
readonly WaitForUserToCompletePayment: "wait_for_user_to_complete_payment";
|
|
807
828
|
/** Resume this payment id and retry the original x402 request with the merchant payment header. */
|
|
808
829
|
readonly RetryOriginalX402Request: "retry_original_x402_request";
|
|
@@ -1070,14 +1091,6 @@ interface PaymentStatusResult {
|
|
|
1070
1091
|
challengeId: string | null;
|
|
1071
1092
|
};
|
|
1072
1093
|
}
|
|
1073
|
-
interface PendingApproval extends PaymentStatusResult {
|
|
1074
|
-
kind: 'approval_request';
|
|
1075
|
-
status: 'pending_approval' | 'pending' | string;
|
|
1076
|
-
phase: typeof AgentPaymentPhase.UserApprovalRequired;
|
|
1077
|
-
nextAction: typeof AgentPaymentNextAction.WaitForUserApproval;
|
|
1078
|
-
requested?: string;
|
|
1079
|
-
remaining?: string | null;
|
|
1080
|
-
}
|
|
1081
1094
|
/**
|
|
1082
1095
|
* Result of an erc7710 direct settlement (#1454).
|
|
1083
1096
|
*
|
|
@@ -1100,7 +1113,7 @@ interface X402Erc7710Settlement {
|
|
|
1100
1113
|
facilitatorAddresses: string[] | null;
|
|
1101
1114
|
}
|
|
1102
1115
|
/** @internal */
|
|
1103
|
-
/** One payable service in Haven's
|
|
1116
|
+
/** One payable service in Haven's merchant catalog (epic #1717). */
|
|
1104
1117
|
interface HavenCatalogEntry {
|
|
1105
1118
|
id: string;
|
|
1106
1119
|
name: string;
|
|
@@ -1117,6 +1130,29 @@ interface HavenCatalogEntry {
|
|
|
1117
1130
|
network: string | null;
|
|
1118
1131
|
status: 'active' | 'degraded' | 'delisted';
|
|
1119
1132
|
verifiedAt: string | null;
|
|
1133
|
+
/**
|
|
1134
|
+
* Where the entry came from. `operator` = curated in migrations/scripts
|
|
1135
|
+
* (the operator vouches; no verification badges). `ingestion` = submitted
|
|
1136
|
+
* through the Verified Payable Directory and passed domain-ownership proof
|
|
1137
|
+
* plus the read-only quote probe.
|
|
1138
|
+
*/
|
|
1139
|
+
source: 'operator' | 'ingestion';
|
|
1140
|
+
/** True only for `ingestion` entries. See the epic's trust claim (never merchant honesty or quality). */
|
|
1141
|
+
domainVerified: boolean;
|
|
1142
|
+
verifiedPayable: boolean;
|
|
1143
|
+
}
|
|
1144
|
+
/** @internal */
|
|
1145
|
+
/** Wire shape of POST /catalog/submit (#1717, #1716). */
|
|
1146
|
+
interface CatalogSubmissionAccepted {
|
|
1147
|
+
id: string;
|
|
1148
|
+
verify_token: string;
|
|
1149
|
+
status: 'submitted' | 'ownership_verified' | 'verified_payable';
|
|
1150
|
+
}
|
|
1151
|
+
/** @internal Client-facing submission handle. */
|
|
1152
|
+
interface HavenCatalogSubmission {
|
|
1153
|
+
id: string;
|
|
1154
|
+
verifyToken: string;
|
|
1155
|
+
status: 'submitted' | 'ownership_verified' | 'verified_payable';
|
|
1120
1156
|
}
|
|
1121
1157
|
declare class HavenError extends Error {
|
|
1122
1158
|
readonly code: string;
|
|
@@ -1635,7 +1671,7 @@ declare class HavenClient {
|
|
|
1635
1671
|
warnings?: AgentPaymentWarning[];
|
|
1636
1672
|
}>;
|
|
1637
1673
|
/**
|
|
1638
|
-
* Discover payable services from Haven's
|
|
1674
|
+
* Discover payable services from Haven's merchant catalog (epic #1717).
|
|
1639
1675
|
*
|
|
1640
1676
|
* Read-only: returns catalog entries (price, rail, protocol) so an agent
|
|
1641
1677
|
* can choose a service and pay it with the regular payment tools in the
|
|
@@ -1645,7 +1681,49 @@ declare class HavenClient {
|
|
|
1645
1681
|
category?: string;
|
|
1646
1682
|
search?: string;
|
|
1647
1683
|
rail?: 'x402' | 'mpp';
|
|
1684
|
+
/**
|
|
1685
|
+
* Filter on the entry's provenance (epic #1717): `'verified'` returns
|
|
1686
|
+
* only self-submitted, domain-verified, probe-verified directory
|
|
1687
|
+
* entries; `'operator'` only the operator-curated ones; `'any'` (the
|
|
1688
|
+
* default) returns the merged listing.
|
|
1689
|
+
*/
|
|
1690
|
+
verified?: 'any' | 'verified' | 'operator';
|
|
1648
1691
|
}): Promise<HavenCatalogEntry[]>;
|
|
1692
|
+
/**
|
|
1693
|
+
* Submit a merchant's payable (x402/MCP) endpoint to the Verified Payable
|
|
1694
|
+
* Directory (epic #1717, #1716). Queue-only: writes a submission row and
|
|
1695
|
+
* returns the id + verify_token. The request path makes no outbound
|
|
1696
|
+
* request; domain-ownership proof and the read-only quote probe run later
|
|
1697
|
+
* on the leader-locked monitor. Ownership proof is ALWAYS required before
|
|
1698
|
+
* any listing — this method cannot skip it. `website` is a honeypot field
|
|
1699
|
+
* that bots fill; leave it unset.
|
|
1700
|
+
*/
|
|
1701
|
+
submitCatalogEntry(resourceUrl: string, options?: {
|
|
1702
|
+
website?: string;
|
|
1703
|
+
}): Promise<HavenCatalogSubmission>;
|
|
1704
|
+
/**
|
|
1705
|
+
* Fetch one submission's coarse status by id (epic #1717, #1716). Public
|
|
1706
|
+
* and read-only. While the submission can still prove ownership the
|
|
1707
|
+
* response carries the exact well-known / DNS-TXT `instructions`; the
|
|
1708
|
+
* verify token is never returned here.
|
|
1709
|
+
*/
|
|
1710
|
+
getCatalogSubmissionStatus(id: string): Promise<{
|
|
1711
|
+
id: string;
|
|
1712
|
+
status: 'submitted' | 'ownership_verified' | 'verified_payable' | 'failed' | 'delisted';
|
|
1713
|
+
instructions?: {
|
|
1714
|
+
expires_at: string;
|
|
1715
|
+
well_known: {
|
|
1716
|
+
url: string;
|
|
1717
|
+
content: string;
|
|
1718
|
+
instruction: string;
|
|
1719
|
+
};
|
|
1720
|
+
dns_txt: {
|
|
1721
|
+
name: string;
|
|
1722
|
+
value: string;
|
|
1723
|
+
instruction: string;
|
|
1724
|
+
};
|
|
1725
|
+
} | null;
|
|
1726
|
+
}>;
|
|
1649
1727
|
/**
|
|
1650
1728
|
* Fetch one curated catalog entry by id (#1306).
|
|
1651
1729
|
*
|
|
@@ -1751,6 +1829,12 @@ declare class HavenClient {
|
|
|
1751
1829
|
* (#1307).
|
|
1752
1830
|
*/
|
|
1753
1831
|
mcpCallContext?: X402McpCallContext;
|
|
1832
|
+
/**
|
|
1833
|
+
* #2041: replay key, as `createX402Intent` already takes one. Without it
|
|
1834
|
+
* a retried authorize mints a second signable settlement child instead
|
|
1835
|
+
* of replaying the first.
|
|
1836
|
+
*/
|
|
1837
|
+
idempotencyKey?: string;
|
|
1754
1838
|
}): Promise<{
|
|
1755
1839
|
paymentId: string;
|
|
1756
1840
|
signData: SignData;
|
|
@@ -2005,7 +2089,7 @@ interface ToolDescription {
|
|
|
2005
2089
|
/** Concrete behaviour the tool performs end-to-end, including which
|
|
2006
2090
|
* non-custodial guarantee applies. */
|
|
2007
2091
|
behavior: string;
|
|
2008
|
-
/** What the agent should do next on error /
|
|
2092
|
+
/** What the agent should do next on error / declined states.
|
|
2009
2093
|
* Empty string if not applicable. */
|
|
2010
2094
|
nextActionGuidance: string;
|
|
2011
2095
|
}
|
|
@@ -2023,40 +2107,40 @@ declare const toolDescriptions: {
|
|
|
2023
2107
|
readonly payX402: {
|
|
2024
2108
|
readonly summary: "Pay an inspected x402 quote. The delegate key signs locally; Haven only validates and relays signed, on-chain-constrained payment transactions.";
|
|
2025
2109
|
readonly selectionGuidance: "Do not use this for read-only allowance, budget, spend-limit, remaining-amount, reset-period, or what-can-I-spend questions; use the allowance lookup tool instead.";
|
|
2026
|
-
readonly behavior: "Signs the
|
|
2110
|
+
readonly behavior: "Signs the payment locally and returns the merchant response. Settlement is either direct account-to-merchant with no funding leg, or a bridge that first redeems the agent's budget delegation to fund the delegate wallet for an EIP-3009 authorization. A payment outside the on-chain budget is declined before any money moves; nothing is queued for a human to approve later.";
|
|
2027
2111
|
readonly nextActionGuidance: string;
|
|
2028
2112
|
};
|
|
2029
2113
|
readonly payX402OneShot: {
|
|
2030
2114
|
readonly summary: "Fetch an x402 paid HTTP resource in a single call. Handles the full probe -> pay -> retry round trip and returns the merchant response.";
|
|
2031
2115
|
readonly selectionGuidance: "Prefer this over the quote+pay split when the agent just wants the paid resource and does not need to inspect the price first. If you already have a quote from haven_quote_x402, use haven_pay_x402_quote instead. Do not use for read-only allowance, budget, spend-limit, remaining-amount, reset-period, or what-can-I-spend questions; use the allowance lookup tool instead.";
|
|
2032
|
-
readonly behavior: "Calls the URL, parses any HTTP 402 x402 challenge, signs the
|
|
2116
|
+
readonly behavior: "Calls the URL, parses any HTTP 402 x402 challenge, signs the payment locally, then retries the original request with the X-PAYMENT header and returns the merchant response. Settlement is either direct account-to-merchant with no funding leg, or a bridge that first redeems the agent's budget delegation to fund the delegate wallet for an EIP-3009 authorization. A payment outside the on-chain budget is declined before any money moves; nothing is queued for a human to approve later. If the resource returns a non-402 status, returns it unchanged without contacting Haven.";
|
|
2033
2117
|
readonly nextActionGuidance: string;
|
|
2034
2118
|
};
|
|
2035
2119
|
readonly resumeX402: {
|
|
2036
|
-
readonly summary: "Resume an x402 payment
|
|
2037
|
-
readonly behavior: "Accepts either resume_state or payment_id, validates the original x402 details against the
|
|
2038
|
-
readonly nextActionGuidance:
|
|
2120
|
+
readonly summary: "Resume an x402 payment whose Haven-side authorization already succeeded but whose merchant retry did not complete.";
|
|
2121
|
+
readonly behavior: "Accepts either resume_state or payment_id, validates the original x402 details against the authorized Haven funding, and retries the merchant request with the X-PAYMENT header. No new Haven payment is created.";
|
|
2122
|
+
readonly nextActionGuidance: string;
|
|
2039
2123
|
};
|
|
2040
2124
|
readonly getPaymentStatus: {
|
|
2041
2125
|
readonly summary: "Fetch structured Haven payment status, including phase and nextAction taxonomy for agent recovery.";
|
|
2042
|
-
readonly behavior: "Accepts a payment intent
|
|
2126
|
+
readonly behavior: "Accepts a payment intent id and returns the full state taxonomy (phase, nextAction, rail, amount, merchant, resource url, idempotency key, message).";
|
|
2043
2127
|
readonly nextActionGuidance: "";
|
|
2044
2128
|
};
|
|
2045
2129
|
readonly getResumeState: {
|
|
2046
2130
|
readonly summary: "Rehydrate stored x402 resume_state by payment_id.";
|
|
2047
|
-
readonly behavior: "Returns the context
|
|
2131
|
+
readonly behavior: "Returns the x402 context the agent originally received when the payment was authorized, reconstructed from Haven's database. This is context only; signing still happens locally when a resume tool is called.";
|
|
2048
2132
|
readonly nextActionGuidance: "";
|
|
2049
2133
|
};
|
|
2050
2134
|
readonly getAgent: {
|
|
2051
2135
|
readonly summary: "Return the authenticated agent identity AND its live spend authority in one call: Haven wallet, delegate, chain, raw status, spend_authority_readiness, and per-token remaining allowance (atomic + human-readable). The recommended first call in a new session to confirm who you are and whether Haven will let you spend right now.";
|
|
2052
2136
|
readonly selectionGuidance: "Use this as the one-shot orientation/bootstrap at the start of a session, or whenever you need to confirm identity together with whether the agent can spend right now. For a detailed per-token breakdown (configured vs spent vs reset window) use haven_get_allowances.";
|
|
2053
|
-
readonly behavior: "Reads identity plus the live spend-authority snapshot in one shot — the on-chain
|
|
2137
|
+
readonly behavior: "Reads identity plus the live spend-authority snapshot in one shot — the agent's active on-chain budget delegation. spend_authority_readiness (readiness is a deprecated alias, same value) is \"ready\" when at least one token has remaining spend authority, \"needs_approval\" when the agent is active but has none, and \"revoked\" when the credential is not active. It covers hosted identity + on-chain spend authority ONLY — the hosted server cannot see the LOCAL signer, so \"ready\" does not mean the signer can start; verify the signer with a signer tool call or connect --doctor. An over-budget payment is declined before any money moves: there is no approval queue, so ask the owner to grant or raise the budget in Haven rather than waiting for an approval. allowances[] carries remainingAtomic and remainingDisplay per token. Identity fields (id, name, status, safeAddress, delegateAddress, chainId) are unchanged from before.";
|
|
2054
2138
|
readonly nextActionGuidance: "";
|
|
2055
2139
|
};
|
|
2056
2140
|
readonly getAllowances: {
|
|
2057
2141
|
readonly summary: "Return configured and on-chain allowance state for the authenticated agent. On-chain allowance is the real spend gate.";
|
|
2058
2142
|
readonly selectionGuidance: "Use this when the user asks about allowance, budget, spend limit, remaining amount, remaining allowance, remaining budget, daily limit, reset period, what can I spend, or what the agent can still spend.";
|
|
2059
|
-
readonly behavior: "Returns the per-token spend authority for the account
|
|
2143
|
+
readonly behavior: "Returns the per-token spend authority for the account: the active budget delegation (remaining = the period budget, which re-arms natively at the period boundary). An over-budget payment is declined before any money moves; nothing queues. Configured amounts from Haven are returned alongside.";
|
|
2060
2144
|
readonly nextActionGuidance: "";
|
|
2061
2145
|
};
|
|
2062
2146
|
readonly listReceipts: {
|
|
@@ -2083,6 +2167,12 @@ declare const toolDescriptions: {
|
|
|
2083
2167
|
readonly behavior: string;
|
|
2084
2168
|
readonly nextActionGuidance: "Pick an entry and pay it with the tool named in suggested_tool, passing the entry's resource_url, tool_name, and tool_arguments for MCP merchants. Confirm the price from the live pay-tool result (not the catalog), and pass the user's cap as max_amount_human in whole tokens (\"no more than 1 USDC\" → max_amount_human: \"1\") — never convert it to atomic units by hand.";
|
|
2085
2169
|
};
|
|
2170
|
+
readonly submitCatalogEntry: {
|
|
2171
|
+
readonly summary: "Submit a merchant's payable (x402/MCP) endpoint to Haven's Verified Payable Directory for verification and listing.";
|
|
2172
|
+
readonly selectionGuidance: string;
|
|
2173
|
+
readonly behavior: string;
|
|
2174
|
+
readonly nextActionGuidance: "Give the verify_token and the well-known instructions (from getCatalogSubmissionStatus) to the merchant so they can publish the proof line, then poll the submission status until it reaches verified_payable or failed.";
|
|
2175
|
+
};
|
|
2086
2176
|
readonly sweep_delegate: {
|
|
2087
2177
|
readonly summary: "Sweep stranded USDC and/or ETH from the delegate wallet back to the originating Safe.";
|
|
2088
2178
|
readonly selectionGuidance: string;
|
|
@@ -2117,7 +2207,7 @@ type SharedToolKey = keyof typeof toolDescriptions;
|
|
|
2117
2207
|
* this canonical string and asserts byte-for-byte equality, so the two copies
|
|
2118
2208
|
* cannot drift.
|
|
2119
2209
|
*/
|
|
2120
|
-
declare const HAVEN_SKILL_MD = "---\nname: haven-pay\ndescription: Pay for things from the user's Haven wallet within their agent rules. Use when the user asks to send, pay, tip, or transfer crypto \u2014 or when a request hits an HTTP 402 (x402) paywall.\n---\n\n# Haven: pay from a Haven wallet\n\nThis skill lets the agent make payments from the user's Haven wallet through\nthe Haven MCP tools. Every payment is checked against the agent's on-chain\nbudget before money moves; payments above the remaining budget wait for the\nuser's approval in Haven.\n\nHosted tools run in the `mcp__haven__` namespace. Local signing tools run in\nthe `mcp__haven-signer__` namespace and keep the delegate key on this machine.\nThat namespacing is Claude-family; other runtimes name the servers by their\nown config keys (Codex: `haven`, `haven_signer`). Tool results carry the\nexact next step (`next_action`, `next_tool`, `next_arguments`, plus the\nruntime-neutral `next_tool_server` + `next_tool_name` \u2014 the bare tool name\non that logical server, whatever your runtime calls it).\nFollow those fields first; the prose below is fallback and orientation, not\nthe source of truth.\n\n## When to use this skill\n\n- The user asks to send money, pay someone, tip, donate, or transfer tokens.\n- A request returns HTTP 402 (x402): use the Haven pay tools to settle it,\n then retry the original request.\n\n## Identity and budget\n\nDo not guess the wallet address, network, or budget.\n\nFor instant orientation at the start of a session, read the non-secret\n`agent.json` the connector wrote to your Haven credential directory (typically\n`~/.haven/agents/<agent-id>/agent.json` \u2014 if you don't know the agent id, list\n`~/.haven/agents/` to find the folder). It\nholds your agent id, Haven wallet address, network, and *configured* per-token\nbudget, and contains no keys \u2014 the fastest way to answer \"who am I and what may\nI spend\" with no round trip. If that file is absent (some setups don't write\nit), use the tools below instead.\n\nBefore any payment, confirm the *live remaining* budget with the tools \u2014\n`agent.json` shows the configured budget, not what is left after recent\nspending:\n\n- `mcp__haven__haven_get_agent` \u2014 the recommended first call: identity\n (wallet, network) plus `spend_authority_readiness` (`ready` / `needs_approval` /\n `revoked`) and live remaining per-token allowance, in one shot. That signal\n covers hosted identity and on-chain spend authority only \u2014 it cannot see the\n local signer; the signer is verified by calling any signer tool.\n- `mcp__haven__haven_get_allowances` \u2014 detailed per-token breakdown\n (configured, spent, reset window) when you need more than the summary.\n\nBudgets reset on a period the user chose. If a payment exceeds the remaining\nbudget it is queued for the user to approve in the Haven dashboard \u2014 this is\nnormal, not an error.\n\n## Paying\n\n**Catalog purchases \u2014 the primary path for MCP merchants:**\n\n1. `mcp__haven__haven_discover_tools` to find a payable service and its\n `catalog_id`.\n2. If the user needs the live price before authorizing a cap, call\n `mcp__haven__haven_quote_catalog_purchase` with `catalog_id`. It is\n read-only and informational only: it never reserves a price or creates a\n payment. Tell the user its `amount` / `amount_atomic`, then choose a cap.\n3. `mcp__haven__haven_prepare_catalog_purchase` with `catalog_id` and a\n spending cap. A cap is REQUIRED on this tool and is best practice on every\n paid call below too \u2014 it caps what the LIVE merchant quote may charge,\n checked before any funding intent is created. Write it the way the user\n said it: `max_amount_human` is whole tokens, so \"no more than 1 USDC\" is\n `max_amount_human: \"1\"`. (`max_amount` is the atomic-unit form, where\n \"1\" means 0.000001 USDC \u2014 do not convert by hand, and never send both.)\n4. Then FOLLOW THE RESPONSE'S GUIDANCE FIELDS: `next_action`, `next_tool`,\n and `next_arguments` name the exact next call \u2014 act on those first; the\n prose in this section is fallback and debugging detail. If the catalog\n entry is missing or degraded, the response instead names\n `mcp__haven__haven_pay_mcp_tool` (merchant URL, tool name, arguments) as\n the manual fallback.\n\n**Signing:** `mcp__haven-signer__haven_sign_x402` with `payment_id` ONLY \u2014\nthe local signer fetches the exact signing bytes AND `payment_required`\nitself, so never relay `typed_data` or the 402 blob yourself. If the signer\nreports its fetched context carried no `payment_required` (older backend),\nre-call with `payment_required` added verbatim. Fallback for an older signer\nor backend: re-run the quote/prepare tool with the SAME `idempotency_key`\nplus `include_signing_payload=true`, then pass `payload_hash`,\n`x402_expected` (the nested `x402.expected` object), and\n`typed_data`/`typed_data_b64` through unchanged.\n\n**Settle:** `mcp__haven__haven_settle_mcp_tool` with `payment_id`,\n`signature`, and `payment_header` ONLY \u2014 Haven rehydrates the merchant call\ncontext (`merchant_url`, `tool_name`, `arguments`, `mcp_transport`)\nserver-side from `payment_id`. Pass those four fields explicitly only as a\nversion-skew fallback when Haven has no stored context for the id \u2014 both or\nnone together, never just one. If the settle result carries `settled: false`,\nfunding is queued for the user's approval \u2014 tell them and check status later,\ndo not re-pay.\n\nStep-by-step alternative (also key-safe; for an older signer or backend, or\nwhen you already have a merchant URL and tool name instead of a\n`catalog_id`): if the user needs the live price before choosing a cap, first\ncall `mcp__haven__haven_quote_mcp_tool` with that merchant URL, tool name,\nand arguments. It is informational only; then call\n`mcp__haven__haven_pay_mcp_tool` with the same inputs and the explicit cap.\nThe paid call always obtains a fresh quote before it creates any intent. Then\ncontinue `mcp__haven__haven_pay_mcp_tool` \u2192\n`mcp__haven-signer__haven_sign` \u2192 `mcp__haven__haven_submit` \u2192\n`mcp__haven-signer__haven_x402_sign_header` \u2192\n`mcp__haven__haven_complete_mcp_tool`. Pass `payment_required`,\n`arguments`, and `mcp_transport` verbatim from the quote/prepare result.\nThe returned `expires_at` is the signing window; if a tool returns\n`PAYMENT_WINDOW_EXPIRED`, re-run the same quote/prepare tool with the same\n`idempotency_key`. Do not call the merchant yourself \u2014 Haven completes the\nmerchant leg for you.\n\n**Direct transfer / non-MCP paywall:** `mcp__haven__haven_pay` with\nrecipient, amount, and token for a plain transfer. For an arbitrary,\nnon-MCP x402 paywall: `mcp__haven__haven_quote_x402` to get a quote, then\n`mcp__haven__haven_pay_x402_quote` \u2014 follow the result's guidance fields\nfirst, sign in the local Haven signer, and retry the original request only\nwhen the result says `retry_original_x402_request`.\n\n**Catalog tool arguments:** when `haven_discover_tools` returns\n`tool_arguments`, pass that object unchanged as the pay tool's\n`arguments` field (for example\n`tool_arguments: { \"tier\": \"50gb\" }` -> `arguments: { \"tier\": \"50gb\" }`).\n\n**Prices:** show the user the live price from a read-only quote or the pay-tool\nresult, never a catalog price. `haven_discover_tools` prices are indicative\n(`price_is_indicative`) and can be stale. A read-only quote is informational\nonly and does not reserve a price; the later paid call re-quotes and enforces\nthe cap. The pay-tool result's `amount` / `amount_atomic` is the amount\nHaven authorizes for that call \u2014 a ceiling the merchant settles at or below \u2014\nso present it as the most the user will pay.\n\n**Status:** `mcp__haven__haven_get_payment_status` with a `payment_id` to\ncheck on queued or in-flight payments. Do not poll in a tight loop.\n\n## Approval semantics\n\n- A result with `pending_approval` means the payment exceeded the remaining\n budget and is waiting for the user in Haven. Tell the user, then check\n status later.\n- `safe_to_continue: false` on a guidance block is the same signal in\n machine-readable form: stop and involve the user before calling anything\n else for this payment.\n- Never ask the user for private keys. Signing happens only in the local Haven\n signer; the hosted Haven tools never receive the signing key. If a tool\n reports a missing or invalid credential, tell the user to re-run the Haven\n setup command.\n\n## Failure handling\n\nHaven tool failures are shaped like `{ success: false, code, message, ... }`\nor older `{ error, status, details? }` responses. Branch on `code` when\npresent and surface `message` or `error` verbatim. Common cases:\n\n- `pending_approval`: queued for the user's approval (see above).\n- `insufficient_funds`: the Haven wallet doesn't hold enough of that token.\n Suggest the user add funds in the Haven dashboard.\n- `PRICE_EXCEEDS_MAX`: the live merchant price exceeded your cap. No funds\n moved; ask the user before retrying with a higher one.\n- `AMBIGUOUS_MAX_AMOUNT`: you sent both `max_amount` and\n `max_amount_human`. Nothing was contacted or spent \u2014 re-send with exactly\n one (`max_amount_human` for a cap the user stated in tokens).\n- `MAX_AMOUNT_UNCONVERTIBLE`: `max_amount_human` does not fit this quote's\n asset \u2014 unknown decimals, or more decimal places than the asset supports.\n Round the cap, or send an exact atomic `max_amount`.\n- `PAYMENT_WINDOW_EXPIRED`: re-run the quote/prepare tool with the same\n `idempotency_key`, then sign the fresh payload.\n- `MERCHANT_REJECTED_AFTER_FUNDING`: the merchant refused the paid retry.\n Stop-and-sweep \u2014 stop retrying the merchant and use\n `mcp__haven__haven_sweep_delegate` to recover stranded delegate funds.\n- `MERCHANT_UNRESPONSIVE_AFTER_FUNDING`: funding confirmed on-chain, but the\n merchant never answered the paid retry. This is NOT proof of rejection \u2014 the\n merchant may still settle late. Verify-then-sweep, never a blind sweep:\n check `mcp__haven__haven_get_payment_status`, retry\n `mcp__haven__haven_complete_mcp_tool` ONCE, and only sweep with\n `mcp__haven__haven_sweep_delegate` if no settlement appears.\n- Budget exceeded: tell the user how much remains (from\n `mcp__haven__haven_get_allowances`) and that they can raise the budget in\n Haven.\n\n## Reporting after a purchase\n\nA settled `mcp__haven__haven_settle_mcp_tool` response carries\n`agent_summary.purchase_summary` and the remaining post-purchase allowance\nin `allowance` \u2014 report the product, Haven-derived payment/transaction\nfields, and what is left from those fields directly. `result` is optional\nraw merchant evidence; never use it to decide whether the purchase was paid.\nDo not call `haven_get_agent` or `haven_get_allowances` again just to\nreport a purchase you already made.\n\n## Revoke\n\nIf this agent's credential may have leaked, tell the user to pause or revoke\nthe agent in the Haven dashboard under Agents. New requests stop immediately\nfor that credential.\n";
|
|
2210
|
+
declare const HAVEN_SKILL_MD = "---\nname: haven-pay\ndescription: Pay for things from the user's Haven wallet within their agent rules. Use when the user asks to send, pay, tip, or transfer crypto \u2014 or when a request hits an HTTP 402 (x402) paywall.\n---\n\n# Haven: pay from a Haven wallet\n\nThis skill lets the agent make payments from the user's Haven wallet through\nthe Haven MCP tools. Every payment is checked against the agent's on-chain\nbudget before money moves; a payment above the remaining budget is declined \u2014\nnothing is paid past the rules the user set.\n\nHosted tools run in the `mcp__haven__` namespace. Local signing tools run in\nthe `mcp__haven-signer__` namespace and keep the delegate key on this machine.\nThat namespacing is Claude-family; other runtimes name the servers by their\nown config keys (Codex: `haven`, `haven_signer`). Tool results carry the\nexact next step (`next_action`, `next_tool`, `next_arguments`, plus the\nruntime-neutral `next_tool_server` + `next_tool_name` \u2014 the bare tool name\non that logical server, whatever your runtime calls it).\nFollow those fields first; the prose below is fallback and orientation, not\nthe source of truth.\n\n## When to use this skill\n\n- The user asks to send money, pay someone, tip, donate, or transfer tokens.\n- A request returns HTTP 402 (x402): use the Haven pay tools to settle it,\n then retry the original request.\n\n## Identity and budget\n\nDo not guess the wallet address, network, or budget.\n\nFor instant orientation at the start of a session, read the non-secret\n`agent.json` the connector wrote to your Haven credential directory (typically\n`~/.haven/agents/<agent-id>/agent.json` \u2014 if you don't know the agent id, list\n`~/.haven/agents/` to find the folder). It\nholds your agent id, Haven wallet address, network, and *configured* per-token\nbudget, and contains no keys \u2014 the fastest way to answer \"who am I and what may\nI spend\" with no round trip. If that file is absent (some setups don't write\nit), use the tools below instead.\n\nBefore any payment, confirm the *live remaining* budget with the tools \u2014\n`agent.json` shows the configured budget, not what is left after recent\nspending:\n\n- `mcp__haven__haven_get_agent` \u2014 the recommended first call: identity\n (wallet, network) plus `spend_authority_readiness` (`ready` / `needs_approval` /\n `revoked`) and live remaining per-token allowance, in one shot. That signal\n covers hosted identity and on-chain spend authority only \u2014 it cannot see the\n local signer; the signer is verified by calling any signer tool.\n- `mcp__haven__haven_get_allowances` \u2014 detailed per-token breakdown\n (configured, spent, reset window) when you need more than the summary.\n\nBudgets reset on a period the user chose. If a payment exceeds the remaining\nbudget it is declined before any money moves \u2014 tell the user; they can raise\nthe budget in the Haven dashboard, or wait for the period reset.\n\n## Paying\n\n**Catalog purchases \u2014 the primary path for MCP merchants:**\n\n1. `mcp__haven__haven_discover_tools` to find a payable service and its\n `catalog_id`.\n2. If the user needs the live price before authorizing a cap, call\n `mcp__haven__haven_quote_catalog_purchase` with `catalog_id`. It is\n read-only and informational only: it never reserves a price or creates a\n payment. Tell the user its `amount` / `amount_atomic`, then choose a cap.\n3. `mcp__haven__haven_prepare_catalog_purchase` with `catalog_id` and a\n spending cap. A cap is REQUIRED on this tool and is best practice on every\n paid call below too \u2014 it caps what the LIVE merchant quote may charge,\n checked before any funding intent is created. Write it the way the user\n said it: `max_amount_human` is whole tokens, so \"no more than 1 USDC\" is\n `max_amount_human: \"1\"`. (`max_amount` is the atomic-unit form, where\n \"1\" means 0.000001 USDC \u2014 do not convert by hand, and never send both.)\n4. Then FOLLOW THE RESPONSE'S GUIDANCE FIELDS: `next_action`, `next_tool`,\n and `next_arguments` name the exact next call \u2014 act on those first; the\n prose in this section is fallback and debugging detail. If the catalog\n entry is missing or degraded, the response instead names\n `mcp__haven__haven_pay_mcp_tool` (merchant URL, tool name, arguments) as\n the manual fallback.\n\n**Signing:** `mcp__haven-signer__haven_sign_x402` with `payment_id` ONLY \u2014\nthe local signer fetches the exact signing bytes AND `payment_required`\nitself, so never relay `typed_data` or the 402 blob yourself. If the signer\nreports its fetched context carried no `payment_required` (older backend),\nre-call with `payment_required` added verbatim. Fallback for an older signer\nor backend: re-run the quote/prepare tool with the SAME `idempotency_key`\nplus `include_signing_payload=true`, then pass `payload_hash`,\n`x402_expected` (the nested `x402.expected` object), and\n`typed_data`/`typed_data_b64` through unchanged.\n\n**Settle:** `mcp__haven__haven_settle_mcp_tool` with `payment_id`,\n`signature`, and `payment_header` ONLY \u2014 Haven rehydrates the merchant call\ncontext (`merchant_url`, `tool_name`, `arguments`, `mcp_transport`)\nserver-side from `payment_id`. Pass those four fields explicitly only as a\nversion-skew fallback when Haven has no stored context for the id \u2014 both or\nnone together, never just one. If the settle result carries `settled: false`,\nfunding has not confirmed \u2014 follow the result's guidance fields and check\nstatus later, do not re-pay.\n\nStep-by-step alternative (also key-safe; for an older signer or backend, or\nwhen you already have a merchant URL and tool name instead of a\n`catalog_id`): if the user needs the live price before choosing a cap, first\ncall `mcp__haven__haven_quote_mcp_tool` with that merchant URL, tool name,\nand arguments. It is informational only; then call\n`mcp__haven__haven_pay_mcp_tool` with the same inputs and the explicit cap.\nThe paid call always obtains a fresh quote before it creates any intent. Then\ncontinue `mcp__haven__haven_pay_mcp_tool` \u2192\n`mcp__haven-signer__haven_sign` \u2192 `mcp__haven__haven_submit` \u2192\n`mcp__haven-signer__haven_x402_sign_header` \u2192\n`mcp__haven__haven_complete_mcp_tool`. Pass `payment_required`,\n`arguments`, and `mcp_transport` verbatim from the quote/prepare result.\nThe returned `expires_at` is the signing window; if a tool returns\n`PAYMENT_WINDOW_EXPIRED`, re-run the same quote/prepare tool with the same\n`idempotency_key`. Do not call the merchant yourself \u2014 Haven completes the\nmerchant leg for you.\n\n**Direct transfer / non-MCP paywall:** `mcp__haven__haven_pay` with\nrecipient, amount, and token for a plain transfer. For an arbitrary,\nnon-MCP x402 paywall: `mcp__haven__haven_quote_x402` to get a quote, then\n`mcp__haven__haven_pay_x402_quote` \u2014 follow the result's guidance fields\nfirst and sign in the local Haven signer. The pay tool performs the merchant\nretry itself, so do not wait on a signal while it runs. If the process\ncrashes after payment, a later `mcp__haven__haven_get_payment_status` call\nmay report `nextAction: 'retry_original_x402_request'` \u2014 only then call\n`mcp__haven__haven_resume_x402_payment` with the preserved resume state or\npayment id, instead of paying again.\n\n**Catalog tool arguments:** when `haven_discover_tools` returns\n`tool_arguments`, pass that object unchanged as the pay tool's\n`arguments` field (for example\n`tool_arguments: { \"tier\": \"50gb\" }` -> `arguments: { \"tier\": \"50gb\" }`).\n\n**Prices:** show the user the live price from a read-only quote or the pay-tool\nresult, never a catalog price. `haven_discover_tools` prices are indicative\n(`price_is_indicative`) and can be stale. A read-only quote is informational\nonly and does not reserve a price; the later paid call re-quotes and enforces\nthe cap. The pay-tool result's `amount` / `amount_atomic` is the amount\nHaven authorizes for that call \u2014 a ceiling the merchant settles at or below \u2014\nso present it as the most the user will pay.\n\n**Status:** `mcp__haven__haven_get_payment_status` with a `payment_id` to\ncheck on in-flight payments. Do not poll in a tight loop.\n\n## Declines and stop signals\n\n- A payment outside the agent's rules \u2014 above the remaining budget, wrong\n recipient, or expired budget \u2014 is declined before any money moves. Nothing\n is queued; tell the user, who can raise the budget in Haven.\n- `safe_to_continue: false` on a guidance block is a stop signal in\n machine-readable form: stop and involve the user before calling anything\n else for this payment.\n- Never ask the user for private keys. Signing happens only in the local Haven\n signer; the hosted Haven tools never receive the signing key. If a tool\n reports a missing or invalid credential, tell the user to re-run the Haven\n setup command.\n\n## Failure handling\n\nHaven tool failures are shaped like `{ success: false, code, message, ... }`\nor older `{ error, status, details? }` responses. Branch on `code` when\npresent and surface `message` or `error` verbatim. Common cases:\n\n- `insufficient_funds`: the Haven wallet doesn't hold enough of that token.\n Suggest the user add funds in the Haven dashboard.\n- `PRICE_EXCEEDS_MAX`: the live merchant price exceeded your cap. No funds\n moved; ask the user before retrying with a higher one.\n- `AMBIGUOUS_MAX_AMOUNT`: you sent both `max_amount` and\n `max_amount_human`. Nothing was contacted or spent \u2014 re-send with exactly\n one (`max_amount_human` for a cap the user stated in tokens).\n- `MAX_AMOUNT_UNCONVERTIBLE`: `max_amount_human` does not fit this quote's\n asset \u2014 unknown decimals, or more decimal places than the asset supports.\n Round the cap, or send an exact atomic `max_amount`.\n- `PAYMENT_WINDOW_EXPIRED`: re-run the quote/prepare tool with the same\n `idempotency_key`, then sign the fresh payload.\n- `MERCHANT_REJECTED_AFTER_FUNDING`: the merchant refused the paid retry.\n Stop-and-sweep \u2014 stop retrying the merchant and use\n `mcp__haven__haven_sweep_delegate` to recover stranded delegate funds.\n- `MERCHANT_UNRESPONSIVE_AFTER_FUNDING`: funding confirmed on-chain, but the\n merchant never answered the paid retry. This is NOT proof of rejection \u2014 the\n merchant may still settle late. Verify-then-sweep, never a blind sweep:\n check `mcp__haven__haven_get_payment_status`, retry\n `mcp__haven__haven_complete_mcp_tool` ONCE, and only sweep with\n `mcp__haven__haven_sweep_delegate` if no settlement appears.\n- Budget exceeded: tell the user how much remains (from\n `mcp__haven__haven_get_allowances`) and that they can raise the budget in\n Haven.\n\n## Reporting after a purchase\n\nA settled `mcp__haven__haven_settle_mcp_tool` response carries\n`agent_summary.purchase_summary` and the remaining post-purchase allowance\nin `allowance` \u2014 report the product, Haven-derived payment/transaction\nfields, and what is left from those fields directly. `result` is optional\nraw merchant evidence; never use it to decide whether the purchase was paid.\nDo not call `haven_get_agent` or `haven_get_allowances` again just to\nreport a purchase you already made.\n\n## Revoke\n\nIf this agent's credential may have leaked, tell the user to pause or revoke\nthe agent in the Haven dashboard under Agents. New requests stop immediately\nfor that credential.\n";
|
|
2121
2211
|
/** Directory name for the installed skill folder. */
|
|
2122
2212
|
declare const SKILL_FOLDER_NAME = "haven-pay";
|
|
2123
2213
|
/**
|
|
@@ -2487,4 +2577,4 @@ declare function discoverMerchantMcpUrl(inputUrl: string): Promise<string | null
|
|
|
2487
2577
|
/** Trailing-slash/percent-case echoes compare equal; unparseable never does. */
|
|
2488
2578
|
declare function sameUrl(a: string, b: string): boolean;
|
|
2489
2579
|
|
|
2490
|
-
export { AGENT_PAYMENT_FAILURE_CODE_VALUES, AGENT_PAYMENT_NEXT_ACTION_VALUES, AGENT_PAYMENT_PHASE_VALUES, AGENT_PAYMENT_RAIL_VALUES, type AgentNextStep, type AgentPaymentEnumSchema, AgentPaymentFailureCode, AgentPaymentFailureCodeDescriptions, AgentPaymentFailureCodeSchema, AgentPaymentNextAction, AgentPaymentNextActionDescriptions, AgentPaymentNextActionSchema, AgentPaymentPhase, AgentPaymentPhaseDescriptions, AgentPaymentPhaseSchema, AgentPaymentRail, AgentPaymentRailDescriptions, AgentPaymentRailSchema, type AgentPaymentSummary, type AgentPaymentWarning, AgentPaymentWarningCode, type AgentPurchaseSummary, type ClaudeTool, DEFAULT_CONFIRMATION_TIMEOUT_MS, DISCOVERY_MAX_BYTES, ERC7710_ASSET_TRANSFER_METHOD, HAVEN_MINIMUM_NODE_VERSION, HAVEN_SKILL_BODY_MD, HAVEN_SKILL_MD, type HavenAgent, type HavenAgentAllowanceSummary, type HavenAgentReadiness, type HavenAgentSummary, type HavenAllowance, type HavenAllowanceSummary, HavenApiError, type HavenCatalogEntry, HavenClient, type HavenClientConfig, HavenError, type HavenPaymentReceipt, HavenPaymentStateError, HavenSigningError, HavenTimeoutError, HavenUnsupportedSignerVersionError, MERCHANT_DISCOVERY_PATHS, type MachinePaymentRail, MerchantTimeoutError, type OpenAITool, type PaymentFee, type PaymentIntent, type PaymentNextAction, type PaymentPhase, type PaymentReceipt, type PaymentRequest, type PaymentResult, type PaymentResumeState, type PaymentStatus, type PaymentStatusResult, type
|
|
2580
|
+
export { AGENT_PAYMENT_FAILURE_CODE_VALUES, AGENT_PAYMENT_NEXT_ACTION_VALUES, AGENT_PAYMENT_PHASE_VALUES, AGENT_PAYMENT_RAIL_VALUES, type AgentNextStep, type AgentPaymentEnumSchema, AgentPaymentFailureCode, AgentPaymentFailureCodeDescriptions, AgentPaymentFailureCodeSchema, AgentPaymentNextAction, AgentPaymentNextActionDescriptions, AgentPaymentNextActionSchema, AgentPaymentPhase, AgentPaymentPhaseDescriptions, AgentPaymentPhaseSchema, AgentPaymentRail, AgentPaymentRailDescriptions, AgentPaymentRailSchema, type AgentPaymentSummary, type AgentPaymentWarning, AgentPaymentWarningCode, type AgentPurchaseSummary, type CatalogSubmissionAccepted, type ClaudeTool, DEFAULT_CONFIRMATION_TIMEOUT_MS, DISCOVERY_MAX_BYTES, ERC7710_ASSET_TRANSFER_METHOD, HAVEN_MINIMUM_NODE_VERSION, HAVEN_SKILL_BODY_MD, HAVEN_SKILL_MD, type HavenAgent, type HavenAgentAllowanceSummary, type HavenAgentReadiness, type HavenAgentSummary, type HavenAllowance, type HavenAllowanceSummary, HavenApiError, type HavenCatalogEntry, type HavenCatalogSubmission, HavenClient, type HavenClientConfig, HavenError, type HavenPaymentReceipt, HavenPaymentStateError, HavenSigningError, HavenTimeoutError, HavenUnsupportedSignerVersionError, MERCHANT_DISCOVERY_PATHS, type MachinePaymentRail, MerchantTimeoutError, type OpenAITool, type PaymentFee, type PaymentIntent, type PaymentNextAction, type PaymentPhase, type PaymentReceipt, type PaymentRequest, type PaymentResult, type PaymentResumeState, type PaymentStatus, type PaymentStatusResult, type PostPurchaseAllowanceSummary, RECEIPT_VERSION, type ReceiptVerification, type ResumeAuthorizedX402Input, type ResumeX402PaymentInput, SIGNER_UPDATE_FALLBACK, SKILL_FOLDER_NAME, SWEEP_BASE_CHAIN_ID, SWEEP_BASE_SEPOLIA_CHAIN_ID, SWEEP_BASE_SEPOLIA_USDC_ADDRESS, SWEEP_BASE_USDC_ADDRESS, type SharedToolKey, type SignData, SignerRefusalCode, type SweepAuthorization, type SweepConfirmation, type SweepEip712Domain, type SweepEntry, type SweepExpectedAuth, type SweepPreparation, type SweepPrepareResponse, type SweepResult, type SweepSubmitResponse, type SweepSubmitResult, type SweepTypedData, TRANSFER_WITH_AUTHORIZATION_TYPES, type ToolDescription, type UnsupportedNodeVersionMessageOptions, X402AlreadySettledError, type X402AuthorizationOptions, type X402Erc7710Settlement, type X402ExpectedAuth, type X402ExpectedContext, type X402Intent, type X402McpCallContext, type X402McpTransport, type X402MerchantCallContext, type X402PaymentHeaderContext, X402PaymentHeaderValidationError, type X402PaymentOption, type X402PaymentRequired, type X402Quote, type X402Receipt, type X402RequestSnapshot, type X402ResumeState, type X402SchemeSelection, X402UnexpectedStatusError, X402_MAX_AUTHORIZATION_WINDOW_SECONDS, X402_SETTLEMENT_FORWARD_MARGIN_SECONDS, addressFromKey, buildSweepAuthorizationMessage, buildSweepTypedData, buildX402ExpectedMessage, compareNodeVersions, composeDescription, decodeBase64Json, decodeBase64Utf8, discoverMerchantMcpUrl, encodeBase64Json, encodeBase64Utf8, encodePaymentProof, havenTools, isErc7710Option, isSupportedNodeVersion, isSweepableChain, normalizePaymentRequired, parsePaymentRequired, parsePaymentRequiredResponse, resolveTokenFromAddress, sameUrl, selectErc7710PaymentOption, selectPaymentOption, selectStandardPaymentOption, selectX402SettlementScheme, signHash, signUserOpTypedDataForDelegation, sweepUsdcAddress, sweepUsdcDomain, toStandardPaymentRequirements, toolDescriptions, unsupportedNodeVersionMessage, validateStandardX402PaymentHeader, verifyPaymentReceipt, verifySignature, x402AssetTransferMethod, x402AuthorizationAmount, x402FacilitatorAddresses };
|