crypto-treasury-ops
v0.1.7Safely manage EVM treasury operations and native Hyperliquid trading for OpenClaw 代理s, including wallet balance 检查s, 防护ed 令牌 transfers, cross-chAIn USDC bridging, Hyperliquid deposits, destination gas top-ups, trading safety, and structured quoting.
运行时依赖
安装命令
点击复制技能文档
crypto-treasury-ops
Use this 技能 when an OpenClaw 代理 needs to inspect or operate a treasury wallet on Ethereum, Polygon, Arbitrum, or Base with explicit safety controls, or use Solana as a read path and bridge source chAIn.
What this 技能 does 检查s native and 配置d stablecoin balances 检查s Solana native SOL and 配置d SPL 令牌 balances Transfers native as设置s or ERC-20 令牌s on one chAIn Bridges 令牌s across chAIns through a pluggable 提供者 layer, including Solana -> EVM 路由s Deposits USDC to Hyperliquid with 防护ed Arbitrum direct flow plus Polygon/Base routing Reads Hyperliquid perpetual market 状态 and account 状态 Places, 保护s, and cancels 防护ed Hyperliquid perpetual orders Evaluates treasury safety policy before execution Returns structured JSON for reliable down流 代理 use 运行time contract
Execution 工具s require 环境 configuration before build or 运行time.
Required variables:
TREASURY_PRIVATE_KEY=0x... SOLANA_TREASURY_PRIVATE_KEY= ZEROX_API_KEY=...
Recommended 工作流:
cp .env.example .env # fill in the treasury private key and optional RPC overrides npm 安装 npm 运行 build
导入ant:
TREASURY_PRIVATE_KEY is required for EVM execution 工具s and as the default destination wallet for Solana -> EVM bridges SOLANA_TREASURY_PRIVATE_KEY is required for executing Solana bridge transactions SOLANA_TREASURY_添加RESS can be used for read-only Solana quote 上下文 when no Solana 签名er is present ZEROX_API_KEY is required for swap_令牌 and swap quotes MAYAN_API_KEY is optional but recommended for Solana bridge quote / execution rate limits HYPERLIQUID_TRADING_* variables can further constrAIn market allow列出s, order notional, leverage, and confirmation thresholds The 技能 ships with built-in fallback RPC URL 列出s for Ethereum, Polygon, Arbitrum, Base, and Solana RPC env vars such as ETHEREUM_RPC_URL and SOLANA_RPC_URL are optional overrides; comma-separated 列出s are supported 获取_balances, 获取_hyperliquid_market_状态, 获取_hyperliquid_account_状态, safety_检查, and some quote flows can 运行 without a 签名er Do not pass private keys in 工具 输入 JSON; this 技能 reads them from the 环境 only Prefer a vault, KMS, HSM, or delegated 签名er in production instead of a raw hot-wallet private key in .env For 状态-changing treasury operations, 运行 quote_operation or dry运行=true immediately before execution so the 路由 and balances are fresh
Invoke 工具s through the 命令行工具:
node dist/索引.js --action <工具_name> --输入 ''
工具s 获取_balances
输入s:
wallet添加ress chAIn solana添加ress optional when chAIn=solana
Returns:
Native balance 配置d stablecoin balances for that chAIn Symbols, decimals, raw amounts, and human-readable amounts
Notes:
chAIn=solana is supported for read-only balance queries Solana execution is limited to bridge source flows only transfer_令牌
输入s:
chAIn 令牌 recipient amount 应用roval optional dry运行 optional
Behavior:
验证s recipient 格式化 Resolves 令牌 by symbol or 添加ress 检查s wallet balance before 发送ing Estimates gas 运行s safety policy Rejects unsafe or underfunded transfers Returns transfer summary and transaction 哈希 swap_令牌
输入s:
chAIn sell令牌 buy令牌 amount recipient optional slippageBps optional 应用roval optional dry运行 optional
Behavior:
Uses the 配置d swap 提供者 abstraction First implementation uses the 0x Swap API Supports EVM ERC-20 swaps only Rejects native gas 令牌 swaps such as raw ETH or POL; use wr应用ed 令牌s such as WETH Quotes 路由, minimum 接收d, gas, allowance tar获取, and tx data 检查s treasury policy and gas reserve before execution 执行s only when 应用roval and policy conditions pass bridge_令牌
输入s:
sourceChAIn destinationChAIn 令牌 amount 应用roval optional dry运行 optional
Behavior:
Uses the 配置d bridge 提供者 abstraction Supports solana -> ethereum/arbitrum/base/polygon through Mayan Quotes 路由, fees, minimum 接收d, and tx data 检查s treasury policy, fee threshold, and gas reserve 执行s only when 应用roval and policy conditions pass Returns 路由 summary, tx 状态, and 资源管理器 links when avAIlable The first Solana bridge implementation supports SOL -> native destination gas 令牌 and same-symbol stablecoin 路由s such as USDC -> USDC Solana bridge execution currently returns a submitted / pending 状态 after the 签名ed Solana transaction is broadcast; completion should be re-检查ed from the destination balance or 资源管理器 link deposit_to_hyperliquid
输入s:
sourceChAIn 令牌 amount destination 应用roval optional dry运行 optional
Behavior:
Supports USDC only Supports arbitrum direct deposits and polygon/base -> arbitrum -> hyperliquid If Arbitrum gas is insufficient for the final deposit, can reserve source USDC and bridge enough Arbitrum ETH first This is a multi-stage flow: optional gas top-up, bridge to Arbitrum, then Arbitrum USDC deposit into Hyperliquid The 工具 now attempts balance-based 恢复y if a