altius-tx-sdk 0.2.5

SDK for signing and sending Altius USD multi-token transactions
Documentation
//! Altius Transaction SDK
//!
//! This crate provides utilities for signing and encoding Altius USD multi-token transactions.
//! This SDK mirrors the JavaScript @altiuslabs/tx-sdk package.
//!
//! # Security Note
//!
//! This SDK does NOT contain any private keys or addresses. All chain-specific
//! configuration must be provided by the application layer.

mod error;
mod signer;
mod constants;
mod utils;
mod transaction;
mod rpc;
mod nonce;
mod client;

pub use error::{Error, Result};
pub use signer::{EcdsaSigner, Signer, Wallet, generate_private_key, private_key_to_address};
pub use constants::{
    BASE_FEE_ATTO,
    DEFAULT_GAS_LIMIT,
    DEFAULT_MAX_FEE_PER_GAS,
    USDA_ADDRESS,
    FEE_TOKEN_FACTORY_ADDRESS,
    FEE_MANAGER_ADDRESS,
    ZERO_ADDRESS,
    DEFAULT_FAUCET_AMOUNT,
    DEFAULT_FAUCET_AMOUNT_MICRO,
    FAUCET_AMOUNT_MICRO,
    FAUCET_AMOUNT_WEI,
    TRANSFER_AMOUNT_MICRO,
    TRANSFER_AMOUNT_WEI,
    RESERVED_THRESHOLD,
    FAUCET_FEE_TOKEN,
    FAUCET_ADDRESS,
    TOKEN_DECIMALS,
};

pub use utils::{
    compute_fee_token_address,
    is_reserved_address,
    compute_keccak256,
    pad_hex,
    num_to_hex,
    is_fee_token_prefix,
    is_valid_fee_token_address,
    is_index_reserved,
};

pub use transaction::{
    TxBuilder,
    TxFields,
    SignedTx,
    Signature,
    Signer as SignerTrait,
    create_transaction,
    fee_payer_signature_hash,
    TX_TYPE_USD_MULTI_TOKEN,
    FEE_PAYER_SIGNATURE_MAGIC_BYTE,
};

pub use rpc::{
    RpcClient,
    create_rpc_client,
};

pub use nonce::{
    NonceManager,
    create_nonce_manager,
};

pub use client::{
    TxClient,
    TxClientBuilder,
    create_tx_client,
};

// Re-export useful types
pub use alloy_primitives::{Address, Bytes, U256, B256};