Skip to content

ZAR Trustless EscrowToken escrow on Solana, in Ruby

A Solace extension for the ZAR Trustless Escrow program — lock tokens for a claim authority, or hand a mediator the power to release funds to a beneficiary, all from idiomatic Ruby.

Relationship to Solace

This is an extension gem for solace, the Ruby toolkit for Solana. Solace provides the layered primitives; this gem adds the ZAR Trustless Escrow program (ZARxRie8kHmJ3V3GSRFS6CUDjCMm5pEoZyhEddq6FSu) to the middle two layers and ships a high-level client on top:

LayerProvided byThis gem adds
Primitives — Transaction, Message, Instruction, AccountContext, CodecsSolace— (reused as-is)
Instruction builderspattern from SolaceOne encoder per escrow instruction
ComposersSolace::Composers::BaseOne composer per instruction
Program clients — Solace::Programs::Basepattern from SolaceSolace::Programs::ZarTrustlessEscrow (PDA derivation, fetch, send-and-sign)

In short: you work in Ruby with Solace::Keypair, Solace::Connection, and the ZarTrustlessEscrow client; this gem handles the escrow-specific encoding, account derivation, and the deposit/claim/release lifecycles. See Conventions for how the layers fit together.

What's implemented

The gem covers all 7 program instructions, across two independent escrow shapes. Each links to its operation page.

Shared vault

Two-party escrow — a depositor locks funds for a claim authority

Three-party mediated escrow — a mediator decides the outcome

See Concepts › Escrow Types for when to reach for each, and Reference › Instruction Coverage for the full matrix.

Built on Solace