analyze_psbt_security
Detect mempool sniping vulnerabilities in Bitcoin PSBTs by analyzing signature hash types and multisig configurations to prevent inscription theft during ordinals listings.
Instructions
Analyze a PSBT for ordinals inscription listing mempool sniping vulnerability.
Detects whether an ordinals listing PSBT is vulnerable to front-running in the mempool. A listing is VULNERABLE when it uses SIGHASH_SINGLE|ANYONECANPAY without a 2-of-2 multisig locking step — an attacker can redirect the inscription before confirmation. A listing is PROTECTED when the inscription is locked in a 2-of-2 P2WSH multisig and the marketplace co-signs with SIGHASH_ALL, preventing any transaction modification.
No Bitcoin node required — analysis is pure PSBT parsing (BIP 174).
Args: psbt_hex: Hex-encoded PSBT string (BIP 174 v0)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| psbt_hex | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |