Skip to main content

kobe_eth/
lib.rs

1//! Ethereum wallet utilities for Kobe CLI.
2//!
3//! Provides Ethereum address derivation from a unified [`kobe_core::Wallet`].
4//!
5//! # Features
6//!
7//! - `std` (default): Enable standard library support
8//! - `alloc`: Enable heap allocation without full std (for `no_std` environments)
9//! - `rand`: Enable random key generation for `StandardWallet`
10//!
11//! # Usage
12//!
13//! ```ignore
14//! use kobe_core::Wallet;
15//! use kobe_eth::Deriver;
16//!
17//! // Create a wallet from kobe-core
18//! let wallet = Wallet::generate(12, None).unwrap();
19//!
20//! // Derive Ethereum addresses from the wallet
21//! let deriver = Deriver::new(&wallet);
22//! let addr = deriver.derive(0, false, 0).unwrap();
23//! println!("Address: {}", addr.address);
24//! ```
25
26#![cfg_attr(not(feature = "std"), no_std)]
27
28#[cfg(feature = "alloc")]
29extern crate alloc;
30
31mod deriver;
32mod error;
33mod standard_wallet;
34mod utils;
35
36pub use deriver::{DerivedAddress, Deriver};
37pub use error::Error;
38pub use standard_wallet::StandardWallet;