SDKs
OpenInfra exposes standard Solana JSON-RPC and gRPC interfaces. Use the endpoint and authentication form required by each client.
Compatible libraries
| Language | Package | Use |
|---|---|---|
| TypeScript / JavaScript | @solana/web3.js | JSON-RPC and WebSockets |
| TypeScript / JavaScript | @triton-one/yellowstone-grpc | Yellowstone gRPC |
| JavaScript / TypeScript | @grpc/grpc-js + @grpc/proto-loader | Datastream and Eventstream |
| Python | solana | JSON-RPC |
| Python | grpcio + generated protobuf modules | gRPC streams |
| Go | github.com/gagliardetto/solana-go | JSON-RPC and transaction building |
| Rust | solana-client | JSON-RPC and WebSockets |
TypeScript setup
npm install @solana/web3.js @triton-one/yellowstone-grpcimport { Connection } from "@solana/web3.js";import Client, { CommitmentLevel } from "@triton-one/yellowstone-grpc"; const apiKey = process.env.OPENINFRA_API_KEY!; const rpc = new Connection("https://rpc.sol.openinfra.sh", { commitment: "confirmed", httpHeaders: { "x-api-key": apiKey },}); const geyser = new Client("https://geyser.sol.openinfra.sh:443", apiKey, { "grpc.max_receive_message_length": 64 * 1024 * 1024,});await geyser.connect(); const stream = await geyser.subscribe({ slots: { confirmed: { filterByCommitment: true } }, commitment: CommitmentLevel.CONFIRMED, accounts: {}, transactions: {}, transactionsStatus: {}, blocks: {}, blocksMeta: {}, entry: {}, accountsDataSlice: [],}); stream.on("data", console.log);The current Yellowstone SDK expects the https://scheme and authenticates using its constructor's second argument.