# Recover from old private/public key without mnemonic phrase

**URL:** <https://forum.cardano.org/t/recover-from-old-private-public-key-without-mnemonic-phrase/63989>\
**Category:** Community Technical Support\
**Created:** [4 June 2021 11:47 UTC](https://forum.cardano.org/t/recover-from-old-private-public-key-without-mnemonic-phrase/63989 "2021-06-04T11:47:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Allendar](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@Allendar](https://forum.cardano.org/u/Allendar)\
**Post date:** [4 June 2021 11:47 UTC](https://forum.cardano.org/t/recover-from-old-private-public-key-without-mnemonic-phrase/63989/1 "2021-06-04T11:47:15Z")

</div>

I had a stakepool for a little while in august of 2020, but it’s not running anymore. I noticed there is still quite some ADA in the old stake address. I still have the signing/verification keys ([https://i.postimg.cc/05YNZKYY/1.png](https://i.postimg.cc/05YNZKYY/1.png)). Is there a convenient way to use one of the CLI binaries in my macOS Daedalus Flight/Contents/MacOS/ to recover that old staking address wallet into my Daedalus so I can send the old ADA to my main wallet? Otherwise; can I instantly use the CLI tools to send the remaining ADA to my main wallet’s (one of the~) receiving address?

Thank you in advance!

---

<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:** [4 June 2021 13:21 UTC](https://forum.cardano.org/t/recover-from-old-private-public-key-without-mnemonic-phrase/63989/2 "2021-06-04T13:21:08Z")

</div>

U will need a cli node… to send the ADA out of the wallet

---

<div class="post-metadata">

**Author:** ![Allendar](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@Allendar](https://forum.cardano.org/u/Allendar)\
**Post date:** [4 June 2021 13:44 UTC](https://forum.cardano.org/t/recover-from-old-private-public-key-without-mnemonic-phrase/63989/3 "2021-06-04T13:44:04Z")

</div>

I have those available. I just don’t know the correct formulation on the CLI to send all ADA from my wallet to another address: [https://i.postimg.cc/m2xLKvWW/1.png](https://i.postimg.cc/m2xLKvWW/1.png)

---

<div class="post-metadata">

**Author:** ![tomdx](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/tomdx/32/44498_2.png) [@tomdx](https://forum.cardano.org/u/tomdx)\
**Post date:** [4 June 2021 14:55 UTC](https://forum.cardano.org/t/recover-from-old-private-public-key-without-mnemonic-phrase/63989/4 "2021-06-04T14:55:48Z")

</div>

Its a four step process …

#1 Retire the pool to get the 500 ADA deposit back  
#2 Withdraw all remaining staking rewards  
#3 Retire the the stake address to get 2 ADA deposit back  
#4 Send all to an external address (hopefully secured by a HW wallet)

Where would you like to start?

---

<div class="post-metadata">

**Author:** ![Allendar](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@Allendar](https://forum.cardano.org/u/Allendar)\
**Post date:** [4 June 2021 15:13 UTC](https://forum.cardano.org/t/recover-from-old-private-public-key-without-mnemonic-phrase/63989/5 "2021-06-04T15:13:02Z")

</div>

#4. The pool was already retired last year. The address holds the 500 ADA.

---

<div class="post-metadata">

**Author:** ![tomdx](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.cardano.org/tomdx/32/44498_2.png) [@tomdx](https://forum.cardano.org/u/tomdx)\
**Post date:** [4 June 2021 15:29 UTC](https://forum.cardano.org/t/recover-from-old-private-public-key-without-mnemonic-phrase/63989/6 "2021-06-04T15:29:43Z")

</div>

Ok, then it’s something like this …

## Get protocol parameters

```auto
cardano-cli query protocol-parameters \
    --out-file /var/cardano/local/scratch/protocol.json \
    --mary-era \
    --mainnet

```

## Get the transaction hash and index of the UTXO to spend

```auto
PAYMENT_ADDR=`cat cardano/keys/${OWNER}/payment.addr`
echo "$OWNER: $PAYMENT_ADDR"

cardano-cli query utxo \
  --address $PAYMENT_ADDR \
  --mary-era \
  --mainnet  
                           TxHash TxIx Amount
--------------------------------------------------------------------------------------
c10171ef.. 1 35308656 lovelace

```

## Draft the transaction

```auto
TX_IN1="c10171e...#1"
UTOX_LVC=`expr 35308656 + 0`

TO_ADDR="addr1qxlmg..."

cardano-cli transaction build-raw \
    --tx-in $TX_IN1 \
    --tx-out $TO_ADDR+0 \
    --ttl 0 \
    --fee 0 \
    --out-file /var/cardano/local/scratch/tx.draft

```

## Calculate the fee

```auto
cardano-cli transaction calculate-min-fee \
    --protocol-params-file /var/cardano/local/scratch/protocol.json \
    --tx-body-file /var/cardano/local/scratch/tx.draft \
    --tx-in-count 1 \
    --tx-out-count 1 \
    --witness-count 1 \
    --mainnet

> 170869 Lovelace

```

## Calculate the change to send back to PAYMENT\_ADDR

```auto
FEES_LVC=170869
SEND_LVC=`expr $UTOX_LVC - $FEES_LVC`
echo "$SEND_LVC Lovelace"

```

## Determine the TTL (time to Live) for the transaction

```auto
SLOTNO=`cardano-cli query tip --mainnet | jq -c | jq ".slotNo"`

TTL=`expr $SLOTNO + 3600`
echo "slotNo: $SLOTNO"
echo $TTL

```

## Build the transaction

```auto
cardano-cli transaction build-raw \
    --tx-in $TX_IN1 \
    --tx-out $TO_ADDR+$SEND_LVC \
    --ttl $TTL \
    --fee $FEES_LVC \
    --out-file /var/cardano/local/scratch/tx.raw

```

## Sign the transaction

```auto
cardano-cli transaction sign \
    --tx-body-file /var/cardano/local/scratch/tx.raw \
    --signing-key-file /var/cardano/local/keys/${OWNER}/payment.skey \
    --mainnet \
    --out-file /var/cardano/local/scratch/tx.signed

```

## Submit the transaction

```auto
cardano-cli transaction submit \
    --tx-file /var/cardano/local/scratch/tx.signed \
    --mainnet

```

---

<div class="post-metadata">

**Author:** ![Allendar](https://avatars.discourse-cdn.com/v4/letter/a/f0a364/32.png) [@Allendar](https://forum.cardano.org/u/Allendar)\
**Post date:** [8 June 2021 07:24 UTC](https://forum.cardano.org/t/recover-from-old-private-public-key-without-mnemonic-phrase/63989/7 "2021-06-08T07:24:31Z")

</div>

Sorry for the late reply; I was a bit busy. I needed to make some small adjustments and figure out the CARDANO\_NODE\_SOCKET\_PATH, but it all worked. Thank you kindly good sir!
