Interface Chaincode

  • All Known Implementing Classes:
    ChaincodeBase

    public interface Chaincode
    Defines methods that all chaincodes must implement.
    • 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