$npx -y skills add basezh/agent-skills-on-base --skill veilPrivacy and shielded transactions on Base via Veil Cash (veil.cash). Deposit ETH or USDC into private pools, withdraw/transfer privately using ZK proofs. Manage Veil keypairs, check private/queue balances across all pools, and submit deposits via Bankr. Use when the user wants an
| 1 | # Veil |
| 2 | |
| 3 | This skill wraps the `@veil-cash/sdk` CLI to make Veil operations agent-friendly. |
| 4 | |
| 5 | ## Supported Assets |
| 6 | |
| 7 | | Asset | Decimals | Description | |
| 8 | |-------|----------|-------------| |
| 9 | | ETH | 18 | Native ETH (via WETH) | |
| 10 | | USDC | 6 | USDC on Base | |
| 11 | |
| 12 | ## What it does |
| 13 | |
| 14 | - **Key management**: generate and store a Veil keypair locally |
| 15 | - **Status check**: verify configuration, registration, and relay health |
| 16 | - **Balances**: `veil balance` (queue + private) — supports `--pool eth|usdc` |
| 17 | - **Deposits via Bankr**: build **Bankr-compatible unsigned transactions** and ask Bankr to sign & submit (handles ERC20 approve + deposit for USDC) |
| 18 | - **Private actions**: `withdraw`, `transfer`, `merge` for ETH or USDC — executed locally using `VEIL_KEY` (ZK/proof flow) |
| 19 | |
| 20 | ## File locations (recommended) |
| 21 | |
| 22 | - Veil keys: `~/.clawdbot/skills/veil/.env.veil` *(chmod 600)* |
| 23 | - Bankr API key: `~/.clawdbot/skills/bankr/config.json` |
| 24 | |
| 25 | ## Quick start |
| 26 | |
| 27 | ### 1) Install the Veil SDK |
| 28 | |
| 29 | **Option A: Global npm install (recommended)** |
| 30 | ```bash |
| 31 | npm install -g @veil-cash/sdk |
| 32 | ``` |
| 33 | |
| 34 | **Option B: Clone from GitHub** |
| 35 | ```bash |
| 36 | mkdir -p ~/.openclaw/workspace/repos |
| 37 | cd ~/.openclaw/workspace/repos |
| 38 | git clone https://github.com/veildotcash/veildotcash-sdk.git |
| 39 | cd veildotcash-sdk |
| 40 | npm ci && npm run build |
| 41 | ``` |
| 42 | |
| 43 | ### 2) Configure Base RPC (recommended) |
| 44 | |
| 45 | Veil queries a lot of blockchain data (UTXOs, merkle proofs, etc.), so public RPCs will likely hit rate limits. A dedicated RPC from [Alchemy](https://www.alchemy.com/), [Infura](https://www.infura.io/), or similar is recommended. |
| 46 | |
| 47 | Put `RPC_URL=...` in **one** of these: |
| 48 | |
| 49 | - `~/.clawdbot/skills/veil/.env` *(preferred)* |
| 50 | - or the SDK repo `.env` (less ideal) |
| 51 | |
| 52 | Example: |
| 53 | ```bash |
| 54 | mkdir -p ~/.clawdbot/skills/veil |
| 55 | cat > ~/.clawdbot/skills/veil/.env << 'EOF' |
| 56 | RPC_URL=https://base-mainnet.g.alchemy.com/v2/YOUR_KEY |
| 57 | EOF |
| 58 | chmod 600 ~/.clawdbot/skills/veil/.env |
| 59 | ``` |
| 60 | |
| 61 | ### 3) Make scripts executable |
| 62 | |
| 63 | ```bash |
| 64 | chmod +x scripts/*.sh |
| 65 | ``` |
| 66 | |
| 67 | ### 4) Generate your Veil keypair |
| 68 | |
| 69 | ```bash |
| 70 | scripts/veil-init.sh |
| 71 | scripts/veil-keypair.sh |
| 72 | ``` |
| 73 | |
| 74 | ### 5) Check your setup |
| 75 | |
| 76 | ```bash |
| 77 | scripts/veil-status.sh |
| 78 | ``` |
| 79 | |
| 80 | ### 6) Find your Bankr Base address |
| 81 | |
| 82 | ```bash |
| 83 | scripts/veil-bankr-prompt.sh "What is my Base wallet address? Respond with just the address." |
| 84 | ``` |
| 85 | |
| 86 | ### 7) Check balances |
| 87 | |
| 88 | ```bash |
| 89 | # ETH pool (default) |
| 90 | scripts/veil-balance.sh --address 0xYOUR_BANKR_ADDRESS |
| 91 | |
| 92 | # USDC pool |
| 93 | scripts/veil-balance.sh --address 0xYOUR_BANKR_ADDRESS --pool usdc |
| 94 | ``` |
| 95 | |
| 96 | ### 8) Deposit via Bankr (sign & submit) |
| 97 | |
| 98 | ```bash |
| 99 | # Deposit ETH |
| 100 | scripts/veil-deposit-via-bankr.sh ETH 0.011 --address 0xYOUR_BANKR_ADDRESS |
| 101 | |
| 102 | # Deposit USDC (auto-handles approve + deposit) |
| 103 | scripts/veil-deposit-via-bankr.sh USDC 100 --address 0xYOUR_BANKR_ADDRESS |
| 104 | ``` |
| 105 | |
| 106 | ### 9) Withdraw (private to public) |
| 107 | |
| 108 | ```bash |
| 109 | scripts/veil-withdraw.sh ETH 0.007 0xYOUR_BANKR_ADDRESS |
| 110 | scripts/veil-withdraw.sh USDC 50 0xRECIPIENT |
| 111 | ``` |
| 112 | |
| 113 | ### 10) Transfer privately |
| 114 | |
| 115 | ```bash |
| 116 | scripts/veil-transfer.sh ETH 0.01 0xRECIPIENT |
| 117 | scripts/veil-transfer.sh USDC 25 0xRECIPIENT |
| 118 | ``` |
| 119 | |
| 120 | ### 11) Merge UTXOs |
| 121 | |
| 122 | ```bash |
| 123 | scripts/veil-merge.sh ETH 0.1 |
| 124 | scripts/veil-merge.sh USDC 100 |
| 125 | ``` |
| 126 | |
| 127 | ## References |
| 128 | |
| 129 | - [SDK Reference](references/sdk-reference.md) — CLI commands, environment variables, error codes |
| 130 | - [Troubleshooting](references/troubleshooting.md) — Common issues and debugging tips |
| 131 | |
| 132 | ## Notes |
| 133 | |
| 134 | - For **Bankr signing**, this skill uses Bankr's Agent API via your local `~/.clawdbot/skills/bankr/config.json`. |
| 135 | - For **USDC deposits** via Bankr, the skill automatically submits the ERC20 approval transaction first, then the deposit transaction. |
| 136 | - For privacy safety: never commit `.env.veil` or `.env` files to git. |