Find something... ⌘K

SDK / Using the SDK

SDK reference

Every name the packages export, each with what it is, generated from the release it ships with: every entry of maxy-labs (also published as @maxy-labs/sdk, the same package), @maxy-labs/loans, and the Python client's methods. It is for integrators looking up a name; Install and signers and the guides show how they fit together.

maxy-labs

The client and every module: swap, auth, orders, the deprecated borrow, signers, errors.

ExportKindWhat it is
AbortedErrorclassThe caller's AbortSignal fired.
AccessTokenProvidertypeReturns the access token of a wallet session, or null when signed out.
AmountInputtypeA bigint is in the smallest unit (wei, sats, 6-decimal units); a number or a decimal string is in whole coins.
AmountOutOfRangeErrorclassThe order is too small, or over the key's order size cap.
AssetInfointerfaceA coin you can name, with what the SDK needs to show and parse its amounts.
AssetInputtypeA coin, in any of these forms.
AuthErrorclassInvalid_api_key, key_revoked, scope_denied, origin_not_allowed, invalid_ticket, auth_required, sandbox_key_refused.
bip21UrifunctionA bitcoin.
bitcoinAddressOfKeyfunctionThe native SegWit (bc1q…) address of a Bitcoin key (WIF or hex).
BitcoinSignerinterfaceWhat the SDK needs from a Bitcoin wallet: its network, its payment account and public key, and PSBT signing.
bitcoinSignerFromKeyfunctionA mainnet BitcoinSigner over a key (WIF or hex) whose payment account is its native SegWit (bc1q…) address.
BitcoinSignRequestinterfaceA PSBT for a Bitcoin wallet to sign: the PSBT in base64, the inputs it signs and their sighash type.
BRIDGE_CHAINSvalueEVM chains with no settler of Maxy's that a two-leg route starts or ends on (a swap or bridge leg the user's own wallet sends).
btcnamespaceEvery export of btc, as one object
buildSignInMessagefunctionThe exact Sign-In with Ethereum (EIP-4361) text Maxy's wallet sign-in parses.
buyBtcWithEvmfunctionSee core/flows.ts.
buyBtcWithSolanafunctionBuy BTC from Solana.
BuyWithSolanaParamsinterfaceThe input of buyWithSolana: the Solana wallet, the coin and amount to pay, and the Bitcoin address that receives the BTC.
CallOptionsinterfaceThe last argument of every method.
ChainErrorclassA chain call failed.
ChainInputtypeA chain id, or its name.
CoinInputtypeA coin.
ContextOverridesinterfaceTest hooks for a client: a stand-in read client per chain and a stand-in clock.
createAuthfunctionBuilds the wallet sign-in module: a nonce, the Sign-In with Ethereum message, and a session from its signature.
createBitcoinKeyfunctionA new Bitcoin key (WIF) and its native SegWit address.
createBorrowfunctionBuilds the MaxyLock loans module on a context: markets, vaults, quotes, requests, funding, repayment and claims.
createContextfunctionResolves a client config into the shared context every module runs on: config, HTTP, chain reads and clock.
createEvmKeyfunctionA new EVM key and its address.
createMaxyClientfunctionOne client for every Maxy call.
createMaxyRestfunctionThe client over the HTTP API alone.
CreateOrderParamsinterfaceSigners and addresses createOrder may need, depending on the route.
createOrdersfunctionBuilds the order history module: one list of a wallet's swaps and loans from every source.
createReadClientsfunctionA cached viem PublicClient per chain.
createSwapfunctionBuilds the swap module on a context: routes, prices, quotes, orders, status and refunds.
createSwapMachinefunctionA small state machine that follows an order's states, for showing progress in a UI.
DeclinedErrorclass403 recipient_declined or jurisdiction_blocked.
Eip1193ProviderinterfaceMinimal EIP-1193 provider shape.
ensureEvmChainfunctionPuts the wallet on chainId (switching when it can) and returns the signing account.
EVM_CHAINSvalueEvery EVM chain the SDK reads or sends on, by chain id, with its name, native coin and viem chain.
evmChainfunctionThe EVM chain info for a chain id; throws for a chain the SDK does not know.
EvmChainInfointerfaceOne EVM chain as the SDK knows it: id, name, native coin symbol, viem chain and the read proxy that serves it.
EvmKeySignerOptionsinterfaceOptions of evmSignerFromPrivateKey: the starting chain and the RPC URLs to send transactions through.
EvmSignerinterfaceWhat the SDK needs from an EVM wallet: its address and chain, switching chains, signing typed data and sending transactions.
evmSignerFromEip1193functionWraps an EIP-1193 provider.
evmSignerFromPrivateKeyfunctionAn EvmSigner over a private key (0x + 64 hex).
evmSignerFromWalletClientfunctionWraps a viem WalletClient (or anything shaped like one) as an EvmSigner.
EvmTransactionRequestinterfaceA transaction for an EVM wallet to send: chain, recipient, calldata and value.
evmWalletfunctionThe wallet a buy needs, from any of the three.
ExecuteParamsinterfaceswap.execute.
FetchLiketypeThe fetch function the SDK calls, so a server can pass its own (a proxy, a mock in tests).
FlowEvmWalletinterfaceWhat a buy needs from an EVM wallet.
FlowProgresstypeThe state a flow helper reports to onProgress: the swap state machine's current state.
FlowResultinterfaceHow a flow helper ends: the order id, the order as GET /orders/{id} last read it, and the Bitcoin txid.
FlowSolanaWalletinterfaceWhat a buy needs from a Solana wallet adapter.
formatAmountfunctionAn amount in the smallest unit as whole coins, without trailing zeros.
fromSmallestfunctionThe smallest unit as whole coins, without trailing zeros.
getDeploymentexportA MaxyLock deployment by name: its chain, asset and contract addresses.
getNetworkConfigexportThe app's network settings for a chain id (its contracts and flags), or null when Maxy does not run there.
httpApiBaseOffunctionThe HTTP API's base for an apiUrl.
hyperEvmvalueHyperEVM as a viem chain (chain id 999).
IdempotencyInProgressErrorclass409 idempotency_in_progress.
isDeploymentReadyexportWhether a MaxyLock deployment has every contract address it needs to take loans.
isMaxyErrorfunctionWhether a value is a MaxyError, optionally with a given code.
isPublishableKeyvalueA publishable key.
isSandboxKeyvalueA test key.
isSwapChainfunctionWhether a chain id has a Maxy settler, so BTC swaps run on it directly.
isUserRejectionfunctionEIP-1193 4001, viem UserRejectedRequestError, ethers ACTION_REJECTED, and the usual wallet wording.
LIFI_API_URLvalueLI.FI's API (status of a LI.FI-carried leg, token lists).
ListOrdersInputinterfaceThe input of orders.list: the wallet, which sources to read, and paging.
ListOrdersResultinterfaceWhat orders.list answers: the orders, newest first, and the sources that could not be read.
ListParamsinterfaceFilters and paging for GET /orders: limit, cursor, dates, state and wallet.
MAXY_API_URLvalueThe Maxy API at Maxy's own host.
MAXY_FUNCTIONS_HOSTvalueMaxy's host, where every call the SDK makes goes (since 1.1.0).
MAXY_HTTP_API_URLvalueThe HTTP API's base.
MAXY_PUBLIC_KEYvalueDeprecated.
MaxyAuthtypeThe wallet sign-in module that createAuth returns.
MaxyBorrowtypeThe MaxyLock loans module that createBorrow returns.
MaxyClienttypeThe client createMaxyClient returns: swap, auth, orders, the deprecated borrow, and the HTTP API resources.
MaxyClientConfiginterfaceThe options of createMaxyClient: API key, API URL, RPC URLs, your own hosts, fetch and the session source.
MaxyContextinterfaceWhat every module runs on: the resolved config, the HTTP client, chain reads and the clock.
maxyErrorfunctionThe typed error for a code.
MaxyErrorclassThe error every SDK call throws: a stable code, the HTTP status, whether a retry can help, and the request id.
MaxyErrorCodetypeEvery error code the SDK and the API use, as a union of strings.
MaxyErrorOptionsinterfaceThe optional fields of a MaxyError: HTTP status, request id, docs link, the server's own code and details.
MAXYLOCK_DEPLOYMENTSexportEvery MaxyLock deployment by name, with its chain, asset and contracts.
MaxyLockDeploymenttypeOne MaxyLock deployment: its name, chain, lent asset and contract addresses.
MaxyLockDeploymentNametypeThe names of the MaxyLock deployments.
MaxyOrderinterfaceOne order in a wallet's history, swap or loan, in a single shape: id, route, state, amounts, transactions and times.
MaxyOrderstypeThe order history module that createOrders returns.
MaxyResttypeThe HTTP API client that createMaxyRest returns: one resource per group of routes.
MaxyRestConfiginterfaceThe options of createMaxyRest: API key, base URL, fetch, retries and timeouts.
maxyRpcUrlfunctionMaxy's RPC proxy for a chain on Maxy's host, for a client made without a config (a key signer, the CLI).
MaxySessioninterfaceA wallet's signed-in session: its access token, refresh token, expiry and wallet.
MaxySwaptypeThe swap module that createSwap returns.
MaxyWebhookEventinterfaceWhat a receiver gets, as JSON.
monadvalueMonad as a viem chain.
NetworkConfigtypeThe app's settings for one network: chain id, name, contracts and flags.
NetworkErrorclassMaxy could not be reached.
NotFoundErrorclass404 not_found.
OpenSellsLimitErrorclass409 open_sells_limit.
OrderAmountinterfaceAn amount in an order: the asset, the integer amount in its smallest unit, and the chain.
OrderChaintypeWhere an order's amount or transaction is: an EVM chain id, 'bitcoin' or 'solana'.
OrderKindtypeWhat an order is: a swap or a loan.
ordersModulenamespaceEvery export of orders, as one object
OrderStatetypeNormalized lifecycle state.
OrderStateErrorclass409.
OrderTxinterfaceOne transaction of an order: what it did, its chain and its hash.
parseAmountfunctionAn amount in whole coins ('0.01', 0.01, '1,000.50') or the smallest unit (bigint), in the smallest unit.
parseAssetfunctionA coin in any AssetInput form, as the precise { chain, token } the routes take.
parseChainfunctionThe chain a name, an id or a CAIP-2 id (eip155:8453, bip122:…, solana:…) stands for, or null.
PARTNER_KEY_REvalueA partner key and 32 letters and digits.
PaymentInstructionsinterfaceWhere and how much BTC to send for a sale: the address, the exact sats, the deadline and the bitcoin: URI.
preparedPostOffunctionThe exact request a failed call sent, to resend unchanged (its idempotency key keeps it one order).
PricedQuotetypeA quote as swap.price and swap.quote give it.
PriceParamsinterfaceThe input of prices.get and quotes.get: the two coins and one amount.
projectUrlOffunctionThe host the SDK's calls go to for an apiUrl.
QuoteExpiredErrorclass409 quote_expired.
QuoteParamsinterfaceThe input of borrow.quote: the vault and either the amount to borrow or the BTC to lock.
QuoteRequestinterfaceThe input of swap.quote: the coins, the amount, the addresses and the options of the route.
QuoteWordsinterfaceA quote in words.
RateLimitErrorclass429.
readChainfunctionA chain the SDK can read.
ReadClienttypeThe read-only part of a viem PublicClient the SDK uses for chain reads.
readyBorrowDeploymentsfunctionMaxyLock markets a borrower can use today (Base / USDC, Robinhood / USDG).
redactfunctionWhat may reach a log.
ResponseMetainterfaceWhat every HTTP API answer carries besides its body: request id, status, latency, retries and rate limit.
retryAfterSecondsOffunctionrate_limited.
robinhoodvalueRobinhood Chain as a viem chain (chain id 4663).
rpcUrlsForfunctionRPC URLs for SDK reads.
SANDBOX_SCENARIOSvalueEvery sandbox scenario with what it does; pass one as scenario on a quote or an order.
SandboxScenariotypeThe name of a sandbox scenario.
SDK_VERSIONvalueThis package's version.
sellBtcfunctionSell BTC to a chain.
SellHandleinterfaceWhat sellBtc answers before the BTC is sent: the order id, the payment instructions, and a promise of the end.
SellParamsinterfaceThe input of sellBtc: the wallet that receives and signs, the coin wanted and the BTC to sell.
ServerErrorclassMaxy answered 5xx, or a shape the SDK does not know.
SETTLEMENT_CHAIN_IDvalueBase (8453).
settlerAddressfunctionThe V6 BitcoinIntentSettler on chainId (the contract the swap intent is signed for).
SettlerIntentinterfaceThe V6 BitcoinIntentSettler Intent struct (20 fields, the EIP-712 primary type).
SIGN_IN_CHAIN_IDvalueWallet-auth accepts chain 8453 (Base) only.
SIGN_IN_DEFAULT_DOMAINvalueThe hosts Maxy's wallet sign-in accepts sign-in messages for; a message naming any other host is refused.
SignInOptionsinterfaceOptions of auth.signIn: the host and origin named in the message, and a username for a first sign-in.
SignInResultinterfaceWhat auth.signIn answers: the session, and whether the wallet signed in for the first time.
signWebhookfunctionThe Maxy-Signature header for a raw body.
SolanaSignerinterfaceThe legacy Solana provider shape (Phantom, Solflare, Backpack, the Wallet Standard adapter).
SuiSignerinterfaceA Sui wallet for the Sui leg of a Sui coin -> BTC swap.
suiSignerFromKeyfunctionA SuiSigner over an ed25519 key (suiprivkey1…, 0x + 64 hex, or base64).
SUPPORTED_NETWORKSexportThe app's settings for every network Maxy runs on, by chain id.
SWAP_CHAIN_IDSvalueThe mainnet EVM chains with a live V6 BitcoinIntentSettler (EVM <-> BTC swaps).
SWAP_FINAL_STATESvalueThe order states that end an order: completed, refunded, cancelled, expired and failed.
SwapAssetinterfaceA coin on a chain: the chain, and the token address, mint, symbol or coin type.
SwapChaintype'bitcoin', 'solana', 'tron' and 'sui' name the non-EVM sides; EVM chains are numeric chain ids.
SwapChainIdtypeThe chain ids that have a Maxy settler.
SwapMachineinterfaceThe swap state machine: its state, its context, whether it is done, and the moves between states.
SwapMachineStatetypeThe states a swap moves through in a UI, from idle and quoting to completed, refunded or failed.
swapModulenamespaceEvery export of swap, as one object
SwapOrderinterfaceA placed swap order: its route, its id to track it with, its chain and the transactions sent for it.
SwapPairinterfaceOne way to swap, as swap.pairs lists it.
SwapQuoteinterfaceA quote from swap.quote: the route, both coins, the amount sent and the executable amount received, fees and expiry.
SwapRequestinterfaceWhat swap.quote and swap.execute take.
SwapResultinterfaceWhat swap.swap answers: the quote, the placed order and its last status.
SwapRoutetypeSupported swap routes.
SwapStatetypeAn order's state: pending, awaiting_deposit, in_progress, completed, refundable, refunded, cancelled, expired or failed.
SwapStatusinterfaceAn order's status from swap.getStatus: its state, the service's own status, whether it is complete, and its transactions.
SwapUpdatetypeWhat swap.execute reports as it goes, for a progress line or a stepper.
TimeoutErrorclassMaxy did not answer in time.
tokenAddressfunctionToken address by symbol on a swap chain ('ETH' / 'BNB' / 'AVAX' are the zero address).
toSmallestfunctionWhole coins as a decimal string to the smallest unit.
TronSignerinterfaceA Tron wallet for the Tron leg of a Tron coin -> BTC swap.
tronSignerFromKeyfunctionA TronSigner over a secp256k1 key (64 hex, as Tron wallets export it).
UNFILLABLE_MESSAGEvalueWhat every order larger than Maxy can fill right now is refused with (insufficient_liquidity).
UnfillableErrorclassLarger than Maxy can fill right now, or not enough in the wallet.
unitsvalueAmount helpers: whole coins to the smallest unit and back, and BTC to sats and back, as decimal strings.
unlocksAtOffunctionnot_refundable.
UserRejectedErrorclassThe wallet declined the signature or the transaction.
ValidationErrorclass400.
verifyWebhookfunctionChecks a delivery and returns its event.
ViemWalletClientLikeinterfaceMinimal viem WalletClient shape (structural, so any viem 2.x WalletClient fits).
WatchOptionsinterfaceOptions of orders.watch: the order's chain and route, how long to watch, and stream or polling.
WebhookSignatureErrorclassA bad or stale webhook signature.
WithMetatypeEvery answer is plain JSON with a non-enumerable meta.
ZERO_ADDRESSvalueThe zero address, which names a chain's own coin wherever a token address is asked.
ZERO_HASHvalueThe 32-byte zero hash.

