Skip to main content

Crate kobe_btc

Crate kobe_btc 

Source
Expand description

Bitcoin HD wallet derivation for Kobe.

Derives Bitcoin addresses from a kobe_primitives::Wallet seed following BIP-32/44/49/84/86. Supports P2PKH, P2SH-P2WPKH, P2WPKH, and P2TR across mainnet and testnet.

§Architecture

  • Key derivation: kobe_primitives::Wallet::derive_secp256k1 (shared pipeline).
  • Address and WIF: implemented in this crate and pinned by KATs (BIP-44/49/84/86; BIP-49 testnet official vectors; bitcoinjs-lib where noted).
  • The workspace prefers thin wrappers around mature libraries; kobe-btc intentionally drops the bitcoin crate dependency while keeping the same derived address strings and WIF encoding.

§Taproot scope

Supported: single-key, key-path-only P2TR (BIP-86 style). Not supported: script trees, merkle roots, MuSig, signing, or spending. Internal keys use BIP-340 lift_x (even-y). The witness program is the x-coordinate of the tweaked output key Q; addresses match BIP-86 KATs.

Structs§

BtcAccount
Bitcoin-specific derived account: unified DerivedAccount plus WIF, address type, and structured path.
DerivationPath
BIP-32 derivation path with a stable m/… string form.
DerivedAccount
A derived HD account — unified across all chains.
Deriver
Bitcoin address deriver from a unified wallet seed.
ParseAddressTypeError
Error returned when parsing an invalid address type string.
ParseNetworkError
Error returned when parsing an invalid network string.
PathSegment
One BIP-32 child index (hardened or normal).

Enums§

AddressType
Bitcoin address types.
DeriveError
Errors produced by HD derivation, mnemonic handling, and address encoding.
DerivedPublicKey
Strongly typed public key emitted by an HD derivation.
Network
Supported Bitcoin networks.