Crate seed_utils[][src]

Expand description

seed-utils

Note: The word seed is interchangeably used for bip39 mnemonics.

  • Derive bip85 child seeds
  • Derive bip32 root xpubs and xprvs from seeds
  • Derive account xpubs and xprvs
  • XOR seeds
  • Truncate (reduce entropy to keep first n words of a seed)
  • Extend (extend entropy to add words to a seed)

Enums

All errors in this crate.

Valid number of words in a mnemonic.

Functions

Derives child seeds of seed with an index range of [start, end). Each seed’s word count will be exactly word_count. Returns list of tuples containing the derived seeds and their indexes.

Derives the master private key of a seed at the bip32 root.

Derives the master public key of a seed at the bip32 root.

Derives account extended private keys of a seed with an index range [start, end) and the derivation path of version. Returns a tuple of the derivation path and its derived xprv.

Derives account extended public keys of a seed with an index range [start, end) and the derivation path of version. Returns a tuple of the derivation path and its derived xpub.

Extends a seed’s number of words to the desired length word_count by enxtending its entropy. The returned new seed will start with the same words as seed.

Truncates a seed’s number of words to word_count by truncating its entropy.

XORs multiple seeds and returns the resulting seed or None if seeds is empty. Can fail if a seed is not a valid [bip39::Mnemonic].