bip32_slip10_mst_key_generator
Module for BIP32 SLIP-0010 master key generation. Reference: https://github.com/satoshilabs/slips/blob/master/slip-0010.md
- class Bip32Slip10MstKeyGeneratorConst
Bases:
object
Class container for BIP32 SLIP-0010 master key generator constants.
- SEED_MIN_BYTE_LEN: int = 16
- HMAC_KEY_ED25519_BYTES: bytes = b'ed25519 seed'
- HMAC_KEY_NIST256P1_BYTES: bytes = b'Nist256p1 seed'
- HMAC_KEY_SECP256K1_BYTES: bytes = b'Bitcoin seed'
- class Bip32Slip10Ed2519MstKeyGenerator
Bases:
IBip32MstKeyGenerator
BIP32 SLIP-0010 ed25519 master key generator class. It allows master keys generation in according to BIP32 SLIP-0010 for ed25519 curve.
- classmethod GenerateFromSeed(seed_bytes: bytes) Tuple[bytes, bytes]
Generate a master key from the specified seed.
- Parameters:
seed_bytes (bytes) – Seed bytes
- Returns:
Private key bytes (index 0) and chain code bytes (index 1)
- Return type:
tuple[bytes, bytes]
- Raises:
Bip32KeyError – If the seed is not suitable for master key generation
ValueError – If seed length is not valid
- class Bip32Slip10Nist256p1MstKeyGenerator
Bases:
IBip32MstKeyGenerator
BIP32 SLIP-0010 nist256p1 master key generator class. It allows master keys generation in according to BIP32 SLIP-0010 for nist256p1 curve.
- classmethod GenerateFromSeed(seed_bytes: bytes) Tuple[bytes, bytes]
Generate a master key from the specified seed.
- Parameters:
seed_bytes (bytes) – Seed bytes
- Returns:
Private key bytes (index 0) and chain code bytes (index 1)
- Return type:
tuple[bytes, bytes]
- Raises:
Bip32KeyError – If the seed is not suitable for master key generation
ValueError – If seed length is not valid
- class Bip32Slip10Secp256k1MstKeyGenerator
Bases:
IBip32MstKeyGenerator
BIP32 SLIP-0010 secp256k1 master key generator class. It allows master keys generation in according to BIP32 SLIP-0010 for secp256k1 curve.
- classmethod GenerateFromSeed(seed_bytes: bytes) Tuple[bytes, bytes]
Generate a master key from the specified seed.
- Parameters:
seed_bytes (bytes) – Seed bytes
- Returns:
Private key bytes (index 0) and chain code bytes (index 1)
- Return type:
tuple[bytes, bytes]
- Raises:
Bip32KeyError – If the seed is not suitable for master key generation
ValueError – If seed length is not valid