sigildocs

(sigil bitcoin keys)

(sigil bitcoin keys) — Bitcoin key, address, BIP32, and BIP39 helpers

Exports

Bitcoin network parameters used by key and address encoders.

Test if a value is a bitcoin-network struct.

Get the name field of a bitcoin-network struct.

Get the wif field of a bitcoin-network struct.

Get the p2pkh field of a bitcoin-network struct.

Get the p2sh field of a bitcoin-network struct.

Get the bech32 field of a bitcoin-network struct.

Get the xprv field of a bitcoin-network struct.

Get the xpub field of a bitcoin-network struct.

Mainnet address and extended-key version constants.

Testnet address and extended-key version constants.

BIP32 extended private key record.

Test if a value is a extended-private-key struct.

Get the network field of a extended-private-key struct.

Get the depth field of a extended-private-key struct.

Get the parent-fingerprint field of a extended-private-key struct.

Get the child-number field of a extended-private-key struct.

Get the chain-code field of a extended-private-key struct.

Get the private-key field of a extended-private-key struct.

Get the private-key field of a extended-private-key struct.

BIP32 extended public key record.

Test if a value is a extended-public-key struct.

Get the network field of a extended-public-key struct.

Get the depth field of a extended-public-key struct.

Get the parent-fingerprint field of a extended-public-key struct.

Get the child-number field of a extended-public-key struct.

Get the chain-code field of a extended-public-key struct.

Get the public-key field of a extended-public-key struct.

Get the public-key field of a extended-public-key struct.

BIP32 key-origin metadata used by descriptors and PSBT derivations.

Test if a value is a bip32-key-origin struct.

Get the fingerprint field of a bip32-key-origin struct.

Get the path field of a bip32-key-origin struct.

Encode a 32-byte private key as Wallet Import Format.

network selects the WIF version byte. compressed? controls whether the compressed-public-key marker is included in the payload.

Decode a Wallet Import Format string.

Returns (key network . compressed?).

Derive a compressed public key from a 32-byte secp256k1 private key.

public-key?procedure

Return true when key is a valid compressed or uncompressed public key.

Return true when key is a valid 33-byte compressed public key.

Convert a serialized public key into a 32-byte x-only public key.

Derive a Base58Check P2PKH address from a serialized public key.

Encode a 20-byte script hash as a Base58Check P2SH address.

Derive a native SegWit P2WPKH address from a serialized public key.

Derive a native SegWit P2WSH address from a witness script.

Encode a 32-byte x-only public key as a native Taproot address.

fingerprintprocedure

Return the BIP32 4-byte key fingerprint for a serialized public key.

Neuter an extended private key into the matching extended public key.

Derive a BIP32 master extended private key from seed bytes.

Derive a BIP32 private child key.

Hardened children use child numbers greater than or equal to #x80000000.

Derive a non-hardened BIP32 public child key.

Parse an absolute BIP32 path into child numbers.

Format child numbers as an absolute BIP32 path.

Parse [fingerprint/path] BIP32 key-origin text.

Format BIP32 key-origin metadata as [fingerprint/path].

Derive a BIP32 path such as m/84'/0'/0'/0/0.

The input key may be an extended private key or extended public key.

Convert a non-hardened child index into a hardened BIP32 index.

Build a BIP43 account path m/purpose'/coin_type'/account'.

BIP44 legacy P2PKH account path.

BIP49 nested SegWit account path.

BIP84 native SegWit account path.

BIP86 Taproot key-path account path.

Derive an account-level extended key for a BIP43 purpose.

Derive a BIP44 account key from a master extended key.

Derive a BIP49 account key from a master extended key.

Derive a BIP84 account key from a master extended key.

Derive a BIP86 account key from a master extended key.

Derive an external (#f) or change (#t) chain from an account key.

Derive an address key at /change/index from an account key.

Serialize a BIP32 extended private key as Base58Check text.

Serialize a BIP32 extended public key as Base58Check text.

Serialize an extended private key with a SLIP-132 version prefix.

Serialize an extended public key with a SLIP-132 version prefix.

Parse a Base58Check BIP32 extended private key.

Parse a Base58Check BIP32 extended public key.

Parse a SLIP-132 extended private key into the standard key record.

Parse a SLIP-132 extended public key into the standard key record.

Convert BIP39 entropy bytes into an English mnemonic sentence.

Convert a BIP39 English mnemonic sentence back to entropy bytes.

Derive a 64-byte BIP39 seed from a mnemonic and optional passphrase.