@blend-money/core
Shared business logic, types, and HTTP client for the Blend SDK monorepo.
Note: Most users should install
@blend-money/fe(browser) or@blend-money/node(server) directly. This package is the shared foundation that both SDKs build on; install it only if you are building a custom integration layer.
Install
pnpm add @blend-money/core
What's Inside
Client
BlendClient— shared operational client providing discovery, account data, and session lifecycletoDepositQuote,toWithdrawQuote,toExecuteResult— quote/result extraction helpers
Modules
DiscoverModule— chain, token, destination, and yield discoveryAccountModule— balance, positions, returns, and Safe managementIntentModule— session-based transaction intent lifecycle
HTTP
createBlendHttpClient— preconfigured Axios instance with retries, timeouts, and auth headers
Utilities
parseAmount,formatAmount— convert between human-readable and smallest-unit strings without floating-point lossSdkError,SESSION_ERROR_CODES— structured error types with retryable detectionTransactionHandler— on-chain transaction submission and pollingSafeMultisendManager— Safe (Gnosis) multisend batchingcombineActionPlans,depositQuoteToActionPlan,withdrawCalldataToActionPlans— action plan helpers
Paymaster
getPimlicoPaymasterEndpoints— build a per-chain registry slice of Pimlico bundler/paymaster endpointsgetAlchemyPaymasterEndpoints— build a per-chain registry slice of Alchemy endpoints carrying a Gas Manager policy ID as ERC-7677 paymaster contextcreatePaymasterResolver— create a per-chain endpoint resolver over aPaymasterRegistryPaymasterProvider— enum of supported ERC-4337 bundler/paymaster providers (Pimlico,Alchemy)
Types
Over 100 exported types covering core primitives (Hex, ChainId, ActionPlan), integration responses (BalanceResponse, PositionsResponse, YieldResponse, DepositToken, WithdrawDestination), quotes (DepositQuote, WithdrawQuote), execution (ExecuteParams, ExecuteResult, DeriveSignerResult), and session lifecycle (SessionResult, SessionStatus, CreateSessionParams).
Development
From the monorepo root:
pnpm install # Install all dependencies
pnpm --filter @blend-money/core build # Build this package
pnpm --filter @blend-money/core dev # Watch mode
pnpm --filter @blend-money/core test # Run tests (interactive)
pnpm --filter @blend-money/core test:run # Run tests (CI)
pnpm --filter @blend-money/core check-types # Type check
Or run pnpm build, pnpm test:run, etc. from the monorepo root to run across all packages.
License
MIT