veil

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Veil

Veil

This skill wraps the
@veil-cash/sdk
CLI to make Veil operations agent-friendly.
本Skill封装了
@veil-cash/sdk
CLI,使Veil操作更适配Agent。

What it does

功能介绍

  • Key management: generate and store a Veil keypair locally
  • Status check: verify configuration, registration, and relay health
  • Balances: combined
    balance
    ,
    queue-balance
    ,
    private-balance
  • Deposits via Bankr: build a Bankr-compatible unsigned transaction and ask Bankr to sign & submit it
  • Private actions:
    withdraw
    ,
    transfer
    ,
    merge
    are executed locally using
    VEIL_KEY
    (ZK/proof flow)
  • 密钥管理:在本地生成并存储Veil密钥对
  • 状态检查:验证配置、注册信息及中继节点健康状态
  • 余额查询:整合
    balance
    queue-balance
    private-balance
    三种余额信息
  • 通过Bankr存款:构建与Bankr兼容的未签名交易,并请求Bankr进行签名和提交
  • 私密操作
    withdraw
    (提款)、
    transfer
    (转账)、
    merge
    (合并)操作通过本地
    VEIL_KEY
    执行(基于ZK/证明流程)

File locations (recommended)

推荐文件位置

  • Veil keys:
    ~/.clawdbot/skills/veil/.env.veil
    (chmod 600)
  • Bankr API key:
    ~/.clawdbot/skills/bankr/config.json
  • Veil密钥:
    ~/.clawdbot/skills/veil/.env.veil
    (需设置权限chmod 600)
  • Bankr API密钥:
    ~/.clawdbot/skills/bankr/config.json

Quick start

快速开始

1) Install the Veil SDK

1) 安装Veil SDK

Option A: Global npm install (recommended)
bash
npm install -g @veil-cash/sdk
Option B: Clone from GitHub
bash
mkdir -p ~/.openclaw/workspace/repos
cd ~/.openclaw/workspace/repos
git clone https://github.com/veildotcash/veildotcash-sdk.git
cd veildotcash-sdk
npm ci && npm run build
选项A:全局npm安装(推荐)
bash
npm install -g @veil-cash/sdk
选项B:从GitHub克隆
bash
mkdir -p ~/.openclaw/workspace/repos
cd ~/.openclaw/workspace/repos
git clone https://github.com/veildotcash/veildotcash-sdk.git
cd veildotcash-sdk
npm ci && npm run build

2) Configure Base RPC (recommended)

2) 配置Base RPC(推荐)

Veil queries a lot of blockchain data (UTXOs, merkle proofs, etc.), so public RPCs will likely hit rate limits. A dedicated RPC from Alchemy, Infura, or similar is recommended.
Put
RPC_URL=...
in one of these:
  • ~/.clawdbot/skills/veil/.env
    (preferred)
  • or the SDK repo
    .env
    (less ideal)
Example:
bash
mkdir -p ~/.clawdbot/skills/veil
cat > ~/.clawdbot/skills/veil/.env << 'EOF'
RPC_URL=https://base-mainnet.g.alchemy.com/v2/YOUR_KEY
EOF
chmod 600 ~/.clawdbot/skills/veil/.env
Veil需要查询大量区块链数据(如UTXO、默克尔证明等),因此公共RPC很可能会触发速率限制。推荐使用AlchemyInfura等提供的专用RPC。
RPC_URL=...
添加到以下任一文件中:
  • ~/.clawdbot/skills/veil/.env
    (优先选择)
  • 或SDK仓库中的
    .env
    文件(不太推荐)
示例:
bash
mkdir -p ~/.clawdbot/skills/veil
cat > ~/.clawdbot/skills/veil/.env << 'EOF'
RPC_URL=https://base-mainnet.g.alchemy.com/v2/YOUR_KEY
EOF
chmod 600 ~/.clawdbot/skills/veil/.env

3) Make scripts executable

3) 赋予脚本执行权限

bash
chmod +x scripts/*.sh
bash
chmod +x scripts/*.sh

4) Generate your Veil keypair

4) 生成Veil密钥对

bash
scripts/veil-init.sh
scripts/veil-keypair.sh
bash
scripts/veil-init.sh
scripts/veil-keypair.sh

5) Check your setup

5) 检查设置状态

bash
scripts/veil-status.sh
bash
scripts/veil-status.sh

6) Find your Bankr Base address

6) 查询你的Bankr Base地址

bash
scripts/veil-bankr-prompt.sh "What is my Base wallet address? Respond with just the address."
bash
scripts/veil-bankr-prompt.sh "What is my Base wallet address? Respond with just the address."

7) Check balances

7) 查看余额

bash
scripts/veil-balance.sh --address 0xYOUR_BANKR_ADDRESS
bash
scripts/veil-balance.sh --address 0xYOUR_BANKR_ADDRESS

8) Deposit via Bankr (sign & submit)

8) 通过Bankr存款(签名并提交)

bash
scripts/veil-deposit-via-bankr.sh 0.011 --address 0xYOUR_BANKR_ADDRESS
bash
scripts/veil-deposit-via-bankr.sh 0.011 --address 0xYOUR_BANKR_ADDRESS

9) Withdraw (private → public)

9) 提款(私密→公开)

bash
scripts/veil-withdraw.sh 0.007 0xYOUR_BANKR_ADDRESS
bash
scripts/veil-withdraw.sh 0.007 0xYOUR_BANKR_ADDRESS

References

参考资料

  • SDK Reference — CLI commands, environment variables, error codes
  • Troubleshooting — Common issues and debugging tips
  • SDK参考文档 — CLI命令、环境变量、错误码
  • 故障排查 — 常见问题及调试技巧

Notes

注意事项

  • For Bankr signing, this skill uses Bankr’s Agent API via your local
    ~/.clawdbot/skills/bankr/config.json
    .
  • For privacy safety: never commit
    .env.veil
    or
    .env
    files to git.
  • 关于Bankr签名:本Skill通过本地
    ~/.clawdbot/skills/bankr/config.json
    配置文件调用Bankr的Agent API。
  • 隐私安全提示:切勿将
    .env.veil
    .env
    文件提交至git仓库。