bip44_keys
Module for BIP44 keys handling.
- class Bip44PublicKey(pub_key: Bip32PublicKey, coin_conf: BipCoinConf)
Bases:
object
BIP44 public key class. It contains Bip32PublicKey and add the possibility to compute the address from the coin type.
- m_pub_key: Bip32PublicKey
- m_coin_conf: BipCoinConf
- Bip32Key() Bip32PublicKey
Return the BIP32 key object.
- Returns:
BIP32 key object
- Return type:
Bip32PublicKey object
- ToExtended() str
Return key in serialized extended format.
- Returns:
Key in serialized extended format
- Return type:
str
- ChainCode() Bip32ChainCode
Return the chain code.
- Returns:
Bip32ChainCode object
- Return type:
Bip32ChainCode object
- RawCompressed() DataBytes
Return raw compressed public key.
- Returns:
DataBytes object
- Return type:
DataBytes object
- RawUncompressed() DataBytes
Return raw uncompressed public key.
- Returns:
DataBytes object
- Return type:
DataBytes object
- ToAddress() str
Return the address correspondent to the public key.
- Returns:
Address string
- Return type:
str
- class Bip44PrivateKey(priv_key: Bip32PrivateKey, coin_conf: BipCoinConf)
Bases:
object
BIP44 private key class. It contains Bip32PrivateKey and add the possibility to compute the WIF from the coin type.
- m_priv_key: Bip32PrivateKey
- m_coin_conf: BipCoinConf
- Bip32Key() Bip32PrivateKey
Return the BIP32 key object.
- Returns:
BIP32 key object
- Return type:
Bip32PublicKey object
- ToExtended() str
Return key in serialized extended format.
- Returns:
Key in serialized extended format
- Return type:
str
- ChainCode() Bip32ChainCode
Return the chain code.
- Returns:
Bip32ChainCode object
- Return type:
Bip32ChainCode object
- Raw() DataBytes
Return raw compressed public key.
- Returns:
DataBytes object
- Return type:
DataBytes object
- PublicKey() Bip44PublicKey
Get the public key correspondent to the private one.
- Returns:
Bip44PublicKey object
- Return type:
Bip44PublicKey object
- ToWif(pub_key_mode: P2PKHPubKeyModes = P2PKHPubKeyModes.COMPRESSED) str
Return key in WIF format.
- Parameters:
pub_key_mode (WifPubKeyModes) – Specify if the private key corresponds to a compressed public key
- Returns:
Key in WIF format
- Return type:
str