SolaceA Ruby SDK for Solana
Build, sign, and send Solana transactions from idiomatic Ruby — low-level instruction builders, high-level composers, and program clients, with a native Ed25519/Curve25519 extension.
Build, sign, and send Solana transactions from idiomatic Ruby — low-level instruction builders, high-level composers, and program clients, with a native Ed25519/Curve25519 extension.
Solace is a Ruby SDK for the Solana blockchain. It follows Ruby conventions while staying faithful to Solana's binary protocols, and it gives you the whole stack — from hand-assembling a message byte by byte, to one-call program clients that derive accounts, sign, and submit for you.
require 'solace'
connection = Solace::Connection.new('https://api.mainnet-beta.solana.com')
keypair = Solace::Keypair.generate
connection.get_balance(keypair.address) # => 0Solace is organized as four layers. Higher layers are more convenient; lower layers give you more control. Every operation is reachable at more than one level — see Conventions.
| Layer | What it is | Reach for it when |
|---|---|---|
| Program clients | Solace::Programs::* — send-and-sign clients that derive accounts, build, sign, and submit (e.g. SplToken#create_mint). | You want one call that does everything. |
| Composers | Solace::Composers::* — each contributes one instruction to a transaction, managing its own accounts. Assembled by TransactionComposer. | You're batching several instructions, or want control over the fee payer and signing. |
| Instruction builders | Solace::Instructions::* — stateless .build methods that encode a single raw instruction from account indices. | You need byte-level control and are assembling the message yourself. |
| Core primitives | Keypair, PublicKey, Connection, Transaction, Message, Instruction, AccountContext. | The foundation everything else is built on. |
Solace is designed to be extended. The Squads Smart Accounts gem adds the Squads Smart Account program by following the same instruction-builder → composer → program-client pattern documented here. The Building Transactions section is the blueprint for writing your own program support.
# Gemfile
gem 'solace'bundle installNative binaries for the Curve25519 operations ship with the gem for Linux, macOS, and Windows (x86_64 and ARM64) — there is nothing to compile.