Package org.hyperledger.fabric.shim
Interface Chaincode
-
- All Known Implementing Classes:
ChaincodeBase
public interface Chaincode
Defines methods that all chaincodes must implement.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Chaincode.Response
Wrapper around protobuf Response, contains status, message and payload.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Chaincode.Response
init(ChaincodeStub stub)
Called during an instantiate transaction after the container has been established, allowing the chaincode to initialize its internal data.Chaincode.Response
invoke(ChaincodeStub stub)
Called for every Invoke transaction.
-
-
-
Method Detail
-
init
Chaincode.Response init(ChaincodeStub stub)
Called during an instantiate transaction after the container has been established, allowing the chaincode to initialize its internal data.- Parameters:
stub
- the chaincode stub- Returns:
- the chaincode response
-
invoke
Chaincode.Response invoke(ChaincodeStub stub)
Called for every Invoke transaction. The chaincode may change its state variables.- Parameters:
stub
- the chaincode stub- Returns:
- the chaincode response
-
-