Skip to content

Instantly share code, notes, and snippets.

@vitiko
Created July 23, 2019 07:45
Show Gist options
  • Save vitiko/ef1b4280f6d37ec67764527780a287d7 to your computer and use it in GitHub Desktop.
Save vitiko/ef1b4280f6d37ec67764527780a287d7 to your computer and use it in GitHub Desktop.
syntax = "proto3";
package service;
import "github.com/hyperledger/fabric/protos/peer/proposal_response.proto";
import "github.com/hyperledger/fabric/protos/peer/chaincode_event.proto";
message ChaincodeInput {
// Chaincode name
string chaincode = 1;
// Channel name
string channel = 2;
// Input contains the arguments for invocation.
repeated bytes args = 3;
// TransientMap contains data (e.g. cryptographic material) that might be used
// to implement some form of application-level confidentiality. The contents
// of this field are supposed to always be omitted from the transaction and
// excluded from the ledger.
map<string, bytes> transient = 4;
}
message ChaincodeLocator {
// Chaincode name
string chaincode = 1;
// Channel name
string channel = 2;
}
// Chaincode invocation service
service Chaincode {
// Query chaincode on home peer. Do NOT send to orderer.
rpc Query (ChaincodeInput) returns (protos.ProposalResponse);
// Invoke chaincode on peers, according to endorsement policy and the SEND to orderer
rpc Invoke (ChaincodeInput) returns (protos.ProposalResponse);
// Chaincode events stream
rpc Events (ChaincodeLocator) returns (stream protos.ChaincodeEvent);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment