Implements P0+P1 of docs/plans/2026-06-01-ai-model-tokens.md — AI models as tradeable, redeemable on-chain tokens, composing existing primitives. clawd 'model-token' command (cmd/clawd/src/commands/model-token.ts, wired in main.ts): - issue: RegisterModel (modelregistry) + create-denom + mint (tokenfactory) in one signed tx -> factory/<issuer>/<modelid>; optional Astroport DEX pair seed (--dex-factory). - redeem: holder self-burns model tokens (MsgBurn) + SubmitInferenceJob in one tx. - inference-setup / start-job / complete-job: provider lifecycle. - serve-once / serve-loop: provider automation (deterministic templates or OpenRouter when OPENROUTER_API_KEY is set). clawd registry now includes osmosis.tokenfactory.v1beta1 codecs (gen-proto.sh + registry.ts) so create-denom/mint/burn are encodable; cosmjs-types added for wasm exec. Chain changes (consensus-verified by live boot + workflow): - x/modelregistry/module: register msg/query services via the app's ServiceRegistrar shape (fixes 'no message handler found for MsgRegisterModel'). - x/tokenfactory: holder self-burn for factory denoms (non-admin holders redeem their own tokens) — admin burn preserved. Verified: clawd build clean + 659 tests pass; go build + modelregistry/tokenfactory tests pass; app construction guard passes; chain rebuilt + boots (4 validators). LIVE on the multi-validator testnet (this binary): full holder-redemption workflow (issue -> set pricing/provider -> transfer to non-admin holder -> holder self-burn + SubmitInferenceJob -> provider start+complete) ended with job_status=completed (scripts/testnet/model-token-holder-redeem.sh). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
36 lines
808 B
JSON
36 lines
808 B
JSON
{
|
|
"name": "clawd",
|
|
"version": "0.1.0",
|
|
"description": "Unified CLI for ClawChain node + OpenClaw gateway",
|
|
"type": "module",
|
|
"bin": {
|
|
"clawd": "./clawd.mjs"
|
|
},
|
|
"main": "dist/main.js",
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"dev": "node --import tsx src/main.ts",
|
|
"test": "vitest run"
|
|
},
|
|
"dependencies": {
|
|
"@bufbuild/protobuf": "^2.12.0",
|
|
"@cosmjs/amino": "^0.33.0",
|
|
"@cosmjs/crypto": "^0.33.0",
|
|
"@cosmjs/encoding": "^0.33.0",
|
|
"@cosmjs/proto-signing": "^0.33.0",
|
|
"@cosmjs/stargate": "^0.33.0",
|
|
"cosmjs-types": "^0.9.0",
|
|
"commander": "^14.0.3"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22.0.0",
|
|
"ts-proto": "^2.11.8",
|
|
"tsx": "^4.21.0",
|
|
"typescript": "^5.4.0",
|
|
"vitest": "^3.0.0"
|
|
},
|
|
"engines": {
|
|
"node": ">=22.12.0"
|
|
}
|
|
}
|