OpenAgentID documentation
Source referencesRust module referenceaegis-wallet

aegis-wallet · address

Declared module signatures, types, configuration, and source documentation.

Source: aegis/aegis-wallet/src/address.rs. SHA-256: 5191155b4074c5a8a3c9cedc9d0e284b069ee4360046f048bb84f9d72fc58b18.

This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.

address::WalletAddress

A derived wallet address for a specific chain.

#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
pub struct WalletAddress {
/// The blockchain chain this address targets.

pub chain: Chain,
/// The derived address string in chain-native format.

pub address: String,
/// The BIP-44/SLIP-0010 derivation path used.

pub derivation_path: String,
/// Hex-encoded public key used for derivation.

pub public_key_hex: String
}

Source line: 15.

address::AddressDeriver

Multi-chain address deriver.

Computes addresses from raw public key bytes for each supported chain, using chain-specific encoding rules.

pub struct AddressDeriver;

Source line: 30.

address::AddressDeriver::derivation_path

Returns the BIP-44/SLIP-0010 derivation path for a given chain.

Path format follows BIP-44: m/44'/<coin_type>'/<account>'/0/<index> with chain-specific variations for SLIP-0010 chains (Solana, Aptos, Sui).

pub fn derivation_path(chain: Chain, account: u32, index: u32) -> String;

Source line: 37.

address::AddressDeriver::derive_address

Derive a wallet address from raw public key bytes for a given chain.

Each chain uses its own address encoding:

  • Ethereum/EVM: 0x + hex of last 20 bytes of Keccak-256 hash
  • Solana: base58-encoded public key
  • Bitcoin: BIP-173 bech32 P2WPKH over HASH160(public key)
  • Cosmos: bech32 over HASH160(public key)
  • Osmosis: bech32 over HASH160(public key)
  • Aptos/Sui: 0x + hex of SHA-256 of public key
  • StarkNet: 0x0 + hex prefix
pub fn derive_address(
        chain: Chain,
        public_key_bytes: &[u8],
    ) -> Result<WalletAddress, WalletError>;

Source line: 80.

address::AddressDeriver::derive_all

Derive addresses for multiple chains from the same public key.

pub fn derive_all(
        public_key_bytes: &[u8],
        chains: &[Chain],
    ) -> Result<Vec<WalletAddress>, WalletError>;

Source line: 104.

address::hex::encode

pub fn encode(bytes: &[u8]) -> String;

Source line: 283.

On this page