Withdraw stake pool rewards

Make a copy of the Data section somewhere in your host folder (low-security encrypted) where both your host computer & the Frankenwallet can access it.

  • Commands you run on the live Cardano node, to get the data, are in italics.
  • Then, before running the template, run the underlined commands create that data as files in the Frankenwallet so the template can use it.
  • Those variable quantities are in stored in files, with names in boldface.

Save the Template somewhere you can access it on the Frankenwallet (e.g. with the Data, or another LibreOffice document).


cardano-cli query tip --mainnet | jq .slot | awk '{print $NF + 3600}'
cat > ttl
40423006 (will be XX:XX local time)

pay to [what wallet software?] > [what wallet name?]
cat > wallet.addr

from pledge amount query ... OR whatever address is paying transaction fees
cat > payment.utxo
cat > pbal
([amount, in lovelace])

from rewards account query
cat > rbal
([amount, in lovelace])

get (or check) protocol.json
copy to host folder
then copy to Frankenwallet from there.


--tx-in $(cat payment.utxo) \
--withdrawal $(cat low/stake.addr)+0 \
--tx-out $(cat low/payment.addr)+0 \
--tx-out $(cat wallet.addr)+0 \
--fee 0 \
--invalid-hereafter 0 \
--out-file tx.test

cardano-cli transaction calculate-min-fee \
--tx-body-file tx.test \
--tx-in-count 1 \
--tx-out-count 2 \
--witness-count 2 \
--byron-witness-count 0 \
--mainnet \
--protocol-params-file protocol.json

cat > fee
(copy & paste last command output)

echo $(cat pbal) - $(cat fee) | bc > pnet
(check vs. pbal) cat pnet

cardano-cli transaction build-raw \
--tx-in $(cat payment.utxo) \
--withdrawal $(cat low/stake.addr)+$(cat rbal) \
--tx-out $(cat low/payment.addr)+$(cat pnet) \
--tx-out $(cat wallet.addr)+$(cat rbal) \
--fee $(cat fee) \
--invalid-hereafter $(cat ttl) \
--out-file tx.draft

cardano-cli transaction sign \
--tx-body-file tx.draft \
--signing-key-file high/payment.skey \
--signing-key-file high/stake.skey \
--mainnet \
--out-file tx.signed

copy “tx.signed” to host folder

reboot to host


cardano-cli transaction submit \
--tx-file tx.signed \
Last updated: