Crate bitcoin_address_generator

Crate bitcoin_address_generator 

Source
Expand description

Bitcoin key and address derivation library for address generation, script hash calculation, and private key management.

This library provides secure methods for:

  • BIP39 mnemonic generation
  • Address generation (Legacy, SegWit, and Taproot)
  • Script hash calculation
  • Private key generation

Structs§

GetAddressResponse
Response structure for address generation containing the address, derivation path, and public key.
GetAddressesResponse
Response structure containing multiple generated Bitcoin addresses.

Enums§

DerivationError
Custom error type for bitcoin key and address operations
WordCount
BIP39 mnemonic word count options

Functions§

calculate_script_hash
Calculates a script hash for a given Bitcoin address and network type.
derive_bitcoin_address
Derives a Bitcoin address from a mnemonic phrase, derivation path, network type, and optional BIP39 passphrase.
derive_bitcoin_addresses
Derives multiple Bitcoin addresses from a single mnemonic by iterating through a range of indices.
derive_private_key
Derives a private key in WIF format from a mnemonic phrase, derivation path, network type, and optional BIP39 passphrase.
entropy_to_mnemonic
Converts entropy bytes to a mnemonic phrase.
generate_mnemonic
Generates a new BIP39 mnemonic phrase using a specified word count.
get_bip39_suggestions
Gets word suggestions for partial input (autocomplete).
get_bip39_wordlist
Gets the full BIP39 wordlist for the specified language.
is_valid_bip39_word
Checks if a word is a valid BIP39 word for the specified language.
mnemonic_to_entropy
Converts a mnemonic phrase to entropy bytes.
mnemonic_to_seed
Converts a mnemonic phrase to a seed with optional passphrase.
validate_mnemonic
Validates a BIP39 mnemonic phrase.