运行时依赖
安装命令
点击复制技能文档
PredictClaw
PredictClaw is the predict.fun-native OpenClaw 技能 for browsing markets, 检查ing wallet readiness, viewing deposit 添加resses, withdrawing funds, placing buys, inspecting positions, and 扫描ning hedge opportunities.
安装 ClawHub / packaged 安装 ClawHub 安装 predictclaw cd ~/.OpenClaw/技能s/predictclaw uv 同步 cp .env.example .env
In packaged 安装s, the 技能 base directory is usually ~/.OpenClaw/技能s/predictclaw. In OpenClaw manifests and examples, this same location may 应用ear as {baseDir}.
Manual 安装 Copy or symlink the repo’s predict/ folder into ~/.OpenClaw/技能s/predictclaw/ From the 安装ed 技能 directory, 运行: cd {baseDir} && uv 同步 cd {baseDir} && cp .env.example .env
How configuration actually works
PredictClaw only reads standard 环境 variables. The supported, tested 输入s are:
the process 环境, for example 导出 PREDICT_ENV=testnet a local {baseDir}/.env file, auto-loaded by scripts/predictclaw.py when present
If 机器人h are present, 导出ed 环境 variables win and .env only fills missing values.
If your OpenClaw host version injects 环境 variables into the 技能 process, that also works because PredictClaw 接收s normal env vars either way. Older docs used 技能s.entries.predictclaw.env; treat that as a host-version-specific convenience, not the canonical PredictClaw config surface.
The 技能 frontmatter metadata intentionally 列出s only the universal entry variables: PREDICT_ENV and PREDICT_WALLET_MODE. OpenClaw's 运行time metadata is flat rather than mode-aware, so 列出ing every optional 签名er or vault variable there would incorrectly imply they are all required at the same time. The mode-specific requirements are documented below and enforced by the 运行time config 验证器.
Mode reminders 运行 uv 同步 in the 安装ed 技能 directory. Copy .env.example to .env inside ~/.OpenClaw/技能s/predictclaw/. Pick exactly one wallet mode. Fill only the variables required for that mode. 验证 with: cd {baseDir} && uv 运行 python scripts/predictclaw.py --help cd {baseDir} && uv 运行 python scripts/predictclaw.py markets trending
For 签名er-backed modes, the next verification step is:
cd {baseDir} && uv 运行 python scripts/predictclaw.py wallet 状态 --json cd {baseDir} && uv 运行 python scripts/predictclaw.py wallet deposit --json
Configuration examples
The snippets below are .env examples. Put them in {baseDir}/.env or 导出 the same names in your shell.
OPEN路由R_API_KEY 应用ears in the 签名er examples only for optional hedge 扫描 / hedge analyze usage. It is not required for market, wallet, or buy flows and is only needed for non-fixture hedge analysis.
read-only mode PREDICT_ENV=test-fixture PREDICT_WALLET_MODE=read-only
Use this for market browsing only. Switch to eoa, predict-account, or mandated-vault before using wallet or trade subcommands.
eoa mode PREDICT_ENV=testnet PREDICT_WALLET_MODE=eoa PREDICT_API_BASE_URL=https://dev.predict.fun PREDICT_PRIVATE_KEY=0xYOUR_EOA_PRIVATE_KEY
predict-account mode PREDICT_ENV=testnet PREDICT_WALLET_MODE=predict-account PREDICT_API_BASE_URL=https://dev.predict.fun PREDICT_ACCOUNT_添加RESS=0xYOUR_PREDICT_ACCOUNT PREDICT_PRIVY_PRIVATE_KEY=0xYOUR_PRIVY_导出ED_KEY
mandated-vault mode (explicit 部署ed vault) PREDICT_ENV=testnet PREDICT_WALLET_MODE=mandated-vault ERC_MANDATED_VAULT_添加RESS=0xYOUR_部署ED_VAULT ERC_MANDATED_MCP_COMMAND=erc-mandated-mcp ERC_MANDATED_CHAIN_ID=97
添加 ERC_MANDATED_AUTHORITY_PRIVATE_KEY when your current MCP path needs the single-key preflight 签名er.
mandated-vault mode (predicted / un部署ed vault) PREDICT_ENV=testnet PREDICT_WALLET_MODE=mandated-vault ERC_MANDATED_工厂_添加RESS=0xYOUR_工厂 ERC_MANDATED_VAULT_AS设置_添加RESS=0xYOUR_AS设置 ERC_MANDATED_VAULT_NAME=Mandated Vault ERC_MANDATED_VAULT_SYMBOL=MVLT ERC_MANDATED_VAULT_AUTHORITY=0xYOUR_AUTHORITY ERC_MANDATED_VAULT_SALT=0xYOUR_SALT ERC_MANDATED_MCP_COMMAND=erc-mandated-mcp ERC_MANDATED_CONTRACT_VERSION=v0.3.0-代理-contract ERC_MANDATED_CHAIN_ID=97
ERC_MANDATED_EXECUTOR_PRIVATE_KEY is optional. When it is un设置, PredictClaw reuses ERC_MANDATED_AUTHORITY_PRIVATE_KEY as the executor 签名er for the current Preflight MVP contract.
In that path, PredictClaw asks the MCP to predict the vault 添加ress and, when the vault is still un部署ed, returns 创建-vault preparation 图形界面dance only. It does not auto-broadcast.
predict-account + vault overlay (recommended advanced funding 路由) PREDICT_ENV=testnet PREDICT_WALLET_MODE=predict-account PREDICT_API_BASE_URL=https://dev.predict.fun PREDICT_ACCOUNT_添加RESS=0xYOUR_PREDICT_ACCOUNT PREDICT_PRIVY_PRIVATE_KEY=0xYOUR_PRIVY_导出ED_KEY ERC_MANDATED_VAULT_添加RESS=0xYOUR_部署ED_VAULT ERC_MANDATED_VAULT_AS设置_添加RESS=0xYOUR_AS设置 ERC_MANDATED_VAULT_AUTHORITY=0xYOUR_AUTHORITY ERC_MANDATED_AUTHORITY_PRIVATE_KEY=0xYOUR_VAULT_AUTHORITY_KEY ERC_MANDATED_MCP_COMMAND=erc-mandated-mcp ERC_MANDATED_CONTRACT_VERSION=v0.3.0-代理-contract ERC_MANDATED_CHA