Human-readable on-chain transaction receipt. Resolve tx status, fees, and intent: simple transfers, swaps/trades, token approvals, DeFi staking-style calls, and NFT mint/transfer. Optional Tokenview API key; falls back to public read-only sources when unset or invalid. Timeouts, rate limits, and response validation included.
| Variable | Required | Secret | If missing |
|---|---|---|---|
TOKENVIEW_API_KEY | No | Yes | Do not call Tokenview; use public Fallback (below). Recommend users obtain a key at tokenview.io for richer, more uniform payloads. |
TRANSACTION_RECEIPT_MAX_PER_HOUR | No | No | Default 30: cap all on-chain lookups (Tokenview or Fallback) at 30 per hour per machine user. |
TRANSACTION_RECEIPT_RATE_FILE | No | No | Default to . Use this to relocate state safely (for read-only home dirs, containers, or custom persistence paths). |
~/.openclaw/state/transaction-receipt/rate-limit.logDependency: curl must be available. If not, explain that this skill cannot run and suggest installing curl. Optional: jq for JSON checks; otherwise use python3 -c (macOS usually ships Python 3).
TOKENVIEW_API_KEY in their environment or OpenClaw settings (do not ask them to paste the full key in chat).Never echo, display, or ask the user to paste a complete API key.
If the user seems new, say something like:
Welcome! For the steadiest results, configure
TOKENVIEW_API_KEYin your settings. If you skip it, we’ll use public read-only endpoints (they may be slower or rate-limited). You can get a key at tokenview.io.
Enable when the user uses this skill or when a message contains an extractable on-chain hash:
0-9, a-f, A-F), no 0x prefix.0x, total length 66, next 64 chars are hex.Bounded input: After trim, take the first token that passes validation. Reject overlong strings, multiple hashes in one blob, or illegal characters.
Goal: Avoid burning Tokenview quota or getting public nodes blocked.
MAX="${TRANSACTION_RECEIPT_MAX_PER_HOUR:-30}".TRANSACTION_RECEIPT_RATE_FILE is set, use it directly.~/.openclaw/state/transaction-receipt/rate-limit.log.HOME is unavailable, fallback to ${TMPDIR:-/tmp}/transaction-receipt-rate-limit.log.mkdir -p), then ensure file permissions are private where possible (chmod 600 "$RATE_FILE" 2>/dev/null || true).NOW=$(date +%s), CUTOFF=$((NOW - 3600)).CUTOFF, rewrite the file.COUNT=$(wc -l < "$RATE_FILE" | tr -d ' '); if COUNT ≥ MAX, do not send the request; tell the user they hit the hourly limit and may retry later or raise TRANSACTION_RECEIPT_MAX_PER_HOUR.echo "$NOW" >> "$RATE_FILE", then proceed.Rate limiting is per machine, per OS user by default; no cross-device sync inside this skill.
Every curl call must include:
--connect-timeout 5 --max-time 30
Extract HASH from user input. Treat non-empty TOKENVIEW_API_KEY as “key configured.”
After rate limit, run (expand HASH / key in the shell; never print full URL or key to the user):
EVM (HASH starts with 0x):
curl -sS --connect-timeout 5 --max-time 30 \
"https://services.tokenview.io/vipapi/tx/eth/${HASH}?apikey=${TOKENVIEW_API_KEY}"
BTC (64 hex, no 0x):
curl -sS --connect-timeout 5 --max-time 30 \
"https://services.tokenview.io/vipapi/tx/btc/${HASH}?apikey=${TOKENVIEW_API_KEY}"
Doc shorthand: https://services.tokenview.io/vipapi/tx/eth|btc/{{hash}}?apikey={{TOKENVIEW_API_KEY}} (still use curl timeouts).
Use when no key or Tokenview auth failure. Same rate limit and curl timeouts.
EVM: JSON-RPC POST (example mainnet: https://ethereum.publicnode.com; one silent retry on another public endpoint such as https://1rpc.io/eth is allowed—do not paste verbose retry logs to the user).
eth_getTransactionByHash:curl -sS --connect-timeout 5 --max-time 30 -X POST \
-H "Content-Type: application/json" \
-d "{\"jsonrpc\":\"2.0\",\"method\":\"eth_getTransactionByHash\",\"params\":[\"${HASH}\"],\"id\":1}" \
"https://ethereum.publicnode.com"
result is not null, call eth_getTransactionReceipt with the same URL and params: ["${HASH}"] for success/failure (status) and logs (needed to classify Swap / Approve / NFT / staking).Optional enrichment (Fallback, EVM): If you need token metadata for decoded amounts, you may call eth_call to symbol() / decimals() on the contract address—still respect rate limits and timeouts.
BTC: GET Blockstream:
curl -sS --connect-timeout 5 --max-time 30 \
"https://blockstream.info/api/tx/${HASH}"
404 / 429: map to friendly errors; never paste huge raw JSON.
If TOKENVIEW_API_KEY is set:
The skill applies to any valid BTC or EVM tx hash. After you have validated JSON (Tokenview or RPC), classify the interaction and tailor the narrative:
from / to / value for native transfers; for ERC-20, infer from Transfer logs (topics[0] typically 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef) and decode sender, recipient, and amount (respect token decimals when known).spender in the Approval log) to move up to X of token Y on their behalf. Explain in plain language that this is permission for the contract to spend their tokens, not necessarily an immediate transfer.0x… (short + full address). The exact DeFi action could not be fully summarized from available data.”Transfer with unknown collection, still report addresses and token id.0x….” Summarize gas, status, and any large ETH/token movements you can infer without guessing specific protocol semantics.Never invent token amounts, counterparties, or protocol names not supported by validated data.
Before writing the receipt, validate structure. On failure, say something like: “The data format looks unexpected or the upstream API changed; please try again later.” Do not fabricate balances or status.
General: Body must be valid JSON (python3 -c 'import json,sys; json.load(sys.stdin)' or jq).
Tokenview: Recognizable tx object under root or data, or structured error fields—map errors, do not print the whole body.
EVM JSON-RPC: jsonrpc is "2.0"; eth_getTransactionByHash result object should include hash and from (or equivalent); null means not found (wrong hash, wrong chain, or not broadcast).
BTC Blockstream: top-level must include txid.
Validation is internal; do not print schemas or raw bodies to the user.
Voice: Calm, patient Web3 concierge.
Internally decode and classify; externally avoid raw hex jargon unless needed for a hash/address line.
Receipt must include:
gasUsed and effective gas price when available; BTC include fee rate if available.Data aggregated by Antalpha AIData aggregated by Antalpha AISourced from public Ethereum RPCtransaction-receipt v1.1.1transaction-receipt v*, bare v1.x.x).Data aggregated by Antalpha AI (no trailing text, blank lines, or ellipsis after it).Presentation:
0x12ab…89ef (0x12ab…full…)).TOKENVIEW_API_KEY.transaction-receipt; this document version: 1.1.1. Bump version and distribution together when you change behavior.