I wanted to try talking to my bitcoin node to get the input scripts and put them into a database. Does anyone have good resources on where I can look to get started?
-
So what I want to get access to is tap scripts. Like the one in mempool where they have: OP_PUSHBYTES_32 526cfd93ec81e49633486ba01d9c8c3954e6fd755836539b9441f66a32f3beb5 OP_CHECKSIG OP_0 OP_IF OP_PUSHBYTES_3 6f7264 OP_PUSHBYTES_1 01 OP_PUSHBYTES_9 696d6167652f706e67 OP_0 OP_PUSHDATA2 89504e470d0a1a0a0000000d4948...(there's more I left out for the sake of space) OP_ENDIF Is there a way to get this from the RPC API?– hanaCommented Feb 8 at 5:35
Add a comment
|
1 Answer
See https://developer.bitcoin.org/reference/rpc/getrawtransaction.html and note the comment about -txindex
The description of the verbose result shows the unlocking script (scriptsig) for each input.
There's a different RPC call noted for wallet transactions .