/install circle-chain-skill
Circle Chain JavaScript SDK
Package and layout
- npm:
@lidh04/circle-chain-sdk— local dependency:npm i @lidh04/circle-chain-sdk - Default export: an object with namespaces
user,wallet,block,node,miner,common— e.g.import sdk from '@lidh04/circle-chain-sdk'thenconst { user, wallet, miner } = sdk. README snippets use bare names likelogin,createWallet; bind them from the matching namespace (user.login,wallet.createWallet, etc.). - Source repo:
src/—circle-user.js,circle-wallet.js,circle-block.js,circle-node.js,circle-miner.js,circle-common.js; CLI undersrc/cli/.
Development workflow
- Build:
npm run build— outputsdist/cjsanddist/mjs(TypeScript + fixup). - Tests: Run
npm run buildbeforenpm testwhen suites need freshdist/. CLI-only:npm run test:cli(builds, then Jest matchesdist/cjs/cli). - CLI from a clone: after build,
npm run cli -- \x3Cargs>ornode ./dist/mjs/cli/main.js \x3Cargs>.
CLI (Commander.js)
Published executable name: circle (see package.json "bin" → dist/mjs/cli/main.js).
Install globally
npm install -g @lidh04/circle-chain-sdk
circle --help
Using circle
-d/--dev— usehttp://localhost:8888instead of production (e.g.circle --dev user login-send-code --email [email protected]).- Subcommand groups: user, wallet, block, miner. Discover flags with
circle \x3Cgroup> --help.
circle --help
circle user --help
circle user login-send-code --email [email protected]
circle wallet query public-balance --address \x3Caddr>
circle block header-list --base-height 0
circle miner mine --address \x3Cyour-miner-address>
Developing this repo
npm run build
npm run cli -- --help
# or: node ./dist/mjs/cli/main.js --help
CLI tests: src/cli/*.test.js; Jest runs compiled tests under dist/cjs/cli/ per jest.config.cjs.
Programmatic usage patterns
Responses typically include status (e.g. 200), message, and data. On failure, surface response.message.
Auth (register / login)
- Register then password login:
sendRegisterVerifyCode→register→login(email + password). - Login with verify code only:
sendVerifyCode→login(email +verifyCode).
Wallet
createWallet()— on success, address indata.
Local mining
miner.canMineBlock()— return early if false.miner.fetchMyBlockData(address)— fromdata:blockHeaderHexString,channelId.miner.mineBlock(blockHeaderHexString, workerCount)— e.g.os.cpus().length - 1; result lines separated by\; first line is mined header hex.miner.postMyBlock({ address, channelId, blockHeaderHexString: minedBlockHeader }).- Per README: successful block upload rewards 10 cc (100,000 li) to the miner address.
Pay password
sendPayVerifyCode→setPayPasswordwithaccount: { email },verifyCode,password.
Transfers
sendTo:email,from,address(to),transContent(type,uuid, etc.),payPassword.pay:from,to,value,payPassword.
Contacts
addContacts: e.g.email,name,sex,address(location string in README).
Versions
1.1.1
- README: document global CLI install (
npm install -g @lidh04/circle-chain-sdk), usingcirclewith--dev, and developing the repo (npm run cli/node ./dist/mjs/cli/main.js)
1.1.0
- CLI (Commander.js) for user, wallet, miner, block; entry
circle/main.js. - CLI split into
user-command,wallet-command,miner-command,block-command; user CLI email-only. - CLI tests under
src/cli, Jest runsdist/cjs/cli;circle-nodetest import path fix.
1.0.22 — security improvements
1.0.21 — bugfixes
1.0.20 — local block mining
Keep this skill aligned with repo README.md and package.json (bin name, exports).
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install circle-chain-skill - 安装完成后,直接呼叫该 Skill 的名称或使用
/circle-chain-skill触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
circle chain skill 是什么?
JavaScript SDK and CLI for Circle Chain (@lidh04/circle-chain-sdk): user auth, wallet, block, miner, transfers, contacts. Global CLI binary `circle`. Use whe... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 143 次。
如何安装 circle chain skill?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install circle-chain-skill」即可一键安装,无需额外配置。
circle chain skill 是免费的吗?
是的,circle chain skill 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
circle chain skill 支持哪些平台?
circle chain skill 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 circle chain skill?
由 Charles(@lidh04)开发并维护,当前版本 v1.1.1。