@sk1ppi/cardano-nami-wallet-recovery

1.0.5 • Public • Published

@sk1ppi/cardano-nami-wallet-recovery

Made by GitHub License NPM Version

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.

Reach out

image0_0-3

License

Apache-2.0

Package Sidebar

Install

npm i @sk1ppi/cardano-nami-wallet-recovery

Weekly Downloads

3

Version

1.0.5

License

Apache-2.0

Unpacked Size

19.2 kB

Total Files

6

Last publish

Collaborators

  • sk1ppi