import { CallOptions } from '@grpc/grpc-js'; import { gateway } from '@hyperledger/fabric-protos'; import { ChaincodeEvent } from './chaincodeevent'; import { CloseableAsyncIterable, GatewayClient } from './client'; import { Signable } from './signable'; import { SigningIdentity } from './signingidentity'; /** * Delivers events emitted by transaction functions in a specific chaincode. */ export interface ChaincodeEventsRequest extends Signable { /** * Get chaincode events emitted by transaction functions of a specific chaincode. * @param options - gRPC [CallOptions](https://grpc.github.io/grpc/node/grpc.Client.html#~CallOptions). * @returns Chaincode events. The iterator should be closed after use to complete the eventing session. * @throws {@link GatewayError} * Thrown by the iterator if the gRPC service invocation fails. * @example * ```typescript * const events = await request.getEvents(); * try { * for await (const event of events) { * // Process event * } * } finally { * events.close(); * } * ``` */ getEvents(options?: CallOptions): Promise>; } export interface ChaincodeEventsRequestOptions { client: GatewayClient; signingIdentity: SigningIdentity; signedRequest: gateway.SignedChaincodeEventsRequest; } export declare class ChaincodeEventsRequestImpl implements ChaincodeEventsRequest { #private; constructor(options: Readonly); getEvents(options?: Readonly): Promise>; getBytes(): Uint8Array; getDigest(): Uint8Array; setSignature(signature: Uint8Array): void; } //# sourceMappingURL=chaincodeeventsrequest.d.ts.map