Skip to content

Commit

Permalink
[FAB-5403] JSDoc, Remove txId from queryByChaincode
Browse files Browse the repository at this point in the history
Add a definition for the ChaincodeQueryRequest.

Change the queryByChaincode request parameter from ChaincodeInvokeRequest
to ChaincodeQueryRequest

Change-Id: I0942890af0bbd759620e4f71ea33a846ab3c76e0
Signed-off-by: Eric Vaughn <[email protected]>
  • Loading branch information
ericmvaughn committed Jul 23, 2017
1 parent 34dd649 commit 7a7db13
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions fabric-client/lib/Channel.js
Original file line number Diff line number Diff line change
Expand Up @@ -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. <string, byte[]> 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 <code>stub.GetFunctionAndParameters()</code>
* 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
Expand All @@ -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
Expand Down

0 comments on commit 7a7db13

Please sign in to comment.