Skip to content

SDK API reference

This is the map of everything @piprail/sdk exports, grouped by the job it does, with the headline APIs marked and the advanced tiers (wire codecs, low-level exact, the driver SPI) kept clearly separate. Each group links to the page that documents it in full.

Two entry points cover the 99% case: requirePayment / createPaymentGate to get paid, and PipRailClient to pay. Everything else is built on those.

import { requirePayment, PipRailClient } from '@piprail/sdk'

The server-side surface. requirePayment is Express/Connect middleware; createPaymentGate is the same logic, framework-free.

ExportKindMarked
requirePaymentfnHeadline
createPaymentGatefnHeadline
createPaywall, createTipJarfnPresets: named sugar over createPaymentGate (fixed-price paywall / pay-what-you-want tip jar). See Presets & self-test
toFetchHandler, toWorker, proxyTofnAdapters for every fetch runtime: toFetchHandler (universal (request, …) => Response) + toWorker (the { fetch } export). proxyTo(origin) is a serve that forwards paid requests to an existing backend → gate any API. See Framework adapters
deliverReceiptfnReliable receipt webhook: a signed + retried POST to your endpoint
toInvalidBodyfnDeprecated
RequirePaymentOptions, AcceptOption, ExactRailOptiontypecarries onPaid / onPaidError / awaitOnPaid and their failure mirrors onFailed / onFailedError / awaitOnFailed; mimeType (→ v2 resource.mimeType + the self-describe endpoint)
UptoRailOptiontypeThe createPaymentGate({ upto }) rail option: metered / variable-amount billing (buyer signs a MAX, you settle the actual ≤ max). See upto rail (seller)
ReceiptOptiontypeThe createPaymentGate({ receipt }) rail option: emit a signed, anyone-verifiable verifiable receipt alongside the response
ChainSelector, TokenInputtype
PaymentGate, VerifyPaymentResulttype
GateSelfTesttypeThe result of gate.selfTest(): { ok, rails, warnings, error? } (read-only, never-throw config check)
PaywallOptions, TipJarOptions, ServetypeThe preset + adapter option types
PaidReceipttypeThe enriched receipt onPaid receives
FailedPaymenttypeThe failure object onFailed receives: { code, detail, transient } (the mirror of PaidReceipt)
DeliverReceiptOptions, DeliverAttempt, DeliverResulttype
X402InvalidBodytype
ExpressLike{Request,Response,Next,Middleware}type

See requirePayment & createPaymentGate, Defining accepts, Verifying payments, and Receipts & onPaid (the PaidReceipt, onPaidError, awaitOnPaid, and deliverReceipt, plus the failure mirror onFailed / FailedPayment / onFailedError / awaitOnFailed, fired when a submitted proof is rejected).

The client. One PipRailClient binds a chain + wallet and exposes the read-only trio (quoteestimateCostplanPayment) plus fetch. MultiChainPayer carries one wallet per chain and auto-routes a 402 to whichever chain can settle it.

ExportKindMarked
PipRailClientclassHeadline
MultiChainPayerclassHeadline. One buyer, a wallet per chain
planAcross, fetchAcrossfnplan / pay across an array of single-chain clients
PipRailClientOptions, MultiChainPayerOptions, WalletInput, PaymentSchemetype
PayingClienttypethe read-+-pay surface both PipRailClient and MultiChainPayer satisfy
PipRailQuote, PipRailCostQuote, PipRailEventtypethe payment-failed event gained code? / detail? and ALSO fires on a pre-send DECLINE (policy / onBeforePay / no settleable rail)
PaymentPlan, PayOption, PayBlocker, PayWarningtype
SessionBudget, SpendRemainingtype
ReceiptVerificationtypeThe verdict returned by the static PipRailClient.verifyReceipt / PipRailClient.verifyAttestation. Re-verify a verifiable receipt against the chain, wallet-free (never throws). client.lastReceipt() returns the most recent one the client received.

See Quote, Estimate cost, planPayment(), fetch & autoRoute, Multi-chain buying, Events, and Wallets by family.

Read Swapping tokens before using these. Nothing swaps automatically, and the spend policy does not govern swaps.

