{"modulePath":"github.com/eric-erki/https-hyperledger.org","version":"v1.1.1","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package escc\n\n## Types\n\n```go\ntype EndorserOneValidSignature struct {\n}\n```\nEndorserOneValidSignature implements the default endorsement policy, which is to sign the proposal hash and the read-write set\n\n```go\nfunc (e *EndorserOneValidSignature) Init(stub shim.ChaincodeStubInterface) pb.Response\n```\nInit is called once when the chaincode started the first time\n\n```go\nfunc (e *EndorserOneValidSignature) Invoke(stub shim.ChaincodeStubInterface) pb.Response\n```\nInvoke is called to endorse the specified Proposal For now, we sign the input and return the endorsed result. Later we can expand the chaincode to provide more sophisticate policy processing such as enabling policy specification to be coded as a transaction of the chaincode and Client could select which policy to use for endorsement using parameter @return a marshalled proposal response Note that Peer calls this function with 4 mandatory arguments (and 2 optional ones): args\\[0] - function name (not used now) args\\[1] - serialized Header object args\\[2] - serialized ChaincodeProposalPayload object args\\[3] - ChaincodeID of executing chaincode args\\[4] - result of executing chaincode args\\[5] - binary blob of simulation results args\\[6] - serialized events args\\[7] - payloadVisibility\n\nNOTE: this chaincode is meant to sign another chaincode's simulation results. It should not manipulate state as any state change will be silently discarded: the only state changes that will be persisted if this endorsement is successful is what we are about to sign, which by definition can't be a state change of our own.\n\n","path":"github.com/eric-erki/https-hyperledger.org/core/scc/escc","name":"escc","synopsis":"","isRedistributable":true}
