Get block and private data events.
Optionaloptions: EventsOptions
Event listening options.
Blocks 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.
Get block events.
Optionaloptions: EventsOptions
Event listening options.
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.
Get chaincode events emitted by transaction functions of a specific chaincode.
A chaincode name.
Optionaloptions: EventsOptions
Event listening options.
The iterator should be closed after use to complete the eventing session.
GatewayError Thrown by the iterator if the gRPC service invocation fails.
Get a smart contract within the named chaincode. If no contract name is supplied, this is the default smart contract for the named chaincode.
Chaincode name.
OptionalcontractName: string
Smart contract name.
Get filtered block events.
Optionaloptions: EventsOptions
Event listening options.
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.
Get the name of the Fabric channel this network represents.
Create a request to receive block and private data events. Supports off-line signing flow.
Optionaloptions: EventsOptions
Event listening options.
Create a request to receive block events. Supports off-line signing flow.
Optionaloptions: EventsOptions
Event listening options.
Create a request to receive chaincode events emitted by transaction functions of a specific chaincode. Supports off-line signing flow.
Chaincode name.
Optionaloptions: EventsOptions
Event listening options.
Create a request to receive filtered block events. Supports off-line signing flow.
Optionaloptions: EventsOptions
Event listening options.
Network represents a network of nodes that are members of a specific Fabric channel. The Network can be used to access deployed smart contracts, and to listen for events emitted when blocks are committed to the ledger. Network instances are obtained from a Gateway using the Gateway.getNetwork method.
To safely handle connection errors during eventing, it is recommended to use a checkpointer to track eventing progress. This allows eventing to be resumed with no loss or duplication of events.
Example: Chaincode events
Example: Block events