Zeal Wallet Delegate
Propose transactions to a Zeal Wallet. Generate an agent wallet, configure it for a specific Zeal Wallet, and sign transaction proposals.
User-Facing Language
When talking to the user, always refer to their wallet as their "Zeal Wallet" — never mention "Safe" or "Gnosis Safe" directly. The underlying Safe infrastructure is abstracted away. Also never mention anything related to "delegates" as this is also abstracted away from users.
Security
The agent wallet's private key is stored at ~/.zeal-agent-wallet/wallet.json.
- - Never expose the private key in chat or logs
- Never share the contents of INLINECODE1
- The agent wallet is a proposer only — it cannot execute transactions without owner approval in the Zeal app
Quick Reference
| Action | Command |
|---|
| Install deps | INLINECODE2 |
| Setup |
npm run setup -- --safe <ADDRESS> |
| Propose txn |
npm run propose-txn -- --to <ADDR> --value <WEI> --data <HEX> --network <NAME> --operation <0\|1> --origin <DESC> |
| Disconnect |
npm run disconnect |
All commands must be run from {baseDir}.
Installation
If node_modules doesn't exist yet, install dependencies:
CODEBLOCK0
Setup
When the user asks you to set up for a Zeal Wallet, run:
CODEBLOCK1
Give the printed agent address back to the user and tell them to paste it into the Zeal app to complete the connection. This will add the agent as a Safe delegate.
Propose Transaction
When asked to propose a transaction to the Zeal Wallet, run:
CODEBLOCK2
Parameters:
- -
--to — destination address (required) - INLINECODE9 — value in wei (required, use "0" for no value transfer)
- INLINECODE10 — hex-encoded calldata (required, use "0x" for simple transfers)
- INLINECODE11 — network name from networks.json (required)
- INLINECODE12 — 0 for Call, 1 for DelegateCall (required)
- INLINECODE13 — short description of what this transaction does and why it's being proposed (required, max 200 characters)
The agent is a Safe delegate — proposals require owner approval in the Zeal app, so the agent is free to propose without user confirmation.
Disconnect
To disconnect from the Zeal Wallet (removes the wallet configuration, preventing further proposals until setup is run again):
CODEBLOCK3
The agent wallet is preserved — only the Zeal Wallet configuration is removed.
Status
To check the current configuration, verify these files exist:
- -
~/.zeal-agent-wallet/wallet.json — agent wallet (contains address and private key) - INLINECODE15 — Zeal Wallet configuration (contains safeAddress)
Check {baseDir}/networks.json for supported networks and their names.
Error Handling
- - If you encounter any issues that relate to not being a delegate or not being able to propose transactions, your user likely disabled transactions for you on that network. Stop trying to propose and ask them to enable transactions for you on that network.
Zeal 钱包委托
向 Zeal 钱包提交交易提案。生成一个代理钱包,将其配置到特定的 Zeal 钱包,并签署交易提案。
面向用户的用语
与用户交流时,始终将他们的钱包称为 Zeal 钱包——切勿直接提及 Safe 或 Gnosis Safe。底层的 Safe 基础设施已被抽象隐藏。同样,不要提及任何与 委托 相关的内容,因为这对用户来说也是被抽象隐藏的。
安全性
代理钱包的私钥存储在 ~/.zeal-agent-wallet/wallet.json 中。
- - 切勿在聊天或日志中暴露私钥
- 切勿分享 ~/.zeal-agent-wallet/wallet.json 的内容
- 代理钱包仅作为提案者——未经 Zeal 应用中的所有者批准,它无法执行交易
快速参考
| 操作 | 命令 |
|---|
| 安装依赖 | cd {baseDir} && npm install |
| 设置 |
npm run setup -- --safe <地址> |
| 提交提案 | npm run propose-txn -- --to <地址> --value
--data <十六进制> --network <名称> --operation <0\|1> --origin <描述> |
| 断开连接 | npm run disconnect |
所有命令必须在 {baseDir} 目录下运行。
安装
如果 node_modules 尚不存在,请安装依赖:
bash
if [ ! -d {baseDir}/node_modules ]; then
cd {baseDir} && npm install
fi
设置
当用户要求你为 Zeal 钱包进行设置时,运行:
bash
cd {baseDir} && npm run setup -- --safe
将打印出的代理地址返回给用户,并告知他们将其粘贴到 Zeal 应用中以完成连接。这会将代理添加为 Safe 委托。
提交交易提案
当被要求向 Zeal 钱包提交交易提案时,运行:
bash
cd {baseDir} && npm run propose-txn -- --to <地址> --value --data <十六进制数据> --network <名称> --operation <0|1> --origin <描述>
参数:
- - --to — 目标地址(必填)
- --value — 以 wei 为单位的值(必填,无价值转移时使用 0)
- --data — 十六进制编码的调用数据(必填,简单转账时使用 0x)
- --network — 来自 networks.json 的网络名称(必填)
- --operation — 0 表示调用,1 表示委托调用(必填)
- --origin — 对该交易的作用及提案原因的简短描述(必填,最多 200 个字符)
代理是 Safe 委托——提案需要 Zeal 应用中的所有者批准,因此代理可以自由提交提案而无需用户确认。
断开连接
要断开与 Zeal 钱包的连接(移除钱包配置,阻止进一步提交提案,直到再次运行设置):
bash
cd {baseDir} && npm run disconnect
代理钱包会被保留——仅移除 Zeal 钱包的配置。
状态检查
要检查当前配置,请验证以下文件是否存在:
- - ~/.zeal-agent-wallet/wallet.json — 代理钱包(包含地址和私钥)
- ~/.zeal-agent-wallet/config.json — Zeal 钱包配置(包含 safeAddress)
查看 {baseDir}/networks.json 以了解支持的网络及其名称。
错误处理
- - 如果你遇到任何与不是委托或无法提交提案相关的问题,很可能是用户在该网络上禁用了你的交易权限。请停止尝试提交提案,并要求用户在该网络上为你启用交易权限。