pypergraph.keyring.bip_helpers package

Submodules

pypergraph.keyring.bip_helpers.bip32_helper module

class pypergraph.keyring.bip_helpers.bip32_helper.Bip32Helper[source]

Bases: object

get_hd_root_key_from_seed(seed_bytes: bytes, hd_path: str) BIP32Key[source]

Derive the root key from a seed entropy using derived path. Add index as child key.

Parameters:
  • seed_bytes – The seed in bytes format.

  • hd_path – The derivation path.

Returns:

HD wallet root key (add index).

static get_root_key_from_seed(seed_bytes) BIP32Key[source]

Derive the HD root/master key from a seed entropy in bytes format.

Parameters:

seed_bytes – The seed entropy in bytes format.

Returns:

The root/master key.

pypergraph.keyring.bip_helpers.bip39_helper module

class pypergraph.keyring.bip_helpers.bip39_helper.Bip39Helper(words: int = 12, language: str = 'english')[source]

Bases: object

Generate 12 or 24 words and derive entropy

LANGUAGES = ('english', 'chinese_simplified', 'chinese_traditional', 'french', 'italian', 'japanese', 'korean', 'spanish', 'turkish', 'czech', 'portuguese')
generate_mnemonic() str[source]
Returns:

Dictionary with Mnemonic object, mnemonic phrase, mnemonic seed, mnemonic entropy.

get_seed_bytes_from_mnemonic(mnemonic: str)[source]
is_valid(seed: str) bool[source]

Validates the mnemonic phrase and returns bool.

Parameters:
  • self

  • seed – Mnemonic phrase.

Returns:

Module contents