@sk1ppi/cardano-nami-wallet-recovery
v1.0.5
Published
Recover a wallet from a mnemonic phrase using the Cardano Serialization Library and the bip39 library. It retrieves the private key, public key and address of each wallet created in Nami Wallet.
Downloads
19
Maintainers
Readme
@sk1ppi/cardano-nami-wallet-recovery
Recover a wallet from a mnemonic phrase using the Cardano Serialization Library and the bip39 library. It retrieves the private key, public key and address of each wallet created in Nami Wallet.
Install
To install the package, use the following command:
npm i @sk1ppi/cardano-nami-wallet-recovery
Example
To use the package, use the following code example:
const { fromMnemonicSeed } = require("cardano-nami-wallet-recovery");
// Example mnemonic seed
const mnemonicSeed = 'abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon abandon about';
const accounts = fromMnemonicSeed(mnemonicSeed);
// Output the generated accounts
console.log(accounts);
// [
// {
// accountKey: 'acct_xvk1...',
// publicKey: 'xpub1...',
// stakeKey: 'stake1u...',
// addressShelley: 'addr1...'
// },
// ...
// ]
Testing
To run tests, use the following command:
npm run test
Contribute
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.