# Recover Stellar Funds

Transfer Stellar (XLM) and other Stellar assets to another wallet.

Since Fordefi generates keys using MPC, EdDSA keys are derived in a non-standard
way, therefore they cannot be uploaded to regular wallets such as Freighter.
Fordefi overcomes this limitation by providing a command with the included [Recovery Tool](/user-guide/backup-and-recover-private-keys/recovery/recover-private-keys) that enables you to move funds out of your wallets using the
keys.

## Classic assets

To transfer classic (issued) Stellar assets, use the following command
(example):


```bash
./recovery-tool stellar-transfer --asset-type classic \
    --private-hex 0973dfc5d554a08cc04bca048984ab32eb5a051ab8f7985c1dd8013525a83274 \
    --to-address GDQP43MPLAOWQCNX2FCZKAE3TPBKIXJBQWYJQVNQ7B4ATEPCNLQRMHB \
    --amount 10000000 \
    --asset-code USDC \
    --asset-issuer GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN
```

**Options**

- `private-hex`: The private key that was recovered, in hex format.
- `to-address`: The destination Stellar address (starts with `G`).
- `asset-code`: The asset code (for example, `USDC`), 1-12 characters.
- `asset-issuer`: The asset issuer’s Stellar address (starts with `G`).
- `amount`: The amount to transfer in asset’s smallest unit (10^-7 of the asset).


## Soroban tokens

To transfer Soroban (SAC or contract) tokens, use the following command
(example):


```bash
./recovery-tool stellar-transfer --asset-type soroban \
    --private-hex 0973dfc5d554a08cc04bca048984ab32eb5a051ab8f7985c1dd8013525a83274 \
    --to-address GDQP43MPLAOWQCNX2FCZKAE3TPBKIXJBQWYJQVNQ7B4ATEPCNLQRMHB \
    --amount 10000000 \
    --contract-address CDLZFC3SYJYDZT7K67VZ75HPJVIEUVNIXF47ZG6R7WM2FC4GWJBM2OE \
    --soroban-rpc-url https://soroban-rpc.example.com
```

**Options**

- `private-hex`: The private key that was recovered, in hex format.
- `to-address`: The destination Stellar address (starts with `G`).
- `contract-address`: The Soroban token contract address (starts with `C`).
- `soroban-rpc-url`: The Soroban RPC URL used to simulate the transaction.
- `amount`: The amount to transfer in the token’s base units.


## Native XLM

To transfer native XLM, use the following command (example):


```bash
./recovery-tool stellar-transfer --asset-type native \
    --private-hex 0973dfc5d554a08cc04bca048984ab32eb5a051ab8f7985c1dd8013525a83274 \
    --to-address GDQP43MPLAOWQCNX2FCZKAE3TPBKIXJBQWYJQVNQ7B4ATEPCNLQRMHB \
    --amount 10000000
```

**Options**

- `private-hex`: The private key that was recovered, in hex format.
- `to-address`: The destination Stellar address (starts with `G`).
- `amount`: The amount to transfer in stroops (1 XLM = 10^7 stroops).


Fordefi strongly suggests you transfer classic and Soroban assets first, and
then the native XLM currency. The reason is that native currency is required for
an account’s transaction fees. If you transfer native currency first, you will
not be able to transfer the other assets.

## Raw transaction

To execute a raw transaction with a custom XDR envelope, use the following
command (example):


```bash
./recovery-tool stellar-raw-transaction \
        --private-hex 0973dfc5d554a08cc04bca048984ab32eb5a051ab8f7985c1dd8013525a83274 \
        --payload "AAAAAgAAAABPfam7uN5ddnCPGZpReNq3sXE6StfYZGy50UVIl4aFvwAAAMgDsb0XAAAAAQAAAAEAAAAAAAAAAAAAAABp0mZ6AAAAAAAAAAIAAAAAAAAABgAAAAFVU0RDAAAAADuZETgO/piLoKiQDrHP5E82b32+lGvtB3JA9/Yk3xXFf/////////8AAAAAAAAADQAAAAAAAAAAAJiWgAAAAABPfam7uN5ddnCPGZpReNq3sXE6StfYZGy50UVIl4aFvwAAAAFVU0RDAAAAADuZETgO/piLoKiQDrHP5E82b32+lGvtB3JA9/Yk3xXFAAAAAAAPQkAAAAAAAAAAAAAAAAA"
```

**Options**

- `private-hex`: The private key that was recovered, in hex format.
- `payload`: The base64-encoded XDR transaction envelope.