cosmostation/cosmosjs

How do I get privateKey after address generation?

RudrikaFichadiya opened this issue · 5 comments

How do I get privateKey after address generation?

const ecpairPriv = cosmos.getECPairPriv(mnemonic);

ecpairPriv has value of private key.

@wannabit-booyoun, Yes, that's correct but the format of that value is unreadable, how can I get PrivateKey from it? Is it possible to get?

Cosmos doesn't support private key formally. It is recommended to use mnemonics rather than private keys.

and any idea how to register totally new account?

@gelinger777 Generate new random mnemonics.