Skip to main content

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.

Blend’s SDK handles quoting, Safe management, cross-chain execution, and gas sponsorship. Pick the package that matches where your code runs.

Packages

PackageNamePurpose
@blend-money/coreCoreShared logic, types, and utilities. Installed automatically as a dependency.
@blend-money/feFrontendBrowser SDK. SIWE wallet auth, deposit/withdrawal quoting, on-chain execution.
@blend-money/nodeServerNode.js SDK. API key auth, account management, session lifecycle.
You install either @blend-money/fe or @blend-money/node. Both pull in @blend-money/core for you.

Frontend vs Server

ConcernFrontend (@blend-money/fe)Server (@blend-money/node)
Runs inBrowserNode.js
AuthPublishable key + SIWE wallet signatureAPI key (sk_live_)
Account scopingAutomatic after signIn()Manual via forAccount(accountId)
Quotingsdk.quoteDeposit({ tokenAddress })client.sessions.quoteDeposit(intentId, { inputAssetAddress })
Executionsdk.execute(quote, { deriveSigner })Cannot execute directly. Extract action plans, sign on your backend, then submit hashes.
Session managementAutomatic. quoteDeposit creates/reuses sessions.Manual. Call createSession, then quote, lock, submit.
Best forApps where users connect wallets in a browserBackends 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 a paymasterUrl when you set up the SDK. Any ERC-4337 bundler/paymaster works.

Session lifecycle

Sessions move through a state machine. Terminal states are SETTLED, 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.
Last modified on May 7, 2026