How to recover mnemonic phrase using command tool

fuel git:(main) fuelup show
Default host: aarch64-apple-darwin
fuelup home: /Users/jimao/.fuelup

installed toolchains

latest-aarch64-apple-darwin (default)

active toolchain

latest-aarch64-apple-darwin (default)
forc : 0.49.3
- forc-client
- forc-deploy : 0.49.3
- forc-run : 0.49.3
- forc-crypto : 0.49.3
- forc-doc : 0.49.3
- forc-explore : 0.28.1
- forc-fmt : 0.49.3
- forc-lsp : 0.49.3
- forc-tx : 0.49.3
- forc-wallet : 0.4.3
fuel-core : 0.22.1
fuel-core-keygen : 0.22.1

fuels versions

forc : 0.54.0
forc-wallet : 0.54.0

When running forc deploy --testnet, the tool helped me create a mnemonic, but I did not save it properly. How should I restore it? I noticed that it might be possible to use code to decrypt the .wallet.json file, but I was wondering if there is a command line tool that can do this?

2 Likes

Hey @wrule

Can try using the forc wallet import <your seed phrase> command

( to see more options you can type forc wallet )

let us know how it goes

2 Likes

Hi mate,

I don’t have the solution for retrieving the seed phrase but you can import the private key by running forc wallet account 0 private-key where 0 is your wallet index.
With the Pk you will be able to restore your account in any wallet that support fuel.

1 Like

may I ask where it’s mentioned that the wallet.json can be decrypted to reveal the seed phrase ?

Another option , If you still remember the password, you can try to get the private key this way:

forc wallet account 0 private-key
1 Like