Initializing the Yellowstone Client

Getting started with Solana gRPCs - initializing the Solana Yellowstone gRPC client

The Yellowstone client is used to connect to gRPC on Solana, sending subscribe requests and receive data from stream. The gRPC streams and RPC calls are supported through Solana's Geyser interface. To initialize a new Yellowstone client in typescript, you need to install the following package.

npm i @triton-one/yellowstone-grpc

Once done, we need two parameters to initialize the client, the gRPC endpoint, and the x-token, both of which is available in the Shyft dashboard once you unlock gRPC. You can find out more about endpoint and access token here.

import Client from "@triton-one/yellowstone-grpc";

const client = new Client(
  "https://grpc.ams.shyft.to", //your region specific grpc endpoint
  "YOUR-ACCESS-XTOKEN", // xtoken, which is used to authenticate
  undefined,
);

Last updated

Was this helpful?