bip32_mnemonic 1.0.1 copy "bip32_mnemonic: ^1.0.1" to clipboard
bip32_mnemonic: ^1.0.1 copied to clipboard

An implementation of the BIP32 spec for deriving private keys from mnemonic phrases

A BIP32 implementation for generating public/private key pairs from a mnemonic seed phrase, given an HD derivation path.

Features #

Generate public/private key pairs from a mnemonic, using the BIP32 derivation path. Derives both hardened and non-hardened addresses following the m/44' derivation path format.

Usage #

Generate a public/private key pair:

BIP32 bip32 = BIP32();

// returns a private key without the leading 0x prefix as a String
// given an HD derivation path and mnemonic seed phrase
String privKey = bip32.derivePrivateKeyFromMnemonic(
  mnemonic,
  "m/44'/60'/0'/0/0"
);

// helper function for creating a web3dart Credentials object for operations e.g. signing
Credentials creds = await bip32.deriveCredentialsFromPrivateKey(privKey);
copied to clipboard

Feature Requests #

Please file feature requests and bugs on Github here.

0
likes
140
points
42
downloads

Publisher

unverified uploader

Weekly Downloads

2024.09.28 - 2025.04.12

An implementation of the BIP32 spec for deriving private keys from mnemonic phrases

Repository (GitHub)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

bip39, convert, cryptography, dartdoc, pointycastle, secp256k1, web3dart

More

Packages that depend on bip32_mnemonic