Class: DiscoveryEndorsementHandler

DiscoveryEndorsementHandler

This is an implementation of the EndorsementHandler API. It will submit transactions to be endorsed to a target list generated from the results of service discovery.

new DiscoveryEndorsementHandler(channel)

constructor
Parameters:
Name Type Description
channel Channel The channel for this handler.

Extends

Methods


<static> create(channel)

Factory method to create an instance of an endorsement handler.
Parameters:
Name Type Description
channel Channel the channel instance that this endorsement handler will be servicing.
Returns:
The instance of the handler
Type
DiscoveryEndorsementHandler

endorse(params)

This method will process the request object to calculate the target peers. Once the targets have been determined, the channel to send the endorsement transaction to all targets. The results will be analyzed to see if enough completed endorsements have been received.
Parameters:
Name Type Description
params EndorsementHandlerParameters A EndorsementHandlerParameters that contains enough information to determine the targets and contains a ChaincodeInvokeRequest to be sent using the included channel with the Channel 'sendTransactionProposal' method.
Inherited From:
Overrides:
Returns:
A Promise for the ProposalResponseObject, the same results as calling the Channel 'sendTransactionProposal' method directly.
Type
Promise

initialize()

This method will be called by the channel when the channel is initialzied.
Inherited From:
Overrides: