@blend-money/core

中文文档
3.1.1发布于 2026/11/03TypeScriptES Module近 30 天下载 1.9万

npm version npm downloads per week [![npm

原始使用文档
文档目录10 节
  1. Install
  2. What's Inside
  3. Client
  4. Modules
  5. HTTP
  6. Utilities
  7. Paymaster
  8. Types
  9. Development
  10. License

@blend-money/core

npm version npm downloads per week npm downloads per month

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 lifecycle
  • toDepositQuote, toWithdrawQuote, toExecuteResult — quote/result extraction helpers

Modules

  • DiscoverModule — chain, token, destination, and yield discovery
  • AccountModule — balance, positions, returns, and Safe management
  • IntentModule — 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 loss
  • SdkError, SESSION_ERROR_CODES — structured error types with retryable detection
  • TransactionHandler — on-chain transaction submission and polling
  • SafeMultisendManager — Safe (Gnosis) multisend batching
  • combineActionPlans, depositQuoteToActionPlan, withdrawCalldataToActionPlans — action plan helpers

Paymaster

  • getPimlicoPaymasterEndpoints — build a per-chain registry slice of Pimlico bundler/paymaster endpoints
  • getAlchemyPaymasterEndpoints — build a per-chain registry slice of Alchemy endpoints carrying a Gas Manager policy ID as ERC-7677 paymaster context
  • createPaymasterResolver — create a per-chain endpoint resolver over a PaymasterRegistry
  • PaymasterProvider — 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

版本与发布记录

@blend-money/core 共发布 15 个版本,首次发布于 2026/05/07;过去 12 个月发布了 15 个版本。

版本发布日期距今
3.1.1latest2026/11/035 天前
3.1.02026/10/051 个月前
3.0.12026/07/243 个月前
3.0.02026/07/233 个月前
2.0.02026/07/143 个月前
1.5.12026/07/044 个月前

关于 @blend-money/core 的常见问题

@blend-money/core 是什么?

[![npm

如何安装 @blend-money/core?

在项目目录运行 npm install @blend-money/core,或使用 pnpm add / yarn add / bun add。

@blend-money/core 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@blend-money/core 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@blend-money/core 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js ^22.23.4 || ^24.22.1 || ^26.12.1。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@blend-money/core 可以商用吗?

@blend-money/core 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@blend-money/core 的下载量有多少?

根据 npm 官方下载统计,@blend-money/core 在 2026/10/09 – 2026/11/07 这 30 天内被下载 19,336 次,日均约 645 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@blend-money/core 还在维护吗?

最新版本 3.1.1 发布于 2026/11/03(5 天前);至今共发布 15 个版本,其中过去 12 个月发布了 15 个;首次发布于 2026/05/07。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。