universalsettle-api 0.2.1

X402-inspired settlement program for any token on Solana
Documentation
use const_crypto::ed25519;
use solana_program::{pubkey, pubkey::Pubkey};

// Account allowed to invoke Initialize (one-time; both clusters already initialized).
// Devnet: `4ALL9EAVHpv7ioJF95ktDLtrHUEJezPuFxTFFMy3fpSy` (same as sla-escrow).
pub const INITIALIZER_ADDRESS: Pubkey = pubkey!("CD6SkYqR8TRjSaPmmyRUc7J4PhoQdhS8E4r7KjWxxJFW");

pub const MAX_FEE_BASIS_POINTS: u16 = 300; // 3% max

/// SPL Token-2022 program id. Declared here (instead of pulling in
/// `spl-token-2022`) to avoid an extra on-chain dependency.
pub const TOKEN_2022_PROGRAM_ID: Pubkey = pubkey!("TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb");

/// The seed of the config account PDA.
pub const CONFIG: &[u8] = b"config";

/// The seed of the SOL storage PDA.
pub const SOL_STORAGE: &[u8] = b"sol_storage";

/// The seed of the SplitVault PDA.
pub const VAULT: &[u8] = b"vault";

/// Seed for the authority transfer proposal PDA.
pub const AUTHORITY_TRANSFER: &[u8] = b"authority_transfer";

/// Seed of the FeeShard account PDA.
pub const FEE_SHARD: &[u8] = b"fee_shard";

/// Seed of the SOL storage for a FeeShard.
pub const FEE_SHARD_SOL: &[u8] = b"fee_shard_sol";

// Mandatory delay between `UpdateAuthority` (propose) and `AcceptAuthority` (seconds).
// Compile-time constant — only changeable via program upgrade.
pub const AUTHORITY_TRANSFER_DELAY_SECONDS: i64 = 172_800;

/// Program id for const pda derivations
const PROGRAM_ID: [u8; 32] = unsafe { *(&crate::id() as *const Pubkey as *const [u8; 32]) };

/// The address of the config account.
pub const CONFIG_ADDRESS: Pubkey =
    Pubkey::new_from_array(ed25519::derive_program_address(&[CONFIG], &PROGRAM_ID).0);