bip38_addr
Module with BIP38 utility functions.
- class Bip38AddrConst
Bases:
object
Class container for BIP38 address constants.
- ADDR_HASH_LEN: int = 4
- class Bip38Addr
Bases:
object
Class for BIP38 address computation.
- static AddressHash(pub_key: Union[bytes, IPublicKey], pub_key_mode: P2PKHPubKeyModes) bytes
Compute the address hash as specified in BIP38.
- Parameters:
pub_key (bytes or IPublicKey) – Public key bytes or object
pub_key_mode (Bip38PubKeyModes) – Public key mode
- Returns:
Address hash
- Return type:
bytes
- Raises:
TypeError – If the public key is not a Secp256k1PublicKey
ValueError – If the public key bytes are not valid