ExportSignatureNotes
client.quoteSwap(req: SwapRequest) => Promise<SwapQuote | null>Read-only. Never throws for a read problem: null means no quote, never no funds. A malformed slippageBps throws RangeError before any read.
client.swap(quote: SwapQuote) => Promise<SwapReceipt>Signs from your own wallet: one transaction, or two where a TRC-20/ERC-20 must be approved first. Asserts the chain’s own outcome before returning.
summarizeSwap(q: SwapQuote) => stringOne human sentence, always naming the rate’s source.
resolveSlippageBps(bps?: number) => numberValidates and defaults. Throws RangeError on nonsense.
applySlippage(amount: bigint, bps: number) => bigintPure, rounds up, integer only.
DEFAULT_SLIPPAGE_BPS500.5%.
MAX_SLIPPAGE_BPS100010% ceiling.

Types: SwapRequest, SwapQuote, SwapReceipt, SwapSide, SwapQuoteSource.

Whether a model may swap is a question of authority, not of which package it imported.

ExportTypeWhat it is
AgentMode'supervised' | 'budgeted' | 'sovereign'Who is answerable for the wallet. Set once at construction; client.mode() reads it back and nothing writes it, so a model can never escalate itself.
DEFAULT_AGENT_MODE'budgeted'The default. Omit mode and the SDK behaves exactly as it did before modes existed, with the same eight tools.
AGENT_MODESreadonly AgentMode[]Every valid mode, for validation and for surfaces that enumerate them.
SwapPolicy{ maxPerSwap?, maxSlippageBps?, allowTo? }The guardrail a payment cap cannot be. maxPerSwap is compared against the quote’s on-chain maxSpend, never the estimate.

paymentTools(client) returns the same eight tools in 'supervised' and 'budgeted'. 'sovereign' appends six: piprail_quote_swap, piprail_swap, the seller tools piprail_sell, piprail_collect and piprail_earnings, and piprail_wallet. It appends rather than replaces, so the default is untouched for anyone who does not opt in. client.canAgentSwap() and client.canAgentSell() are the one place each answer lives.

Every mode must be able to keep the promise its name makes, and the SDK checks this at construction.

ModeWhat it grantsWhat it requires
supervisedthe 8 toolsonBeforePay. It is the only thing that can pause a payment for a human, so without it the mode would be a label on a client that pays without asking anyone.
budgeted (default)the 8 toolsnothing. The policy is the consent.
sovereign14 toolsswapPolicy.maxPerSwap, in the SDK and the MCP alike. A payment cap counts payments, and a swap is not one, so sovereign is bounded by a different instrument. Selling needs no ceiling: it takes money rather than spending it.
// Supervised: a human is genuinely in the loop, or construction fails.
const supervised = new PipRailClient({
chain: 'base',
wallet: { key: process.env.KEY },
mode: 'supervised',
onBeforePay: async (quote) => askTheHuman(quote), // required, and it is the supervision
})
// Sovereign: the agent owns its wallet, both halves of it.
const agent = new PipRailClient({
chain: 'base',
wallet: { key: process.env.KEY },
mode: 'sovereign',
swapPolicy: { maxPerSwap: '25.00', maxSlippageBps: 100 },
})
ExportSignatureNotes
onBeforeSwap(quote: SwapQuote) => boolean | Promise<boolean>Approve or refuse a swap before anything is signed. onBeforePay genuinely never sees a swap (a swap is not a payment), so without this a supervised sovereign agent could swap its whole balance without one prompt. Same fail-safe contract: false or a throw refuses, as PaymentDeclinedError with reasonCode: 'APPROVAL'. @piprail/mcp wires it alongside onBeforePay whenever confirmation is on.
client.address()() => Promise<string>Where this wallet gets paid. Derived from the key, no RPC read. An agent handed a key it never chose has no other way to learn its own address, and piprail_sell defaults payTo to it.
client.balanceOf(assets?)(assets?: readonly string[]) => Promise<WalletAssetBalance[]>What the wallet can spend, per asset: the balance sheet, distinct from budget() (how much allowance is left). Never throws for a read problem: an unavailable read is null, never 0, so an agent can tell “I hold nothing” from “I could not find out”. On a MultiChainPayer it spans every chain. 🔴 For a native asset on a chain with a retained minimum this is lower than the figure an explorer shows; see the note below.
WalletAssetBalance{ symbol, asset, decimals, known, amount, amountFormatted }One holding. amount is the spendable base-unit figure. known: false means the chain does not ship that symbol, reported rather than guessed at.

