universalsettle-api 0.1.7

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

// Test initializer (mac::id.json)
// pub const INITIALIZER_ADDRESS: Pubkey = pubkey!("Ac2ev4ofDx61tuSJCgq9ToSBfVwHD2a1FVJf6p7TAqiB");
// Test initializer (mac&hp::test-id.json)
pub const INITIALIZER_ADDRESS: Pubkey = pubkey!("4ALL9EAVHpv7ioJF95ktDLtrHUEJezPuFxTFFMy3fpSy");

// The authority allowed to initialize the program.
// pub const INITIALIZER_ADDRESS: Pubkey = pubkey!("staryJacbXodPh4WfwVtgA5jkJhvsMHERtkdttnLEHc");

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`.
// Delay before a proposed authority transfer can be accepted (in seconds).
// Production value: 2 days (48 hours = 2 * 24 * 60 * 60)
// pub const AUTHORITY_TRANSFER_DELAY_SECONDS: i64 = 172_800;

/// Temporary delay for Devnet Testing (3 minutes = 180 seconds)
pub const AUTHORITY_TRANSFER_DELAY_SECONDS: i64 = 180;

/// 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);