Receive Deshreds with Solana Stream SDK
Use Solana Stream SDK for Rust to receive signed transactions involving an account you watch without waiting for replay on the receiving node to finish. The example prints the first signature and slot, then exits. After compilation, the program's 30-second timeout covers connection, subscription setup and receipt of the transaction.
Prepare your source IP and endpoint
Register your application's source IP for Geyser gRPC in the ERPC Dashboard and check the assigned endpoint. Geyser connection setup
Transaction delivery through Deshreds is verified on endpoints in Singapore, Tokyo, Amsterdam, London, New York and Frankfurt. If the Dashboard assigns an endpoint in another region, check that it supports Deshreds before using it.
The example connects to
https://grpc-sgp6-1.erpc.global:443. The machine running it must have permission to connect to the relevant Geyser endpoint from its source IP.Install Rust 1.98.1 or later, Cargo, a C/C++ toolchain and Make. The initial run also builds native dependencies. The example uses the published
solana-stream-sdk = 5.2.1 crate.Download the example
Download and extract the example, including its dependency lockfile. Run Cargo with
--locked to use the dependencies recorded in Cargo.lock.bash
The
src/main.rs file connects through the SDK's GeyserGrpcClient and passes an account filter to subscribe_deshred_with_request. It keeps the request stream alive and responds to server Pings while waiting for a transaction. After printing the first signature and slot, returning from the function closes the stream and connection.The sample filters for the PumpSwap program by default.
account_include selects transactions referencing any address in the list, including addresses resolved from address lookup tables.Print a signature and slot
Replace the value of
GEYSER_ENDPOINT below with your assigned endpoint.bash
The output is one line containing a base58 signature after
signature= and the numerical slot after slot=. To select your own account, set GEYSER_ACCOUNT_INCLUDE to its public address. A quiet account may have no matching transaction during the 30-second window.bash
GEYSER_X_TOKEN is an optional setting for Yellowstone endpoints that require token authentication. This ERPC connection procedure uses the source IP registered in the Dashboard.Receive a transaction with Node.js on Linux
For Linux x86_64 with glibc, Node.js 24 and pnpm 10.9.0, a second example uses
GeyserClient from the published TypeScript SDK @validators-dao/solana-stream-sdk = 4.0.0. Its ZIP includes the TypeScript source and a CommonJS build ready to run.bash
This example also connects over TLS to
https://grpc-sgp6-1.erpc.global:443. By default, it selects transactions involving the PumpSwap program, prints one signature and slot, then exits. Set GEYSER_ENDPOINT and GEYSER_ACCOUNT_INCLUDE to change the endpoint and filter. The 30-second deadline covers connection, subscription setup and receipt of the first transaction; connection or subscription errors may occur earlier.Use Linux x86_64 with glibc for this example. The published SDK 4.0.0 failed to load its native module on macOS arm64; use the Rust example above on macOS. The Rust and TypeScript packages have separate version numbers.
Join the observation to its execution result
A Deshred transaction contains its signature, slot, instructions and referenced accounts. Use the metadata from an ordinary Geyser
transactions subscription for execution success or failure, logs, inner instructions, balance changes and compute usage. Ordinary transaction subscription examplesCorrelate observations by signature and retain their slot and arrival time. Handle either arrival order and do not overwrite observations from different slots or forks. Continue processing transactions received only on ordinary Geyser. Set a retention deadline for unmatched Deshreds observations and check a separate history source after expiry; an unmatched observation alone does not establish failure or absence.
Correlate ordinary Geyser execution results and commitment updates from the same source by
slot and bank_id, retaining them separately per bank. Deshreds transaction updates do not contain bank_id. A bank_id identifies a bank within one node process. Do not equate IDs from different nodes or across a restart. For recording or completion notifications that depend on success, use the verified execution result and the required commitment of that bank. To reconcile failed transactions as well, omit failed from the ordinary transaction filter; failed: false excludes failed transactions.Handle long-running connections
This introductory example stops after one transaction. A production receiver should monitor connection state and last-message time. On disconnection, check the error and the provider's retry conditions. If retrying is permitted, reconnect with increasing backoff and submit the filter again. The
SubscribeDeshred request has no from_slot field, so use a separate history source to reconcile executed transactions during a gap. Running a client in productionIf you receive no transaction, check the Dashboard's registered IP against the actual source address, availability on your assigned endpoint, the TLS hostname and port, and activity matching your filter. Record the gRPC status and UTC time to distinguish connection errors from an idle subscription.






