@stablechain/sdk is built on viem. createStable accepts three signing modes, and you pick one based on where the code runs: server-side with a private key, browser-side with the user’s wallet, or with a WalletClient you’ve already constructed (for example, in a wagmi app).
This guide shows each mode end-to-end.
Server-side: private-key Account
Use privateKeyToAccount from viem to sign with a private key held by your backend.
Browser-side: Transport from a wallet
Pass custom(window.ethereum) (or any EIP-1193 provider) as transport. The SDK builds the WalletClient and reads the signer address from the provider.
Bring your own WalletClient
When you already have a WalletClient (for example, from wagmi or a custom signer), pass it directly. It takes precedence over account and transport.
Pick a mode
Next recommended
Use with wagmi
Wire the SDK into a React app through wagmi hooks.
SDK reference
Every config field, method, enum, and error class.
SDK quickstart
Run your first transfer, bridge, and swap on testnet.

