Is it possible to get private key from testnet cli?

Once the account is created on the cli, I got an address, is it possible to get the private key for this address?

You can do it by using libra-client if you are a python programmer.

import libra
wallet = libra.WalletLibrary.recover(‘client.mnemonic’)
a0 = wallet.accounts[0]
print(a0.private_key_hex)

“client.mnemonic” is the recover file generated by a write client.mnemonic in

%libra

1 Like

@yuan-xy Thank you, I mainly work with javascript, but has some knowledge in python as well. I will try.