From c17915f94f514ac83b3230fb64b1b88365e641a6 Mon Sep 17 00:00:00 2001 From: Casey Rodarmor Date: Mon, 18 Jul 2022 14:30:16 -0700 Subject: [PATCH] Add justfile with commands for moving ordinals around manually (#238) --- contrib/raw/justfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 contrib/raw/justfile diff --git a/contrib/raw/justfile b/contrib/raw/justfile new file mode 100644 index 0000000000..8c72dbfdcb --- /dev/null +++ b/contrib/raw/justfile @@ -0,0 +1,24 @@ +create INPUT_TXID INPUT_VOUT OUTPUT_DESTINATION OUTPUT_AMOUNT: + #!/usr/bin/env bash + + set -euxo pipefail + + bitcoin-cli createrawtransaction \ + '[ + { + "txid": "{{INPUT_TXID}}", + "vout": {{INPUT_VOUT}} + } + ]' \ + '[ + { + "{{OUTPUT_DESTINATION}}": {{OUTPUT_AMOUNT}} + } + ]' \ + > raw.hex + +sign WALLET_NAME: + bitcoin-cli -rpcwallet={{WALLET_NAME}} signrawtransactionwithwallet `cat raw.hex` > signed.json + +send: + bitcoin-cli sendrawtransaction `cat signed.json | jq '.hex' --raw-output`