Enhanced Streams Quickstart
Generate a client, list topics, and consume one Enhanced Stream.
1. Download the proto
curl -O https://nolimitnodes.com/protos/enhanced-streams.proto2. Generate Python code
python -m pip install grpcio grpcio-tools protobuf python -m grpc_tools.protoc \ -I . \ --python_out=. \ --grpc_python_out=. \ enhanced-streams.protoRename the generated module imports if your local generator replaces hyphens with underscores.
3. List topics
import grpcimport enhanced_streams_pb2 as pbimport enhanced_streams_pb2_grpc as rpc channel = grpc.secure_channel( "stream-1.nln.clr3.org:443", grpc.ssl_channel_credentials(),)client = rpc.StreamServiceStub(channel)metadata = [("x-api-key", "YOUR_API_KEY")] response = client.ListTopics(pb.ListTopicsRequest(), metadata=metadata)for topic in response.topics: print(topic.name, topic.proto_message_type)4. Subscribe
import json request = pb.SubscribeRequest( topic="prod.rpc.solana.system.transfers", format=pb.JSON,) for message in client.Subscribe(request, metadata=metadata): payload = json.loads(message.payload) print({ "partition": message.partition, "offset": message.offset, "timestamp_ms": message.timestamp_ms, "payload": payload, })5. Store progress
Write your event and its partition-offset pair in one database transaction.
After a disconnect, open a new stream. Enhanced Streams do not expose a client offset in SubscribeRequest, so downstream deduplication must use event identity and stored metadata.