0xweb

中文文档
0.11.11发布于 2026/10/02MITTypeScriptCommonJS构建来源已验证近 30 天下载 7682

Contract package manager and other web3 tools

原始使用文档
文档目录9 节
  1. 0xweb - Contract package manager and CLI Web3 Toolkit
  2. Install
  3. CLI Usage
  4. Config
  5. Commands overview 🔗
  6. Various Blockchain tools
  7. block
  8. token
  9. accounts

0xweb - Contract package manager and CLI Web3 Toolkit


Website Link Documentation Link NPM version CircleCI

Demo: BackendCircleCI
Demo: StorageCircleCI
Demo: HardhatCircleCI
Demo: Price LoaderCircleCI
  • Generate TypeScript or ES6 classes for contracts fetched from Etherscan and Co.
  • CLI commands to query the contracts or to submit transactions
  • RESTful API for the installed contracts
  • Deploy and track deployed contracts with ease

Dequanto library 📦 is used for the wrapped classes

Here the example of generated classes: 0xweb-org/0xweb-sample 🔗

Install

$ npm i 0xweb -g

# Boostrap dequanto library in cwd
$ 0xweb init

# Download sources/ABI and generate TS classes
$ 0xweb install 0x5f4ec3df9cbd43714fe2740f5e3616155c5b8419 --name chainlink/oracle-eth

Use the --hardhat flag, if you want to develop|compile|deploy|test contracts: 0xweb init --hardhat

API Usage

Use autogenerated TypeScript classes for much safer and faster backend implementation

import { ChainlinkOracleEth } from '0xc/eth/chainlink/oracle-eth/oracle-eth';
import { Config } from 'dequanto/config/Config';
import { $bigint } from 'dequanto/utils/$bigint';

await Config.fetch();

let oracle = new ChainlinkOracleEth();
let decimals = await oracle.decimals();
let price = await oracle.latestAnswer();

console.log(`ETH Price`, $bigint.toEther(price, decimals));

CLI Usage

READ and WRITE to installed contracts directly from the command line

$ 0xweb contract chainlink/oracle-eth latestAnswer

WEB Usage

The package has the built-in web interface to make the blockchain analyze and interaction simpler.

  1. If you initialize the Transaction via CMD, you may want to sign the transaction with your browser wallet. For this, 0xweb spins up the HTTP server and redirects your browser to visit local page where the details of the transaction being shown, and you can sign and submit the transaction.

  2. Launch local server to view the validated contract in UI interface to interact with.

0xweb server start

Config

❗❣️❗ We include our default KEYs for etherscan/co and infura. They are rate-limited. Please, create and insert your keys. Thank you!

$ 0xweb config --edit

## optionally, you can provide the Nodes Endpoint with `--endpoint` flag
$ 0xweb COMMAND --endpoint https://my-node-url-here

Commands overview 🔗

Various Blockchain tools

Get the commands overview

$ 0xweb --help
$ 0xweb install --help

block

  1. Get current block info
$ 0xweb block get latest

token

  1. Get Token Price
$ 0xweb token price WETH

accounts

🔐 Wallet feature allows to store accounts in encrypted local storage. We use local machine KEY and provided PIN in arguments or environment to create cryptographically strong secrets 🔑 for account encryption.

When calling contracts WRITE methods, you should first add an account to the wallet, and then use PIN to unlock the storage

$ 0xweb account add --name foo --key the_private_key --pin foobar
$ 0xweb token transfer USDC --from foo --to 0x123456 --amount 20 --pin foobar

🏁


©️ MIT License.

版本与发布记录

0xweb 共发布 168 个版本,首次发布于 2022/03/31;过去 12 个月发布了 5 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.11.11latest2026/10/021 个月前
0.11.102026/06/184 个月前
0.11.92026/04/106 个月前
0.11.82026/03/048 个月前
0.11.72026/02/258 个月前
0.11.22025/10/221 年前

关于 0xweb 的常见问题

0xweb 是什么?

Contract package manager and other web3 tools

如何安装 0xweb?

在项目目录运行 npm install 0xweb,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 0xweb,可以用 npx 0xweb 直接运行。

0xweb 支持 TypeScript 吗?

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

0xweb 支持 ESM 还是 CommonJS?

以 CommonJS 形式发布,可以直接 require();在 ES Module 项目中也可以用 import 引入(Node.js 会把 module.exports 作为默认导出)。

0xweb 可以商用吗?

0xweb 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

0xweb 的下载量有多少?

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

0xweb 还在维护吗?

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