Expand description
TONGO Key Management System (KMS).
Provides BIP-44 compliant key derivation for TONGO accounts using custom coin type 5454.
§Derivation Path
The TONGO protocol uses the following BIP-44 derivation path:
m/44'/5454'/0'/0/{index}Where:
44'- BIP-44 purpose5454'- TONGO custom coin type0'- Account (hardened)0- Change (external chain){index}- Address index
Re-exports§
pub use account::calculate_contract_address;pub use account::derive_oz_account_address;pub use account_class::AccountClass;pub use account_class::ArgentAccount;pub use account_class::BraavosAccount;pub use account_class::OpenZeppelinAccount;pub use account_class::OzDeploymentDescriptor;pub use derivation::derive_keypair;pub use derivation::derive_keypair_with_coin_type;pub use derivation::derive_nostr_keypair;pub use derivation::derive_nostr_private_key;pub use derivation::derive_private_key;pub use derivation::derive_private_key_with_coin_type;pub use derivation::derive_view_keypair;pub use derivation::derive_view_private_key;pub use derivation::NostrKeyPair;pub use derivation::TongoKeyPair;pub use derivation::NOSTR_COIN_TYPE;pub use derivation::STARKNET_COIN_TYPE;pub use derivation::TONGO_COIN_TYPE;pub use derivation::TONGO_VIEW_COIN_TYPE;pub use eth_signer::EthSigner;pub use mnemonic::generate_mnemonic;pub use mnemonic::mnemonic_to_seed;pub use mnemonic::validate_mnemonic;
Modules§
- account
- Starknet account contract address derivation.
- account_
class - Account class trait and presets for Starknet account contracts.
- address
- Re-export common types Validated Starknet address (Felt newtype).
- amount
- Re-export common types Precision-safe token amount representation.
- chain
- Re-export common types Chain ID enum for Starknet networks.
- derivation
- BIP-44 key derivation for TONGO accounts.
- error
- Re-export common types Error types for TONGO protocol operations.
- eth_
signer - Secp256k1 (Ethereum) signer for Starknet account transactions.
- mnemonic
- Mnemonic phrase generation and validation.
- network
- Re-export common types Network preset configuration for Starknet chains.
- secret_
felt - Re-export common types
A zeroizing wrapper for secret
Feltvalues. - token
- Re-export common types Token metadata and presets for known Starknet tokens.
- types
- Re-export common types Common type definitions for TONGO protocol.
- utils
- Re-export common types Utility functions for TONGO protocol.
- validator
- Re-export common types Staking validator metadata and presets.
Structs§
- Account
State - Re-export common types Tongo account state.
- Address
- Re-export common types A validated Starknet contract address.
- Amount
- Re-export common types A token amount with associated decimal precision.
- Audit
Proof - Re-export common types Audit proof structure (SameEncryptUnknownRandom protocol). Proves that two ciphertexts encrypt the same plaintext.
- ElGamal
Ciphertext - Re-export common types ElGamal ciphertext.
- ElGamal
Proof - Re-export common types ElGamal encryption proof structure.
- Network
Preset - Re-export common types A preset configuration for a Starknet network.
- Poe2
Proof - Re-export common types Proof of Exponentiation 2 (PoE2) proof structure.
- PoeProof
- Re-export common types Proof of Exponentiation (PoE) proof structure.
- Proof
OfBit - Re-export common types Proof of Bit (proves a committed value is either 0 or 1). This is an OR proof: either V = h^r (bit=0) OR V/g = h^r (bit=1).
- Proof
OfTransfer - Re-export common types Proof of Transfer structure matching Cairo contract expectations. This proves:
- Range
- Re-export common types Range proof structure proving a value is in [0, 2^bit_size - 1]. Contains commitments V_i = g^b_i * h^r_i for each bit and corresponding proofs.
- Secret
Felt - A
Feltthat holds secret key material and is zeroized on drop. - Serializable
Point - Re-export common types Represents a point on the Stark curve in serializable form.
- Token
- Re-export common types ERC-20 token metadata.
- Validator
- Re-export common types A staking delegation pool validator.
Enums§
- ChainId
- Re-export common types Starknet chain identifier.
- KmsError
- Re-export common types
- Transaction
Type - Re-export common types Transaction types in TONGO protocol.
Type Aliases§
- Result
- Re-export common types