Created
March 24, 2024 20:17
-
-
Save gregdhill/0e342eff120f953609d631f08f0f4090 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Bitcoin Core RPC client version v22.0.0 | |
wallet="xxx-DOT-IBTC" | |
address="xxx" | |
redeemid="xxx" | |
rawtx=$(bitcoin-cli -rpcwallet=$wallet createrawtransaction "[]" "[{\"$address\":0.01},{\"data\":\"$redeemid\"}]") | |
echo $rawtx | |
fundedtx=$(bitcoin-cli -rpcwallet=$wallet fundrawtransaction $rawtx | jq -r .hex) | |
echo $fundedtx | |
signedtx=$(bitcoin-cli -rpcwallet=$wallet signrawtransactionwithwallet $fundedtx | jq -r .hex) | |
echo $signedtx | |
bitcoin-cli sendrawtransaction $signedtx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment