cardano_byron_legacy_mst_key_generator
Module for Cardano Byron legacy master key generation.
References
https://input-output-hk.github.io/cardano-wallet/concepts/master-key-generation https://cips.cardano.org/cips/cip3/byron.md
- class CardanoByronLegacyMstKeyGeneratorConst
Bases:
object
Class container for Cardano Byron legacy BIP32 constants.
- HMAC_MESSAGE_FORMAT: bytes = b'Root Seed Chain %d'
- SEED_BYTE_LEN: int = 32
- class CardanoByronLegacyMstKeyGenerator
Bases:
IBip32MstKeyGenerator
Cardano Byron legacy master key generator class. It allows master keys generation in according to Cardano Byron (legacy, used by old versions of Daedalus).
- 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