Blend’s SDK handles quoting, Safe management, cross-chain execution, and gas sponsorship. Pick the package that matches where your code runs.Documentation Index
Fetch the complete documentation index at: https://docs.blend.money/llms.txt
Use this file to discover all available pages before exploring further.
Packages
| Package | Name | Purpose |
|---|---|---|
@blend-money/core | Core | Shared logic, types, and utilities. Installed automatically as a dependency. |
@blend-money/fe | Frontend | Browser SDK. SIWE wallet auth, deposit/withdrawal quoting, on-chain execution. |
@blend-money/node | Server | Node.js SDK. API key auth, account management, session lifecycle. |
@blend-money/fe or @blend-money/node. Both pull in @blend-money/core for you.
Frontend vs Server
| Concern | Frontend (@blend-money/fe) | Server (@blend-money/node) |
|---|---|---|
| Runs in | Browser | Node.js |
| Auth | Publishable key + SIWE wallet signature | API key (sk_live_) |
| Account scoping | Automatic after signIn() | Manual via forAccount(accountId) |
| Quoting | sdk.quoteDeposit({ tokenAddress }) | client.sessions.quoteDeposit(intentId, { inputAssetAddress }) |
| Execution | sdk.execute(quote, { deriveSigner }) | Cannot execute directly. Extract action plans, sign on your backend, then submit hashes. |
| Session management | Automatic. quoteDeposit creates/reuses sessions. | Manual. Call createSession, then quote, lock, submit. |
| Best for | Apps where users connect wallets in a browser | Backends with embedded wallets (Privy, Turnkey) |
Core concepts
Safes
Every user gets their own Gnosis Safe - a smart contract wallet on-chain. Funds are never pooled. Each Safe is independent, with its own balances and positions. The user is always the owner.Sessions
Every deposit and withdrawal is a session (also called an intent). A session tracks the operation from quote to settlement. One active session per account at a time. Re-quote on the same session to update prices without creating a new one.Action plans
When you execute a quote, the SDK converts it into action plans - the actual on-chain transactions routed through the user’s Safe. Deposits produce one action plan. Withdrawals can produce several, one per source chain.Paymaster
Safe transactions are ERC-4337 UserOperations. The paymaster sponsors gas so users don’t need native tokens. You provide apaymasterUrl when you set up the SDK. Any ERC-4337 bundler/paymaster works.
Session lifecycle
Sessions move through a state machine. Terminal states areSETTLED, FAILED, and CANCELLED.
One active session per account. Pass forceReset: true to cancel an existing session and start fresh.
Frontend SDK
Set up browser-based deposits with wallet auth.
Server SDK
Set up server-side account management and sessions.
Deposits & Withdrawals
Quote and execute deposits, withdrawals, and cross-chain flows.
SDK Reference
Auth, accounts, balances, error codes, and type definitions.