How to use Bitcoin Core CLI to approve transactions?
If you haven't created a Mixin Safe with Bitcoin Core, please check this article: How to use Bitcoin Core to create Mixin Safe?
Choose the Safe which you want to transfer and input the amount and destination address:
Preview and create the transaction
Members approval
Sign with script wallet
Copy unsigned data signed with a script wallet:
Please do not forget to add the parameter true "ALL|ANYONECANPAY" at the end.
Sign with Key wallet
Sign the psbt data returned in step 1 with the key wallet:
Please do not forget to add the parameter true "ALL|ANYONECANPAY" at the end.
Copy and paste
Copy the psbt data returned by the step 2, paste it into the input box, and click the Approve button to complete the operation.
Sign with key wallet
Copy unsigned data signed with a key wallet:
Please note that the parameter after signmessage is key wallet address. If you forget it, you can query it by label: ./bitcoin-cli --rpcwallet=mixin-safe-holder getaddressesbylabel safe .
Copy paste
Copy the data returned by step 1, paste it into the input box, and then click the Reject button to complete the operation.
error: timeout on transient error: Could not connect to the server 127.0.0.1:8332
The possible reason is that you rebooted your computer without automatically running the bitcoin client, run ./bitcoind -daemon and wait 15 seconds for the index to load before running it again.
error code: -28 error message: Loading block index…
Just finished executing ./bitcoind -daemon needs to wait for the Bitcoin client to load the block index.
error code: -28 error message: Verifying blocks…
Just finished executing ./bitcoind -daemon needs to wait for the Bitcoin client to verify the block data.
error code: -18 error message: Requested wallet does not exist or is not loaded
This is probably because the Bitcoin client does not load wallets by default when it starts, so first run ./bitcoin-cli listwallets to see which wallets are loaded, make sure they are not in the list, and then try ./bitcoin-cli loadwallet mixin-safe-holder to manually load the Safe's key wallet or script wallet.
New transaction
Choose the Safe which you want to transfer and input the amount and destination address:
Preview and create the transaction
Members approval
Owner approval
Sign with script wallet
Copy unsigned data signed with a script wallet:
$ ./bitcoin-cli --rpcwallet=mixin-safe walletprocesspsbt cHNidP8BAKQCAAAAASTY9uNSG688NchO7NjP2WGb/FAhI8zvvLbe6JgKRW/XAAAAAAD/////AxAnAAAAAAAAIgAgDzOHef9wqSM7pHlAuRNu9/b1x1JLSbsBrWa6rZ2IZNxtaAEAAAAAACIAIA8zh3n/cKk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hwafPfmwKjatq0CsAGykmiTUociAgJhMAyyM/CSxsL3hxOWJLiOpMd053mzolezai/PGGoJpwT7FJZbIgICbjfqbh6aAYdT4yiThzBtjWBTUYA0lwIcGnz35sCo2rYEw2BbvSICA7CO6rmCbxC2hWn/mvJuo1BnXp1c+SdMGZDP5dfPKxhsBK9UVAkAAQF4IQOwjuq5gm8QtoVp/5rybqNQZ16dXPknTBmQz+XXzysYbKx8IQJhMAyyM/CSxsL3hxOWJLiOpMd053mzolezai/PGGoJp6yTfIKSYyECbjfqbh6aAYdT4yiThzBtjWBTUYA0lwIcGnz35sCo2ratArABspJok1KHIgICYTAMsjPwksbC94cTliS4jqTHdOd5s6JXs2ovzxhqCacE+xSWWyICAm436m4emgGHU+Mok4cwbY1gU1GANJcCHBp89+bAqNq2BMNgW70iAgOwjuq5gm8QtoVp/5rybqNQZ16dXPknTBmQz+XXzysYbASvVFQJAAA=",
"complete": false
}
Please do not forget to add the parameter true "ALL|ANYONECANPAY" at the end.
Sign with Key wallet
Sign the psbt data returned in step 1 with the key wallet:
./bitcoin-cli --rpcwallet=mixin-safe-holder walletprocesspsbt cHNidP8BAKQCAAAAASTY9uNSG688NchO7NjP2WGb/FAhI8zvvLbe6JgKRW/XAAAAAAD/////AxAnAAAAAAAAIgAgDzOHef9wqSM7pHlAuRNu9/b1x1JLSbsBrWa6rZ2IZNxtaAEAAAAAACIAIA8zh3n/cKkjO6R5QLkTbvf29cdSS0m7Aa1muq2diGTcAAAAAAAAAAASahDLcBbbY1VD+rUrnZAmgUguAAAAAAABASt9jwEAAAAAACIAIA8zh3n/cKkjO6R5QLkTbvf29cdSS0m7Aa1muq2diGTcAQMEgQAAAAEFeCEDsI7quYJvELaFaf+a8m6jUGdenVz5J0wZkM/l188rGGysfCECYTAMsjPwksbC94cTliS4jqTHdOd5s6JXs2ovzxhqCaesk3yCkmMhAm436m4emgGHU+Mok4cwbY1gU1GANJcCHBp89+bAqNq2rQKwAbKSaJNShyIGAmEwDLIz8JLG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SdMGZDP5dfPKxhsBK9UVAkAAA==",
"complete": false
}
Please do not forget to add the parameter true "ALL|ANYONECANPAY" at the end.
Copy and paste
Copy the psbt data returned by the step 2, paste it into the input box, and click the Approve button to complete the operation.
Owner reject the transaction
Sign with key wallet
Copy unsigned data signed with a key wallet:
./bitcoin-cli --rpcwallet=mixin-safe-holder signmessage 1Gz4GoSjNV8MxLFt8bE8JTfqJp6b2bXhvZ REVOKE:7bcc9a68-51a0-4e66-95f0-eea16417d802:3af37ce1c54dc1fd03344fcb805f55868fc6ea394dbcc8ab383ec47f65bc5777
IPpiNMq9aqGuMaDOSs9GdWk+SJIkpSRAY4FY7Ub01WVDfGRjqte89Xmiokyk45Q8cgEmY7b7w+iCrUPIgAQG8Hc=
Please note that the parameter after signmessage is key wallet address. If you forget it, you can query it by label: ./bitcoin-cli --rpcwallet=mixin-safe-holder getaddressesbylabel safe .
Copy paste
Copy the data returned by step 1, paste it into the input box, and then click the Reject button to complete the operation.
FAQ
error: timeout on transient error: Could not connect to the server 127.0.0.1:8332
The possible reason is that you rebooted your computer without automatically running the bitcoin client, run ./bitcoind -daemon and wait 15 seconds for the index to load before running it again.
error code: -28 error message: Loading block index…
Just finished executing ./bitcoind -daemon needs to wait for the Bitcoin client to load the block index.
error code: -28 error message: Verifying blocks…
Just finished executing ./bitcoind -daemon needs to wait for the Bitcoin client to verify the block data.
error code: -18 error message: Requested wallet does not exist or is not loaded
This is probably because the Bitcoin client does not load wallets by default when it starts, so first run ./bitcoin-cli listwallets to see which wallets are loaded, make sure they are not in the list, and then try ./bitcoin-cli loadwallet mixin-safe-holder to manually load the Safe's key wallet or script wallet.
Updated on: 02/08/2023