zerion-sign
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseZerion — Off-chain Signing
Zerion — 链下签名
Produce signatures without broadcasting a transaction. Used for login flows, permits, and signed orders. The signature is the output — you hand it to the verifying party (a dapp, relayer, exchange, etc.).
无需广播交易即可生成签名。适用于登录流程、许可和签名订单。签名为输出结果,需将其提供给验证方(如dapp、中继器、交易所等)。
Setup
安装设置
If a command fails with , install once:
zerioncommand not foundbash
npm install -g zerion-cliRequires Node.js ≥ 20. For auth see the umbrella skill. Signing requires an agent token (used as the wallet passphrase). For setup → .
zerionzerion-agent-management如果命令提示,请执行一次安装:
zerioncommand not foundbash
npm install -g zerion-cli需要Node.js ≥ 20版本。认证相关内容请查看 umbrella skill。签名需要代理令牌(用作钱包密码)。设置方法请参考。
zerionzerion-agent-managementWhen to use
使用场景
- SIWE ("Sign-In with Ethereum") login flows
- EIP-2612 — gasless ERC-20 approvals
permit - Permit2 approvals
- Seaport / OpenSea off-chain orders
- Any dapp asking "please sign this message" or "please sign this typed data"
- Identity attestations, DAO snapshot voting
For on-chain transactions (swap/bridge/send) → .
zerion-trading- SIWE("Sign-In with Ethereum")登录流程
- EIP-2612 — 无gas费的ERC-20授权
permit - Permit2授权
- Seaport / OpenSea链下订单
- 任何要求“请签名此消息”或“请签名此类型数据”的dapp
- 身份认证、DAO快照投票
如需进行链上交易(兑换/跨链桥/转账),请使用。
zerion-tradingSign a message
签名消息
bash
undefinedbash
undefinedEIP-191 personal_sign (EVM)
EIP-191 personal_sign(EVM)
zerion sign-message "hello" --chain ethereum
zerion sign-message "hello" --chain base --wallet <name>
zerion sign-message "hello" --chain ethereum
zerion sign-message "hello" --chain base --wallet <name>
Raw hex bytes (no prefix, used by some wallets)
原生十六进制字节(无前缀,部分钱包使用)
zerion sign-message 0xdeadbeef --encoding hex --chain ethereum
zerion sign-message 0xdeadbeef --encoding hex --chain ethereum
Raw ed25519 (Solana)
原生ed25519(Solana)
zerion sign-message "hello" --chain solana
zerion sign-message "hello" --chain solana
Explicit flags
显式参数
zerion sign-message --message "text" --wallet <name> --chain <chain>
`<chain>` determines the signing scheme: EVM chains use EIP-191 personal_sign; Solana uses raw ed25519.zerion sign-message --message "text" --wallet <name> --chain <chain>
`<chain>`参数决定签名方案:EVM链使用EIP-191 personal_sign;Solana使用原生ed25519。Sign typed data (EIP-712, EVM only)
签名类型数据(EIP-712,仅支持EVM)
EIP-712 typed data requires a JSON object with . Include in when the verifier expects it.
{ domain, types, primaryType, message }EIP712Domaintypesbash
undefinedEIP-712类型数据需要包含的JSON对象。当验证方要求时,需在中包含。
{ domain, types, primaryType, message }typesEIP712Domainbash
undefinedInline JSON
内联JSON
zerion sign-typed-data --data '{"domain":{...},"types":{...},"primaryType":"Permit","message":{...}}' --chain base
zerion sign-typed-data --data '{"domain":{...},"types":{...},"primaryType":"Permit","message":{...}}' --chain base
From file
从文件读取
zerion sign-typed-data --file permit.json --chain ethereum
zerion sign-typed-data --file permit.json --chain ethereum
From stdin
从标准输入读取
cat permit.json | zerion sign-typed-data --chain ethereum
Output is a JSON object with the signature (`r`, `s`, `v` for EVM) on stdout.cat permit.json | zerion sign-typed-data --chain ethereum
输出为包含签名的JSON对象(EVM为`r`, `s`, `v`字段),输出至标准输出。Setup safety net
设置安全机制
If no agent token is configured and stderr is a TTY, the CLI offers:
Want to setup an agent token for "<wallet>"? [Y/n]…and runs inline. After that completes, the original command continues with the fresh token. In non-TTY contexts (CI, piped) the command fails fast with — see .
agent create-tokensign-*no_agent_tokenzerion-agent-management如果未配置代理令牌且标准错误输出为TTY,CLI会提示:
Want to setup an agent token for "<wallet>"? [Y/n]并自动运行。完成后,原命令将使用新生成的令牌继续执行。在非TTY环境(CI、管道)中,命令会立即失败并返回错误——请查看。
agent create-tokensign-*no_agent_tokenzerion-agent-managementSecurity
安全注意事项
Signing arbitrary messages or typed data can authorize unlimited token allowances (e.g. a malicious permit). Before signing:
- Verify the domain (chain ID, contract address, name, version) matches the dapp you intended to interact with.
- Verify the primaryType matches the action you expected (,
Permit, etc.).OrderComponents - For -style payloads, check the spender, value, and deadline explicitly.
permit
The CLI doesn't enforce semantic checks — it signs whatever is passed. Apply policies () to restrict which contracts can be signed for if needed.
zerion-agent-management签名任意消息或类型数据可能会授权无限制的令牌额度(如恶意许可)。签名前请:
- 验证domain(链ID、合约地址、名称、版本)与你要交互的dapp一致。
- 验证primaryType与你预期的操作匹配(如、
Permit等)。OrderComponents - 对于类负载,请明确检查spender、value和deadline。
permit
CLI不会执行语义检查——它会对传入的任何内容进行签名。如有需要,可通过策略()限制可签名的合约。
zerion-agent-managementCommon errors
常见错误
| Code | Cause | Fix |
|---|---|---|
| No agent token | |
| Missing | Validate the JSON shape |
| Invalid | |
| Wallet not in vault | |
| 错误码 | 原因 | 解决方法 |
|---|---|---|
| 未配置代理令牌 | 使用 |
| 缺少 | 验证JSON结构 |
| | 执行 |
| 钱包不在密钥库中 | 执行 |