Closed viponedream closed 1 year ago
So, at the moment, pysu
does not 'recover' from key phrase but:
If you use:
sui keytool import -h
can generate a key from the phrase,
then if you edit the sui.keystore
in the SUI configuration you can add the keystring string from the keytool file.
@viponedream Let me know if you got that working. Otherwise I will details steps with example.
there is "SuiConfig.from_config_file( )" , maybe you add another "from mnemonic( )" or from private, like web3, all we need is to provide the private key or mnemonic words
There is a function to recover a key pair with mnemonics but I have it (at the moment) not executable as I want to do more rigorous training.
Do you have a "test" full keypair string, the keytype, derivation path and resulting address I can test and compare with?
BTW: The SuiConfig is a look over client.yaml
and, as such, just reads keys from the sui.keystore
. However; there is a 'recover_key_and_address' in sui_crypto.py
that I don't expose via SuiConfig yet. When ready, I will extend
SuiConfig.create_new_keypair_and_address
to take optional mnemonics and derivation paths.
client.yaml and keystore client.zip
memonic: fire secret satisfy piano candy grab spot material youth front child keep avocado pulse stuff wage useless brave stem sweet anger negative father goose
keystore: "AHFAKI8MACQiWoym4sEhixNMWiprArwEAvc/XR71TRvl"
addr: 0x843badffe5ba00864c13b60fdf1784a922ba8a6e
Ok, using your mnemonic and key type of ed25519 it matches your keystring and address.
I will enable this in the next release (publish Thu or Fri this week)
How to pass the parameters of the derivation path of the recover_keypair_and_address method
if i had already created the address from sui wallet in chrome extension.
how can i use that recovery words to use in pysui?