maxy-labs/core

The client over the HTTP API alone (fetch only), flow helpers and error classes.

ExportKindWhat it is
AbortedErrorclassThe caller's AbortSignal fired.
AddressChecktypeWhat GET /addresses/validate answers: whether the address is valid for the chain, its type and network, and whether an order would pay it.
AmountOutOfRangeErrorclassThe order is too small, or over the key's order size cap.
ApiOperationsinterfaceThe HTTP API's operations as TypeScript types, generated from the OpenAPI document.
ApiPathsinterfaceThis file was auto-generated by openapi-typescript.
ApiSchemasinterfaceThe HTTP API's schemas as TypeScript types, generated from the OpenAPI document.
AuthErrorclassInvalid_api_key, key_revoked, scope_denied, origin_not_allowed, invalid_ticket, auth_required, sandbox_key_refused.
bip21UrifunctionA bitcoin.
buyBtcWithEvmfunctionBuy BTC from an EVM chain.
buyBtcWithSolanafunctionBuy BTC from Solana.
BuyWithEvmParamsinterfaceThe input of buyWithEvm: the EVM wallet, the coin and amount to pay (or the BTC wanted) and the Bitcoin address.
BuyWithSolanaParamsinterfaceThe input of buyWithSolana: the Solana wallet, the coin and amount to pay, and the Bitcoin address that receives the BTC.
CallOptionsinterfaceThe last argument of every method.
ChainErrorclassA chain call failed.
CoinInputtypeA coin.
createMaxyClientfunctionThe client over the HTTP API alone.
createMaxyRestfunctionThe client over the HTTP API alone.
createResourcesfunctionBuilds the HTTP API resources (prices, pairs, quotes, orders, status, webhooks and more) on a transport.
createRestfunctionBuilds the HTTP API transport: the key, the base URL, and the call with retries, timeouts and rate-limit handling.
createSwapMachinefunctionA small state machine that follows an order's states, for showing progress in a UI.
DeclinedErrorclass403 recipient_declined or jurisdiction_blocked.
errorFromAnswerfunctionThe typed error for a failed answer.
ERRORS_DOCvalueWhere every code is explained.
FetchLiketypeThe fetch function the SDK calls, so a server can pass its own (a proxy, a mock in tests).
FlowCommoninterfaceWhat every flow helper takes: the client, a progress callback, an abort signal and an order placed earlier.
FlowEvmWalletinterfaceWhat a buy needs from an EVM wallet.
FlowProgresstypeThe state a flow helper reports to onProgress: the swap state machine's current state.
FlowResultinterfaceHow a flow helper ends: the order id, the order as GET /orders/{id} last read it, and the Bitcoin txid.
FlowSolanaWalletinterfaceWhat a buy needs from a Solana wallet adapter.
fromSmallestfunctionThe smallest unit as whole coins, without trailing zeros.
HealthtypeWhat GET /health answers: the solver, Bitcoin and each chain's verifier, with a degraded flag.
IdempotencyInProgressErrorclass409 idempotency_in_progress.
isMaxyErrorfunctionWhether a value is a MaxyError, optionally with a given code.
isPublishableKeyvalueA publishable key.
isSandboxKeyvalueA test key.
isUserRejectionfunctionEIP-1193 4001, viem UserRejectedRequestError, ethers ACTION_REJECTED, and the usual wallet wording.
KeyInfotypeWhat GET /key answers: your key's class, network and limits.
LimitstypeWhat GET /limits answers: your order size cap, the routes' smallest orders and your rate limits.
ListParamsinterfaceFilters and paging for GET /orders: limit, cursor, dates, state and wallet.
MAXY_API_URLvalueThe Maxy API at Maxy's own host.
MAXY_HTTP_API_URLvalueThe HTTP API's base.
maxyErrorfunctionThe typed error for a code.
MaxyErrorclassThe error every SDK call throws: a stable code, the HTTP status, whether a retry can help, and the request id.
MaxyErrorCodetypeEvery error code the SDK and the API use, as a union of strings.
MaxyErrorOptionsinterfaceThe optional fields of a MaxyError: HTTP status, request id, docs link, the server's own code and details.
MaxyLoggerinterfaceA logger the SDK writes to: debug, info, warn and error, each optional.
MaxyResourcestypeThe HTTP API client's resources, one per group of routes.
MaxyResttypeThe HTTP API client that createMaxyRest returns: one resource per group of routes.
MaxyRestConfiginterfaceThe options of createMaxyRest: API key, base URL, fetch, retries and timeouts.
NetworkErrorclassMaxy could not be reached.
NotFoundErrorclass404 not_found.
OpenSellsLimitErrorclass409 open_sells_limit.
OrderEventtypeOne recorded change of an order: its state, the state before, the service's status, the Bitcoin txid and the time.
OrderRefinterfaceWhat identifies an order's chain and route on the order routes, beside its id.
OrderRowtypeOne order in GET /orders: id, route, chain, state, Bitcoin txid and times.
OrderStatetypeAn order's state on the HTTP API, the same nine states as SwapState.
OrderStateErrorclass409.
PairtypeOne pair from GET /pairs: the two coins, the route, the settler, the order size and the confirmations.
PARTNER_KEY_REvalueA partner key and 32 letters and digits.
PaymentInstructionsinterfaceWhere and how much BTC to send for a sale: the address, the exact sats, the deadline and the bitcoin: URI.
PricetypeGenerated from the published OpenAPI document (scripts/gen-api-types.mjs).
PriceParamsinterfaceThe input of prices.get and quotes.get: the two coins and one amount.
QuotetypeWhat GET /quote answers: the price fields, the order to send back, the steps and any issues.
QuoteExpiredErrorclass409 quote_expired.
QuoteParamsinterfaceThe input of borrow.quote: the vault and either the amount to borrow or the BTC to lock.
RateLimitErrorclass429.
redactfunctionWhat may reach a log.
RequestInfointerfaceWhat the SDK's hooks receive about a request: method, path and request id.
ResponseInfointerfaceWhat the SDK's hooks receive about an answer: the request, its status and its latency.
ResponseMetainterfaceWhat every HTTP API answer carries besides its body: request id, status, latency, retries and rate limit.
RestTransporttypeThe HTTP API transport that createRest returns.
RetryInfointerfaceWhat the SDK's onRetry hook receives: the request, the attempt, the delay and the status that caused it.
SDK_VERSIONvalueThis package's version.
sellBtcfunctionSell BTC to a chain.
SellHandleinterfaceWhat sellBtc answers before the BTC is sent: the order id, the payment instructions, and a promise of the end.
SellParamsinterfaceThe input of sellBtc: the wallet that receives and signs, the coin wanted and the BTC to sell.
ServerErrorclassMaxy answered 5xx, or a shape the SDK does not know.
SseEventinterfaceOne server-sent event from a stream: its name and its JSON data.
StatustypeWhat GET /status and GET /orders/{id} answer: the order's state, substatus, receiving transaction and Bitcoin payment.
SWAP_FINAL_STATESvalueThe order states that end an order: completed, refunded, cancelled, expired and failed.
SwapMachineinterfaceThe swap state machine: its state, its context, whether it is done, and the moves between states.
SwapMachineStatetypeThe states a swap moves through in a UI, from idle and quoting to completed, refunded or failed.
TimeoutErrorclassMaxy did not answer in time.
toSmallestfunctionWhole coins as a decimal string to the smallest unit.
UnfillableErrorclassLarger than Maxy can fill right now, or not enough in the wallet.
unitsvalueAmount helpers: whole coins to the smallest unit and back, and BTC to sats and back, as decimal strings.
UserRejectedErrorclassThe wallet declined the signature or the transaction.
ValidationErrorclass400.
WatchOptionsinterfaceOptions of orders.watch: the order's chain and route, how long to watch, and stream or polling.
WebhookSignatureErrorclassA bad or stale webhook signature.
WithMetatypeEvery answer is plain JSON with a non-enumerable meta.

