From 7a7db133410dfc3465b880b91409fab2ebc4c4f5 Mon Sep 17 00:00:00 2001 From: Eric Vaughn Date: Sun, 23 Jul 2017 16:31:22 -0400 Subject: [PATCH] [FAB-5403] JSDoc, Remove txId from queryByChaincode Add a definition for the ChaincodeQueryRequest. Change the queryByChaincode request parameter from ChaincodeInvokeRequest to ChaincodeQueryRequest Change-Id: I0942890af0bbd759620e4f71ea33a846ab3c76e0 Signed-off-by: Eric Vaughn --- fabric-client/lib/Channel.js | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/fabric-client/lib/Channel.js b/fabric-client/lib/Channel.js index 66a306e7fe..5a748f0b10 100755 --- a/fabric-client/lib/Channel.js +++ b/fabric-client/lib/Channel.js @@ -1494,6 +1494,18 @@ var Channel = class { return orderer.sendBroadcast(envelope); } + /** + * @typedef {Object} ChaincodeQueryRequest + * @property {Peer[]} targets - Optional. The peers that will receive this request, + * when not provided the list of peers added to this channel object will be used. + * @property {string} chaincodeId - Required. The id of the chaincode to process the transaction proposal + * @property {map} transientMap - Optional. map that can be used by the chaincode but not + * saved in the ledger, such as cryptographic information for encryption + * @property {string} fcn - Optional. The function name to be returned when calling stub.GetFunctionAndParameters() + * in the target chaincode. Default is 'invoke' + * @property {string[]} args - An array of string arguments specific to the chaincode's 'Invoke' method + */ + /** * Sends a proposal to one or more endorsing peers that will be handled by the chaincode. * In fabric v1.0, there is no difference in how the endorsing peers process a request @@ -1503,8 +1515,7 @@ var Channel = class { * results in the byte array format and the caller will have to be able to decode * these results. * - * @param {ChaincodeInvokeRequest} request - Query requests use the same request objects as for - * transaction invocation requests + * @param {ChaincodeQueryRequest} request * @returns {Promise} A Promise for an array of byte array results returned from the chaincode * on all Endorsing Peers * @example