A viewer and debugger of Bitcoin scripts. Early development.
- Can fetch transactions from:
- A Bitcoin node (requires a full node with
txindex=1
). Default. - Blockstream.info JSON API. Use
--blockstream
flag.
- A Bitcoin node (requires a full node with
- Automatically finds related output.
- Allows to navigate forward and backward.
- Shows stack per line of code.
- Shows opcodes information (hex code, input, output, and description).
- Supports witness data (SegWit).
- Uses
btcd/txscript
under the hood.
go get github.com/Jeiwan/opscript
opscript help
Usage: opscript [flags] transactionHash:inputIndex opscript [command] Available Commands: buildspec help Help about any command Flags: --blockstream Use blockstream.info API to get transactions. -h, --help help for opscript --node Use Bitcoin node to get transactions (requires 'txindex=1'). (default true) --node-addr string Bitcoin node address. (default "127.0.0.1:8332") --rpc-pass string Bitcoin JSON-RPC password. --rpc-user string Bitcoin JSON-RPC username. Use "opscript [command] --help" for more information about a command.
q
– quit↑
/↓
– navigate between lines of code
- Using Blockstream.info API:
opscript --blockstream 70fde4687efab8dae09737f87e30042030288fec42fd9e12f34c435cdeb7812c
- Specifying input index:
opscript --blockstream 70fde4687efab8dae09737f87e30042030288fec42fd9e12f34c435cdeb7812c:0
- Using a Bitcoin node:
opscript --rpc-user=woot --rpc-pass=woot 70fde4687efab8dae09737f87e30042030288fec42fd9e12f34c435cdeb7812c