(sigil bitcoin keys)
(sigil bitcoin keys) — Bitcoin key, address, BIP32, and BIP39 helpers
Exports
bitcoin-networkprocedureBitcoin network parameters used by key and address encoders.
bitcoin-network?procedureTest if a value is a bitcoin-network struct.
bitcoin-network-nameprocedureGet the name field of a bitcoin-network struct.
bitcoin-network-wifprocedureGet the wif field of a bitcoin-network struct.
bitcoin-network-p2pkhprocedureGet the p2pkh field of a bitcoin-network struct.
bitcoin-network-p2shprocedureGet the p2sh field of a bitcoin-network struct.
bitcoin-network-bech32procedureGet the bech32 field of a bitcoin-network struct.
bitcoin-network-xprvprocedureGet the xprv field of a bitcoin-network struct.
bitcoin-network-xpubprocedureGet the xpub field of a bitcoin-network struct.
bitcoin-mainnetvariableMainnet address and extended-key version constants.
bitcoin-testnetvariableTestnet address and extended-key version constants.
extended-private-keyprocedureBIP32 extended private key record.
extended-private-key?procedureTest if a value is a extended-private-key struct.
extended-private-key-networkprocedureGet the network field of a extended-private-key struct.
extended-private-key-depthprocedureGet the depth field of a extended-private-key struct.
Get the parent-fingerprint field of a extended-private-key struct.
extended-private-key-child-numberprocedureGet the child-number field of a extended-private-key struct.
extended-private-key-chain-codeprocedureGet the chain-code field of a extended-private-key struct.
extended-private-key-private-keyprocedureGet the private-key field of a extended-private-key struct.
%extended-public-key--typevariableGet the private-key field of a extended-private-key struct.
extended-public-keyprocedureBIP32 extended public key record.
extended-public-key?procedureTest if a value is a extended-public-key struct.
extended-public-key-networkprocedureGet the network field of a extended-public-key struct.
extended-public-key-depthprocedureGet the depth field of a extended-public-key struct.
Get the parent-fingerprint field of a extended-public-key struct.
extended-public-key-child-numberprocedureGet the child-number field of a extended-public-key struct.
extended-public-key-chain-codeprocedureGet the chain-code field of a extended-public-key struct.
extended-public-key-public-keyprocedureGet the public-key field of a extended-public-key struct.
%bip32-key-origin--typevariableGet the public-key field of a extended-public-key struct.
bip32-key-originprocedureBIP32 key-origin metadata used by descriptors and PSBT derivations.
bip32-key-origin?procedureTest if a value is a bip32-key-origin struct.
bip32-key-origin-fingerprintprocedureGet the fingerprint field of a bip32-key-origin struct.
bip32-key-origin-pathprocedureGet the path field of a bip32-key-origin struct.
private-key->wifprocedureEncode 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.
wif->private-keyprocedureDecode a Wallet Import Format string.
Returns (key network . compressed?).
private-key->public-keyprocedureDerive a compressed public key from a 32-byte secp256k1 private key.
public-key?procedureReturn true when key is a valid compressed or uncompressed public key.
compressed-public-key?procedureReturn true when key is a valid 33-byte compressed public key.
x-only-public-keyprocedureConvert a serialized public key into a 32-byte x-only public key.
public-key->p2pkh-addressprocedureDerive a Base58Check P2PKH address from a serialized public key.
script-hash->p2sh-addressprocedureEncode a 20-byte script hash as a Base58Check P2SH address.
public-key->p2wpkh-addressprocedureDerive a native SegWit P2WPKH address from a serialized public key.
script->p2wsh-addressprocedureDerive a native SegWit P2WSH address from a witness script.
x-only-public-key->p2tr-addressprocedureEncode a 32-byte x-only public key as a native Taproot address.
fingerprintprocedureReturn the BIP32 4-byte key fingerprint for a serialized public key.
extended-private-key->public-keyprocedureNeuter an extended private key into the matching extended public key.
bip32-master-keyprocedureDerive a BIP32 master extended private key from seed bytes.
bip32-private-childprocedureDerive a BIP32 private child key.
Hardened children use child numbers greater than or equal to #x80000000.
bip32-public-childprocedureDerive a non-hardened BIP32 public child key.
bip32-path->listprocedureParse an absolute BIP32 path into child numbers.
bip32-path->stringprocedureFormat child numbers as an absolute BIP32 path.
bip32-key-origin-parseprocedureParse [fingerprint/path] BIP32 key-origin text.
bip32-key-origin->stringprocedureFormat BIP32 key-origin metadata as [fingerprint/path].
bip32-derive-pathprocedureDerive a BIP32 path such as m/84'/0'/0'/0/0.
The input key may be an extended private key or extended public key.
bip32-hardened-indexprocedureConvert a non-hardened child index into a hardened BIP32 index.
bip32-account-pathprocedureBuild a BIP43 account path m/purpose'/coin_type'/account'.
bip44-account-pathprocedureBIP44 legacy P2PKH account path.
bip49-account-pathprocedureBIP49 nested SegWit account path.
bip84-account-pathprocedureBIP84 native SegWit account path.
bip86-account-pathprocedureBIP86 Taproot key-path account path.
bip32-account-keyprocedureDerive an account-level extended key for a BIP43 purpose.
bip44-account-keyprocedureDerive a BIP44 account key from a master extended key.
bip49-account-keyprocedureDerive a BIP49 account key from a master extended key.
bip84-account-keyprocedureDerive a BIP84 account key from a master extended key.
bip86-account-keyprocedureDerive a BIP86 account key from a master extended key.
bip32-chain-keyprocedureDerive an external (#f) or change (#t) chain from an account key.
bip32-address-keyprocedureDerive an address key at /change/index from an account key.
bip32-xprv->stringprocedureSerialize a BIP32 extended private key as Base58Check text.
bip32-xpub->stringprocedureSerialize a BIP32 extended public key as Base58Check text.
bip32-xprv->slip132-stringprocedureSerialize an extended private key with a SLIP-132 version prefix.
bip32-xpub->slip132-stringprocedureSerialize an extended public key with a SLIP-132 version prefix.
string->bip32-xprvprocedureParse a Base58Check BIP32 extended private key.
string->bip32-xpubprocedureParse a Base58Check BIP32 extended public key.
string->bip32-slip132-xprvprocedureParse a SLIP-132 extended private key into the standard key record.
string->bip32-slip132-xpubprocedureParse a SLIP-132 extended public key into the standard key record.
bip39-entropy->mnemonicprocedureConvert BIP39 entropy bytes into an English mnemonic sentence.
bip39-mnemonic->entropyprocedureConvert a BIP39 English mnemonic sentence back to entropy bytes.
bip39-mnemonic->seedprocedureDerive a 64-byte BIP39 seed from a mnemonic and optional passphrase.