A working SDK integration is step one. A production-quality integration handles edge cases, secures credentials, and recovers from failures.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.
Credential security
Yoursk_live_ API key grants full access to your organization’s accounts. Treat it like a database password.
- Store API keys in environment variables or a secrets manager
- Never log the full key value
- Create separate keys per environment (dev, staging, production)
- Rotate keys on a regular schedule, not only after incidents
pk_live_) is safe for client-side code. It identifies your account type but cannot read or modify account data on its own. The SIWE session provides the authorization layer.
Session management
Deposits and withdrawals run through stateful sessions. One active session per account at a time. Re-quoting: CallquoteDeposit or quoteWithdraw again on the same OPEN session to update amounts and prices. Do not create a new session for re-quotes.
forceReset: true only when you need to cancel the existing session entirely. This is for starting a completely new flow, not for updating a quote.
Session expiration TTLs:
| State | TTL | On expiry |
|---|---|---|
| OPEN | ~15 minutes | Auto-cancelled |
| LOCKED | ~1 hour | Auto-cancelled |
| SUBMITTED | ~1 hour | Marked as failed |
Transaction handling
Wait between action plans. The SDK callswaitForNextBlock() between sequential action plans. If you build custom execution logic, do the same. Submitting two plans in the same block can cause nonce collisions.
Multi-chain withdrawal sequencing. Withdrawals can produce multiple action plans (one per source chain). Process them in sequence, not in parallel.
paymasterUrl with a chain-aware resolver.
Conflict handling
A409 with FLOWPLAN_CONFLICT means a rebalance is in progress on the account. The system is moving funds between vaults.
Do not retry blindly. Surface this as a product-level message and let the user retry after the account settles.
Safe deployment
Safes are deployed lazily. A resolved Blend account does not mean the Safe exists on every chain. Before first execution on a chain, check deployment state.Error recovery
Theexecute method in both SDKs is crash-safe. If your app crashes mid-execution, calling execute again with the same intent resumes from the current session state. It does not restart from scratch.
isRetryable() returns true for HTTP 429, 5xx status codes, and network errors (status 0). The built-in HTTP client already retries with exponential backoff and jitter, so you only need manual retry logic for application-level recovery.
Frontend SDK
See the full frontend SDK reference.
Server SDK
See the full server SDK reference.