Skip to main content
Each example subscribes with SubscribeDeshred, answers keepalive pings, reconnects with backoff, and exits with the server’s error code when a stream is refused for a reason retrying will not fix.
  • Without an argument, it receives every transaction and prints one line per slot with the transaction count.
  • With a program id, it asks the server for only the transactions that use that program and prints each one with its signer, version, lookup-table count, number of addresses loaded from lookup tables, and each instruction’s program, account count and data size.
All three read SODAE_TOKEN and, optionally, SODAE_PREPLAY_URL.

Run

Output

Core of each client

Over TLS

Only the connection changes. The examples switch to TLS when the URL starts with https://.
In your own Rust project, enable tonic’s tls-ring feature next to tls-native-roots. The complete programs: