Skip to main content
Blend’s SDK handles quoting, Safe management, cross-chain execution, and gas sponsorship. Pick the package that matches where your code runs. These docs target SDK version 3.0.1.

Packages

You install either @blend-money/fe or @blend-money/node. Both pull in @blend-money/core for you.

Frontend vs Server

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

Frontend Safe transactions are ERC-4337 UserOperations. Configure the required paymaster registry with Pimlico or Alchemy endpoints for each execution chain. The server SDK does not take paymaster settings. Your submitActionPlan callback owns backend signing and gas. SDK 3.0.1 gets gas prices from each configured bundler. It does not call a Blend gas-price method or endpoint.

Session lifecycle

Sessions move through a state machine. Terminal states are SETTLED, FAILED, and CANCELLED. Submitting hashes records the submission and settles the session. It does not verify transaction receipts. Use balances and positions as the source of truth for indexed on-chain activity. The SessionStatus type retains SUBMITTED and FAILED for legacy sessions. New submissions settle directly. One active session is allowed per account. Re-quote an OPEN session to change its amount, token, or chain. The high-level frontend SDK requires forceReset: true to switch between a deposit and withdrawal because that discards the opposite-type active session.

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.
Last modified on July 24, 2026