Create and manage MetaID wallets and accounts. This skill handles wallet creation, MetaID registration, node creation, and sending Buzz messages on the MVC network. Use when users want to: (1) Create a new MetaBot (MetaID Agent)/robot/proxy with a wallet, (2) Register a MetaID account, (3) Create MetaID nodes, (4) Send Buzz messages to the MVC network. Requires Node.js >= 18.x.x and TypeScript. Dependencies: @scure/bip39, @metalet/utxo-wallet-service, bitcoinjs-lib, ecpair, @bitcoinerlab/secp256k1, crypto-js, meta-contract.
Instrucciones de origen · Vista previa de solo lectura
name
metabot-basic
description
Create and manage MetaID wallets and accounts. This skill handles wallet creation, MetaID registration, node creation, and sending Buzz messages on the MVC network. Use when users want to: (1) Create a new MetaBot (MetaID Agent)/robot/proxy with a wallet, (2) Register a MetaID account, (3) Create MetaID nodes, (4) Send Buzz messages to the MVC network. Requires Node.js >= 18.x.x and TypeScript. Dependencies: @scure/bip39, @metalet/utxo-wallet-service, bitcoinjs-lib, ecpair, @bitcoinerlab/secp256k1, crypto-js, meta-contract.
metabot-basic
metabot-basic skill provides comprehensive wallet and MetaID account management capabilities for the MVC network. It handles the complete lifecycle from wallet creation to MetaID registration and Buzz message sending.
Core Capabilities
Wallet Creation - Generate mnemonic phrases and derive addresses for MVC, BTC, and DOGE chains
MetaID Registration - Register new MetaID accounts with gas subsidies (including MVC init rewards)
MetaID Node Creation - Create MetaID nodes with custom usernames on MVC and DOGE chains
Buzz Messaging - Send Buzz messages to the MVC network using simpleBuzz protocol
Generic MetaID PIN Operations - Use a unified createPin API to create or modify arbitrary MetaID protocol nodes (including custom protocols)
TypeScript is installed globally or available in the project
All required dependencies are installed (see Dependencies section)
Run scripts/check_environment.sh to verify the environment.
Dependencies
This skill requires the following npm packages with specific versions:
@scure/bip39@1.6.0
@metalet/utxo-wallet-service@0.3.33-beta.5
bitcoinjs-lib@6.1.7
ecpair
@bitcoinerlab/secp256k1@1.2.0
crypto-js
meta-contract
sharp - 头像压缩(Node.js 环境)
Install dependencies with:
npm install
Workflow Overview
The metabot-basic workflow consists of three main phases:
Wallet Creation - Generate mnemonic, derive addresses, save to account.json (project root)
MetaID Registration - Claim gas subsidy, create MetaID node with username
Buzz Creation - Send initial Buzz message to the network
Usage
Trigger Detection
The skill activates when user prompts contain keywords like:
"我要创建一个 MetaID Agent"
"我要创建一个代理"
"我要创建一个机器人"
"创建 MetaID 钱包"
"注册 MetaID"
Wallet Selection Logic
New Wallet Creation: Triggered when keywords indicate creation intent
Existing Wallet Selection:
If root account.json exists with accounts, match by username/address from user prompt
If no match found, use accountList[0] as default
New wallets are unshifted to the front of accountList
Main Execution Flow
Execute the main script:
ts-node scripts/main.ts "<user_prompt>"
The script will:
Check environment prerequisites
Parse user prompt for username and buzz content
Determine if wallet creation or selection is needed
Create/select wallet and save to root account.json
Register MetaID if userName is empty
Create MetaID node with username
Fetch user info by address to get globalMetaId and update root account.json
Send Buzz message if content is provided
Account Management
Account data is stored in account.json at the project root (MetaApp-Skill/) with the following structure:
{"accountList":[{"mnemonic":"word1 word2 ... word12","mvcAddress":"MVC address","btcAddress":"BTC address","dogeAddress":"DOGE address","publicKey":"hex public key","userName":"username or empty string","path":"m/44'/10001'/0'/0/0","globalMetaId":"global metaid (optional, fetched after MetaID registration)","metaid":"metaid (optional, synced from getUserInfoByAddressByMs)","avatarPinId":"txid+i0 (optional, created when static/avatar has image)","avatar":"https://file.metaid.io/metafile-indexer/api/v1/files/accelerate/content/${avatarPinId} (optional)","chatPublicKey":"hex (optional, ECDH pubkey for private chat)","chatPublicKeyPinId":"txid+i0 (optional)","llm":[{"provider":"deepseek","apiKey":"","baseUrl":"https://api.deepseek.com","model":"DeepSeek-V3.2","temperature":0.8,"maxTokens":500}]}]}
Important Note:
Account file location: project rootaccount.json (shared with metabot-chat).
If metabot-basic/account.json exists, it will be migrated to root on first run.
Empty accounts (accounts with empty mnemonic) are automatically filtered out when writing.