Client
blink and partner are typed clients over BlinkApi and PartnerApi. Every RPC in the API reference is a method on one of them, in camelCase.
The transport is gRPC-web, which works in browsers and in Node.
Chain adapters
ChainAdapter is the interface that hides the difference between an EVM deposit and a Solana one.
steps returns an ordered list. Each has a kind of approve, deposit, or swap and a run that sends it, or waits for it, and resolves to a transaction hash. EVM deposits produce one or two steps depending on the existing allowance; Solana always produces one. A Sui deposit produces one, or two when it swaps first: a deposit step that opens the swap intent and a swap step that waits for the relayer to run the swap and resolves to the swap transaction, which is the order’s source transaction. The swap step throws if the intent lapses, in which case nothing left the wallet.
chainId is required for EVM chains and ignored for Solana. walletKindOf(chain) tells you which wallet family a chain needs.
The entry point and target contract are chosen from the quote: depositNative, depositToken, depositWithSwap, or swapAndForward for a same-chain swap. See Deposit on EVM and Same-chain swaps.
For a gasless quote, gaslessSteps(wallet, quoteHash, orderParams, { sponsorAddress, sponsorGasBudget }) replaces steps: it collects the permit2 signature on EVM or the sponsor-paid transaction on Solana and Sui, submits it through SubmitGaslessOrder, and resolves once the sponsor has broadcast it. A Sui source swap adds the same swap step as steps does. canPayGas(owner) tells you whether the wallet could pay for a normal deposit at all, which is the usual trigger for offering gasless.
Wallets
Browser wallet plumbing, for apps that do not already have it:
If you already have wagmi, viem, or a wallet adapter, use yours and pass a
ConnectedWallet-shaped object to steps.
Quote helpers
Order helpers
Amount helpers
parseAmount truncates beyond the token’s decimals rather than rounding, which matches what the contract will accept.
Low-level building blocks
encodeDepositNative, encodeDepositToken, encodeDepositWithSwap, evmBalance, evmAllowance, buildSvmDeposit, buildSvmSwapDeposit, buildSuiDeposit, and buildSuiSourceSwapOpen are exported for integrations that want the calldata without the step machinery. buildSuiSourceSwapOpen takes the chain’s swapExecutor from GetChains; see Deposit on Sui. buildSvmSwapDeposit derives the swap authority from the program id, depositor, and quote hash; see Deposit on Solana. The generated protobuf types are re-exported too, so OrderParams, ChainStatus, and the rest are importable from the package root.