Skip to main content

relay-diagnostic

Operator relay diagnostics and sponsor nonce recovery. Use canonical payment-status polling for caller-facing payment state; use this for relay health and sponsor recovery.

소스 정보

저장소
aibtcdev/skills
최근 소스 활동
2026년 4월 30일 03:46
감지된 SKILL.md 언어
영어
스타
10
포크
49

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
3 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
relay-diagnostic
description
Operator relay diagnostics and sponsor nonce recovery. Use canonical payment-status polling for caller-facing payment state; use this for relay health and sponsor recovery.
metadata
{"author":"tfibtcagent","author-agent":"Secret Dome","user-invocable":"false","arguments":"check-health | recover","entry":"relay-diagnostic/relay-diagnostic.ts","mcp-tools":"check_relay_health, recover_sponsor_nonce","requires":"wallet","tags":"l2, infrastructure"}
# Relay Diagnostic Skill Diagnoses and recovers stuck sponsored transactions by inspecting the sponsor relay's nonce state and optionally triggering automated recovery. Use this for operator diagnostics only. Caller-facing x402 payment state should come from canonical payment-status polling by `paymentId`, not from relay health heuristics. - **check-health** — Read-only, no wallet required. Returns relay version, sponsor nonce status, detected gaps, and stuck transactions. - **recover** — Requires an unlocked wallet (to source the sponsor API key). Attempts RBF, gap-fill, or both. ## Usage ``` bun run relay-diagnostic/relay-diagnostic.ts <subcommand> [options] ``` ## Subcommands ### check-health Check the sponsor relay availability and nonce status. No wallet needed. ``` bun run relay-diagnostic/relay-diagnostic.ts check-health ``` Output: ```json { "healthy": true, "network": "mainnet", "version": "1.2.0", "sponsorAddress": "SP1PMPPVCMVW96FSWFV30KJQ4MNBMZ8MRWR3JWQ7", "nonceStatus": { "lastExecuted": 4210, "lastMempool": 4215, "possibleNext": 4216, "missingNonces": [], "mempoolNonces": [4211, 4212, 4213, 4214, 4215], "hasGaps": false, "gapCount": 0, "mempoolDesync": false, "desyncGap": 5 }, "stuckTransactions": [], "issues": [], "formatted": "Relay Health Check (mainnet)\nStatus: HEALTHY\n..." } ``` ### recover Attempt automated recovery of stuck transactions. Requires an unlocked wallet. ``` bun run relay-diagnostic/relay-diagnostic.ts recover [options] ``` Options: - `--action <rbf|fill-gaps|both>` — Recovery mode (default: `both`) - `--txids <txid,...>` — Comma-separated list of specific stuck txids for RBF (omit to bump all) - `--nonces <n,...>` — Comma-separated list of specific missing nonces for gap-fill (omit to fill all) Output: ```json { "action": "both", "rbf": { "supported": true, "result": { "bumped": 2 } }, "fillGaps": { "supported": true, "result": { "filled": 0 } }, "summary": "Recovery request sent to relay. Run check-health to verify nonce state improved." } ``` ## Notes - Always run `check-health` before `recover` — recovery without a prior health check may bump transactions unnecessarily. - If the relay returns 404 or 501 for recovery endpoints, the tool reports `supported: false` with instructions to contact the AIBTC team. - The sponsor address for mainnet is `SP1PMPPVCMVW96FSWFV30KJQ4MNBMZ8MRWR3JWQ7`. - Wallet operations require an unlocked wallet (use `bun run wallet/wallet.ts unlock` first).
GitHub에서 보기