| client.canAgentSell() | () => boolean | May a model price offers and collect for them? Sovereign only. | | client.chain() | () => ChainSelector | The chain this client is configured for. |

Plain data, no network calls. Same shape and same admission rule as KNOWN_FACILITATORS: an entry earns its place only after a real mainnet swap settled through it.

ExportSignatureNotes
SWAP_PROVIDERSreadonly SwapProviderEntry[]The registry. Every entry carries dated, verifiable transaction hashes.
swapProvidersFor(network: Caip2) => readonly SwapProviderEntry[]Routes on one network; empty array when none.
canSwapOn(network: Caip2) => booleanThe boolean form.
swappableNetworks() => readonly Caip2[]Every network with a proven route, deduped and sorted.

Types: SwapProviderEntry, SwapProof.

The website’s swap table is generated from this map (node site/scripts/gen-swap-providers.mjs), so the page can never drift from the SDK.

SwapQuoteSource.kind is 'protocol' (the ledger itself swapped, no third party) or 'provider' (a named keyless router). Always read it before trusting a rate.

The policy + ledger primitives. evaluatePolicy is the pure decision function the client and MCP both call before any spend. The ledger + store are how caps survive a restart and span chains and still no backend, no database, no fee: SpendLedger is in-memory and a SpendStore is a caller-owned file (or anything you implement).

ExportKindMarked
evaluatePolicyfnHeadline
SpendLedgerclassShare one across several clients for a cross-chain grand total (MultiChainPayer.fromWallets wires it for you)
memorySpendStorefnA SpendStore backed by an in-memory array: memorySpendStore(seed?); from @piprail/sdk
fileSpendStorefnA durable JSONL SpendStore: fileSpendStore(path); from @piprail/sdk/node (Node-only, keeps node:fs out of the browser bundle)
denomOffnPure. denomOf(symbol, asset, policy) → the unit a token folds into, or none
BUILTIN_DENOMS, DENOM_PRECISIONconstthe built-in symbol→unit map (USDC/USDT/USD1/FDUSD/U/RLUSD → 'USD', EURC → 'EUR') and the fixed-point precision (24)
PaymentPolicy, PaymentIntent, PolicyDecision, PolicyDenyCodetypePaymentPolicy gained maxTotalPerDenom / denomFor / maxPayments / maxPaymentsPerWindow / warnAtFraction; PolicyDenyCode gained MAX_TOTAL_DENOM / MAX_PAYMENTS / WINDOW_COUNT
SpendStoretype{ load(): SpendRecord[]; append(record): void }. Pass as the client’s spendStore to persist the ledger (never throws)
SpendRecord, SpendSummary, SpendAssetTotal, SpendDenomTotaltypeSpendSummary gained byDenom: SpendDenomTotal[]; SpendRecord gained optional decimals / denom
DenomRemaining, CountStatustypethe per-denomination remaining row + the payment-count status SessionBudget now also reports

See Payment policy, Total budget, Time envelope, evaluatePolicy(), and Spend ledger.

paymentTools(client) returns the tool set an autonomous LLM drives; the renderers and guide make a bound client legible to the model.

ExportKindMarked
paymentToolsfnHeadline
AgentTool, ToolAnnotationstype
summarizePlan, explainDecline, formatSpendReport, describeChallengefn
PIPRAIL_AGENT_GUIDE, agentGuideconst / fn
classifyChallengefn
ChallengeTriage, ChallengeVerdicttype
buildSelfDescription, buildEndpointInfo, BRANDfn / constthe extensions.piprail self-description builder, the endpoint sub-block assembler, + brand single-source-of-truth
SelfDescription, SelfDescribeRail, SelfDescribeEndpointtypethe self-describe block, a rail in it, and the agent-readable endpoint (summary/input/output)

See Payment tools, The agent tools, Renderers, Agent guide, and Challenge triage.

CHAINS is the built-in EVM mainnet registry (each preset carries its canonical token addresses); resolveChain turns a chain value into a ResolvedChain.

ExportKind
CHAINS, resolveChainconst / fn
ChainInput, ChainName, ResolvedChaintype
ChainPreset, TokenInfotype

See Chains overview and Chains & tokens.

Be found, and find others, on the open x402 indexes, with nothing PipRail-hosted. The builders are pure (emit static artifacts); the register* / searchOpenIndexes functions talk to the free public directories.

