I am trying to restrict invoke access for members dynamically in chaincode level and had found this method in a tutorial "stub.GetCallerCertificate" but getting an error.
Error:stub.GetCallerCertificate undefined (type shim.ChaincodeStubInterface has no field or method GetCallerCertificate)
Could you please tell what mistake I made in the code and if possible please provide some working example for restricting access to members in chaincode level (only for invoking transactions, Just like checking for msg.sender in solidity)?
Chaincode language : Go
Code:
xx, err1 := stub.GetCallerCertificate()
if err1 != nil {
matchLogger.Info(err1)
}
matchLogger.Info("Cert ----")
matchLogger.Info(string(xx))