universalsettle-api 0.2.1

X402-inspired settlement program for any token on Solana
Documentation
use steel::*;

use super::SettlementAccount;

/// Config is a singleton account which manages program global variables.
#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
pub struct Config {
    /// Facilitator authority
    pub authority: Pubkey, // 32

    /// Facilitator fee destination (wallet address to receive fees)
    pub fee_destination: Pubkey, // 32

    /// The timestamp of the last update.
    pub updated_at: i64, // 8

    /// Minimum absolute fee amount collected for SPL Tokens (e.g., 10,000 for $0.01 USDC)
    pub min_fee_amount: u64, // 8

    /// Minimum absolute fee amount collected for Native SOL (e.g., 200,000 for ~$0.016 worth of SOL)
    pub min_fee_amount_sol: u64, // 8

    /// The provisioning fee for new sellers in SOL (lamports)
    pub provisioning_fee_sol: u64, // 8

    /// The provisioning fee for new sellers in Tokens (raw units)
    pub provisioning_fee_spl: u64, // 8

    /// The facilitator fee rate (Standard)
    pub fee_bps: u16, // 2 in basis point

    /// The facilitator fee rate (Discounted - for proactive sellers)
    pub discounted_fee_bps: u16, // 2 in basis point

    /// Whether to use sharded fee collection (0 = No, 1 = Yes)
    pub use_fee_shard: u8,

    /// Number of shards to use for fee collection (if enabled)
    pub shard_count: u8,

    /// Padding for 8-byte alignment and future growth
    pub _padding: [u8; 2],
}

account!(SettlementAccount, Config);