Skip to main content
Glama
bitrovas-psbtcheck
by bitrovas

bitrovas-psbtcheck – Agent-SDK + MCP-Tool psbt_check

Prüft eine unsignierte Bitcoin-PSBT über den Nostr-Dienst Bitrovas PSBT-Check (npub1p4puhq53…) – NIP-17-DM (psbtcheck/1) oder NIP-90 kind 5823. 21 sats pro Check (+21 mit stamp), Ergebnis: verdict ok|warn|danger, volles JSON, Text DE/EN. Der Dienst signiert und sendet nie.

Keine Geheimnisse im Paket. Nostr-Schlüssel: ephemer pro Prozess oder BITROVAS_NOSTR_NSEC des Nutzers. Wallet: NWC_URI (oder BITROVAS_NWC_URI) des Nutzers – NIP-47 pay_invoice. Ohne Wallet: Rechnung zurück (Callback / payment_required).

Grenzen / Limitations (Stand 0.1.0)

  • NWC: nur NIP-04-Verschlüsselung (Wallets, die ausschliesslich NIP-44 können, werden noch nicht unterstützt) und nur offline getestet (kein Live-Test mit echter Wallet).

  • Keine JS-Variante – nur Python.

  • Live getestet: NIP-17-Pfad mit manueller Zahlung (on_invoice → Rechnung extern bezahlt → wait_result → Ergebnis), 16.10.2026; NIP-90 und MCP live bis Ergebnis/Rechnung.

  • Ergebnis ist eine automatische Prüfung ohne Gewähr; der Dienst signiert und sendet nie.

  • Mit stamp kommt der finale Zeitstempel-Beleg später als DM an die Client-Identität – dafür einen eigenen Schlüssel (BITROVAS_NOSTR_NSEC) nutzen, nicht den ephemeren.

EN: NWC is NIP-04 only and tested offline only; no JS version; the live path with manual payment (on_invoice) is live-tested.

Related MCP server: Agentry MCP Server

Install (lokal)

pip install git+https://github.com/bitrovas/bitrovas-psbtcheck.git

Python

import asyncio
from bitrovas_psbtcheck import PsbtCheckClient, PaymentRequired
async def main():
    c = PsbtCheckClient()                       # NWC_URI aus der Umgebung → zahlt automatisch
    try:
        r = await c.check(psbt_b64, expected_address="bc1q…", expected_amount_sats=60000, stamp=False)
        print(r["verdict"], r["text_de"])
    except PaymentRequired as e:                # keine Wallet: Rechnung selbst zahlen
        print(e.info["bolt11"]); r = await c.wait_result(e.info["check_id"], timeout=600)
    finally:
        await c.close()
asyncio.run(main())

on_invoice=callback (sync/async) statt Exception: Rechnung an eigene Logik geben, danach wird auf das Ergebnis gewartet. transport="nip90" für DVM kind 5823 (Ergebnis über 6823; Polling-Status nur bei NIP-17).

CLI

bitrovas-psbtcheck <psbt|@datei> [--expected ADR] [--amount SATS] [--network N] [--stamp] [--nip90] [--no-pay] (Exit 2 + JSON payment_required, wenn nicht bezahlt wird.)

MCP (stdio)

{"mcpServers": {"bitrovas-psbtcheck": {"command": "bitrovas-psbtcheck-mcp", "env": {"NWC_URI": "nostr+walletconnect://…"}}}}

Tools: psbt_check {psbt, expected_address?, expected_amount_sats?, network?, transport?, stamp?, pay?} und psbt_check_result {check_id, preimage?, wait_seconds?}. Ohne Wallet liefert psbt_check status=payment_required + bolt11; nach Zahlung psbt_check_result im selben Serverprozess (ephemerer Schlüssel bleibt im Prozess).

Tests

python -m pytest -q – offline: NWC-Verschlüsselung, Request-Bau, MCP-Protokoll + stdio. Integrations-Tests gegen den Dienstcode laufen nur, wenn dieser lokal vorhanden ist (sonst übersprungen).

Available Tools

2 tools
psbt_checkA

Bitrovas PSBT-Check: prüft eine UNSIGNIERTE Bitcoin-PSBT vor dem Signieren (Empfänger, Beträge, Change, Gebühr/sat/vB, RBF, Sighash, UTXO-Infos, Dust, Address-Poisoning-Lookalikes). Kostet 21 sats (Lightning). Mit NWC-Wallet wird automatisch bezahlt und das Ergebnis (verdict ok|warn|danger + JSON + Text DE/EN) zurückgegeben; ohne Wallet kommt status=payment_required mit bolt11 – nach Zahlung psbt_check_result aufrufen. Signiert und sendet nie etwas.

Inputs: psbt (required), pay, stamp, network, +3 more.

psbt_check_resultB

Holt das Ergebnis eines PSBT-Checks nach Zahlung der Rechnung (check_id aus psbt_check).

Inputs: check_id (required), preimage, wait_seconds.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 2 tools

    Disambiguation4/5

    The two tools have mostly clear boundaries: psbt_check initiates a PSBT inspection and may return a result when auto-paid, while psbt_check_result retrieves the result after invoice payment. There is minor overlap because psbt_check can also return a completed result, so the agent must understand the payment-state flow.

    Naming Consistency5/5

    Both names are snake_case and share the psbt_check prefix, with psbt_check_result predictably indicating the follow-up result-retrieval operation. The naming is consistent and readable.

    Tool Count4/5

    Two tools is minimal but justified for a single-purpose paid PSBT-check workflow: one initiates the check and one retrieves the paid result. The count is slightly thin but not inappropriate for this narrow domain.

    Completeness5/5

    The surface covers the full intended lifecycle: initiate a PSBT check, handle payment-required status, and retrieve the result via check_id. It also clearly states it never signs or sends, so no signing/sending tools are expected.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Provides a trust layer for AI agents with identity, reputation, payments, and discovery via 92 API endpoints as MCP tools, leveraging Nostr-native infrastructure.
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI agents to obtain an independent review of their drafts, returning a pass/fail verdict with specific issues and suggested fixes, plus a signed receipt. Payments are made per check over x402, with no account or API key needed.
      1
      MIT