escrow-api 0.2.1

Signer-Payer Payment Escrow Program
Documentation
use super::EscrowAccount;
use steel::*;

#[repr(C)]
#[derive(Clone, Copy, Debug, PartialEq, Pod, Zeroable)]
pub struct Escrow {
    pub mint: Pubkey,            // 32 bytes - kept for developer experience
    pub escrow_tokens: Pubkey,   // 32 bytes - ATA for SPL tokens, SOL storage PDA for SOL
    pub open_at: i64,            // 8 bytes
    pub fee_balance: u64,        // 8 bytes
    pub token_liquidity: u64,    // 8 bytes
    pub min_payment_amount: u64, // 8 bytes
    pub max_payment_amount: u64, // 8 bytes
    pub fee_bps: u16,            // 2 bytes
    pub paused: u8,              // 1 byte
    // Removed: bank (32 bytes) - derivable from PDA seeds
    // Removed: token_account (32 bytes) - now stored as escrow_tokens
    // Removed: token_balance (8 bytes) - redundant with token_liquidity
    // Total: 32+32+8+8+8+8+8+2+1 = 107 bytes, need 5 bytes padding for 112-byte alignment
    pub _padding: [u8; 5], // 5 bytes padding
}

account!(EscrowAccount, Escrow);