diff --git a/app.js b/app.js new file mode 100644 index 0000000..83b1226 --- /dev/null +++ b/app.js @@ -0,0 +1,430 @@ +/** + * Copyright 2017 IBM All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +'use strict'; +var log4js = require('log4js'); +var logger = log4js.getLogger('SampleWebApp'); +var express = require('express'); +var session = require('express-session'); +var cookieParser = require('cookie-parser'); +var bodyParser = require('body-parser'); +var http = require('http'); +var util = require('util'); +var app = express(); +var expressJWT = require('express-jwt'); +var jwt = require('jsonwebtoken'); +var bearerToken = require('express-bearer-token'); +var cors = require('cors'); + +require('./config.js'); +var hfc = require('fabric-client'); + +var helper = require('./app/helper.js'); +var createChannel = require('./app/create-channel.js'); +var join = require('./app/join-channel.js'); +var updateAnchorPeers = require('./app/update-anchor-peers.js'); +var install = require('./app/install-chaincode.js'); +var instantiate = require('./app/instantiate-chaincode.js'); +var invoke = require('./app/invoke-transaction.js'); +var query = require('./app/query.js'); +var host = process.env.HOST || hfc.getConfigSetting('host'); +var port = process.env.PORT || hfc.getConfigSetting('port'); +/////////////////////////////////////////////////////////////////////////////// +//////////////////////////////// SET CONFIGURATONS //////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +app.options('*', cors()); +app.use(cors()); +//support parsing of application/json type post data +app.use(bodyParser.json()); +//support parsing of application/x-www-form-urlencoded post data +app.use(bodyParser.urlencoded({ + extended: false +})); +// set secret variable +app.set('secret', 'thisismysecret'); +app.use(expressJWT({ + secret: 'thisismysecret' +}).unless({ + path: ['/users'] +})); +app.use(bearerToken()); +app.use(function(req, res, next) { + logger.debug(' ------>>>>>> new request for %s',req.originalUrl); + if (req.originalUrl.indexOf('/users') >= 0) { + return next(); + } + + var token = req.token; + jwt.verify(token, app.get('secret'), function(err, decoded) { + if (err) { + res.send({ + success: false, + message: 'Failed to authenticate token. Make sure to include the ' + + 'token returned from /users call in the authorization header ' + + ' as a Bearer token' + }); + return; + } else { + // add the decoded user name and org name to the request object + // for the downstream code to use + req.username = decoded.username; + req.orgname = decoded.orgName; + logger.debug(util.format('Decoded from JWT token: username - %s, orgname - %s', decoded.username, decoded.orgName)); + return next(); + } + }); +}); + +/////////////////////////////////////////////////////////////////////////////// +//////////////////////////////// START SERVER ///////////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +var server = http.createServer(app).listen(port, function() {}); +logger.info('****************** SERVER STARTED ************************'); +logger.info('*************** http://%s:%s ******************',host,port); +server.timeout = 240000; + +function getErrorMessage(field) { + var response = { + success: false, + message: field + ' field is missing or Invalid in the request' + }; + return response; +} + +/////////////////////////////////////////////////////////////////////////////// +///////////////////////// REST ENDPOINTS START HERE /////////////////////////// +/////////////////////////////////////////////////////////////////////////////// +// Register and enroll user +app.post('/users', async function(req, res) { + var username = req.body.username; + var orgName = req.body.orgName; + logger.debug('End point : /users'); + logger.debug('User name : ' + username); + logger.debug('Org name : ' + orgName); + if (!username) { + res.json(getErrorMessage('\'username\'')); + return; + } + if (!orgName) { + res.json(getErrorMessage('\'orgName\'')); + return; + } + var token = jwt.sign({ + exp: Math.floor(Date.now() / 1000) + parseInt(hfc.getConfigSetting('jwt_expiretime')), + username: username, + orgName: orgName + }, app.get('secret')); + let response = await helper.getRegisteredUser(username, orgName, true); + logger.debug('-- returned from registering the username %s for organization %s',username,orgName); + if (response && typeof response !== 'string') { + logger.debug('Successfully registered the username %s for organization %s',username,orgName); + response.token = token; + res.json(response); + } else { + logger.debug('Failed to register the username %s for organization %s with::%s',username,orgName,response); + res.json({success: false, message: response}); + } + +}); +// Create Channel +app.post('/channels', async function(req, res) { + logger.info('<<<<<<<<<<<<<<<<< C R E A T E C H A N N E L >>>>>>>>>>>>>>>>>'); + logger.debug('End point : /channels'); + var channelName = req.body.channelName; + var channelConfigPath = req.body.channelConfigPath; + logger.debug('Channel name : ' + channelName); + logger.debug('channelConfigPath : ' + channelConfigPath); //../artifacts/channel/mychannel.tx + if (!channelName) { + res.json(getErrorMessage('\'channelName\'')); + return; + } + if (!channelConfigPath) { + res.json(getErrorMessage('\'channelConfigPath\'')); + return; + } + + let message = await createChannel.createChannel(channelName, channelConfigPath, req.username, req.orgname); + res.send(message); +}); +// Join Channel +app.post('/channels/:channelName/peers', async function(req, res) { + logger.info('<<<<<<<<<<<<<<<<< J O I N C H A N N E L >>>>>>>>>>>>>>>>>'); + var channelName = req.params.channelName; + var peers = req.body.peers; + logger.debug('channelName : ' + channelName); + logger.debug('peers : ' + peers); + logger.debug('username :' + req.username); + logger.debug('orgname:' + req.orgname); + + if (!channelName) { + res.json(getErrorMessage('\'channelName\'')); + return; + } + if (!peers || peers.length == 0) { + res.json(getErrorMessage('\'peers\'')); + return; + } + + let message = await join.joinChannel(channelName, peers, req.username, req.orgname); + res.send(message); +}); +// Update anchor peers +app.post('/channels/:channelName/anchorpeers', async function(req, res) { + logger.debug('==================== UPDATE ANCHOR PEERS =================='); + var channelName = req.params.channelName; + var configUpdatePath = req.body.configUpdatePath; + logger.debug('Channel name : ' + channelName); + logger.debug('configUpdatePath : ' + configUpdatePath); + if (!channelName) { + res.json(getErrorMessage('\'channelName\'')); + return; + } + if (!configUpdatePath) { + res.json(getErrorMessage('\'configUpdatePath\'')); + return; + } + + let message = await updateAnchorPeers.updateAnchorPeers(channelName, configUpdatePath, req.username, req.orgname); + res.send(message); +}); +// Install chaincode on target peers +app.post('/chaincodes', async function(req, res) { + logger.debug('==================== INSTALL CHAINCODE =================='); + var peers = req.body.peers; + var chaincodeName = req.body.chaincodeName; + var chaincodePath = req.body.chaincodePath; + var chaincodeVersion = req.body.chaincodeVersion; + var chaincodeType = req.body.chaincodeType; + logger.debug('peers : ' + peers); // target peers list + logger.debug('chaincodeName : ' + chaincodeName); + logger.debug('chaincodePath : ' + chaincodePath); + logger.debug('chaincodeVersion : ' + chaincodeVersion); + logger.debug('chaincodeType : ' + chaincodeType); + if (!peers || peers.length == 0) { + res.json(getErrorMessage('\'peers\'')); + return; + } + if (!chaincodeName) { + res.json(getErrorMessage('\'chaincodeName\'')); + return; + } + if (!chaincodePath) { + res.json(getErrorMessage('\'chaincodePath\'')); + return; + } + if (!chaincodeVersion) { + res.json(getErrorMessage('\'chaincodeVersion\'')); + return; + } + if (!chaincodeType) { + res.json(getErrorMessage('\'chaincodeType\'')); + return; + } + let message = await install.installChaincode(peers, chaincodeName, chaincodePath, chaincodeVersion, chaincodeType, req.username, req.orgname) + res.send(message);}); +// Instantiate chaincode on target peers +app.post('/channels/:channelName/chaincodes', async function(req, res) { + logger.debug('==================== INSTANTIATE CHAINCODE =================='); + var peers = req.body.peers; + var chaincodeName = req.body.chaincodeName; + var chaincodeVersion = req.body.chaincodeVersion; + var channelName = req.params.channelName; + var chaincodeType = req.body.chaincodeType; + var fcn = req.body.fcn; + var args = req.body.args; + logger.debug('peers : ' + peers); + logger.debug('channelName : ' + channelName); + logger.debug('chaincodeName : ' + chaincodeName); + logger.debug('chaincodeVersion : ' + chaincodeVersion); + logger.debug('chaincodeType : ' + chaincodeType); + logger.debug('fcn : ' + fcn); + logger.debug('args : ' + args); + if (!chaincodeName) { + res.json(getErrorMessage('\'chaincodeName\'')); + return; + } + if (!chaincodeVersion) { + res.json(getErrorMessage('\'chaincodeVersion\'')); + return; + } + if (!channelName) { + res.json(getErrorMessage('\'channelName\'')); + return; + } + if (!chaincodeType) { + res.json(getErrorMessage('\'chaincodeType\'')); + return; + } + if (!args) { + res.json(getErrorMessage('\'args\'')); + return; + } + + let message = await instantiate.instantiateChaincode(peers, channelName, chaincodeName, chaincodeVersion, chaincodeType, fcn, args, req.username, req.orgname); + res.send(message); +}); +// Invoke transaction on chaincode on target peers +app.post('/channels/:channelName/chaincodes/:chaincodeName', async function(req, res) { + logger.debug('==================== INVOKE ON CHAINCODE =================='); + var peers = req.body.peers; + var chaincodeName = req.params.chaincodeName; + var channelName = req.params.channelName; + var fcn = req.body.fcn; + var args = req.body.args; + logger.debug('channelName : ' + channelName); + logger.debug('chaincodeName : ' + chaincodeName); + logger.debug('fcn : ' + fcn); + logger.debug('args : ' + args); + if (!chaincodeName) { + res.json(getErrorMessage('\'chaincodeName\'')); + return; + } + if (!channelName) { + res.json(getErrorMessage('\'channelName\'')); + return; + } + if (!fcn) { + res.json(getErrorMessage('\'fcn\'')); + return; + } + if (!args) { + res.json(getErrorMessage('\'args\'')); + return; + } + + let message = await invoke.invokeChaincode(peers, channelName, chaincodeName, fcn, args, req.username, req.orgname); + res.send(message); +}); +// Query on chaincode on target peers +app.get('/channels/:channelName/chaincodes/:chaincodeName', async function(req, res) { + logger.debug('==================== QUERY BY CHAINCODE =================='); + var channelName = req.params.channelName; + var chaincodeName = req.params.chaincodeName; + let args = req.query.args; + let fcn = req.query.fcn; + let peer = req.query.peer; + + logger.debug('channelName : ' + channelName); + logger.debug('chaincodeName : ' + chaincodeName); + logger.debug('fcn : ' + fcn); + logger.debug('args : ' + args); + + if (!chaincodeName) { + res.json(getErrorMessage('\'chaincodeName\'')); + return; + } + if (!channelName) { + res.json(getErrorMessage('\'channelName\'')); + return; + } + if (!fcn) { + res.json(getErrorMessage('\'fcn\'')); + return; + } + if (!args) { + res.json(getErrorMessage('\'args\'')); + return; + } + args = args.replace(/'/g, '"'); + args = JSON.parse(args); + logger.debug(args); + + let message = await query.queryChaincode(peer, channelName, chaincodeName, args, fcn, req.username, req.orgname); + res.send(message); +}); +// Query Get Block by BlockNumber +app.get('/channels/:channelName/blocks/:blockId', async function(req, res) { + logger.debug('==================== GET BLOCK BY NUMBER =================='); + let blockId = req.params.blockId; + let peer = req.query.peer; + logger.debug('channelName : ' + req.params.channelName); + logger.debug('BlockID : ' + blockId); + logger.debug('Peer : ' + peer); + if (!blockId) { + res.json(getErrorMessage('\'blockId\'')); + return; + } + + let message = await query.getBlockByNumber(peer, req.params.channelName, blockId, req.username, req.orgname); + res.send(message); +}); +// Query Get Transaction by Transaction ID +app.get('/channels/:channelName/transactions/:trxnId', async function(req, res) { + logger.debug('================ GET TRANSACTION BY TRANSACTION_ID ======================'); + logger.debug('channelName : ' + req.params.channelName); + let trxnId = req.params.trxnId; + let peer = req.query.peer; + if (!trxnId) { + res.json(getErrorMessage('\'trxnId\'')); + return; + } + + let message = await query.getTransactionByID(peer, req.params.channelName, trxnId, req.username, req.orgname); + res.send(message); +}); +// Query Get Block by Hash +app.get('/channels/:channelName/blocks', async function(req, res) { + logger.debug('================ GET BLOCK BY HASH ======================'); + logger.debug('channelName : ' + req.params.channelName); + let hash = req.query.hash; + let peer = req.query.peer; + if (!hash) { + res.json(getErrorMessage('\'hash\'')); + return; + } + + let message = await query.getBlockByHash(peer, req.params.channelName, hash, req.username, req.orgname); + res.send(message); +}); +//Query for Channel Information +app.get('/channels/:channelName', async function(req, res) { + logger.debug('================ GET CHANNEL INFORMATION ======================'); + logger.debug('channelName : ' + req.params.channelName); + let peer = req.query.peer; + + let message = await query.getChainInfo(peer, req.params.channelName, req.username, req.orgname); + res.send(message); +}); +//Query for Channel instantiated chaincodes +app.get('/channels/:channelName/chaincodes', async function(req, res) { + logger.debug('================ GET INSTANTIATED CHAINCODES ======================'); + logger.debug('channelName : ' + req.params.channelName); + let peer = req.query.peer; + + let message = await query.getInstalledChaincodes(peer, req.params.channelName, 'instantiated', req.username, req.orgname); + res.send(message); +}); +// Query to fetch all Installed/instantiated chaincodes +app.get('/chaincodes', async function(req, res) { + var peer = req.query.peer; + var installType = req.query.type; + logger.debug('================ GET INSTALLED CHAINCODES ======================'); + + let message = await query.getInstalledChaincodes(peer, null, 'installed', req.username, req.orgname) + res.send(message); +}); +// Query to fetch channels +app.get('/channels', async function(req, res) { + logger.debug('================ GET CHANNELS ======================'); + logger.debug('peer: ' + req.query.peer); + var peer = req.query.peer; + if (!peer) { + res.json(getErrorMessage('\'peer\'')); + return; + } + + let message = await query.getChannels(peer, req.username, req.orgname); + res.send(message); +}); diff --git a/app/create-channel.js b/app/create-channel.js new file mode 100644 index 0000000..9749440 --- /dev/null +++ b/app/create-channel.js @@ -0,0 +1,81 @@ +/** + * Copyright 2017 IBM All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +var fs = require('fs'); +var path = require('path'); + +var helper = require('./helper.js'); +var logger = helper.getLogger('Create-Channel'); +//Attempt to send a request to the orderer with the sendTransaction method +var createChannel = async function(channelName, channelConfigPath, username, orgName) { + logger.debug('\n====== Creating Channel \'' + channelName + '\' ======\n'); + try { + // first setup the client for this org + var client = await helper.getClientForOrg(orgName); + logger.debug('Successfully got the fabric client for the organization "%s"', orgName); + + // read in the envelope for the channel config raw bytes + var envelope = fs.readFileSync(path.join(__dirname, channelConfigPath)); + // extract the channel config bytes from the envelope to be signed + var channelConfig = client.extractChannelConfig(envelope); + + //Acting as a client in the given organization provided with "orgName" param + // sign the channel config bytes as "endorsement", this is required by + // the orderer's channel creation policy + // this will use the admin identity assigned to the client when the connection profile was loaded + let signature = client.signChannelConfig(channelConfig); + + let request = { + config: channelConfig, + signatures: [signature], + name: channelName, + txId: client.newTransactionID(true) // get an admin based transactionID + }; + + // send to orderer + const result = await client.createChannel(request) + logger.debug(' result ::%j', result); + if (result) { + if (result.status === 'SUCCESS') { + logger.debug('Successfully created the channel.'); + const response = { + success: true, + message: 'Channel \'' + channelName + '\' created Successfully' + }; + return response; + } else { + logger.error('Failed to create the channel. status:' + result.status + ' reason:' + result.info); + const response = { + success: false, + message: 'Channel \'' + channelName + '\' failed to create status:' + result.status + ' reason:' + result.info + }; + return response; + } + } else { + logger.error('\n!!!!!!!!! Failed to create the channel \'' + channelName + + '\' !!!!!!!!!\n\n'); + const response = { + success: false, + message: 'Failed to create the channel \'' + channelName + '\'', + }; + return response; + } + } catch (err) { + logger.error('Failed to initialize the channel: ' + err.stack ? err.stack : err); + throw new Error('Failed to initialize the channel: ' + err.toString()); + } +}; + +exports.createChannel = createChannel; diff --git a/app/helper.js b/app/helper.js new file mode 100644 index 0000000..6489619 --- /dev/null +++ b/app/helper.js @@ -0,0 +1,120 @@ +/** + * Copyright 2017 IBM All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +'use strict'; +var log4js = require('log4js'); +var logger = log4js.getLogger('Helper'); +logger.setLevel('DEBUG'); + +var path = require('path'); +var util = require('util'); + +var hfc = require('fabric-client'); +hfc.setLogger(logger); + +async function getClientForOrg (userorg, username) { + logger.debug('getClientForOrg - ****** START %s %s', userorg, username) + // get a fabric client loaded with a connection profile for this org + let config = '-connection-profile-path'; + + // build a client context and load it with a connection profile + // lets only load the network settings and save the client for later + let client = hfc.loadFromConfig(hfc.getConfigSetting('network'+config)); + + // This will load a connection profile over the top of the current one one + // since the first one did not have a client section and the following one does + // nothing will actually be replaced. + // This will also set an admin identity because the organization defined in the + // client section has one defined + client.loadFromConfig(hfc.getConfigSetting(userorg+config)); + + // this will create both the state store and the crypto store based + // on the settings in the client section of the connection profile + await client.initCredentialStores(); + + // The getUserContext call tries to get the user from persistence. + // If the user has been saved to persistence then that means the user has + // been registered and enrolled. If the user is found in persistence + // the call will then assign the user to the client object. + if(username) { + let user = await client.getUserContext(username, true); + if(!user) { + throw new Error(util.format('User was not found :', username)); + } else { + logger.debug('User %s was found to be registered and enrolled', username); + } + } + logger.debug('getClientForOrg - ****** END %s %s \n\n', userorg, username) + + return client; +} + +var getRegisteredUser = async function(username, userOrg, isJson) { + try { + var client = await getClientForOrg(userOrg); + logger.debug('Successfully initialized the credential stores'); + // client can now act as an agent for organization Org1 + // first check to see if the user is already enrolled + var user = await client.getUserContext(username, true); + if (user && user.isEnrolled()) { + logger.info('Successfully loaded member from persistence'); + } else { + // user was not enrolled, so we will need an admin user object to register + logger.info('User %s was not enrolled, so we will need an admin user object to register',username); + var admins = hfc.getConfigSetting('admins'); + let adminUserObj = await client.setUserContext({username: admins[0].username, password: admins[0].secret}); + let caClient = client.getCertificateAuthority(); + let secret = await caClient.register({ + enrollmentID: username, + affiliation: userOrg.toLowerCase() + '.department1' + }, adminUserObj); + logger.debug('Successfully got the secret for user %s',username); + user = await client.setUserContext({username:username, password:secret}); + logger.debug('Successfully enrolled username %s and setUserContext on the client object', username); + } + if(user && user.isEnrolled) { + if (isJson && isJson === true) { + var response = { + success: true, + secret: user._enrollmentSecret, + message: username + ' enrolled Successfully', + }; + return response; + } + } else { + throw new Error('User was not enrolled '); + } + } catch(error) { + logger.error('Failed to get registered user: %s with error: %s', username, error.toString()); + return 'failed '+error.toString(); + } + +}; + + +var setupChaincodeDeploy = function() { + process.env.GOPATH = path.join(__dirname, hfc.getConfigSetting('CC_SRC_PATH')); +}; + +var getLogger = function(moduleName) { + var logger = log4js.getLogger(moduleName); + logger.setLevel('DEBUG'); + return logger; +}; + +exports.getClientForOrg = getClientForOrg; +exports.getLogger = getLogger; +exports.setupChaincodeDeploy = setupChaincodeDeploy; +exports.getRegisteredUser = getRegisteredUser; diff --git a/app/install-chaincode.js b/app/install-chaincode.js new file mode 100644 index 0000000..ea6c412 --- /dev/null +++ b/app/install-chaincode.js @@ -0,0 +1,86 @@ +/** + * Copyright 2017 IBM All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +'use strict'; +var util = require('util'); +var helper = require('./helper.js'); +var logger = helper.getLogger('install-chaincode'); + +var installChaincode = async function(peers, chaincodeName, chaincodePath, + chaincodeVersion, chaincodeType, username, org_name) { + logger.debug('\n\n============ Install chaincode on organizations ============\n'); + helper.setupChaincodeDeploy(); + let error_message = null; + try { + logger.info('Calling peers in organization "%s" to join the channel', org_name); + + // first setup the client for this org + var client = await helper.getClientForOrg(org_name, username); + logger.debug('Successfully got the fabric client for the organization "%s"', org_name); + + var request = { + targets: peers, + chaincodePath: chaincodePath, + chaincodeId: chaincodeName, + chaincodeVersion: chaincodeVersion, + chaincodeType: chaincodeType + }; + let results = await client.installChaincode(request); + // the returned object has both the endorsement results + // and the actual proposal, the proposal will be needed + // later when we send a transaction to the orederer + var proposalResponses = results[0]; + var proposal = results[1]; + + // lets have a look at the responses to see if they are + // all good, if good they will also include signatures + // required to be committed + for (const i in proposalResponses) { + if (proposalResponses[i] instanceof Error) { + error_message = util.format('install proposal resulted in an error :: %s', proposalResponses[i].toString()); + logger.error(error_message); + } else if (proposalResponses[i].response && proposalResponses[i].response.status === 200) { + logger.info('install proposal was good'); + } else { + all_good = false; + error_message = util.format('install proposal was bad for an unknown reason %j', proposalResponses[i]); + logger.error(error_message); + } + } + } catch(error) { + logger.error('Failed to install due to error: ' + error.stack ? error.stack : error); + error_message = error.toString(); + } + + if (!error_message) { + let message = util.format('Successfully installed chaincode'); + logger.info(message); + // build a response to send back to the REST caller + const response = { + success: true, + message: message + }; + return response; + } else { + let message = util.format('Failed to install due to:%s',error_message); + logger.error(message); + const response = { + success: false, + message: message + }; + return response; + } +}; +exports.installChaincode = installChaincode; diff --git a/app/instantiate-chaincode.js b/app/instantiate-chaincode.js new file mode 100644 index 0000000..022043d --- /dev/null +++ b/app/instantiate-chaincode.js @@ -0,0 +1,205 @@ +/** + * Copyright 2017 IBM All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +'use strict'; +const util = require('util'); +const helper = require('./helper.js'); +const logger = helper.getLogger('instantiate-chaincode'); + +const instantiateChaincode = async function(peers, channelName, chaincodeName, chaincodeVersion, functionName, chaincodeType, args, username, org_name) { + logger.debug('\n\n============ Instantiate chaincode on channel ' + channelName + + ' ============\n'); + let error_message = null; + let client = null; + let channel = null; + try { + // first setup the client for this org + client = await helper.getClientForOrg(org_name, username); + logger.debug('Successfully got the fabric client for the organization "%s"', org_name); + channel = client.getChannel(channelName); + if(!channel) { + let message = util.format('Channel %s was not defined in the connection profile', channelName); + logger.error(message); + throw new Error(message); + } + const tx_id = client.newTransactionID(true); // Get an admin based transactionID + // An admin based transactionID will + // indicate that admin identity should + // be used to sign the proposal request. + // will need the transaction ID string for the event registration later + const deployId = tx_id.getTransactionID(); + + // send proposal to endorser + const request = { + targets : peers, + chaincodeId: chaincodeName, + chaincodeType: chaincodeType, + chaincodeVersion: chaincodeVersion, + args: args, + txId: tx_id, + + // Use this to demonstrate the following policy: + // The policy can be fulfilled when members from both orgs signed. + 'endorsement-policy': { + identities: [ + { role: { name: 'member', mspId: 'Org1MSP' }}, + { role: { name: 'member', mspId: 'Org2MSP' }} + ], + policy: { + '2-of':[{ 'signed-by': 0 }, { 'signed-by': 1 }] + } + } + }; + + if (functionName) + request.fcn = functionName; + + let results = await channel.sendInstantiateProposal(request, 60000); //instantiate takes much longer + + // the returned object has both the endorsement results + // and the actual proposal, the proposal will be needed + // later when we send a transaction to the orderer + const proposalResponses = results[0]; + const proposal = results[1]; + + // look at the responses to see if they are all are good + // response will also include signatures required to be committed + let all_good = true; + for (const i in proposalResponses) { + if (proposalResponses[i] instanceof Error) { + all_good = false; + error_message = util.format('instantiate proposal resulted in an error :: %s', proposalResponses[i].toString()); + logger.error(error_message); + } else if (proposalResponses[i].response && proposalResponses[i].response.status === 200) { + logger.info('instantiate proposal was good'); + } else { + all_good = false; + error_message = util.format('instantiate proposal was bad for an unknown reason %j', proposalResponses[i]); + logger.error(error_message); + } + } + + if (all_good) { + logger.info(util.format( + 'Successfully sent Proposal and received ProposalResponse: Status - %s, message - "%s", metadata - "%s", endorsement signature: %s', + proposalResponses[0].response.status, proposalResponses[0].response.message, + proposalResponses[0].response.payload, proposalResponses[0].endorsement.signature)); + + // wait for the channel-based event hub to tell us that the + // instantiate transaction was committed on the peer + const promises = []; + const event_hubs = channel.getChannelEventHubsForOrg(); + logger.debug('found %s eventhubs for this organization %s',event_hubs.length, org_name); + event_hubs.forEach((eh) => { + let instantiateEventPromise = new Promise((resolve, reject) => { + logger.debug('instantiateEventPromise - setting up event'); + let event_timeout = setTimeout(() => { + let message = 'REQUEST_TIMEOUT:' + eh.getPeerAddr(); + logger.error(message); + eh.disconnect(); + }, 60000); + eh.registerTxEvent(deployId, (tx, code, block_num) => { + logger.info('The chaincode instantiate transaction has been committed on peer %s',eh.getPeerAddr()); + logger.info('Transaction %s has status of %s in blocl %s', tx, code, block_num); + clearTimeout(event_timeout); + + if (code !== 'VALID') { + let message = util.format('The chaincode instantiate transaction was invalid, code:%s',code); + logger.error(message); + reject(new Error(message)); + } else { + let message = 'The chaincode instantiate transaction was valid.'; + logger.info(message); + resolve(message); + } + }, (err) => { + clearTimeout(event_timeout); + logger.error(err); + reject(err); + }, + // the default for 'unregister' is true for transaction listeners + // so no real need to set here, however for 'disconnect' + // the default is false as most event hubs are long running + // in this use case we are using it only once + {unregister: true, disconnect: true} + ); + eh.connect(); + }); + promises.push(instantiateEventPromise); + }); + + const orderer_request = { + txId: tx_id, // must include the transaction id so that the outbound + // transaction to the orderer will be signed by the admin id + // the same as the proposal above, notice that transactionID + // generated above was based on the admin id not the current + // user assigned to the 'client' instance. + proposalResponses: proposalResponses, + proposal: proposal + }; + const sendPromise = channel.sendTransaction(orderer_request); + // put the send to the orderer last so that the events get registered and + // are ready for the orderering and committing + promises.push(sendPromise); + const results = await Promise.all(promises); + logger.debug(util.format('------->>> R E S P O N S E : %j', results)); + const response = results.pop(); // orderer results are last in the results + if (response.status === 'SUCCESS') { + logger.info('Successfully sent transaction to the orderer.'); + } else { + error_message = util.format('Failed to order the transaction. Error code: %s',response.status); + logger.debug(error_message); + } + + // now see what each of the event hubs reported + for(const i in results) { + const event_hub_result = results[i]; + const event_hub = event_hubs[i]; + logger.debug('Event results for event hub :%s',event_hub.getPeerAddr()); + if(typeof event_hub_result === 'string') { + logger.debug(event_hub_result); + } else { + if(!error_message) error_message = event_hub_result.toString(); + logger.debug(event_hub_result.toString()); + } + } + } + } catch (error) { + logger.error('Failed to send instantiate due to error: ' + error.stack ? error.stack : error); + error_message = error.toString(); + } finally { + if (channel) { + channel.close(); + } + } + + let success = true; + let message = util.format('Successfully instantiate chaincode in organization %s to the channel \'%s\'', org_name, channelName); + if (error_message) { + message = util.format('Failed to instantiate the chaincode. cause:%s',error_message); + success = false; + logger.error(message); + } else { + logger.info(message); + } + + // build a response to send back to the REST caller + const response = { + success: success, + message: message + }; + return response; +}; +exports.instantiateChaincode = instantiateChaincode; diff --git a/app/invoke-transaction.js b/app/invoke-transaction.js new file mode 100644 index 0000000..5cb2648 --- /dev/null +++ b/app/invoke-transaction.js @@ -0,0 +1,185 @@ +/** + * Copyright 2017 IBM All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +'use strict'; +const util = require('util'); +const helper = require('./helper.js'); +const logger = helper.getLogger('invoke-chaincode'); + +const invokeChaincode = async function(peerNames, channelName, chaincodeName, fcn, args, username, org_name) { + logger.debug(util.format('\n============ invoke transaction on channel %s ============\n', channelName)); + let error_message = null; + let tx_id_string = null; + let client = null; + let channel = null; + try { + // first setup the client for this org + client = await helper.getClientForOrg(org_name, username); + logger.debug('Successfully got the fabric client for the organization "%s"', org_name); + channel = client.getChannel(channelName); + if(!channel) { + let message = util.format('Channel %s was not defined in the connection profile', channelName); + logger.error(message); + throw new Error(message); + } + const tx_id = client.newTransactionID(); + // will need the transaction ID string for the event registration later + tx_id_string = tx_id.getTransactionID(); + + // send proposal to endorser + const request = { + targets: peerNames, + chaincodeId: chaincodeName, + fcn: fcn, + args: args, + chainId: channelName, + txId: tx_id + }; + + let results = await channel.sendTransactionProposal(request); + + // the returned object has both the endorsement results + // and the actual proposal, the proposal will be needed + // later when we send a transaction to the orderer + const proposalResponses = results[0]; + const proposal = results[1]; + + // look at the responses to see if they are all are good + // response will also include signatures required to be committed + let all_good = true; + for (const i in proposalResponses) { + if (proposalResponses[i] instanceof Error) { + all_good = false; + error_message = util.format('invoke chaincode proposal resulted in an error :: %s', proposalResponses[i].toString()); + logger.error(error_message); + } else if (proposalResponses[i].response && proposalResponses[i].response.status === 200) { + logger.info('invoke chaincode proposal was good'); + } else { + all_good = false; + error_message = util.format('invoke chaincode proposal failed for an unknown reason %j', proposalResponses[i]); + logger.error(error_message); + } + } + + if (all_good) { + logger.info(util.format( + 'Successfully sent Proposal and received ProposalResponse: Status - %s, message - "%s", metadata - "%s", endorsement signature: %s', + proposalResponses[0].response.status, proposalResponses[0].response.message, + proposalResponses[0].response.payload, proposalResponses[0].endorsement.signature)); + + // wait for the channel-based event hub to tell us + // that the commit was good or bad on each peer in our organization + const promises = []; + let event_hubs = channel.getChannelEventHubsForOrg(); + event_hubs.forEach((eh) => { + logger.debug('invokeEventPromise - setting up event'); + let invokeEventPromise = new Promise((resolve, reject) => { + let event_timeout = setTimeout(() => { + let message = 'REQUEST_TIMEOUT:' + eh.getPeerAddr(); + logger.error(message); + eh.disconnect(); + }, 3000); + eh.registerTxEvent(tx_id_string, (tx, code, block_num) => { + logger.info('The chaincode invoke chaincode transaction has been committed on peer %s',eh.getPeerAddr()); + logger.info('Transaction %s has status of %s in blocl %s', tx, code, block_num); + clearTimeout(event_timeout); + + if (code !== 'VALID') { + let message = util.format('The invoke chaincode transaction was invalid, code:%s',code); + logger.error(message); + reject(new Error(message)); + } else { + let message = 'The invoke chaincode transaction was valid.'; + logger.info(message); + resolve(message); + } + }, (err) => { + clearTimeout(event_timeout); + logger.error(err); + reject(err); + }, + // the default for 'unregister' is true for transaction listeners + // so no real need to set here, however for 'disconnect' + // the default is false as most event hubs are long running + // in this use case we are using it only once + {unregister: true, disconnect: true} + ); + eh.connect(); + }); + promises.push(invokeEventPromise); + }); + + const orderer_request = { + txId: tx_id, + proposalResponses: proposalResponses, + proposal: proposal + }; + const sendPromise = channel.sendTransaction(orderer_request); + // put the send to the orderer last so that the events get registered and + // are ready for the orderering and committing + promises.push(sendPromise); + let results = await Promise.all(promises); + logger.debug(util.format('------->>> R E S P O N S E : %j', results)); + let response = results.pop(); // orderer results are last in the results + if (response.status === 'SUCCESS') { + logger.info('Successfully sent transaction to the orderer.'); + } else { + error_message = util.format('Failed to order the transaction. Error code: %s',response.status); + logger.debug(error_message); + } + + // now see what each of the event hubs reported + for(let i in results) { + let event_hub_result = results[i]; + let event_hub = event_hubs[i]; + logger.debug('Event results for event hub :%s',event_hub.getPeerAddr()); + if(typeof event_hub_result === 'string') { + logger.debug(event_hub_result); + } else { + if(!error_message) error_message = event_hub_result.toString(); + logger.debug(event_hub_result.toString()); + } + } + } + } catch (error) { + logger.error('Failed to invoke due to error: ' + error.stack ? error.stack : error); + error_message = error.toString(); + } finally { + if (channel) { + channel.close(); + } + } + + let success = true; + let message = util.format( + 'Successfully invoked the chaincode %s to the channel \'%s\' for transaction ID: %s', + org_name, channelName, tx_id_string); + if (error_message) { + message = util.format('Failed to invoke chaincode. cause:%s',error_message); + success = false; + logger.error(message); + } else { + logger.info(message); + } + + // build a response to send back to the REST caller + const response = { + success: success, + message: message + }; + return response; +}; + +exports.invokeChaincode = invokeChaincode; diff --git a/app/join-channel.js b/app/join-channel.js new file mode 100644 index 0000000..c050f74 --- /dev/null +++ b/app/join-channel.js @@ -0,0 +1,111 @@ +/** + * Copyright 2017 IBM All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the 'License'); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an 'AS IS' BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +var util = require('util'); + +var helper = require('./helper.js'); +var logger = helper.getLogger('Join-Channel'); + +/* + * Have an organization join a channel + */ +var joinChannel = async function(channel_name, peers, username, org_name) { + logger.debug('\n\n============ Join Channel start ============\n') + var error_message = null; + var all_eventhubs = []; + try { + logger.info('Calling peers in organization "%s" to join the channel', org_name); + + // first setup the client for this org + var client = await helper.getClientForOrg(org_name, username); + logger.debug('Successfully got the fabric client for the organization "%s"', org_name); + var channel = client.getChannel(channel_name); + if(!channel) { + let message = util.format('Channel %s was not defined in the connection profile', channel_name); + logger.error(message); + throw new Error(message); + } + + // next step is to get the genesis_block from the orderer, + // the starting point for the channel that we want to join + let request = { + txId : client.newTransactionID(true) //get an admin based transactionID + }; + let genesis_block = await channel.getGenesisBlock(request); + + // tell each peer to join and wait 10 seconds + // for the channel to be created on each peer + var promises = []; + promises.push(new Promise(resolve => setTimeout(resolve, 10000))); + + let join_request = { + targets: peers, //using the peer names which only is allowed when a connection profile is loaded + txId: client.newTransactionID(true), //get an admin based transactionID + block: genesis_block + }; + let join_promise = channel.joinChannel(join_request); + promises.push(join_promise); + let results = await Promise.all(promises); + logger.debug(util.format('Join Channel R E S P O N S E : %j', results)); + + // lets check the results of sending to the peers which is + // last in the results array + let peers_results = results.pop(); + // then each peer results + for(let i in peers_results) { + let peer_result = peers_results[i]; + if (peer_result instanceof Error) { + error_message = util.format('Failed to join peer to the channel with error :: %s', peer_result.toString()); + logger.error(error_message); + } else if(peer_result.response && peer_result.response.status == 200) { + logger.info('Successfully joined peer to the channel %s',channel_name); + } else { + error_message = util.format('Failed to join peer to the channel %s',channel_name); + logger.error(error_message); + } + } + } catch(error) { + logger.error('Failed to join channel due to error: ' + error.stack ? error.stack : error); + error_message = error.toString(); + } + + // need to shutdown open event streams + all_eventhubs.forEach((eh) => { + eh.disconnect(); + }); + + if (!error_message) { + let message = util.format( + 'Successfully joined peers in organization %s to the channel:%s', + org_name, channel_name); + logger.info(message); + // build a response to send back to the REST caller + const response = { + success: true, + message: message + }; + return response; + } else { + let message = util.format('Failed to join all peers to channel. cause:%s',error_message); + logger.error(message); + // build a response to send back to the REST caller + const response = { + success: false, + message: message + }; + return response; + } +}; +exports.joinChannel = joinChannel; diff --git a/app/query.js b/app/query.js new file mode 100644 index 0000000..a0d3b05 --- /dev/null +++ b/app/query.js @@ -0,0 +1,237 @@ +/** + * Copyright 2017 IBM All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +var util = require('util'); +var helper = require('./helper.js'); +var logger = helper.getLogger('Query'); + +var queryChaincode = async function(peer, channelName, chaincodeName, args, fcn, username, org_name) { + let client = null; + let channel = null; + try { + // first setup the client for this org + client = await helper.getClientForOrg(org_name, username); + logger.debug('Successfully got the fabric client for the organization "%s"', org_name); + channel = client.getChannel(channelName); + if(!channel) { + let message = util.format('Channel %s was not defined in the connection profile', channelName); + logger.error(message); + throw new Error(message); + } + + // send query + var request = { + targets : [peer], //queryByChaincode allows for multiple targets + chaincodeId: chaincodeName, + fcn: fcn, + args: args + }; + let response_payloads = await channel.queryByChaincode(request); + if (response_payloads) { + for (let i = 0; i < response_payloads.length; i++) { + logger.info(args[0]+' now has ' + response_payloads[i].toString('utf8') + + ' after the move'); + } + return args[0]+' now has ' + response_payloads[0].toString('utf8') + + ' after the move'; + } else { + logger.error('response_payloads is null'); + return 'response_payloads is null'; + } + } catch(error) { + logger.error('Failed to query due to error: ' + error.stack ? error.stack : error); + return error.toString(); + } finally { + if (channel) { + channel.close(); + } + } +}; +var getBlockByNumber = async function(peer, channelName, blockNumber, username, org_name) { + try { + // first setup the client for this org + var client = await helper.getClientForOrg(org_name, username); + logger.debug('Successfully got the fabric client for the organization "%s"', org_name); + var channel = client.getChannel(channelName); + if(!channel) { + let message = util.format('Channel %s was not defined in the connection profile', channelName); + logger.error(message); + throw new Error(message); + } + + let response_payload = await channel.queryBlock(parseInt(blockNumber, peer)); + if (response_payload) { + logger.debug(response_payload); + return response_payload; + } else { + logger.error('response_payload is null'); + return 'response_payload is null'; + } + } catch(error) { + logger.error('Failed to query due to error: ' + error.stack ? error.stack : error); + return error.toString(); + } +}; +var getTransactionByID = async function(peer, channelName, trxnID, username, org_name) { + try { + // first setup the client for this org + var client = await helper.getClientForOrg(org_name, username); + logger.debug('Successfully got the fabric client for the organization "%s"', org_name); + var channel = client.getChannel(channelName); + if(!channel) { + let message = util.format('Channel %s was not defined in the connection profile', channelName); + logger.error(message); + throw new Error(message); + } + + let response_payload = await channel.queryTransaction(trxnID, peer); + if (response_payload) { + logger.debug(response_payload); + return response_payload; + } else { + logger.error('response_payload is null'); + return 'response_payload is null'; + } + } catch(error) { + logger.error('Failed to query due to error: ' + error.stack ? error.stack : error); + return error.toString(); + } +}; +var getBlockByHash = async function(peer, channelName, hash, username, org_name) { + try { + // first setup the client for this org + var client = await helper.getClientForOrg(org_name, username); + logger.debug('Successfully got the fabric client for the organization "%s"', org_name); + var channel = client.getChannel(channelName); + if(!channel) { + let message = util.format('Channel %s was not defined in the connection profile', channelName); + logger.error(message); + throw new Error(message); + } + + let response_payload = await channel.queryBlockByHash(Buffer.from(hash,'hex'), peer); + if (response_payload) { + logger.debug(response_payload); + return response_payload; + } else { + logger.error('response_payload is null'); + return 'response_payload is null'; + } + } catch(error) { + logger.error('Failed to query due to error: ' + error.stack ? error.stack : error); + return error.toString(); + } +}; +var getChainInfo = async function(peer, channelName, username, org_name) { + try { + // first setup the client for this org + var client = await helper.getClientForOrg(org_name, username); + logger.debug('Successfully got the fabric client for the organization "%s"', org_name); + var channel = client.getChannel(channelName); + if(!channel) { + let message = util.format('Channel %s was not defined in the connection profile', channelName); + logger.error(message); + throw new Error(message); + } + + let response_payload = await channel.queryInfo(peer); + if (response_payload) { + logger.debug(response_payload); + return response_payload; + } else { + logger.error('response_payload is null'); + return 'response_payload is null'; + } + } catch(error) { + logger.error('Failed to query due to error: ' + error.stack ? error.stack : error); + return error.toString(); + } +}; +//getInstalledChaincodes +var getInstalledChaincodes = async function(peer, channelName, type, username, org_name) { + try { + // first setup the client for this org + var client = await helper.getClientForOrg(org_name, username); + logger.debug('Successfully got the fabric client for the organization "%s"', org_name); + + let response = null + if (type === 'installed') { + response = await client.queryInstalledChaincodes(peer, true); //use the admin identity + } else { + var channel = client.getChannel(channelName); + if(!channel) { + let message = util.format('Channel %s was not defined in the connection profile', channelName); + logger.error(message); + throw new Error(message); + } + response = await channel.queryInstantiatedChaincodes(peer, true); //use the admin identity + } + if (response) { + if (type === 'installed') { + logger.debug('<<< Installed Chaincodes >>>'); + } else { + logger.debug('<<< Instantiated Chaincodes >>>'); + } + var details = []; + for (let i = 0; i < response.chaincodes.length; i++) { + logger.debug('name: ' + response.chaincodes[i].name + ', version: ' + + response.chaincodes[i].version + ', path: ' + response.chaincodes[i].path + ); + details.push('name: ' + response.chaincodes[i].name + ', version: ' + + response.chaincodes[i].version + ', path: ' + response.chaincodes[i].path + ); + } + return details; + } else { + logger.error('response is null'); + return 'response is null'; + } + } catch(error) { + logger.error('Failed to query due to error: ' + error.stack ? error.stack : error); + return error.toString(); + } +}; +var getChannels = async function(peer, username, org_name) { + try { + // first setup the client for this org + var client = await helper.getClientForOrg(org_name, username); + logger.debug('Successfully got the fabric client for the organization "%s"', org_name); + + let response = await client.queryChannels(peer); + if (response) { + logger.debug('<<< channels >>>'); + var channelNames = []; + for (let i = 0; i < response.channels.length; i++) { + channelNames.push('channel id: ' + response.channels[i].channel_id); + } + logger.debug(channelNames); + return response; + } else { + logger.error('response_payloads is null'); + return 'response_payloads is null'; + } + } catch(error) { + logger.error('Failed to query due to error: ' + error.stack ? error.stack : error); + return error.toString(); + } +}; + +exports.queryChaincode = queryChaincode; +exports.getBlockByNumber = getBlockByNumber; +exports.getTransactionByID = getTransactionByID; +exports.getBlockByHash = getBlockByHash; +exports.getChainInfo = getChainInfo; +exports.getInstalledChaincodes = getInstalledChaincodes; +exports.getChannels = getChannels; diff --git a/app/update-anchor-peers.js b/app/update-anchor-peers.js new file mode 100644 index 0000000..da59ece --- /dev/null +++ b/app/update-anchor-peers.js @@ -0,0 +1,123 @@ +/** + * Copyright Hitachi America, Ltd. All Rights Reserved. + * + * SPDX-License-Identifier: Apache-2.0 + */ + +'use strict'; +var util = require('util'); +var fs = require('fs'); +var path = require('path'); + +var helper = require('./helper.js'); +var logger = helper.getLogger('update-anchor-peers'); + +var updateAnchorPeers = async function(channelName, configUpdatePath, username, org_name) { + logger.debug('\n====== Updating Anchor Peers on \'' + channelName + '\' ======\n'); + var error_message = null; + try { + // first setup the client for this org + var client = await helper.getClientForOrg(org_name, username); + logger.debug('Successfully got the fabric client for the organization "%s"', org_name); + var channel = client.getChannel(channelName); + if(!channel) { + let message = util.format('Channel %s was not defined in the connection profile', channelName); + logger.error(message); + throw new Error(message); + } + + // read in the envelope for the channel config raw bytes + var envelope = fs.readFileSync(path.join(__dirname, configUpdatePath)); + // extract the channel config bytes from the envelope to be signed + var channelConfig = client.extractChannelConfig(envelope); + + //Acting as a client in the given organization provided with "orgName" param + // sign the channel config bytes as "endorsement", this is required by + // the orderer's channel creation policy + // this will use the admin identity assigned to the client when the connection profile was loaded + let signature = client.signChannelConfig(channelConfig); + + let request = { + config: channelConfig, + signatures: [signature], + name: channelName, + txId: client.newTransactionID(true) // get an admin based transactionID + }; + + var promises = []; + let event_hubs = channel.getChannelEventHubsForOrg(); + logger.debug('found %s eventhubs for this organization %s',event_hubs.length, org_name); + event_hubs.forEach((eh) => { + let anchorUpdateEventPromise = new Promise((resolve, reject) => { + logger.debug('anchorUpdateEventPromise - setting up event'); + const event_timeout = setTimeout(() => { + let message = 'REQUEST_TIMEOUT:' + eh.getPeerAddr(); + logger.error(message); + eh.disconnect(); + }, 60000); + eh.registerBlockEvent((block) => { + logger.info('The config update has been committed on peer %s',eh.getPeerAddr()); + clearTimeout(event_timeout); + resolve(); + }, (err) => { + clearTimeout(event_timeout); + logger.error(err); + reject(err); + }, + // the default for 'unregister' is true for block listeners + // so no real need to set here, however for 'disconnect' + // the default is false as most event hubs are long running + // in this use case we are using it only once + {unregister: true, disconnect: true} + ); + eh.connect(); + }); + promises.push(anchorUpdateEventPromise); + }); + + var sendPromise = client.updateChannel(request); + // put the send to the orderer last so that the events get registered and + // are ready for the orderering and committing + promises.push(sendPromise); + let results = await Promise.all(promises); + logger.debug(util.format('------->>> R E S P O N S E : %j', results)); + let response = results.pop(); // orderer results are last in the results + + if (response) { + if (response.status === 'SUCCESS') { + logger.info('Successfully update anchor peers to the channel %s', channelName); + } else { + error_message = util.format('Failed to update anchor peers to the channel %s with status: %s reason: %s', channelName, response.status, response.info); + logger.error(error_message); + } + } else { + error_message = util.format('Failed to update anchor peers to the channel %s', channelName); + logger.error(error_message); + } + } catch (error) { + logger.error('Failed to update anchor peers due to error: ' + error.stack ? error.stack : error); + error_message = error.toString(); + } + + if (!error_message) { + let message = util.format( + 'Successfully update anchor peers in organization %s to the channel \'%s\'', + org_name, channelName); + logger.info(message); + const response = { + success: true, + message: message + }; + return response; + } else { + let message = util.format('Failed to update anchor peers. cause:%s',error_message); + logger.error(message); + const response = { + success: false, + message: message + }; + return response; + } +}; + +exports.updateAnchorPeers = updateAnchorPeers; diff --git a/artifacts/base.yaml b/artifacts/base.yaml new file mode 100644 index 0000000..35027d7 --- /dev/null +++ b/artifacts/base.yaml @@ -0,0 +1,30 @@ +# Copyright IBM Corp. All Rights Reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# + +version: '2' +services: + peer-base: + image: hyperledger/fabric-peer + environment: + - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock + # the following setting starts chaincode containers on the same + # bridge network as the peers + # https://docs.docker.com/compose/networking/ + - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=artifacts_default + - FABRIC_LOGGING_SPEC=DEBUG + - CORE_PEER_GOSSIP_USELEADERELECTION=true + - CORE_PEER_GOSSIP_ORGLEADER=false + # The following setting skips the gossip handshake since we are + # are not doing mutual TLS + - CORE_PEER_GOSSIP_SKIPHANDSHAKE=true + - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/crypto/peer/msp + - CORE_PEER_TLS_ENABLED=true + - CORE_PEER_TLS_KEY_FILE=/etc/hyperledger/crypto/peer/tls/server.key + - CORE_PEER_TLS_CERT_FILE=/etc/hyperledger/crypto/peer/tls/server.crt + - CORE_PEER_TLS_ROOTCERT_FILE=/etc/hyperledger/crypto/peer/tls/ca.crt + working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer + command: peer node start + volumes: + - /var/run/:/host/var/run/ diff --git a/artifacts/channel/Org1MSPanchors.tx b/artifacts/channel/Org1MSPanchors.tx new file mode 100644 index 0000000..104ee50 Binary files /dev/null and b/artifacts/channel/Org1MSPanchors.tx differ diff --git a/artifacts/channel/Org2MSPanchors.tx b/artifacts/channel/Org2MSPanchors.tx new file mode 100644 index 0000000..eaaf1d7 Binary files /dev/null and b/artifacts/channel/Org2MSPanchors.tx differ diff --git a/artifacts/channel/configtx.yaml b/artifacts/channel/configtx.yaml new file mode 100644 index 0000000..98f5cb7 --- /dev/null +++ b/artifacts/channel/configtx.yaml @@ -0,0 +1,149 @@ +# Copyright IBM Corp. All Rights Reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# + +--- +################################################################################ +# +# Section: Organizations +# +# - This section defines the different organizational identities which will +# be referenced later in the configuration. +# +################################################################################ +Organizations: + + # SampleOrg defines an MSP using the sampleconfig. It should never be used + # in production but may be used as a template for other definitions + - &OrdererOrg + # DefaultOrg defines the organization which is used in the sampleconfig + # of the fabric.git development environment + Name: OrdererMSP + + # ID to load the MSP definition as + ID: OrdererMSP + + # MSPDir is the filesystem path which contains the MSP configuration + MSPDir: crypto-config/ordererOrganizations/example.com/msp + + - &Org1 + # DefaultOrg defines the organization which is used in the sampleconfig + # of the fabric.git development environment + Name: Org1MSP + + # ID to load the MSP definition as + ID: Org1MSP + + MSPDir: crypto-config/peerOrganizations/org1.example.com/msp + + AnchorPeers: + # AnchorPeers defines the location of peers which can be used + # for cross org gossip communication. Note, this value is only + # encoded in the genesis block in the Application section context + - Host: peer0.org1.example.com + Port: 7051 + + - &Org2 + # DefaultOrg defines the organization which is used in the sampleconfig + # of the fabric.git development environment + Name: Org2MSP + + # ID to load the MSP definition as + ID: Org2MSP + + MSPDir: crypto-config/peerOrganizations/org2.example.com/msp + + AnchorPeers: + # AnchorPeers defines the location of peers which can be used + # for cross org gossip communication. Note, this value is only + # encoded in the genesis block in the Application section context + - Host: peer0.org2.example.com + Port: 7051 + +################################################################################ +# +# SECTION: Application +# +# - This section defines the values to encode into a config transaction or +# genesis block for application related parameters +# +################################################################################ +Application: &ApplicationDefaults + + # Organizations is the list of orgs which are defined as participants on + # the application side of the network + Organizations: + +################################################################################ +# +# SECTION: Orderer +# +# - This section defines the values to encode into a config transaction or +# genesis block for orderer related parameters +# +################################################################################ +Orderer: &OrdererDefaults + + # Orderer Type: The orderer implementation to start + # Available types are "solo" and "kafka" + OrdererType: solo + + Addresses: + - orderer.example.com:7050 + + # Batch Timeout: The amount of time to wait before creating a batch + BatchTimeout: 2s + + # Batch Size: Controls the number of messages batched into a block + BatchSize: + + # Max Message Count: The maximum number of messages to permit in a batch + MaxMessageCount: 10 + + # Absolute Max Bytes: The absolute maximum number of bytes allowed for + # the serialized messages in a batch. + AbsoluteMaxBytes: 98 MB + + # Preferred Max Bytes: The preferred maximum number of bytes allowed for + # the serialized messages in a batch. A message larger than the preferred + # max bytes will result in a batch larger than preferred max bytes. + PreferredMaxBytes: 512 KB + + Kafka: + # Brokers: A list of Kafka brokers to which the orderer connects + # NOTE: Use IP:port notation + Brokers: + - 127.0.0.1:9092 + + # Organizations is the list of orgs which are defined as participants on + # the orderer side of the network + Organizations: + +################################################################################ +# +# Profile +# +# - Different configuration profiles may be encoded here to be specified +# as parameters to the configtxgen tool +# +################################################################################ +Profiles: + + TwoOrgsOrdererGenesis: + Orderer: + <<: *OrdererDefaults + Organizations: + - *OrdererOrg + Consortiums: + SampleConsortium: + Organizations: + - *Org1 + - *Org2 + TwoOrgsChannel: + Consortium: SampleConsortium + Application: + <<: *ApplicationDefaults + Organizations: + - *Org1 + - *Org2 diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/ca/0d46ccf0e9436c1bc3b6e2bf80cdb202c4943604f95c72ee0ff839d3ec300719_sk b/artifacts/channel/crypto-config/ordererOrganizations/example.com/ca/0d46ccf0e9436c1bc3b6e2bf80cdb202c4943604f95c72ee0ff839d3ec300719_sk new file mode 100755 index 0000000..6e2c4c3 --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/ca/0d46ccf0e9436c1bc3b6e2bf80cdb202c4943604f95c72ee0ff839d3ec300719_sk @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg9pRJ4Y87tn+vE1fU +uAGVg5OOGwHYlqBuvAOvy0Z+mEChRANCAAQyw4A26b4ouKj0TxbF3mM4I51vDLZ2 +clA+fdrYJwZcI9F/lLmpu+oEd/XXdQn/ELzEsgeCi9xdThVYmeXJ/53K +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/ca/ca.example.com-cert.pem b/artifacts/channel/crypto-config/ordererOrganizations/example.com/ca/ca.example.com-cert.pem new file mode 100644 index 0000000..e83e629 --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/ca/ca.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICLjCCAdWgAwIBAgIQCeSxIA/5bBc/893OreC2kzAKBggqhkjOPQQDAjBpMQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w +bGUuY29tMB4XDTE3MDYyMzEyMzMxOVoXDTI3MDYyMTEyMzMxOVowaTELMAkGA1UE +BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz +Y28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFtcGxlLmNv +bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABDLDgDbpvii4qPRPFsXeYzgjnW8M +tnZyUD592tgnBlwj0X+Uuam76gR39dd1Cf8QvMSyB4KL3F1OFViZ5cn/ncqjXzBd +MA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMB +Af8wKQYDVR0OBCIEIA1GzPDpQ2wbw7biv4DNsgLElDYE+Vxy7g/4OdPsMAcZMAoG +CCqGSM49BAMCA0cAMEQCICXp7cNAHK6RQOFxE8Gpqy1B/FuLbmtYNqqBo5e1Pgly +AiAWH23pmnXngcjLHg3nGwa3oUlCyPD64ilFoCMdN9TRVg== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/msp/admincerts/Admin@example.com-cert.pem b/artifacts/channel/crypto-config/ordererOrganizations/example.com/msp/admincerts/Admin@example.com-cert.pem new file mode 100644 index 0000000..4a1dbfa --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/msp/admincerts/Admin@example.com-cert.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIICCjCCAbGgAwIBAgIRANPhTyHWZkTenKfX4eBv0ZUwCgYIKoZIzj0EAwIwaTEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt +cGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTlaMFYxCzAJBgNV +BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp +c2NvMRowGAYDVQQDDBFBZG1pbkBleGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqG +SM49AwEHA0IABKAyu7N4S2ZPQSzsAVF/mwwCewuu++MtfcMmUdeoIPFRBj1JMCnf +f88M0wj13gQSJQ6GfnUrT76G/L5fGxCUifWjTTBLMA4GA1UdDwEB/wQEAwIHgDAM +BgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIA1GzPDpQ2wbw7biv4DNsgLElDYE+Vxy +7g/4OdPsMAcZMAoGCCqGSM49BAMCA0cAMEQCIEdiGFLzeGMvVNubuZ3iuvRp/Pp6 +im3FmABwIbnMarabAiBIHWzz8Yxh9K5ZNkVNZX3fLZ4LlzsKBinbWH9J2wblDg== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/msp/cacerts/ca.example.com-cert.pem b/artifacts/channel/crypto-config/ordererOrganizations/example.com/msp/cacerts/ca.example.com-cert.pem new file mode 100644 index 0000000..e83e629 --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/msp/cacerts/ca.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICLjCCAdWgAwIBAgIQCeSxIA/5bBc/893OreC2kzAKBggqhkjOPQQDAjBpMQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w +bGUuY29tMB4XDTE3MDYyMzEyMzMxOVoXDTI3MDYyMTEyMzMxOVowaTELMAkGA1UE +BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz +Y28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFtcGxlLmNv +bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABDLDgDbpvii4qPRPFsXeYzgjnW8M +tnZyUD592tgnBlwj0X+Uuam76gR39dd1Cf8QvMSyB4KL3F1OFViZ5cn/ncqjXzBd +MA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMB +Af8wKQYDVR0OBCIEIA1GzPDpQ2wbw7biv4DNsgLElDYE+Vxy7g/4OdPsMAcZMAoG +CCqGSM49BAMCA0cAMEQCICXp7cNAHK6RQOFxE8Gpqy1B/FuLbmtYNqqBo5e1Pgly +AiAWH23pmnXngcjLHg3nGwa3oUlCyPD64ilFoCMdN9TRVg== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/msp/tlscacerts/tlsca.example.com-cert.pem b/artifacts/channel/crypto-config/ordererOrganizations/example.com/msp/tlscacerts/tlsca.example.com-cert.pem new file mode 100644 index 0000000..88a1e69 --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/msp/tlscacerts/tlsca.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICNTCCAdygAwIBAgIRAN1F77OjzDmyWCzGuLyXHI8wCgYIKoZIzj0EAwIwbDEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l +eGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTlaMGwxCzAJ +BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh +bmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEaMBgGA1UEAxMRdGxzY2EuZXhh +bXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQkmbjr/9EK0m/4CpR6 +DiM+Eyke3vxPX+IhL+utTRt/qYz2q0UT9wem0xgRVqyWp4vN35ur7aSI+dALKBFT +RWPwo18wXTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMB +Af8EBTADAQH/MCkGA1UdDgQiBCBqIR7RiIC02zhngxyXeAmQJxO44yGlq1XswQTa +/C7sSTAKBggqhkjOPQQDAgNHADBEAiBSxokO+9hHG+FpYikoNpcma4AK6N1KI2B6 +WqI5xNyF4gIgIQx8Q6p6ynDfUGDJ43uTHPzwlt+o8gQ3A5w07L70ml0= +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/admincerts/Admin@example.com-cert.pem b/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/admincerts/Admin@example.com-cert.pem new file mode 100644 index 0000000..4a1dbfa --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/admincerts/Admin@example.com-cert.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIICCjCCAbGgAwIBAgIRANPhTyHWZkTenKfX4eBv0ZUwCgYIKoZIzj0EAwIwaTEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt +cGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTlaMFYxCzAJBgNV +BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp +c2NvMRowGAYDVQQDDBFBZG1pbkBleGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqG +SM49AwEHA0IABKAyu7N4S2ZPQSzsAVF/mwwCewuu++MtfcMmUdeoIPFRBj1JMCnf +f88M0wj13gQSJQ6GfnUrT76G/L5fGxCUifWjTTBLMA4GA1UdDwEB/wQEAwIHgDAM +BgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIA1GzPDpQ2wbw7biv4DNsgLElDYE+Vxy +7g/4OdPsMAcZMAoGCCqGSM49BAMCA0cAMEQCIEdiGFLzeGMvVNubuZ3iuvRp/Pp6 +im3FmABwIbnMarabAiBIHWzz8Yxh9K5ZNkVNZX3fLZ4LlzsKBinbWH9J2wblDg== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem b/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem new file mode 100644 index 0000000..e83e629 --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICLjCCAdWgAwIBAgIQCeSxIA/5bBc/893OreC2kzAKBggqhkjOPQQDAjBpMQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w +bGUuY29tMB4XDTE3MDYyMzEyMzMxOVoXDTI3MDYyMTEyMzMxOVowaTELMAkGA1UE +BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz +Y28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFtcGxlLmNv +bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABDLDgDbpvii4qPRPFsXeYzgjnW8M +tnZyUD592tgnBlwj0X+Uuam76gR39dd1Cf8QvMSyB4KL3F1OFViZ5cn/ncqjXzBd +MA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMB +Af8wKQYDVR0OBCIEIA1GzPDpQ2wbw7biv4DNsgLElDYE+Vxy7g/4OdPsMAcZMAoG +CCqGSM49BAMCA0cAMEQCICXp7cNAHK6RQOFxE8Gpqy1B/FuLbmtYNqqBo5e1Pgly +AiAWH23pmnXngcjLHg3nGwa3oUlCyPD64ilFoCMdN9TRVg== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/keystore/2fb065725bf1b7e2811c0e8ca8d37f5a951fc4cd1162a47aad8accf9ddd10291_sk b/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/keystore/2fb065725bf1b7e2811c0e8ca8d37f5a951fc4cd1162a47aad8accf9ddd10291_sk new file mode 100755 index 0000000..403d8e5 --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/keystore/2fb065725bf1b7e2811c0e8ca8d37f5a951fc4cd1162a47aad8accf9ddd10291_sk @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgc4TjL7yNIkRpowuC +Y0uEEkzJraTtTM380wlyrRoVs96hRANCAARi2C4soUEstzRVLDI8ccc17vocfvWg +5crrC6fxj/m+0xrA9n9ZOb+8FVRZ182XNz14DbxpfHrMEAHyJGbXoR5T +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts/orderer.example.com-cert.pem b/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts/orderer.example.com-cert.pem new file mode 100644 index 0000000..0fb7145 --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts/orderer.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICDTCCAbOgAwIBAgIRALFafJiTFN/47AvAGfvj1ZEwCgYIKoZIzj0EAwIwaTEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt +cGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTlaMFgxCzAJBgNV +BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp +c2NvMRwwGgYDVQQDExNvcmRlcmVyLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYI +KoZIzj0DAQcDQgAEYtguLKFBLLc0VSwyPHHHNe76HH71oOXK6wun8Y/5vtMawPZ/ +WTm/vBVUWdfNlzc9eA28aXx6zBAB8iRm16EeU6NNMEswDgYDVR0PAQH/BAQDAgeA +MAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgDUbM8OlDbBvDtuK/gM2yAsSUNgT5 +XHLuD/g50+wwBxkwCgYIKoZIzj0EAwIDSAAwRQIhANJuEGHBftrtlWgie9zgc60J +/XVytPN/D0rPlkMV17n7AiBBbStggGBfFYcQ2LhDhcKut8nScJ2OFrt+dJSdJbod +7A== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem b/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem new file mode 100644 index 0000000..88a1e69 --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICNTCCAdygAwIBAgIRAN1F77OjzDmyWCzGuLyXHI8wCgYIKoZIzj0EAwIwbDEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l +eGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTlaMGwxCzAJ +BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh +bmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEaMBgGA1UEAxMRdGxzY2EuZXhh +bXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQkmbjr/9EK0m/4CpR6 +DiM+Eyke3vxPX+IhL+utTRt/qYz2q0UT9wem0xgRVqyWp4vN35ur7aSI+dALKBFT +RWPwo18wXTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMB +Af8EBTADAQH/MCkGA1UdDgQiBCBqIR7RiIC02zhngxyXeAmQJxO44yGlq1XswQTa +/C7sSTAKBggqhkjOPQQDAgNHADBEAiBSxokO+9hHG+FpYikoNpcma4AK6N1KI2B6 +WqI5xNyF4gIgIQx8Q6p6ynDfUGDJ43uTHPzwlt+o8gQ3A5w07L70ml0= +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt b/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt new file mode 100644 index 0000000..88a1e69 --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICNTCCAdygAwIBAgIRAN1F77OjzDmyWCzGuLyXHI8wCgYIKoZIzj0EAwIwbDEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l +eGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTlaMGwxCzAJ +BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh +bmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEaMBgGA1UEAxMRdGxzY2EuZXhh +bXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQkmbjr/9EK0m/4CpR6 +DiM+Eyke3vxPX+IhL+utTRt/qYz2q0UT9wem0xgRVqyWp4vN35ur7aSI+dALKBFT +RWPwo18wXTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMB +Af8EBTADAQH/MCkGA1UdDgQiBCBqIR7RiIC02zhngxyXeAmQJxO44yGlq1XswQTa +/C7sSTAKBggqhkjOPQQDAgNHADBEAiBSxokO+9hHG+FpYikoNpcma4AK6N1KI2B6 +WqI5xNyF4gIgIQx8Q6p6ynDfUGDJ43uTHPzwlt+o8gQ3A5w07L70ml0= +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt b/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt new file mode 100644 index 0000000..5f61f50 --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICWjCCAgCgAwIBAgIRAKk85zOKA4NKFQe/AmGxK7EwCgYIKoZIzj0EAwIwbDEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l +eGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTlaMFgxCzAJ +BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh +bmNpc2NvMRwwGgYDVQQDExNvcmRlcmVyLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0C +AQYIKoZIzj0DAQcDQgAE3Nve7G2pybxbA+S3bvKlP8BAR4kJG96Yd2k9UFc7+Mmd +XM5/7TeVCbaidnYpODYr2pNlzo8HijwoyvYxnN7U3aOBljCBkzAOBgNVHQ8BAf8E +BAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQC +MAAwKwYDVR0jBCQwIoAgaiEe0YiAtNs4Z4Mcl3gJkCcTuOMhpatV7MEE2vwu7Ekw +JwYDVR0RBCAwHoITb3JkZXJlci5leGFtcGxlLmNvbYIHb3JkZXJlcjAKBggqhkjO +PQQDAgNIADBFAiEAtW6SunJ0GXR2gZY2yOg4CAOLPqb3YB07/9byOSFYZygCIA77 +iitG1Mkvlc7fyNFcgYKDUpbXQBS5iTmAuo/cISDx +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.key b/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.key new file mode 100755 index 0000000..9096afb --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.key @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgUsf4CUpdmdIaax7T +qjCJaQLCsSU1/xaoETdgCCZ8fDihRANCAATc297sbanJvFsD5Ldu8qU/wEBHiQkb +3ph3aT1QVzv4yZ1czn/tN5UJtqJ2dik4Nivak2XOjweKPCjK9jGc3tTd +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/tlsca/6a211ed18880b4db3867831c977809902713b8e321a5ab55ecc104dafc2eec49_sk b/artifacts/channel/crypto-config/ordererOrganizations/example.com/tlsca/6a211ed18880b4db3867831c977809902713b8e321a5ab55ecc104dafc2eec49_sk new file mode 100755 index 0000000..0fc62a2 --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/tlsca/6a211ed18880b4db3867831c977809902713b8e321a5ab55ecc104dafc2eec49_sk @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQghjZ40AvUeupMV603 +i9pA9S8uNLz5i6TePeBgJZhrY/ihRANCAAQkmbjr/9EK0m/4CpR6DiM+Eyke3vxP +X+IhL+utTRt/qYz2q0UT9wem0xgRVqyWp4vN35ur7aSI+dALKBFTRWPw +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem b/artifacts/channel/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem new file mode 100644 index 0000000..88a1e69 --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICNTCCAdygAwIBAgIRAN1F77OjzDmyWCzGuLyXHI8wCgYIKoZIzj0EAwIwbDEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l +eGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTlaMGwxCzAJ +BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh +bmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEaMBgGA1UEAxMRdGxzY2EuZXhh +bXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQkmbjr/9EK0m/4CpR6 +DiM+Eyke3vxPX+IhL+utTRt/qYz2q0UT9wem0xgRVqyWp4vN35ur7aSI+dALKBFT +RWPwo18wXTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMB +Af8EBTADAQH/MCkGA1UdDgQiBCBqIR7RiIC02zhngxyXeAmQJxO44yGlq1XswQTa +/C7sSTAKBggqhkjOPQQDAgNHADBEAiBSxokO+9hHG+FpYikoNpcma4AK6N1KI2B6 +WqI5xNyF4gIgIQx8Q6p6ynDfUGDJ43uTHPzwlt+o8gQ3A5w07L70ml0= +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/admincerts/Admin@example.com-cert.pem b/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/admincerts/Admin@example.com-cert.pem new file mode 100644 index 0000000..4a1dbfa --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/admincerts/Admin@example.com-cert.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIICCjCCAbGgAwIBAgIRANPhTyHWZkTenKfX4eBv0ZUwCgYIKoZIzj0EAwIwaTEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt +cGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTlaMFYxCzAJBgNV +BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp +c2NvMRowGAYDVQQDDBFBZG1pbkBleGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqG +SM49AwEHA0IABKAyu7N4S2ZPQSzsAVF/mwwCewuu++MtfcMmUdeoIPFRBj1JMCnf +f88M0wj13gQSJQ6GfnUrT76G/L5fGxCUifWjTTBLMA4GA1UdDwEB/wQEAwIHgDAM +BgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIA1GzPDpQ2wbw7biv4DNsgLElDYE+Vxy +7g/4OdPsMAcZMAoGCCqGSM49BAMCA0cAMEQCIEdiGFLzeGMvVNubuZ3iuvRp/Pp6 +im3FmABwIbnMarabAiBIHWzz8Yxh9K5ZNkVNZX3fLZ4LlzsKBinbWH9J2wblDg== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/cacerts/ca.example.com-cert.pem b/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/cacerts/ca.example.com-cert.pem new file mode 100644 index 0000000..e83e629 --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/cacerts/ca.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICLjCCAdWgAwIBAgIQCeSxIA/5bBc/893OreC2kzAKBggqhkjOPQQDAjBpMQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w +bGUuY29tMB4XDTE3MDYyMzEyMzMxOVoXDTI3MDYyMTEyMzMxOVowaTELMAkGA1UE +BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz +Y28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFtcGxlLmNv +bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABDLDgDbpvii4qPRPFsXeYzgjnW8M +tnZyUD592tgnBlwj0X+Uuam76gR39dd1Cf8QvMSyB4KL3F1OFViZ5cn/ncqjXzBd +MA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMB +Af8wKQYDVR0OBCIEIA1GzPDpQ2wbw7biv4DNsgLElDYE+Vxy7g/4OdPsMAcZMAoG +CCqGSM49BAMCA0cAMEQCICXp7cNAHK6RQOFxE8Gpqy1B/FuLbmtYNqqBo5e1Pgly +AiAWH23pmnXngcjLHg3nGwa3oUlCyPD64ilFoCMdN9TRVg== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore/db670eed8487a93c35ae448b9f84c2f241a7a8c87df0544fc1dc08baf7832aa0_sk b/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore/db670eed8487a93c35ae448b9f84c2f241a7a8c87df0544fc1dc08baf7832aa0_sk new file mode 100755 index 0000000..06fdf97 --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore/db670eed8487a93c35ae448b9f84c2f241a7a8c87df0544fc1dc08baf7832aa0_sk @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg33NMbWc5E80ueSIA +iWqRlyC2M+1ce4shkkP/CVKOp4uhRANCAASgMruzeEtmT0Es7AFRf5sMAnsLrvvj +LX3DJlHXqCDxUQY9STAp33/PDNMI9d4EEiUOhn51K0++hvy+XxsQlIn1 +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/signcerts/Admin@example.com-cert.pem b/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/signcerts/Admin@example.com-cert.pem new file mode 100644 index 0000000..4a1dbfa --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/signcerts/Admin@example.com-cert.pem @@ -0,0 +1,13 @@ +-----BEGIN CERTIFICATE----- +MIICCjCCAbGgAwIBAgIRANPhTyHWZkTenKfX4eBv0ZUwCgYIKoZIzj0EAwIwaTEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt +cGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTlaMFYxCzAJBgNV +BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp +c2NvMRowGAYDVQQDDBFBZG1pbkBleGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqG +SM49AwEHA0IABKAyu7N4S2ZPQSzsAVF/mwwCewuu++MtfcMmUdeoIPFRBj1JMCnf +f88M0wj13gQSJQ6GfnUrT76G/L5fGxCUifWjTTBLMA4GA1UdDwEB/wQEAwIHgDAM +BgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIA1GzPDpQ2wbw7biv4DNsgLElDYE+Vxy +7g/4OdPsMAcZMAoGCCqGSM49BAMCA0cAMEQCIEdiGFLzeGMvVNubuZ3iuvRp/Pp6 +im3FmABwIbnMarabAiBIHWzz8Yxh9K5ZNkVNZX3fLZ4LlzsKBinbWH9J2wblDg== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/tlscacerts/tlsca.example.com-cert.pem b/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/tlscacerts/tlsca.example.com-cert.pem new file mode 100644 index 0000000..88a1e69 --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/tlscacerts/tlsca.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICNTCCAdygAwIBAgIRAN1F77OjzDmyWCzGuLyXHI8wCgYIKoZIzj0EAwIwbDEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l +eGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTlaMGwxCzAJ +BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh +bmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEaMBgGA1UEAxMRdGxzY2EuZXhh +bXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQkmbjr/9EK0m/4CpR6 +DiM+Eyke3vxPX+IhL+utTRt/qYz2q0UT9wem0xgRVqyWp4vN35ur7aSI+dALKBFT +RWPwo18wXTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMB +Af8EBTADAQH/MCkGA1UdDgQiBCBqIR7RiIC02zhngxyXeAmQJxO44yGlq1XswQTa +/C7sSTAKBggqhkjOPQQDAgNHADBEAiBSxokO+9hHG+FpYikoNpcma4AK6N1KI2B6 +WqI5xNyF4gIgIQx8Q6p6ynDfUGDJ43uTHPzwlt+o8gQ3A5w07L70ml0= +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/ca.crt b/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/ca.crt new file mode 100644 index 0000000..88a1e69 --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/ca.crt @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICNTCCAdygAwIBAgIRAN1F77OjzDmyWCzGuLyXHI8wCgYIKoZIzj0EAwIwbDEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l +eGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTlaMGwxCzAJ +BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh +bmNpc2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEaMBgGA1UEAxMRdGxzY2EuZXhh +bXBsZS5jb20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQkmbjr/9EK0m/4CpR6 +DiM+Eyke3vxPX+IhL+utTRt/qYz2q0UT9wem0xgRVqyWp4vN35ur7aSI+dALKBFT +RWPwo18wXTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMB +Af8EBTADAQH/MCkGA1UdDgQiBCBqIR7RiIC02zhngxyXeAmQJxO44yGlq1XswQTa +/C7sSTAKBggqhkjOPQQDAgNHADBEAiBSxokO+9hHG+FpYikoNpcma4AK6N1KI2B6 +WqI5xNyF4gIgIQx8Q6p6ynDfUGDJ43uTHPzwlt+o8gQ3A5w07L70ml0= +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/server.crt b/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/server.crt new file mode 100644 index 0000000..e920e6e --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/server.crt @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICKzCCAdKgAwIBAgIQF7ZJRSdZJSb9HEWyJaxQuDAKBggqhkjOPQQDAjBsMQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4 +YW1wbGUuY29tMB4XDTE3MDYyMzEyMzMxOVoXDTI3MDYyMTEyMzMxOVowVjELMAkG +A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu +Y2lzY28xGjAYBgNVBAMMEUFkbWluQGV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYI +KoZIzj0DAQcDQgAE+9xJbd39hXJw8Y49mtzzO1P/KaLjzkEAQGG7cnujbytJHRLL ++kHW2E02+ob8hAucwsjR/Sxg0J2yufaDxKWtSqNsMGowDgYDVR0PAQH/BAQDAgWg +MB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAMBgNVHRMBAf8EAjAAMCsG +A1UdIwQkMCKAIGohHtGIgLTbOGeDHJd4CZAnE7jjIaWrVezBBNr8LuxJMAoGCCqG +SM49BAMCA0cAMEQCIA5f8O7WfymKaLrJ71f77GGb/6z72Jh7g5svHDZBgKkBAiAg +fkCIypxeGnU1Vbo3vYauhqU6lQYO6VcVBhk3182wyQ== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/server.key b/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/server.key new file mode 100755 index 0000000..e8e021d --- /dev/null +++ b/artifacts/channel/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/server.key @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgixJReeen2sIgyqT6 +F0z2Y9iYIu++FVOGg7ha4FR6G2WhRANCAAT73Elt3f2FcnDxjj2a3PM7U/8pouPO +QQBAYbtye6NvK0kdEsv6QdbYTTb6hvyEC5zCyNH9LGDQnbK59oPEpa1K +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/ca/0e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011_sk b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/ca/0e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011_sk new file mode 100755 index 0000000..3c356ec --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/ca/0e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011_sk @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgp4Y9v/Cx/ee3K2mP +N62ttbG2y1NkppMN6MlycYpqtT2hRANCAAQohXCFPMmsvPN+QiP874DXwHXyTZxI +oRZ1Jt9ZkikUlJv3LDxCgSxu2TjCP0kkP/A5JrV4MP+lCit6MKbbkKYF +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem new file mode 100644 index 0000000..01ce790 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICQjCCAemgAwIBAgIQIR2LR9fa8xs5unnJJ9PFSzAKBggqhkjOPQQDAjBzMQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu +b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTla +MHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T +YW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMRwwGgYDVQQD +ExNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE +KIVwhTzJrLzzfkIj/O+A18B18k2cSKEWdSbfWZIpFJSb9yw8QoEsbtk4wj9JJD/w +OSa1eDD/pQorejCm25CmBaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYG +BFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgDnKSJOiz8xeEyKk8W472 +9MHJHZ5uV3xFwzFjYJ/kABEwCgYIKoZIzj0EAwIDRwAwRAIgMIO+yK3Fbwv1EXMc +tQam42i6ROxSanaAHrbY2oVC1fICICsMpdSS2kbdntUDayi09v4/WRtC59ExCrHl +rg/GXwkv +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem new file mode 100644 index 0000000..e716793 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICGTCCAb+gAwIBAgIQKKKdQSzsDoUYn/LPAuRWGTAKBggqhkjOPQQDAjBzMQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu +b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTla +MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T +YW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29tMFkw +EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECmbzUDozIrLKjp3OAzItSG7m7Flw76rT +8VO8E6otlCwxKtBRkPpZL7norC3NsjyE339J5O4pXCqhIApQyRRsRqNNMEswDgYD +VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgDnKSJOiz8xeE +yKk8W4729MHJHZ5uV3xFwzFjYJ/kABEwCgYIKoZIzj0EAwIDSAAwRQIhALT02pc/ +yfE/4wUJfUBQ32GifUEh8JktAXzL/73S0rjYAiACNSp6zAQBX9SBxTOGMk4cGGAy +CKqf8052NVUs2CvPzA== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem new file mode 100644 index 0000000..01ce790 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICQjCCAemgAwIBAgIQIR2LR9fa8xs5unnJJ9PFSzAKBggqhkjOPQQDAjBzMQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu +b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTla +MHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T +YW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMRwwGgYDVQQD +ExNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE +KIVwhTzJrLzzfkIj/O+A18B18k2cSKEWdSbfWZIpFJSb9yw8QoEsbtk4wj9JJD/w +OSa1eDD/pQorejCm25CmBaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYG +BFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgDnKSJOiz8xeEyKk8W472 +9MHJHZ5uV3xFwzFjYJ/kABEwCgYIKoZIzj0EAwIDRwAwRAIgMIO+yK3Fbwv1EXMc +tQam42i6ROxSanaAHrbY2oVC1fICICsMpdSS2kbdntUDayi09v4/WRtC59ExCrHl +rg/GXwkv +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem new file mode 100644 index 0000000..d4e6353 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAe+gAwIBAgIQZrCrf6SF3Z/w7z3PwCNaaTAKBggqhkjOPQQDAjB2MQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz +Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMz +MTlaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH +Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD +VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D +AQcDQgAEq4HHYbyF3O3iX+bt7tATNgdrWW6GYXWfKKJjsriBMhtYr5y/sTjvg64s +Z517Nx/QNj26yKLdZ9vSBUGhAUfedaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud +JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQglFCS2Tb1g4xa +b2SE25dNhXkzcGc30A0Ev2X3Tjl2+fgwCgYIKoZIzj0EAwIDSAAwRQIhANDFPsDw +14ftcZgQtMQ0yuMg8cCHj246rhsrnjwar7aAAiBwLG+4sKnTOOa+ceK6p+PpKu6F +qwkrkz69kT1ZsL7SXw== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem new file mode 100644 index 0000000..e716793 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICGTCCAb+gAwIBAgIQKKKdQSzsDoUYn/LPAuRWGTAKBggqhkjOPQQDAjBzMQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu +b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTla +MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T +YW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29tMFkw +EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECmbzUDozIrLKjp3OAzItSG7m7Flw76rT +8VO8E6otlCwxKtBRkPpZL7norC3NsjyE339J5O4pXCqhIApQyRRsRqNNMEswDgYD +VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgDnKSJOiz8xeE +yKk8W4729MHJHZ5uV3xFwzFjYJ/kABEwCgYIKoZIzj0EAwIDSAAwRQIhALT02pc/ +yfE/4wUJfUBQ32GifUEh8JktAXzL/73S0rjYAiACNSp6zAQBX9SBxTOGMk4cGGAy +CKqf8052NVUs2CvPzA== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem new file mode 100644 index 0000000..01ce790 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICQjCCAemgAwIBAgIQIR2LR9fa8xs5unnJJ9PFSzAKBggqhkjOPQQDAjBzMQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu +b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTla +MHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T +YW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMRwwGgYDVQQD +ExNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE +KIVwhTzJrLzzfkIj/O+A18B18k2cSKEWdSbfWZIpFJSb9yw8QoEsbtk4wj9JJD/w +OSa1eDD/pQorejCm25CmBaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYG +BFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgDnKSJOiz8xeEyKk8W472 +9MHJHZ5uV3xFwzFjYJ/kABEwCgYIKoZIzj0EAwIDRwAwRAIgMIO+yK3Fbwv1EXMc +tQam42i6ROxSanaAHrbY2oVC1fICICsMpdSS2kbdntUDayi09v4/WRtC59ExCrHl +rg/GXwkv +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/keystore/27db82c96b1482480baa1c75f80e5cce249beaab27b70c741bb0e2554355957e_sk b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/keystore/27db82c96b1482480baa1c75f80e5cce249beaab27b70c741bb0e2554355957e_sk new file mode 100755 index 0000000..04b22a2 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/keystore/27db82c96b1482480baa1c75f80e5cce249beaab27b70c741bb0e2554355957e_sk @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgTEPwtCyJ1jFk2qQs +oFgHzMo3/MEXG1XJHiTgoRYvnPahRANCAATNL2TaAIodxq3xaPhPacHW7ILxHbOD +e6bF1MvueaAVanS7IIJtBDEP9VL7xH/cM28QWS/OFyNz01T+dGoyKuku +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/signcerts/peer0.org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/signcerts/peer0.org1.example.com-cert.pem new file mode 100644 index 0000000..53158d4 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/signcerts/peer0.org1.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICGDCCAb+gAwIBAgIQPcMFFEB/vq6mEL6vXV7aUTAKBggqhkjOPQQDAjBzMQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu +b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTla +MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T +YW4gRnJhbmNpc2NvMR8wHQYDVQQDExZwZWVyMC5vcmcxLmV4YW1wbGUuY29tMFkw +EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEzS9k2gCKHcat8Wj4T2nB1uyC8R2zg3um +xdTL7nmgFWp0uyCCbQQxD/VS+8R/3DNvEFkvzhcjc9NU/nRqMirpLqNNMEswDgYD +VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgDnKSJOiz8xeE +yKk8W4729MHJHZ5uV3xFwzFjYJ/kABEwCgYIKoZIzj0EAwIDRwAwRAIgHBdxbHUG +rFUzKPX9UmmN3SwigWcRUREUy/GTb3hDIAsCIEF1BxTqv8ilQYE8ql0wJL4mTber +HE6DFYvvBCUnicUh +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem new file mode 100644 index 0000000..d4e6353 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAe+gAwIBAgIQZrCrf6SF3Z/w7z3PwCNaaTAKBggqhkjOPQQDAjB2MQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz +Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMz +MTlaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH +Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD +VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D +AQcDQgAEq4HHYbyF3O3iX+bt7tATNgdrWW6GYXWfKKJjsriBMhtYr5y/sTjvg64s +Z517Nx/QNj26yKLdZ9vSBUGhAUfedaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud +JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQglFCS2Tb1g4xa +b2SE25dNhXkzcGc30A0Ev2X3Tjl2+fgwCgYIKoZIzj0EAwIDSAAwRQIhANDFPsDw +14ftcZgQtMQ0yuMg8cCHj246rhsrnjwar7aAAiBwLG+4sKnTOOa+ceK6p+PpKu6F +qwkrkz69kT1ZsL7SXw== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt new file mode 100644 index 0000000..d4e6353 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAe+gAwIBAgIQZrCrf6SF3Z/w7z3PwCNaaTAKBggqhkjOPQQDAjB2MQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz +Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMz +MTlaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH +Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD +VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D +AQcDQgAEq4HHYbyF3O3iX+bt7tATNgdrWW6GYXWfKKJjsriBMhtYr5y/sTjvg64s +Z517Nx/QNj26yKLdZ9vSBUGhAUfedaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud +JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQglFCS2Tb1g4xa +b2SE25dNhXkzcGc30A0Ev2X3Tjl2+fgwCgYIKoZIzj0EAwIDSAAwRQIhANDFPsDw +14ftcZgQtMQ0yuMg8cCHj246rhsrnjwar7aAAiBwLG+4sKnTOOa+ceK6p+PpKu6F +qwkrkz69kT1ZsL7SXw== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt new file mode 100644 index 0000000..f34c5be --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE----- +MIICczCCAhmgAwIBAgIRAIKTnLyvyRImVvGtyrD0wH4wCgYIKoZIzj0EAwIwdjEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs +c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIz +MzE5WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE +BxMNU2FuIEZyYW5jaXNjbzEfMB0GA1UEAxMWcGVlcjAub3JnMS5leGFtcGxlLmNv +bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCZF1/1UYwnRJk2d+3zB0cW9oi8H +h7g6CaBw6aEI1WwgtKZ+/s28oQVUYBVJsdT3RAGgRRRt12QrqO/xa7/i1UejgaIw +gZ8wDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcD +AjAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIJRQktk29YOMWm9khNuXTYV5M3Bn +N9ANBL9l9045dvn4MDMGA1UdEQQsMCqCFnBlZXIwLm9yZzEuZXhhbXBsZS5jb22C +BXBlZXIwgglsb2NhbGhvc3QwCgYIKoZIzj0EAwIDSAAwRQIhAPs/YOkkkh2835Vb +pXtUuQNCi/PlhPhTiFlEdeE56vmmAiBadeHDYBIHkEA10wzr33wS1FpELg18eC5N +5gtmHzQUBA== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key new file mode 100755 index 0000000..d4a96e2 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgCRU1ZAMLxDAlcr5d +D6ZSprL4Lf0+TkWwN6rCFVWmjDuhRANCAAQmRdf9VGMJ0SZNnft8wdHFvaIvB4e4 +OgmgcOmhCNVsILSmfv7NvKEFVGAVSbHU90QBoEUUbddkK6jv8Wu/4tVH +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem new file mode 100644 index 0000000..e716793 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICGTCCAb+gAwIBAgIQKKKdQSzsDoUYn/LPAuRWGTAKBggqhkjOPQQDAjBzMQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu +b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTla +MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T +YW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29tMFkw +EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECmbzUDozIrLKjp3OAzItSG7m7Flw76rT +8VO8E6otlCwxKtBRkPpZL7norC3NsjyE339J5O4pXCqhIApQyRRsRqNNMEswDgYD +VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgDnKSJOiz8xeE +yKk8W4729MHJHZ5uV3xFwzFjYJ/kABEwCgYIKoZIzj0EAwIDSAAwRQIhALT02pc/ +yfE/4wUJfUBQ32GifUEh8JktAXzL/73S0rjYAiACNSp6zAQBX9SBxTOGMk4cGGAy +CKqf8052NVUs2CvPzA== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem new file mode 100644 index 0000000..01ce790 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICQjCCAemgAwIBAgIQIR2LR9fa8xs5unnJJ9PFSzAKBggqhkjOPQQDAjBzMQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu +b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTla +MHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T +YW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMRwwGgYDVQQD +ExNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE +KIVwhTzJrLzzfkIj/O+A18B18k2cSKEWdSbfWZIpFJSb9yw8QoEsbtk4wj9JJD/w +OSa1eDD/pQorejCm25CmBaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYG +BFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgDnKSJOiz8xeEyKk8W472 +9MHJHZ5uV3xFwzFjYJ/kABEwCgYIKoZIzj0EAwIDRwAwRAIgMIO+yK3Fbwv1EXMc +tQam42i6ROxSanaAHrbY2oVC1fICICsMpdSS2kbdntUDayi09v4/WRtC59ExCrHl +rg/GXwkv +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/keystore/fdee12a3510fde3155c37128cfec26090ae249bfbca28f884e60c21338493edd_sk b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/keystore/fdee12a3510fde3155c37128cfec26090ae249bfbca28f884e60c21338493edd_sk new file mode 100755 index 0000000..ae23cef --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/keystore/fdee12a3510fde3155c37128cfec26090ae249bfbca28f884e60c21338493edd_sk @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgtzNlo4v/qB1j5dJ6 +CRLQb9UAfUMMevXdnbuXUux2K2GhRANCAAQp09OJbb47IImVbghi7EWMxIgkyWZW +cIdx0/9u9wdzZFgO8K5ciuxXwGpyMnsbkdVCPZuPmCjahRunIGJ3/DLH +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/signcerts/peer1.org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/signcerts/peer1.org1.example.com-cert.pem new file mode 100644 index 0000000..35a225b --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/signcerts/peer1.org1.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICGjCCAcCgAwIBAgIRAI+BBtEBvpOqhfRZZH7eV/YwCgYIKoZIzj0EAwIwczEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh +Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIzMzE5 +WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN +U2FuIEZyYW5jaXNjbzEfMB0GA1UEAxMWcGVlcjEub3JnMS5leGFtcGxlLmNvbTBZ +MBMGByqGSM49AgEGCCqGSM49AwEHA0IABCnT04ltvjsgiZVuCGLsRYzEiCTJZlZw +h3HT/273B3NkWA7wrlyK7FfAanIyexuR1UI9m4+YKNqFG6cgYnf8MsejTTBLMA4G +A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIA5ykiTos/MX +hMipPFuO9vTByR2ebld8RcMxY2Cf5AARMAoGCCqGSM49BAMCA0gAMEUCIQCSRdWm +i4IgVUajvzWVxyE/wi7n617pVqS4+nJ7gbTRjQIgefzBwS+bkNhPc3/rktySFLRC +WMnq87KyqMLc6iRaJx0= +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem new file mode 100644 index 0000000..d4e6353 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAe+gAwIBAgIQZrCrf6SF3Z/w7z3PwCNaaTAKBggqhkjOPQQDAjB2MQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz +Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMz +MTlaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH +Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD +VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D +AQcDQgAEq4HHYbyF3O3iX+bt7tATNgdrWW6GYXWfKKJjsriBMhtYr5y/sTjvg64s +Z517Nx/QNj26yKLdZ9vSBUGhAUfedaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud +JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQglFCS2Tb1g4xa +b2SE25dNhXkzcGc30A0Ev2X3Tjl2+fgwCgYIKoZIzj0EAwIDSAAwRQIhANDFPsDw +14ftcZgQtMQ0yuMg8cCHj246rhsrnjwar7aAAiBwLG+4sKnTOOa+ceK6p+PpKu6F +qwkrkz69kT1ZsL7SXw== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt new file mode 100644 index 0000000..d4e6353 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAe+gAwIBAgIQZrCrf6SF3Z/w7z3PwCNaaTAKBggqhkjOPQQDAjB2MQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz +Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMz +MTlaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH +Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD +VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D +AQcDQgAEq4HHYbyF3O3iX+bt7tATNgdrWW6GYXWfKKJjsriBMhtYr5y/sTjvg64s +Z517Nx/QNj26yKLdZ9vSBUGhAUfedaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud +JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQglFCS2Tb1g4xa +b2SE25dNhXkzcGc30A0Ev2X3Tjl2+fgwCgYIKoZIzj0EAwIDSAAwRQIhANDFPsDw +14ftcZgQtMQ0yuMg8cCHj246rhsrnjwar7aAAiBwLG+4sKnTOOa+ceK6p+PpKu6F +qwkrkz69kT1ZsL7SXw== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.crt b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.crt new file mode 100644 index 0000000..15158a4 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.crt @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE----- +MIICczCCAhmgAwIBAgIRALZ2km4W6KjPQb9rM12Ewb4wCgYIKoZIzj0EAwIwdjEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs +c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIz +MzE5WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE +BxMNU2FuIEZyYW5jaXNjbzEfMB0GA1UEAxMWcGVlcjEub3JnMS5leGFtcGxlLmNv +bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABKpNWa4jf/Rk5bpSZqFYteLESkd7 +KbrSOoiqLJmYSvM+KjDRPt+/pjLBNKM60tvknTUslU6Jne/7CVx1FpiHjRGjgaIw +gZ8wDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcD +AjAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIJRQktk29YOMWm9khNuXTYV5M3Bn +N9ANBL9l9045dvn4MDMGA1UdEQQsMCqCFnBlZXIxLm9yZzEuZXhhbXBsZS5jb22C +BXBlZXIxgglsb2NhbGhvc3QwCgYIKoZIzj0EAwIDSAAwRQIhAKjhWT8ZdaYR2Hvx +hPUl3t6gDJmkVuhy2Mxin04XxrUUAiBmBN83NmGoluPHQnvtGQ1BQP/JpY+UCkMR +O0xeuEChjA== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.key b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.key new file mode 100755 index 0000000..5fa4ace --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/server.key @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgi4EN3aLIYYJMpLwD +r3yCKO+EBzcCcTA5QbNZ1SvDFa+hRANCAASqTVmuI3/0ZOW6UmahWLXixEpHeym6 +0jqIqiyZmErzPiow0T7fv6YywTSjOtLb5J01LJVOiZ3v+wlcdRaYh40R +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/tlsca/945092d936f5838c5a6f6484db974d857933706737d00d04bf65f74e3976f9f8_sk b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/tlsca/945092d936f5838c5a6f6484db974d857933706737d00d04bf65f74e3976f9f8_sk new file mode 100755 index 0000000..9d302e4 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/tlsca/945092d936f5838c5a6f6484db974d857933706737d00d04bf65f74e3976f9f8_sk @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg/I1tIO3Xr1ZlsJUm +FDoUo/CNIJXLPlpUxtB7/LjcNzahRANCAASrgcdhvIXc7eJf5u3u0BM2B2tZboZh +dZ8oomOyuIEyG1ivnL+xOO+DrixnnXs3H9A2PbrIot1n29IFQaEBR951 +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem new file mode 100644 index 0000000..d4e6353 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAe+gAwIBAgIQZrCrf6SF3Z/w7z3PwCNaaTAKBggqhkjOPQQDAjB2MQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz +Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMz +MTlaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH +Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD +VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D +AQcDQgAEq4HHYbyF3O3iX+bt7tATNgdrWW6GYXWfKKJjsriBMhtYr5y/sTjvg64s +Z517Nx/QNj26yKLdZ9vSBUGhAUfedaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud +JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQglFCS2Tb1g4xa +b2SE25dNhXkzcGc30A0Ev2X3Tjl2+fgwCgYIKoZIzj0EAwIDSAAwRQIhANDFPsDw +14ftcZgQtMQ0yuMg8cCHj246rhsrnjwar7aAAiBwLG+4sKnTOOa+ceK6p+PpKu6F +qwkrkz69kT1ZsL7SXw== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem new file mode 100644 index 0000000..e716793 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICGTCCAb+gAwIBAgIQKKKdQSzsDoUYn/LPAuRWGTAKBggqhkjOPQQDAjBzMQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu +b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTla +MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T +YW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29tMFkw +EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECmbzUDozIrLKjp3OAzItSG7m7Flw76rT +8VO8E6otlCwxKtBRkPpZL7norC3NsjyE339J5O4pXCqhIApQyRRsRqNNMEswDgYD +VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgDnKSJOiz8xeE +yKk8W4729MHJHZ5uV3xFwzFjYJ/kABEwCgYIKoZIzj0EAwIDSAAwRQIhALT02pc/ +yfE/4wUJfUBQ32GifUEh8JktAXzL/73S0rjYAiACNSp6zAQBX9SBxTOGMk4cGGAy +CKqf8052NVUs2CvPzA== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem new file mode 100644 index 0000000..01ce790 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICQjCCAemgAwIBAgIQIR2LR9fa8xs5unnJJ9PFSzAKBggqhkjOPQQDAjBzMQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu +b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTla +MHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T +YW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMRwwGgYDVQQD +ExNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE +KIVwhTzJrLzzfkIj/O+A18B18k2cSKEWdSbfWZIpFJSb9yw8QoEsbtk4wj9JJD/w +OSa1eDD/pQorejCm25CmBaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYG +BFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgDnKSJOiz8xeEyKk8W472 +9MHJHZ5uV3xFwzFjYJ/kABEwCgYIKoZIzj0EAwIDRwAwRAIgMIO+yK3Fbwv1EXMc +tQam42i6ROxSanaAHrbY2oVC1fICICsMpdSS2kbdntUDayi09v4/WRtC59ExCrHl +rg/GXwkv +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/5890f0061619c06fb29dea8cb304edecc020fe63f41a6db109f1e227cc1cb2a8_sk b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/5890f0061619c06fb29dea8cb304edecc020fe63f41a6db109f1e227cc1cb2a8_sk new file mode 100755 index 0000000..09b7d46 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/5890f0061619c06fb29dea8cb304edecc020fe63f41a6db109f1e227cc1cb2a8_sk @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgNmsvQQm4nwrxOKFX +UNfLPgjNm+FtYu3vb6OZ9q/5GbChRANCAAQKZvNQOjMissqOnc4DMi1IbubsWXDv +qtPxU7wTqi2ULDEq0FGQ+lkvueisLc2yPITff0nk7ilcKqEgClDJFGxG +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem new file mode 100644 index 0000000..e716793 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICGTCCAb+gAwIBAgIQKKKdQSzsDoUYn/LPAuRWGTAKBggqhkjOPQQDAjBzMQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu +b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTla +MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T +YW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29tMFkw +EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAECmbzUDozIrLKjp3OAzItSG7m7Flw76rT +8VO8E6otlCwxKtBRkPpZL7norC3NsjyE339J5O4pXCqhIApQyRRsRqNNMEswDgYD +VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgDnKSJOiz8xeE +yKk8W4729MHJHZ5uV3xFwzFjYJ/kABEwCgYIKoZIzj0EAwIDSAAwRQIhALT02pc/ +yfE/4wUJfUBQ32GifUEh8JktAXzL/73S0rjYAiACNSp6zAQBX9SBxTOGMk4cGGAy +CKqf8052NVUs2CvPzA== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem new file mode 100644 index 0000000..d4e6353 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAe+gAwIBAgIQZrCrf6SF3Z/w7z3PwCNaaTAKBggqhkjOPQQDAjB2MQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz +Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMz +MTlaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH +Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD +VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D +AQcDQgAEq4HHYbyF3O3iX+bt7tATNgdrWW6GYXWfKKJjsriBMhtYr5y/sTjvg64s +Z517Nx/QNj26yKLdZ9vSBUGhAUfedaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud +JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQglFCS2Tb1g4xa +b2SE25dNhXkzcGc30A0Ev2X3Tjl2+fgwCgYIKoZIzj0EAwIDSAAwRQIhANDFPsDw +14ftcZgQtMQ0yuMg8cCHj246rhsrnjwar7aAAiBwLG+4sKnTOOa+ceK6p+PpKu6F +qwkrkz69kT1ZsL7SXw== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/ca.crt b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/ca.crt new file mode 100644 index 0000000..d4e6353 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/ca.crt @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAe+gAwIBAgIQZrCrf6SF3Z/w7z3PwCNaaTAKBggqhkjOPQQDAjB2MQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz +Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMz +MTlaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH +Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD +VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D +AQcDQgAEq4HHYbyF3O3iX+bt7tATNgdrWW6GYXWfKKJjsriBMhtYr5y/sTjvg64s +Z517Nx/QNj26yKLdZ9vSBUGhAUfedaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud +JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQglFCS2Tb1g4xa +b2SE25dNhXkzcGc30A0Ev2X3Tjl2+fgwCgYIKoZIzj0EAwIDSAAwRQIhANDFPsDw +14ftcZgQtMQ0yuMg8cCHj246rhsrnjwar7aAAiBwLG+4sKnTOOa+ceK6p+PpKu6F +qwkrkz69kT1ZsL7SXw== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/server.crt b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/server.crt new file mode 100644 index 0000000..54c13d4 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/server.crt @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICOzCCAeKgAwIBAgIRALvUEE81tMguFRFvx00HyREwCgYIKoZIzj0EAwIwdjEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs +c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIz +MzE5WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE +BxMNU2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMS5leGFtcGxlLmNv +bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABCk0mXNbPIzN+YOJvx/0XnOVdb6G +RxNetOOuuWq+QBWLJhdlRKrhtI+NTiHKjq7UMmBNdIfBPC1YXHIGdeD2u+CjbDBq +MA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIw +DAYDVR0TAQH/BAIwADArBgNVHSMEJDAigCCUUJLZNvWDjFpvZITbl02FeTNwZzfQ +DQS/ZfdOOXb5+DAKBggqhkjOPQQDAgNHADBEAiAp9+XFJ2igUvUlvkFVLeH7sWHf ++Q4m47hVT/81vedY1gIgTSz5CufvmWnI5AgwCuw4D0w0eDPFAc1HkO1rlVo5icY= +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/server.key b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/server.key new file mode 100755 index 0000000..2cfab9b --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/server.key @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgfVrs13ZtxgKp8l5T +WAq2IXqgd+zF1V6sTh7rbQ104rShRANCAAQpNJlzWzyMzfmDib8f9F5zlXW+hkcT +XrTjrrlqvkAViyYXZUSq4bSPjU4hyo6u1DJgTXSHwTwtWFxyBnXg9rvg +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/admincerts/User1@org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/admincerts/User1@org1.example.com-cert.pem new file mode 100644 index 0000000..3776258 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/admincerts/User1@org1.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICGjCCAcCgAwIBAgIRANfNECvok9C6hT58XJZ/lJAwCgYIKoZIzj0EAwIwczEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh +Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIzMzE5 +WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN +U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMS5leGFtcGxlLmNvbTBZ +MBMGByqGSM49AgEGCCqGSM49AwEHA0IABHV6X/kWuQK6xhXe9OenQZKDI7/zax7Y +jYlRvUlHgCoqKIy8fFAat3glGbVX1oo2oZ7cMJVlFnbuiPdrg4vkyjejTTBLMA4G +A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIA5ykiTos/MX +hMipPFuO9vTByR2ebld8RcMxY2Cf5AARMAoGCCqGSM49BAMCA0gAMEUCIQDbCDrW +eqZ4yw7vcEhnNExiRZTv0xcVbRF8JgGozLz6qwIgZoXcqxvkJaBdZpwzg4f0RvVQ +QrjJMURXXchQ1Mnd5+o= +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem new file mode 100644 index 0000000..01ce790 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICQjCCAemgAwIBAgIQIR2LR9fa8xs5unnJJ9PFSzAKBggqhkjOPQQDAjBzMQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu +b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTla +MHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T +YW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMRwwGgYDVQQD +ExNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE +KIVwhTzJrLzzfkIj/O+A18B18k2cSKEWdSbfWZIpFJSb9yw8QoEsbtk4wj9JJD/w +OSa1eDD/pQorejCm25CmBaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYG +BFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgDnKSJOiz8xeEyKk8W472 +9MHJHZ5uV3xFwzFjYJ/kABEwCgYIKoZIzj0EAwIDRwAwRAIgMIO+yK3Fbwv1EXMc +tQam42i6ROxSanaAHrbY2oVC1fICICsMpdSS2kbdntUDayi09v4/WRtC59ExCrHl +rg/GXwkv +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore/73cdc0072c7203f1ec512232c780fc84acc9752ef30ebc16be1f4666c02b614b_sk b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore/73cdc0072c7203f1ec512232c780fc84acc9752ef30ebc16be1f4666c02b614b_sk new file mode 100755 index 0000000..37d8e8d --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore/73cdc0072c7203f1ec512232c780fc84acc9752ef30ebc16be1f4666c02b614b_sk @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgaYlbFIz6yVz0SYqh +nrhdTCb797PBwSwtCw9HtOkbqQGhRANCAAR1el/5FrkCusYV3vTnp0GSgyO/82se +2I2JUb1JR4AqKiiMvHxQGrd4JRm1V9aKNqGe3DCVZRZ27oj3a4OL5Mo3 +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/signcerts/User1@org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/signcerts/User1@org1.example.com-cert.pem new file mode 100644 index 0000000..3776258 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/signcerts/User1@org1.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICGjCCAcCgAwIBAgIRANfNECvok9C6hT58XJZ/lJAwCgYIKoZIzj0EAwIwczEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh +Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIzMzE5 +WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN +U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMS5leGFtcGxlLmNvbTBZ +MBMGByqGSM49AgEGCCqGSM49AwEHA0IABHV6X/kWuQK6xhXe9OenQZKDI7/zax7Y +jYlRvUlHgCoqKIy8fFAat3glGbVX1oo2oZ7cMJVlFnbuiPdrg4vkyjejTTBLMA4G +A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIA5ykiTos/MX +hMipPFuO9vTByR2ebld8RcMxY2Cf5AARMAoGCCqGSM49BAMCA0gAMEUCIQDbCDrW +eqZ4yw7vcEhnNExiRZTv0xcVbRF8JgGozLz6qwIgZoXcqxvkJaBdZpwzg4f0RvVQ +QrjJMURXXchQ1Mnd5+o= +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem new file mode 100644 index 0000000..d4e6353 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAe+gAwIBAgIQZrCrf6SF3Z/w7z3PwCNaaTAKBggqhkjOPQQDAjB2MQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz +Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMz +MTlaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH +Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD +VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D +AQcDQgAEq4HHYbyF3O3iX+bt7tATNgdrWW6GYXWfKKJjsriBMhtYr5y/sTjvg64s +Z517Nx/QNj26yKLdZ9vSBUGhAUfedaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud +JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQglFCS2Tb1g4xa +b2SE25dNhXkzcGc30A0Ev2X3Tjl2+fgwCgYIKoZIzj0EAwIDSAAwRQIhANDFPsDw +14ftcZgQtMQ0yuMg8cCHj246rhsrnjwar7aAAiBwLG+4sKnTOOa+ceK6p+PpKu6F +qwkrkz69kT1ZsL7SXw== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/ca.crt b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/ca.crt new file mode 100644 index 0000000..d4e6353 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/ca.crt @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAe+gAwIBAgIQZrCrf6SF3Z/w7z3PwCNaaTAKBggqhkjOPQQDAjB2MQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz +Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMz +MTlaMHYxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH +Ew1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMR8wHQYD +VQQDExZ0bHNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0D +AQcDQgAEq4HHYbyF3O3iX+bt7tATNgdrWW6GYXWfKKJjsriBMhtYr5y/sTjvg64s +Z517Nx/QNj26yKLdZ9vSBUGhAUfedaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1Ud +JQQIMAYGBFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQglFCS2Tb1g4xa +b2SE25dNhXkzcGc30A0Ev2X3Tjl2+fgwCgYIKoZIzj0EAwIDSAAwRQIhANDFPsDw +14ftcZgQtMQ0yuMg8cCHj246rhsrnjwar7aAAiBwLG+4sKnTOOa+ceK6p+PpKu6F +qwkrkz69kT1ZsL7SXw== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/server.crt b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/server.crt new file mode 100644 index 0000000..20a1182 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/server.crt @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICOjCCAeGgAwIBAgIQSEKNVPcBOB7Kgrrzf05rJjAKBggqhkjOPQQDAjB2MQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz +Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMz +MTlaMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH +Ew1TYW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZVc2VyMUBvcmcxLmV4YW1wbGUuY29t +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEyHrGhNgy26huH3hNap1UMtQRBVIx +xTX0NqIbUMKcBSw9DRF0ndZHd5KQUVrj5t2/QY+YSpqK6ufDk68fWSAZ7KNsMGow +DgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAM +BgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIJRQktk29YOMWm9khNuXTYV5M3BnN9AN +BL9l9045dvn4MAoGCCqGSM49BAMCA0cAMEQCIE6HCTr9in2CqF6S+m/aGCVQrZwK +/o3oyXdcymDc/PbDAiAHIRDkIw1mU31KNhvPd6f8c/sReVDr3PQLydWh/HJpTQ== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/server.key b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/server.key new file mode 100755 index 0000000..f23e877 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/server.key @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgOXZUBNCAmIwJR3bt +GfoOwtmo3QunwcBnBBUPjot4frihRANCAATIesaE2DLbqG4feE1qnVQy1BEFUjHF +NfQ2ohtQwpwFLD0NEXSd1kd3kpBRWuPm3b9Bj5hKmorq58OTrx9ZIBns +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/ca/a7d47efa46a6ba07730c850fed2c1375df27360d7227f48cdc2f80e505678005_sk b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/ca/a7d47efa46a6ba07730c850fed2c1375df27360d7227f48cdc2f80e505678005_sk new file mode 100755 index 0000000..3f732ae --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/ca/a7d47efa46a6ba07730c850fed2c1375df27360d7227f48cdc2f80e505678005_sk @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgUgMy/PQKxjfxITFM +mVPTu4ZwQlhYIh1vJkn3dkjqDBShRANCAARVtStps/F2HsCLFIdah6iJhTW6Vvro +DQ/HOkGAfPZjzjB4cYpfaRNX19I/9fPnuLqIWxSjj/FEwdeXNX/5hUhH +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem new file mode 100644 index 0000000..a26e1ec --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICQzCCAeqgAwIBAgIRAJEAD5YytxsnFjw+liBjOQkwCgYIKoZIzj0EAwIwczEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh +Lm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIzMzE5 +WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN +U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UE +AxMTY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA +BFW1K2mz8XYewIsUh1qHqImFNbpW+ugND8c6QYB89mPOMHhxil9pE1fX0j/18+e4 +uohbFKOP8UTB15c1f/mFSEejXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG +BgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIKfUfvpGproHcwyFD+0s +E3XfJzYNcif0jNwvgOUFZ4AFMAoGCCqGSM49BAMCA0cAMEQCIGrkModOvz6mcUDA +Zql4YPXU/3ZUbMLw8VuSNHh47lg7AiAPLSKy/v8y8mhebGRCNTYwdkidQCQFrh+2 +BIirBFsT0g== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/msp/admincerts/Admin@org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/msp/admincerts/Admin@org2.example.com-cert.pem new file mode 100644 index 0000000..93086ac --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/msp/admincerts/Admin@org2.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICGjCCAcCgAwIBAgIRAIUbkOONvaq2DLJr9qZbDKwwCgYIKoZIzj0EAwIwczEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh +Lm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIzMzE5 +WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN +U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMi5leGFtcGxlLmNvbTBZ +MBMGByqGSM49AgEGCCqGSM49AwEHA0IABMLKHXm1xN7Tk4YzaWg4GYhLoyNjrjs5 +302o37m12U8LorR7IL5fdFgYILeL4XUPjC/QG4E2o6hPl3uZPUVErbajTTBLMA4G +A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIKfUfvpGproH +cwyFD+0sE3XfJzYNcif0jNwvgOUFZ4AFMAoGCCqGSM49BAMCA0gAMEUCIQDa1k6R ++luypvng6JMSKIyibptkwICToEAZlDqLeD+k1gIgGFXm1+p1QqxViOa+c1dUvjl0 +m1UCqGDwNTHDm5mO+es= +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem new file mode 100644 index 0000000..a26e1ec --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICQzCCAeqgAwIBAgIRAJEAD5YytxsnFjw+liBjOQkwCgYIKoZIzj0EAwIwczEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh +Lm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIzMzE5 +WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN +U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UE +AxMTY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA +BFW1K2mz8XYewIsUh1qHqImFNbpW+ugND8c6QYB89mPOMHhxil9pE1fX0j/18+e4 +uohbFKOP8UTB15c1f/mFSEejXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG +BgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIKfUfvpGproHcwyFD+0s +E3XfJzYNcif0jNwvgOUFZ4AFMAoGCCqGSM49BAMCA0cAMEQCIGrkModOvz6mcUDA +Zql4YPXU/3ZUbMLw8VuSNHh47lg7AiAPLSKy/v8y8mhebGRCNTYwdkidQCQFrh+2 +BIirBFsT0g== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem new file mode 100644 index 0000000..6d01d67 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAfCgAwIBAgIRANX86HJQn/543CANoioLOegwCgYIKoZIzj0EAwIwdjEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs +c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIz +MzE5WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE +BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G +A1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 +AwEHA0IABBp+58H8VypXHB9Hf/1ExZTmNdcBlTUgAmHH5sb9DizHXwljo6zdyXfZ +cLvTCpoLybJ/rnp4PKJ7NKUDmrQymLWjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV +HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIHu4uj/xHTyM +9ZK9QyYGLnfQasSWPHt65FkoTfvT61qsMAoGCCqGSM49BAMCA0cAMEQCIBJ9N4PD +mB+2gAPeDWYteAZ5Q2KR/E0zMQ13pDSunHNcAiBwWRzwscXxCPOJp1sjBMVp5Z1a +nfIdbwvBbsl1XV/j0g== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/admincerts/Admin@org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/admincerts/Admin@org2.example.com-cert.pem new file mode 100644 index 0000000..93086ac --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/admincerts/Admin@org2.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICGjCCAcCgAwIBAgIRAIUbkOONvaq2DLJr9qZbDKwwCgYIKoZIzj0EAwIwczEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh +Lm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIzMzE5 +WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN +U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMi5leGFtcGxlLmNvbTBZ +MBMGByqGSM49AgEGCCqGSM49AwEHA0IABMLKHXm1xN7Tk4YzaWg4GYhLoyNjrjs5 +302o37m12U8LorR7IL5fdFgYILeL4XUPjC/QG4E2o6hPl3uZPUVErbajTTBLMA4G +A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIKfUfvpGproH +cwyFD+0sE3XfJzYNcif0jNwvgOUFZ4AFMAoGCCqGSM49BAMCA0gAMEUCIQDa1k6R ++luypvng6JMSKIyibptkwICToEAZlDqLeD+k1gIgGFXm1+p1QqxViOa+c1dUvjl0 +m1UCqGDwNTHDm5mO+es= +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem new file mode 100644 index 0000000..a26e1ec --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICQzCCAeqgAwIBAgIRAJEAD5YytxsnFjw+liBjOQkwCgYIKoZIzj0EAwIwczEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh +Lm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIzMzE5 +WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN +U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UE +AxMTY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA +BFW1K2mz8XYewIsUh1qHqImFNbpW+ugND8c6QYB89mPOMHhxil9pE1fX0j/18+e4 +uohbFKOP8UTB15c1f/mFSEejXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG +BgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIKfUfvpGproHcwyFD+0s +E3XfJzYNcif0jNwvgOUFZ4AFMAoGCCqGSM49BAMCA0cAMEQCIGrkModOvz6mcUDA +Zql4YPXU/3ZUbMLw8VuSNHh47lg7AiAPLSKy/v8y8mhebGRCNTYwdkidQCQFrh+2 +BIirBFsT0g== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/keystore/0d9f72608133ee627b570b6af6877666bc8f365746f9329d6dd8a5f54e53e2ab_sk b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/keystore/0d9f72608133ee627b570b6af6877666bc8f365746f9329d6dd8a5f54e53e2ab_sk new file mode 100755 index 0000000..d9e2dfd --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/keystore/0d9f72608133ee627b570b6af6877666bc8f365746f9329d6dd8a5f54e53e2ab_sk @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgNYZ86CFF4Iz0K+sE +HMg3lSS+mo5lRIFFLUOGrfseqhOhRANCAAT/Dd/SwXAdKicm97/WPViD32Bzn1j5 +2k/FslsxorK2Lx1Rfhi3wyxa40LNLjfED7E7KmJZ1w7PzI7+7WWhPTbq +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/signcerts/peer0.org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/signcerts/peer0.org2.example.com-cert.pem new file mode 100644 index 0000000..511295c --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/signcerts/peer0.org2.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICGjCCAcCgAwIBAgIRANDlqX1daKI2aN0Qm7vrfKAwCgYIKoZIzj0EAwIwczEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh +Lm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIzMzE5 +WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN +U2FuIEZyYW5jaXNjbzEfMB0GA1UEAxMWcGVlcjAub3JnMi5leGFtcGxlLmNvbTBZ +MBMGByqGSM49AgEGCCqGSM49AwEHA0IABP8N39LBcB0qJyb3v9Y9WIPfYHOfWPna +T8WyWzGisrYvHVF+GLfDLFrjQs0uN8QPsTsqYlnXDs/Mjv7tZaE9NuqjTTBLMA4G +A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIKfUfvpGproH +cwyFD+0sE3XfJzYNcif0jNwvgOUFZ4AFMAoGCCqGSM49BAMCA0gAMEUCIQDa1gKe +PRVRN/i8hUptACw02V7V9Yeo7kKlbQ6vWU5fqAIgXg2xAQ4TjwXOHlKbIyYZ7fox +cekBJ+E8yAFm8XQrfy0= +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem new file mode 100644 index 0000000..6d01d67 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAfCgAwIBAgIRANX86HJQn/543CANoioLOegwCgYIKoZIzj0EAwIwdjEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs +c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIz +MzE5WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE +BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G +A1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 +AwEHA0IABBp+58H8VypXHB9Hf/1ExZTmNdcBlTUgAmHH5sb9DizHXwljo6zdyXfZ +cLvTCpoLybJ/rnp4PKJ7NKUDmrQymLWjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV +HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIHu4uj/xHTyM +9ZK9QyYGLnfQasSWPHt65FkoTfvT61qsMAoGCCqGSM49BAMCA0cAMEQCIBJ9N4PD +mB+2gAPeDWYteAZ5Q2KR/E0zMQ13pDSunHNcAiBwWRzwscXxCPOJp1sjBMVp5Z1a +nfIdbwvBbsl1XV/j0g== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt new file mode 100644 index 0000000..6d01d67 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAfCgAwIBAgIRANX86HJQn/543CANoioLOegwCgYIKoZIzj0EAwIwdjEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs +c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIz +MzE5WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE +BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G +A1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 +AwEHA0IABBp+58H8VypXHB9Hf/1ExZTmNdcBlTUgAmHH5sb9DizHXwljo6zdyXfZ +cLvTCpoLybJ/rnp4PKJ7NKUDmrQymLWjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV +HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIHu4uj/xHTyM +9ZK9QyYGLnfQasSWPHt65FkoTfvT61qsMAoGCCqGSM49BAMCA0cAMEQCIBJ9N4PD +mB+2gAPeDWYteAZ5Q2KR/E0zMQ13pDSunHNcAiBwWRzwscXxCPOJp1sjBMVp5Z1a +nfIdbwvBbsl1XV/j0g== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.crt b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.crt new file mode 100644 index 0000000..0ab4714 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.crt @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE----- +MIICcjCCAhmgAwIBAgIRAKTjFkKbLMrbEP10dpOEqz4wCgYIKoZIzj0EAwIwdjEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs +c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIz +MzE5WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE +BxMNU2FuIEZyYW5jaXNjbzEfMB0GA1UEAxMWcGVlcjAub3JnMi5leGFtcGxlLmNv +bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABMDiCfhksPZRhxpGyowvLu8lQjC6 +H4y/SiQuTbhG+ZXK99VRyDDoKzkyzDpUxMco1xvD3gafSDvrXrKlZObN9bOjgaIw +gZ8wDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcD +AjAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIHu4uj/xHTyM9ZK9QyYGLnfQasSW +PHt65FkoTfvT61qsMDMGA1UdEQQsMCqCFnBlZXIwLm9yZzIuZXhhbXBsZS5jb22C +BXBlZXIwgglsb2NhbGhvc3QwCgYIKoZIzj0EAwIDRwAwRAIgf1MZC8BVgrxO76J+ +aCGntiQsicgU1DPMt5l45jXiEeECIAHHYsIZcV8GW7iyKQevvdXSQ3JC7XgyuPrm +eDhWmPcO +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.key b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.key new file mode 100755 index 0000000..babe991 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.key @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgVlcwZfAKBQZ+W/JX +w64rHF3JiaddhBcUfxk7WuyZxrChRANCAATA4gn4ZLD2UYcaRsqMLy7vJUIwuh+M +v0okLk24RvmVyvfVUcgw6Cs5Msw6VMTHKNcbw94Gn0g7616ypWTmzfWz +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/admincerts/Admin@org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/admincerts/Admin@org2.example.com-cert.pem new file mode 100644 index 0000000..93086ac --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/admincerts/Admin@org2.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICGjCCAcCgAwIBAgIRAIUbkOONvaq2DLJr9qZbDKwwCgYIKoZIzj0EAwIwczEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh +Lm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIzMzE5 +WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN +U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMi5leGFtcGxlLmNvbTBZ +MBMGByqGSM49AgEGCCqGSM49AwEHA0IABMLKHXm1xN7Tk4YzaWg4GYhLoyNjrjs5 +302o37m12U8LorR7IL5fdFgYILeL4XUPjC/QG4E2o6hPl3uZPUVErbajTTBLMA4G +A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIKfUfvpGproH +cwyFD+0sE3XfJzYNcif0jNwvgOUFZ4AFMAoGCCqGSM49BAMCA0gAMEUCIQDa1k6R ++luypvng6JMSKIyibptkwICToEAZlDqLeD+k1gIgGFXm1+p1QqxViOa+c1dUvjl0 +m1UCqGDwNTHDm5mO+es= +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem new file mode 100644 index 0000000..a26e1ec --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICQzCCAeqgAwIBAgIRAJEAD5YytxsnFjw+liBjOQkwCgYIKoZIzj0EAwIwczEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh +Lm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIzMzE5 +WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN +U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UE +AxMTY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA +BFW1K2mz8XYewIsUh1qHqImFNbpW+ugND8c6QYB89mPOMHhxil9pE1fX0j/18+e4 +uohbFKOP8UTB15c1f/mFSEejXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG +BgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIKfUfvpGproHcwyFD+0s +E3XfJzYNcif0jNwvgOUFZ4AFMAoGCCqGSM49BAMCA0cAMEQCIGrkModOvz6mcUDA +Zql4YPXU/3ZUbMLw8VuSNHh47lg7AiAPLSKy/v8y8mhebGRCNTYwdkidQCQFrh+2 +BIirBFsT0g== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/keystore/27ccb54a06020260c66c65bec91f91e1c9043e3076d3d6128692e7271c4c7a2c_sk b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/keystore/27ccb54a06020260c66c65bec91f91e1c9043e3076d3d6128692e7271c4c7a2c_sk new file mode 100755 index 0000000..fdd7fa7 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/keystore/27ccb54a06020260c66c65bec91f91e1c9043e3076d3d6128692e7271c4c7a2c_sk @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgtRT9fcsCMexhHlCO +dfzBqkDIfC88UFE51dYxRHDSrMShRANCAAS4r7MB6WDw96YKpJIzOvqhXs1dQ3XQ +5QMMX4aOwVLT1vZHOkPghRr2wMhJeQs1vVY+5RcnOWy6OyB/oYCCIPka +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/signcerts/peer1.org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/signcerts/peer1.org2.example.com-cert.pem new file mode 100644 index 0000000..19868dd --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/signcerts/peer1.org2.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICGTCCAb+gAwIBAgIQKeRyEPaHSUPvshfEtmg9tzAKBggqhkjOPQQDAjBzMQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu +b3JnMi5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMzMTla +MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T +YW4gRnJhbmNpc2NvMR8wHQYDVQQDExZwZWVyMS5vcmcyLmV4YW1wbGUuY29tMFkw +EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEuK+zAelg8PemCqSSMzr6oV7NXUN10OUD +DF+GjsFS09b2RzpD4IUa9sDISXkLNb1WPuUXJzlsujsgf6GAgiD5GqNNMEswDgYD +VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgp9R++kamugdz +DIUP7SwTdd8nNg1yJ/SM3C+A5QVngAUwCgYIKoZIzj0EAwIDSAAwRQIhAMIQLWEv +wpaNibkXEGJlT0IzSIBsCjMJD7VaqZLKm5h9AiAlYmNBB8siyLLxFawvEB/4F26x +e1jgyza7Yg+ardDzlw== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem new file mode 100644 index 0000000..6d01d67 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAfCgAwIBAgIRANX86HJQn/543CANoioLOegwCgYIKoZIzj0EAwIwdjEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs +c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIz +MzE5WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE +BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G +A1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 +AwEHA0IABBp+58H8VypXHB9Hf/1ExZTmNdcBlTUgAmHH5sb9DizHXwljo6zdyXfZ +cLvTCpoLybJ/rnp4PKJ7NKUDmrQymLWjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV +HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIHu4uj/xHTyM +9ZK9QyYGLnfQasSWPHt65FkoTfvT61qsMAoGCCqGSM49BAMCA0cAMEQCIBJ9N4PD +mB+2gAPeDWYteAZ5Q2KR/E0zMQ13pDSunHNcAiBwWRzwscXxCPOJp1sjBMVp5Z1a +nfIdbwvBbsl1XV/j0g== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt new file mode 100644 index 0000000..6d01d67 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAfCgAwIBAgIRANX86HJQn/543CANoioLOegwCgYIKoZIzj0EAwIwdjEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs +c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIz +MzE5WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE +BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G +A1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 +AwEHA0IABBp+58H8VypXHB9Hf/1ExZTmNdcBlTUgAmHH5sb9DizHXwljo6zdyXfZ +cLvTCpoLybJ/rnp4PKJ7NKUDmrQymLWjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV +HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIHu4uj/xHTyM +9ZK9QyYGLnfQasSWPHt65FkoTfvT61qsMAoGCCqGSM49BAMCA0cAMEQCIBJ9N4PD +mB+2gAPeDWYteAZ5Q2KR/E0zMQ13pDSunHNcAiBwWRzwscXxCPOJp1sjBMVp5Z1a +nfIdbwvBbsl1XV/j0g== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/server.crt b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/server.crt new file mode 100644 index 0000000..f75611a --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/server.crt @@ -0,0 +1,16 @@ +-----BEGIN CERTIFICATE----- +MIICcjCCAhigAwIBAgIQEV3hkn7yJpdb29dDQvTKWDAKBggqhkjOPQQDAjB2MQsw +CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy +YW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz +Y2Eub3JnMi5leGFtcGxlLmNvbTAeFw0xNzA2MjMxMjMzMTlaFw0yNzA2MjExMjMz +MTlaMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH +Ew1TYW4gRnJhbmNpc2NvMR8wHQYDVQQDExZwZWVyMS5vcmcyLmV4YW1wbGUuY29t +MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEpXRG2CwqI+F0UoMSImo3In9R7lze +S+DuL1pLOjF5s05kVAcH604/9FRI61ujvWp4mYXornB+R1pcQwtolYNzPKOBojCB +nzAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMC +MAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAge7i6P/EdPIz1kr1DJgYud9BqxJY8 +e3rkWShN+9PrWqwwMwYDVR0RBCwwKoIWcGVlcjEub3JnMi5leGFtcGxlLmNvbYIF +cGVlcjGCCWxvY2FsaG9zdDAKBggqhkjOPQQDAgNIADBFAiEAmzFD5Dd4yR5lKy44 +Jdz4hy5AtRLQAmhlmLhli46z0r8CIDXFZJ7EwiD3F/jBT6906IFizjr9CD/DtOC9 +bxT5JhIN +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/server.key b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/server.key new file mode 100755 index 0000000..8901783 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/server.key @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgxFdgRfevcXrABROv +sV6HvrpoN5PHW6qXIFj71CAwtzyhRANCAASldEbYLCoj4XRSgxIiajcif1HuXN5L +4O4vWks6MXmzTmRUBwfrTj/0VEjrW6O9aniZheiucH5HWlxDC2iVg3M8 +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/tlsca/7bb8ba3ff11d3c8cf592bd4326062e77d06ac4963c7b7ae459284dfbd3eb5aac_sk b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/tlsca/7bb8ba3ff11d3c8cf592bd4326062e77d06ac4963c7b7ae459284dfbd3eb5aac_sk new file mode 100755 index 0000000..e4f49a0 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/tlsca/7bb8ba3ff11d3c8cf592bd4326062e77d06ac4963c7b7ae459284dfbd3eb5aac_sk @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgXu7VBLhnEUi4mu4d +tU1nT4lcMR9aoG29s5hLPmIKH/mhRANCAAQafufB/FcqVxwfR3/9RMWU5jXXAZU1 +IAJhx+bG/Q4sx18JY6Os3cl32XC70wqaC8myf656eDyiezSlA5q0Mpi1 +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem new file mode 100644 index 0000000..6d01d67 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAfCgAwIBAgIRANX86HJQn/543CANoioLOegwCgYIKoZIzj0EAwIwdjEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs +c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIz +MzE5WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE +BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G +A1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 +AwEHA0IABBp+58H8VypXHB9Hf/1ExZTmNdcBlTUgAmHH5sb9DizHXwljo6zdyXfZ +cLvTCpoLybJ/rnp4PKJ7NKUDmrQymLWjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV +HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIHu4uj/xHTyM +9ZK9QyYGLnfQasSWPHt65FkoTfvT61qsMAoGCCqGSM49BAMCA0cAMEQCIBJ9N4PD +mB+2gAPeDWYteAZ5Q2KR/E0zMQ13pDSunHNcAiBwWRzwscXxCPOJp1sjBMVp5Z1a +nfIdbwvBbsl1XV/j0g== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/admincerts/Admin@org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/admincerts/Admin@org2.example.com-cert.pem new file mode 100644 index 0000000..93086ac --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/admincerts/Admin@org2.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICGjCCAcCgAwIBAgIRAIUbkOONvaq2DLJr9qZbDKwwCgYIKoZIzj0EAwIwczEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh +Lm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIzMzE5 +WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN +U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMi5leGFtcGxlLmNvbTBZ +MBMGByqGSM49AgEGCCqGSM49AwEHA0IABMLKHXm1xN7Tk4YzaWg4GYhLoyNjrjs5 +302o37m12U8LorR7IL5fdFgYILeL4XUPjC/QG4E2o6hPl3uZPUVErbajTTBLMA4G +A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIKfUfvpGproH +cwyFD+0sE3XfJzYNcif0jNwvgOUFZ4AFMAoGCCqGSM49BAMCA0gAMEUCIQDa1k6R ++luypvng6JMSKIyibptkwICToEAZlDqLeD+k1gIgGFXm1+p1QqxViOa+c1dUvjl0 +m1UCqGDwNTHDm5mO+es= +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem new file mode 100644 index 0000000..a26e1ec --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICQzCCAeqgAwIBAgIRAJEAD5YytxsnFjw+liBjOQkwCgYIKoZIzj0EAwIwczEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh +Lm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIzMzE5 +WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN +U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UE +AxMTY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA +BFW1K2mz8XYewIsUh1qHqImFNbpW+ugND8c6QYB89mPOMHhxil9pE1fX0j/18+e4 +uohbFKOP8UTB15c1f/mFSEejXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG +BgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIKfUfvpGproHcwyFD+0s +E3XfJzYNcif0jNwvgOUFZ4AFMAoGCCqGSM49BAMCA0cAMEQCIGrkModOvz6mcUDA +Zql4YPXU/3ZUbMLw8VuSNHh47lg7AiAPLSKy/v8y8mhebGRCNTYwdkidQCQFrh+2 +BIirBFsT0g== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/1995b11d6573ed3be52fcd7a5fa477bc0f183e1f5f398c8281d0ce7c2c75a076_sk b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/1995b11d6573ed3be52fcd7a5fa477bc0f183e1f5f398c8281d0ce7c2c75a076_sk new file mode 100755 index 0000000..09b1c6a --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/1995b11d6573ed3be52fcd7a5fa477bc0f183e1f5f398c8281d0ce7c2c75a076_sk @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgHa4xvmGVQJV5wrMj +KttcA0hh/Yz0dezmXlRLjNk9HyahRANCAATCyh15tcTe05OGM2loOBmIS6MjY647 +Od9NqN+5tdlPC6K0eyC+X3RYGCC3i+F1D4wv0BuBNqOoT5d7mT1FRK22 +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem new file mode 100644 index 0000000..93086ac --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICGjCCAcCgAwIBAgIRAIUbkOONvaq2DLJr9qZbDKwwCgYIKoZIzj0EAwIwczEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh +Lm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIzMzE5 +WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN +U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMi5leGFtcGxlLmNvbTBZ +MBMGByqGSM49AgEGCCqGSM49AwEHA0IABMLKHXm1xN7Tk4YzaWg4GYhLoyNjrjs5 +302o37m12U8LorR7IL5fdFgYILeL4XUPjC/QG4E2o6hPl3uZPUVErbajTTBLMA4G +A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIKfUfvpGproH +cwyFD+0sE3XfJzYNcif0jNwvgOUFZ4AFMAoGCCqGSM49BAMCA0gAMEUCIQDa1k6R ++luypvng6JMSKIyibptkwICToEAZlDqLeD+k1gIgGFXm1+p1QqxViOa+c1dUvjl0 +m1UCqGDwNTHDm5mO+es= +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem new file mode 100644 index 0000000..6d01d67 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAfCgAwIBAgIRANX86HJQn/543CANoioLOegwCgYIKoZIzj0EAwIwdjEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs +c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIz +MzE5WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE +BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G +A1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 +AwEHA0IABBp+58H8VypXHB9Hf/1ExZTmNdcBlTUgAmHH5sb9DizHXwljo6zdyXfZ +cLvTCpoLybJ/rnp4PKJ7NKUDmrQymLWjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV +HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIHu4uj/xHTyM +9ZK9QyYGLnfQasSWPHt65FkoTfvT61qsMAoGCCqGSM49BAMCA0cAMEQCIBJ9N4PD +mB+2gAPeDWYteAZ5Q2KR/E0zMQ13pDSunHNcAiBwWRzwscXxCPOJp1sjBMVp5Z1a +nfIdbwvBbsl1XV/j0g== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/tls/ca.crt b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/tls/ca.crt new file mode 100644 index 0000000..6d01d67 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/tls/ca.crt @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAfCgAwIBAgIRANX86HJQn/543CANoioLOegwCgYIKoZIzj0EAwIwdjEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs +c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIz +MzE5WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE +BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G +A1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 +AwEHA0IABBp+58H8VypXHB9Hf/1ExZTmNdcBlTUgAmHH5sb9DizHXwljo6zdyXfZ +cLvTCpoLybJ/rnp4PKJ7NKUDmrQymLWjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV +HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIHu4uj/xHTyM +9ZK9QyYGLnfQasSWPHt65FkoTfvT61qsMAoGCCqGSM49BAMCA0cAMEQCIBJ9N4PD +mB+2gAPeDWYteAZ5Q2KR/E0zMQ13pDSunHNcAiBwWRzwscXxCPOJp1sjBMVp5Z1a +nfIdbwvBbsl1XV/j0g== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/tls/server.crt b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/tls/server.crt new file mode 100644 index 0000000..bc9e1ed --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/tls/server.crt @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICPDCCAeKgAwIBAgIRAJyMPO3I72b3mbPNKpVYYLMwCgYIKoZIzj0EAwIwdjEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs +c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIz +MzE5WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE +BxMNU2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMi5leGFtcGxlLmNv +bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABMFNcSoYN82cQnSGoxBiWhzlYi9N +nVbrfOCNdsxMOjhYIfvptjVgBhc87ZqUsQp4sSYVHV1qxAJ7PD50CJRC+4SjbDBq +MA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIw +DAYDVR0TAQH/BAIwADArBgNVHSMEJDAigCB7uLo/8R08jPWSvUMmBi530GrEljx7 +euRZKE370+tarDAKBggqhkjOPQQDAgNIADBFAiEAkPjfzaF3Dxz5n39QChNSfWwC +lpxiBCgw8DMP2D91UFICIC640slBiPu2zx3U7izA6Zu00IIaEt8xGtt4pbhwwqWj +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/tls/server.key b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/tls/server.key new file mode 100755 index 0000000..1b542d8 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/tls/server.key @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgOa1azVZZkkb3rRW1 +y3z1TCvqOzftqGI3eELPG2TWK6WhRANCAATBTXEqGDfNnEJ0hqMQYloc5WIvTZ1W +63zgjXbMTDo4WCH76bY1YAYXPO2alLEKeLEmFR1dasQCezw+dAiUQvuE +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/admincerts/User1@org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/admincerts/User1@org2.example.com-cert.pem new file mode 100644 index 0000000..008d255 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/admincerts/User1@org2.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICGjCCAcCgAwIBAgIRAIPRwJHVLhHK47XK0BbFZJswCgYIKoZIzj0EAwIwczEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh +Lm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIzMzE5 +WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN +U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMi5leGFtcGxlLmNvbTBZ +MBMGByqGSM49AgEGCCqGSM49AwEHA0IABBd9SsEiFH1/JIb3qMEPLR2dygokFVKW +eINcB0Ni4TBRkfIWWUJeCANTUY11Pm/+5gs+fBTqBz8M2UzpJDVX7+2jTTBLMA4G +A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIKfUfvpGproH +cwyFD+0sE3XfJzYNcif0jNwvgOUFZ4AFMAoGCCqGSM49BAMCA0gAMEUCIQC8NIMw +e4ym/QRwCJb5umbONNLSVQuEpnPsJrM/ssBPvgIgQpe2oYa3yO3USro9nBHjpM3L +KsFQrpVnF8O6hoHOYZQ= +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem new file mode 100644 index 0000000..a26e1ec --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICQzCCAeqgAwIBAgIRAJEAD5YytxsnFjw+liBjOQkwCgYIKoZIzj0EAwIwczEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh +Lm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIzMzE5 +WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN +U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UE +AxMTY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA +BFW1K2mz8XYewIsUh1qHqImFNbpW+ugND8c6QYB89mPOMHhxil9pE1fX0j/18+e4 +uohbFKOP8UTB15c1f/mFSEejXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG +BgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIKfUfvpGproHcwyFD+0s +E3XfJzYNcif0jNwvgOUFZ4AFMAoGCCqGSM49BAMCA0cAMEQCIGrkModOvz6mcUDA +Zql4YPXU/3ZUbMLw8VuSNHh47lg7AiAPLSKy/v8y8mhebGRCNTYwdkidQCQFrh+2 +BIirBFsT0g== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/keystore/585175c83bac91fc0c1ce8f9d0ff9aefa47c565678f100ca8673db249ee785ac_sk b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/keystore/585175c83bac91fc0c1ce8f9d0ff9aefa47c565678f100ca8673db249ee785ac_sk new file mode 100755 index 0000000..d1ac0c7 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/keystore/585175c83bac91fc0c1ce8f9d0ff9aefa47c565678f100ca8673db249ee785ac_sk @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgmHG6n4ZvwUeV4jCp +kvAmGSQKZ+vOYsyzRZgYwORO+vChRANCAAQXfUrBIhR9fySG96jBDy0dncoKJBVS +lniDXAdDYuEwUZHyFllCXggDU1GNdT5v/uYLPnwU6gc/DNlM6SQ1V+/t +-----END PRIVATE KEY----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/signcerts/User1@org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/signcerts/User1@org2.example.com-cert.pem new file mode 100644 index 0000000..008d255 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/signcerts/User1@org2.example.com-cert.pem @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICGjCCAcCgAwIBAgIRAIPRwJHVLhHK47XK0BbFZJswCgYIKoZIzj0EAwIwczEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh +Lm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIzMzE5 +WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN +U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMi5leGFtcGxlLmNvbTBZ +MBMGByqGSM49AgEGCCqGSM49AwEHA0IABBd9SsEiFH1/JIb3qMEPLR2dygokFVKW +eINcB0Ni4TBRkfIWWUJeCANTUY11Pm/+5gs+fBTqBz8M2UzpJDVX7+2jTTBLMA4G +A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIKfUfvpGproH +cwyFD+0sE3XfJzYNcif0jNwvgOUFZ4AFMAoGCCqGSM49BAMCA0gAMEUCIQC8NIMw +e4ym/QRwCJb5umbONNLSVQuEpnPsJrM/ssBPvgIgQpe2oYa3yO3USro9nBHjpM3L +KsFQrpVnF8O6hoHOYZQ= +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem new file mode 100644 index 0000000..6d01d67 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAfCgAwIBAgIRANX86HJQn/543CANoioLOegwCgYIKoZIzj0EAwIwdjEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs +c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIz +MzE5WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE +BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G +A1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 +AwEHA0IABBp+58H8VypXHB9Hf/1ExZTmNdcBlTUgAmHH5sb9DizHXwljo6zdyXfZ +cLvTCpoLybJ/rnp4PKJ7NKUDmrQymLWjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV +HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIHu4uj/xHTyM +9ZK9QyYGLnfQasSWPHt65FkoTfvT61qsMAoGCCqGSM49BAMCA0cAMEQCIBJ9N4PD +mB+2gAPeDWYteAZ5Q2KR/E0zMQ13pDSunHNcAiBwWRzwscXxCPOJp1sjBMVp5Z1a +nfIdbwvBbsl1XV/j0g== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/tls/ca.crt b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/tls/ca.crt new file mode 100644 index 0000000..6d01d67 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/tls/ca.crt @@ -0,0 +1,15 @@ +-----BEGIN CERTIFICATE----- +MIICSTCCAfCgAwIBAgIRANX86HJQn/543CANoioLOegwCgYIKoZIzj0EAwIwdjEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs +c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIz +MzE5WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE +BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G +A1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 +AwEHA0IABBp+58H8VypXHB9Hf/1ExZTmNdcBlTUgAmHH5sb9DizHXwljo6zdyXfZ +cLvTCpoLybJ/rnp4PKJ7NKUDmrQymLWjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV +HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIHu4uj/xHTyM +9ZK9QyYGLnfQasSWPHt65FkoTfvT61qsMAoGCCqGSM49BAMCA0cAMEQCIBJ9N4PD +mB+2gAPeDWYteAZ5Q2KR/E0zMQ13pDSunHNcAiBwWRzwscXxCPOJp1sjBMVp5Z1a +nfIdbwvBbsl1XV/j0g== +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/tls/server.crt b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/tls/server.crt new file mode 100644 index 0000000..b81ee15 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/tls/server.crt @@ -0,0 +1,14 @@ +-----BEGIN CERTIFICATE----- +MIICOzCCAeKgAwIBAgIRAPD3UPMtRDq5GhVZUuS25LUwCgYIKoZIzj0EAwIwdjEL +MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG +cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs +c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTcwNjIzMTIzMzE5WhcNMjcwNjIxMTIz +MzE5WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE +BxMNU2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWVXNlcjFAb3JnMi5leGFtcGxlLmNv +bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABLM/EP7l2gwX4RGxW9gX78CTINQ6 +3RRcU01F91HSpT3l+e1H0HACgJWTGkf5ZnwCnUcdZ/z2YD15zfVFHF2fvwejbDBq +MA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIw +DAYDVR0TAQH/BAIwADArBgNVHSMEJDAigCB7uLo/8R08jPWSvUMmBi530GrEljx7 +euRZKE370+tarDAKBggqhkjOPQQDAgNHADBEAiBo0H6ZNg1XJladWoGNnFsdRm3I +u4dLlJBwe9gTrscPAAIgXfsHfA8qVvyK2Pnlca2cwUHvRrJ4cAvaYrWNTMG1t7Q= +-----END CERTIFICATE----- diff --git a/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/tls/server.key b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/tls/server.key new file mode 100755 index 0000000..505f5b3 --- /dev/null +++ b/artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/tls/server.key @@ -0,0 +1,5 @@ +-----BEGIN PRIVATE KEY----- +MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgftZDPdCM6QMMv8ZO +eXbUFGQqnFhEUAiChttdWcSp6QOhRANCAASzPxD+5doMF+ERsVvYF+/AkyDUOt0U +XFNNRfdR0qU95fntR9BwAoCVkxpH+WZ8Ap1HHWf89mA9ec31RRxdn78H +-----END PRIVATE KEY----- diff --git a/artifacts/channel/cryptogen.yaml b/artifacts/channel/cryptogen.yaml new file mode 100644 index 0000000..be2a9f8 --- /dev/null +++ b/artifacts/channel/cryptogen.yaml @@ -0,0 +1,113 @@ +# +# Copyright IBM Corp. All Rights Reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +# --------------------------------------------------------------------------- +# "OrdererOrgs" - Definition of organizations managing orderer nodes +# --------------------------------------------------------------------------- +OrdererOrgs: + # --------------------------------------------------------------------------- + # Orderer + # --------------------------------------------------------------------------- + - Name: Orderer + Domain: example.com + + # --------------------------------------------------------------------------- + # "Specs" - See PeerOrgs below for complete description + # --------------------------------------------------------------------------- + Specs: + - Hostname: orderer + +# --------------------------------------------------------------------------- +# "PeerOrgs" - Definition of organizations managing peer nodes +# --------------------------------------------------------------------------- +PeerOrgs: + # --------------------------------------------------------------------------- + # Org1 + # --------------------------------------------------------------------------- + - Name: Org1 + Domain: org1.example.com + + # --------------------------------------------------------------------------- + # "CA" + # --------------------------------------------------------------------------- + # Uncomment this section to enable the explicit definition of the CA for this + # organization. This entry is a Spec. See "Specs" section below for details. + # --------------------------------------------------------------------------- + CA: + Hostname: ca # implicitly ca.org1.example.com + + # --------------------------------------------------------------------------- + # "Specs" + # --------------------------------------------------------------------------- + # Uncomment this section to enable the explicit definition of hosts in your + # configuration. Most users will want to use Template, below + # + # Specs is an array of Spec entries. Each Spec entry consists of two fields: + # - Hostname: (Required) The desired hostname, sans the domain. + # - CommonName: (Optional) Specifies the template or explicit override for + # the CN. By default, this is the template: + # + # "{{.Hostname}}.{{.Domain}}" + # + # which obtains its values from the Spec.Hostname and + # Org.Domain, respectively. + # - SANS: (Optional) Specifies one or more Subject Alternative Names + # the be set in the resulting x509. Accepts template + # variables {{.Hostname}}, {{.Domain}}, {{.CommonName}} + # NOTE: Two implicit entries are created for you: + # - {{ .CommonName }} + # - {{ .Hostname }} + # --------------------------------------------------------------------------- + # Specs: + # - Hostname: foo # implicitly "foo.org1.example.com" + # CommonName: foo27.org5.example.com # overrides Hostname-based FQDN set above + # SANS: + # - "bar.{{.Domain}}" + # - "altfoo.{{.Domain}}" + # - "{{.Hostname}}.org6.net" + # - Hostname: bar + # - Hostname: baz + + # --------------------------------------------------------------------------- + # "Template" + # --------------------------------------------------------------------------- + # Allows for the definition of 1 or more hosts that are created sequentially + # from a template. By default, this looks like "peer%d" from 0 to Count-1. + # You may override the number of nodes (Count), the starting index (Start) + # or the template used to construct the name (Hostname). + # + # Note: Template and Specs are not mutually exclusive. You may define both + # sections and the aggregate nodes will be created for you. Take care with + # name collisions + # --------------------------------------------------------------------------- + Template: + Count: 2 + # Start: 5 + # Hostname: {{.Prefix}}{{.Index}} # default + SANS: + - "localhost" + + # --------------------------------------------------------------------------- + # "Users" + # --------------------------------------------------------------------------- + # Count: The number of user accounts _in addition_ to Admin + # --------------------------------------------------------------------------- + Users: + Count: 1 + + # --------------------------------------------------------------------------- + # Org2: See "Org1" for full specification + # --------------------------------------------------------------------------- + - Name: Org2 + Domain: org2.example.com + CA: + Hostname: ca # implicitly ca.org1.example.com + + Template: + Count: 2 + SANS: + - "localhost" + Users: + Count: 1 diff --git a/artifacts/channel/genesis.block b/artifacts/channel/genesis.block new file mode 100644 index 0000000..07b9c8d Binary files /dev/null and b/artifacts/channel/genesis.block differ diff --git a/artifacts/channel/mychannel.tx b/artifacts/channel/mychannel.tx new file mode 100644 index 0000000..73323fa Binary files /dev/null and b/artifacts/channel/mychannel.tx differ diff --git a/artifacts/docker-compose.yaml b/artifacts/docker-compose.yaml new file mode 100644 index 0000000..6fd88df --- /dev/null +++ b/artifacts/docker-compose.yaml @@ -0,0 +1,142 @@ +# +# Copyright IBM Corp. All Rights Reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# +version: '2' + +services: + + ca.org1.example.com: + image: hyperledger/fabric-ca + environment: + - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server + - FABRIC_CA_SERVER_CA_NAME=ca-org1 + - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem + - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/0e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011_sk + - FABRIC_CA_SERVER_TLS_ENABLED=true + - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem + - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/0e729224e8b3f31784c8a93c5b8ef6f4c1c91d9e6e577c45c33163609fe40011_sk + ports: + - "7054:7054" + command: sh -c 'fabric-ca-server start -b admin:adminpw -d' + volumes: + - ./channel/crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config + container_name: ca_peerOrg1 + + ca.org2.example.com: + image: hyperledger/fabric-ca + environment: + - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server + - FABRIC_CA_SERVER_CA_NAME=ca-org2 + - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org2.example.com-cert.pem + - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/a7d47efa46a6ba07730c850fed2c1375df27360d7227f48cdc2f80e505678005_sk + - FABRIC_CA_SERVER_TLS_ENABLED=true + - FABRIC_CA_SERVER_TLS_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org2.example.com-cert.pem + - FABRIC_CA_SERVER_TLS_KEYFILE=/etc/hyperledger/fabric-ca-server-config/a7d47efa46a6ba07730c850fed2c1375df27360d7227f48cdc2f80e505678005_sk + ports: + - "8054:7054" + command: sh -c 'fabric-ca-server start -b admin:adminpw -d' + volumes: + - ./channel/crypto-config/peerOrganizations/org2.example.com/ca/:/etc/hyperledger/fabric-ca-server-config + container_name: ca_peerOrg2 + + orderer.example.com: + container_name: orderer.example.com + image: hyperledger/fabric-orderer + environment: + - FABRIC_LOGGING_SPEC=debug + - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 + - ORDERER_GENERAL_GENESISMETHOD=file + - ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block + - ORDERER_GENERAL_LOCALMSPID=OrdererMSP + - ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/crypto/orderer/msp + - ORDERER_GENERAL_TLS_ENABLED=true + - ORDERER_GENERAL_TLS_PRIVATEKEY=/etc/hyperledger/crypto/orderer/tls/server.key + - ORDERER_GENERAL_TLS_CERTIFICATE=/etc/hyperledger/crypto/orderer/tls/server.crt + - ORDERER_GENERAL_TLS_ROOTCAS=[/etc/hyperledger/crypto/orderer/tls/ca.crt, /etc/hyperledger/crypto/peerOrg1/tls/ca.crt, /etc/hyperledger/crypto/peerOrg2/tls/ca.crt] + working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderers + command: orderer + ports: + - 7050:7050 + volumes: + - ./channel:/etc/hyperledger/configtx + - ./channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/:/etc/hyperledger/crypto/orderer + - ./channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/:/etc/hyperledger/crypto/peerOrg1 + - ./channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/:/etc/hyperledger/crypto/peerOrg2 + + peer0.org1.example.com: + container_name: peer0.org1.example.com + extends: + file: base.yaml + service: peer-base + environment: + - CORE_PEER_ID=peer0.org1.example.com + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 + - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org1.example.com:7051 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051 + ports: + - 7051:7051 + - 7053:7053 + volumes: + - ./channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/:/etc/hyperledger/crypto/peer + depends_on: + - orderer.example.com + + peer1.org1.example.com: + container_name: peer1.org1.example.com + extends: + file: base.yaml + service: peer-base + environment: + - CORE_PEER_ID=peer1.org1.example.com + - CORE_PEER_LOCALMSPID=Org1MSP + - CORE_PEER_ADDRESS=peer1.org1.example.com:7051 + - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org1.example.com:7051 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org1.example.com:7051 + ports: + - 7056:7051 + - 7058:7053 + volumes: + - ./channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/:/etc/hyperledger/crypto/peer + depends_on: + - orderer.example.com + + peer0.org2.example.com: + container_name: peer0.org2.example.com + extends: + file: base.yaml + service: peer-base + environment: + - CORE_PEER_ID=peer0.org2.example.com + - CORE_PEER_LOCALMSPID=Org2MSP + - CORE_PEER_ADDRESS=peer0.org2.example.com:7051 + - CORE_PEER_GOSSIP_BOOTSTRAP=peer1.org2.example.com:7051 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7051 + ports: + - 8051:7051 + - 8053:7053 + volumes: + - ./channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/:/etc/hyperledger/crypto/peer + depends_on: + - orderer.example.com + + peer1.org2.example.com: + container_name: peer1.org2.example.com + extends: + file: base.yaml + service: peer-base + environment: + - CORE_PEER_ID=peer1.org2.example.com + - CORE_PEER_LOCALMSPID=Org2MSP + - CORE_PEER_ADDRESS=peer1.org2.example.com:7051 + - CORE_PEER_GOSSIP_BOOTSTRAP=peer0.org2.example.com:7051 + - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer1.org2.example.com:7051 + ports: + - 8056:7051 + - 8058:7053 + volumes: + - ./channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/:/etc/hyperledger/crypto/peer + depends_on: + - orderer.example.com diff --git a/artifacts/network-config-aws.yaml b/artifacts/network-config-aws.yaml new file mode 100644 index 0000000..87912d7 --- /dev/null +++ b/artifacts/network-config-aws.yaml @@ -0,0 +1,230 @@ +--- +# +# The network connection profile provides client applications the information about the target +# blockchain network that are necessary for the applications to interact with it. These are all +# knowledge that must be acquired from out-of-band sources. This file provides such a source. +# +name: "balance-transfer" + +# +# Any properties with an "x-" prefix will be treated as application-specific, exactly like how naming +# in HTTP headers or swagger properties work. The SDK will simply ignore these fields and leave +# them for the applications to process. This is a mechanism for different components of an application +# to exchange information that are not part of the standard schema described below. In particular, +# the "x-type" property with the "hlfv1" value example below is used by Hyperledger Composer to +# determine the type of Fabric networks (v0.6 vs. v1.0) it needs to work with. +# +x-type: "hlfv1" + +# +# Describe what the target network is/does. +# +description: "Balance Transfer Network" + +# +# Schema version of the content. Used by the SDK to apply the corresponding parsing rules. +# +version: "1.0" + +# +# The client section will be added on a per org basis see org1.yaml and org2.yaml +# +#client: + +# +# [Optional]. But most apps would have this section so that channel objects can be constructed +# based on the content below. If an app is creating channels, then it likely will not need this +# section. +# +channels: + # name of the channel + mychannel: + # Required. list of orderers designated by the application to use for transactions on this + # channel. This list can be a result of access control ("org1" can only access "ordererA"), or + # operational decisions to share loads from applications among the orderers. The values must + # be "names" of orgs defined under "organizations/peers" + orderers: + - orderer.example.com + + # Required. list of peers from participating orgs + peers: + peer0.org1.example.com: + # [Optional]. will this peer be sent transaction proposals for endorsement? The peer must + # have the chaincode installed. The app can also use this property to decide which peers + # to send the chaincode install request. Default: true + endorsingPeer: true + + # [Optional]. will this peer be sent query proposals? The peer must have the chaincode + # installed. The app can also use this property to decide which peers to send the + # chaincode install request. Default: true + chaincodeQuery: true + + # [Optional]. will this peer be sent query proposals that do not require chaincodes, like + # queryBlock(), queryTransaction(), etc. Default: true + ledgerQuery: true + + # [Optional]. will this peer be the target of the SDK's listener registration? All peers can + # produce events but the app typically only needs to connect to one to listen to events. + # Default: true + eventSource: true + + peer1.org1.example.com: + endorsingPeer: false + chaincodeQuery: true + ledgerQuery: true + eventSource: false + + peer0.org2.example.com: + endorsingPeer: true + chaincodeQuery: true + ledgerQuery: true + eventSource: true + + peer1.org2.example.com: + endorsingPeer: false + chaincodeQuery: true + ledgerQuery: true + eventSource: false + + # [Optional]. what chaincodes are expected to exist on this channel? The application can use + # this information to validate that the target peers are in the expected state by comparing + # this list with the query results of getInstalledChaincodes() and getInstantiatedChaincodes() + chaincodes: + # the format follows the "cannonical name" of chaincodes by fabric code + - mycc:v0 + +# +# list of participating organizations in this network +# +organizations: + Org1: + mspid: Org1MSP + + peers: + - peer0.org1.example.com + - peer1.org1.example.com + + # [Optional]. Certificate Authorities issue certificates for identification purposes in a Fabric based + # network. Typically certificates provisioning is done in a separate process outside of the + # runtime network. Fabric-CA is a special certificate authority that provides a REST APIs for + # dynamic certificate management (enroll, revoke, re-enroll). The following section is only for + # Fabric-CA servers. + certificateAuthorities: + - ca-org1 + + # [Optional]. If the application is going to make requests that are reserved to organization + # administrators, including creating/updating channels, installing/instantiating chaincodes, it + # must have access to the admin identity represented by the private key and signing certificate. + # Both properties can be the PEM string or local path to the PEM file. Note that this is mainly for + # convenience in development mode, production systems should not expose sensitive information + # this way. The SDK should allow applications to set the org admin identity via APIs, and only use + # this route as an alternative when it exists. + adminPrivateKey: + path: artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/5890f0061619c06fb29dea8cb304edecc020fe63f41a6db109f1e227cc1cb2a8_sk + signedCert: + path: artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem + + # the profile will contain public information about organizations other than the one it belongs to. + # These are necessary information to make transaction lifecycles work, including MSP IDs and + # peers with a public URL to send transaction proposals. The file will not contain private + # information reserved for members of the organization, such as admin key and certificate, + # fabric-ca registrar enroll ID and secret, etc. + Org2: + mspid: Org2MSP + peers: + - peer0.org2.example.com + - peer1.org2.example.com + certificateAuthorities: + - ca-org2 + adminPrivateKey: + path: artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/1995b11d6573ed3be52fcd7a5fa477bc0f183e1f5f398c8281d0ce7c2c75a076_sk + signedCert: + path: artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem + +# +# List of orderers to send transaction and channel create/update requests to. For the time +# being only one orderer is needed. If more than one is defined, which one get used by the +# SDK is implementation specific. Consult each SDK's documentation for its handling of orderers. +# +orderers: + orderer.example.com: + url: grpcs://ec2-13-59-99-140.us-east-2.compute.amazonaws.com:7050 + + # these are standard properties defined by the gRPC library + # they will be passed in as-is to gRPC client constructor + grpcOptions: + ssl-target-name-override: orderer.example.com + + tlsCACerts: + path: artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt + +# +# List of peers to send various requests to, including endorsement, query +# and event listener registration. +# +peers: + peer0.org1.example.com: + # this URL is used to send endorsement and query requests + url: grpcs://ec2-13-59-99-140.us-east-2.compute.amazonaws.com:7051 + + grpcOptions: + ssl-target-name-override: peer0.org1.example.com + tlsCACerts: + path: artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt + + peer1.org1.example.com: + url: grpcs://ec2-13-59-99-140.us-east-2.compute.amazonaws.com:7056 + eventUrl: grpcs://ec2-13-59-99-140.us-east-2.compute.amazonaws.com:7058 + grpcOptions: + ssl-target-name-override: peer1.org1.example.com + tlsCACerts: + path: artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt + + peer0.org2.example.com: + url: grpcs://ec2-13-59-99-140.us-east-2.compute.amazonaws.com:8051 + grpcOptions: + ssl-target-name-override: peer0.org2.example.com + tlsCACerts: + path: artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt + + peer1.org2.example.com: + url: grpcs://ec2-13-59-99-140.us-east-2.compute.amazonaws.com:8056 + grpcOptions: + ssl-target-name-override: peer1.org2.example.com + tlsCACerts: + path: artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt + +# +# Fabric-CA is a special kind of Certificate Authority provided by Hyperledger Fabric which allows +# certificate management to be done via REST APIs. Application may choose to use a standard +# Certificate Authority instead of Fabric-CA, in which case this section would not be specified. +# +certificateAuthorities: + ca-org1: + url: https://ec2-13-59-99-140.us-east-2.compute.amazonaws.com:7054 + # the properties specified under this object are passed to the 'http' client verbatim when + # making the request to the Fabric-CA server + httpOptions: + verify: false + tlsCACerts: + path: artifacts/channel/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem + + # Fabric-CA supports dynamic user enrollment via REST APIs. A "root" user, a.k.a registrar, is + # needed to enroll and invoke new users. + registrar: + - enrollId: admin + enrollSecret: adminpw + # [Optional] The optional name of the CA. + caName: ca-org1 + + ca-org2: + url: https://ec2-13-59-99-140.us-east-2.compute.amazonaws.com:8054 + httpOptions: + verify: false + tlsCACerts: + path: artifacts/channel/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem + registrar: + - enrollId: admin + enrollSecret: adminpw + # [Optional] The optional name of the CA. + caName: ca-org2 diff --git a/artifacts/network-config.yaml b/artifacts/network-config.yaml new file mode 100644 index 0000000..1d6d9ef --- /dev/null +++ b/artifacts/network-config.yaml @@ -0,0 +1,230 @@ +--- +# +# The network connection profile provides client applications the information about the target +# blockchain network that are necessary for the applications to interact with it. These are all +# knowledge that must be acquired from out-of-band sources. This file provides such a source. +# +name: "balance-transfer" + +# +# Any properties with an "x-" prefix will be treated as application-specific, exactly like how naming +# in HTTP headers or swagger properties work. The SDK will simply ignore these fields and leave +# them for the applications to process. This is a mechanism for different components of an application +# to exchange information that are not part of the standard schema described below. In particular, +# the "x-type" property with the "hlfv1" value example below is used by Hyperledger Composer to +# determine the type of Fabric networks (v0.6 vs. v1.0) it needs to work with. +# +x-type: "hlfv1" + +# +# Describe what the target network is/does. +# +description: "Balance Transfer Network" + +# +# Schema version of the content. Used by the SDK to apply the corresponding parsing rules. +# +version: "1.0" + +# +# The client section will be added on a per org basis see org1.yaml and org2.yaml +# +#client: + +# +# [Optional]. But most apps would have this section so that channel objects can be constructed +# based on the content below. If an app is creating channels, then it likely will not need this +# section. +# +channels: + # name of the channel + mychannel: + # Required. list of orderers designated by the application to use for transactions on this + # channel. This list can be a result of access control ("org1" can only access "ordererA"), or + # operational decisions to share loads from applications among the orderers. The values must + # be "names" of orgs defined under "organizations/peers" + orderers: + - orderer.example.com + + # Required. list of peers from participating orgs + peers: + peer0.org1.example.com: + # [Optional]. will this peer be sent transaction proposals for endorsement? The peer must + # have the chaincode installed. The app can also use this property to decide which peers + # to send the chaincode install request. Default: true + endorsingPeer: true + + # [Optional]. will this peer be sent query proposals? The peer must have the chaincode + # installed. The app can also use this property to decide which peers to send the + # chaincode install request. Default: true + chaincodeQuery: true + + # [Optional]. will this peer be sent query proposals that do not require chaincodes, like + # queryBlock(), queryTransaction(), etc. Default: true + ledgerQuery: true + + # [Optional]. will this peer be the target of the SDK's listener registration? All peers can + # produce events but the app typically only needs to connect to one to listen to events. + # Default: true + eventSource: true + + peer1.org1.example.com: + endorsingPeer: false + chaincodeQuery: true + ledgerQuery: true + eventSource: false + + peer0.org2.example.com: + endorsingPeer: true + chaincodeQuery: true + ledgerQuery: true + eventSource: true + + peer1.org2.example.com: + endorsingPeer: false + chaincodeQuery: true + ledgerQuery: true + eventSource: false + + # [Optional]. what chaincodes are expected to exist on this channel? The application can use + # this information to validate that the target peers are in the expected state by comparing + # this list with the query results of getInstalledChaincodes() and getInstantiatedChaincodes() + chaincodes: + # the format follows the "cannonical name" of chaincodes by fabric code + - mycc:v0 + +# +# list of participating organizations in this network +# +organizations: + Org1: + mspid: Org1MSP + + peers: + - peer0.org1.example.com + - peer1.org1.example.com + + # [Optional]. Certificate Authorities issue certificates for identification purposes in a Fabric based + # network. Typically certificates provisioning is done in a separate process outside of the + # runtime network. Fabric-CA is a special certificate authority that provides a REST APIs for + # dynamic certificate management (enroll, revoke, re-enroll). The following section is only for + # Fabric-CA servers. + certificateAuthorities: + - ca-org1 + + # [Optional]. If the application is going to make requests that are reserved to organization + # administrators, including creating/updating channels, installing/instantiating chaincodes, it + # must have access to the admin identity represented by the private key and signing certificate. + # Both properties can be the PEM string or local path to the PEM file. Note that this is mainly for + # convenience in development mode, production systems should not expose sensitive information + # this way. The SDK should allow applications to set the org admin identity via APIs, and only use + # this route as an alternative when it exists. + adminPrivateKey: + path: artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/5890f0061619c06fb29dea8cb304edecc020fe63f41a6db109f1e227cc1cb2a8_sk + signedCert: + path: artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem + + # the profile will contain public information about organizations other than the one it belongs to. + # These are necessary information to make transaction lifecycles work, including MSP IDs and + # peers with a public URL to send transaction proposals. The file will not contain private + # information reserved for members of the organization, such as admin key and certificate, + # fabric-ca registrar enroll ID and secret, etc. + Org2: + mspid: Org2MSP + peers: + - peer0.org2.example.com + - peer1.org2.example.com + certificateAuthorities: + - ca-org2 + adminPrivateKey: + path: artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/1995b11d6573ed3be52fcd7a5fa477bc0f183e1f5f398c8281d0ce7c2c75a076_sk + signedCert: + path: artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem + +# +# List of orderers to send transaction and channel create/update requests to. For the time +# being only one orderer is needed. If more than one is defined, which one get used by the +# SDK is implementation specific. Consult each SDK's documentation for its handling of orderers. +# +orderers: + orderer.example.com: + url: grpcs://localhost:7050 + + # these are standard properties defined by the gRPC library + # they will be passed in as-is to gRPC client constructor + grpcOptions: + ssl-target-name-override: orderer.example.com + + tlsCACerts: + path: artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt + +# +# List of peers to send various requests to, including endorsement, query +# and event listener registration. +# +peers: + peer0.org1.example.com: + # this URL is used to send endorsement and query requests + url: grpcs://localhost:7051 + + grpcOptions: + ssl-target-name-override: peer0.org1.example.com + tlsCACerts: + path: artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt + + peer1.org1.example.com: + url: grpcs://localhost:7056 + grpcOptions: + ssl-target-name-override: peer1.org1.example.com + tlsCACerts: + path: artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt + + peer0.org2.example.com: + url: grpcs://localhost:8051 + grpcOptions: + ssl-target-name-override: peer0.org2.example.com + tlsCACerts: + path: artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt + + peer1.org2.example.com: + url: grpcs://localhost:8056 + eventUrl: grpcs://localhost:8058 + grpcOptions: + ssl-target-name-override: peer1.org2.example.com + tlsCACerts: + path: artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt + +# +# Fabric-CA is a special kind of Certificate Authority provided by Hyperledger Fabric which allows +# certificate management to be done via REST APIs. Application may choose to use a standard +# Certificate Authority instead of Fabric-CA, in which case this section would not be specified. +# +certificateAuthorities: + ca-org1: + url: https://localhost:7054 + # the properties specified under this object are passed to the 'http' client verbatim when + # making the request to the Fabric-CA server + httpOptions: + verify: false + tlsCACerts: + path: artifacts/channel/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem + + # Fabric-CA supports dynamic user enrollment via REST APIs. A "root" user, a.k.a registrar, is + # needed to enroll and invoke new users. + registrar: + - enrollId: admin + enrollSecret: adminpw + # [Optional] The optional name of the CA. + caName: ca-org1 + + ca-org2: + url: https://localhost:8054 + httpOptions: + verify: false + tlsCACerts: + path: artifacts/channel/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem + registrar: + - enrollId: admin + enrollSecret: adminpw + # [Optional] The optional name of the CA. + caName: ca-org2 diff --git a/artifacts/org1.yaml b/artifacts/org1.yaml new file mode 100644 index 0000000..5cd4b3e --- /dev/null +++ b/artifacts/org1.yaml @@ -0,0 +1,59 @@ +--- +# +# The network connection profile provides client applications the information about the target +# blockchain network that are necessary for the applications to interact with it. These are all +# knowledge that must be acquired from out-of-band sources. This file provides such a source. +# +name: "balance-transfer-org1" + +# +# Any properties with an "x-" prefix will be treated as application-specific, exactly like how naming +# in HTTP headers or swagger properties work. The SDK will simply ignore these fields and leave +# them for the applications to process. This is a mechanism for different components of an application +# to exchange information that are not part of the standard schema described below. In particular, +# the "x-type" property with the "hlfv1" value example below is used by Hyperledger Composer to +# determine the type of Fabric networks (v0.6 vs. v1.0) it needs to work with. +# +x-type: "hlfv1" + +# +# Describe what the target network is/does. +# +description: "Balance Transfer Network - client definition for Org1" + +# +# Schema version of the content. Used by the SDK to apply the corresponding parsing rules. +# +version: "1.0" + +# +# The client section is SDK-specific. The sample below is for the node.js SDK +# +client: + # Which organization does this application instance belong to? The value must be the name of an org + # defined under "organizations" + organization: Org1 + + # Some SDKs support pluggable KV stores, the properties under "credentialStore" + # are implementation specific + credentialStore: + # [Optional]. Specific to FileKeyValueStore.js or similar implementations in other SDKs. Can be others + # if using an alternative impl. For instance, CouchDBKeyValueStore.js would require an object + # here for properties like url, db name, etc. + # path: "./fabric-client-kv-org1" + endpoint: "http://127.0.0.1:8200" + token: "4EFGcyqaACGDBsxcNBzjbvqS" # or can be set from env as VAULT_TOKEN + apiVersion: "v1" + + # [Optional]. Specific to the CryptoSuite implementation. Software-based implementations like + # CryptoSuite_ECDSA_AES.js in node SDK requires a key store. PKCS#11 based implementations does + # not. + cryptoStore: + # Specific to the underlying KeyValueStore that backs the crypto key store. + # path: "/tmp/fabric-client-kv-org1" + endpoint: "http://127.0.0.1:8200" + token: "4EFGcyqaACGDBsxcNBzjbvqS" # or can be set from env as VAULT_TOKEN + apiVersion: "v1" + + # [Optional]. Specific to Composer environment + wallet: wallet-name diff --git a/artifacts/org2.yaml b/artifacts/org2.yaml new file mode 100644 index 0000000..1f96081 --- /dev/null +++ b/artifacts/org2.yaml @@ -0,0 +1,59 @@ +--- +# +# The network connection profile provides client applications the information about the target +# blockchain network that are necessary for the applications to interact with it. These are all +# knowledge that must be acquired from out-of-band sources. This file provides such a source. +# +name: "balance-transfer-org2" + +# +# Any properties with an "x-" prefix will be treated as application-specific, exactly like how naming +# in HTTP headers or swagger properties work. The SDK will simply ignore these fields and leave +# them for the applications to process. This is a mechanism for different components of an application +# to exchange information that are not part of the standard schema described below. In particular, +# the "x-type" property with the "hlfv1" value example below is used by Hyperledger Composer to +# determine the type of Fabric networks (v0.6 vs. v1.0) it needs to work with. +# +x-type: "hlfv1" + +# +# Describe what the target network is/does. +# +description: "Balance Transfer Network - client definition for Org2" + +# +# Schema version of the content. Used by the SDK to apply the corresponding parsing rules. +# +version: "1.0" + +# +# The client section is SDK-specific. The sample below is for the node.js SDK +# +client: + # Which organization does this application instance belong to? The value must be the name of an org + # defined under "organizations" + organization: Org2 + + # Some SDKs support pluggable KV stores, the properties under "credentialStore" + # are implementation specific + credentialStore: + # [Optional]. Specific to FileKeyValueStore.js or similar implementations in other SDKs. Can be others + # if using an alternative impl. For instance, CouchDBKeyValueStore.js would require an object + # here for properties like url, db name, etc. + # path: "./fabric-client-kv-org1" + endpoint: "http://127.0.0.1:8300" + token: "94yDIQrqQgVlMcrfyDXRQ36m" # or can be set from env as VAULT_TOKEN + apiVersion: "v1" + + # [Optional]. Specific to the CryptoSuite implementation. Software-based implementations like + # CryptoSuite_ECDSA_AES.js in node SDK requires a key store. PKCS#11 based implementations does + # not. + cryptoStore: + # Specific to the underlying KeyValueStore that backs the crypto key store. + # path: "/tmp/fabric-client-kv-org1" + endpoint: "http://127.0.0.1:8300" + token: "94yDIQrqQgVlMcrfyDXRQ36m" # or can be set from env as VAULT_TOKEN + apiVersion: "v1" + + # [Optional]. Specific to Composer environment + wallet: wallet-name diff --git a/artifacts/src/github.com/example_cc/go/example_cc.go b/artifacts/src/github.com/example_cc/go/example_cc.go new file mode 100644 index 0000000..06fd76b --- /dev/null +++ b/artifacts/src/github.com/example_cc/go/example_cc.go @@ -0,0 +1,203 @@ +/* +Copyright IBM Corp. 2016 All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +package main + + +import ( + "fmt" + "strconv" + + "github.com/hyperledger/fabric/core/chaincode/shim" + pb "github.com/hyperledger/fabric/protos/peer" +) + +var logger = shim.NewLogger("example_cc0") + +// SimpleChaincode example simple Chaincode implementation +type SimpleChaincode struct { +} + +func (t *SimpleChaincode) Init(stub shim.ChaincodeStubInterface) pb.Response { + logger.Info("########### example_cc0 Init ###########") + + _, args := stub.GetFunctionAndParameters() + var A, B string // Entities + var Aval, Bval int // Asset holdings + var err error + + // Initialize the chaincode + A = args[0] + Aval, err = strconv.Atoi(args[1]) + if err != nil { + return shim.Error("Expecting integer value for asset holding") + } + B = args[2] + Bval, err = strconv.Atoi(args[3]) + if err != nil { + return shim.Error("Expecting integer value for asset holding") + } + logger.Info("Aval = %d, Bval = %d\n", Aval, Bval) + + // Write the state to the ledger + err = stub.PutState(A, []byte(strconv.Itoa(Aval))) + if err != nil { + return shim.Error(err.Error()) + } + + err = stub.PutState(B, []byte(strconv.Itoa(Bval))) + if err != nil { + return shim.Error(err.Error()) + } + + return shim.Success(nil) + + +} + +// Transaction makes payment of X units from A to B +func (t *SimpleChaincode) Invoke(stub shim.ChaincodeStubInterface) pb.Response { + logger.Info("########### example_cc0 Invoke ###########") + + function, args := stub.GetFunctionAndParameters() + + if function == "delete" { + // Deletes an entity from its state + return t.delete(stub, args) + } + + if function == "query" { + // queries an entity state + return t.query(stub, args) + } + if function == "move" { + // Deletes an entity from its state + return t.move(stub, args) + } + + logger.Errorf("Unknown action, check the first argument, must be one of 'delete', 'query', or 'move'. But got: %v", args[0]) + return shim.Error(fmt.Sprintf("Unknown action, check the first argument, must be one of 'delete', 'query', or 'move'. But got: %v", args[0])) +} + +func (t *SimpleChaincode) move(stub shim.ChaincodeStubInterface, args []string) pb.Response { + // must be an invoke + var A, B string // Entities + var Aval, Bval int // Asset holdings + var X int // Transaction value + var err error + + if len(args) != 3 { + return shim.Error("Incorrect number of arguments. Expecting 4, function followed by 2 names and 1 value") + } + + A = args[0] + B = args[1] + + // Get the state from the ledger + // TODO: will be nice to have a GetAllState call to ledger + Avalbytes, err := stub.GetState(A) + if err != nil { + return shim.Error("Failed to get state") + } + if Avalbytes == nil { + return shim.Error("Entity not found") + } + Aval, _ = strconv.Atoi(string(Avalbytes)) + + Bvalbytes, err := stub.GetState(B) + if err != nil { + return shim.Error("Failed to get state") + } + if Bvalbytes == nil { + return shim.Error("Entity not found") + } + Bval, _ = strconv.Atoi(string(Bvalbytes)) + + // Perform the execution + X, err = strconv.Atoi(args[2]) + if err != nil { + return shim.Error("Invalid transaction amount, expecting a integer value") + } + Aval = Aval - X + Bval = Bval + X + logger.Infof("Aval = %d, Bval = %d\n", Aval, Bval) + + // Write the state back to the ledger + err = stub.PutState(A, []byte(strconv.Itoa(Aval))) + if err != nil { + return shim.Error(err.Error()) + } + + err = stub.PutState(B, []byte(strconv.Itoa(Bval))) + if err != nil { + return shim.Error(err.Error()) + } + + return shim.Success(nil); +} + +// Deletes an entity from state +func (t *SimpleChaincode) delete(stub shim.ChaincodeStubInterface, args []string) pb.Response { + if len(args) != 1 { + return shim.Error("Incorrect number of arguments. Expecting 1") + } + + A := args[0] + + // Delete the key from the state in ledger + err := stub.DelState(A) + if err != nil { + return shim.Error("Failed to delete state") + } + + return shim.Success(nil) +} + +// Query callback representing the query of a chaincode +func (t *SimpleChaincode) query(stub shim.ChaincodeStubInterface, args []string) pb.Response { + + var A string // Entities + var err error + + if len(args) != 1 { + return shim.Error("Incorrect number of arguments. Expecting name of the person to query") + } + + A = args[0] + + // Get the state from the ledger + Avalbytes, err := stub.GetState(A) + if err != nil { + jsonResp := "{\"Error\":\"Failed to get state for " + A + "\"}" + return shim.Error(jsonResp) + } + + if Avalbytes == nil { + jsonResp := "{\"Error\":\"Nil amount for " + A + "\"}" + return shim.Error(jsonResp) + } + + jsonResp := "{\"Name\":\"" + A + "\",\"Amount\":\"" + string(Avalbytes) + "\"}" + logger.Infof("Query Response:%s\n", jsonResp) + return shim.Success(Avalbytes) +} + +func main() { + err := shim.Start(new(SimpleChaincode)) + if err != nil { + logger.Errorf("Error starting Simple chaincode: %s", err) + } +} diff --git a/artifacts/src/github.com/example_cc/node/example_cc.js b/artifacts/src/github.com/example_cc/node/example_cc.js new file mode 100644 index 0000000..9621178 --- /dev/null +++ b/artifacts/src/github.com/example_cc/node/example_cc.js @@ -0,0 +1,140 @@ +/* +# Copyright IBM Corp. All Rights Reserved. +# +# SPDX-License-Identifier: Apache-2.0 +*/ + +const shim = require('fabric-shim'); +const util = require('util'); + +var Chaincode = class { + + // Initialize the chaincode + async Init(stub) { + console.info('========= example_cc Init ========='); + let ret = stub.getFunctionAndParameters(); + console.info(ret); + let args = ret.params; + // initialise only if 4 parameters passed. + if (args.length != 4) { + return shim.error('Incorrect number of arguments. Expecting 4'); + } + + let A = args[0]; + let B = args[2]; + let Aval = args[1]; + let Bval = args[3]; + + if (typeof parseInt(Aval) !== 'number' || typeof parseInt(Bval) !== 'number') { + return shim.error('Expecting integer value for asset holding'); + } + + try { + await stub.putState(A, Buffer.from(Aval)); + try { + await stub.putState(B, Buffer.from(Bval)); + return shim.success(); + } catch (err) { + return shim.error(err); + } + } catch (err) { + return shim.error(err); + } + } + + async Invoke(stub) { + let ret = stub.getFunctionAndParameters(); + console.info(ret); + let method = this[ret.fcn]; + if (!method) { + console.error('no method of name:' + ret.fcn + ' found'); + return shim.error('no method of name:' + ret.fcn + ' found'); + } + + console.info('\nCalling method : ' + ret.fcn); + try { + let payload = await method(stub, ret.params); + return shim.success(payload); + } catch (err) { + console.log(err); + return shim.error(err); + } + } + + async move(stub, args) { + if (args.length != 3) { + throw new Error('Incorrect number of arguments. Expecting 3'); + } + + let A = args[0]; + let B = args[1]; + if (!A || !B) { + throw new Error('asset holding must not be empty'); + } + + // Get the state from the ledger + let Avalbytes = await stub.getState(A); + if (!Avalbytes) { + throw new Error('Failed to get state of asset holder A'); + } + let Aval = parseInt(Avalbytes.toString()); + + let Bvalbytes = await stub.getState(B); + if (!Bvalbytes) { + throw new Error('Failed to get state of asset holder B'); + } + + let Bval = parseInt(Bvalbytes.toString()); + // Perform the execution + let amount = parseInt(args[2]); + if (typeof amount !== 'number') { + throw new Error('Expecting integer value for amount to be transaferred'); + } + + Aval = Aval - amount; + Bval = Bval + amount; + console.info(util.format('Aval = %d, Bval = %d\n', Aval, Bval)); + + // Write the states back to the ledger + await stub.putState(A, Buffer.from(Aval.toString())); + await stub.putState(B, Buffer.from(Bval.toString())); + + } + + // Deletes an entity from state + async delete(stub, args) { + if (args.length != 1) { + throw new Error('Incorrect number of arguments. Expecting 1'); + } + + let A = args[0]; + + // Delete the key from the state in ledger + await stub.deleteState(A); + } + + // query callback representing the query of a chaincode + async query(stub, args) { + if (args.length != 1) { + throw new Error('Incorrect number of arguments. Expecting name of the person to query') + } + + let jsonResp = {}; + let A = args[0]; + + // Get the state from the ledger + let Avalbytes = await stub.getState(A); + if (!Avalbytes) { + jsonResp.error = 'Failed to get state for ' + A; + throw new Error(JSON.stringify(jsonResp)); + } + + jsonResp.name = A; + jsonResp.amount = Avalbytes.toString(); + console.info('Query Response:'); + console.info(jsonResp); + return Avalbytes; + } +}; + +shim.start(new Chaincode()); diff --git a/artifacts/src/github.com/example_cc/node/package.json b/artifacts/src/github.com/example_cc/node/package.json new file mode 100644 index 0000000..41c9026 --- /dev/null +++ b/artifacts/src/github.com/example_cc/node/package.json @@ -0,0 +1,15 @@ +{ + "name": "example_cc", + "version": "1.0.0", + "description": "node-js version of example_02.go chaincode", + "engines": { + "node": ">=8.4.0", + "npm": ">=5.3.0" + }, + "scripts": { "start" : "node example_cc.js" }, + "engine-strict": true, + "license": "Apache-2.0", + "dependencies": { + "fabric-shim": "~1.4.0" + } +} diff --git a/config.js b/config.js new file mode 100644 index 0000000..26f5941 --- /dev/null +++ b/config.js @@ -0,0 +1,19 @@ +var util = require('util'); +var path = require('path'); +var hfc = require('fabric-client'); + +var file = 'network-config%s.yaml'; + +var env = process.env.TARGET_NETWORK; +if (env) + file = util.format(file, '-' + env); +else + file = util.format(file, ''); +// indicate to the application where the setup file is located so it able +// to have the hfc load it to initalize the fabric client instance +hfc.setConfigSetting('network-connection-profile-path',path.join(__dirname, 'artifacts' ,file)); +hfc.setConfigSetting('key-value-store', 'fabric-sdk-kvs-vault'); +hfc.setConfigSetting('Org1-connection-profile-path',path.join(__dirname, 'artifacts', 'org1.yaml')); +hfc.setConfigSetting('Org2-connection-profile-path',path.join(__dirname, 'artifacts', 'org2.yaml')); +// some other settings the application might need to know +hfc.addConfigFile(path.join(__dirname, 'config.json')); diff --git a/config.json b/config.json new file mode 100644 index 0000000..3af4731 --- /dev/null +++ b/config.json @@ -0,0 +1,14 @@ +{ + "host":"localhost", + "port":"4000", + "jwt_expiretime": "36000", + "channelName":"mychannel", + "CC_SRC_PATH":"../artifacts", + "eventWaitTime":"30000", + "admins":[ + { + "username":"admin", + "secret":"adminpw" + } + ] +} diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 0000000..b6f6367 --- /dev/null +++ b/package-lock.json @@ -0,0 +1,2246 @@ +{ + "name": "balance-transfer", + "version": "1.0.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/bytebuffer": { + "version": "5.0.40", + "resolved": "https://registry.npmjs.org/@types/bytebuffer/-/bytebuffer-5.0.40.tgz", + "integrity": "sha512-h48dyzZrPMz25K6Q4+NCwWaxwXany2FhQg/ErOcdZS1ZpsaDnDMZg8JYLMTGz7uvXKrcKGJUZJlZObyfgdaN9g==", + "requires": { + "@types/long": "*", + "@types/node": "*" + } + }, + "@types/long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/@types/long/-/long-4.0.0.tgz", + "integrity": "sha512-1w52Nyx4Gq47uuu0EVcsHBxZFJgurQ+rTKS3qMHxR1GY2T8c2AJYd6vZoZ9q1rupaDjU0yT+Jc2XTyXkjeMA+Q==" + }, + "@types/node": { + "version": "11.9.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-11.9.5.tgz", + "integrity": "sha512-vVjM0SVzgaOUpflq4GYBvCpozes8OgIIS5gVXVka+OfK3hvnkC1i93U8WiY2OtNE4XUWyyy/86Kf6e0IHTQw1Q==" + }, + "accepts": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.5.tgz", + "integrity": "sha1-63d99gEXI6OxTopywIBcjoZ0a9I=", + "requires": { + "mime-types": "~2.1.18", + "negotiator": "0.6.1" + } + }, + "ajv": { + "version": "6.9.2", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.9.2.tgz", + "integrity": "sha512-4UFy0/LgDo7Oa/+wOAlj44tp9K78u38E5/359eSrqEp1Z5PdVfimCcs7SluXMP755RUQu6d2b4AvF0R1C9RZjg==", + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=" + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "array-flatten": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", + "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=" + }, + "ascli": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ascli/-/ascli-1.0.1.tgz", + "integrity": "sha1-vPpZdKYvGOgcq660lzKrSoj5Brw=", + "requires": { + "colour": "~0.7.1", + "optjs": "~3.2.2" + } + }, + "asn1": { + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.4.tgz", + "integrity": "sha512-jxwzQpLQjSmWXgwaCZE9Nz+glAG01yF1QnWgbhGwHI5A6FRIEY6IVqtHhIepHqI7/kyEyQEagBC5mBEFlIYvdg==", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.8.0.tgz", + "integrity": "sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ==" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bl": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/bl/-/bl-1.2.2.tgz", + "integrity": "sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA==", + "requires": { + "readable-stream": "^2.3.5", + "safe-buffer": "^5.1.1" + } + }, + "bn.js": { + "version": "4.11.8", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.8.tgz", + "integrity": "sha512-ItfYfPLkWHUjckQCk8xC+LwxgK8NYcXywGigJgSwOP8Y2iyWT4f2vsZnoOXTTbo+o5yXmIUJ4gn5538SO5S3gA==" + }, + "body-parser": { + "version": "1.18.3", + "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.18.3.tgz", + "integrity": "sha1-WykhmP/dVTs6DyDe0FkrlWlVyLQ=", + "requires": { + "bytes": "3.0.0", + "content-type": "~1.0.4", + "debug": "2.6.9", + "depd": "~1.1.2", + "http-errors": "~1.6.3", + "iconv-lite": "0.4.23", + "on-finished": "~2.3.0", + "qs": "6.5.2", + "raw-body": "2.3.3", + "type-is": "~1.6.16" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=" + }, + "browser-request": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/browser-request/-/browser-request-0.3.3.tgz", + "integrity": "sha1-ns5bWsqJopkyJC4Yv5M975h2zBc=" + }, + "buffer-alloc": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/buffer-alloc/-/buffer-alloc-1.2.0.tgz", + "integrity": "sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow==", + "requires": { + "buffer-alloc-unsafe": "^1.1.0", + "buffer-fill": "^1.0.0" + } + }, + "buffer-alloc-unsafe": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz", + "integrity": "sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg==" + }, + "buffer-equal-constant-time": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", + "integrity": "sha1-+OcRMvf/5uAaXJaXpMbz5I1cyBk=" + }, + "buffer-fill": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-fill/-/buffer-fill-1.0.0.tgz", + "integrity": "sha1-+PeLdniYiO858gXNY39o5wISKyw=" + }, + "bytebuffer": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/bytebuffer/-/bytebuffer-5.0.1.tgz", + "integrity": "sha1-WC7qSxqHO20CCkjVjfhfC7ps/d0=", + "requires": { + "long": "~3" + }, + "dependencies": { + "long": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/long/-/long-3.2.0.tgz", + "integrity": "sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s=" + } + } + }, + "bytes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", + "integrity": "sha1-0ygVQE1olpn4Wk6k+odV3ROpYEg=" + }, + "callsite": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/callsite/-/callsite-1.0.0.tgz", + "integrity": "sha1-KAOY5dZkvXQDi28JBRU+borxvCA=" + }, + "camelcase": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", + "integrity": "sha1-fB0W1nmhu+WcoCys7PsBHiAfWh8=" + }, + "caseless": { + "version": "0.12.0", + "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + } + }, + "cloudant-follow": { + "version": "0.17.0", + "resolved": "https://registry.npmjs.org/cloudant-follow/-/cloudant-follow-0.17.0.tgz", + "integrity": "sha512-JQ1xvKAHh8rsnSVBjATLCjz/vQw1sWBGadxr2H69yFMwD7hShUGDwwEefdypaxroUJ/w6t1cSwilp/hRUxEW8w==", + "requires": { + "browser-request": "~0.3.0", + "debug": "^3.0.0", + "request": "^2.83.0" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=" + }, + "colors": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/colors/-/colors-1.0.3.tgz", + "integrity": "sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=" + }, + "colour": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/colour/-/colour-0.7.1.tgz", + "integrity": "sha1-nLFpkX7F0SwHNtPoaFdG3xyt93g=" + }, + "combined-stream": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.7.tgz", + "integrity": "sha512-brWl9y6vOB1xYPZcpZde3N9zDByXTosAeMDo4p1wzo6UMOX4vumB+TP1RZ76sfE6Md68Q0NJSrE/gbezd4Ul+w==", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + }, + "content-type": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", + "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==" + }, + "cookie": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.3.1.tgz", + "integrity": "sha1-5+Ch+e9DtMi6klxcWpboBtFoc7s=" + }, + "cookie-parser": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.4.tgz", + "integrity": "sha512-lo13tqF3JEtFO7FyA49CqbhaFkskRJ0u/UAiINgrIXeRCY41c88/zxtrECl8AKH3B0hj9q10+h3Kt8I7KlW4tw==", + "requires": { + "cookie": "0.3.1", + "cookie-signature": "1.0.6" + } + }, + "cookie-signature": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", + "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=" + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "cors": { + "version": "2.8.5", + "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", + "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", + "requires": { + "object-assign": "^4", + "vary": "^1" + } + }, + "crc": { + "version": "3.4.4", + "resolved": "https://registry.npmjs.org/crc/-/crc-3.4.4.tgz", + "integrity": "sha1-naHpgOO9RPxck79as9ozeNheRms=" + }, + "cycle": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/cycle/-/cycle-1.0.3.tgz", + "integrity": "sha1-IegLK+hYD5i0aPN5QwZisEbDStI=" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "requires": { + "ms": "2.0.0" + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=" + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "depd": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", + "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=" + }, + "destroy": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.0.4.tgz", + "integrity": "sha1-l4hXRCxEdJ5CBmE+N5RiBYJqvYA=" + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "ecdsa-sig-formatter": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", + "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "ee-first": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", + "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" + }, + "elliptic": { + "version": "6.4.1", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.4.1.tgz", + "integrity": "sha512-BsXLz5sqX8OHcsh7CqBMztyXARmGQ3LWPtGjJi6DiJHq5C/qvi9P3OqgswKSDftbu8+IoI/QDTAm2fFnQ9SZSQ==", + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + } + }, + "encodeurl": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", + "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=" + }, + "end-of-stream": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.1.tgz", + "integrity": "sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q==", + "requires": { + "once": "^1.4.0" + } + }, + "errs": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/errs/-/errs-0.3.2.tgz", + "integrity": "sha1-eYCZstvTfKK8dJ5TinwTB9C1BJk=" + }, + "escape-html": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", + "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=" + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==" + }, + "etag": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", + "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=" + }, + "express": { + "version": "4.16.4", + "resolved": "https://registry.npmjs.org/express/-/express-4.16.4.tgz", + "integrity": "sha512-j12Uuyb4FMrd/qQAm6uCHAkPtO8FDTRJZBDd5D2KOL2eLaz1yUNdUB/NOIyq0iU4q4cFarsUCrnFDPBcnksuOg==", + "requires": { + "accepts": "~1.3.5", + "array-flatten": "1.1.1", + "body-parser": "1.18.3", + "content-disposition": "0.5.2", + "content-type": "~1.0.4", + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "debug": "2.6.9", + "depd": "~1.1.2", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "finalhandler": "1.1.1", + "fresh": "0.5.2", + "merge-descriptors": "1.0.1", + "methods": "~1.1.2", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "path-to-regexp": "0.1.7", + "proxy-addr": "~2.0.4", + "qs": "6.5.2", + "range-parser": "~1.2.0", + "safe-buffer": "5.1.2", + "send": "0.16.2", + "serve-static": "1.13.2", + "setprototypeof": "1.1.0", + "statuses": "~1.4.0", + "type-is": "~1.6.16", + "utils-merge": "1.0.1", + "vary": "~1.1.2" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + } + } + }, + "express-bearer-token": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/express-bearer-token/-/express-bearer-token-2.2.0.tgz", + "integrity": "sha512-w4A62k6modqSlE/CJzurj2YwisoVHWqrXiNs5P+CZD7MFORbcsOBbpjD3SGGKEW44R46Kps3QopaICE6p7dORw==" + }, + "express-jwt": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/express-jwt/-/express-jwt-5.3.1.tgz", + "integrity": "sha512-1C9RNq0wMp/JvsH/qZMlg3SIPvKu14YkZ4YYv7gJQ1Vq+Dv8LH9tLKenS5vMNth45gTlEUGx+ycp9IHIlaHP/g==", + "requires": { + "async": "^1.5.0", + "express-unless": "^0.3.0", + "jsonwebtoken": "^8.1.0", + "lodash.set": "^4.0.0" + }, + "dependencies": { + "jsonwebtoken": { + "version": "8.5.0", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-8.5.0.tgz", + "integrity": "sha512-IqEycp0znWHNA11TpYi77bVgyBO/pGESDh7Ajhas+u0ttkGkKYIIAjniL4Bw5+oVejVF+SYkaI7XKfwCCyeTuA==", + "requires": { + "jws": "^3.2.1", + "lodash.includes": "^4.3.0", + "lodash.isboolean": "^3.0.3", + "lodash.isinteger": "^4.0.4", + "lodash.isnumber": "^3.0.3", + "lodash.isplainobject": "^4.0.6", + "lodash.isstring": "^4.0.1", + "lodash.once": "^4.0.0", + "ms": "^2.1.1", + "semver": "^5.6.0" + } + }, + "ms": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", + "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + } + } + }, + "express-session": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/express-session/-/express-session-1.15.6.tgz", + "integrity": "sha512-r0nrHTCYtAMrFwZ0kBzZEXa1vtPVrw0dKvGSrKP4dahwBQ1BJpF2/y1Pp4sCD/0kvxV4zZeclyvfmw0B4RMJQA==", + "requires": { + "cookie": "0.3.1", + "cookie-signature": "1.0.6", + "crc": "3.4.4", + "debug": "2.6.9", + "depd": "~1.1.1", + "on-headers": "~1.0.1", + "parseurl": "~1.3.2", + "uid-safe": "~2.1.5", + "utils-merge": "1.0.1" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "express-unless": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/express-unless/-/express-unless-0.3.1.tgz", + "integrity": "sha1-JVfBRudb65A+LSR/m1ugFFJpbiA=" + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "eyes": { + "version": "0.1.8", + "resolved": "https://registry.npmjs.org/eyes/-/eyes-0.1.8.tgz", + "integrity": "sha1-Ys8SAjTGg3hdkCNIqADvPgzCC8A=" + }, + "fabric-ca-client": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/fabric-ca-client/-/fabric-ca-client-1.4.0.tgz", + "integrity": "sha512-zsysTfpqHsXfymO5F6g5oip6kmtwyiNwkD1CfbndDdzA9JM5pWRrs+ajomfijFfVN9HyiMNQfID/auxk3az4tg==", + "requires": { + "@types/bytebuffer": "^5.0.34", + "bn.js": "^4.11.3", + "elliptic": "^6.2.3", + "fs-extra": "^6.0.1", + "grpc": "1.14.2", + "js-sha3": "^0.7.0", + "jsrsasign": "^7.2.2", + "jssha": "^2.1.0", + "long": "^4.0.0", + "nconf": "^0.10.0", + "sjcl": "1.0.7", + "url": "^0.11.0", + "util": "^0.10.3", + "winston": "^2.2.0" + }, + "dependencies": { + "fs-extra": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", + "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + } + } + }, + "fabric-client": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/fabric-client/-/fabric-client-1.4.0.tgz", + "integrity": "sha512-wCL00bnNhiFkr24v0sTSXSf/shub3mrZtdYp5DmqQXFCmwqtc+49XuzD1f9HyDXQlZAsrqvL3Gs+hFgIAC0NIg==", + "requires": { + "@types/bytebuffer": "^5.0.34", + "bn.js": "^4.11.3", + "callsite": "^1.0.0", + "elliptic": "^6.2.3", + "fs-extra": "^6.0.1", + "grpc": "1.14.2", + "hoek": "^4.2.1", + "ignore-walk": "^3.0.0", + "js-sha3": "^0.7.0", + "js-yaml": "^3.9.0", + "jsrsasign": "^7.2.2", + "jssha": "^2.1.0", + "klaw": "^2.0.0", + "long": "^4.0.0", + "nano": "^6.4.4", + "nconf": "^0.10.0", + "pkcs11js": "^1.0.6", + "promise-settle": "^0.3.0", + "protobufjs": "5.0.3", + "sjcl": "1.0.7", + "stream-buffers": "3.0.1", + "tar-stream": "1.6.1", + "url": "^0.11.0", + "winston": "^2.2.0" + }, + "dependencies": { + "fs-extra": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-6.0.1.tgz", + "integrity": "sha512-GnyIkKhhzXZUWFCaJzvyDLEEgDkPfb4/TPvJCJVuS8MWZgoSsErf++QpiAlDnKFcqhRlm+tIOcencCjyJE6ZCA==", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^4.0.0", + "universalify": "^0.1.0" + } + } + } + }, + "fabric-sdk-kvs-vault": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/fabric-sdk-kvs-vault/-/fabric-sdk-kvs-vault-0.1.0.tgz", + "integrity": "sha512-HTLT/UPH9gFbAolpAcMUjW8YNVvsKNos8h1xl1hQic2W1J/zMaOmEYOjtElaX2q0HAFDKBRcEjAKBzTNiz5kFQ==", + "requires": { + "debug": "3.1.0", + "node-vault": "^0.9.0" + } + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "finalhandler": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.1.tgz", + "integrity": "sha512-Y1GUDo39ez4aHAw7MysnUD5JzYX+WaIj8I57kO3aEPT1fFRL4sr7mjei97FgnwhAyyzRYmQZaTHb2+9uZ1dPtg==", + "requires": { + "debug": "2.6.9", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "on-finished": "~2.3.0", + "parseurl": "~1.3.2", + "statuses": "~1.4.0", + "unpipe": "~1.0.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + } + } + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", + "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "forwarded": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.1.2.tgz", + "integrity": "sha1-mMI9qxF1ZXuMBXPozszZGw/xjIQ=" + }, + "fresh": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", + "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=" + }, + "fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==" + }, + "fs-extra": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-2.1.2.tgz", + "integrity": "sha1-BGxwFjzvmq1GsOSn+kZ/si1x3jU=", + "requires": { + "graceful-fs": "^4.1.2", + "jsonfile": "^2.1.0" + }, + "dependencies": { + "jsonfile": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", + "integrity": "sha1-NzaitCi4e72gzIO1P6PWM6NcKug=", + "requires": { + "graceful-fs": "^4.1.6" + } + } + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + }, + "getpass": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.1.15", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.1.15.tgz", + "integrity": "sha512-6uHUhOPEBgQ24HM+r6b/QwWfZq+yiFcipKFrOFiBEnWdy5sdzYoi+pJeQaPI5qOLRFqWmAXUPQNsielzdLoecA==" + }, + "grpc": { + "version": "1.14.2", + "resolved": "https://registry.npmjs.org/grpc/-/grpc-1.14.2.tgz", + "integrity": "sha512-1Y4R3s8UEoMZQqytoeSalk2FFbhnTLLR8kBQNB7jn8+KfYJalYtI/IyHLg+99irFZMYGu40jtseXX2Q+CqF8nQ==", + "requires": { + "lodash": "^4.17.5", + "nan": "^2.0.0", + "node-pre-gyp": "^0.10.0", + "protobufjs": "^5.0.3" + }, + "dependencies": { + "abbrev": { + "version": "1.1.1", + "bundled": true + }, + "ansi-regex": { + "version": "2.1.1", + "bundled": true + }, + "aproba": { + "version": "1.2.0", + "bundled": true + }, + "are-we-there-yet": { + "version": "1.1.5", + "bundled": true, + "requires": { + "delegates": "^1.0.0", + "readable-stream": "^2.0.6" + } + }, + "balanced-match": { + "version": "1.0.0", + "bundled": true + }, + "brace-expansion": { + "version": "1.1.11", + "bundled": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "chownr": { + "version": "1.0.1", + "bundled": true + }, + "code-point-at": { + "version": "1.1.0", + "bundled": true + }, + "concat-map": { + "version": "0.0.1", + "bundled": true + }, + "console-control-strings": { + "version": "1.1.0", + "bundled": true + }, + "core-util-is": { + "version": "1.0.2", + "bundled": true + }, + "debug": { + "version": "2.6.9", + "bundled": true, + "requires": { + "ms": "2.0.0" + } + }, + "deep-extend": { + "version": "0.6.0", + "bundled": true + }, + "delegates": { + "version": "1.0.0", + "bundled": true + }, + "detect-libc": { + "version": "1.0.3", + "bundled": true + }, + "fs-minipass": { + "version": "1.2.5", + "bundled": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "fs.realpath": { + "version": "1.0.0", + "bundled": true + }, + "gauge": { + "version": "2.7.4", + "bundled": true, + "requires": { + "aproba": "^1.0.3", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.0", + "object-assign": "^4.1.0", + "signal-exit": "^3.0.0", + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wide-align": "^1.1.0" + } + }, + "glob": { + "version": "7.1.3", + "bundled": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-unicode": { + "version": "2.0.1", + "bundled": true + }, + "iconv-lite": { + "version": "0.4.24", + "bundled": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "bundled": true, + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "bundled": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "bundled": true + }, + "ini": { + "version": "1.3.5", + "bundled": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "bundled": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "isarray": { + "version": "1.0.0", + "bundled": true + }, + "minimatch": { + "version": "3.0.4", + "bundled": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.0", + "bundled": true + }, + "minipass": { + "version": "2.3.4", + "bundled": true, + "requires": { + "safe-buffer": "^5.1.2", + "yallist": "^3.0.0" + } + }, + "minizlib": { + "version": "1.1.0", + "bundled": true, + "requires": { + "minipass": "^2.2.1" + } + }, + "mkdirp": { + "version": "0.5.1", + "bundled": true, + "requires": { + "minimist": "0.0.8" + }, + "dependencies": { + "minimist": { + "version": "0.0.8", + "bundled": true + } + } + }, + "ms": { + "version": "2.0.0", + "bundled": true + }, + "needle": { + "version": "2.2.2", + "bundled": true, + "requires": { + "debug": "^2.1.2", + "iconv-lite": "^0.4.4", + "sax": "^1.2.4" + } + }, + "node-pre-gyp": { + "version": "0.10.3", + "bundled": true, + "requires": { + "detect-libc": "^1.0.2", + "mkdirp": "^0.5.1", + "needle": "^2.2.1", + "nopt": "^4.0.1", + "npm-packlist": "^1.1.6", + "npmlog": "^4.0.2", + "rc": "^1.2.7", + "rimraf": "^2.6.1", + "semver": "^5.3.0", + "tar": "^4" + } + }, + "nopt": { + "version": "4.0.1", + "bundled": true, + "requires": { + "abbrev": "1", + "osenv": "^0.1.4" + } + }, + "npm-bundled": { + "version": "1.0.5", + "bundled": true + }, + "npm-packlist": { + "version": "1.1.11", + "bundled": true, + "requires": { + "ignore-walk": "^3.0.1", + "npm-bundled": "^1.0.1" + } + }, + "npmlog": { + "version": "4.1.2", + "bundled": true, + "requires": { + "are-we-there-yet": "~1.1.2", + "console-control-strings": "~1.1.0", + "gauge": "~2.7.3", + "set-blocking": "~2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "bundled": true + }, + "object-assign": { + "version": "4.1.1", + "bundled": true + }, + "once": { + "version": "1.4.0", + "bundled": true, + "requires": { + "wrappy": "1" + } + }, + "os-homedir": { + "version": "1.0.2", + "bundled": true + }, + "os-tmpdir": { + "version": "1.0.2", + "bundled": true + }, + "osenv": { + "version": "0.1.5", + "bundled": true, + "requires": { + "os-homedir": "^1.0.0", + "os-tmpdir": "^1.0.0" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "bundled": true + }, + "process-nextick-args": { + "version": "2.0.0", + "bundled": true + }, + "rc": { + "version": "1.2.8", + "bundled": true, + "requires": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + } + }, + "readable-stream": { + "version": "2.3.6", + "bundled": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "rimraf": { + "version": "2.6.2", + "bundled": true, + "requires": { + "glob": "^7.0.5" + } + }, + "safe-buffer": { + "version": "5.1.2", + "bundled": true + }, + "safer-buffer": { + "version": "2.1.2", + "bundled": true + }, + "sax": { + "version": "1.2.4", + "bundled": true + }, + "semver": { + "version": "5.5.1", + "bundled": true + }, + "set-blocking": { + "version": "2.0.0", + "bundled": true + }, + "signal-exit": { + "version": "3.0.2", + "bundled": true + }, + "string-width": { + "version": "1.0.2", + "bundled": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "bundled": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "bundled": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-json-comments": { + "version": "2.0.1", + "bundled": true + }, + "tar": { + "version": "4.4.6", + "bundled": true, + "requires": { + "chownr": "^1.0.1", + "fs-minipass": "^1.2.5", + "minipass": "^2.3.3", + "minizlib": "^1.1.0", + "mkdirp": "^0.5.0", + "safe-buffer": "^5.1.2", + "yallist": "^3.0.2" + } + }, + "util-deprecate": { + "version": "1.0.2", + "bundled": true + }, + "wide-align": { + "version": "1.1.3", + "bundled": true, + "requires": { + "string-width": "^1.0.2 || 2" + } + }, + "wrappy": { + "version": "1.0.2", + "bundled": true + }, + "yallist": { + "version": "3.0.2", + "bundled": true + } + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "hoek": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-4.2.1.tgz", + "integrity": "sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA==" + }, + "http-errors": { + "version": "1.6.3", + "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", + "integrity": "sha1-i1VoC7S+KDoLW/TqLjhYC+HZMg0=", + "requires": { + "depd": "~1.1.2", + "inherits": "2.0.3", + "setprototypeof": "1.1.0", + "statuses": ">= 1.4.0 < 2" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "iconv-lite": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.23.tgz", + "integrity": "sha512-neyTUVFtahjf0mB3dZT77u+8O0QB89jFdnBkd5P1JgYPbPaia3gXXOVL2fq8VyU2gMMD7SaN7QukTB/pmXYvDA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ignore-walk": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ignore-walk/-/ignore-walk-3.0.1.tgz", + "integrity": "sha512-DTVlMx3IYPe0/JJcYP7Gxg7ttZZu3IInhuEhbchuqneY9wWe5Ojy2mXLBaQFUQmo0AW2r3qG7m1mg86js+gnlQ==", + "requires": { + "minimatch": "^3.0.4" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=" + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==" + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=" + }, + "ipaddr.js": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.8.0.tgz", + "integrity": "sha1-6qM9bd16zo9/b+DJygRA5wZzix4=" + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=" + }, + "isemail": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/isemail/-/isemail-1.2.0.tgz", + "integrity": "sha1-vgPfjMPineTSxd9lASY/H6RZXpo=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "joi": { + "version": "6.10.1", + "resolved": "https://registry.npmjs.org/joi/-/joi-6.10.1.tgz", + "integrity": "sha1-TVDDGAeRIgAP5fFq8f+OGRe3fgY=", + "requires": { + "hoek": "2.x.x", + "isemail": "1.x.x", + "moment": "2.x.x", + "topo": "1.x.x" + }, + "dependencies": { + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" + } + } + }, + "js-sha3": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/js-sha3/-/js-sha3-0.7.0.tgz", + "integrity": "sha512-Wpks3yBDm0UcL5qlVhwW9Jr9n9i4FfeWBFOOXP5puDS/SiudJGhw7DPyBqn3487qD4F0lsC0q3zxink37f7zeA==" + }, + "js-yaml": { + "version": "3.12.1", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.12.1.tgz", + "integrity": "sha512-um46hB9wNOKlwkHgiuyEVAybXBjwFUV0Z/RaHJblRd9DXltue9FTYvzCr9ErQrK9Adz5MU4gHWVaNUfdmrC8qA==", + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsbn": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsonfile": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-4.0.0.tgz", + "integrity": "sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=", + "requires": { + "graceful-fs": "^4.1.6" + } + }, + "jsonwebtoken": { + "version": "7.4.3", + "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-7.4.3.tgz", + "integrity": "sha1-d/UCHeBYtgWheD+hKD6ZgS5kVjg=", + "requires": { + "joi": "^6.10.1", + "jws": "^3.1.4", + "lodash.once": "^4.0.0", + "ms": "^2.0.0", + "xtend": "^4.0.1" + } + }, + "jsprim": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "jsrsasign": { + "version": "7.2.2", + "resolved": "https://registry.npmjs.org/jsrsasign/-/jsrsasign-7.2.2.tgz", + "integrity": "sha1-rlIwy1V0RRu5eanMaXQoxg9ZjSA=" + }, + "jssha": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/jssha/-/jssha-2.3.1.tgz", + "integrity": "sha1-FHshJTaQNcpLL30hDcU58Amz3po=" + }, + "jwa": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.3.0.tgz", + "integrity": "sha512-SxObIyzv9a6MYuZYaSN6DhSm9j3+qkokwvCB0/OTSV5ylPq1wUQiygZQcHT5Qlux0I5kmISx3J86TxKhuefItg==", + "requires": { + "buffer-equal-constant-time": "1.0.1", + "ecdsa-sig-formatter": "1.0.11", + "safe-buffer": "^5.0.1" + } + }, + "jws": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.1.tgz", + "integrity": "sha512-bGA2omSrFUkd72dhh05bIAN832znP4wOU3lfuXtRBuGTbsmNmDXMQg28f0Vsxaxgk4myF5YkKQpz6qeRpMgX9g==", + "requires": { + "jwa": "^1.2.0", + "safe-buffer": "^5.0.1" + } + }, + "klaw": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/klaw/-/klaw-2.1.1.tgz", + "integrity": "sha1-QrdolHARacyRD9DRnOZ3tfs3ivE=", + "requires": { + "graceful-fs": "^4.1.9" + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "requires": { + "invert-kv": "^1.0.0" + } + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + }, + "lodash.includes": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/lodash.includes/-/lodash.includes-4.3.0.tgz", + "integrity": "sha1-YLuYqHy5I8aMoeUTJUgzFISfVT8=" + }, + "lodash.isboolean": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isboolean/-/lodash.isboolean-3.0.3.tgz", + "integrity": "sha1-bC4XHbKiV82WgC/UOwGyDV9YcPY=" + }, + "lodash.isempty": { + "version": "4.4.0", + "resolved": "https://registry.npmjs.org/lodash.isempty/-/lodash.isempty-4.4.0.tgz", + "integrity": "sha1-b4bL7di+TsmHvpqvM8loTbGzHn4=" + }, + "lodash.isinteger": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/lodash.isinteger/-/lodash.isinteger-4.0.4.tgz", + "integrity": "sha1-YZwK89A/iwTDH1iChAt3sRzWg0M=" + }, + "lodash.isnumber": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/lodash.isnumber/-/lodash.isnumber-3.0.3.tgz", + "integrity": "sha1-POdoEMWSjQM1IwGsKHMX8RwLH/w=" + }, + "lodash.isplainobject": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz", + "integrity": "sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs=" + }, + "lodash.isstring": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/lodash.isstring/-/lodash.isstring-4.0.1.tgz", + "integrity": "sha1-1SfftUVuynzJu5XV2ur4i6VKVFE=" + }, + "lodash.once": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/lodash.once/-/lodash.once-4.1.1.tgz", + "integrity": "sha1-DdOXEhPHxW34gJd9UEyI+0cal6w=" + }, + "lodash.set": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/lodash.set/-/lodash.set-4.3.2.tgz", + "integrity": "sha1-2HV7HagH3eJIFrDWqEvqGnYjCyM=" + }, + "log4js": { + "version": "0.6.38", + "resolved": "https://registry.npmjs.org/log4js/-/log4js-0.6.38.tgz", + "integrity": "sha1-LElBFmldb7JUgJQ9P8hy5mKlIv0=", + "requires": { + "readable-stream": "~1.0.2", + "semver": "~4.3.3" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=" + }, + "readable-stream": { + "version": "1.0.34", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.0.34.tgz", + "integrity": "sha1-Elgg40vIQtLyqq+v5MKRbuMsFXw=", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "semver": { + "version": "4.3.6", + "resolved": "https://registry.npmjs.org/semver/-/semver-4.3.6.tgz", + "integrity": "sha1-MAvG4OhjdPe6YQaLWx7NV/xlMto=" + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=" + } + } + }, + "long": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/long/-/long-4.0.0.tgz", + "integrity": "sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==" + }, + "media-typer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", + "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=" + }, + "merge-descriptors": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", + "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=" + }, + "methods": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", + "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=" + }, + "mime": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/mime/-/mime-1.4.1.tgz", + "integrity": "sha512-KI1+qOZu5DcW6wayYHSzR/tXKCDC5Om4s1z2QJjDULzLcmf3DvzS7oluY4HCTrc+9FiKmWUgeNLg7W3uIQvxtQ==" + }, + "mime-db": { + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", + "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==" + }, + "mime-types": { + "version": "2.1.22", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", + "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", + "requires": { + "mime-db": "~1.38.0" + } + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==" + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=" + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "moment": { + "version": "2.24.0", + "resolved": "https://registry.npmjs.org/moment/-/moment-2.24.0.tgz", + "integrity": "sha512-bV7f+6l2QigeBBZSM/6yTNq4P2fNpSWj/0e7jQcy87A8e7o2nAfP/34/2ky5Vw4B9S446EtIhodAzkFCcR4dQg==" + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" + }, + "mustache": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/mustache/-/mustache-2.3.2.tgz", + "integrity": "sha512-KpMNwdQsYz3O/SBS1qJ/o3sqUJ5wSb8gb0pul8CO0S56b9Y2ALm8zCfsjPXsqGFfoNBkDwZuZIAjhsZI03gYVQ==" + }, + "nan": { + "version": "2.12.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.12.1.tgz", + "integrity": "sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw==" + }, + "nano": { + "version": "6.4.4", + "resolved": "https://registry.npmjs.org/nano/-/nano-6.4.4.tgz", + "integrity": "sha512-7sldMrZI1ZH8QE29PnzohxLfR67WNVzMKLa7EMl3x9Hr+0G+YpOUCq50qZ9G66APrjcb0Of2BTOZLNBCutZGag==", + "requires": { + "cloudant-follow": "~0.17.0", + "debug": "^2.2.0", + "errs": "^0.3.2", + "lodash.isempty": "^4.4.0", + "request": "^2.85.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + } + } + }, + "nconf": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/nconf/-/nconf-0.10.0.tgz", + "integrity": "sha512-fKiXMQrpP7CYWJQzKkPPx9hPgmq+YLDyxcG9N8RpiE9FoCkCbzD0NyW0YhE3xn3Aupe7nnDeIx4PFzYehpHT9Q==", + "requires": { + "async": "^1.4.0", + "ini": "^1.3.0", + "secure-keys": "^1.0.0", + "yargs": "^3.19.0" + } + }, + "negotiator": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.1.tgz", + "integrity": "sha1-KzJxhOiZIQEXeyhWP7XnECrNDKk=" + }, + "node-vault": { + "version": "0.9.6", + "resolved": "https://registry.npmjs.org/node-vault/-/node-vault-0.9.6.tgz", + "integrity": "sha512-luacwNLcOcDi5Fcnm+T19weRZqA4nqLQuLg7ubo4uz3iIFyESPgUI5Vo+8I1nZLkCGa4LUHSR3nOJNDMZQAjkA==", + "requires": { + "debug": "3.1.0", + "mustache": "^2.2.1", + "request": "^2.83.0", + "request-promise-native": "^1.0.5", + "tv4": "^1.2.7" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=" + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=" + }, + "on-finished": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", + "integrity": "sha1-IPEzZIGwg811M3mSoWlxqi2QaUc=", + "requires": { + "ee-first": "1.1.1" + } + }, + "on-headers": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", + "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "requires": { + "wrappy": "1" + } + }, + "optjs": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/optjs/-/optjs-3.2.2.tgz", + "integrity": "sha1-aabOicRCpEQDFBrS+bNwvVu29O4=" + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "requires": { + "lcid": "^1.0.0" + } + }, + "parseurl": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.2.tgz", + "integrity": "sha1-/CidTtiZMRlGDBViUyYs3I3mW/M=" + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + }, + "path-to-regexp": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", + "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "pkcs11js": { + "version": "1.0.17", + "resolved": "https://registry.npmjs.org/pkcs11js/-/pkcs11js-1.0.17.tgz", + "integrity": "sha512-JQN70Vafra1L9eDrpDevw5J7cDRV16Osamm0GJQgRTQA6DL3SokfaD2U7mt0pZ/XN6qlkMPrQ463JlK9J6y8gg==", + "requires": { + "nan": "^2.10.0" + } + }, + "process-nextick-args": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.0.tgz", + "integrity": "sha512-MtEC1TqN0EU5nephaJ4rAtThHtC86dNN9qCuEhtshvpVBkAW5ZO7BASN9REnF9eoXGcRub+pFuKEpOHE+HbEMw==" + }, + "promise-settle": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/promise-settle/-/promise-settle-0.3.0.tgz", + "integrity": "sha1-tO/VcqHrdM95T4KM00naQKCOTpY=" + }, + "protobufjs": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-5.0.3.tgz", + "integrity": "sha512-55Kcx1MhPZX0zTbVosMQEO5R6/rikNXd9b6RQK4KSPcrSIIwoXTtebIczUrXlwaSrbz4x8XUVThGPob1n8I4QA==", + "requires": { + "ascli": "~1", + "bytebuffer": "~5", + "glob": "^7.0.5", + "yargs": "^3.10.0" + } + }, + "proxy-addr": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.4.tgz", + "integrity": "sha512-5erio2h9jp5CHGwcybmxmVqHmnCBZeewlfJ0pex+UW7Qny7OOZXTtH56TGNyBizkgiOwhJtMKrVzDTeKcySZwA==", + "requires": { + "forwarded": "~0.1.2", + "ipaddr.js": "1.8.0" + } + }, + "psl": { + "version": "1.1.31", + "resolved": "https://registry.npmjs.org/psl/-/psl-1.1.31.tgz", + "integrity": "sha512-/6pt4+C+T+wZUieKR620OpzN/LlnNKuWjy1iFLQ/UG35JqHlR/89MP1d96dUfkf6Dne3TuLQzOYEYshJ+Hx8mw==" + }, + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==" + }, + "qs": { + "version": "6.5.2", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.2.tgz", + "integrity": "sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA==" + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=" + }, + "random-bytes": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/random-bytes/-/random-bytes-1.0.0.tgz", + "integrity": "sha1-T2ih3Arli9P7lYSMMDJNt11kNgs=" + }, + "range-parser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.0.tgz", + "integrity": "sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4=" + }, + "raw-body": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.3.3.tgz", + "integrity": "sha512-9esiElv1BrZoI3rCDuOuKCBRbuApGGaDPQfjSflGxdy4oyzqghxu6klEkkVIvBje+FF0BX9coEv8KqW6X/7njw==", + "requires": { + "bytes": "3.0.0", + "http-errors": "1.6.3", + "iconv-lite": "0.4.23", + "unpipe": "1.0.0" + } + }, + "readable-stream": { + "version": "2.3.6", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.6.tgz", + "integrity": "sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw==", + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "request": { + "version": "2.88.0", + "resolved": "https://registry.npmjs.org/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "request-promise-core": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/request-promise-core/-/request-promise-core-1.1.2.tgz", + "integrity": "sha512-UHYyq1MO8GsefGEt7EprS8UrXsm1TxEvFUX1IMTuSLU2Rh7fTIdFtl8xD7JiEYiWU2dl+NYAjCTksTehQUxPag==", + "requires": { + "lodash": "^4.17.11" + } + }, + "request-promise-native": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/request-promise-native/-/request-promise-native-1.0.7.tgz", + "integrity": "sha512-rIMnbBdgNViL37nZ1b3L/VfPOpSi0TqVDQPAvO6U14lMzOLrt5nilxCQqtDKhZeDiW0/hkCXGoQjhgJd/tCh6w==", + "requires": { + "request-promise-core": "1.1.2", + "stealthy-require": "^1.1.1", + "tough-cookie": "^2.3.3" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "secure-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/secure-keys/-/secure-keys-1.0.0.tgz", + "integrity": "sha1-8MgtmKOxOah3aogIBQuCRDEIf8o=" + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + }, + "send": { + "version": "0.16.2", + "resolved": "https://registry.npmjs.org/send/-/send-0.16.2.tgz", + "integrity": "sha512-E64YFPUssFHEFBvpbbjr44NCLtI1AohxQ8ZSiJjQLskAdKuriYEP6VyGEsRDH8ScozGpkaX1BGvhanqCwkcEZw==", + "requires": { + "debug": "2.6.9", + "depd": "~1.1.2", + "destroy": "~1.0.4", + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "etag": "~1.8.1", + "fresh": "0.5.2", + "http-errors": "~1.6.2", + "mime": "1.4.1", + "ms": "2.0.0", + "on-finished": "~2.3.0", + "range-parser": "~1.2.0", + "statuses": "~1.4.0" + }, + "dependencies": { + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "requires": { + "ms": "2.0.0" + } + }, + "statuses": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.4.0.tgz", + "integrity": "sha512-zhSCtt8v2NDrRlPQpCNtw/heZLtfUDqxBM1udqikb/Hbk52LK4nQSwr10u77iopCW5LsyHpuXS0GnEc48mLeew==" + } + } + }, + "serve-static": { + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.13.2.tgz", + "integrity": "sha512-p/tdJrO4U387R9oMjb1oj7qSMaMfmOyd4j9hOFoxZe2baQszgHcSWjuya/CiT5kgZZKRudHNOA0pYXOl8rQ5nw==", + "requires": { + "encodeurl": "~1.0.2", + "escape-html": "~1.0.3", + "parseurl": "~1.3.2", + "send": "0.16.2" + } + }, + "setprototypeof": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", + "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==" + }, + "sjcl": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/sjcl/-/sjcl-1.0.7.tgz", + "integrity": "sha1-MrNlpQ3Ju6JriLo8nfjqNCF9n0U=" + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=" + }, + "sshpk": { + "version": "1.16.1", + "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=" + }, + "statuses": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", + "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=" + }, + "stealthy-require": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stealthy-require/-/stealthy-require-1.1.1.tgz", + "integrity": "sha1-NbCYdbT/SfJqd35QmzCQoyJr8ks=" + }, + "stream-buffers": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-3.0.1.tgz", + "integrity": "sha1-aKOMX6re3tef95mI02jj+xMl7wY=" + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "tar-stream": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-1.6.1.tgz", + "integrity": "sha512-IFLM5wp3QrJODQFPm6/to3LJZrONdBY/otxcvDIQzu217zKye6yVR3hhi9lAjrC2Z+m/j5oDxMPb1qcd8cIvpA==", + "requires": { + "bl": "^1.0.0", + "buffer-alloc": "^1.1.0", + "end-of-stream": "^1.0.0", + "fs-constants": "^1.0.0", + "readable-stream": "^2.3.0", + "to-buffer": "^1.1.0", + "xtend": "^4.0.0" + } + }, + "to-buffer": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/to-buffer/-/to-buffer-1.1.1.tgz", + "integrity": "sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==" + }, + "topo": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/topo/-/topo-1.1.0.tgz", + "integrity": "sha1-6ddRYV0buH3IZdsYL6HKCl71NtU=", + "requires": { + "hoek": "2.x.x" + }, + "dependencies": { + "hoek": { + "version": "2.16.3", + "resolved": "https://registry.npmjs.org/hoek/-/hoek-2.16.3.tgz", + "integrity": "sha1-ILt0A9POo5jpHcRxCo/xuCdKJe0=" + } + } + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + } + } + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tv4": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/tv4/-/tv4-1.3.0.tgz", + "integrity": "sha1-0CDIRvrdUMhVq7JeuuzGj8EPeWM=" + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "type-is": { + "version": "1.6.16", + "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.16.tgz", + "integrity": "sha512-HRkVv/5qY2G6I8iab9cI7v1bOIdhm94dVjQCPFElW9W+3GeDOSHmy2EBYe4VTApuzolPcmgFTN3ftVJRKR2J9Q==", + "requires": { + "media-typer": "0.3.0", + "mime-types": "~2.1.18" + } + }, + "uid-safe": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/uid-safe/-/uid-safe-2.1.5.tgz", + "integrity": "sha512-KPHm4VL5dDXKz01UuEd88Df+KzynaohSL9fBh096KWAxSKZQDI2uBrVqtvRM4rwrIrRRKsdLNML/lnaaVSRioA==", + "requires": { + "random-bytes": "~1.0.0" + } + }, + "universalify": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-0.1.2.tgz", + "integrity": "sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==" + }, + "unpipe": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", + "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=" + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "requires": { + "punycode": "^2.1.0" + } + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=" + } + } + }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "requires": { + "inherits": "2.0.3" + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=" + }, + "utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=" + }, + "uuid": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + }, + "vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=" + }, + "verror": { + "version": "1.10.0", + "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "window-size": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/window-size/-/window-size-0.1.4.tgz", + "integrity": "sha1-+OGqHuWlPsW/FR/6CXQqatdpeHY=" + }, + "winston": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/winston/-/winston-2.4.4.tgz", + "integrity": "sha512-NBo2Pepn4hK4V01UfcWcDlmiVTs7VTB1h7bgnB0rgP146bYhMxX0ypCz3lBOfNxCO4Zuek7yeT+y/zM1OfMw4Q==", + "requires": { + "async": "~1.0.0", + "colors": "1.0.x", + "cycle": "1.0.x", + "eyes": "0.1.x", + "isstream": "0.1.x", + "stack-trace": "0.0.x" + }, + "dependencies": { + "async": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async/-/async-1.0.0.tgz", + "integrity": "sha1-+PwEyjoTeErenhZBr5hXjPvWR6k=" + } + } + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + }, + "xtend": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.1.tgz", + "integrity": "sha1-pcbVMr5lbiPbgg77lDofBJmNY68=" + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=" + }, + "yargs": { + "version": "3.32.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-3.32.0.tgz", + "integrity": "sha1-AwiOnr+edWtpdRYR0qXvWRSCyZU=", + "requires": { + "camelcase": "^2.0.1", + "cliui": "^3.0.3", + "decamelize": "^1.1.1", + "os-locale": "^1.4.0", + "string-width": "^1.0.1", + "window-size": "^0.1.4", + "y18n": "^3.2.0" + } + } + } +} diff --git a/package.json b/package.json new file mode 100644 index 0000000..b9072bd --- /dev/null +++ b/package.json @@ -0,0 +1,38 @@ +{ + "name": "balance-transfer", + "version": "1.0.0", + "description": "A balance-transfer example node program to demonstrate using node.js SDK APIs", + "main": "app.js", + "scripts": { + "start": "node app.js" + }, + "keywords": [ + "fabric-client sample app", + "balance-transfer node sample", + "v1.0 fabric nodesdk sample" + ], + "repository": { + "type": "git", + "url": "git+ssh://git@github.com:ramanandapanda/balance-transfer-vault.git" + }, + "engines": { + "node": ">=8.9.4 <9.0", + "npm": ">=5.6.0 <6.0" + }, + "license": "Apache-2.0", + "dependencies": { + "body-parser": "^1.17.1", + "cookie-parser": "^1.4.3", + "cors": "^2.8.3", + "express": "^4.15.2", + "express-bearer-token": "^2.1.0", + "express-jwt": "^5.1.0", + "express-session": "^1.15.2", + "fabric-ca-client": "~1.4.0", + "fabric-client": "~1.4.0", + "fabric-sdk-kvs-vault": "^0.1.0", + "fs-extra": "^2.0.0", + "jsonwebtoken": "^7.3.0", + "log4js": "^0.6.38" + } +} diff --git a/runApp.sh b/runApp.sh new file mode 100755 index 0000000..e1e7d30 --- /dev/null +++ b/runApp.sh @@ -0,0 +1,62 @@ +#!/bin/bash +# +# Copyright IBM Corp. All Rights Reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# + +function dkcl(){ + CONTAINER_IDS=$(docker ps -aq) + echo + if [ -z "$CONTAINER_IDS" -o "$CONTAINER_IDS" = " " ]; then + echo "========== No containers available for deletion ==========" + else + docker rm -f $CONTAINER_IDS + fi + echo +} + +function dkrm(){ + DOCKER_IMAGE_IDS=$(docker images | grep "dev\|none\|test-vp\|peer[0-9]-" | awk '{print $3}') + echo + if [ -z "$DOCKER_IMAGE_IDS" -o "$DOCKER_IMAGE_IDS" = " " ]; then + echo "========== No images available for deletion ===========" + else + docker rmi -f $DOCKER_IMAGE_IDS + fi + echo +} + +function restartNetwork() { + echo + + #teardown the network and clean the containers and intermediate images + docker-compose -f ./artifacts/docker-compose.yaml down + dkcl + dkrm + + #Cleanup the stores + rm -rf ./fabric-client-kv-org* + + #Start the network + docker-compose -f ./artifacts/docker-compose.yaml up -d + echo +} + +function installNodeModules() { + echo + if [ -d node_modules ]; then + echo "============== node modules installed already =============" + else + echo "============== Installing node modules =============" + npm install + fi + echo +} + + +restartNetwork + +installNodeModules + +PORT=4000 node app diff --git a/testAPIs.sh b/testAPIs.sh new file mode 100755 index 0000000..6526f3f --- /dev/null +++ b/testAPIs.sh @@ -0,0 +1,277 @@ +#!/bin/bash +# +# Copyright IBM Corp. All Rights Reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# + +jq --version > /dev/null 2>&1 +if [ $? -ne 0 ]; then + echo "Please Install 'jq' https://stedolan.github.io/jq/ to execute this script" + echo + exit 1 +fi + +starttime=$(date +%s) + +# Print the usage message +function printHelp () { + echo "Usage: " + echo " ./testAPIs.sh -l golang|node" + echo " -l - chaincode language (defaults to \"golang\")" +} +# Language defaults to "golang" +LANGUAGE="golang" + +# Parse commandline args +while getopts "h?l:" opt; do + case "$opt" in + h|\?) + printHelp + exit 0 + ;; + l) LANGUAGE=$OPTARG + ;; + esac +done + +##set chaincode path +function setChaincodePath(){ + LANGUAGE=`echo "$LANGUAGE" | tr '[:upper:]' '[:lower:]'` + case "$LANGUAGE" in + "golang") + CC_SRC_PATH="github.com/example_cc/go" + ;; + "node") + CC_SRC_PATH="$PWD/artifacts/src/github.com/example_cc/node" + ;; + *) printf "\n ------ Language $LANGUAGE is not supported yet ------\n"$ + exit 1 + esac +} + +setChaincodePath + +echo "POST request Enroll on Org1 ..." +echo +ORG1_TOKEN=$(curl -s -X POST \ + http://localhost:4000/users \ + -H "content-type: application/x-www-form-urlencoded" \ + -d 'username=Jim&orgName=Org1') +echo $ORG1_TOKEN +ORG1_TOKEN=$(echo $ORG1_TOKEN | jq ".token" | sed "s/\"//g") +echo +echo "ORG1 token is $ORG1_TOKEN" +echo +echo "POST request Enroll on Org2 ..." +echo +ORG2_TOKEN=$(curl -s -X POST \ + http://localhost:4000/users \ + -H "content-type: application/x-www-form-urlencoded" \ + -d 'username=Barry&orgName=Org2') +echo $ORG2_TOKEN +ORG2_TOKEN=$(echo $ORG2_TOKEN | jq ".token" | sed "s/\"//g") +echo +echo "ORG2 token is $ORG2_TOKEN" +echo +echo +echo "POST request Create channel ..." +echo +curl -s -X POST \ + http://localhost:4000/channels \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" \ + -d '{ + "channelName":"mychannel", + "channelConfigPath":"../artifacts/channel/mychannel.tx" +}' +echo +echo +sleep 5 +echo "POST request Join channel on Org1" +echo +curl -s -X POST \ + http://localhost:4000/channels/mychannel/peers \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" \ + -d '{ + "peers": ["peer0.org1.example.com","peer1.org1.example.com"] +}' +echo +echo + +echo "POST request Join channel on Org2" +echo +curl -s -X POST \ + http://localhost:4000/channels/mychannel/peers \ + -H "authorization: Bearer $ORG2_TOKEN" \ + -H "content-type: application/json" \ + -d '{ + "peers": ["peer0.org2.example.com","peer1.org2.example.com"] +}' +echo +echo + +echo "POST request Update anchor peers on Org1" +echo +curl -s -X POST \ + http://localhost:4000/channels/mychannel/anchorpeers \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" \ + -d '{ + "configUpdatePath":"../artifacts/channel/Org1MSPanchors.tx" +}' +echo +echo + +echo "POST request Update anchor peers on Org2" +echo +curl -s -X POST \ + http://localhost:4000/channels/mychannel/anchorpeers \ + -H "authorization: Bearer $ORG2_TOKEN" \ + -H "content-type: application/json" \ + -d '{ + "configUpdatePath":"../artifacts/channel/Org2MSPanchors.tx" +}' +echo +echo + +echo "POST Install chaincode on Org1" +echo +curl -s -X POST \ + http://localhost:4000/chaincodes \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" \ + -d "{ + \"peers\": [\"peer0.org1.example.com\",\"peer1.org1.example.com\"], + \"chaincodeName\":\"mycc\", + \"chaincodePath\":\"$CC_SRC_PATH\", + \"chaincodeType\": \"$LANGUAGE\", + \"chaincodeVersion\":\"v0\" +}" +echo +echo + +echo "POST Install chaincode on Org2" +echo +curl -s -X POST \ + http://localhost:4000/chaincodes \ + -H "authorization: Bearer $ORG2_TOKEN" \ + -H "content-type: application/json" \ + -d "{ + \"peers\": [\"peer0.org2.example.com\",\"peer1.org2.example.com\"], + \"chaincodeName\":\"mycc\", + \"chaincodePath\":\"$CC_SRC_PATH\", + \"chaincodeType\": \"$LANGUAGE\", + \"chaincodeVersion\":\"v0\" +}" +echo +echo + +echo "POST instantiate chaincode on Org1" +echo +curl -s -X POST \ + http://localhost:4000/channels/mychannel/chaincodes \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" \ + -d "{ + \"chaincodeName\":\"mycc\", + \"chaincodeVersion\":\"v0\", + \"chaincodeType\": \"$LANGUAGE\", + \"args\":[\"a\",\"100\",\"b\",\"200\"] +}" +echo +echo + +echo "POST invoke chaincode on peers of Org1 and Org2" +echo +curl -s -X POST \ + http://localhost:4000/channels/mychannel/chaincodes/mycc \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" \ + -d "{ + \"peers\": [\"peer0.org1.example.com\",\"peer0.org2.example.com\"], + \"fcn\":\"move\", + \"args\":[\"a\",\"b\",\"10\"] +}" +echo +echo + +echo "GET query chaincode on peer1 of Org1" +echo +curl -s -X GET \ + "http://localhost:4000/channels/mychannel/chaincodes/mycc?peer=peer0.org1.example.com&fcn=query&args=%5B%22a%22%5D" \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" +echo +echo + +echo "GET query Block by blockNumber" +echo +BLOCK_INFO=$(curl -s -X GET \ + "http://localhost:4000/channels/mychannel/blocks/1?peer=peer0.org1.example.com" \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json") +echo $BLOCK_INFO +# Assign previvious block hash to HASH +HASH=$(echo $BLOCK_INFO | jq -r ".header.previous_hash") +echo + +echo "GET query Transaction by TransactionID" +echo +curl -s -X GET http://localhost:4000/channels/mychannel/transactions/$TRX_ID?peer=peer0.org1.example.com \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" +echo +echo + + +echo "GET query Block by Hash - Hash is $HASH" +echo +curl -s -X GET \ + "http://localhost:4000/channels/mychannel/blocks?hash=$HASH&peer=peer0.org1.example.com" \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "cache-control: no-cache" \ + -H "content-type: application/json" \ + -H "x-access-token: $ORG1_TOKEN" +echo +echo + +echo "GET query ChainInfo" +echo +curl -s -X GET \ + "http://localhost:4000/channels/mychannel?peer=peer0.org1.example.com" \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" +echo +echo + +echo "GET query Installed chaincodes" +echo +curl -s -X GET \ + "http://localhost:4000/chaincodes?peer=peer0.org1.example.com" \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" +echo +echo + +echo "GET query Instantiated chaincodes" +echo +curl -s -X GET \ + "http://localhost:4000/channels/mychannel/chaincodes?peer=peer0.org1.example.com" \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" +echo +echo + +echo "GET query Channels" +echo +curl -s -X GET \ + "http://localhost:4000/channels?peer=peer0.org1.example.com" \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" +echo +echo + + +echo "Total execution time : $(($(date +%s)-starttime)) secs ..." diff --git a/typescript/.gitignore b/typescript/.gitignore new file mode 100644 index 0000000..5e283e6 --- /dev/null +++ b/typescript/.gitignore @@ -0,0 +1,4 @@ +node_modules +package-lock.json +dist +types/fabric-client diff --git a/typescript/README.md b/typescript/README.md new file mode 100644 index 0000000..bbfdc1f --- /dev/null +++ b/typescript/README.md @@ -0,0 +1,303 @@ +## Balance transfer + +This is a sample Node.js application written using typescript which demonstrates +the **__fabric-client__** and **__fabric-ca-client__** Node.js SDK APIs for typescript. + +### Prerequisites and setup: + +* [Docker](https://www.docker.com/products/overview) - v1.12 or higher +* [Docker Compose](https://docs.docker.com/compose/overview/) - v1.8 or higher +* [Git client](https://git-scm.com/downloads) - needed for clone commands +* **Node.js** v6.9.0 - 6.10.0 ( __Node v7+ is not supported__ ) +* [Download Docker images](http://hyperledger-fabric.readthedocs.io/en/latest/samples.html#binaries) + +``` +cd fabric-samples/balance-transfer/ +``` + +Once you have completed the above setup, you will have provisioned a local network with the following docker container configuration: + +* 2 CAs +* A SOLO orderer +* 4 peers (2 peers per Org) + +#### Artifacts + +* Crypto material has been generated using the **cryptogen** tool from Hyperledger Fabric and mounted to all peers, the orderering node and CA containers. More details regarding the cryptogen tool are available [here](http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html#crypto-generator). + +* An Orderer genesis block (genesis.block) and channel configuration transaction (mychannel.tx) has been pre generated using the **configtxgen** tool from Hyperledger Fabric and placed within the artifacts folder. More details regarding the configtxgen tool are available [here](http://hyperledger-fabric.readthedocs.io/en/latest/build_network.html#configuration-transaction-generator). + +## Running the sample program + +There are two options available for running the balance-transfer sample as shown below. + +### Option 1 + +##### Terminal Window 1 + +``` +cd fabric-samples/balance-transfer/typescript + +./runApp.sh + +``` + +This performs the following steps: +* launches the required network on your local machine +* installs the fabric-client and fabric-ca-client node modules +* starts the node app on PORT 4000 + +##### Terminal Window 2 + +NOTE: In order for the following shell script to properly parse the JSON, you must install ``jq``. + +See instructions at [https://stedolan.github.io/jq/](https://stedolan.github.io/jq/). + +Test the APIs as follows: +``` +cd fabric-samples/balance-transfer/typescript + +./testAPIs.sh + +``` + +### Option 2 is a more manual approach + +##### Terminal Window 1 + +* Launch the network using docker-compose + +``` +docker-compose -f artifacts/docker-compose.yaml up +``` +##### Terminal Window 2 + +* Install the fabric-client and fabric-ca-client node modules + +``` +npm install +``` + +*** NOTE - If running this before the new version of the node SDK is published which includes the typescript definition files, you will need to do the following: + +``` +cp types/fabric-client/index.d.tx node_modules/fabric-client/index.d.ts +cp types/fabric-ca-client/index.d.tx node_modules/fabric-ca-client/index.d.ts +``` + +* Start the node app on PORT 4000 + +``` +PORT=4000 ts-node app.ts +``` + +##### Terminal Window 3 + +* Execute the REST APIs from the section [Sample REST APIs Requests](https://github.com/hyperledger/fabric-samples/tree/master/balance-transfer#sample-rest-apis-requests) + +## Sample REST APIs Requests + +### Login Request + +* Register and enroll new users in Organization - **Org1**: + +`curl -s -X POST http://localhost:4000/users -H "content-type: application/x-www-form-urlencoded" -d 'username=Jim&orgName=org1'` + +**OUTPUT:** + +``` +{ + "success": true, + "secret": "RaxhMgevgJcm", + "message": "Jim enrolled Successfully", + "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQ4NjU1OTEsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE0OTQ4NjE5OTF9.yWaJhFDuTvMQRaZIqg20Is5t-JJ_1BP58yrNLOKxtNI" +} +``` + +The response contains the success/failure status, an **enrollment Secret** and a **JSON Web Token (JWT)** that is a required string in the Request Headers for subsequent requests. + +### Create Channel request + +``` +curl -s -X POST \ + http://localhost:4000/channels \ + -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQ4NjU1OTEsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE0OTQ4NjE5OTF9.yWaJhFDuTvMQRaZIqg20Is5t-JJ_1BP58yrNLOKxtNI" \ + -H "content-type: application/json" \ + -d '{ + "channelName":"mychannel", + "channelConfigPath":"../artifacts/channel/mychannel.tx" +}' +``` + +Please note that the Header **authorization** must contain the JWT returned from the `POST /users` call + +### Join Channel request + +``` +curl -s -X POST \ + http://localhost:4000/channels/mychannel/peers \ + -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQ4NjU1OTEsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE0OTQ4NjE5OTF9.yWaJhFDuTvMQRaZIqg20Is5t-JJ_1BP58yrNLOKxtNI" \ + -H "content-type: application/json" \ + -d '{ + "peers": ["peer1","peer2"] +}' +``` +### Install chaincode + +``` +curl -s -X POST \ + http://localhost:4000/chaincodes \ + -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQ4NjU1OTEsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE0OTQ4NjE5OTF9.yWaJhFDuTvMQRaZIqg20Is5t-JJ_1BP58yrNLOKxtNI" \ + -H "content-type: application/json" \ + -d '{ + "peers": ["peer1","peer2"], + "chaincodeName":"mycc", + "chaincodePath":"github.com/example_cc/go", + "chaincodeVersion":"v0" +}' +``` + +### Instantiate chaincode + +``` +curl -s -X POST \ + http://localhost:4000/channels/mychannel/chaincodes \ + -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQ4NjU1OTEsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE0OTQ4NjE5OTF9.yWaJhFDuTvMQRaZIqg20Is5t-JJ_1BP58yrNLOKxtNI" \ + -H "content-type: application/json" \ + -d '{ + "chaincodeName":"mycc", + "chaincodeVersion":"v0", + "args":["a","100","b","200"] +}' +``` + +### Invoke request + +``` +curl -s -X POST \ + http://localhost:4000/channels/mychannel/chaincodes/mycc \ + -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQ4NjU1OTEsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE0OTQ4NjE5OTF9.yWaJhFDuTvMQRaZIqg20Is5t-JJ_1BP58yrNLOKxtNI" \ + -H "content-type: application/json" \ + -d '{ + "fcn":"move", + "args":["a","b","10"] +}' +``` +**NOTE:** Ensure that you save the Transaction ID from the response in order to pass this string in the subsequent query transactions. + +### Chaincode Query + +``` +curl -s -X GET \ + "http://localhost:4000/channels/mychannel/chaincodes/mycc?peer=peer1&fcn=query&args=%5B%22a%22%5D" \ + -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQ4NjU1OTEsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE0OTQ4NjE5OTF9.yWaJhFDuTvMQRaZIqg20Is5t-JJ_1BP58yrNLOKxtNI" \ + -H "content-type: application/json" +``` + +### Query Block by BlockNumber + +``` +curl -s -X GET \ + "http://localhost:4000/channels/mychannel/blocks/1?peer=peer1" \ + -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQ4NjU1OTEsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE0OTQ4NjE5OTF9.yWaJhFDuTvMQRaZIqg20Is5t-JJ_1BP58yrNLOKxtNI" \ + -H "content-type: application/json" +``` + +### Query Transaction by TransactionID + +``` +curl -s -X GET http://localhost:4000/channels/mychannel/transactions/TRX_ID?peer=peer1 \ + -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQ4NjU1OTEsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE0OTQ4NjE5OTF9.yWaJhFDuTvMQRaZIqg20Is5t-JJ_1BP58yrNLOKxtNI" \ + -H "content-type: application/json" +``` +**NOTE**: Here the TRX_ID can be from any previous invoke transaction + + +### Query ChainInfo + +``` +curl -s -X GET \ + "http://localhost:4000/channels/mychannel?peer=peer1" \ + -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQ4NjU1OTEsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE0OTQ4NjE5OTF9.yWaJhFDuTvMQRaZIqg20Is5t-JJ_1BP58yrNLOKxtNI" \ + -H "content-type: application/json" +``` + +### Query Installed chaincodes + +``` +curl -s -X GET \ + "http://localhost:4000/chaincodes?peer=peer1&type=installed" \ + -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQ4NjU1OTEsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE0OTQ4NjE5OTF9.yWaJhFDuTvMQRaZIqg20Is5t-JJ_1BP58yrNLOKxtNI" \ + -H "content-type: application/json" +``` + +### Query Instantiated chaincodes + +``` +curl -s -X GET \ + "http://localhost:4000/chaincodes?peer=peer1&type=instantiated" \ + -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQ4NjU1OTEsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE0OTQ4NjE5OTF9.yWaJhFDuTvMQRaZIqg20Is5t-JJ_1BP58yrNLOKxtNI" \ + -H "content-type: application/json" +``` + +### Query Channels + +``` +curl -s -X GET \ + "http://localhost:4000/channels?peer=peer1" \ + -H "authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0OTQ4NjU1OTEsInVzZXJuYW1lIjoiSmltIiwib3JnTmFtZSI6Im9yZzEiLCJpYXQiOjE0OTQ4NjE5OTF9.yWaJhFDuTvMQRaZIqg20Is5t-JJ_1BP58yrNLOKxtNI" \ + -H "content-type: application/json" +``` + +### Network configuration considerations + +You have the ability to change configuration parameters by either directly editing the network-config.json file or provide an additional file for an alternative target network. The app uses an optional environment variable "TARGET_NETWORK" to control the configuration files to use. For example, if you deployed the target network on Amazon Web Services EC2, you can add a file "network-config-aws.json", and set the "TARGET_NETWORK" environment to 'aws'. The app will pick up the settings inside the "network-config-aws.json" file. + +#### IP Address** and PORT information + +If you choose to customize your docker-compose yaml file by hardcoding IP Addresses and PORT information for your peers and orderer, then you MUST also add the identical values into the network-config.json file. The paths shown below will need to be adjusted to match your docker-compose yaml file. + +``` + "orderer": { + "url": "grpcs://x.x.x.x:7050", + "server-hostname": "orderer0", + "tls_cacerts": "../artifacts/tls/orderer/ca-cert.pem" + }, + "org1": { + "ca": "http://x.x.x.x:7054", + "peer1": { + "requests": "grpcs://x.x.x.x:7051", + "events": "grpcs://x.x.x.x:7053", + ... + }, + "peer2": { + "requests": "grpcs://x.x.x.x:7056", + "events": "grpcs://x.x.x.x:7058", + ... + } + }, + "org2": { + "ca": "http://x.x.x.x:8054", + "peer1": { + "requests": "grpcs://x.x.x.x:8051", + "events": "grpcs://x.x.x.x:8053", + ... }, + "peer2": { + "requests": "grpcs://x.x.x.x:8056", + "events": "grpcs://x.x.x.x:8058", + ... + } + } + +``` + +#### Discover IP Address + +To retrieve the IP Address for one of your network entities, issue the following command: + +``` +# The following will return the IP Address for peer0 +docker inspect peer0 | grep IPAddress +``` + +Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License. diff --git a/typescript/api/chaincode.ts b/typescript/api/chaincode.ts new file mode 100644 index 0000000..4c5fda6 --- /dev/null +++ b/typescript/api/chaincode.ts @@ -0,0 +1,89 @@ +/** + * Copyright 2017 Kapil Sachdeva All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as express from 'express'; +import log4js = require('log4js'); +const logger = log4js.getLogger('SampleWebApp'); +import hfc = require('fabric-client'); +import * as jwt from 'jsonwebtoken'; +import * as helper from '../lib/helper'; +import * as channelApi from '../lib/channel'; +import * as chainCodeApi from '../lib/chaincode'; +import { RequestEx } from '../interfaces'; +import { getErrorMessage } from './utils'; + +export default function chainCodeHandlers(app: express.Application) { + + async function installChainCode(req: RequestEx, res: express.Response) { + logger.debug('==================== INSTALL CHAINCODE =================='); + + const peers = req.body.peers; + const chaincodeName = req.body.chaincodeName; + const chaincodePath = req.body.chaincodePath; + const chaincodeVersion = req.body.chaincodeVersion; + + logger.debug('peers : ' + peers); // target peers list + logger.debug('chaincodeName : ' + chaincodeName); + logger.debug('chaincodePath : ' + chaincodePath); + logger.debug('chaincodeVersion : ' + chaincodeVersion); + + if (!peers || peers.length === 0) { + res.json(getErrorMessage('\'peers\'')); + return; + } + if (!chaincodeName) { + res.json(getErrorMessage('\'chaincodeName\'')); + return; + } + if (!chaincodePath) { + res.json(getErrorMessage('\'chaincodePath\'')); + return; + } + if (!chaincodeVersion) { + res.json(getErrorMessage('\'chaincodeVersion\'')); + return; + } + + const message = await chainCodeApi.installChaincode( + peers, chaincodeName, chaincodePath, chaincodeVersion, req.username, req.orgname); + + res.send(message); + } + + async function queryChainCode(req: RequestEx, res: express.Response) { + const peer = req.query.peer; + const installType = req.query.type; + // TODO: add Constnats + if (installType === 'installed') { + logger.debug( + '================ GET INSTALLED CHAINCODES ======================'); + } else { + logger.debug( + '================ GET INSTANTIATED CHAINCODES ======================'); + } + + const message = await chainCodeApi.getInstalledChaincodes( + peer, installType, req.username, req.orgname); + + res.send(message); + } + + const API_ENDPOINT_CHAINCODE_INSTALL = '/chaincodes'; + const API_ENDPOINT_CHAINCODE_QUERY = '/chaincodes'; + + app.post(API_ENDPOINT_CHAINCODE_INSTALL, installChainCode); + app.get(API_ENDPOINT_CHAINCODE_QUERY, queryChainCode); +} diff --git a/typescript/api/channel.ts b/typescript/api/channel.ts new file mode 100644 index 0000000..49a79c7 --- /dev/null +++ b/typescript/api/channel.ts @@ -0,0 +1,261 @@ +/** + * Copyright 2017 Kapil Sachdeva All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as express from 'express'; +import log4js = require('log4js'); +const logger = log4js.getLogger('SampleWebApp'); +import hfc = require('fabric-client'); +import * as jwt from 'jsonwebtoken'; +import * as helper from '../lib/helper'; +import * as channelApi from '../lib/channel'; +import { RequestEx } from '../interfaces'; +import { getErrorMessage } from './utils'; + +export default function channelHandlers(app: express.Application) { + + async function createNewChannel(req: RequestEx, res: express.Response) { + logger.info('<<<<<<<<<<<<<<<<< C R E A T E C H A N N E L >>>>>>>>>>>>>>>>>'); + logger.debug('End point : /channels'); + + const channelName = req.body.channelName; + const channelConfigPath = req.body.channelConfigPath; + + logger.debug('Channel name : ' + channelName); + // ../artifacts/channel/mychannel.tx + logger.debug('channelConfigPath : ' + channelConfigPath); + + if (!channelName) { + res.json(getErrorMessage('\'channelName\'')); + return; + } + if (!channelConfigPath) { + res.json(getErrorMessage('\'channelConfigPath\'')); + return; + } + + const response = await channelApi.createChannel( + channelName, channelConfigPath, req.username, req.orgname); + + res.send(response); + } + + async function joinChannel(req: RequestEx, res: express.Response) { + logger.info('<<<<<<<<<<<<<<<<< J O I N C H A N N E L >>>>>>>>>>>>>>>>>'); + + const channelName = req.params.channelName; + const peers = req.body.peers; + logger.debug('channelName : ' + channelName); + logger.debug('peers : ' + peers); + if (!channelName) { + res.json(getErrorMessage('\'channelName\'')); + return; + } + if (!peers || peers.length === 0) { + res.json(getErrorMessage('\'peers\'')); + return; + } + + const message = await channelApi.joinChannel(channelName, peers, req.username, req.orgname); + res.send(message); + } + + async function instantiateChainCode(req: RequestEx, res: express.Response) { + logger.debug('==================== INSTANTIATE CHAINCODE =================='); + const chaincodeName = req.body.chaincodeName; + const chaincodeVersion = req.body.chaincodeVersion; + const channelName = req.params.channelName; + const fcn = req.body.fcn; + const args = req.body.args; + logger.debug('channelName : ' + channelName); + logger.debug('chaincodeName : ' + chaincodeName); + logger.debug('chaincodeVersion : ' + chaincodeVersion); + logger.debug('fcn : ' + fcn); + logger.debug('args : ' + args); + if (!chaincodeName) { + res.json(getErrorMessage('\'chaincodeName\'')); + return; + } + if (!chaincodeVersion) { + res.json(getErrorMessage('\'chaincodeVersion\'')); + return; + } + if (!channelName) { + res.json(getErrorMessage('\'channelName\'')); + return; + } + if (!args) { + res.json(getErrorMessage('\'args\'')); + return; + } + + const message = await channelApi.instantiateChainCode( + channelName, chaincodeName, chaincodeVersion, fcn, args, req.username, req.orgname); + res.send(message); + } + + async function invokeChainCode(req: RequestEx, res: express.Response) { + logger.debug('==================== INVOKE ON CHAINCODE =================='); + const peers = req.body.peers; + const chaincodeName = req.params.chaincodeName; + const channelName = req.params.channelName; + const fcn = req.body.fcn; + const args = req.body.args; + logger.debug('channelName : ' + channelName); + logger.debug('chaincodeName : ' + chaincodeName); + logger.debug('fcn : ' + fcn); + logger.debug('args : ' + args); + if (!chaincodeName) { + res.json(getErrorMessage('\'chaincodeName\'')); + return; + } + if (!channelName) { + res.json(getErrorMessage('\'channelName\'')); + return; + } + if (!fcn) { + res.json(getErrorMessage('\'fcn\'')); + return; + } + if (!args) { + res.json(getErrorMessage('\'args\'')); + return; + } + + const message = await channelApi.invokeChaincode( + peers, channelName, chaincodeName, fcn, args, req.username, req.orgname); + + res.send(message); + } + + async function queryChainCode(req: RequestEx, res: express.Response) { + const channelName = req.params.channelName; + const chaincodeName = req.params.chaincodeName; + let args = req.query.args; + const fcn = req.query.fcn; + const peer = req.query.peer; + + logger.debug('channelName : ' + channelName); + logger.debug('chaincodeName : ' + chaincodeName); + logger.debug('fcn : ' + fcn); + logger.debug('args : ' + args); + + if (!chaincodeName) { + res.json(getErrorMessage('\'chaincodeName\'')); + return; + } + if (!channelName) { + res.json(getErrorMessage('\'channelName\'')); + return; + } + if (!fcn) { + res.json(getErrorMessage('\'fcn\'')); + return; + } + if (!args) { + res.json(getErrorMessage('\'args\'')); + return; + } + + args = args.replace(/'/g, '"'); + args = JSON.parse(args); + logger.debug(args); + + const message = await channelApi.queryChaincode( + peer, channelName, chaincodeName, args, fcn, req.username, req.orgname); + + res.send(message); + } + + async function queryByBlockNumber(req: RequestEx, res: express.Response) { + logger.debug('==================== GET BLOCK BY NUMBER =================='); + const blockId = req.params.blockId; + const peer = req.query.peer; + logger.debug('channelName : ' + req.params.channelName); + logger.debug('BlockID : ' + blockId); + logger.debug('Peer : ' + peer); + if (!blockId) { + res.json(getErrorMessage('\'blockId\'')); + return; + } + + const message = await channelApi.getBlockByNumber(peer, blockId, req.username, req.orgname); + res.send(message); + } + + async function queryByTransactionId(req: RequestEx, res: express.Response) { + logger.debug( + '================ GET TRANSACTION BY TRANSACTION_ID ======================' + ); + logger.debug('channelName : ' + req.params.channelName); + const trxnId = req.params.trxnId; + const peer = req.query.peer; + if (!trxnId) { + res.json(getErrorMessage('\'trxnId\'')); + return; + } + + const message = await channelApi.getTransactionByID( + peer, trxnId, req.username, req.orgname); + + res.send(message); + } + + async function queryChannelInfo(req: RequestEx, res: express.Response) { + logger.debug( + '================ GET CHANNEL INFORMATION ======================'); + logger.debug('channelName : ' + req.params.channelName); + const peer = req.query.peer; + + const message = await channelApi.getChainInfo(peer, req.username, req.orgname); + + res.send(message); + } + + async function queryChannels(req: RequestEx, res: express.Response) { + logger.debug('================ GET CHANNELS ======================'); + logger.debug('peer: ' + req.query.peer); + const peer = req.query.peer; + if (!peer) { + res.json(getErrorMessage('\'peer\'')); + return; + } + + const message = await channelApi.getChannels(peer, req.username, req.orgname); + res.send(message); + } + + const API_ENDPOINT_CHANNEL_CREATE = '/channels'; + const API_ENDPOINT_CHANNEL_JOIN = '/channels/:channelName/peers'; + const API_ENDPOINT_CHANNEL_INSTANTIATE_CHAINCODE = '/channels/:channelName/chaincodes'; + const API_ENDPOINT_CHANNEL_INVOKE_CHAINCODE = + '/channels/:channelName/chaincodes/:chaincodeName'; + const API_ENDPOINT_CHANNEL_QUERY_CHAINCODE = '/channels/:channelName/chaincodes/:chaincodeName'; + const API_ENDPOINT_CHANNEL_QUERY_BY_BLOCKNUMBER = '/channels/:channelName/blocks/:blockId'; + const API_ENDPOINT_CHANNEL_QUERY_BY_TRANSACTIONID + = '/channels/:channelName/transactions/:trxnId'; + const API_ENDPOINT_CHANNEL_INFO = '/channels/:channelName'; + const API_ENDPOINT_CHANNEL_QUERY = '/channels'; + + app.post(API_ENDPOINT_CHANNEL_CREATE, createNewChannel); + app.post(API_ENDPOINT_CHANNEL_JOIN, joinChannel); + app.post(API_ENDPOINT_CHANNEL_INSTANTIATE_CHAINCODE, instantiateChainCode); + app.post(API_ENDPOINT_CHANNEL_INVOKE_CHAINCODE, invokeChainCode); + app.get(API_ENDPOINT_CHANNEL_QUERY_CHAINCODE, queryChainCode); + app.get(API_ENDPOINT_CHANNEL_QUERY_BY_BLOCKNUMBER, queryByBlockNumber); + app.get(API_ENDPOINT_CHANNEL_QUERY_BY_TRANSACTIONID, queryByTransactionId); + app.get(API_ENDPOINT_CHANNEL_INFO, queryChannelInfo); + app.get(API_ENDPOINT_CHANNEL_QUERY, queryChannels); +} diff --git a/typescript/api/index.ts b/typescript/api/index.ts new file mode 100644 index 0000000..f49700e --- /dev/null +++ b/typescript/api/index.ts @@ -0,0 +1,27 @@ +/** + * Copyright 2017 Kapil Sachdeva All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as express from 'express'; +import userHandlers from './users'; +import channelHandlers from './channel'; +import chainCodeHandlers from './chaincode'; + +export default function entryPoint(app: express.Application) { + // various handlers + userHandlers(app); + channelHandlers(app); + chainCodeHandlers(app); +} diff --git a/typescript/api/users.ts b/typescript/api/users.ts new file mode 100644 index 0000000..d946255 --- /dev/null +++ b/typescript/api/users.ts @@ -0,0 +1,69 @@ +/** + * Copyright 2017 Kapil Sachdeva All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import { RequestEx } from '../interfaces'; +import * as express from 'express'; +import log4js = require('log4js'); +const logger = log4js.getLogger('SampleWebApp'); +import hfc = require('fabric-client'); +import * as jwt from 'jsonwebtoken'; +import * as helper from '../lib/helper'; +import { getErrorMessage } from './utils'; + +export default function userHandlers(app: express.Application) { + + async function registerUser(req: RequestEx, res: express.Response) { + const username = req.body.username; + const orgName = req.body.orgName; + + logger.debug('End point : /users'); + logger.debug('User name : ' + username); + logger.debug('Org name : ' + orgName); + + if (!username) { + res.json(getErrorMessage('\'username\'')); + return; + } + if (!orgName) { + res.json(getErrorMessage('\'orgName\'')); + return; + } + const token = jwt.sign({ + exp: Math.floor(Date.now() / 1000) + parseInt( + hfc.getConfigSetting('jwt_expiretime'), 10), + username, + orgName + }, app.get('secret')); + + const response = await helper.getRegisteredUsers(username, orgName); + + if (response && typeof response !== 'string') { + res.json({ + success: true, + token + }); + } else { + res.json({ + success: false, + message: response + }); + } + } + + const API_ENDPOINT_REGISTER_USER = '/users'; + + app.post(API_ENDPOINT_REGISTER_USER, registerUser); +} diff --git a/typescript/api/utils.ts b/typescript/api/utils.ts new file mode 100644 index 0000000..128545f --- /dev/null +++ b/typescript/api/utils.ts @@ -0,0 +1,23 @@ +/** + * Copyright 2017 Kapil Sachdeva All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +export function getErrorMessage(field: string) { + const response = { + success: false, + message: field + ' field is missing or Invalid in the request' + }; + return response; +} diff --git a/typescript/app.ts b/typescript/app.ts new file mode 100644 index 0000000..66e8680 --- /dev/null +++ b/typescript/app.ts @@ -0,0 +1,92 @@ +/** + * Copyright 2017 Kapil Sachdeva All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import log4js = require('log4js'); +import * as util from 'util'; +import * as http from 'http'; +import * as express from 'express'; +import * as jwt from 'jsonwebtoken'; +import * as bodyParser from 'body-parser'; +import expressJWT = require('express-jwt'); +// tslint:disable-next-line:no-var-requires +const bearerToken = require('express-bearer-token'); +import cors = require('cors'); +import hfc = require('fabric-client'); +import * as helper from './lib/helper'; +import { RequestEx } from './interfaces'; +import api from './api'; + +helper.init(); + +const SERVER_HOST = process.env.HOST || hfc.getConfigSetting('host'); +const SERVER_PORT = process.env.PORT || hfc.getConfigSetting('port'); + +const logger = log4js.getLogger('SampleWebApp'); + +// create express App +const app = express(); + +app.options('*', cors()); +app.use(cors()); +app.use(bodyParser.json()); +app.use(bodyParser.urlencoded({ + extended: false +})); +app.set('secret', 'thisismysecret'); +app.use(expressJWT({ + secret: 'thisismysecret' +}).unless({ + path: ['/users'] +})); +app.use(bearerToken()); + +app.use((req: RequestEx, res, next) => { + if (req.originalUrl.indexOf('/users') >= 0) { + return next(); + } + + const token = req.token; + jwt.verify(token, app.get('secret'), (err: Error, decoded: any) => { + if (err) { + res.send({ + success: false, + message: 'Failed to authenticate token. Make sure to include the ' + + 'token returned from /users call in the authorization header ' + + ' as a Bearer token' + }); + return; + } else { + // add the decoded user name and org name to the request object + // for the downstream code to use + req.username = decoded.username; + req.orgname = decoded.orgName; + logger.debug( + util.format('Decoded from JWT token: username - %s, orgname - %s', + decoded.username, decoded.orgName)); + return next(); + } + }); +}); + +// configure various routes +api(app); + +const server = http.createServer(app); +server.listen(SERVER_PORT); + +logger.info('****************** SERVER STARTED ************************'); +logger.info('************** http://' + SERVER_HOST + ':' + SERVER_PORT + ' ******************'); +server.timeout = 240000; diff --git a/typescript/app_config.json b/typescript/app_config.json new file mode 100644 index 0000000..6406d66 --- /dev/null +++ b/typescript/app_config.json @@ -0,0 +1,13 @@ +{ + "host": "localhost", + "port": "4000", + "jwt_expiretime": "36000", + "channelName": "mychannel", + "CC_SRC_PATH": "../artifacts", + "keyValueStore": "/tmp/fabric-client-kvs", + "eventWaitTime": "30000", + "admins": [{ + "username": "admin", + "secret": "adminpw" + }] +} diff --git a/typescript/artifacts b/typescript/artifacts new file mode 120000 index 0000000..70f9aab --- /dev/null +++ b/typescript/artifacts @@ -0,0 +1 @@ +../artifacts \ No newline at end of file diff --git a/typescript/config.ts b/typescript/config.ts new file mode 100644 index 0000000..1277eee --- /dev/null +++ b/typescript/config.ts @@ -0,0 +1,30 @@ +/** + * Copyright 2017 Kapil Sachdeva All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as util from 'util'; + +let file = 'network-config%s.json'; + +const env = process.env.TARGET_NETWORK; +if (env) { + file = util.format(file, '-' + env); +} else { + file = util.format(file, ''); +} + +export default { + networkConfigFile: file +}; diff --git a/typescript/interfaces.ts b/typescript/interfaces.ts new file mode 100644 index 0000000..6acd2b1 --- /dev/null +++ b/typescript/interfaces.ts @@ -0,0 +1,23 @@ +/** + * Copyright 2017 Kapil Sachdeva All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as express from 'express'; + +export interface RequestEx extends express.Request { + username?: any; + orgname?: any; + token?: any; +} diff --git a/typescript/lib/chaincode.ts b/typescript/lib/chaincode.ts new file mode 100644 index 0000000..70915ab --- /dev/null +++ b/typescript/lib/chaincode.ts @@ -0,0 +1,148 @@ +/** + * Copyright 2017 Kapil Sachdeva All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as util from 'util'; +import * as fs from 'fs'; +import * as path from 'path'; +import * as helper from './helper'; + +// tslint:disable-next-line:no-var-requires +const config = require('../app_config.json'); +const logger = helper.getLogger('ChaincodeApi'); + +function buildTarget(peer: string, org: string): Peer { + let target: Peer = null; + if (typeof peer !== 'undefined') { + const targets: Peer[] = helper.newPeers([peer], org); + if (targets && targets.length > 0) { + target = targets[0]; + } + } + + return target; +} + +export async function installChaincode( + peers: string[], chaincodeName: string, chaincodePath: string, + chaincodeVersion: string, username: string, org: string) { + + logger.debug( + '\n============ Install chaincode on organizations ============\n'); + + helper.setupChaincodeDeploy(); + + const channel = helper.getChannelForOrg(org); + const client = helper.getClientForOrg(org); + + const admin = await helper.getOrgAdmin(org); + + const request = { + targets: helper.newPeers(peers, org), + chaincodePath, + chaincodeId: chaincodeName, + chaincodeVersion + }; + + try { + + const results = await client.installChaincode(request); + + const proposalResponses = results[0]; + const proposal = results[1]; + let allGood = true; + + proposalResponses.forEach((pr) => { + let oneGood = false; + if (pr.response && pr.response.status === 200) { + oneGood = true; + logger.info('install proposal was good'); + } else { + logger.error('install proposal was bad'); + } + allGood = allGood && oneGood; + }); + + if (allGood) { + logger.info(util.format( + 'Successfully sent install Proposal and received ProposalResponse: Status - %s', + proposalResponses[0].response.status)); + logger.debug('\nSuccessfully Installed chaincode on organization ' + org + + '\n'); + return 'Successfully Installed chaincode on organization ' + org; + } else { + logger.error( + // tslint:disable-next-line:max-line-length + 'Failed to send install Proposal or receive valid response. Response null or status is not 200. exiting...' + ); + // tslint:disable-next-line:max-line-length + return 'Failed to send install Proposal or receive valid response. Response null or status is not 200. exiting...'; + } + + } catch (err) { + logger.error('Failed to send install proposal due to error: ' + err.stack ? + err.stack : err); + throw new Error('Failed to send install proposal due to error: ' + err.stack ? + err.stack : err); + } +} + +export async function getInstalledChaincodes( + peer: string, type: string, username: string, org: string) { + + const target = buildTarget(peer, org); + const channel = helper.getChannelForOrg(org); + const client = helper.getClientForOrg(org); + + const user = await helper.getOrgAdmin(org); + + try { + + let response: ChaincodeQueryResponse = null; + + if (type === 'installed') { + response = await client.queryInstalledChaincodes(target); + } else { + response = await channel.queryInstantiatedChaincodes(target); + } + + if (response) { + if (type === 'installed') { + logger.debug('<<< Installed Chaincodes >>>'); + } else { + logger.debug('<<< Instantiated Chaincodes >>>'); + } + + const details: string[] = []; + response.chaincodes.forEach((c) => { + logger.debug('name: ' + c.name + ', version: ' + + c.version + ', path: ' + c.path + ); + details.push('name: ' + c.name + ', version: ' + + c.version + ', path: ' + c.path + ); + }); + + return details; + } else { + logger.error('response is null'); + return 'response is null'; + } + + } catch (err) { + logger.error('Failed to query with error:' + err.stack ? err.stack : err); + return 'Failed to query with error:' + err.stack ? err.stack : err; + } +} \ No newline at end of file diff --git a/typescript/lib/channel.ts b/typescript/lib/channel.ts new file mode 100644 index 0000000..2cc474a --- /dev/null +++ b/typescript/lib/channel.ts @@ -0,0 +1,599 @@ +/** + * Copyright 2017 Kapil Sachdeva All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import * as util from 'util'; +import * as fs from 'fs'; +import * as path from 'path'; +import * as helper from './helper'; +const logger = helper.getLogger('ChannelApi'); +// tslint:disable-next-line:no-var-requires +const config = require('../app_config.json'); + +const allEventhubs: EventHub[] = []; + +function buildTarget(peer: string, org: string): Peer { + let target: Peer = null; + if (typeof peer !== 'undefined') { + const targets: Peer[] = helper.newPeers([peer], org); + if (targets && targets.length > 0) { + target = targets[0]; + } + } + + return target; +} + +// Attempt to send a request to the orderer with the sendCreateChain method +export async function createChannel( + channelName: string, channelConfigPath: string, username: string, orgName: string) { + + logger.debug('\n====== Creating Channel \'' + channelName + '\' ======\n'); + + const client = helper.getClientForOrg(orgName); + const channel = helper.getChannelForOrg(orgName); + + // read in the envelope for the channel config raw bytes + const envelope = fs.readFileSync(path.join(__dirname, channelConfigPath)); + // extract the channel config bytes from the envelope to be signed + const channelConfig = client.extractChannelConfig(envelope); + + // Acting as a client in the given organization provided with "orgName" param + const admin = await helper.getOrgAdmin(orgName); + + logger.debug(util.format('Successfully acquired admin user for the organization "%s"', + orgName)); + + // sign the channel config bytes as "endorsement", this is required by + // the orderer's channel creation policy + const signature = client.signChannelConfig(channelConfig); + + const request = { + config: channelConfig, + signatures: [signature], + name: channelName, + orderer: channel.getOrderers()[0], + txId: client.newTransactionID() + }; + + try { + const response = await client.createChannel(request); + + if (response && response.status === 'SUCCESS') { + logger.debug('Successfully created the channel.'); + return { + success: true, + message: 'Channel \'' + channelName + '\' created Successfully' + }; + } else { + logger.error('\n!!!!!!!!! Failed to create the channel \'' + channelName + + '\' !!!!!!!!!\n\n'); + throw new Error('Failed to create the channel \'' + channelName + '\''); + } + + } catch (err) { + logger.error('\n!!!!!!!!! Failed to create the channel \'' + channelName + + '\' !!!!!!!!!\n\n'); + throw new Error('Failed to create the channel \'' + channelName + '\''); + } +} + +export async function joinChannel( + channelName: string, peers: string[], username: string, org: string) { + + // on process exit, always disconnect the event hub + const closeConnections = (isSuccess: boolean) => { + if (isSuccess) { + logger.debug('\n============ Join Channel is SUCCESS ============\n'); + } else { + logger.debug('\n!!!!!!!! ERROR: Join Channel FAILED !!!!!!!!\n'); + } + logger.debug(''); + + allEventhubs.forEach((hub) => { + console.log(hub); + if (hub && hub.isconnected()) { + hub.disconnect(); + } + }); + }; + + // logger.debug('\n============ Join Channel ============\n') + logger.info(util.format( + 'Calling peers in organization "%s" to join the channel', org)); + + const client = helper.getClientForOrg(org); + const channel = helper.getChannelForOrg(org); + + const admin = await helper.getOrgAdmin(org); + + logger.info(util.format('received member object for admin of the organization "%s": ', org)); + const request = { + txId: client.newTransactionID() + }; + + const genesisBlock = await channel.getGenesisBlock(request); + + const request2 = { + targets: helper.newPeers(peers, org), + txId: client.newTransactionID(), + block: genesisBlock + }; + + const eventhubs = helper.newEventHubs(peers, org); + eventhubs.forEach((eh) => { + eh.connect(); + allEventhubs.push(eh); + }); + + const eventPromises: Array> = []; + eventhubs.forEach((eh) => { + const txPromise = new Promise((resolve, reject) => { + const handle = setTimeout(reject, parseInt(config.eventWaitTime, 10)); + eh.registerBlockEvent((block: any) => { + clearTimeout(handle); + // in real-world situations, a peer may have more than one channels so + // we must check that this block came from the channel we asked the peer to join + if (block.data.data.length === 1) { + // Config block must only contain one transaction + const channel_header = block.data.data[0].payload.header.channel_header; + if (channel_header.channel_id === channelName) { + resolve(); + } else { + reject(); + } + } + }); + }); + eventPromises.push(txPromise); + }); + + const sendPromise = channel.joinChannel(request2); + const results = await Promise.all([sendPromise].concat(eventPromises)); + + logger.debug(util.format('Join Channel R E S P O N S E : %j', results)); + if (results[0] && results[0][0] && results[0][0].response && results[0][0] + .response.status === 200) { + logger.info(util.format( + 'Successfully joined peers in organization %s to the channel \'%s\'', + org, channelName)); + closeConnections(true); + const response = { + success: true, + message: util.format( + 'Successfully joined peers in organization %s to the channel \'%s\'', + org, channelName) + }; + return response; + } else { + logger.error(' Failed to join channel'); + closeConnections(false); + throw new Error('Failed to join channel'); + } +} + +export async function instantiateChainCode( + channelName: string, chaincodeName: string, chaincodeVersion: string, + functionName: string, args: string[], username: string, org: string) { + + logger.debug('\n============ Instantiate chaincode on organization ' + org + + ' ============\n'); + + const channel = helper.getChannelForOrg(org); + const client = helper.getClientForOrg(org); + + const admin = await helper.getOrgAdmin(org); + await channel.initialize(); + + const txId = client.newTransactionID(); + // send proposal to endorser + const request = { + chaincodeId: chaincodeName, + chaincodeVersion, + args, + txId, + fcn: functionName + }; + + try { + + const results = await channel.sendInstantiateProposal(request); + + const proposalResponses = results[0]; + const proposal = results[1]; + + let allGood = true; + + proposalResponses.forEach((pr) => { + let oneGood = false; + if (pr.response && pr.response.status === 200) { + oneGood = true; + logger.info('install proposal was good'); + } else { + logger.error('install proposal was bad'); + } + allGood = allGood && oneGood; + }); + + if (allGood) { + logger.info(util.format( + // tslint:disable-next-line:max-line-length + 'Successfully sent Proposal and received ProposalResponse: Status - %s, message - "%s", metadata - "%s", endorsement signature: %s', + proposalResponses[0].response.status, proposalResponses[0].response.message, + proposalResponses[0].response.payload, proposalResponses[0].endorsement + .signature)); + + const request2 = { + proposalResponses, + proposal + }; + // set the transaction listener and set a timeout of 30sec + // if the transaction did not get committed within the timeout period, + // fail the test + const deployId = txId.getTransactionID(); + const ORGS = helper.getOrgs(); + + const eh = client.newEventHub(); + const data = fs.readFileSync(path.join(__dirname, ORGS[org].peers['peer1'][ + 'tls_cacerts' + ])); + + eh.setPeerAddr(ORGS[org].peers['peer1']['events'], { + 'pem': Buffer.from(data).toString(), + 'ssl-target-name-override': ORGS[org].peers['peer1']['server-hostname'] + }); + eh.connect(); + + const txPromise: Promise = new Promise((resolve, reject) => { + const handle = setTimeout(() => { + eh.disconnect(); + reject(); + }, 30000); + + eh.registerTxEvent(deployId, (tx, code) => { + // logger.info( + // 'The chaincode instantiate transaction has been committed on peer ' + + // eh._ep._endpoint.addr); + + clearTimeout(handle); + eh.unregisterTxEvent(deployId); + eh.disconnect(); + + if (code !== 'VALID') { + logger.error( + 'The chaincode instantiate transaction was invalid, code = ' + code); + reject(); + } else { + logger.info('The chaincode instantiate transaction was valid.'); + resolve(); + } + }); + }); + + const sendPromise = channel.sendTransaction(request2); + const transactionResults = await Promise.all([sendPromise].concat([txPromise])); + + const response = transactionResults[0]; + if (response.status === 'SUCCESS') { + logger.info('Successfully sent transaction to the orderer.'); + return 'Chaincode Instantiation is SUCCESS'; + } else { + logger.error('Failed to order the transaction. Error code: ' + response.status); + return 'Failed to order the transaction. Error code: ' + response.status; + } + + } else { + logger.error( + // tslint:disable-next-line:max-line-length + 'Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting...' + ); + // tslint:disable-next-line:max-line-length + return 'Failed to send instantiate Proposal or receive valid response. Response null or status is not 200. exiting...'; + } + + } catch (err) { + logger.error('Failed to send instantiate due to error: ' + err.stack ? err + .stack : err); + return 'Failed to send instantiate due to error: ' + err.stack ? err.stack : + err; + } +} + +export async function invokeChaincode( + peerNames: string[], channelName: string, + chaincodeName: string, fcn: string, args: string[], username: string, org: string) { + + logger.debug( + util.format('\n============ invoke transaction on organization %s ============\n', org)); + + const client = helper.getClientForOrg(org); + const channel = helper.getChannelForOrg(org); + const targets = (peerNames) ? helper.newPeers(peerNames, org) : undefined; + + const user = await helper.getRegisteredUsers(username, org); + + const txId = client.newTransactionID(); + logger.debug(util.format('Sending transaction "%j"', txId)); + // send proposal to endorser + const request: ChaincodeInvokeRequest = { + chaincodeId: chaincodeName, + fcn, + args, + txId + }; + + if (targets) { + request.targets = targets; + } + + try { + + const results = await channel.sendTransactionProposal(request); + + const proposalResponses = results[0]; + const proposal = results[1]; + let allGood = true; + + proposalResponses.forEach((pr) => { + let oneGood = false; + if (pr.response && pr.response.status === 200) { + oneGood = true; + logger.info('transaction proposal was good'); + } else { + logger.error('transaction proposal was bad'); + } + allGood = allGood && oneGood; + }); + + if (allGood) { + logger.debug(util.format( + // tslint:disable-next-line:max-line-length + 'Successfully sent Proposal and received ProposalResponse: Status - %s, message - "%s", metadata - "%s", endorsement signature: %s', + proposalResponses[0].response.status, proposalResponses[0].response.message, + proposalResponses[0].response.payload, proposalResponses[0].endorsement + .signature)); + + const request2 = { + proposalResponses, + proposal + }; + + // set the transaction listener and set a timeout of 30sec + // if the transaction did not get committed within the timeout period, + // fail the test + const transactionID = txId.getTransactionID(); + const eventPromises: Array> = []; + + if (!peerNames) { + peerNames = channel.getPeers().map((peer) => { + return peer.getName(); + }); + } + + const eventhubs = helper.newEventHubs(peerNames, org); + + eventhubs.forEach((eh: EventHub) => { + eh.connect(); + + const txPromise = new Promise((resolve, reject) => { + const handle = setTimeout(() => { + eh.disconnect(); + reject(); + }, 30000); + + eh.registerTxEvent(transactionID, (tx: string, code: string) => { + clearTimeout(handle); + eh.unregisterTxEvent(transactionID); + eh.disconnect(); + + if (code !== 'VALID') { + logger.error( + 'The balance transfer transaction was invalid, code = ' + code); + reject(); + } else { + // logger.info( + // 'The balance transfer transaction has been committed on peer ' + + // eh._ep._endpoint.addr); + resolve(); + } + }); + }); + eventPromises.push(txPromise); + }); + + const sendPromise = channel.sendTransaction(request2); + const results2 = await Promise.all([sendPromise].concat(eventPromises)); + + logger.debug(' event promise all complete and testing complete'); + + if (results2[0].status === 'SUCCESS') { + logger.info('Successfully sent transaction to the orderer.'); + return txId.getTransactionID(); + } else { + logger.error('Failed to order the transaction. Error code: ' + results2[0].status); + return 'Failed to order the transaction. Error code: ' + results2[0].status; + } + } else { + logger.error( + // tslint:disable-next-line:max-line-length + 'Failed to send Proposal or receive valid response. Response null or status is not 200. exiting...' + ); + // tslint:disable-next-line:max-line-length + return 'Failed to send Proposal or receive valid response. Response null or status is not 200. exiting...'; + } + + } catch (err) { + logger.error('Failed to send transaction due to error: ' + err.stack ? err + .stack : err); + return 'Failed to send transaction due to error: ' + err.stack ? err.stack : + err; + } +} + +export async function queryChaincode( + peer: string, channelName: string, chaincodeName: string, + args: string[], fcn: string, username: string, org: string) { + + const channel = helper.getChannelForOrg(org); + const client = helper.getClientForOrg(org); + const target = buildTarget(peer, org); + + const user = await helper.getRegisteredUsers(username, org); + + const txId = client.newTransactionID(); + // send query + const request: ChaincodeQueryRequest = { + chaincodeId: chaincodeName, + txId, + fcn, + args + }; + + if (target) { + request.targets = [target]; + } + + try { + const responsePayloads = await channel.queryByChaincode(request); + + if (responsePayloads) { + + responsePayloads.forEach((rp) => { + logger.info(args[0] + ' now has ' + rp.toString('utf8') + + ' after the move'); + return args[0] + ' now has ' + rp.toString('utf8') + + ' after the move'; + }); + + } else { + logger.error('response_payloads is null'); + return 'response_payloads is null'; + } + } catch (err) { + logger.error('Failed to send query due to error: ' + err.stack ? err.stack : + err); + return 'Failed to send query due to error: ' + err.stack ? err.stack : err; + } +} + +export async function getBlockByNumber( + peer: string, blockNumber: string, username: string, org: string) { + + const target = buildTarget(peer, org); + const channel = helper.getChannelForOrg(org); + + const user = await helper.getRegisteredUsers(username, org); + + try { + + const responsePayloads = await channel.queryBlock(parseInt(blockNumber, 10), target); + + if (responsePayloads) { + logger.debug(responsePayloads); + return responsePayloads; // response_payloads.data.data[0].buffer; + } else { + logger.error('response_payloads is null'); + return 'response_payloads is null'; + } + + } catch (err) { + logger.error('Failed to query with error:' + err.stack ? err.stack : err); + return 'Failed to query with error:' + err.stack ? err.stack : err; + } +} + +export async function getTransactionByID( + peer: string, trxnID: string, username: string, org: string) { + + const target = buildTarget(peer, org); + const channel = helper.getChannelForOrg(org); + + const user = await helper.getRegisteredUsers(username, org); + + try { + + const responsePayloads = await channel.queryTransaction(trxnID, target); + + if (responsePayloads) { + logger.debug(responsePayloads); + return responsePayloads; + } else { + logger.error('response_payloads is null'); + return 'response_payloads is null'; + } + + } catch (err) { + logger.error('Failed to query with error:' + err.stack ? err.stack : err); + return 'Failed to query with error:' + err.stack ? err.stack : err; + } +} + +export async function getChainInfo(peer: string, username: string, org: string) { + + const target = buildTarget(peer, org); + const channel = helper.getChannelForOrg(org); + + const user = await helper.getRegisteredUsers(username, org); + + try { + + const blockChainInfo = await channel.queryInfo(target); + + if (blockChainInfo) { + // FIXME: Save this for testing 'getBlockByHash' ? + logger.debug('==========================================='); + logger.debug(blockChainInfo.currentBlockHash); + logger.debug('==========================================='); + // logger.debug(blockchainInfo); + return blockChainInfo; + } else { + logger.error('blockChainInfo is null'); + return 'blockChainInfo is null'; + } + + } catch (err) { + logger.error('Failed to query with error:' + err.stack ? err.stack : err); + return 'Failed to query with error:' + err.stack ? err.stack : err; + } +} + +export async function getChannels(peer: string, username: string, org: string) { + const target = buildTarget(peer, org); + const channel = helper.getChannelForOrg(org); + const client = helper.getClientForOrg(org); + + const user = await helper.getRegisteredUsers(username, org); + + try { + + const response = await client.queryChannels(target); + + if (response) { + logger.debug('<<< channels >>>'); + const channelNames: string[] = []; + response.channels.forEach((ci) => { + channelNames.push('channel id: ' + ci.channel_id); + }); + return response; + } else { + logger.error('response_payloads is null'); + return 'response_payloads is null'; + } + + } catch (err) { + logger.error('Failed to query with error:' + err.stack ? err.stack : err); + return 'Failed to query with error:' + err.stack ? err.stack : err; + } +} diff --git a/typescript/lib/helper.ts b/typescript/lib/helper.ts new file mode 100644 index 0000000..b2497aa --- /dev/null +++ b/typescript/lib/helper.ts @@ -0,0 +1,311 @@ +/** + * Copyright 2017 Kapil Sachdeva All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import log4js = require('log4js'); +import * as path from 'path'; +import * as fs from 'fs'; +import * as util from 'util'; +import config from '../config'; +import hfc = require('fabric-client'); +// tslint:disable-next-line:no-var-requires +const copService = require('fabric-ca-client'); + +const logger = log4js.getLogger('Helper'); +logger.setLevel('DEBUG'); +hfc.setLogger(logger); + +let ORGS: any; +const clients = {}; +const channels = {}; +const caClients = {}; + +function readAllFiles(dir: string) { + const files = fs.readdirSync(dir); + const certs: any = []; + files.forEach((fileName) => { + const filePath = path.join(dir, fileName); + const data = fs.readFileSync(filePath); + certs.push(data); + }); + return certs; +} + +function getKeyStoreForOrg(org: string) { + return hfc.getConfigSetting('keyValueStore') + '_' + org; +} + +function setupPeers(channel: any, org: string, client: Client) { + for (const key in ORGS[org].peers) { + if (key) { + const data = fs.readFileSync( + path.join(__dirname, ORGS[org].peers[key]['tls_cacerts'])); + const peer = client.newPeer( + ORGS[org].peers[key].requests, + { + 'pem': Buffer.from(data).toString(), + 'ssl-target-name-override': ORGS[org].peers[key]['server-hostname'] + } + ); + peer.setName(key); + + channel.addPeer(peer); + } + } +} + +function newOrderer(client: Client) { + const caRootsPath = ORGS.orderer.tls_cacerts; + const data = fs.readFileSync(path.join(__dirname, caRootsPath)); + const caroots = Buffer.from(data).toString(); + return client.newOrderer(ORGS.orderer.url, { + 'pem': caroots, + 'ssl-target-name-override': ORGS.orderer['server-hostname'] + }); +} + +function getOrgName(org: string) { + return ORGS[org].name; +} + +function getMspID(org: string) { + logger.debug('Msp ID : ' + ORGS[org].mspid); + return ORGS[org].mspid; +} + +function newRemotes(names: string[], forPeers: boolean, userOrg: string) { + const client = getClientForOrg(userOrg); + + const targets: any[] = []; + // find the peer that match the names + names.forEach((n) => { + if (ORGS[userOrg].peers[n]) { + // found a peer matching the name + const data = fs.readFileSync( + path.join(__dirname, ORGS[userOrg].peers[n]['tls_cacerts'])); + const grpcOpts = { + 'pem': Buffer.from(data).toString(), + 'ssl-target-name-override': ORGS[userOrg].peers[n]['server-hostname'] + }; + + if (forPeers) { + targets.push(client.newPeer(ORGS[userOrg].peers[n].requests, grpcOpts)); + } else { + const eh = client.newEventHub(); + eh.setPeerAddr(ORGS[userOrg].peers[n].events, grpcOpts); + targets.push(eh); + } + } + }); + + if (targets.length === 0) { + logger.error(util.format('Failed to find peers matching the names %s', names)); + } + + return targets; +} + +async function getAdminUser(userOrg: string): Promise { + const users = hfc.getConfigSetting('admins'); + const username = users[0].username; + const password = users[0].secret; + + const client = getClientForOrg(userOrg); + + const store = await hfc.newDefaultKeyValueStore({ + path: getKeyStoreForOrg(getOrgName(userOrg)) + }); + + client.setStateStore(store); + + const user = await client.getUserContext(username, true); + + if (user && user.isEnrolled()) { + logger.info('Successfully loaded member from persistence'); + return user; + } + + const caClient = caClients[userOrg]; + + const enrollment = await caClient.enroll({ + enrollmentID: username, + enrollmentSecret: password + }); + + logger.info('Successfully enrolled user \'' + username + '\''); + const userOptions: UserOptions = { + username, + mspid: getMspID(userOrg), + cryptoContent: { + privateKeyPEM: enrollment.key.toBytes(), + signedCertPEM: enrollment.certificate + } + }; + + const member = await client.createUser(userOptions); + return member; +} + +export function newPeers(names: string[], org: string) { + return newRemotes(names, true, org); +} + +export function newEventHubs(names: string[], org: string) { + return newRemotes(names, false, org); +} + +export function setupChaincodeDeploy() { + process.env.GOPATH = path.join(__dirname, hfc.getConfigSetting('CC_SRC_PATH')); +} + +export function getOrgs() { + return ORGS; +} + +export function getClientForOrg(org: string): Client { + return clients[org]; +} + +export function getChannelForOrg(org: string): Channel { + return channels[org]; +} + +export function init() { + + hfc.addConfigFile(path.join(__dirname, config.networkConfigFile)); + hfc.addConfigFile(path.join(__dirname, '../app_config.json')); + + ORGS = hfc.getConfigSetting('network-config'); + + // set up the client and channel objects for each org + for (const key in ORGS) { + if (key.indexOf('org') === 0) { + const client = new hfc(); + + const cryptoSuite = hfc.newCryptoSuite(); + // TODO: Fix it up as setCryptoKeyStore is only available for s/w impl + (cryptoSuite as any).setCryptoKeyStore( + hfc.newCryptoKeyStore({ + path: getKeyStoreForOrg(ORGS[key].name) + })); + + client.setCryptoSuite(cryptoSuite); + + const channel = client.newChannel(hfc.getConfigSetting('channelName')); + channel.addOrderer(newOrderer(client)); + + clients[key] = client; + channels[key] = channel; + + setupPeers(channel, key, client); + + const caUrl = ORGS[key].ca; + caClients[key] = new copService( + caUrl, null /*defautl TLS opts*/, '' /* default CA */, cryptoSuite); + } + } +} + +export async function getRegisteredUsers( + username: string, userOrg: string): Promise { + + const client = getClientForOrg(userOrg); + + const store = await hfc.newDefaultKeyValueStore({ + path: getKeyStoreForOrg(getOrgName(userOrg)) + }); + + client.setStateStore(store); + const user = await client.getUserContext(username, true); + + if (user && user.isEnrolled()) { + logger.info('Successfully loaded member from persistence'); + return user; + } + + logger.info('Using admin to enroll this user ..'); + + // get the Admin and use it to enroll the user + const adminUser = await getAdminUser(userOrg); + + const caClient = caClients[userOrg]; + const secret = await caClient.register({ + enrollmentID: username, + affiliation: userOrg + '.department1' + }, adminUser); + + logger.debug(username + ' registered successfully'); + + const message = await caClient.enroll({ + enrollmentID: username, + enrollmentSecret: secret + }); + + if (message && typeof message === 'string' && message.includes( + 'Error:')) { + logger.error(username + ' enrollment failed'); + } + logger.debug(username + ' enrolled successfully'); + + const userOptions: UserOptions = { + username, + mspid: getMspID(userOrg), + cryptoContent: { + privateKeyPEM: message.key.toBytes(), + signedCertPEM: message.certificate + } + }; + + const member = await client.createUser(userOptions); + return member; +} + +export function getLogger(moduleName: string) { + const moduleLogger = log4js.getLogger(moduleName); + moduleLogger.setLevel('DEBUG'); + return moduleLogger; +} + +export async function getOrgAdmin(userOrg: string): Promise { + const admin = ORGS[userOrg].admin; + const keyPath = path.join(__dirname, admin.key); + const keyPEM = Buffer.from(readAllFiles(keyPath)[0]).toString(); + const certPath = path.join(__dirname, admin.cert); + const certPEM = readAllFiles(certPath)[0].toString(); + + const client = getClientForOrg(userOrg); + const cryptoSuite = hfc.newCryptoSuite(); + + if (userOrg) { + (cryptoSuite as any).setCryptoKeyStore( + hfc.newCryptoKeyStore({ path: getKeyStoreForOrg(getOrgName(userOrg)) })); + client.setCryptoSuite(cryptoSuite); + } + + const store = await hfc.newDefaultKeyValueStore({ + path: getKeyStoreForOrg(getOrgName(userOrg)) + }); + + client.setStateStore(store); + + return client.createUser({ + username: 'peer' + userOrg + 'Admin', + mspid: getMspID(userOrg), + cryptoContent: { + privateKeyPEM: keyPEM, + signedCertPEM: certPEM + } + }); +} diff --git a/typescript/lib/network-config.json b/typescript/lib/network-config.json new file mode 100644 index 0000000..2ec10ac --- /dev/null +++ b/typescript/lib/network-config.json @@ -0,0 +1,55 @@ +{ + "network-config": { + "orderer": { + "url": "grpcs://localhost:7050", + "server-hostname": "orderer.example.com", + "tls_cacerts": "../artifacts/channel/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt" + }, + "org1": { + "name": "peerOrg1", + "mspid": "Org1MSP", + "ca": "https://localhost:7054", + "peers": { + "peer1": { + "requests": "grpcs://localhost:7051", + "events": "grpcs://localhost:7053", + "server-hostname": "peer0.org1.example.com", + "tls_cacerts": "../artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt" + }, + "peer2": { + "requests": "grpcs://localhost:7056", + "events": "grpcs://localhost:7058", + "server-hostname": "peer1.org1.example.com", + "tls_cacerts": "../artifacts/channel/crypto-config/peerOrganizations/org1.example.com/peers/peer1.org1.example.com/tls/ca.crt" + } + }, + "admin": { + "key": "../artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore", + "cert": "../artifacts/channel/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts" + } + }, + "org2": { + "name": "peerOrg2", + "mspid": "Org2MSP", + "ca": "https://localhost:8054", + "peers": { + "peer1": { + "requests": "grpcs://localhost:8051", + "events": "grpcs://localhost:8053", + "server-hostname": "peer0.org2.example.com", + "tls_cacerts": "../artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt" + }, + "peer2": { + "requests": "grpcs://localhost:8056", + "events": "grpcs://localhost:8058", + "server-hostname": "peer1.org2.example.com", + "tls_cacerts": "../artifacts/channel/crypto-config/peerOrganizations/org2.example.com/peers/peer1.org2.example.com/tls/ca.crt" + } + }, + "admin": { + "key": "../artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore", + "cert": "../artifacts/channel/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts" + } + } + } +} diff --git a/typescript/package.json b/typescript/package.json new file mode 100644 index 0000000..f0e8c3d --- /dev/null +++ b/typescript/package.json @@ -0,0 +1,37 @@ +{ + "name": "balance-transfer-typescript", + "version": "0.1.0", + "description": "The balance transfer sample written using typescript", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "Kapil Sachdeva", + "license": "Apache-2.0", + "devDependencies": { + "@types/body-parser": "^1.16.5", + "@types/cors": "^2.8.1", + "@types/express-jwt": "0.0.37", + "@types/express-session": "^1.15.3", + "@types/jsonwebtoken": "^7.2.3", + "@types/log4js": "0.0.33", + "@types/node": "^8.0.33", + "express-bearer-token": "^2.1.0", + "jsonwebtoken": "^8.1.0", + "ts-node": "^3.3.0", + "tslint": "^5.6.0", + "tslint-microsoft-contrib": "^5.0.1", + "typescript": "^2.5.3" + }, + "dependencies": { + "body-parser": "^1.18.2", + "cookie-parser": "^1.4.3", + "cors": "^2.8.4", + "express": "^4.16.1", + "express-jwt": "^5.3.0", + "express-session": "^1.15.6", + "fabric-ca-client": "~1.4.0", + "fabric-client": "~1.4.0", + "log4js": "^0.6.38" + } +} diff --git a/typescript/runApp.sh b/typescript/runApp.sh new file mode 100755 index 0000000..be79b9d --- /dev/null +++ b/typescript/runApp.sh @@ -0,0 +1,71 @@ +#!/bin/bash +# +# Copyright IBM Corp. All Rights Reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# + +function dkcl(){ + CONTAINER_IDS=$(docker ps -aq) + echo + if [ -z "$CONTAINER_IDS" -o "$CONTAINER_IDS" = " " ]; then + echo "========== No containers available for deletion ==========" + else + docker rm -f $CONTAINER_IDS + fi + echo +} + +function dkrm(){ + DOCKER_IMAGE_IDS=$(docker images | grep "dev\|none\|test-vp\|peer[0-9]-" | awk '{print $3}') + echo + if [ -z "$DOCKER_IMAGE_IDS" -o "$DOCKER_IMAGE_IDS" = " " ]; then + echo "========== No images available for deletion ===========" + else + docker rmi -f $DOCKER_IMAGE_IDS + fi + echo +} + +function restartNetwork() { + echo + + #teardown the network and clean the containers and intermediate images + docker-compose -f ../artifacts/docker-compose.yaml down + dkcl + dkrm + + #Cleanup the material + rm -rf /tmp/hfc-test-kvs_peerOrg* $HOME/.hfc-key-store/ /tmp/fabric-client-kvs_peerOrg* + + #Start the network + docker-compose -f ../artifacts/docker-compose.yaml up -d + echo +} + +function installNodeModules() { + echo + if [ -d node_modules ]; then + echo "============== node modules installed already =============" + else + echo "============== Installing node modules =============" + npm install + fi + copyIndex fabric-client/index.d.ts + copyIndex fabric-ca-client/index.d.ts + echo +} + +function copyIndex() { + if [ ! -f node_modules/$1 ]; then + cp types/$1 node_modules/$1 + fi +} + +restartNetwork + +installNodeModules + + + +PORT=4000 ts-node app.ts diff --git a/typescript/testAPIs.sh b/typescript/testAPIs.sh new file mode 100755 index 0000000..8447ad2 --- /dev/null +++ b/typescript/testAPIs.sh @@ -0,0 +1,197 @@ +#!/bin/bash +# +# Copyright IBM Corp. All Rights Reserved. +# +# SPDX-License-Identifier: Apache-2.0 +# + +jq --version > /dev/null 2>&1 +if [ $? -ne 0 ]; then + echo "Please Install 'jq' https://stedolan.github.io/jq/ to execute this script" + echo + exit 1 +fi +starttime=$(date +%s) + +echo "POST request Enroll on Org1 ..." +echo +ORG1_TOKEN=$(curl -s -X POST \ + http://localhost:4000/users \ + -H "content-type: application/x-www-form-urlencoded" \ + -d 'username=Jim&orgName=org1') +echo $ORG1_TOKEN +ORG1_TOKEN=$(echo $ORG1_TOKEN | jq ".token" | sed "s/\"//g") +echo +echo "ORG1 token is $ORG1_TOKEN" +echo +echo "POST request Enroll on Org2 ..." +echo +ORG2_TOKEN=$(curl -s -X POST \ + http://localhost:4000/users \ + -H "content-type: application/x-www-form-urlencoded" \ + -d 'username=Barry&orgName=org2') +echo $ORG2_TOKEN +ORG2_TOKEN=$(echo $ORG2_TOKEN | jq ".token" | sed "s/\"//g") +echo +echo "ORG2 token is $ORG2_TOKEN" +echo +echo +echo "POST request Create channel ..." +echo +curl -s -X POST \ + http://localhost:4000/channels \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" \ + -d '{ + "channelName":"mychannel", + "channelConfigPath":"../artifacts/channel/mychannel.tx" +}' +echo +echo +sleep 5 +echo "POST request Join channel on Org1" +echo +curl -s -X POST \ + http://localhost:4000/channels/mychannel/peers \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" \ + -d '{ + "peers": ["peer1","peer2"] +}' +echo +echo + +echo "POST request Join channel on Org2" +echo +curl -s -X POST \ + http://localhost:4000/channels/mychannel/peers \ + -H "authorization: Bearer $ORG2_TOKEN" \ + -H "content-type: application/json" \ + -d '{ + "peers": ["peer1","peer2"] +}' +echo +echo + +echo "POST Install chaincode on Org1" +echo +curl -s -X POST \ + http://localhost:4000/chaincodes \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" \ + -d '{ + "peers": ["peer1", "peer2"], + "chaincodeName":"mycc", + "chaincodePath":"github.com/example_cc/go", + "chaincodeVersion":"v0" +}' +echo +echo + + +echo "POST Install chaincode on Org2" +echo +curl -s -X POST \ + http://localhost:4000/chaincodes \ + -H "authorization: Bearer $ORG2_TOKEN" \ + -H "content-type: application/json" \ + -d '{ + "peers": ["peer1","peer2"], + "chaincodeName":"mycc", + "chaincodePath":"github.com/example_cc/go", + "chaincodeVersion":"v0" +}' +echo +echo + +echo "POST instantiate chaincode on peer1 of Org1" +echo +curl -s -X POST \ + http://localhost:4000/channels/mychannel/chaincodes \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" \ + -d '{ + "chaincodeName":"mycc", + "chaincodeVersion":"v0", + "args":["a","100","b","200"] +}' +echo +echo + +echo "POST invoke chaincode on peers of Org1 and Org2" +echo +TRX_ID=$(curl -s -X POST \ + http://localhost:4000/channels/mychannel/chaincodes/mycc \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" \ + -d '{ + "fcn":"move", + "args":["a","b","10"] +}') +echo "Transaction ID is $TRX_ID" +echo +echo + +echo "GET query chaincode on peer1 of Org1" +echo +curl -s -X GET \ + "http://localhost:4000/channels/mychannel/chaincodes/mycc?peer=peer1&fcn=query&args=%5B%22a%22%5D" \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" +echo +echo + +echo "GET query Block by blockNumber" +echo +curl -s -X GET \ + "http://localhost:4000/channels/mychannel/blocks/1?peer=peer1" \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" +echo +echo + +echo "GET query Transaction by TransactionID" +echo +curl -s -X GET http://localhost:4000/channels/mychannel/transactions/$TRX_ID?peer=peer1 \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" +echo +echo + +echo "GET query ChainInfo" +echo +curl -s -X GET \ + "http://localhost:4000/channels/mychannel?peer=peer1" \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" +echo +echo + +echo "GET query Installed chaincodes" +echo +curl -s -X GET \ + "http://localhost:4000/chaincodes?peer=peer1&type=installed" \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" +echo +echo + +echo "GET query Instantiated chaincodes" +echo +curl -s -X GET \ + "http://localhost:4000/chaincodes?peer=peer1&type=instantiated" \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" +echo +echo + +echo "GET query Channels" +echo +curl -s -X GET \ + "http://localhost:4000/channels?peer=peer1" \ + -H "authorization: Bearer $ORG1_TOKEN" \ + -H "content-type: application/json" +echo +echo + +echo "Total execution time : $(($(date +%s)-starttime)) secs ..." diff --git a/typescript/tsconfig.json b/typescript/tsconfig.json new file mode 100644 index 0000000..7d6de87 --- /dev/null +++ b/typescript/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + "removeComments": false, + "preserveConstEnums": true, + "emitDecoratorMetadata": true, + "experimentalDecorators": true, + "sourceMap": true, + "declaration": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "suppressImplicitAnyIndexErrors": true, + "moduleResolution": "node", + "module": "commonjs", + "target": "es6", + "outDir": "dist", + "baseUrl": ".", + "typeRoots": [ + "types", + "node_modules/@types" + ] + }, + "formatCodeOptions": { + "indentSize": 2, + "tabSize": 2 + } +} \ No newline at end of file diff --git a/typescript/tslint.json b/typescript/tslint.json new file mode 100644 index 0000000..9064616 --- /dev/null +++ b/typescript/tslint.json @@ -0,0 +1,38 @@ +{ + "extends": "tslint:recommended", + "rulesDirectory": [ + "tslint-microsoft-contrib" + ], + "rules": { + "trailing-comma": [false, { + "multiline": "always", + "singleline": "never" + }], + "interface-name": [false, "always-prefix"], + "no-console": [true, + "time", + "timeEnd", + "trace" + ], + "max-line-length": [ + true, + 100 + ], + "no-string-literal": false, + "no-use-before-declare": true, + "object-literal-sort-keys": false, + "ordered-imports": [false], + "quotemark": [ + true, + "single", + "avoid-escape" + ], + "variable-name": [ + true, + "allow-leading-underscore", + "allow-pascal-case", + "ban-keywords", + "check-format" + ] + } +} \ No newline at end of file diff --git a/typescript/types/fabric-ca-client/index.d.ts b/typescript/types/fabric-ca-client/index.d.ts new file mode 100644 index 0000000..e5c21a9 --- /dev/null +++ b/typescript/types/fabric-ca-client/index.d.ts @@ -0,0 +1,18 @@ +/** + * Copyright 2017 Kapil Sachdeva All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +declare module 'fabric-ca-client' { +} \ No newline at end of file