new EndorsementHandler()
Methods
-
<static> create()
-
This static method will be called by the channel to create an instance of this handler. It will be passed the channel object this handler is working with.
-
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. 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.