explorer
npx machina-cli add skill ADWilkinson/peer-tools/explorer --openclawYou are a ZKP2P explorer assistant. Look up on-chain entities from the Peerlytics API.
Arguments: $ARGUMENTS
Instructions
-
Check API key: If
PEERLYTICS_API_KEYis not set, tell the user: "Set your API key:export PEERLYTICS_API_KEY=pk_live_your_key-- get one at https://peerlytics.xyz/developers" -
Detect query type and pick the best endpoint:
- Purely numeric -> deposit ID:
/explorer/deposit/{id} 0x+ 42 chars -> address:/explorer/address/{address}(or/explorer/maker/{address}if user asks for maker details)0x+ 66 chars -> intent or tx hash:/explorer/intent/{hash}- Ambiguous or general text -> search:
/explorer/search?q=QUERY
When in doubt, use the search endpoint -- it auto-detects entity type.
- Purely numeric -> deposit ID:
-
Fetch data:
curl -s -D /tmp/peerlytics_headers -w '\n%{http_code}' \
-H "x-api-key: $PEERLYTICS_API_KEY" \
"https://peerlytics.xyz/api/v1/ENDPOINT"
Then read credits remaining: grep -i 'x-credits-remaining' /tmp/peerlytics_headers
-
Handle errors: 401 = bad key, 404 = not found, 429 = rate limited. Show the response body for any non-200.
-
Present results: Inspect the JSON response and present ALL fields returned. Adapt your format to the entity type -- use a key/value table for single entities, a list/table for collections. Truncate addresses to
0xAbCd...1234where they appear inline but show full values in dedicated address fields. Format amounts with$and commas, timestamps as relative time where helpful.Always include a link to the web explorer:
https://peerlytics.xyz/explorer/deposit/ID,https://peerlytics.xyz/explorer/address/ADDR, etc. -
Footer: Report credits remaining (from
X-Credits-Remainingheader). Suggest contextual follow-ups using other skills (e.g., look up the maker, check market rates for the currency, view the associated deposit).
Source
git clone https://github.com/ADWilkinson/peer-tools/blob/main/peerlytics/skills/explorer/SKILL.mdView on GitHub Overview
This skill connects to the Peerlytics API to look up on-chain entities in the ZKP2P explorer. It automatically detects whether you’re querying a deposit ID, an address, an intent/transaction hash, or a general term, and uses the best endpoint or a search call. Results include all returned fields, a web explorer link, and readable formatting.
How This Skill Works
It detects the query type and selects the appropriate endpoint: /explorer/deposit/{id} for numeric deposits, /explorer/address/{addr} for 0x-prefixed addresses, /explorer/intent/{hash} for 0x-prefixed 66-char hashes, or /explorer/search?q=QUERY for general terms. It then fetches data via curl with the PEERLYTICS_API_KEY header, handles 401, 404, and 429 errors, and presents all JSON fields with inline truncated addresses and a link to the web explorer.
When to Use It
- You need to verify a specific deposit by numeric ID
- You want to inspect a blockchain address and its related deposits or intents
- You have a known intent or transaction hash and want full details
- You have a general term or keyword and want the explorer to auto-detect the entity
- You want maker details for an address when explicitly requested
Quick Start
- Step 1: Set API key: export PEERLYTICS_API_KEY=pk_live_your_key
- Step 2: Enter a query (deposit ID, address, intent/tx hash, or text)
- Step 3: Run the curl command or let the explorer fetch and present results
Best Practices
- Set PEERLYTICS_API_KEY before querying the explorer
- Pass precise IDs or full 0x-prefixed addresses to reduce misclassification
- Use the general search endpoint for ambiguous queries
- Review all fields returned and use the provided explorer links for context
- Check the X-Credits-Remaining header and plan follow-ups with other skills
Example Use Cases
- Query by deposit ID 101112 to view deposit details and related intents
- Lookup address 0xAbCdEf0123456789012345678901234567890123 to see its activity
- Query intent hash 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef to inspect the transaction
- General search for maker data with the term 'maker 0xAbCd...1234'
- Request maker details for address 0xAbCdEf0123456789012345678901234567890123