ExportKind
buildOpenApi, buildWellKnownX402, buildWellKnownX402Manifest, buildX402DnsTxt, buildBazaarExtension, GENERATORfn / const
discoveryHeaders, POWERED_BY, renderLandingPagefn / const
searchOpenIndexes, register402Index, registerX402Scanfn
claim402IndexDomain, verify402IndexDomainfn
normalizeNetwork, getDirectoryInfo, decorateOutcome, DIRECTORY_INFOfn / const
rankResources, scoreResourcefn
appendKeywordsfn
appendAttribution, REGISTER_ATTRIBUTIONfn / const
PaymentRail, ResourceDescription, ManifestInputtype
OpenApiDocument, OpenApiOperation, WellKnownX402, WellKnownX402Manifest, WellKnownX402Item, X402DnsRecordtype
DiscoveryDescriptor, BazaarExtensiontype
DiscoverySource, DiscoverySort, DiscoveredRail, DiscoveredResourcetype
RegisterOutcome, RegisterInput, SearchOpenIndexesOptionstype
DirectoryInfo, ListingVisibility, DomainClaim, DomainVerificationtype
DiscoverOptions, RegisterOptionstype

See Discover & register, Open indexes, Emitters, and Domain verification.

Every thrown error is a typed PipRailError subclass with a stable .code.

ExportKind
PipRailErrorclass (base)
InsufficientFundsError, RecipientNotReadyErrorclass
WrongChainError, WrongFamilyError, UnknownTokenErrorclass
InvalidConfigErrorclass
MissingDriverError, UnsupportedNetworkError, UnsupportedSchemeErrorclass
PaymentTimeoutError, ConfirmationTimeoutError, MaxRetriesExceededErrorclass
PaymentDeclinedError, InvalidEnvelopeError, NoCompatibleAcceptErrorclass
NonReplayableBodyError, SettlementError, WalletRequiredErrorclass
toInsufficientFundsErrorfn
DeclineReasonCodetype

See Error model, Error hierarchy, VerifyErrorCode, and Why payments fail.

The raw envelope codecs, for building a client or server by hand. PipRailClient and createPaymentGate cover the 99% case, so reach for these only when you’re hand-rolling the wire format (server: buildChallengeHeader → verify → buildReceiptHeader; client: parseChallengebuildSignatureHeaderparseReceipt).

ExportKind
pickAcceptfn
parseChallenge, parseReceipt, parseReceiptExtension, parseSettleResponsefn
parseSignatureHeader, parseExactPaymentHeader, parseUptoPaymentHeaderfn
parseSignatureObject, parseExactObject, parseUptoObject, decodeBase64Jsonfn: the object-accepting parser cores the base64 header parsers wrap, for a transport that carries the SAME payload as raw JSON (A2A), fed via gate.verifyObject
buildChallengeHeader, buildSignatureHeader, buildExactSignatureHeader, buildUptoSignatureHeader, buildReceiptHeaderfn
buildReceiptExtension, EXT_OFFER_RECEIPTfn / const
buildPaymentIdentifierAdvertisement, readPaymentIdentifier, EXT_PAYMENT_IDENTIFIERfn / const
HEADER_REQUIRED, HEADER_SIGNATURE, HEADER_RESPONSE, HEADER_SIGNATURE_V1, HEADER_RESPONSE_V1const
Caip2, AssetId, AddressIdtype
VerifyResult, VerifyErrorCodetype
X402AcceptEntry, X402ExactAcceptEntry, X402UptoAcceptEntry, X402AnyAccept, X402Challengetype
X402PaymentSignature, X402Receipt, X402ResourceObject, SettleOutcometype
PipRailReceipt, SignedReceipttype
ExactAuthorizationWire, ExactPaymentPayload, ExactPaymentPayloadAny, ParsedExactPaymenttype
Permit2Authorization, Permit2PaymentPayload, Permit2UptoAuthorization, Permit2UptoPaymentPayload, ParsedUptoPaymenttype

See Wire codecs and VerifyErrorCode.

Advanced: low-level exact (EVM: EIP-3009 + Permit2)

Section titled “Advanced: low-level exact (EVM: EIP-3009 + Permit2)”

