bip32_descriptors package¶
Subpackages¶
- bip32_descriptors.bip32 package
- Submodules
- bip32_descriptors.bip32.bip32 module
BIP32KeyBIP32KeyDataBIP32KeyData.assert_valid()BIP32KeyData.b58decode()BIP32KeyData.b58encode()BIP32KeyData.derive()BIP32KeyData.from_seed()BIP32KeyData.is_hardenedBIP32KeyData.is_privateBIP32KeyData.is_rootBIP32KeyData.parse()BIP32KeyData.point_varBIP32KeyData.qBIP32KeyData.secBIP32KeyData.serialize()BIP32KeyData.xpub
crack_prv_key()derive()derive_()derive_from_account()derive_from_account_()derive_from_account_range()derive_from_account_range_()fingerprint()key_data_from_bip32_key()point_from_xkey()point_from_xpub()prv_keyinfo_from_xprv()pub_key_derivation_tweaks()pub_keyinfo_from_xkey()pub_keyinfo_from_xpub()rootxprv_from_seed()rootxprv_from_seed_()xpub_from_xprv()xpub_from_xprv_()
- bip32_descriptors.bip32.der_path module
- bip32_descriptors.bip32.key_origin module
- Module contents
BIP32KeyDataBIP32KeyData.assert_valid()BIP32KeyData.b58decode()BIP32KeyData.b58encode()BIP32KeyData.derive()BIP32KeyData.from_seed()BIP32KeyData.is_hardenedBIP32KeyData.is_privateBIP32KeyData.is_rootBIP32KeyData.parse()BIP32KeyData.point_varBIP32KeyData.qBIP32KeyData.secBIP32KeyData.serialize()BIP32KeyData.xpub
BIP32KeyOriginassert_valid_hd_key_paths()bytes_from_der_path()crack_prv_key()decode_from_bip32_derivs()decode_hd_key_paths()derive()derive_()derive_from_account()derive_from_account_()derive_from_account_range()derive_from_account_range_()encode_to_bip32_derivs()fingerprint()hardenings_from_der_path()indexes_from_der_path()int_from_index_str()key_data_from_bip32_key()point_from_xkey()point_from_xpub()prv_keyinfo_from_xprv()pub_key_derivation_tweaks()pub_keyinfo_from_xkey()pub_keyinfo_from_xpub()rootxprv_from_seed()rootxprv_from_seed_()str_from_der_path()str_from_index_int()xpub_from_xprv()xpub_from_xprv_()
- bip32_descriptors.descriptors package
- Submodules
- bip32_descriptors.descriptors.compiler module
- bip32_descriptors.descriptors.descriptors module
AddrDescriptorComboDescriptorDescriptorDescriptor.address()Descriptor.addresses()Descriptor.expand()Descriptor.expansion()Descriptor.index_of()Descriptor.is_rangedDescriptor.key_expressionsDescriptor.provider()Descriptor.redeem_script()Descriptor.satisfy()Descriptor.script_pub_key()Descriptor.script_pub_keys()Descriptor.spending_paths
DescriptorTreeExpansionMiniscriptDescriptorMultiAMultiDescriptorPkDescriptorPkhDescriptorProviderRawDescriptorRawLeafRawNodeRawPkhDescriptorRawTrDescriptorShDescriptorTrDescriptorUnusedDescriptorWpkhDescriptorWshDescriptoradd_checksum()at_index()checksum()derived_origin()from_address()infer_descriptor()multipath_descriptors()normalized()parse()private_string()strip_checksum()wallet_policy()wallet_policy_address()wallet_policy_descriptor()
- bip32_descriptors.descriptors.key_expression module
- bip32_descriptors.descriptors.miniscript module
MiniscriptMiniscript.has_duplicate_keys()Miniscript.insane_sub()Miniscript.is_non_malleableMiniscript.is_sane()Miniscript.is_sane_subexpression()Miniscript.is_satisfiableMiniscript.is_signature_requiredMiniscript.is_validMiniscript.is_valid_top_levelMiniscript.is_within_resource_limitsMiniscript.key_expressionsMiniscript.max_exec_stack_itemsMiniscript.max_opsMiniscript.max_stack_itemsMiniscript.max_witness_sizeMiniscript.max_witness_stackMiniscript.mixes_timelocksMiniscript.satisfy()Miniscript.script()Miniscript.spending_paths
QuorumSpendContextSpendingPathfrom_script()parse()reads_back()
- Module contents
AddrDescriptorComboDescriptorDescriptorDescriptor.address()Descriptor.addresses()Descriptor.expand()Descriptor.expansion()Descriptor.index_of()Descriptor.is_rangedDescriptor.key_expressionsDescriptor.provider()Descriptor.redeem_script()Descriptor.satisfy()Descriptor.script_pub_key()Descriptor.script_pub_keys()Descriptor.spending_paths
ExpansionKeyExpressionMiniscriptMiniscript.has_duplicate_keys()Miniscript.insane_sub()Miniscript.is_non_malleableMiniscript.is_sane()Miniscript.is_sane_subexpression()Miniscript.is_satisfiableMiniscript.is_signature_requiredMiniscript.is_validMiniscript.is_valid_top_levelMiniscript.is_within_resource_limitsMiniscript.key_expressionsMiniscript.max_exec_stack_itemsMiniscript.max_opsMiniscript.max_stack_itemsMiniscript.max_witness_sizeMiniscript.max_witness_stackMiniscript.mixes_timelocksMiniscript.satisfy()Miniscript.script()Miniscript.spending_paths
MiniscriptDescriptorMultiAMultiDescriptorPkDescriptorPkhDescriptorProviderQuorumRawDescriptorRawLeafRawNodeRawPkhDescriptorRawTrDescriptorShDescriptorSpendContextSpendingPathTrDescriptorUnusedDescriptorWpkhDescriptorWshDescriptoradd_checksum()at_index()checksum()derived_origin()from_address()infer_descriptor()multipath_descriptors()normalized()parse()private_string()strip_checksum()wallet_policy()wallet_policy_address()wallet_policy_descriptor()
Module contents¶
The bip32_descriptors package: what it publishes, and the version metadata.
BIP32 hierarchical deterministic keys, key origins and derivation paths, and output script descriptors with miniscript, built on the protocol package btclib and the curve package ecc. The dependency points one way: this package imports them, and nothing in either imports this one.
__all__ here is the root of the package’s public tree: the packages a caller reaches from this name. Each of them declares its own __all__, so a walk that starts here has a declared surface at every node – which is why the list is not pkgutil.iter_modules: discovery would answer the file tree, and a module added to the directory would publish itself rather than being published.
name is not in it, nor are the metadata dunders. name is the distribution’s name and not a member of the tree, __version__ bound by a star import would overwrite the importing module’s own, and each is still an attribute here: bip32_descriptors.__version__ is how a caller reads the version and bip32_descriptors.name how it reads the name.
Nothing is imported eagerly. A package is imported when it is first asked for, through the __getattr__ at the bottom of this file, so import bip32_descriptors is the metadata lookup below and nothing else, and the import graph keeps its shape: importing every module here would put the whole package in sys.modules before any single module of it could be imported first, which is the situation tests/imports_test.py exists to make impossible.
What that costs is worth stating: mypy reads a module-level __getattr__ as a promise that any attribute may exist, so bip32_descriptors.bip23 is Any to it and a misspelling on this package is a runtime AttributeError rather than a reported error. The spellings a caller actually writes – from bip32_descriptors import bip32, import bip32_descriptors.bip32, from bip32_descriptors.bip32 import derive – resolve against the real modules and stay checked.