altius-tx-sdk 0.1.0

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.
//! It can be used by:
//! - `explorer-api` for faucet functionality
//! - Any client that needs to send transactions to Altius
//!
//! # Security Note
//!
//! This SDK does NOT contain any private keys or addresses. All chain-specific
//! configuration (fee token address, faucet keys, etc.) must be provided by
//! the application layer through environment variables or configuration files.
//!
//! # Example
//!
//! ```rust,ignore
//! use altius_tx_sdk::{TxBuilder, Signer, BASE_FEE_ATTO, Address};
//!
//! // Create a signer
//! let signer = Signer::from_private_key("0x...")?;
//!
//! // Build an ERC20 transfer transaction
//! let tx = TxBuilder::new()
//!     .chain_id(1337)
//!     .nonce(0)
//!     .erc20_transfer(token, recipient, amount)
//!     .fee_token(fee_token)
//!     .max_fee_per_gas_usd(BASE_FEE_ATTO * 2)
//!     .build();
//!
//! // Sign and encode
//! let raw_tx = signer.sign_and_encode(tx).await?;
//! ```

mod error;
mod signer;
mod transaction;
mod constants;

pub use error::{Error, Result};
pub use signer::{Signer, Wallet};
pub use transaction::{TxBuilder, TxUsdMultiToken, fee_payer_signature_hash};
pub use constants::{
    BASE_FEE_ATTO, DEFAULT_GAS_LIMIT,
    USDA_ADDRESS, FEE_TOKEN_FACTORY_ADDRESS, FEE_MANAGER_ADDRESS, ALT_FEE_TOKEN_ADDRESS,
};

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