Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/_jsdoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"../libraries/fabric-shim/lib/chaincode.js",
"../libraries/fabric-shim/lib/stub.js",
"../libraries/fabric-shim/lib/iterators.js",
"../libraries/fabric-shim/lib/utils/statebased.js",
"../apis/fabric-contract-api/lib"
]
},
Expand Down
4 changes: 3 additions & 1 deletion libraries/fabric-shim/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@
# SPDX-License-Identifier: Apache-2.0
*/

module.exports = require('./lib/chaincode.js');
const shim = require('./lib/chaincode.js');
module.exports = shim;
module.exports.KeyEndorsementPolicy = shim.KeyEndorsementPolicy;
Comment thread
JhaSourav07 marked this conversation as resolved.
Outdated
7 changes: 4 additions & 3 deletions libraries/fabric-shim/lib/utils/statebased.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ const ROLE_TYPE_PEER = 'PEER';
* of the MSP identifiers of organizations.
* For more informations, please read the [documents]{@link https://hyperledger-fabric.readthedocs.io/en/latest/endorsement-policies.html#setting-key-level-endorsement-policies}
*
* @class
* @class KeyEndorsementPolicy
Comment thread
JhaSourav07 marked this conversation as resolved.
Outdated
* @memberof fabric-shim
*/
class KeyEndorsementPolicy {
/**
Expand All @@ -35,7 +36,7 @@ class KeyEndorsementPolicy {

/**
* returns the endorsement policy as bytes
* @returns {Buffer} the endorsement policy
* @returns {Uint8Array} the serialized signature policy envelope
*/
getPolicy() {
const spe = this._getPolicyFromMspId();
Expand All @@ -45,7 +46,7 @@ class KeyEndorsementPolicy {
/**
* adds the specified orgs to the list of orgs that are required
* to endorse
* @param {string} role the role of the new org(s). i.e., MEMBER or PEER
* @param {string} role the role of the new org(s). i.e., 'MEMBER' or 'PEER'
* @param {...string} neworgs the new org(s) to be added to the endorsement policy
*/
addOrgs(role, ...neworgs) {
Expand Down
Loading