npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@blockchain-forever/aelf-node-skill

v0.1.3

Published

AElf Node Skill for AI agents: REST for reads, SDK for contract execution, and selective fallback for fee estimate.

Readme

AElf Node Skill

中文 | English

Unit Tests Coverage

AElf Node Skill 提供 MCP、CLI、SDK 三种接口,采用“读走 REST、合约执行走 SDK、手续费估算选择性 fallback”的架构访问 AElf 公共节点。

功能

  • 链路读取:链状态、区块高度、区块详情、交易结果
  • 合约元数据:View Methods 和 System Contract Address(REST adapter)
  • 合约执行:View 调用与交易发送(SDK)
  • 手续费估算:REST 优先,SDK 兜底
  • 节点管理:导入与列出自定义节点

默认节点

  • AELF: https://aelf-public-node.aelf.io
  • tDVV: https://tdvv-public-node.aelf.io

安装

bun install

使用方式

MCP

bun run mcp

CLI

bun run cli get-chain-status --chain-id AELF

OpenClaw

bun run build:openclaw
bun run build:openclaw:check

快速开始

# 启动 MCP server
bun run mcp

# 使用 CLI
bun run cli get-chain-status --chain-id AELF

# 运行单测
bun run test:unit

Setup CLI

仓库内置一键 setup,支持 Claude、Cursor、OpenClaw。

bun run setup claude
bun run setup cursor
bun run setup cursor --global
bun run setup openclaw
bun run setup openclaw --config-path /path/to/openclaw-config.json
bun run setup list
bun run setup uninstall claude
bun run setup uninstall cursor --global
bun run setup uninstall openclaw --config-path /path/to/openclaw-config.json

安装后的包也可直接执行:

aelf-node-setup claude

MCP 配置示例

参考文件:mcp-config.example.json

{
  "mcpServers": {
    "aelf-node-skill": {
      "command": "bun",
      "args": ["run", "/ABSOLUTE/PATH/TO/src/mcp/server.ts"],
      "env": {
        "AELF_PRIVATE_KEY": "可选_env_回退私钥",
        "PORTKEY_WALLET_PASSWORD": "可选钱包密码",
        "PORTKEY_CA_KEYSTORE_PASSWORD": "可选keystore密码"
      }
    }
  }
}

环境变量

复制并编辑:

cp .env.example .env
  • AELF_PRIVATE_KEY:写操作的 env 回退私钥(可选,env 优先级最高)
  • PORTKEY_PRIVATE_KEY:共享 skill 兼容的次级 env 回退私钥(可选)
  • 写操作工具(aelf_send_contract_transactionaelf_estimate_transaction_fee)按 explicit -> context -> env 解析 signer
  • PORTKEY_WALLET_PASSWORD:EOA wallet context 的密码缓存(可选)
  • PORTKEY_CA_KEYSTORE_PASSWORD:CA keystore context 的密码缓存(可选)
  • PORTKEY_SKILL_WALLET_CONTEXT_PATH:active context 路径覆盖(默认 ~/.portkey/skill-wallet/context.v1.json
  • signerMode=daemon 仅预埋接口,本轮返回 SIGNER_DAEMON_NOT_IMPLEMENTED
  • AELF_NODE_AELF_RPC_URL:可选,覆盖 AELF 节点
  • AELF_NODE_TDVV_RPC_URL:可选,覆盖 tDVV 节点
  • AELF_NODE_REGISTRY_PATH:可选,自定义节点注册表路径
  • AELF_SDK_INSTANCE_CACHE_MAX:可选,SDK 实例缓存上限(默认 32
  • AELF_SDK_CONTRACT_CACHE_MAX:可选,SDK 合约缓存上限(默认 256
  • AELF_REST_CLIENT_CACHE_MAX:可选,REST 客户端缓存上限(默认 64

Tool 列表

MCP tool 名称:

  • aelf_get_chain_status
  • aelf_get_block_height
  • aelf_get_block
  • aelf_get_transaction_result
  • aelf_get_contract_view_methods
  • aelf_get_system_contract_address
  • aelf_call_contract_view
  • aelf_send_contract_transaction
  • aelf_estimate_transaction_fee
  • aelf_import_node
  • aelf_list_nodes

架构

  • src/core/:业务编排
  • lib/sdk-client.tsaelf-sdk 封装
  • lib/rest-client.ts:REST adapter + 错误归一
  • lib/node-router.ts:链与节点路由/fallback
  • src/mcp/server.ts:MCP 入口
  • aelf_node_skill.ts:CLI 入口
  • index.ts:SDK 导出

测试

bun run test
bun run test:coverage:ci

安全

  • 不要在对话输出中暴露 AELF_PRIVATE_KEY
  • Active wallet context 不存明文私钥。
  • 所有密钥均通过环境变量管理。

License

MIT