How to import mnemonic to recover private key

Tool:

dashboard dont have function of mnemonic,we need tool to use POST request,such as curl_ or _postman.

Acquire corresponding mnemonic

post request for bytomd:/create-key

{ “alias”: “create_key_test”,

“password”: “createkeytest”,

“language”: “en” }

{ “alias”: “create_key_test”,

“password”: “createkeytest”,

“language”: “en” }

we can see xpub and mnemonic in response

because you modify the source code,and added printing information,bytomd command line to print corresponding xprv and xpub

For example,here is a xprv:

50db5bfe21b08462972eadbce08ec92d078a45fa7a280d175a823f9e457faf447d1f501b69f895b830138fabc6f91e2b3b3c8df26642a34be4af27886b9134dc 

corresponding mnemonic: pudding room business river pattern box snap merit unfold speak hat task start post request/create-key

{ “alias”: “nnemonic_test”, 
“password”: “nnemonicnnemonic”,
“mnemonic”: “pudding room business river pattern box snap merit unfold speak hat task”,
“language”: “en” }

return:

bytomd output

we can see the recovered xprv is similiar to former xprv,verify successfully

you can also see recovered private key in dashboard