The standard x402 exact scheme at the codec tier. For the high-level paths use PipRailClient({ schemes: ['exact'] }) (buyer) or createPaymentGate({ exact }) (seller). These exports are for hand-rolled clients, v1 servers, and custom flows. The exact scheme has six asset-transfer methods: EIP-3009 (transferWithAuthorization, on EVM tokens that implement it) and Permit2 (for EVM ERC-20s that don’t, e.g. Binance-Peg USDC/USDT on BNB), plus SVM (Solana: any SPL token, the merchant is the fee payer), Algorand, Aptos, and NEAR on their respective L1s. The codecs in the table below are the EVM tier (EIP-3009 + Permit2); the non-EVM payloads, SVM’s { transaction } shape (ExactSvmPaymentPayload), Algorand (ExactAlgorandPaymentPayload), Aptos (ExactAptosPaymentPayload) and NEAR (ExactNearPaymentPayload), are built and verified inside their respective drivers. They are variants of the exported ExactPaymentPayloadAny union (reached via ParsedExactPayment), not importable individually. See Gasless payments.

ExportKindNote
parseExactRequirements, chainIdForExactNetwork, encodeXPaymentHeaderfnEVM tier
readExactDomain, eip3009Abifn / constreads/uses a token’s true on-chain EIP-712 domain (EVM)
EXACT_NETWORK_SLUGS, EIP3009_TYPESconst
PERMIT2_ADDRESS, X402_EXACT_PERMIT2_PROXY, PERMIT2_WITNESS_TYPESconstPermit2 method: the canonical Permit2 + x402ExactPermit2Proxy + witness types
PERMIT2_PROXY_CHAIN_IDS, isPermit2ProxyChainconst / fnEVM chains where the x402 Permit2 proxy is deployed (where the Permit2 exact method can settle)
buildExactAuthorizationfnDeprecated, because it trusts the server-supplied domain
ExactAccept, ExactAuthorization, BuildExactParamstype
Permit2Authorization, Permit2PaymentPayload, ExactPaymentPayloadAnytypethe per-method wire payloads (EIP-3009 / Permit2 / SVM / Algorand / Aptos / NEAR); ParsedExactPayment is a union on method ('eip3009'/'permit2'/'svm'/'algorand'/'aptos'/'near')

Advanced: upto rail (EVM, metered / variable-amount Permit2)

Section titled “Advanced: upto rail (EVM, metered / variable-amount Permit2)”

The upto (metered) scheme: the buyer signs a Permit2 witness transfer for a MAX, and the merchant settles the actual (≤ max) after serving. EVM-Permit2 only. The high-level paths are createPaymentGate({ upto }) (seller) and PipRailClient({ schemes: ['onchain-proof', 'upto'] }) (buyer). These constants are the canonical proxy + witness types, for reference and advanced use. The proxy (vanity …0002, distinct from the exact …0001) is BOTH the signature spender and the seller’s settle contract.

ExportKindNote
X402_UPTO_PERMIT2_PROXYconstThe canonical x402 upto Permit2 proxy address (vanity …0002).
UPTO_PROXY_CHAIN_IDS, isUptoProxyChainconst / fnEVM chains where the upto Permit2 proxy is deployed (where the upto rail can settle).
PERMIT2_UPTO_WITNESS_TYPESconstThe EIP-712 witness type set for the upto Permit2 signature.

See the upto rail (seller) page for how to wire it.

Advanced: A2A transport (x402 over Google Agent2Agent)

Section titled “Advanced: A2A transport (x402 over Google Agent2Agent)”

The seller-side A2A adapter, the A2A analogue of requirePayment. Wrap a PaymentGate and map A2A Task/Message metadata ⇄ x402’s existing envelopes, backendless: zero driver/scheme/chain changes, so every family rides A2A for free. The raw-JSON dispatch seam it relies on, gate.verifyObject, is a method on the already-exported PaymentGate.

ExportKindNote
createA2APaymentHandlerfnHeadline (A2A). Wrap a PaymentGate into an A2A payment handler.
toA2APaymentRequired, toA2APaymentReceipts, toA2APaymentFailedfnMap an x402 challenge / receipts / failure into A2A Task/Message metadata.
fromA2APaymentRequired, fromA2APaymentPayloadfnRead an A2A payment-required / payment payload back out of A2A metadata.
toA2AErrorCode, VERIFY_CODE_TO_A2A_ERRORfn / constMap a VerifyErrorCode to its A2A error code.
A2A_X402_EXTENSION_URI_V01, A2A_X402_EXTENSION_URI_V02constThe x402-over-A2A extension URIs (v0.1 / v0.2).
A2A_STATUS_KEY, A2A_REQUIRED_KEY, A2A_PAYLOAD_KEY, A2A_RECEIPTS_KEY, A2A_ERROR_KEYconstThe A2A metadata keys the envelopes ride on.
A2A_EXTENSIONS_HEADERconstThe HTTP header that activates the A2A x402 extension.
A2APaymentHandler, A2APaymentHandlerOptionstypethe handler + its options
A2AArtifact, A2AExtensionDeclaration, A2AMessage, A2AMetadata, A2APart, A2APaymentStatus, A2ATask, A2ATaskRecord, A2ATaskState, A2ATaskStoretypethe A2A wire types

