# How to move rewards into a private wallet address

**URL:** <https://forum.cardano.org/t/how-to-move-rewards-into-a-private-wallet-address/103758>\
**Category:** Community Technical Support\
**Created:** [26 June 2022 10:20 UTC](https://forum.cardano.org/t/how-to-move-rewards-into-a-private-wallet-address/103758 "2022-06-26T10:20:20Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dr.Meow](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/dr.meow/32/55547_2.png) [@Dr.Meow](https://forum.cardano.org/u/Dr.Meow)\
**Post date:** [26 June 2022 10:20 UTC](https://forum.cardano.org/t/how-to-move-rewards-into-a-private-wallet-address/103758/1 "2022-06-26T10:20:20Z")

</div>

Hello. Guys.  
I am a SPO and I have never claim rewards yet.  
Anyone can kindly teach me how to claim stake pool rewards?

destinationAddress=$(cat payment.addr)  
echo destinationAddress: $destinationAddress

---

<div class="post-metadata">

**Author:** ![Alexd1985](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/alexd1985/32/23759_2.png) [@Alexd1985](https://forum.cardano.org/u/Alexd1985)\
**Post date:** [26 June 2022 11:05 UTC](https://forum.cardano.org/t/how-to-move-rewards-into-a-private-wallet-address/103758/2 "2022-06-26T11:05:33Z")

</div>

Hi,

cntools or coincashew?

Cheers,

---

<div class="post-metadata">

**Author:** ![Dr.Meow](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/dr.meow/32/55547_2.png) [@Dr.Meow](https://forum.cardano.org/u/Dr.Meow)\
**Post date:** [26 June 2022 11:22 UTC](https://forum.cardano.org/t/how-to-move-rewards-into-a-private-wallet-address/103758/3 "2022-06-26T11:22:22Z")

</div>

coincashew . thanks.

---

<div class="post-metadata">

**Author:** ![Alexd1985](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/alexd1985/32/23759_2.png) [@Alexd1985](https://forum.cardano.org/u/Alexd1985)\
**Post date:** [26 June 2022 12:02 UTC](https://forum.cardano.org/t/how-to-move-rewards-into-a-private-wallet-address/103758/4 "2022-06-26T12:02:03Z")

</div>

> **[Claiming Stake Pool Rewards](https://www.coincashew.com/coins/overview-ada/guide-how-to-build-a-haskell-stakepool-node/part-iv-administration/claiming-stake-pool-rewards)**

---

<div class="post-metadata">

**Author:** ![Dr.Meow](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/dr.meow/32/55547_2.png) [@Dr.Meow](https://forum.cardano.org/u/Dr.Meow)\
**Post date:** [26 June 2022 12:07 UTC](https://forum.cardano.org/t/how-to-move-rewards-into-a-private-wallet-address/103758/5 "2022-06-26T12:07:16Z")

</div>

> [@Dr.Meow](#):
>
> destinationAddress=$(cat payment.addr)  
> echo destinationAddress: $destinationAddress

destinationAddress=$(cat payment.addr)  
echo destinationAddress: $destinationAddress

Where my private address (receive, for example, Nami) should be written?

---

<div class="post-metadata">

**Author:** ![Alexd1985](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/alexd1985/32/23759_2.png) [@Alexd1985](https://forum.cardano.org/u/Alexd1985)\
**Post date:** [26 June 2022 12:16 UTC](https://forum.cardano.org/t/how-to-move-rewards-into-a-private-wallet-address/103758/6 "2022-06-26T12:16:04Z")

</div>

When u registered the pool u also registered a wallet for rewards… the wallet has 1 stake address (for rewards) and payment address (amount which can be spent)

Now u must move the rewards from stake address to payment address

PS: if the wallet was imported via mnemonic u can withdraw the rewards from wallet app

---

<div class="post-metadata">

**Author:** ![mcrio](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/mcrio/32/40017_2.png) [@mcrio](https://forum.cardano.org/u/mcrio)\
**Post date:** [26 June 2022 12:16 UTC](https://forum.cardano.org/t/how-to-move-rewards-into-a-private-wallet-address/103758/7 "2022-06-26T12:16:41Z")

</div>

It seems the Coincashew script is not 100% correct in terms of `destinationAddress` being the `address which is where you're moving your reward to`, as throughout the script they are using the `payment.addr`.

You need to check that in more detail and update commands where required. Let us know if you are not sure what to do.

---

<div class="post-metadata">

**Author:** ![georgem1976](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/georgem1976/32/38471_2.png) [@georgem1976](https://forum.cardano.org/u/georgem1976)\
**Post date:** [27 June 2022 10:27 UTC](https://forum.cardano.org/t/how-to-move-rewards-into-a-private-wallet-address/103758/8 "2022-06-27T10:27:49Z")

</div>

Assuming your stake pool’s ticker is MEOW, you don’t have any rewards to withdraw. There are 2 reasons:

1. The pool never minted a block
2. The pledge is not met. Even if the pool is minting blocks, the rewards will be 0 in this case.

For the moment when you will want to withdraw the rewards, you will need to do the following steps:

1. Declare 2 variables with your stake address and an address where you have funds to pay for the transaction (and you have the signing key). I assumed this is your pledge address below.

```auto
STAKE_ADDRESS=stake1uxmzszyq0amup32al34yqnkhrrv27mq5mkghgp7kjuchytgnsep6p
ADDRESS=addr1q9qjtu9ntz7esnr5c4seqks835avnd97z2853ljzyfssvl9k9qygqlmhcrz4mlr2gp8dwxxc4akpfhv3wsrad9e3wgksyd7ezx

```

1. Query the stake address to see the rewards amount that you can withdraw and define a variable with this amount.

`cardano-cli query stake-address-info --mainnet --address $STAKE_ADDRESS`

```auto
[
    {
        "delegation": "pool1llwfa6erdh7k87j06y2z9999jcc84cnezwhg9e2sulrgwzrsug4",
        "address": "stake1uxmzszyq0amup32al34yqnkhrrv27mq5mkghgp7kjuchytgnsep6p",
        "rewardAccountBalance": 0
    }
]

```

`REWARDS_AMOUNT=0`  
Assuming the “rewardAccountBalance”: is 340000000 (the fixed fee), you would write:  
`REWARDS_AMOUNT=340000000`

1. Find an UTxO that you can use to pay the transaction fees. This is the stake address for the MEOW pool.

`cardano-cli query utxo --mainnet --address ${ADDRESS}`

```auto
                           TxHash TxIx Amount
--------------------------------------------------------------------------------------
1b979f12835310a58c1150e134c7863d9dafce58255d7f2e7ba5bd1dd2cdf894 0 4613866 lovelace + TxOutDatumNone

```

You will be able to use the UTxO above, which has the index 0. You define the following variable:  
`TXIN="1b979f12835310a58c1150e134c7863d9dafce58255d7f2e7ba5bd1dd2cdf894#0"`

1. Now you will need to create the transaction, sign it with the stake signing key and payment signing key, and then submit it to your node. I am assuming below that your stake signing key is `stake.skey`, your payment signing key is `payment.skey`, and they are both in the current folder.

```auto
cardano-cli transaction build \
--mainnet \
--alonzo-era \
--witness-override 2 \
--tx-in ${TXIN} \
--withdrawal "${STAKE_ADDRESS}+${REWARDS_AMOUNT}" \
--change-address ${ADDRESS} \
--out-file tx.raw

```

Running this will display the transaction fees:  
`Estimated transaction fee: Lovelace 171265`

In case you want to send the rewards to a different address and the change back to the original address, you can do change the transaction like this:  
`DSTADDRESS=adddr1........`  
(this is where you will send the rewards).

```auto
cardano-cli transaction build \
--mainnet \
--alonzo-era \
--witness-override 2 \
--tx-in ${TXIN} \
--withdrawal "${STAKE_ADDRESS}+${REWARDS_AMOUNT}" \
--tx-out "${DST_ADDRESS}+${REWARDS_AMOUNT}" \
--change-address ${ADDRESS} \
--out-file tx.raw

```

You can also send a different amount to the new address, not exactly the rewards amount, and in this case you will need to write a different amount in the line:  
`--tx-out "${DST_ADDRESS}+${REWARDS_AMOUNT}" \`

1. Now you need to sign and submit the transaction.

```auto
cardano-cli transaction sign \
--tx-body-file tx.raw \
--signing-key-file stake.skey \
--signing-key-file payment.skey \
--mainnet \
--out-file tx.signed

cardano-cli transaction submit \
--tx-file tx.signed \
--mainnet

```

Before signing and submitting the transaction, you can also check it to be sure it is 100% ok.  
`cardano-cli transaction view --tx-body-file tx.raw`  
The result will be:

```auto
auxiliary scripts: null
certificates: null
collateral inputs: []
era: Alonzo
fee: 171265 Lovelace
inputs:
- 1b979f12835310a58c1150e134c7863d9dafce58255d7f2e7ba5bd1dd2cdf894#0
metadata: null
mint: null
outputs:
- address: addr1q9qjtu9ntz7esnr5c4seqks835avnd97z2853ljzyfssvl9k9qygqlmhcrz4mlr2gp8dwxxc4akpfhv3wsrad9e3wgksyd7ezx
  address era: Shelley
  amount:
    lovelace: 4442601
  datum: null
  network: Mainnet
  payment credential:
    key hash: 4125f0b358bd984c74c561905a078d3ac9b4be128f48fe422261067c
  stake reference:
    key hash: b62808807f77c0c55dfc6a404ed718d8af6c14dd917407d69731722d
update proposal: null
validity range:
  lower bound: null
  upper bound: null
withdrawals:
- address: stake1uxmzszyq0amup32al34yqnkhrrv27mq5mkghgp7kjuchytgnsep6p
  amount: 0 Lovelace
  credential:
    key hash: b62808807f77c0c55dfc6a404ed718d8af6c14dd917407d69731722d
  network: Mainnet

```

If you are happy with the output, sign it and submit it.

I hope this will also help other people to create a simple transaction for withdrawing the rewards.
