@faremeter/wallet-evm

中文文档
0.22.0发布于 2026/05/27LGPL-3.0-onlyTypeScriptES Module近 30 天下载 2774

EVM private key wallet adapter for Faremeter payments using viem

原始使用文档
文档目录9 节
  1. Installation
  2. Features
  3. API Reference
  4. Functions
  5. createLocalWallet
  6. Interfaces
  7. EvmWallet
  8. Related Packages
  9. License

@faremeter/wallet-evm

EVM private key wallet adapter for Faremeter payments using viem.

Installation

pnpm install @faremeter/wallet-evm

Features

  • Private key signing with viem
  • Multi-chain support (Base, Skale, etc.)
  • EIP-712 signature support
  • Compatible with @faremeter/payment-evm

API Reference

Functions

createLocalWallet

Creates a local EVM wallet from a private key.

FunctionType
createLocalWallet(chain: ChainInfo, privateKey: string) => Promise<EvmWallet>

Parameters:

  • chain: - Chain configuration for the wallet.
  • privateKey: - Hex-encoded private key with "0x" prefix.

Returns:

An EVM wallet object for signing transactions.

Interfaces

EvmWallet

An EVM wallet instance with chain info and signing capabilities.

PropertyTypeDescription
chainChainInfoChain configuration for this wallet.
address0x${string}Wallet address as a hex string.
account{ address: 0x${string}; nonceManager?: NonceManager or undefined; sign: (parameters: { hash: 0x${string}; }) => Promise<0x${string}>; signAuthorization: (parameters: AuthorizationRequest) => Promise<...>; ... 5 more ...; type: "local"; }Viem account for signing operations.

License

LGPL-3.0-only

版本与发布记录

@faremeter/wallet-evm 共发布 27 个版本,首次发布于 2025/08/29;过去 12 个月发布了 12 个版本。

版本发布日期距今
0.22.0latest2026/05/275 个月前
0.21.02026/04/216 个月前
0.20.12026/04/147 个月前
0.20.02026/04/147 个月前
0.19.02026/03/217 个月前
0.18.02026/03/207 个月前

关于 @faremeter/wallet-evm 的常见问题

@faremeter/wallet-evm 是什么?

EVM private key wallet adapter for Faremeter payments using viem

如何安装 @faremeter/wallet-evm?

在项目目录运行 npm install @faremeter/wallet-evm,或使用 pnpm add / yarn add / bun add。

@faremeter/wallet-evm 支持 TypeScript 吗?

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

@faremeter/wallet-evm 支持 ESM 还是 CommonJS?

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

@faremeter/wallet-evm 可以商用吗?

@faremeter/wallet-evm 使用 LGPL-3.0-only 许可。弱 Copyleft:作为库被调用时通常不要求开源你自己的代码,但修改库本身需以 LGPL 开源;前端打包合并后的适用边界存在不同理解。以上为概括,不构成法律意见,请以许可原文为准。

@faremeter/wallet-evm 的下载量有多少?

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

@faremeter/wallet-evm 还在维护吗?

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