Skip to main content

Crate kobe_btc

Crate kobe_btc 

Source
Expand description

Bitcoin wallet utilities for Kobe CLI.

Provides Bitcoin address derivation from a unified kobe::Wallet.

§Features

  • std (default): Enable standard library support
  • alloc: Enable heap allocation without full std (for no_std environments)
  • rand: Enable random key generation for StandardWallet

§Usage

use kobe::Wallet;
use kobe_btc::{Deriver, Network, AddressType};

// Create a wallet from kobe-core
let wallet = Wallet::generate(12, None).unwrap();

// Derive Bitcoin addresses from the wallet
let deriver = Deriver::new(&wallet, Network::Mainnet).unwrap();
let addr = deriver.derive(0).unwrap();  // P2WPKH by default
println!("Address: {}", addr.address);

// Or with specific address type
let addr = deriver.derive_with(AddressType::P2pkh, 0).unwrap();

Structs§

DerivationPath
BIP32 derivation path.
DerivedAddress
A derived Bitcoin address with associated keys.
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.
StandardWallet
A standard Bitcoin wallet with a single private key.

Enums§

AddressType
Bitcoin address types.
Error
Errors that can occur during Bitcoin wallet operations.
Network
Supported Bitcoin networks.

Type Aliases§

Result
A convenient Result type alias for kobe-btc operations.