Yellowstone gRPC
A persistent authenticated gRPC stream for Solana accounts, transactions, slots, blocks, block metadata, and entries.
Connection
The current TypeScript client requires https://geyser.sol.openinfra.sh:443. It sends the constructor's second argument as x-token metadata. Raw gRPC tools use geyser.sol.openinfra.sh:443.
Quick start
import Client, { CommitmentLevel } from "@triton-one/yellowstone-grpc"; const client = new Client( "https://geyser.sol.openinfra.sh:443", process.env.OPENINFRA_API_KEY!, { "grpc.max_receive_message_length": 64 * 1024 * 1024 },); await client.connect(); const stream = await client.subscribe({ slots: { confirmed: { filterByCommitment: true } }, commitment: CommitmentLevel.CONFIRMED, accounts: {}, transactions: {}, transactionsStatus: {}, blocks: {}, blocksMeta: {}, entry: {}, accountsDataSlice: [],}); stream.on("data", (update) => { if (update.slot) console.log("slot:", update.slot.slot);});stream.on("error", console.error);Why Yellowstone
- Server-side filters reduce the updates sent to your consumer.
- One persistent HTTP/2 connection carries a continuous update stream.
- Commitment can be selected per subscription request.
- The protobuf payload preserves Solana transaction and account structures.
Proto definition (abridged)
// Subscribe request (abridged from the current Yellowstone proto)message SubscribeRequest { map<string, SubscribeRequestFilterAccounts> accounts = 1; map<string, SubscribeRequestFilterSlots> slots = 2; map<string, SubscribeRequestFilterTransactions> transactions = 3; map<string, SubscribeRequestFilterBlocks> blocks = 4; map<string, SubscribeRequestFilterBlocksMeta> blocks_meta = 5; optional CommitmentLevel commitment = 6;}Use the proto bundled with your installed Yellowstone client version when generating bindings.