Given an implemented chaincode stub invoke function:
func (lc *chaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response {
return shim.Success([]byte("{\"car\":\"audi\"}"))
}
}
How does one receive the shim.Success payload via NodeJS?
Upon reviewing the results after running transaction proposal:
channel.sendTransactionProposal(proposalRequest).then((results) => {
console.log(results); // very complex undocumented object
});
The documentation is lacking and the sample scenarios are a bit too complex, therefore I thought it would be useful to have a simple answer on SO