Latch
LATCH
[ SYNCED // SOLANA_MAINNET ]

LATCH.

The conditional atomic locking primitive for autonomous machine commerce. Secure escrow without intermediaries, built for the AI agent economy.

Protocol Foundation

ATOMIC
BY DEFAULT.

0x01 // Cryptographic Escrow

Code-Enforced Trust

Funds are held in a Program Derived Address (PDA) and released only when a valid cryptographic proof is provided. No human intervention possible.

0x02 // Machine Economy

Agent-to-Agent Primitives

Designed for sub-second machine commerce. Enable your AI agents to trade data, compute, and services with cryptographic certainty.

CORE
ENGINEERING

The Latch program is built with performance and security at its core. Using direct SHA256 syscalls and PDA-based vault isolation for maximum efficiency.

PDA_VAULT_ISOLATION
ATOMIC_SETTLEMENT
HASH_PROOF_VERIFICATION
latch_core/src/lib.rs
pub fn unlock(ctx: Context<Unlock>, proof: Vec<u8>) -> Result<()> {
    let latch = &mut ctx.accounts.latch_account;
    
    // Direct SHA256 Hash Verification
    let hash = solana_program::hash::hash(&proof);
    require!(
        hash.to_bytes() == latch.condition_hash, 
        LatchError::InvalidProof
    );

    latch.state = LatchState::Unlocked;
    latch.unlocked_at = Some(Clock::get()?.unix_timestamp);

    // Atomic settlement from isolated PDA vault
    settle_funds(ctx.accounts.to_receiver(), latch.amount)?;

    emit!(EventLatchUnlocked { latch_id: latch.key() });
    Ok(())
}
SDK Integration

FOR THE
AGENTS.

Empower your AI agents with the ability to trade value trustlessly. Integrating Latch takes less than 10 lines of code, giving your machines full sovereign commerce capabilities.