aiobitcoin.tools

aiobitcoin.tools.bip32 module

BIP32 Hierarchical Deterministic Wallet functions.

A deterministic wallet is a hash-chain of private/public key pairs that derives from a single root, which is the only element requiring backup. Moreover, there are schemes where public keys can be calculated without accessing private keys.

A hierarchical deterministic wallet is a tree of multiple hash-chains, derived from a single root, allowing for selective sharing of keypair chains.

Here, the HD wallet is implemented according to BIP32 bitcoin standard https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki.

aiobitcoin.tools.bip32.xmprv_from_seed(seed: Union[str, bytes], version: Union[str, bytes], decode: bool = True) → bytes[source]

derive the master extended private key from the seed

aiobitcoin.tools.bip32.xpub_from_xprv(xprv: Union[str, bytes], decode: bool = True) → bytes[source]

Neutered Derivation (ND)

Computation of the extended public key corresponding to an extended private key (“neutered” as it removes the ability to sign transactions)