Skip to main content

kobe_core/
lib.rs

1//! Multi-chain HD wallet derivation library.
2//!
3//! Core [`Wallet`] type holds a BIP-39 mnemonic and derives seeds for
4//! chain-specific derivers (`kobe-evm`, `kobe-btc`, `kobe-svm`, etc.).
5//!
6//! ```ignore
7//! let wallet = kobe::Wallet::from_mnemonic("abandon ...", None)?;
8//! let eth = kobe_evm::Deriver::new(&wallet).derive(0)?;
9//! let btc = kobe_btc::Deriver::new(&wallet, kobe_btc::Network::Mainnet)?.derive(0)?;
10//! ```
11
12#![cfg_attr(not(feature = "std"), no_std)]
13
14#[cfg(feature = "alloc")]
15extern crate alloc;
16
17#[cfg(feature = "alloc")]
18mod derive;
19mod error;
20#[cfg(feature = "alloc")]
21mod wallet;
22
23#[cfg(feature = "bip32")]
24pub mod bip32;
25#[cfg(feature = "camouflage")]
26pub mod camouflage;
27#[cfg(feature = "alloc")]
28pub mod mnemonic;
29#[cfg(feature = "slip10")]
30pub mod slip10;
31
32pub use bip39::Language;
33#[cfg(feature = "rand_core")]
34pub use bip39::rand_core;
35#[cfg(feature = "alloc")]
36pub use derive::{Derive, DeriveExt, DerivedAccount};
37pub use error::Error;
38#[cfg(feature = "alloc")]
39pub use wallet::Wallet;
40
41/// Convenient Result alias.
42pub type Result<T> = core::result::Result<T, Error>;