See A2A transport.

Advanced: x402-over-MCP transport (the third official transport)

Section titled “Advanced: x402-over-MCP transport (the third official transport)”

The seller-side MCP adapter, the MCP analogue of requirePayment / createA2APaymentHandler. Carry x402’s existing envelopes over MCP tool calls instead of HTTP headers, backendless: verify/settle/ replay all run through the gate’s verifyObject (zero new crypto, zero driver/scheme/chain changes), so every family rides MCP for free.

ExportKindNote
createMcpPaymentToolfnHeadline (MCP). Wrap a PaymentGate as a paid MCP tool. A fulfill() throw after settle still returns a success _meta payment-response, never a re-challenge (B7 at-most-once).
toMcpPaymentRequired, toMcpPaymentResponsefnBuild the 402-challenge (isError + structuredContent + a byte-equal content[0].text) and the settled tool result.
fromMcpPayment, fromMcpPaymentRequired, fromMcpPaymentResponse, isMcpPaymentRequiredfnBuyer/seller read helpers. Pull the payment / challenge / settlement out of an MCP message.
buildMcpPaymentMetafnFrame an already-produced { accepted, payload } into the retry call’s params._meta["x402/payment"].
MCP_PAYMENT_META_KEY, MCP_PAYMENT_RESPONSE_META_KEYconstThe spec _meta keys (x402/payment / x402/payment-response, with a slash, not A2A’s dot).
McpPaymentTool, McpPaymentToolOptions, McpContentBlock, McpToolCallParams, McpToolResult, McpPaymentMetatypethe MCP wire types (duck-typed; zero @modelcontextprotocol/sdk dependency)

A fully-automatic McpPayer (the buyer side) is a documented fast-follow, exactly as A2A shipped seller-first. See MCP transport (seller).

Advanced: exact facilitator (Mode B), facilitator.js

Section titled “Advanced: exact facilitator (Mode B), facilitator.js”

The Mode-B facilitator path (createPaymentGate({ exact: { settle: { facilitator } } })) delegates verify + settle to a third-party facilitator you choose. PipRail hosts nothing.

ExportKindNote
settleViaFacilitatorfnRun the two-POST verify→settle contract against a facilitator URL.
parseFacilitatorSupported, facilitatorCoveragefnRead a facilitator’s GET /supported → which (scheme, network) pairs it settles (never throws).
KNOWN_FACILITATORS, knownFacilitatorsFor, firstKeylessFacilitatorconst / fnThe keyless-facilitator coverage data map (which keyless facilitator settles exact on a network).
FacilitatorConfigtypeThe facilitator’s base url + optional authHeaders provider.
FacilitatorPaymentRequirementstypeThe trusted exact requirements posted to the facilitator.
SettleViaFacilitatorInput, FacilitatorSupportedKind, KnownFacilitatortypeinput to settleViaFacilitator; the /supported kinds; a coverage-map entry.

See the exact rail (seller) page for how to wire it, and Facilitator coverage for the keyless-facilitator data map.

See Low-level exact, exact rail (seller), and exact (buyer).

Bring your own chain family. registerDriver adds a family that implements the PaymentDriver contract; the rest are the contract’s types.

ExportKind
registerDriverfn
PaymentDriver, ChainFamilytype
ReceiptInputtype
ResolvedNetwork, ResolveOptions, ResolvedToken, CostEstimatetype
WalletHandle, WalletBalance, DiscoverySigner, ConfirmInfotype
RecipientReasontype
EvmToken, SolanaToken, TonToken, StellarToken, XrplTokentype
TronToken, NearToken, SuiToken, AptosToken, AlgorandTokentype

See Driver SPI and PaymentDriver architecture.