JetstreamApi

Implementation of the Jetstream v2 streaming and archive APIs.

Constructors

Link copied to clipboard
constructor(httpClient: HttpClient)
constructor(hostName: String)

Construct a new instance using a free-form hostName.

constructor(host: JetstreamHost)

Construct a new instance using a defined host.

constructor()

Construct a new instance using the US_EAST region.

Functions

Link copied to clipboard
open suspend override fun getBlock(params: GetBlockQueryParams): ByteArray

Download one zstd-compressed block from a sealed archive segment.

Link copied to clipboard
open suspend override fun getSegment(params: GetSegmentQueryParams): ByteArray

Download a complete sealed archive segment.

Link copied to clipboard
open suspend override fun listSegments(params: ListSegmentsQueryParams): ListSegmentsResponse

List sealed archive segments.

Link copied to clipboard
open suspend override fun planSnapshot(request: PlanSnapshotRequest): PlanSnapshotResponse

Plan a point-in-time archive snapshot.

Link copied to clipboard
open suspend override fun subscribe(params: SubscribeQueryParams): Flow<SubscribeMessage>

Subscribe to a Jetstream firehose.

open suspend override fun subscribe(params: SubscribeQueryParams, block: suspend SubscriptionContext.() -> Unit)

Subscribe to a Jetstream firehose with the given params.