forex.pm forex forum binary options trade

 Сryptocurrency exchanges => Binance - Сryptocurrency exchanges => Topic started by: Bitcoin on Feb 15, 2022, 02:18 pm

Title: create a P2SH with Bitcoin or Elements RPC (createrawtransaction)
Post by: Bitcoin on Feb 15, 2022, 02:18 pm
create a P2SH with Bitcoin or Elements RPC (createrawtransaction)

By looking at the documentation of createrawtransaction (https://elementsproject.org/en/doc/0.21.0.0/rpc/rawtransactions/createrawtransaction/, https://developer.bitcoin.org/reference/rpc/createrawtransaction.html) it's unclear how to pass a script as an output.


As a starting point I'd like to recreate something like this: https://blockstream.info/tx/a4bfa8ab6435ae5f25dae9d89e4eb67dfa94283ca751f393c1ddc5a837bbc31b?expand


the input should be the details of an unspent output, the output should just be the script, is this correct? Thanks!


Source: create a P2SH with Bitcoin or Elements RPC (createrawtransaction) (https://bitcoin.stackexchange.com/questions/112423/create-a-p2sh-with-bitcoin-or-elements-rpc-createrawtransaction)