You’ll installDocumentation Index
Fetch the complete documentation index at: https://docs.stable.xyz/llms.txt
Use this file to discover all available pages before exploring further.
@stablechain/sdk, create a client signed by a private key, send a USDT0 transfer on Stable Testnet, and fetch a bridge and swap quote. Total time: about five minutes.
Stable uses USDT0 as the gas token. You only need testnet USDT0 to transact — there’s no separate native asset to fund.
Prerequisites
- Node.js 20 or later
- A test private key with testnet USDT0. See Fund your testnet wallet.
1. Install
2. Create a client
Createindex.ts:
createStable accepts three signing modes: account (server-side, shown above), transport (browser wallet via custom(window.ethereum)), or walletClient (a pre-built viem WalletClient). See Use the SDK with viem for all three.
3. Send a USDT0 transfer
Append toindex.ts:
4. Quote a bridge
Bridge USDT0 from Ethereum Sepolia to Stable Testnet.quoteBridge is a read-only call — no signature, no gas:
stable.bridge({ ...params, quote }) to execute. The SDK picks LayerZero for USDT0 → USDT0 routes and LI.FI for everything else.
5. Quote a swap
Swaps run on Stable through LI.FI. The quote returns the expected output and a pre-built transaction:stable.swap({ ...params, quote: swapQuote }) to execute. Approval for ERC-20 sources is handled internally.
Next recommended
SDK reference
Every parameter, return type, and error class.
Use with viem
Switch between private-key, browser-wallet, and pre-built
WalletClient signing.Use with wagmi
Wire the SDK into a React app using wagmi hooks.

