Interface BlockAndPrivateDataEventsRequest

Delivers block and private data events.

interface BlockAndPrivateDataEventsRequest {
    getBytes(): Uint8Array;
    getDigest(): Uint8Array;
    getEvents(options?: CallOptions): Promise<CloseableAsyncIterable<BlockAndPrivateData>>;
}

Hierarchy (view full)

  • Signable
    • BlockAndPrivateDataEventsRequest

Methods

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

    Returns Uint8Array

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

    Returns Uint8Array

  • Get block and private data events.

    Parameters

    Returns Promise<CloseableAsyncIterable<BlockAndPrivateData>>

    Block and private data 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 events = await network.getBlockAndPrivateEventsData();
    try {
    for await (const event of events) {
    // Process block and private data event
    }
    } finally {
    events.close();
    }