Skip to main content

krusty_kms/
lib.rs

1//! TONGO Key Management System (KMS).
2//!
3//! Provides BIP-44 compliant key derivation for TONGO accounts using custom coin type 5454.
4//!
5//! # Derivation Path
6//!
7//! The TONGO protocol uses the following BIP-44 derivation path:
8//! ```text
9//! m/44'/5454'/0'/0/{index}
10//! ```
11//!
12//! Where:
13//! - `44'` - BIP-44 purpose
14//! - `5454'` - TONGO custom coin type
15//! - `0'` - Account (hardened)
16//! - `0` - Change (external chain)
17//! - `{index}` - Address index
18
19pub mod account;
20pub mod account_class;
21pub mod derivation;
22pub mod eth_signer;
23pub mod mnemonic;
24
25pub use account::{calculate_contract_address, derive_oz_account_address};
26pub use account_class::{
27    AccountClass, ArgentAccount, BraavosAccount, OpenZeppelinAccount, OzDeploymentDescriptor,
28};
29pub use derivation::{
30    derive_keypair, derive_keypair_with_coin_type, derive_nostr_keypair, derive_nostr_private_key,
31    derive_private_key, derive_private_key_with_coin_type, derive_view_keypair,
32    derive_view_private_key, NostrKeyPair, TongoKeyPair, NOSTR_COIN_TYPE, STARKNET_COIN_TYPE,
33    TONGO_COIN_TYPE, TONGO_VIEW_COIN_TYPE,
34};
35pub use eth_signer::EthSigner;
36pub use krusty_kms_common::SecretFelt;
37pub use mnemonic::{generate_mnemonic, mnemonic_to_seed, validate_mnemonic};
38
39/// Re-export common types
40pub use krusty_kms_common::*;