Interface FilteredBlockEventsRequest

Delivers filtered block events.

interface FilteredBlockEventsRequest {
    getBytes(): Uint8Array<ArrayBufferLike>;
    getDigest(): Uint8Array<ArrayBufferLike>;
    getEvents(
        options?: CallOptions,
    ): Promise<CloseableAsyncIterable<FilteredBlock>>;
}

Hierarchy (View Summary)

Methods

  • Get the serialized bytes of the signable object. Serialized bytes can be used to recreate the object using methods on Gateway.

    Returns Uint8Array<ArrayBufferLike>

  • Get the digest of the signable object. This is used to generate a digital signature.

    Returns Uint8Array<ArrayBufferLike>

  • Get filtered block events.

    Parameters

    Returns Promise<CloseableAsyncIterable<FilteredBlock>>

    Filtered block protocol buffer messages. The iterator should be closed after use to complete the eventing session.

    GatewayError Thrown by the iterator if the gRPC service invocation fails.

    const blocks = await request.getEvents();
    try {
    for async (const block of blocks) {
    // Process block
    }
    } finally {
    blocks.close();
    }