Initial commit: VaultMesh Skills collection
Collection of operational skills for VaultMesh infrastructure including: - backup-sovereign: Backup and recovery operations - btc-anchor: Bitcoin anchoring - cloudflare-tunnel-manager: Cloudflare tunnel management - container-registry: Container registry operations - disaster-recovery: Disaster recovery procedures - dns-sovereign: DNS management - eth-anchor: Ethereum anchoring - gitea-bootstrap: Gitea setup and configuration - hetzner-bootstrap: Hetzner server provisioning - merkle-forest: Merkle tree operations - node-hardening: Node security hardening - operator-bootstrap: Operator initialization - proof-verifier: Cryptographic proof verification - rfc3161-anchor: RFC3161 timestamping - secrets-vault: Secrets management 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
48
btc-anchor/scripts/90_verify.sh
Normal file
48
btc-anchor/scripts/90_verify.sh
Normal file
@@ -0,0 +1,48 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
|
||||
SKILL_ROOT="$(dirname "$SCRIPT_DIR")"
|
||||
source "$SCRIPT_DIR/_common.sh"
|
||||
|
||||
: "${BTC_NETWORK:=testnet}"
|
||||
|
||||
main() {
|
||||
[[ -f "$SKILL_ROOT/outputs/last_run_dir.txt" ]] || die "No last run."
|
||||
run_dir="$(cat "$SKILL_ROOT/outputs/last_run_dir.txt")"
|
||||
status="$run_dir/status_matrix.json"
|
||||
flag="$(net_flag)"
|
||||
|
||||
ok_proof=false; ok_txid=false; ok_seen=false
|
||||
[[ -f "$run_dir/PROOF.json" ]] && ok_proof=true
|
||||
if [[ -f "$run_dir/txid.txt" ]]; then
|
||||
txid="$(cat "$run_dir/txid.txt")"
|
||||
[[ -n "$txid" ]] && ok_txid=true
|
||||
if bitcoin-cli $flag getrawtransaction "$txid" >/dev/null 2>&1; then
|
||||
ok_seen=true
|
||||
fi
|
||||
fi
|
||||
|
||||
blockers="[]"
|
||||
if [[ "$ok_txid" != "true" ]]; then blockers='["missing_txid"]'
|
||||
elif [[ "$ok_seen" != "true" ]]; then blockers='["tx_not_found_yet_mempool_or_index"]'
|
||||
fi
|
||||
|
||||
cat > "$status" <<EOF
|
||||
{
|
||||
"skill": "btc-anchor",
|
||||
"timestamp": "$(date -Iseconds)",
|
||||
"run_dir": "$(json_escape "$run_dir")",
|
||||
"checks": [
|
||||
{"name":"proof_present", "ok": $ok_proof},
|
||||
{"name":"txid_present", "ok": $ok_txid},
|
||||
{"name":"tx_seen_by_node", "ok": $ok_seen}
|
||||
],
|
||||
"blockers": $blockers,
|
||||
"warnings": [],
|
||||
"next_steps": ["proof-verifier"]
|
||||
}
|
||||
EOF
|
||||
log_info "Wrote $status"
|
||||
cat "$status"
|
||||
}
|
||||
main "$@"
|
||||
Reference in New Issue
Block a user