-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add justfile with commands for moving ordinals around manually (#238)
- Loading branch information
Showing
1 changed file
with
24 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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` |