new ChaincodeInterface()
Methods
-
<async> Init(stub)
-
Called during chaincode instantiate and upgrade. This method can be used to initialize asset states
Parameters:
Name Type Description stub
ChaincodeStub The chaincode stub is implemented by the fabric-shim
library and passed to the ChaincodeInterface calls by the Hyperledger Fabric platform. The stub encapsulates the APIs between the chaincode implementation and the Fabric peer -
<async> Invoke(stub)
-
called throughout the life time of the chaincode to carry out business transaction logic and effect the asset states
Parameters:
Name Type Description stub
ChaincodeStub The chaincode stub is implemented by the fabric-shim
library and passed to the ChaincodeInterface calls by the Hyperledger Fabric platform. The stub encapsulates the APIs between the chaincode implementation and the Fabric peer