maxy-labs/swap

Every swap route: quotes, orders, status, refunds, the Tron, Sui and Solana-swap legs.

ExportKindWhat it is
AmountInputtypeA bigint is in the smallest unit (wei, sats, 6-decimal units); a number or a decimal string is in whole coins.
AssetInfointerfaceA coin you can name, with what the SDK needs to show and parse its amounts.
AssetInputtypeA coin, in any of these forms.
BRIDGED_BUY_CHAINSvalueChains a two-leg buy starts on.
bridgedLegStatusfunctionWhere leg 1 stands.
bridgedSellPlanexportFor a sale paid out on a chain with no settler: the settler payout to take first and the bridge leg after it, or null.
BridgedSellPlantypeA two-leg sale's plan: where the settler pays out first, and the coin and chain the bridge leg then delivers.
BridgeStatusHandletypeWhat a bridge leg's status is read with: the carrier, both chains, the recipient, the token and the minimum out.
btcPayoutScriptfunctionThe receive script for a BTC payout.
BtcToEvmOrderinterfaceA BTC sale to an EVM coin: the order, the Bitcoin address that must pay, and the escrow the payout is locked in.
BtcToSolStateinterfaceA BTC to Solana order's state: the filled offer with its payment plan, the payment, and the amounts.
buildBuyIntentfunctionBuilds the settler intent a buy signs: maker, asset, Bitcoin address, sats, prices, bond, confirmations and deadline.
buildSellProoffunctionFinds the user's payment into this escrow (exact sats to the committed script, mined after the commit) on Esplora and builds the BitcoinProof the settler checks.
BUY_CONFIRMATION_HEADROOMvalueThe share by which a buy's size is raised before its confirmations are set, so a price move cannot drop a tier.
BUY_CONFIRMATION_TIERSvalueBitcoin confirmations a buy's intent asks for, by the order's value.
BUY_MIN_SATSvalueThe smallest BTC buy (Bitcoin's dust limit).
buyConfirmationsForfunctionThe confirmations a buy of satAmount asks for at btcUsd; the most (3) when the price is unknown.
ChainInfointerfaceOne chain Maxy swaps on: id or name, type, native coin and its settler.
ChainInputtypeA chain id, or its name.
checkCrossEvmQuotefunctionThe SDK's own check of the bytes about to be signed.
checkJupiterSwapfunctionRefuses a Solana swap that does more than this leg.
checkLifiLegfunctionEvery check a leg must pass before the sending wallet is asked to sign it (throws verification_failed).
checkPartnerFeeInputfunctionChecks what was asked, before any quote.
ClaimResultinterfaceWhat claiming a sale's payout answers: the function called, the transaction, the Bitcoin txid and the amount settled.
CreateBridgedBuyInputinterfaceThe input of a two-leg buy: the EVM wallet, the Bitcoin address, the bond, the confirmations and a progress callback.
createBridgedBuyOrderfunctionEvm-btc-bridge from a wallet the SDK holds.
CreateBtcToEvmInputinterfaceThe input of a BTC sale to an EVM coin: the sats to sell, the payout chain and token, and the signers.
CreateBtcToSolInputinterfaceThe input of a BTC to Solana order: the Solana and Bitcoin signers, the coin, the sats and the quoted amount.
CreateDirectInputinterfaceThe input of a buy that escrows the chain's coin or a token directly, with the prices and the approval mode.
CreateEvmToBtcInputinterfaceThe input of a buy: the chain, the Bitcoin address, the sats to receive, the EVM signer and the prices.
CreateGaslessInputinterfaceThe input of a gasless USDC buy: the order, the prices and the token.
CreateNonEvmBuyInputinterfaceThe input of a buy paid from Tron or Sui: the EVM wallet between the legs, the Tron or Sui signer and the Bitcoin address.
createNonEvmBuyOrderfunctionA Tron or Sui coin -> BTC from wallets the SDK holds.
CreateOrderParamsinterfaceSigners and addresses createOrder may need, depending on the route.
CreateSolToBtcInputinterfaceThe input of a SOL to BTC order: the Solana signer, the coin, the amount and the Bitcoin address.
createSwapfunctionBuilds the swap module on a context: routes, prices, quotes, orders, status and refunds.
CrossEvmChecktypeThe verdict of a transaction that passed the SDK's own check.
CrossEvmQuoteInputinterfaceThe input of a coin-to-coin quote between EVM chains: both chains and tokens, the amount and the sender.
CrossEvmStatusInputinterfaceThe input of a coin-to-coin status read: the source transaction, both chains and the carrier.
describeAssetfunctionSymbol, decimals and chain name of a coin (read on-chain once for tokens Maxy does not list).
EscrowStateinterfaceA buy's escrow as the settler holds it: open or not, the maker, the commit and the fill.
EvmToBtcPricesinterfaceThe prices a buy is signed at: BTC and the paid coin in dollars, and the solver's cost to fill.
ExecuteParamsinterfaceswap.execute.
fillCostUsdfunctionUSD the solver spends to fill one buy.
findFreeNoncefunctionThe lowest unused settler nonce for maker.
formatAmountfunctionAn amount in the smallest unit as whole coins, without trailing zeros.
formatQuotefunctionReadable figures for a quote.
FoundTokeninterfaceA token found by swap.searchTokens: chain, symbol, name, address and decimals read on chain.
getEscrowStatefunctionReads a buy's escrow from its settler: whether it is open, committed or filled.
getSellTemplatefunctionSell_capacity with settler:{maker}.
INTENT_TTL_SECvalueThe intent stays valid this long (same as the app).
intentDepositfunctionThe deposit the settler takes for a LIMIT intent at the top of its signed slippage band (PricingLib.buyDepositAmount).
intentJsonfunctionThe intent as JSON for the solver (it int()s every field).
intentTypedDatafunctionThe EIP-712 typed data of a settler intent, for a wallet to sign.
isBridgedBuySourcefunctionTrue when (chain, token) buys BTC in two legs.
isNonEvmChainvalueWhether a chain name is Tron or Sui.
JupiterQuoteinterfaceA quote for the Solana swap leg: the two mints, the amounts in and out, the minimum and the slippage.
jupiterSwapTransactionfunctionThe Solana swap transaction for this wallet (base64), built from a quote (the app's getJupiterSwapTransaction).
keyCapUsdfunctionThis client's key cap, read once from GET /key (null.
LifiLeginterfaceA LI.FI leg from or to Tron or Sui: both chains and tokens, the amount, the sender and the recipient.
lifiLegStatusfunctionWhere a LI.FI leg stands, from LI.FI's own status (by the source transaction).
LifiQuoteinterfaceA bridge leg as the solver's route picker handed it out.
lifiStatefunctionA bridge leg's state from its status, whichever carrier took it.
LifiStatusinterfaceWhere a bridge leg stands.
limitPriceForfunctionMarket price per sat in token base units scaled 1e18, from USD prices (the app's pricing.marketPricePerSat).
listChainsfunctionEvery chain Maxy swaps on, with its type, native coin and settler.
listPairsfunctionEvery pair Maxy swaps, in plain words.
listTokensfunctionThe tokens on one chain (a name or id), or on every chain.
ListTokensOptionsinterfaceOptions of swap.listTokens: also list the tokens in no pair.
LivePricinginterfaceThe solver's live prices: BTC, ETH and USDC in dollars, wei per sat and the margin every buy price carries.
localIntentHashfunctionThe EIP-712 hash of a settler intent, computed locally.
MAX_FILL_COST_FRACTIONvalueThe fill cost is always folded into the signed price, so the escrow carries what the quote charged (the market maker's get_quote already deducts it from the sats).
MaxySwaptypeThe swap module that createSwap returns.
merkleRootfunctionFolds a merkle branch (internal byte order) for leaf txidInternal at pos.
MM_SAFEexportThe market maker's Safe, the same address on every EVM chain.
NON_EVM_CHAINSvalueTron and Sui as the SDK knows them: LI.FI's chain id, name, native coin and listed coins.
NonEvmChaintypeA chain with no EVM address: 'tron' or 'sui'.
NonEvmChainInfointerfaceTron or Sui as the SDK knows it: LI.FI's chain id, name, native coin and the coins listed there.
nonEvmChainOfIdfunctionTron or Sui for LI.FI's chain id, or null for any other chain.
orderCapIssuefunctionOver the key's cap.
OrderCapIssueinterfaceAn order over your key's size cap: the cap, the order's size in dollars and the message to show.
orderCapMessagevalueThe refusal, word for word as Maxy's servers give it.
orderSatsfunctionThe BTC side of an order in sats.
orderUsdfunctionAn order's size in dollars.
parseAmountfunctionAn amount in whole coins ('0.01', 0.01, '1,000.50') or the smallest unit (bigint), in the smallest unit.
parseAssetfunctionA coin in any AssetInput form, as the precise { chain, token } the routes take.
parseChainfunctionThe chain a name, an id or a CAIP-2 id (eip155:8453, bip122:…, solana:…) stands for, or null.
PARTNER_FEE_MAX_BPSvalueThe largest partner fee, in basis points of the trade (1%).
PARTNER_FEE_ROUTESvalueThe routes a partner fee runs on.
PARTNER_FEE_ROUTES_TEXTvaluePARTNER_FEE_ROUTES in words, for every message and the spec (a btc-evm sale takes a fee only with two legs).
PartnerFeeinterfaceThe fee on a quote.
partnerFeeForfunctionThe partner fee on a quote, or null for none.
partnerFeeFromJsonfunctionA fee back from its JSON form (an order the API handed out), every field checked.
PartnerFeeInputinterfaceWhat a partner asks for, on a price, a quote or an order.
partnerFeeJsonfunctionThe fee as the HTTP API and an order carry it.
partnerFeeTransactionfunctionThe transaction the user's wallet sends to pay the fee.
planReclaimfunctionWhich settler call returns the deposit, following the live V6 rules (fork-tested by the app, services/dexService.ts).
prepareBridgedBuyfunctionThe order a two-leg quote describes, for maker.
PREPARED_TTL_SECvalueA prepared order stays usable this long; after that createOrder prepares again.
PreparedBridgedBuyinterfaceA two-leg buy ready to sign: the escrow order on the settler chain and the checked leg before it.
PreparedEscrowOrderinterfaceEverything an evm-btc-escrow order reads before the wallet prompts, done ahead of the user's confirmation.
PreparedNonEvmBuyinterfaceA buy from Tron or Sui ready to sign: the escrow on Base, the checked LI.FI leg and what it delivers.
prepareNonEvmBuyfunctionThe order a Tron or Sui quote describes.
PricedQuotetypeA quote as swap.price and swap.quote give it.
quoteBridgedBuyfunctionQuotes a two-leg buy.
quoteJupiterfunctionThe Solana swap router's quote for swapping lamports of SOL (or that raw amount of inMint) into outMint (the app's getJupiterQuote).
quoteLifiLegfunctionA LI.FI leg to or from Tron or Sui, asked as the app asks it.
quoteNonEvmBuyfunctionQuotes a Tron or Sui coin -> BTC.
quoteNonEvmPayoutLegfunctionLeg 2 of BTC -> a Tron or Sui coin, priced (and, with the EVM wallet, built).
QuoteRequestinterfaceThe input of swap.quote: the coins, the amount, the addresses and the options of the route.
quoteSwapfunctionQuotes a swap.
QuoteWordsinterfaceA quote in words.
readSettlerEscrowfunctionReads the escrow of a settler sell on-chain.
ReclaimFunctiontypeThe settler function that takes an escrow back: cancel, slash or refund after expiry.
ReclaimPlaninterfaceHow to take an escrow back: the function, the settler, the calldata and the escrow's state.
resolveRoutefunctionThe route the SDK uses for a pair of assets (the same choice the app makes), or throws unsupported_route.
SEARCH_CHAINSvalueThe chains a token can be searched on.
searchTokensfunctionTokens on chainId matching query (a symbol, a name, or an address), the closest first.
SELL_SETTLER_CHAINSvalueSettler payout chains (every coin each settler pays is in SETTLER_SELL_CHAINS).
SellPaymentinterfaceA sale's Bitcoin payment: its txid, output, block height and the proof that it was paid.
SellTemplateinterfaceThe solver's offer for a sale: its executable payout and the sell intent to sign.
sendJupiterLegfunctionSends the Solana swap leg of a BTC to Solana-coin order from the user's wallet, after checking it.
sendSuiLegfunctionSends a checked Sui leg from sui (LI.FI's TransactionData, signed as it is) and answers its digest.
sendTronLegfunctionSends a checked Tron leg from tron.
settleChainForfunctionThe chain whose settler takes a two-leg buy from chainId.
SETTLER_SELL_CHAINSexportThe chains where the settler pays out a sale, with the coins it pays.
SettlerAssettypeA coin the Solana settler pays: symbol, mint, decimals and token program.
SettlerEscrowinterfaceA sale's escrow on the settler: chain, settler, intent hash, commitment and the Bitcoin script to pay.
SettlerIntentinterfaceThe V6 BitcoinIntentSettler Intent struct (20 fields, the EIP-712 primary type).
settlerSellAssetexportThe settler's payout coin for a chain and token, or null when the settler does not pay it.
SettlerSellTemplatetypeThe sell intent the solver offers for a sale: chain, settler, filler, intent and script.
SOL_SWAP_RESERVE_LAMPORTSvalueSOL the wallet keeps from the settler's payout for the swap's own fees and accounts (the app's SOL_SWAP_RESERVE_LAMPORTS).
solanaStatefunctionSolana V2 offer phases, for the user.
solverStatefunctionMaps a solver status (EVM <-> BTC routes) to a SwapState.
StatusTargetinterfaceWhat swap.getStatus reads: the route, the order id, the chain and, for coin to coin, the destination.
stripWitnessfunctionThe transaction without its witness (sha256d of it is the txid the verifier checks).
SWAP_ROUTESvalueEvery swap route name.
SwapAssetinterfaceA coin on a chain: the chain, and the token address, mint, symbol or coin type.
SwapChaintype'bitcoin', 'solana', 'tron' and 'sui' name the non-EVM sides; EVM chains are numeric chain ids.
SwapOrderinterfaceA placed swap order: its route, its id to track it with, its chain and the transactions sent for it.
SwapPairinterfaceOne way to swap, as swap.pairs lists it.
SwapQuoteinterfaceA quote from swap.quote: the route, both coins, the amount sent and the executable amount received, fees and expiry.
SwapRequestinterfaceWhat swap.quote and swap.execute take.
SwapResultinterfaceWhat swap.swap answers: the quote, the placed order and its last status.
SwapRoutetypeSupported swap routes.
SwapStatetypeAn order's state: pending, awaiting_deposit, in_progress, completed, refundable, refunded, cancelled, expired or failed.
SwapStatusinterfaceAn order's status from swap.getStatus: its state, the service's own status, whether it is complete, and its transactions.
SwapUpdatetypeWhat swap.execute reports as it goes, for a progress line or a stepper.
TokenInfointerfaceOne token Maxy lists: chain, symbol, address and decimals.
toQuoteRequestfunctionThe precise QuoteRequest for a plain-words request (reads decimals only when the amount is in whole coins).
verifyIntentHashfunctionRefuses unless the settler's own hashIntent equals the local EIP-712 hash (both must bind the same 20 fields).
withFillCostfunctionThe price a buy signs.

maxy-labs/evm

Buying BTC from an EVM wallet.

ExportKindWhat it is
btcPayoutScriptfunctionThe receive script for a BTC payout.
buildBuyIntentfunctionBuilds the settler intent a buy signs: maker, asset, Bitcoin address, sats, prices, bond, confirmations and deadline.
buyBtcWithEvmfunctionSee core/flows.ts.
BuyWithEvmParamsinterfaceThe input of buyWithEvm: the EVM wallet, the coin and amount to pay (or the BTC wanted) and the Bitcoin address.
ensureEvmChainfunctionPuts the wallet on chainId (switching when it can) and returns the signing account.
EVM_CHAINSvalueEvery EVM chain the SDK reads or sends on, by chain id, with its name, native coin and viem chain.
evmSignerFromEip1193functionWraps an EIP-1193 provider.
evmSignerFromWalletClientfunctionWraps a viem WalletClient (or anything shaped like one) as an EvmSigner.
evmWalletfunctionThe wallet a buy needs, from any of the three.
EvmWalletInputtypeA viem WalletClient, an EIP-1193 provider, or your own signer.
findFreeNoncefunctionThe lowest unused settler nonce for maker.
FlowEvmWalletinterfaceWhat a buy needs from an EVM wallet.
FlowProgresstypeThe state a flow helper reports to onProgress: the swap state machine's current state.
FlowResultinterfaceHow a flow helper ends: the order id, the order as GET /orders/{id} last read it, and the Bitcoin txid.
intentDepositfunctionThe deposit the settler takes for a LIMIT intent at the top of its signed slippage band (PricingLib.buyDepositAmount).
intentTypedDatafunctionThe EIP-712 typed data of a settler intent, for a wallet to sign.
localIntentHashfunctionThe EIP-712 hash of a settler intent, computed locally.
SETTLER_ABIvalueThe settler contract's ABI, the functions and events the SDK uses.
settlerAddressfunctionThe V6 BitcoinIntentSettler on chainId (the contract the swap intent is signed for).
SWAP_CHAIN_IDSvalueThe mainnet EVM chains with a live V6 BitcoinIntentSettler (EVM <-> BTC swaps).
verifyIntentHashfunctionRefuses unless the settler's own hashIntent equals the local EIP-712 hash (both must bind the same 20 fields).

maxy-labs/solana

Buying BTC from a Solana wallet adapter.

ExportKindWhat it is
buyBtcWithSolanafunctionBuy BTC from Solana.
BuyWithSolanaParamsinterfaceThe input of buyWithSolana: the Solana wallet, the coin and amount to pay, and the Bitcoin address that receives the BTC.
FlowProgresstypeThe state a flow helper reports to onProgress: the swap state machine's current state.
FlowResultinterfaceHow a flow helper ends: the order id, the order as GET /orders/{id} last read it, and the Bitcoin txid.
FlowSolanaWalletinterfaceWhat a buy needs from a Solana wallet adapter.
SOLANA_PROGRAMSvalueMaxy's Solana V2 settler on mainnet, as its gateway's /config names it (btc_intents 97CyZ9qd…, btc_spv AVna5sHd…).

maxy-labs/bitcoin

Selling BTC, and Bitcoin address checks.

ExportKindWhat it is
AddressCheckinterfaceWhat GET /addresses/validate answers: whether the address is valid for the chain, its type and network, and whether an order would pay it.
addressToScriptPubKeyfunctionThe output script of a Bitcoin address.
addressUtxosfunctionA Bitcoin address's unspent outputs, read from Esplora.
bip21UrifunctionA bitcoin.
BorrowerBtcIdentityinterfaceA borrower's Bitcoin identity: network, address, type, public key, key hash and script.
borrowerIdentityFromWalletfunctionBuilds a borrower's Bitcoin identity from a wallet's address and public key.
BroadcastOutcometypeHow a Bitcoin broadcast went: sent with the nodes that accepted it, or ambiguous with the reason.
broadcastTxfunctionBroadcasts a raw transaction to every Esplora host.
BTC_NETWORKSvalueThe Bitcoin networks' parameters: address prefixes, key versions and BIP-32 versions.
BtcAddressErrorclassThrown for a Bitcoin address that is not valid or not on the expected network.
btcDepositAllowlistfunctionThe Bitcoin deposit addresses the SDK accepts for a sale besides an attested escrow script.
BtcNetworkNametypeA Bitcoin network name: mainnet, signet or regtest.
BtcNetworkParamsinterfaceOne Bitcoin network's parameters: bech32 prefix, address versions, key format and BIP-32 versions.
BtcScriptErrorclassThrown for a Bitcoin script that does not match what a MaxyLock loan expects, with the field at fault.
btcToSatsfunction"0.015" -> 1_500_000n.
BtcTxErrorclassThrown when a Bitcoin transaction cannot be built or finalized, with a code saying why.
buildCollateralWitnessScriptfunctionBuilds the witness script that locks a loan's BTC collateral.
buildFundingPsbtfunctionBuilds the PSBT that funds a loan's Bitcoin outputs from a wallet's coins at a fee rate.
buildInterestWitnessScriptfunctionBuilds the witness script that locks a loan's interest output.
buildPaymentfunctionBuilds (does not sign) a payment from the signer's wallet with outputs first, in order, and change last.
buildPaymentPsbtfunctionA plain payment from the connected wallet with the outputs in exactly the given order and change (if any) last, for a receiver that reads the deposit as output 0 (a wallet's own send may put change first).
BuiltPaymentinterfaceA Bitcoin payment ready to sign: the payer's identity and the funding plan.
checkBtcDepositAddressfunctionDecides whether a server-supplied BTC deposit address may be paid.
DecodedHtlctypeA MaxyLock Bitcoin script decoded: collateral or interest, with its hashlock, keys and timelock.
decodeHtlcScriptfunctionDecodes a MaxyLock witness script into its hashlock, keys and timelock.
DepositVerdicttypeWhether a sale's deposit address is accepted, and why.
DUST_SATSvalueThe smallest Bitcoin output a node relays: 546 sats.
encodeSegwitAddressfunctionEncodes a SegWit address from its witness version and program.
esploraBasesForfunctionThe Esplora API bases the SDK reads for a Bitcoin network.
EsploraErrorclassThrown when every Esplora base failed for a read, with each attempt.
esploraFetchJsonfunctionReads JSON from Esplora, trying each base in turn.
EsploraFetchOptionsinterfaceOptions of the Esplora reads: abort signal, timeout, bases, network and fetch.
esploraOptionsfunctionThe Esplora options for a client: the bases through Maxy's host and its fetch.
EsploraTxinterfaceA Bitcoin transaction as Esplora answers it: id, inputs, outputs and status.
EsploraTxStatusinterfaceA Bitcoin transaction's confirmation status: confirmed or not, and its block.
EsploraUtxointerfaceOne unspent output of an address: txid, output, value and confirmation.
FeeTargettypeHow fast a Bitcoin payment should confirm: fast, medium or slow.
fetchConfirmedUtxosfunctionThe wallet's confirmed UTXOs with their previous transactions (needed to sign legacy-safe SegWit inputs).
fetchFeeRatefunctionSat/vB from Esplora fee-estimates (fast = next block).
finalizeFundingPsbtfunctionFinalizes a signed funding PSBT into the raw transaction, its txid, size and fee.
fromSmallestfunctionThe smallest unit as whole coins, without trailing zeros.
FundingOutputSpecinterfaceOne output of a loan's funding transaction: its tranche, script hash and sats.
FundingPlaninterfaceA loan's funding transaction before signing: the PSBT, the expected txid, inputs, outputs and fee.
generateSecretfunctionA random 32-byte secret for a loan's hashlock.
getOutspendfunctionWhether an output is spent, and by which transaction, read from Esplora.
getTipHeightfunctionThe current Bitcoin block height, read from Esplora.
getTxfunctionA Bitcoin transaction read from Esplora.
getTxHexfunctionA Bitcoin transaction's raw hex, read from Esplora.
getTxStatusfunctionA Bitcoin transaction's confirmation status, read from Esplora.
hashlockOffunctionThe SHA-256 hashlock of a loan secret.
INTEREST_RECOVERY_DELAY_SECvalueHow long after a loan's end the borrower may take back an unclaimed interest output: 7 days.
INTEREST_SWEEP_DELAY_SECvalueHow long after the interest output confirms the lender may sweep it: 10 minutes.
isBtcNetworkNamefunctionWhether a value is a Bitcoin network name.
isStandardScriptPubKeyfunctionWhether an output script is a standard type, and which.
MIN_WALLET_UTXO_SATSvalueThe smallest wallet coin used to fund a payment: 1,000 sats.
miniscriptDescriptorfunctionThe miniscript descriptor of a decoded MaxyLock script, for a wallet that reads descriptors.
p2wshAddressfunctionThe P2WSH address of a script hash on a network.
p2wshScriptPubKeyfunctionThe P2WSH output script of a script hash.
payerIdentityfunctionThe signer's account as a MaxyLock payer identity (P2WPKH or P2SH-P2WPKH only).
PaymentInstructionsinterfaceWhere and how much BTC to send for a sale: the address, the exact sats, the deadline and the bitcoin: URI.
PaymentOutputinterfaceOne output of a Bitcoin payment: an address or a raw script, and the sats.
payToAddressfunctionPays exactly sats to address as output 0 (change last) and broadcasts it.
pkhFromPubkeyfunctionThe HASH160 of a public key.
SATS_PER_BTCvalueSats in one BTC: 100,000,000.
satsToBtcfunction1_500_000n -> "0.015".
scriptHashToP2wshAddressfunctionThe P2WSH address of a script hash.
scriptHashToP2wshScriptPubKeyfunctionThe P2WSH output script of a script hash.
scriptPubKeyToAddressfunctionThe Bitcoin address of an output script.
secretMatchesHashlockfunctionWhether a secret hashes to a hashlock.
sellBtcfunctionSell BTC to a chain.
SellHandleinterfaceWhat sellBtc answers before the BTC is sent: the order id, the payment instructions, and a promise of the end.
SellParamsinterfaceThe input of sellBtc: the wallet that receives and signs, the coin wanted and the BTC to sell.
SentPaymentinterfaceA Bitcoin payment sent: its txid, raw transaction, fee and how the broadcast went.
SIGHASH_ALLvalueThe SIGHASH_ALL flag (0x01).
SIGHASH_SINGLE_ANYONECANPAYvalueThe SIGHASH_SINGLE | ANYONECANPAY flag (0x83), used for the bundled collateral returns.
signAndBroadcastfunctionSigns a built payment with the wallet, checks the signed tx is unchanged, and broadcasts it.
StandardScriptTypetypeA standard Bitcoin output type: p2wpkh, p2wsh, p2tr, p2pkh or p2sh.
TEMPLATE_VERSIONvalueThe version of the MaxyLock Bitcoin script template the SDK builds and checks.
toSmallestfunctionWhole coins as a decimal string to the smallest unit.
unitsvalueAmount helpers: whole coins to the smallest unit and back, and BTC to sats and back, as decimal strings.
validateAddressfunctionThe check for one address on one chain (a chain from parseChain).
verifyFundingPsbtfunctionChecks that a signed funding PSBT is the plan it came from; throws otherwise.
WalletUtxointerfaceOne coin of the borrower's wallet: txid, output, value, confirmation and its previous transaction.
witnessScriptHashfunctionThe SHA-256 of a witness script, as a P2WSH output commits to it.

maxy-labs/server

Backend helpers: webhooks, checkout links, statements.

ExportKindWhat it is
CHECKOUT_URLvalueMaxy's hosted checkout.
CheckoutParamsinterfaceThe input of checkoutUrl: your publishable key, the starting amount and coin, and the destination.
constructEventfunctionThe same check as verifyWebhook, from a framework's request.
downloadStatementfunctionA month's statement.
exportOrdersfunctionA month of a key's orders as CSV, the ledger a finance team reconciles.
handleOncefunctionYour own idempotent handler around an event.
MaxyWebhookEventtypeA webhook event: its id, type, time, a sandbox mark and the order data.
revokeKeyfunctionRevokes one of your keys by its prefix; calls with it are refused from then on.
rotateKeyfunctionRotates a secret key.
signCheckoutUrlfunctionA hosted checkout URL, signed on your server with your secret key.
signWebhookexportSigns a webhook body as Maxy does, for testing your receiver.
statementsvalueMonthly statements from your server: download a month in JSON, CSV or PDF.
verifyWebhookexportChecks a webhook delivery's signature and age and returns its event; throws on a bad one.

maxy-labs/testing

A mock API, fixtures and a state simulator.

ExportKindWhat it is
CatalogueRowtypeOne error code in the catalogue: the code, its HTTP status and what it means.
createMockFetchfunctionA fetch that answers as the API does, for createMaxyRest({ fetch }).
ERROR_CATALOGUEexportEvery error code the API sends, with its HTTP status and meaning.
ERROR_FIXTURESvalueEvery code the API can answer, with its fixture.
errorFixturefunctionThe envelope the API answers code with.
MaxyErrorCodetypeEvery error code the SDK and the API use, as a union of strings.
MockApiOptionsinterfaceOptions of the mock API: a simulator for order walks and your own answers tried first.
mswHandlersfunctionHandlers for Mock Service Worker, if your tests use it.
SandboxSimulatorclassOrders that move when you say, in memory.
SimulatedOrderinterfaceAn order in the simulator: its id, route and the states it walks, one per read.

maxy-labs/orders

One list of a wallet's swaps and loans.

ExportKindWhat it is
createOrdersfunctionBuilds the order history module: one list of a wallet's swaps and loans from every source.
intentRowToOrderfunctionA cross_chain_intents row (submit-intent's order record) as a MaxyOrder.
ledgerRowToOrderfunctionA row of the app's orders ledger as a MaxyOrder.
ListOrdersInputinterfaceThe input of orders.list: the wallet, which sources to read, and paging.
ListOrdersResultinterfaceWhat orders.list answers: the orders, newest first, and the sources that could not be read.
MaxyOrderinterfaceOne order in a wallet's history, swap or loan, in a single shape: id, route, state, amounts, transactions and times.
MaxyOrderstypeThe order history module that createOrders returns.
OrderAmountinterfaceAn amount in an order: the asset, the integer amount in its smallest unit, and the chain.
OrderChaintypeWhere an order's amount or transaction is: an EVM chain id, 'bitcoin' or 'solana'.
OrderKindtypeWhat an order is: a swap or a loan.
OrderSourcesinterfaceExtra sources for orders.list, such as the signed-in wallet's loans.
OrderStatetypeNormalized lifecycle state.
OrderTxinterfaceOne transaction of an order: what it did, its chain and its hash.
swapOrderToOrderfunctionA SwapOrder this SDK created, with its live status, as a MaxyOrder.

maxy-labs/btc

Bitcoin transactions, PSBTs and proofs.

ExportKindWhat it is
addressToScriptPubKeyfunctionThe output script of a Bitcoin address.
addressUtxosfunctionA Bitcoin address's unspent outputs, read from Esplora.
BorrowerBtcIdentityinterfaceA borrower's Bitcoin identity: network, address, type, public key, key hash and script.
borrowerIdentityFromWalletfunctionBuilds a borrower's Bitcoin identity from a wallet's address and public key.
BroadcastOutcometypeHow a Bitcoin broadcast went: sent with the nodes that accepted it, or ambiguous with the reason.
broadcastTxfunctionBroadcasts a raw transaction to every Esplora host.
BTC_NETWORKSvalueThe Bitcoin networks' parameters: address prefixes, key versions and BIP-32 versions.
BtcAddressErrorclassThrown for a Bitcoin address that is not valid or not on the expected network.
btcDepositAllowlistfunctionThe Bitcoin deposit addresses the SDK accepts for a sale besides an attested escrow script.
BtcNetworkNametypeA Bitcoin network name: mainnet, signet or regtest.
BtcNetworkParamsinterfaceOne Bitcoin network's parameters: bech32 prefix, address versions, key format and BIP-32 versions.
BtcScriptErrorclassThrown for a Bitcoin script that does not match what a MaxyLock loan expects, with the field at fault.
btcToSatsfunction"0.015" -> 1_500_000n.
BtcTxErrorclassThrown when a Bitcoin transaction cannot be built or finalized, with a code saying why.
buildCollateralWitnessScriptfunctionBuilds the witness script that locks a loan's BTC collateral.
buildFundingPsbtfunctionBuilds the PSBT that funds a loan's Bitcoin outputs from a wallet's coins at a fee rate.
buildInterestWitnessScriptfunctionBuilds the witness script that locks a loan's interest output.
buildPaymentfunctionBuilds (does not sign) a payment from the signer's wallet with outputs first, in order, and change last.
buildPaymentPsbtfunctionA plain payment from the connected wallet with the outputs in exactly the given order and change (if any) last, for a receiver that reads the deposit as output 0 (a wallet's own send may put change first).
BuiltPaymentinterfaceA Bitcoin payment ready to sign: the payer's identity and the funding plan.
checkBtcDepositAddressfunctionDecides whether a server-supplied BTC deposit address may be paid.
DecodedHtlctypeA MaxyLock Bitcoin script decoded: collateral or interest, with its hashlock, keys and timelock.
decodeHtlcScriptfunctionDecodes a MaxyLock witness script into its hashlock, keys and timelock.
DepositVerdicttypeWhether a sale's deposit address is accepted, and why.
DUST_SATSvalueThe smallest Bitcoin output a node relays: 546 sats.
encodeSegwitAddressfunctionEncodes a SegWit address from its witness version and program.
esploraBasesForfunctionThe Esplora API bases the SDK reads for a Bitcoin network.
EsploraErrorclassThrown when every Esplora base failed for a read, with each attempt.
esploraFetchJsonfunctionReads JSON from Esplora, trying each base in turn.
EsploraFetchOptionsinterfaceOptions of the Esplora reads: abort signal, timeout, bases, network and fetch.
esploraOptionsfunctionThe Esplora options for a client: the bases through Maxy's host and its fetch.
EsploraTxinterfaceA Bitcoin transaction as Esplora answers it: id, inputs, outputs and status.
EsploraTxStatusinterfaceA Bitcoin transaction's confirmation status: confirmed or not, and its block.
EsploraUtxointerfaceOne unspent output of an address: txid, output, value and confirmation.
FeeTargettypeHow fast a Bitcoin payment should confirm: fast, medium or slow.
fetchConfirmedUtxosfunctionThe wallet's confirmed UTXOs with their previous transactions (needed to sign legacy-safe SegWit inputs).
fetchFeeRatefunctionSat/vB from Esplora fee-estimates (fast = next block).
finalizeFundingPsbtfunctionFinalizes a signed funding PSBT into the raw transaction, its txid, size and fee.
FundingOutputSpecinterfaceOne output of a loan's funding transaction: its tranche, script hash and sats.
FundingPlaninterfaceA loan's funding transaction before signing: the PSBT, the expected txid, inputs, outputs and fee.
generateSecretfunctionA random 32-byte secret for a loan's hashlock.
getOutspendfunctionWhether an output is spent, and by which transaction, read from Esplora.
getTipHeightfunctionThe current Bitcoin block height, read from Esplora.
getTxfunctionA Bitcoin transaction read from Esplora.
getTxHexfunctionA Bitcoin transaction's raw hex, read from Esplora.
getTxStatusfunctionA Bitcoin transaction's confirmation status, read from Esplora.
hashlockOffunctionThe SHA-256 hashlock of a loan secret.
INTEREST_RECOVERY_DELAY_SECvalueHow long after a loan's end the borrower may take back an unclaimed interest output: 7 days.
INTEREST_SWEEP_DELAY_SECvalueHow long after the interest output confirms the lender may sweep it: 10 minutes.
isBtcNetworkNamefunctionWhether a value is a Bitcoin network name.
isStandardScriptPubKeyfunctionWhether an output script is a standard type, and which.
MIN_WALLET_UTXO_SATSvalueThe smallest wallet coin used to fund a payment: 1,000 sats.
miniscriptDescriptorfunctionThe miniscript descriptor of a decoded MaxyLock script, for a wallet that reads descriptors.
p2wshAddressfunctionThe P2WSH address of a script hash on a network.
p2wshScriptPubKeyfunctionThe P2WSH output script of a script hash.
payerIdentityfunctionThe signer's account as a MaxyLock payer identity (P2WPKH or P2SH-P2WPKH only).
PaymentOutputinterfaceOne output of a Bitcoin payment: an address or a raw script, and the sats.
payToAddressfunctionPays exactly sats to address as output 0 (change last) and broadcasts it.
pkhFromPubkeyfunctionThe HASH160 of a public key.
SATS_PER_BTCvalueSats in one BTC: 100,000,000.
satsToBtcfunction1_500_000n -> "0.015".
scriptHashToP2wshAddressfunctionThe P2WSH address of a script hash.
scriptHashToP2wshScriptPubKeyfunctionThe P2WSH output script of a script hash.
scriptPubKeyToAddressfunctionThe Bitcoin address of an output script.
secretMatchesHashlockfunctionWhether a secret hashes to a hashlock.
SentPaymentinterfaceA Bitcoin payment sent: its txid, raw transaction, fee and how the broadcast went.
SIGHASH_ALLvalueThe SIGHASH_ALL flag (0x01).
SIGHASH_SINGLE_ANYONECANPAYvalueThe SIGHASH_SINGLE | ANYONECANPAY flag (0x83), used for the bundled collateral returns.
signAndBroadcastfunctionSigns a built payment with the wallet, checks the signed tx is unchanged, and broadcasts it.
StandardScriptTypetypeA standard Bitcoin output type: p2wpkh, p2wsh, p2tr, p2pkh or p2sh.
TEMPLATE_VERSIONvalueThe version of the MaxyLock Bitcoin script template the SDK builds and checks.
verifyFundingPsbtfunctionChecks that a signed funding PSBT is the plan it came from; throws otherwise.
WalletUtxointerfaceOne coin of the borrower's wallet: txid, output, value, confirmation and its previous transaction.
witnessScriptHashfunctionThe SHA-256 of a witness script, as a P2WSH output commits to it.

maxy-labs/borrow

Deprecated: MaxyLock through the swap SDK, working until 2.0. Use @maxy-labs/loans.

ExportKindWhat it is
BORROW_MARKETSexportEvery MaxyLock market the SDK lends in.
BorrowerBtcIdentitytypeA borrower's Bitcoin identity: network, address, type, public key, key hash and script.
BorrowerLoaninterfaceOne of the borrower's loans: its market, its request, the loan on chain and the same as a MaxyOrder.
BorrowMarkettypeA MaxyLock market name: base-mainnet, robinhood-mainnet, or the deprecated mainnet.
BorrowMarketInfotypeOne MaxyLock market: chain, lent asset, its decimals and contracts, and whether it takes loans.
BorrowQuoteinterfaceA loan quote with the market it is for.
BroadcastOutcometypeHow a Bitcoin broadcast went: sent with the nodes that accepted it, or ambiguous with the reason.
BtcSpendResultinterfaceOne Bitcoin spend of a loan's tranche: its index, txid and how the broadcast went.
BtcWalletIdentityinterfaceThe Bitcoin wallet a borrower locks collateral from: network, address and public key.
canonicalMarketexportThe canonical name of a market ('mainnet' becomes 'base-mainnet'); undefined is the default.
createBorrowfunctionBuilds the MaxyLock loans module on a context: markets, vaults, quotes, requests, funding, repayment and claims.
DEFAULT_BORROW_MARKETexportThe market used when none is named: base-mainnet (USDC on Base).
deploymentForexportThe MaxyLock deployment behind a market.
fromCodecErrorfunctionTurns a MaxyLockApiError (thrown by the shared codec) into a MaxyError.
FundingPlantypeA loan's funding transaction before signing: the PSBT, the expected txid, inputs, outputs and fee.
FundingPreparationinterfaceReturned only by prepareFunding.
FundingResultinterfaceA loan's collateral funding sent: the market, loan, request, txid, raw transaction and fee.
FundingTargettypeWhat borrow.fund takes: the market, the Bitcoin signer, the fee rate and the coins to spend.
isBorrowMarketexportWhether a value is a MaxyLock market name.
KeeperHeartbeattypeThe loan keeper's last run: when it finished, the block it reached and whether it was healthy.
LoantypeA loan as the MaxyLock contract's getLoan answers it.
LoanMirrorRowtypeA loan as Maxy's index mirrors it from the chain: id, vault, request, borrower, state and phase.
loanOrderStateexportThe order state of a loan, from its request and its phase on chain.
LoanRequestRowtypeA loan request as Maxy holds it: id, vault, status, reason, error and the loan once committed.
LoanStatustypeA loan's display status: a key, a label, a tone and any missed or overdue tranches.
LoanViewinterfaceA loan as the borrower sees it: the loan on chain, its display status and what can be done next.
marketInfoexportA market's details: chain, lent asset, contracts and readiness.
MarketParaminterfaceThe market a borrow call runs in; default base-mainnet.
MaxyBorrowtypeThe MaxyLock loans module that createBorrow returns.
MAXYLOCK_CODE_MAPvalueMaxyLock server / codec code -> SDK code.
MaxyLockQuotetypeA loan quote: vault, principal, collateral, tranches, rates and the signed payload.
MaxyLockVaulttypeA lending vault: id, name, status, loan contract and lent asset.
MaxyLockVaultStatstypeA vault's figures: available to lend, lent out, exposure and active loans.
PreimageSourcetypeWhere a loan's secret came from: revealed on chain, disclosed for an unfunded loan, or a missed reveal.
QuoteParamstypeThe input of borrow.quote: the vault and either the amount to borrow or the BTC to lock.
RepayResultinterfaceA repayment sent: the approval, each tranche's repayment transaction and the total.
RequestStatustypeA loan request's status, from requested to committed, cancelled or failed.
ReturnAuthorizationtypeThe borrower's signed returns of the collateral: one bundled PSBT or one per tranche.
SendOptionstypeOptions of a loan transaction: whether to wait for the receipt, and how long and how often.
sessionWalletOfTokenfunctionThe wallet a Maxy session token belongs to (email <wallet>@wallet.local confirmed by app_metadata), or null if unreadable.
SignedTermsinterfaceLoan terms signed by the borrower: the request, the signature and the request's status after it.
TermsPlanV1typeThe plan a loan request's terms are built from: deployment, vault, anchor time and timings.
toMaxyOrderexportA loan request as a MaxyOrder, for one list with swaps.
ToMaxyOrderOptionstypeOptions of toMaxyOrder: the market the row came from and the loan's mirror row.
TrancheMirrorRowtypeOne Bitcoin tranche of a loan as indexed: kind, state, script hash, sats and timelock.
VaultCapacityinterfaceA vault and whether it lends now: its figures and the keeper's health.
VerifiedCommittedLoantypeA committed loan checked against the borrower's identity: its funding outputs and tranches.
VerifiedLoanRequestinterfaceReturned only by createRequest after verifyPlanForBorrower passed.
VerifiedPlantypeA loan plan checked locally: the plan, the borrower's identity, the terms and their hash.
VerifyPlanCodetypeWhy a loan plan failed its local check, as a code.
WalletUtxotypeOne coin of the borrower's wallet: txid, output, value, confirmation and its previous transaction.

@maxy-labs/loans

MaxyLock: borrowing USDC or USDG against BTC. createMaxyLoans() gives borrow and auth.

ExportKindWhat it is
BitcoinSignerinterfaceWhat the SDK needs from a Bitcoin wallet: its network, its payment account and public key, and PSBT signing.
bitcoinSignerFromKeyfunctionA mainnet BitcoinSigner over a key (WIF or hex) whose payment account is its native SegWit (bc1q…) address.
BORROW_MARKETSexportEvery MaxyLock market the SDK lends in.
BorrowerBtcIdentitytypeA borrower's Bitcoin identity: network, address, type, public key, key hash and script.
BorrowerLoaninterfaceOne of the borrower's loans: its market, its request, the loan on chain and the same as a MaxyOrder.
BorrowMarkettypeA MaxyLock market name: base-mainnet, robinhood-mainnet, or the deprecated mainnet.
BorrowMarketInfotypeOne MaxyLock market: chain, lent asset, its decimals and contracts, and whether it takes loans.
BorrowQuoteinterfaceA loan quote with the market it is for.
BroadcastOutcometypeHow a Bitcoin broadcast went: sent with the nodes that accepted it, or ambiguous with the reason.
BtcSpendResultinterfaceOne Bitcoin spend of a loan's tranche: its index, txid and how the broadcast went.
BtcWalletIdentityinterfaceThe Bitcoin wallet a borrower locks collateral from: network, address and public key.
canonicalMarketexportThe canonical name of a market ('mainnet' becomes 'base-mainnet'); undefined is the default.
createBorrowfunctionBuilds the MaxyLock loans module on a context: markets, vaults, quotes, requests, funding, repayment and claims.
createMaxyLoansfunctionA loans client.
DEFAULT_BORROW_MARKETexportThe market used when none is named: base-mainnet (USDC on Base).
deploymentForexportThe MaxyLock deployment behind a market.
EvmSignerinterfaceWhat the SDK needs from an EVM wallet: its address and chain, switching chains, signing typed data and sending transactions.
evmSignerFromEip1193functionWraps an EIP-1193 provider.
evmSignerFromPrivateKeyfunctionAn EvmSigner over a private key (0x + 64 hex).
evmSignerFromWalletClientfunctionWraps a viem WalletClient (or anything shaped like one) as an EvmSigner.
fromCodecErrorfunctionTurns a MaxyLockApiError (thrown by the shared codec) into a MaxyError.
FundingPlantypeA loan's funding transaction before signing: the PSBT, the expected txid, inputs, outputs and fee.
FundingPreparationinterfaceReturned only by prepareFunding.
FundingResultinterfaceA loan's collateral funding sent: the market, loan, request, txid, raw transaction and fee.
FundingTargettypeWhat borrow.fund takes: the market, the Bitcoin signer, the fee rate and the coins to spend.
isBorrowMarketexportWhether a value is a MaxyLock market name.
isMaxyErrorfunctionWhether a value is a MaxyError, optionally with a given code.
KeeperHeartbeattypeThe loan keeper's last run: when it finished, the block it reached and whether it was healthy.
LoantypeA loan as the MaxyLock contract's getLoan answers it.
LoanMirrorRowtypeA loan as Maxy's index mirrors it from the chain: id, vault, request, borrower, state and phase.
loanOrderStateexportThe order state of a loan, from its request and its phase on chain.
LoanRequestRowtypeA loan request as Maxy holds it: id, vault, status, reason, error and the loan once committed.
LoanStatustypeA loan's display status: a key, a label, a tone and any missed or overdue tranches.
LoanViewinterfaceA loan as the borrower sees it: the loan on chain, its display status and what can be done next.
marketInfoexportA market's details: chain, lent asset, contracts and readiness.
MarketParaminterfaceThe market a borrow call runs in; default base-mainnet.
MaxyBorrowtypeThe MaxyLock loans module that createBorrow returns.
MaxyClientConfiginterfaceThe options of createMaxyClient: API key, API URL, RPC URLs, your own hosts, fetch and the session source.
MaxyErrorclassThe error every SDK call throws: a stable code, the HTTP status, whether a retry can help, and the request id.
MaxyLoanstypeThe client createMaxyLoans returns: borrow and auth.
MAXYLOCK_CODE_MAPvalueMaxyLock server / codec code -> SDK code.
MaxyLockQuotetypeA loan quote: vault, principal, collateral, tranches, rates and the signed payload.
MaxyLockVaulttypeA lending vault: id, name, status, loan contract and lent asset.
MaxyLockVaultStatstypeA vault's figures: available to lend, lent out, exposure and active loans.
PreimageSourcetypeWhere a loan's secret came from: revealed on chain, disclosed for an unfunded loan, or a missed reveal.
QuoteParamstypeThe input of borrow.quote: the vault and either the amount to borrow or the BTC to lock.
RepayResultinterfaceA repayment sent: the approval, each tranche's repayment transaction and the total.
RequestStatustypeA loan request's status, from requested to committed, cancelled or failed.
ReturnAuthorizationtypeThe borrower's signed returns of the collateral: one bundled PSBT or one per tranche.
SendOptionstypeOptions of a loan transaction: whether to wait for the receipt, and how long and how often.
sessionWalletOfTokenfunctionThe wallet a Maxy session token belongs to (email <wallet>@wallet.local confirmed by app_metadata), or null if unreadable.
SignedTermsinterfaceLoan terms signed by the borrower: the request, the signature and the request's status after it.
TermsPlanV1typeThe plan a loan request's terms are built from: deployment, vault, anchor time and timings.
toMaxyOrderexportA loan request as a MaxyOrder, for one list with swaps.
ToMaxyOrderOptionstypeOptions of toMaxyOrder: the market the row came from and the loan's mirror row.
TrancheMirrorRowtypeOne Bitcoin tranche of a loan as indexed: kind, state, script hash, sats and timelock.
VaultCapacityinterfaceA vault and whether it lends now: its figures and the keeper's health.
VerifiedCommittedLoantypeA committed loan checked against the borrower's identity: its funding outputs and tranches.
VerifiedLoanRequestinterfaceReturned only by createRequest after verifyPlanForBorrower passed.
VerifiedPlantypeA loan plan checked locally: the plan, the borrower's identity, the terms and their hash.
VerifyPlanCodetypeWhy a loan plan failed its local check, as a code.
WalletUtxotypeOne coin of the borrower's wallet: txid, output, value, confirmation and its previous transaction.

Python

pip install maxy-labs, then from maxy import Maxy, AsyncMaxy. Every method answers the API's JSON as a dict; AsyncMaxy has the same methods, awaited.

MethodParameters
maxy.sse_parser.line()line
maxy.sandboxnone: a property, not a method
maxy.issue_test_keys()*, name=None, origins=None
maxy.close()none
amaxy.sandboxnone: a property, not a method
amaxy.issue_test_keys()*, name=None, origins=None
amaxy.aclose()none
maxy.prices.get()from_, to, amount=None, **rest: Any
maxy.prices.stream()from_, to, amount=None, , interval_seconds=None, *rest: Any
maxy.chains.list()none
maxy.pairs.list()none
maxy.pairs.get()from_, to
maxy.pairs.search_tokens()chain, search, *, limit=None
maxy.quotes.get()from_, to, amount=None, , from_address=None, to_address=None, *rest: Any
maxy.quotes.batch()requests
maxy.quotes.seconds_until_expiry()quote
maxy.orders.create()order, *, signatures=None, signature=None, external_id=None, external_customer_id=None, scenario=None, partner_fee_bps=None, partner_fee_recipient=None, partner_fee_token=None, idempotency_key=None
maxy.orders.submit_signature()order_id, order, *, signature=None, signatures=None
maxy.orders.submit()order, signatures, tx_hash=None, *, bridge_tx_hash=None
maxy.orders.get()order_id, *, chain_id=None, route=None
maxy.orders.list()*, limit=None, cursor=None, from_=None, to=None, state=None, wallet=None, external_id=None, external_customer_id=None
maxy.orders.export_csv()*, from_=None, to=None, limit=None
maxy.orders.cancel()order_id, *, chain_id, from_=None
maxy.orders.events()order_id
maxy.orders.refund()order_id, *, chain_id, from_=None
maxy.orders.deposit()order_id, *, chain_id
maxy.orders.claim()order_id, *, chain_id, txid=None
maxy.orders.bridge()order_id, , path=None, *query: Any
maxy.orders.steps()order_id, body=None, *, route=None
maxy.orders.stream()order_id, *, chain_id=None, route=None
maxy.orders.follow()order_id, *, route=None, chain_id=None, external_id=None, external_customer_id=None
maxy.orders.iterate()**params: Any
maxy.orders.watch()order_id, *, chain_id=None, route=None, max_seconds=1800.0, sleep=time.sleep
maxy.orders.resume()order_id, **options: Any
amaxy.orders.iterate()**params: Any
amaxy.orders.watch()order_id, *, chain_id=None, route=None, max_seconds=1800.0
amaxy.orders.resume()order_id, **options: Any
maxy.status.by_tx_hash()tx_hash
maxy.status.by_intent_hash()order_id, *, chain_id=None, route=None
maxy.status.by_bitcoin_txid()txid
maxy.addresses.validate()chain, address
maxy.limits.get()none (GET /limits)
maxy.health.get()none (GET /health)
maxy.key.get()none (GET /key)
maxy.config.get()none (GET /config)
maxy.ping.get()none (GET /ping)
maxy.openapi.get()none (GET /openapi.json)
maxy.webhooks.create()url
maxy.webhooks.list()none
maxy.webhooks.remove()webhook_id
maxy.webhooks.test()webhook_id
maxy.webhooks.events()webhook_id, *, signed=False
maxy.webhooks.replay()webhook_id, event_id
maxy.webhooks.verify()raw_body, signature_header, secret, *, tolerance_seconds=TOLERANCE_SECONDS, now=None
maxy.sandbox_controls.advance()order_id, *, to=None
maxy.sandbox_controls.scenarios()none
maxy.sandbox_controls.rates()none
maxy.account.get()none
maxy.account.usage()*, days=None
maxy.keys.create()*, kind="publishable", origins=None, note=None
maxy.keys.rotate()none
maxy.keys.revoke()prefix, *, confirm_self=False
maxy.keys.set_origins()prefix, origins
maxy.limit_requests.create()*, wanted_usd=None, note=None
maxy.limit_requests.list()none
maxy.statements.get()month=None
maxy.statements.download()month, format="csv"
maxy.explorer.lookup()query
maxy.system.status()none
maxy.system.history()*, days=None
maxy.system.incidents()none
maxy.system.maintenance()none
maxy.system.verified()none
maxy.system.subscribe()kind, target
maxy.system.confirm()token
maxy.system.unsubscribe()token
maxy.checkout.verify()query
maxy.feedback.send()page, *, helpful=None, comment=None, kind=None
maxy.security_reports.send()summary, *, details=None, reply_to=None

Generated from the 1.1.13 build.