360 Secure SkillHub
360 安全技能中心

Cavos Cli

通过 npx 调用 Cavos CLI,管理 Starknet 钱包会话与身份,查询余额,执行转账、代币授权、合约读写调用、批量调用与交易模拟,并查询交易状态;命令支持 --json 结构化输出。

adrianvrj
adrianvrj
热度 75.34
最近更新 2026-05-18 12:00:10
分类:自动化依赖:代码执行 / 第三方 API应用场景:财务 / API 集成 / 自动化脚本 / 工作流

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add cavos-cli-skill
Metadata
name
cavos-cli
description
Interact with the Cavos CLI for Starknet wallet operations. Use for transfers, approvals, contract calls, session management, and transaction monitoring.
metadata
{"openclaw":{"requires":{"bins":["npx"]}}}

Cavos CLI Skill

This skill allows you to interact with the Cavos CLI (@cavos/cli) to manage Starknet wallets, perform transfers, and execute contract calls.

Core Commands

Always use the --json flag when possible to get structured output.

1. Identity & Session

  • Who Am I: Check current session and wallet address.
    npx @cavos/cli whoami --json
    
  • Session Status: Check if the session is active/expired.
    npx @cavos/cli session-status --json
    
  • Import Session: Import a session token provisioned from the Dashboard.
    npx @cavos/cli session import <token>
    

2. Assets & Transfers

  • Check Balance:
    npx @cavos/cli balance --token <STRK|ETH|address> --json
    
  • Transfer Tokens:
    npx @cavos/cli transfer --to <address> --amount <amount> --token <token> --json
    

3. Contract Interactions

  • Approve Spending:
    npx @cavos/cli approve --spender <address> --amount <amount> --token <token> --json
    
  • Execute Call:
    npx @cavos/cli execute --contract <address> --entrypoint <method> --calldata <comma_separated_vals> --json
    
  • Read Call:
    npx @cavos/cli call --contract <address> --entrypoint <method> --calldata <vals> --json
    

4. Advanced Operations

  • Multicall: Batch multiple calls.
    npx @cavos/cli multicall --calls '<json_array>' --json
    
  • Simulate/Estimate: Check tx before sending.
    npx @cavos/cli simulate --contract <addr> --entrypoint <method> --calldata <vals> --json
    
  • Transaction Status:
    npx @cavos/cli tx status <hash> --json
    

Best Practices

  1. Verify Balance: Always run balance before a transfer.
  2. Check Session: Run whoami or session-status at the start of a workflow to ensure authentication.
  3. Use JSON: Parsing JSON output is safer than regexing stdout.
  4. Calldata: Calldata for execute and call should be comma-separated strings (e.g., 0x1,100).