OpenMath Claim Reward
name: openmath-claim-reward
by bennyzhe · published 2026-04-01
$ claw add gh:bennyzhe/bennyzhe-openmath-claim-reward---
name: openmath-claim-reward
description: Claims earned rewards from the OpenMath platform. Use when the user wants to query claimable imported/proof rewards or withdraw verified Shentu rewards after a proof has passed verification.
version: v1.0.4
requirements:
commands:
- python3
- shentud
environment_variables:
- OPENMATH_ENV_CONFIG
- SHENTU_CHAIN_ID
- SHENTU_NODE_URL
side_effects:
- Reads shared openmath-env.json from --config, OPENMATH_ENV_CONFIG, or the standard project/user config locations
- Queries a remote Shentu RPC endpoint; defaults to https://rpc.shentu.org:443 unless SHENTU_NODE_URL or --node overrides it
- Reward withdrawal commands use the local OS keyring through shentud --keyring-backend os
---
# OpenMath Claim Reward
Instructions
Query and withdraw rewards for verified OpenMath activity on Shentu. Flow: query `bounty rewards` → withdraw via `bounty withdraw-rewards` → wait 5–10 s → re-query. Uses `SHENTU_CHAIN_ID` and `SHENTU_NODE_URL` for runtime chain/RPC settings, with built-in mainnet defaults if unset. Shared config resolution order: `--config <path>` → `OPENMATH_ENV_CONFIG` → `./.openmath-skills/openmath-env.json` → `~/.openmath-skills/openmath-env.json`. If `OPENMATH_ENV_CONFIG` is set, treat it as the selected config path. If that file is missing or invalid, stop and fix it instead of silently falling back.
Requires trusted local `python3` and `shentud` binaries on `PATH`. Read-only reward queries shell out to local `shentud` and query a Shentu RPC endpoint. Withdrawals additionally rely on the local OS keyring via `shentud --keyring-backend os`. Before any withdrawal, confirm the key name, resolved address, and node URL with the user.
First-run gate
If the user already provided an address explicitly, reward query can run immediately.
If no address was provided, auto-discover `prover_address` from `OPENMATH_ENV_CONFIG` when it is set; otherwise check only `./.openmath-skills/openmath-env.json` or `~/.openmath-skills/openmath-env.json`. If no usable config exists, or if the config exists but `prover_address` is missing, **do not guess the address**. Follow [references/init-setup.md](references/init-setup.md).
For withdrawals, do not proceed until a local `os` keyring key is known for the same address.
Do not broadcast a withdrawal until the user confirms the matching key name/address and the RPC node they want to use.
Workflow checklist
Scripts
| Script | Command | Use when |
|--------|---------|----------|
| Query rewards | `python3 scripts/query_reward_status.py rewards [address] [--config <path>] [--wait-seconds 0]` | Checking claimable imported_rewards and proof_rewards for an address, or auto-discovering `prover_address` from `--config`, `OPENMATH_ENV_CONFIG`, or the default config locations when omitted. |
| Query tx | `python3 scripts/query_reward_status.py tx <txhash> [--wait-seconds 6]` | After withdraw broadcast to confirm inclusion. |
Withdraw is done with raw `shentud tx bounty withdraw-rewards --keyring-backend os` (see workflow above).
Notes
References
Load when needed (one level from this file):
Identity setup for theorem submission still lives in **openmath-submit-theorem**, but reward querying itself does not require `openmath-env.json`.
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...