├── .bluemix └── pipeline.yml ├── .cfignore ├── .gitignore ├── Dockerfile ├── README.md ├── chaincode └── src │ ├── lib.go │ ├── read_ledger.go │ ├── securitization │ ├── securitization.go │ └── write_ledger.go ├── deploy_app_locally.sh ├── install_deps.sh ├── kubernetes └── kube-config.yml ├── local ├── README.md ├── config │ ├── channel.tx │ └── genesis.block ├── configtx.yaml ├── connection.json ├── connection.yaml ├── crypto-config.yaml ├── crypto-config │ ├── ordererOrganizations │ │ └── example.com │ │ │ ├── ca │ │ │ ├── a0606a4a860a1e31c90a23788da6f3b6b74925ed0d23061af4899409ba46ae6a_sk │ │ │ └── ca.example.com-cert.pem │ │ │ ├── msp │ │ │ ├── admincerts │ │ │ │ └── Admin@example.com-cert.pem │ │ │ ├── cacerts │ │ │ │ └── ca.example.com-cert.pem │ │ │ └── tlscacerts │ │ │ │ └── tlsca.example.com-cert.pem │ │ │ ├── orderers │ │ │ └── orderer.example.com │ │ │ │ ├── msp │ │ │ │ ├── admincerts │ │ │ │ │ └── Admin@example.com-cert.pem │ │ │ │ ├── cacerts │ │ │ │ │ └── ca.example.com-cert.pem │ │ │ │ ├── keystore │ │ │ │ │ └── 4d2f776c0fef8eac3f460a7c3558dc7859c4fe458e262e674a6c23f242ea33d1_sk │ │ │ │ ├── signcerts │ │ │ │ │ └── orderer.example.com-cert.pem │ │ │ │ └── tlscacerts │ │ │ │ │ └── tlsca.example.com-cert.pem │ │ │ │ └── tls │ │ │ │ ├── ca.crt │ │ │ │ ├── server.crt │ │ │ │ └── server.key │ │ │ ├── tlsca │ │ │ ├── 8d2186556c85d515e737d0c0da8d0d7672785b685cb503bcb95e53dcc279fba7_sk │ │ │ └── tlsca.example.com-cert.pem │ │ │ └── users │ │ │ └── Admin@example.com │ │ │ ├── msp │ │ │ ├── admincerts │ │ │ │ └── Admin@example.com-cert.pem │ │ │ ├── cacerts │ │ │ │ └── ca.example.com-cert.pem │ │ │ ├── keystore │ │ │ │ └── 1deeab5433fa6e5f045eb763109d6165268fba153211af1281f00d45f54b1022_sk │ │ │ ├── signcerts │ │ │ │ └── Admin@example.com-cert.pem │ │ │ └── tlscacerts │ │ │ │ └── tlsca.example.com-cert.pem │ │ │ └── tls │ │ │ ├── ca.crt │ │ │ ├── server.crt │ │ │ └── server.key │ └── peerOrganizations │ │ └── org1.example.com │ │ ├── ca │ │ ├── 4239aa0dcd76daeeb8ba0cda701851d14504d31aad1b2ddddbac6a57365e497c_sk │ │ ├── ca.org1.example.com-cert.pem │ │ └── org1.example.com-cert.pem │ │ ├── msp │ │ ├── admincerts │ │ │ └── Admin@org1.example.com-cert.pem │ │ ├── cacerts │ │ │ └── ca.org1.example.com-cert.pem │ │ └── tlscacerts │ │ │ └── tlsca.org1.example.com-cert.pem │ │ ├── peers │ │ └── peer0.org1.example.com │ │ │ ├── msp │ │ │ ├── admincerts │ │ │ │ └── Admin@org1.example.com-cert.pem │ │ │ ├── cacerts │ │ │ │ └── ca.org1.example.com-cert.pem │ │ │ ├── keystore │ │ │ │ └── 46be1d569fe68f33e517c9e0072a0ccfbfb42727480fb8c8d0223af321a7893d_sk │ │ │ ├── signcerts │ │ │ │ └── peer0.org1.example.com-cert.pem │ │ │ └── tlscacerts │ │ │ │ └── tlsca.org1.example.com-cert.pem │ │ │ └── tls │ │ │ ├── ca.crt │ │ │ ├── server.crt │ │ │ └── server.key │ │ ├── tlsca │ │ ├── ed3fd82393e95fc2c475afc113c8d2c591f745d1babc4d6d9cce0a1acc168acb_sk │ │ └── tlsca.org1.example.com-cert.pem │ │ └── users │ │ ├── Admin@org1.example.com │ │ ├── msp │ │ │ ├── admincerts │ │ │ │ └── Admin@org1.example.com-cert.pem │ │ │ ├── cacerts │ │ │ │ └── ca.org1.example.com-cert.pem │ │ │ ├── keystore │ │ │ │ └── cd96d5260ad4757551ed4a5a991e62130f8008a0bf996e4e4b84cd097a747fec_sk │ │ │ ├── signcerts │ │ │ │ └── Admin@org1.example.com-cert.pem │ │ │ └── tlscacerts │ │ │ │ └── tlsca.org1.example.com-cert.pem │ │ └── tls │ │ │ ├── ca.crt │ │ │ ├── server.crt │ │ │ └── server.key │ │ └── User1@org1.example.com │ │ ├── msp │ │ ├── admincerts │ │ │ └── User1@org1.example.com-cert.pem │ │ ├── cacerts │ │ │ └── ca.org1.example.com-cert.pem │ │ ├── keystore │ │ │ └── c75bd6911aca808941c3557ee7c97e90f3952e379497dc55eb903f31b50abc83_sk │ │ ├── signcerts │ │ │ └── User1@org1.example.com-cert.pem │ │ └── tlscacerts │ │ │ └── tlsca.org1.example.com-cert.pem │ │ └── tls │ │ ├── ca.crt │ │ ├── server.crt │ │ └── server.key ├── docker-compose.yml ├── generate.sh ├── init.sh ├── installChaincode.sh ├── startFabric.sh └── stopFabric.sh ├── manifest.yml ├── readme-images └── arch-flow-securitization.png ├── sc-ui ├── .env.development.local ├── .gitignore ├── README.md ├── config │ ├── env.js │ ├── jest │ │ ├── cssTransform.js │ │ └── fileTransform.js │ ├── paths.js │ ├── polyfills.js │ ├── webpack.config.dev.js │ ├── webpack.config.js │ ├── webpack.config.prod.js │ └── webpackDevServer.config.js ├── env.js ├── package-lock.json ├── package.json ├── paths.js ├── public │ ├── favicon.ico │ ├── index.html │ └── manifest.json ├── react-backend │ ├── app.js │ ├── bin │ │ └── www │ ├── package-lock.json │ ├── package.json │ ├── public │ │ └── stylesheets │ │ │ └── style.css │ ├── routes │ │ ├── index.js │ │ └── users.js │ └── views │ │ ├── error.jade │ │ ├── index.jade │ │ └── layout.jade ├── scripts │ ├── build.js │ ├── start.js │ └── test.js ├── src │ ├── App.css │ ├── App.js │ ├── App.test.js │ ├── components │ │ ├── forms │ │ │ ├── FormDialog.js │ │ │ ├── buySecurityForm.jsx │ │ │ ├── deleteObjectForm.jsx │ │ │ ├── fetchObjectForm.jsx │ │ │ ├── initAssetForm.jsx │ │ │ ├── initAssetPoolForm.jsx │ │ │ ├── initHFClientForm.jsx │ │ │ ├── initInvestorForm.jsx │ │ │ ├── initOriginatorForm.jsx │ │ │ ├── initSecurityForm.jsx │ │ │ ├── poolAssetForm.jsx │ │ │ ├── processPaymentForm.jsx │ │ │ ├── sellSecurityForm.jsx │ │ │ ├── setOriginatorForm.jsx │ │ │ └── transferAssetForm.jsx │ │ ├── helpers │ │ │ ├── Tab.js │ │ │ ├── Tabs.js │ │ │ ├── genCards.jsx │ │ │ └── refreshState.js │ │ ├── modal.js │ │ └── tables │ │ │ ├── SimpleAssetTable.js │ │ │ ├── SimpleInvestorTable.js │ │ │ ├── SimpleOriginatorTable.js │ │ │ ├── SimplePoolTable.js │ │ │ └── SimpleSecurityTable.js │ ├── index.css │ ├── index.js │ ├── logo.svg │ └── registerServiceWorker.js ├── webpack.config.dev.js └── webpack.config.js └── update_chaincode.sh /.bluemix/pipeline.yml: -------------------------------------------------------------------------------- 1 | --- 2 | stages: 3 | - name: Build 4 | inputs: 5 | - type: git 6 | branch: master 7 | triggers: 8 | - type: commit 9 | jobs: 10 | - name: Build 11 | type: builder 12 | build_type: npm 13 | script: |- 14 | #!/bin/bash 15 | pwd 16 | # Set up required version of Node and NPM 17 | # export NVM_DIR=/home/pipeline/nvm 18 | # export NODE_VERSION=8.9.0 19 | # export NVM_VERSION=5.5.1 20 | # 21 | # npm config delete prefix \ 22 | # && curl https://raw.githubusercontent.com/creationix/nvm/v${NVM_VERSION}/install.sh | sh \ 23 | # && . $NVM_DIR/nvm.sh \ 24 | # && nvm install $NODE_VERSION \ 25 | # && nvm alias default $NODE_VERSION \ 26 | # && nvm use default \ 27 | # && node -v \ 28 | # && npm -v 29 | # 30 | # Install & Build 31 | # npm install @angular/cli 32 | # npm install 33 | # npm run dist-prod 34 | - name: Deploy 35 | inputs: 36 | - type: job 37 | stage: Build 38 | job: Build 39 | triggers: 40 | - type: stage 41 | jobs: 42 | - name: Deploy 43 | type: deployer 44 | target: 45 | url: https://api.ng.bluemix.net 46 | organization: ${CF_ORGANIZATION} 47 | space: ${CF_SPACE} 48 | application: ${CF_APP} 49 | script: |- 50 | #!/bin/bash 51 | # cf create-service dynamic-dashboard-embedded lite sample-dde-demo-dde-service 52 | cf push "${CF_APP}" 53 | # cf set-env "${CF_APP}" APP_BASE_URL https://"${CF_APP}".mybluemix.net/ 54 | cf restage ${CF_APP} 55 | # view logs 56 | #cf logs "${CF_APP}" --recent 57 | -------------------------------------------------------------------------------- /.cfignore: -------------------------------------------------------------------------------- 1 | sc-ui/node_modules 2 | sc-ui/react-backend/node_modules 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | sc-ui/node_modules 2 | sc-ui/react-backend/node_modules 3 | sc-ui/monitoring_admin 4 | sc-ui/*priv 5 | sc-ui/*pub 6 | sc-ui/connection_profile.json 7 | sc-ui/docker.out 8 | fabric-samples/ 9 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu:16.04 2 | RUN apt-get update -y && \ 3 | apt-get install git curl -y && \ 4 | apt-get install build-essential python -y 5 | # build image from local repo 6 | RUN mkdir -p /root/securitization_blockchain/ 7 | COPY . /root/securitization_blockchain/. 8 | # build image from git repo 9 | # RUN git clone https://github.com/IBM/securitization_blockchain.git 10 | RUN /root/securitization_blockchain/install_deps.sh 11 | ENV PATH="/root/.nvm/versions/node/v8.9.0/bin/:${PATH}" 12 | ENV PORT="30000" 13 | 14 | # ENTRYPOINT /root/securitization_blockchain/sc-ui/ 15 | # on successful build, start container with following command 16 | # docker run -it -p 30000:30000 -p 30001:30001 --name securitization -e DEPLOY_TYPE=local --network net_basic kkbankol/securitization-blockchain bash -c 'cd /root/securitization_blockchain/sc-ui ; PORT=30000 npm start | PORT=30001 node react-backend/bin/www' 17 | -------------------------------------------------------------------------------- /chaincode/src/lib.go: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | package main 21 | 22 | import ( 23 | "encoding/json" 24 | "errors" 25 | "strconv" 26 | 27 | "github.com/hyperledger/fabric/core/chaincode/shim" 28 | ) 29 | 30 | // ============================================================================================================================ 31 | // Get Marble - get a marble asset from ledger 32 | // ============================================================================================================================ 33 | func get_asset(stub shim.ChaincodeStubInterface, id string) (Asset, error) { 34 | var asset Asset 35 | assetAsBytes, err := stub.GetState(id) //getState retreives a key/value from the ledger 36 | if err != nil { //this seems to always succeed, even if key didn't exist 37 | return asset, errors.New("Failed to find marble - " + id) 38 | } 39 | json.Unmarshal(assetAsBytes, &asset) //un stringify it aka JSON.parse() 40 | 41 | if asset.Id != id { //test if marble is actually here or just nil 42 | return asset, errors.New("Asset does not exist - " + id) 43 | } 44 | 45 | return asset, nil 46 | } 47 | 48 | // ============================================================================================================================ 49 | // Get Owner - get the owner asset from ledger 50 | // ============================================================================================================================ 51 | func get_originator(stub shim.ChaincodeStubInterface, id string) (Originator, error) { 52 | var originator Originator 53 | originatorAsBytes, err := stub.GetState(id) //getState retreives a key/value from the ledger 54 | if err != nil { //this seems to always succeed, even if key didn't exist 55 | return originator, errors.New("Failed to get Originator - " + id) 56 | } 57 | json.Unmarshal(originatorAsBytes, &originator) //un stringify it aka JSON.parse() 58 | 59 | if len(originator.Username) == 0 { //test if owner is actually here or just nil 60 | return originator, errors.New("Originator does not exist - " + id + ", '" + originator.Username + "' '" + originator.Company + "'") 61 | } 62 | 63 | return originator, nil 64 | } 65 | 66 | func get_investor(stub shim.ChaincodeStubInterface, id string) (Investor, error) { 67 | var investor Investor 68 | investorAsBytes, err := stub.GetState(id) //getState retreives a key/value from the ledger 69 | if err != nil { //this seems to always succeed, even if key didn't exist 70 | return investor, errors.New("Failed to get Investor - " + id) 71 | } 72 | json.Unmarshal(investorAsBytes, &investor) //un stringify it aka JSON.parse() 73 | 74 | if len(investor.Username) == 0 { //test if owner is actually here or just nil 75 | return investor, errors.New("Investor does not exist - " + id) 76 | } 77 | 78 | return investor, nil 79 | } 80 | 81 | // ======================================================== 82 | // Input Sanitation - dumb input checking, look for empty strings 83 | // ======================================================== 84 | func sanitize_arguments(strs []string) error{ 85 | for i, val:= range strs { 86 | if len(val) <= 0 { 87 | return errors.New("Argument " + strconv.Itoa(i) + " must be a non-empty string") 88 | } 89 | if len(val) > 32 { 90 | return errors.New("Argument " + strconv.Itoa(i) + " must be <= 32 characters") 91 | } 92 | } 93 | return nil 94 | } 95 | -------------------------------------------------------------------------------- /chaincode/src/securitization: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/securitization_blockchain/12699070a8619593868b72a0197c65c7e1514917/chaincode/src/securitization -------------------------------------------------------------------------------- /deploy_app_locally.sh: -------------------------------------------------------------------------------- 1 | export COMPOSE_PROJECT_NAME=net 2 | cd local 3 | ./startFabric.sh 4 | docker run -itd -e DEPLOY_TYPE=local -p 30000:30000 -p 30001:30001 --name securitization --network net_basic kkbankol/securitization-blockchain bash -c 'cd /root/securitization_blockchain/sc-ui && PORT=30000 npm start | PORT=30001 DEPLOY_TYPE=local node react-backend/bin/www' 5 | echo "Run \"docker logs -f securitization\" to follow application logs" 6 | -------------------------------------------------------------------------------- /install_deps.sh: -------------------------------------------------------------------------------- 1 | # Installs dependencies for UI 2 | # docker cp . $(docker ps -lq):/root/ 3 | set -e 4 | # set -x 5 | apt-get update -y 6 | apt-get install curl git build-essential python2.7 -y 7 | ln -s /usr/bin/python2.7 /usr/bin/python 8 | echo "installing nvm" 9 | mkdir -p ~/.nvm 10 | curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash 11 | echo ' 12 | export NVM_DIR="$HOME/.nvm" 13 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm' >> .bash_profile 14 | export NVM_DIR="$HOME/.nvm" 15 | [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" 16 | nvm install v8.9.0 17 | echo "PATH=${PATH}:/root/.nvm/versions/node/v8.9.0/bin/" >> /etc/environment 18 | 19 | git clone https://github.com/IBM/securitization_blockchain ~/securitization_blockchain 20 | cd ~/securitization_blockchain/sc-ui 21 | npm install 22 | 23 | cd ~/securitization_blockchain/sc-ui/react-backend 24 | npm install 25 | 26 | echo "127.0.0.1 peer0.org1.example.com 27 | 127.0.0.1 ca.example.com 28 | 127.0.0.1 orderer.example.com 29 | " >> /etc/hosts 30 | # this shouldn't be necessary since it's in package.json, but we get an error looking for "nopt" and other grpc dependencies otherwise 31 | # npm install node-pre-gyp 32 | # npm install --only=dev 33 | # npm install 34 | # npm install grpc@1.11.0 35 | -------------------------------------------------------------------------------- /kubernetes/kube-config.yml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: api-service 5 | labels: 6 | srv: api 7 | spec: 8 | selector: 9 | srv: api 10 | type: NodePort 11 | ports: 12 | - name: react 13 | port: 30000 14 | nodePort: 30000 15 | - name: express 16 | port: 30001 17 | nodePort: 30001 18 | --- 19 | apiVersion: v1 20 | kind: Pod 21 | metadata: 22 | labels: 23 | srv: api 24 | name: securitization-pod 25 | spec: 26 | containers: 27 | - name: securitization-blockchain 28 | image: kkbankol/securitization-blockchain 29 | imagePullPolicy: Always 30 | stdin: true 31 | tty: true 32 | args: ["-c", "cd /root/securitization_blockchain/sc-ui && PORT=30000 npm start | PORT=30001 node react-backend/bin/www"] 33 | -------------------------------------------------------------------------------- /local/README.md: -------------------------------------------------------------------------------- 1 | ## Basic Network Config 2 | 3 | Note that this basic configuration uses pre-generated certificates and 4 | key material, and also has predefined transactions to initialize a 5 | channel named "mychannel". 6 | 7 | To regenerate this material, simply run ``generate.sh``. 8 | 9 | To start the network, run ``start.sh``. 10 | To stop it, run ``stop.sh`` 11 | To completely remove all incriminating evidence of the network 12 | on your system, run ``teardown.sh``. 13 | 14 | Creative Commons License
This work is licensed under a Creative Commons Attribution 4.0 International License 15 | -------------------------------------------------------------------------------- /local/config/channel.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/securitization_blockchain/12699070a8619593868b72a0197c65c7e1514917/local/config/channel.tx -------------------------------------------------------------------------------- /local/config/genesis.block: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/securitization_blockchain/12699070a8619593868b72a0197c65c7e1514917/local/config/genesis.block -------------------------------------------------------------------------------- /local/configtx.yaml: -------------------------------------------------------------------------------- 1 | # Copyright IBM Corp. All Rights Reserved. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | 6 | --- 7 | ################################################################################ 8 | # 9 | # Section: Organizations 10 | # 11 | # - This section defines the different organizational identities which will 12 | # be referenced later in the configuration. 13 | # 14 | ################################################################################ 15 | Organizations: 16 | 17 | # SampleOrg defines an MSP using the sampleconfig. It should never be used 18 | # in production but may be used as a template for other definitions 19 | - &OrdererOrg 20 | # DefaultOrg defines the organization which is used in the sampleconfig 21 | # of the fabric.git development environment 22 | Name: OrdererOrg 23 | 24 | # ID to load the MSP definition as 25 | ID: OrdererMSP 26 | 27 | # MSPDir is the filesystem path which contains the MSP configuration 28 | MSPDir: crypto-config/ordererOrganizations/example.com/msp 29 | 30 | - &Org1 31 | # DefaultOrg defines the organization which is used in the sampleconfig 32 | # of the fabric.git development environment 33 | Name: Org1MSP 34 | 35 | # ID to load the MSP definition as 36 | ID: Org1MSP 37 | 38 | MSPDir: crypto-config/peerOrganizations/org1.example.com/msp 39 | 40 | AnchorPeers: 41 | # AnchorPeers defines the location of peers which can be used 42 | # for cross org gossip communication. Note, this value is only 43 | # encoded in the genesis block in the Application section context 44 | - Host: peer0.org1.example.com 45 | Port: 7051 46 | 47 | ################################################################################ 48 | # 49 | # SECTION: Application 50 | # 51 | # - This section defines the values to encode into a config transaction or 52 | # genesis block for application related parameters 53 | # 54 | ################################################################################ 55 | Application: &ApplicationDefaults 56 | 57 | # Organizations is the list of orgs which are defined as participants on 58 | # the application side of the network 59 | Organizations: 60 | 61 | ################################################################################ 62 | # 63 | # SECTION: Orderer 64 | # 65 | # - This section defines the values to encode into a config transaction or 66 | # genesis block for orderer related parameters 67 | # 68 | ################################################################################ 69 | Orderer: &OrdererDefaults 70 | 71 | # Orderer Type: The orderer implementation to start 72 | # Available types are "solo" and "kafka" 73 | OrdererType: solo 74 | 75 | Addresses: 76 | - orderer.example.com:7050 77 | 78 | # Batch Timeout: The amount of time to wait before creating a batch 79 | BatchTimeout: 2s 80 | 81 | # Batch Size: Controls the number of messages batched into a block 82 | BatchSize: 83 | 84 | # Max Message Count: The maximum number of messages to permit in a batch 85 | MaxMessageCount: 10 86 | 87 | # Absolute Max Bytes: The absolute maximum number of bytes allowed for 88 | # the serialized messages in a batch. 89 | AbsoluteMaxBytes: 99 MB 90 | 91 | # Preferred Max Bytes: The preferred maximum number of bytes allowed for 92 | # the serialized messages in a batch. A message larger than the preferred 93 | # max bytes will result in a batch larger than preferred max bytes. 94 | PreferredMaxBytes: 512 KB 95 | 96 | Kafka: 97 | # Brokers: A list of Kafka brokers to which the orderer connects 98 | # NOTE: Use IP:port notation 99 | Brokers: 100 | - 127.0.0.1:9092 101 | 102 | # Organizations is the list of orgs which are defined as participants on 103 | # the orderer side of the network 104 | Organizations: 105 | 106 | ################################################################################ 107 | # 108 | # Profile 109 | # 110 | # - Different configuration profiles may be encoded here to be specified 111 | # as parameters to the configtxgen tool 112 | # 113 | ################################################################################ 114 | Profiles: 115 | 116 | OneOrgOrdererGenesis: 117 | Orderer: 118 | <<: *OrdererDefaults 119 | Organizations: 120 | - *OrdererOrg 121 | Consortiums: 122 | SampleConsortium: 123 | Organizations: 124 | - *Org1 125 | OneOrgChannel: 126 | Consortium: SampleConsortium 127 | Application: 128 | <<: *ApplicationDefaults 129 | Organizations: 130 | - *Org1 131 | 132 | -------------------------------------------------------------------------------- /local/connection.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "basic-network", 3 | "version": "1.0.0", 4 | "client": { 5 | "organization": "Org1", 6 | "connection": { 7 | "timeout": { 8 | "peer": { 9 | "endorser": "300" 10 | }, 11 | "orderer": "300" 12 | } 13 | } 14 | }, 15 | "channels": { 16 | "mychannel": { 17 | "orderers": [ 18 | "orderer.example.com" 19 | ], 20 | "peers": { 21 | "peer0.org1.example.com": {} 22 | } 23 | } 24 | }, 25 | "organizations": { 26 | "Org1": { 27 | "mspid": "Org1MSP", 28 | "peers": [ 29 | "peer0.org1.example.com" 30 | ], 31 | "certificateAuthorities": [ 32 | "ca.example.com" 33 | ] 34 | } 35 | }, 36 | "orderers": { 37 | "orderer.example.com": { 38 | "url": "grpc://orderer.example.com:7050" 39 | } 40 | }, 41 | "peers": { 42 | "peer0.org1.example.com": { 43 | "url": "grpc://peer0.org1.example.com:7051" 44 | } 45 | }, 46 | "certificateAuthorities": { 47 | "ca.example.com": { 48 | "url": "http://ca.example.com:7054", 49 | "caName": "ca.example.com" 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /local/connection.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: basic-network 3 | version: 1.0.0 4 | client: 5 | organization: Org1 6 | connection: 7 | timeout: 8 | peer: 9 | endorser: '300' 10 | orderer: '300' 11 | channels: 12 | mychannel: 13 | orderers: 14 | - orderer.example.com 15 | peers: 16 | peer0.org1.example.com: {} 17 | organizations: 18 | Org1: 19 | mspid: Org1MSP 20 | peers: 21 | - peer0.org1.example.com 22 | certificateAuthorities: 23 | - ca.example.com 24 | orderers: 25 | orderer.example.com: 26 | url: grpc://localhost:7050 27 | peers: 28 | peer0.org1.example.com: 29 | url: grpc://localhost:7051 30 | certificateAuthorities: 31 | ca.example.com: 32 | url: http://localhost:7054 33 | caName: ca.example.com 34 | -------------------------------------------------------------------------------- /local/crypto-config.yaml: -------------------------------------------------------------------------------- 1 | # Copyright IBM Corp. All Rights Reserved. 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | # 5 | 6 | # --------------------------------------------------------------------------- 7 | # "OrdererOrgs" - Definition of organizations managing orderer nodes 8 | # --------------------------------------------------------------------------- 9 | OrdererOrgs: 10 | # --------------------------------------------------------------------------- 11 | # Orderer 12 | # --------------------------------------------------------------------------- 13 | - Name: Orderer 14 | Domain: example.com 15 | # --------------------------------------------------------------------------- 16 | # "Specs" - See PeerOrgs below for complete description 17 | # --------------------------------------------------------------------------- 18 | Specs: 19 | - Hostname: orderer 20 | # --------------------------------------------------------------------------- 21 | # "PeerOrgs" - Definition of organizations managing peer nodes 22 | # --------------------------------------------------------------------------- 23 | PeerOrgs: 24 | # --------------------------------------------------------------------------- 25 | # Org1 26 | # --------------------------------------------------------------------------- 27 | - Name: Org1 28 | Domain: org1.example.com 29 | # --------------------------------------------------------------------------- 30 | # "Specs" 31 | # --------------------------------------------------------------------------- 32 | # Uncomment this section to enable the explicit definition of hosts in your 33 | # configuration. Most users will want to use Template, below 34 | # 35 | # Specs is an array of Spec entries. Each Spec entry consists of two fields: 36 | # - Hostname: (Required) The desired hostname, sans the domain. 37 | # - CommonName: (Optional) Specifies the template or explicit override for 38 | # the CN. By default, this is the template: 39 | # 40 | # "{{.Hostname}}.{{.Domain}}" 41 | # 42 | # which obtains its values from the Spec.Hostname and 43 | # Org.Domain, respectively. 44 | # --------------------------------------------------------------------------- 45 | # Specs: 46 | # - Hostname: foo # implicitly "foo.org1.example.com" 47 | # CommonName: foo27.org5.example.com # overrides Hostname-based FQDN set above 48 | # - Hostname: bar 49 | # - Hostname: baz 50 | # --------------------------------------------------------------------------- 51 | # "Template" 52 | # --------------------------------------------------------------------------- 53 | # Allows for the definition of 1 or more hosts that are created sequentially 54 | # from a template. By default, this looks like "peer%d" from 0 to Count-1. 55 | # You may override the number of nodes (Count), the starting index (Start) 56 | # or the template used to construct the name (Hostname). 57 | # 58 | # Note: Template and Specs are not mutually exclusive. You may define both 59 | # sections and the aggregate nodes will be created for you. Take care with 60 | # name collisions 61 | # --------------------------------------------------------------------------- 62 | Template: 63 | Count: 1 64 | # Start: 5 65 | # Hostname: {{.Prefix}}{{.Index}} # default 66 | # --------------------------------------------------------------------------- 67 | # "Users" 68 | # --------------------------------------------------------------------------- 69 | # Count: The number of user accounts _in addition_ to Admin 70 | # --------------------------------------------------------------------------- 71 | Users: 72 | Count: 1 73 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/ca/a0606a4a860a1e31c90a23788da6f3b6b74925ed0d23061af4899409ba46ae6a_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgbIRfBJjk/t3HLnEz 3 | 32V4sCllmJtnliVv4UmLfrjZ+B6hRANCAASM01iiFoDgTsTd27nU+R1z7YZbqM4I 4 | Tlz13Mg+SQWsWn25IM6/IwtzNq5SSQZtJwpo7+gtS5IggDn7WJMi6Hy6 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/ca/ca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLjCCAdWgAwIBAgIQHuAANpa/kDL7CPyNttctRjAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTE3MDgzMTA5MTQzMloXDTI3MDgyOTA5MTQzMlowaTELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFtcGxlLmNv 8 | bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABIzTWKIWgOBOxN3budT5HXPthluo 9 | zghOXPXcyD5JBaxafbkgzr8jC3M2rlJJBm0nCmjv6C1LkiCAOftYkyLofLqjXzBd 10 | MA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMB 11 | Af8wKQYDVR0OBCIEIKBgakqGCh4xyQojeI2m87a3SSXtDSMGGvSJlAm6Rq5qMAoG 12 | CCqGSM49BAMCA0cAMEQCIGShwWIKXmf3oJY3Oow7pKA0SSe89UsRLy2HMxxNzgWx 13 | AiB097hBfmM2JEZsEZfMbEM2U7edQIDyCoPOgm5ha9wDNw== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/msp/admincerts/Admin@example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICCTCCAbCgAwIBAgIQVMXz1cejr3sGgDsXuIBK3zAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTE3MDgzMTA5MTQzMloXDTI3MDgyOTA5MTQzMlowVjELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xGjAYBgNVBAMMEUFkbWluQGV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI 8 | zj0DAQcDQgAEFufLmRXBZHc3d7HvYSU4jR4nJnzfmJlWN6Gm0Bm+NsO8lwb1TDa4 9 | cPzAOgnbIm1VFwhBd+sE3TIzIWsM2Kzv1aNNMEswDgYDVR0PAQH/BAQDAgeAMAwG 10 | A1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgoGBqSoYKHjHJCiN4jabztrdJJe0NIwYa 11 | 9ImUCbpGrmowCgYIKoZIzj0EAwIDRwAwRAIgId+xpuBHjfWvL8aAsDbmMjXAoOYy 12 | BgazcJh446kZaDACIDeyvsH5Xwes5w5Sksv7mb6/kr4ceCy00h1Vlt5bwPiu 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/msp/cacerts/ca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLjCCAdWgAwIBAgIQHuAANpa/kDL7CPyNttctRjAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTE3MDgzMTA5MTQzMloXDTI3MDgyOTA5MTQzMlowaTELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFtcGxlLmNv 8 | bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABIzTWKIWgOBOxN3budT5HXPthluo 9 | zghOXPXcyD5JBaxafbkgzr8jC3M2rlJJBm0nCmjv6C1LkiCAOftYkyLofLqjXzBd 10 | MA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMB 11 | Af8wKQYDVR0OBCIEIKBgakqGCh4xyQojeI2m87a3SSXtDSMGGvSJlAm6Rq5qMAoG 12 | CCqGSM49BAMCA0cAMEQCIGShwWIKXmf3oJY3Oow7pKA0SSe89UsRLy2HMxxNzgWx 13 | AiB097hBfmM2JEZsEZfMbEM2U7edQIDyCoPOgm5ha9wDNw== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/msp/tlscacerts/tlsca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNTCCAdugAwIBAgIQT0WLBisbcQ6AkirTJApb1TAKBggqhkjOPQQDAjBsMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4 5 | YW1wbGUuY29tMB4XDTE3MDgzMTA5MTQzMloXDTI3MDgyOTA5MTQzMlowbDELMAkG 6 | A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu 7 | Y2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5leGFt 8 | cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABGtRFSyePgHhit2JfQNn 9 | Gbda3X9Y+Eb5Ft/4L9uLsxc4zEMLt2TJZewEfO/Uoe9YH9VhFmGj/d9M0d/0HSAn 10 | K8WjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB 11 | /wQFMAMBAf8wKQYDVR0OBCIEII0hhlVshdUV5zfQwNqNDXZyeFtoXLUDvLleU9zC 12 | efunMAoGCCqGSM49BAMCA0gAMEUCIQDxLfsMRqPJuoH77vahGkE6EYMqvzjVI2Ob 13 | aV1DZJfUdwIgHuHXPvKvcoYZgAo7Xc57Uqs6hSpMs0CjzcfLXYiwoVc= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/admincerts/Admin@example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICCTCCAbCgAwIBAgIQVMXz1cejr3sGgDsXuIBK3zAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTE3MDgzMTA5MTQzMloXDTI3MDgyOTA5MTQzMlowVjELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xGjAYBgNVBAMMEUFkbWluQGV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI 8 | zj0DAQcDQgAEFufLmRXBZHc3d7HvYSU4jR4nJnzfmJlWN6Gm0Bm+NsO8lwb1TDa4 9 | cPzAOgnbIm1VFwhBd+sE3TIzIWsM2Kzv1aNNMEswDgYDVR0PAQH/BAQDAgeAMAwG 10 | A1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgoGBqSoYKHjHJCiN4jabztrdJJe0NIwYa 11 | 9ImUCbpGrmowCgYIKoZIzj0EAwIDRwAwRAIgId+xpuBHjfWvL8aAsDbmMjXAoOYy 12 | BgazcJh446kZaDACIDeyvsH5Xwes5w5Sksv7mb6/kr4ceCy00h1Vlt5bwPiu 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLjCCAdWgAwIBAgIQHuAANpa/kDL7CPyNttctRjAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTE3MDgzMTA5MTQzMloXDTI3MDgyOTA5MTQzMlowaTELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFtcGxlLmNv 8 | bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABIzTWKIWgOBOxN3budT5HXPthluo 9 | zghOXPXcyD5JBaxafbkgzr8jC3M2rlJJBm0nCmjv6C1LkiCAOftYkyLofLqjXzBd 10 | MA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMB 11 | Af8wKQYDVR0OBCIEIKBgakqGCh4xyQojeI2m87a3SSXtDSMGGvSJlAm6Rq5qMAoG 12 | CCqGSM49BAMCA0cAMEQCIGShwWIKXmf3oJY3Oow7pKA0SSe89UsRLy2HMxxNzgWx 13 | AiB097hBfmM2JEZsEZfMbEM2U7edQIDyCoPOgm5ha9wDNw== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/keystore/4d2f776c0fef8eac3f460a7c3558dc7859c4fe458e262e674a6c23f242ea33d1_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg730zOAwSLJKj9wle 3 | jbxx4d0P2Qwl314A+znW9n6070mhRANCAARQ4kbOlqzGNLkQmZsUh78a04kkCjqa 4 | EmovJhP08G9VJ1pD9NCUw2WosRmAU/rBz0K2tSn9YOdn8zbMumgM+ORy 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts/orderer.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICDDCCAbOgAwIBAgIRAK30hdRcBxQJYNPqPkiFo3IwCgYIKoZIzj0EAwIwaTEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt 5 | cGxlLmNvbTAeFw0xNzA4MzEwOTE0MzJaFw0yNzA4MjkwOTE0MzJaMFgxCzAJBgNV 6 | BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp 7 | c2NvMRwwGgYDVQQDExNvcmRlcmVyLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYI 8 | KoZIzj0DAQcDQgAEUOJGzpasxjS5EJmbFIe/GtOJJAo6mhJqLyYT9PBvVSdaQ/TQ 9 | lMNlqLEZgFP6wc9CtrUp/WDnZ/M2zLpoDPjkcqNNMEswDgYDVR0PAQH/BAQDAgeA 10 | MAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgoGBqSoYKHjHJCiN4jabztrdJJe0N 11 | IwYa9ImUCbpGrmowCgYIKoZIzj0EAwIDRwAwRAIgHsU1f4jzuul6zYGY/Xn/H5X5 12 | gDe7/u8dZxJfWwXOGNsCICbXt6yezSzacOFQDkvAPz5/3OYI5YKLSTl+Wilfa/qy 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNTCCAdugAwIBAgIQT0WLBisbcQ6AkirTJApb1TAKBggqhkjOPQQDAjBsMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4 5 | YW1wbGUuY29tMB4XDTE3MDgzMTA5MTQzMloXDTI3MDgyOTA5MTQzMlowbDELMAkG 6 | A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu 7 | Y2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5leGFt 8 | cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABGtRFSyePgHhit2JfQNn 9 | Gbda3X9Y+Eb5Ft/4L9uLsxc4zEMLt2TJZewEfO/Uoe9YH9VhFmGj/d9M0d/0HSAn 10 | K8WjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB 11 | /wQFMAMBAf8wKQYDVR0OBCIEII0hhlVshdUV5zfQwNqNDXZyeFtoXLUDvLleU9zC 12 | efunMAoGCCqGSM49BAMCA0gAMEUCIQDxLfsMRqPJuoH77vahGkE6EYMqvzjVI2Ob 13 | aV1DZJfUdwIgHuHXPvKvcoYZgAo7Xc57Uqs6hSpMs0CjzcfLXYiwoVc= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNTCCAdugAwIBAgIQT0WLBisbcQ6AkirTJApb1TAKBggqhkjOPQQDAjBsMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4 5 | YW1wbGUuY29tMB4XDTE3MDgzMTA5MTQzMloXDTI3MDgyOTA5MTQzMlowbDELMAkG 6 | A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu 7 | Y2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5leGFt 8 | cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABGtRFSyePgHhit2JfQNn 9 | Gbda3X9Y+Eb5Ft/4L9uLsxc4zEMLt2TJZewEfO/Uoe9YH9VhFmGj/d9M0d/0HSAn 10 | K8WjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB 11 | /wQFMAMBAf8wKQYDVR0OBCIEII0hhlVshdUV5zfQwNqNDXZyeFtoXLUDvLleU9zC 12 | efunMAoGCCqGSM49BAMCA0gAMEUCIQDxLfsMRqPJuoH77vahGkE6EYMqvzjVI2Ob 13 | aV1DZJfUdwIgHuHXPvKvcoYZgAo7Xc57Uqs6hSpMs0CjzcfLXYiwoVc= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICWTCCAf+gAwIBAgIQLwiilHvhB1gOg5eGs5O9YDAKBggqhkjOPQQDAjBsMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4 5 | YW1wbGUuY29tMB4XDTE3MDgzMTA5MTQzMloXDTI3MDgyOTA5MTQzMlowWDELMAkG 6 | A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu 7 | Y2lzY28xHDAaBgNVBAMTE29yZGVyZXIuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIB 8 | BggqhkjOPQMBBwNCAARYRRq90z+ioUM2U9OzPnvqvz9Jpza9JOEsG6UJyEzWB8R7 9 | bHr0XR1Dl8lodlLh3C5vTrb6vqtpNeVXVsd+VVyIo4GWMIGTMA4GA1UdDwEB/wQE 10 | AwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/BAIw 11 | ADArBgNVHSMEJDAigCCNIYZVbIXVFec30MDajQ12cnhbaFy1A7y5XlPcwnn7pzAn 12 | BgNVHREEIDAeghNvcmRlcmVyLmV4YW1wbGUuY29tggdvcmRlcmVyMAoGCCqGSM49 13 | BAMCA0gAMEUCIQDwjzlscwNhuVcxF+FQy3PNwxsSRSOsQqjmFbMFNDSG6wIgfNO0 14 | Mp/QtUShzWepgh1nm8MmDNcnVOOeb4JJy6Gd3Ss= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgH/whD1mna09pbmG6 3 | txGQVIYDx1pZdM/Bkaq1eWYUZqChRANCAARYRRq90z+ioUM2U9OzPnvqvz9Jpza9 4 | JOEsG6UJyEzWB8R7bHr0XR1Dl8lodlLh3C5vTrb6vqtpNeVXVsd+VVyI 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/tlsca/8d2186556c85d515e737d0c0da8d0d7672785b685cb503bcb95e53dcc279fba7_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg6n+vdmDFdoXHLx81 3 | 4KX5d2rChT+6peumwVy6CK6Vld6hRANCAARrURUsnj4B4YrdiX0DZxm3Wt1/WPhG 4 | +Rbf+C/bi7MXOMxDC7dkyWXsBHzv1KHvWB/VYRZho/3fTNHf9B0gJyvF 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNTCCAdugAwIBAgIQT0WLBisbcQ6AkirTJApb1TAKBggqhkjOPQQDAjBsMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4 5 | YW1wbGUuY29tMB4XDTE3MDgzMTA5MTQzMloXDTI3MDgyOTA5MTQzMlowbDELMAkG 6 | A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu 7 | Y2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5leGFt 8 | cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABGtRFSyePgHhit2JfQNn 9 | Gbda3X9Y+Eb5Ft/4L9uLsxc4zEMLt2TJZewEfO/Uoe9YH9VhFmGj/d9M0d/0HSAn 10 | K8WjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB 11 | /wQFMAMBAf8wKQYDVR0OBCIEII0hhlVshdUV5zfQwNqNDXZyeFtoXLUDvLleU9zC 12 | efunMAoGCCqGSM49BAMCA0gAMEUCIQDxLfsMRqPJuoH77vahGkE6EYMqvzjVI2Ob 13 | aV1DZJfUdwIgHuHXPvKvcoYZgAo7Xc57Uqs6hSpMs0CjzcfLXYiwoVc= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/admincerts/Admin@example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICCTCCAbCgAwIBAgIQVMXz1cejr3sGgDsXuIBK3zAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTE3MDgzMTA5MTQzMloXDTI3MDgyOTA5MTQzMlowVjELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xGjAYBgNVBAMMEUFkbWluQGV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI 8 | zj0DAQcDQgAEFufLmRXBZHc3d7HvYSU4jR4nJnzfmJlWN6Gm0Bm+NsO8lwb1TDa4 9 | cPzAOgnbIm1VFwhBd+sE3TIzIWsM2Kzv1aNNMEswDgYDVR0PAQH/BAQDAgeAMAwG 10 | A1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgoGBqSoYKHjHJCiN4jabztrdJJe0NIwYa 11 | 9ImUCbpGrmowCgYIKoZIzj0EAwIDRwAwRAIgId+xpuBHjfWvL8aAsDbmMjXAoOYy 12 | BgazcJh446kZaDACIDeyvsH5Xwes5w5Sksv7mb6/kr4ceCy00h1Vlt5bwPiu 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/cacerts/ca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLjCCAdWgAwIBAgIQHuAANpa/kDL7CPyNttctRjAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTE3MDgzMTA5MTQzMloXDTI3MDgyOTA5MTQzMlowaTELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFtcGxlLmNv 8 | bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABIzTWKIWgOBOxN3budT5HXPthluo 9 | zghOXPXcyD5JBaxafbkgzr8jC3M2rlJJBm0nCmjv6C1LkiCAOftYkyLofLqjXzBd 10 | MA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMB 11 | Af8wKQYDVR0OBCIEIKBgakqGCh4xyQojeI2m87a3SSXtDSMGGvSJlAm6Rq5qMAoG 12 | CCqGSM49BAMCA0cAMEQCIGShwWIKXmf3oJY3Oow7pKA0SSe89UsRLy2HMxxNzgWx 13 | AiB097hBfmM2JEZsEZfMbEM2U7edQIDyCoPOgm5ha9wDNw== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore/1deeab5433fa6e5f045eb763109d6165268fba153211af1281f00d45f54b1022_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgAKUK8aZ5PJMhPpx4 3 | 7mMQoJaha/3jhprXOSxj83ibaYShRANCAAQW58uZFcFkdzd3se9hJTiNHicmfN+Y 4 | mVY3oabQGb42w7yXBvVMNrhw/MA6CdsibVUXCEF36wTdMjMhawzYrO/V 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/signcerts/Admin@example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICCTCCAbCgAwIBAgIQVMXz1cejr3sGgDsXuIBK3zAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTE3MDgzMTA5MTQzMloXDTI3MDgyOTA5MTQzMlowVjELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xGjAYBgNVBAMMEUFkbWluQGV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI 8 | zj0DAQcDQgAEFufLmRXBZHc3d7HvYSU4jR4nJnzfmJlWN6Gm0Bm+NsO8lwb1TDa4 9 | cPzAOgnbIm1VFwhBd+sE3TIzIWsM2Kzv1aNNMEswDgYDVR0PAQH/BAQDAgeAMAwG 10 | A1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgoGBqSoYKHjHJCiN4jabztrdJJe0NIwYa 11 | 9ImUCbpGrmowCgYIKoZIzj0EAwIDRwAwRAIgId+xpuBHjfWvL8aAsDbmMjXAoOYy 12 | BgazcJh446kZaDACIDeyvsH5Xwes5w5Sksv7mb6/kr4ceCy00h1Vlt5bwPiu 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/tlscacerts/tlsca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNTCCAdugAwIBAgIQT0WLBisbcQ6AkirTJApb1TAKBggqhkjOPQQDAjBsMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4 5 | YW1wbGUuY29tMB4XDTE3MDgzMTA5MTQzMloXDTI3MDgyOTA5MTQzMlowbDELMAkG 6 | A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu 7 | Y2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5leGFt 8 | cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABGtRFSyePgHhit2JfQNn 9 | Gbda3X9Y+Eb5Ft/4L9uLsxc4zEMLt2TJZewEfO/Uoe9YH9VhFmGj/d9M0d/0HSAn 10 | K8WjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB 11 | /wQFMAMBAf8wKQYDVR0OBCIEII0hhlVshdUV5zfQwNqNDXZyeFtoXLUDvLleU9zC 12 | efunMAoGCCqGSM49BAMCA0gAMEUCIQDxLfsMRqPJuoH77vahGkE6EYMqvzjVI2Ob 13 | aV1DZJfUdwIgHuHXPvKvcoYZgAo7Xc57Uqs6hSpMs0CjzcfLXYiwoVc= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNTCCAdugAwIBAgIQT0WLBisbcQ6AkirTJApb1TAKBggqhkjOPQQDAjBsMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4 5 | YW1wbGUuY29tMB4XDTE3MDgzMTA5MTQzMloXDTI3MDgyOTA5MTQzMlowbDELMAkG 6 | A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu 7 | Y2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5leGFt 8 | cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABGtRFSyePgHhit2JfQNn 9 | Gbda3X9Y+Eb5Ft/4L9uLsxc4zEMLt2TJZewEfO/Uoe9YH9VhFmGj/d9M0d/0HSAn 10 | K8WjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB 11 | /wQFMAMBAf8wKQYDVR0OBCIEII0hhlVshdUV5zfQwNqNDXZyeFtoXLUDvLleU9zC 12 | efunMAoGCCqGSM49BAMCA0gAMEUCIQDxLfsMRqPJuoH77vahGkE6EYMqvzjVI2Ob 13 | aV1DZJfUdwIgHuHXPvKvcoYZgAo7Xc57Uqs6hSpMs0CjzcfLXYiwoVc= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICKzCCAdKgAwIBAgIQHYv3zMnbbON0eufj3s78FTAKBggqhkjOPQQDAjBsMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4 5 | YW1wbGUuY29tMB4XDTE3MDgzMTA5MTQzMloXDTI3MDgyOTA5MTQzMlowVjELMAkG 6 | A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu 7 | Y2lzY28xGjAYBgNVBAMMEUFkbWluQGV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYI 8 | KoZIzj0DAQcDQgAEZsLfeA+tjHJJOyxhJOP31uDluC6eCnMBq0LKawBugaoI3vqh 9 | T8ux5ty+ooSJk7EN3pTQa10m0qX/Y7e0J79JL6NsMGowDgYDVR0PAQH/BAQDAgWg 10 | MB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAMBgNVHRMBAf8EAjAAMCsG 11 | A1UdIwQkMCKAII0hhlVshdUV5zfQwNqNDXZyeFtoXLUDvLleU9zCefunMAoGCCqG 12 | SM49BAMCA0cAMEQCIEcK5iAxpGN1wtC5w+590RJrLzD7DOzVCUIxAdJp80BUAiA/ 13 | XMFE+lHMJmqeoqmXG14Z/70xmHChlyHxm6lFR2I6gw== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg19ebRLtFBB+n9OCa 3 | KcXLds/nf306mSDnnrA7tlZVjaOhRANCAARmwt94D62Mckk7LGEk4/fW4OW4Lp4K 4 | cwGrQsprAG6Bqgje+qFPy7Hm3L6ihImTsQ3elNBrXSbSpf9jt7Qnv0kv 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/ca/4239aa0dcd76daeeb8ba0cda701851d14504d31aad1b2ddddbac6a57365e497c_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgYMqNZRu/I7vdcjpm 3 | Tj+O9T4AYXi3MBNW4nzWHJN8nLqhRANCAATNLYBI3trLI/wFhYf+9MpnVb1R/vBF 4 | rbu/43J+R8u4E73sCcx0nRfYCA+dHf22ceuSjq3lMXraorVev5tg4Dc7 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICRDCCAeqgAwIBAgIRAIk/1HQ6XgI0p64PQwvUA3owCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwODMxMDkxNDMyWhcNMjcwODI5MDkxNDMy 6 | WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE 8 | AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA 9 | BM0tgEje2ssj/AWFh/70ymdVvVH+8EWtu7/jcn5Hy7gTvewJzHSdF9gID50d/bZx 10 | 65KOreUxetqitV6/m2DgNzujXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG 11 | BgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIEI5qg3NdtruuLoM2nAY 12 | UdFFBNMarRst3dusalc2Xkl8MAoGCCqGSM49BAMCA0gAMEUCIQDufxsHbxkSP/y+ 13 | oM2xZGgHL5XSTJVBqBryk1rd08Af6QIgLiAwtR7iKRbf1pKKCkt66MZzItZXC0po 14 | /45uf29T/sc= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/ca/org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICFjCCAb2gAwIBAgIUNDCk4a9Z/oaid+BBpYAGT8A18f8wCgYIKoZIzj0EAwIw 3 | aDELMAkGA1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMRQwEgYDVQQK 4 | EwtIeXBlcmxlZGdlcjEPMA0GA1UECxMGRmFicmljMRkwFwYDVQQDExBmYWJyaWMt 5 | Y2Etc2VydmVyMB4XDTE3MDgzMTE1MzcwMFoXDTMyMDgyNzE1MzcwMFowaDELMAkG 6 | A1UEBhMCVVMxFzAVBgNVBAgTDk5vcnRoIENhcm9saW5hMRQwEgYDVQQKEwtIeXBl 7 | cmxlZGdlcjEPMA0GA1UECxMGRmFicmljMRkwFwYDVQQDExBmYWJyaWMtY2Etc2Vy 8 | dmVyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAExzMhy+KdVYhr6sqA32pAKwM6 9 | DrPal71NXVNzF/Mdep2jlbhSMu73gwz+q4Hy+SoPnyuIYCpCy5rJhXwEnoQJvaNF 10 | MEMwDgYDVR0PAQH/BAQDAgEGMBIGA1UdEwEB/wQIMAYBAf8CAQEwHQYDVR0OBBYE 11 | FNLXRcya9ZgImWIPbPPsrdTIDuPEMAoGCCqGSM49BAMCA0cAMEQCIGL9qKSaPG6U 12 | IMvw1zolTgimpIxwulGOuQeVybPwYI3oAiBCmOSz5PfASGh8VtCUCCwE+Ef1xQGI 13 | q6Zjh87nj/eyqQ== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGDCCAb+gAwIBAgIQFSxnLAGsu04zrFkAEwzn6zAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA4MzEwOTE0MzJaFw0yNzA4MjkwOTE0MzJa 6 | MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29tMFkw 8 | EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEV1dfmKxsFKWo7o6DNBIaIVebCCPAM9C/ 9 | sLBt4pJRre9pWE987DjXZoZ3glc4+DoPMtTmBRqbPVwYcUvpbYY8p6NNMEswDgYD 10 | VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgQjmqDc122u64 11 | ugzacBhR0UUE0xqtGy3d26xqVzZeSXwwCgYIKoZIzj0EAwIDRwAwRAIgXMy26AEU 12 | /GUMPfCMs/nQjQME1ZxBHAYZtKEuRR361JsCIEg9BOZdIoioRivJC+ZUzvJUnkXu 13 | o2HkWiuxLsibGxtE 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICRDCCAeqgAwIBAgIRAIk/1HQ6XgI0p64PQwvUA3owCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwODMxMDkxNDMyWhcNMjcwODI5MDkxNDMy 6 | WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE 8 | AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA 9 | BM0tgEje2ssj/AWFh/70ymdVvVH+8EWtu7/jcn5Hy7gTvewJzHSdF9gID50d/bZx 10 | 65KOreUxetqitV6/m2DgNzujXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG 11 | BgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIEI5qg3NdtruuLoM2nAY 12 | UdFFBNMarRst3dusalc2Xkl8MAoGCCqGSM49BAMCA0gAMEUCIQDufxsHbxkSP/y+ 13 | oM2xZGgHL5XSTJVBqBryk1rd08Af6QIgLiAwtR7iKRbf1pKKCkt66MZzItZXC0po 14 | /45uf29T/sc= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAfCgAwIBAgIRALOo7o5dtcd8yGpCqowtoIUwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwODMxMDkxNDMyWhcNMjcwODI5MDkx 6 | NDMyWjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABAftdw28/JThHyrfF4SCTjHUykfeQZ3eqSwYlkCqYF1Lwzae18o97Biz 10 | doz/BBMjisAoJESyzVOrGj7nGD7EzwWjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIO0/2COT6V/C 12 | xHWvwRPI0sWR90XRurxNbZzOChrMForLMAoGCCqGSM49BAMCA0cAMEQCIGd4ZaLj 13 | 1R4C25obVTI/pWriqWlXXAV7h2ZQfD41nNMYAiAO858VYb4xyLUkF9XGtZJpux4x 14 | 0ClsWNgEp49nBBsecw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGDCCAb+gAwIBAgIQFSxnLAGsu04zrFkAEwzn6zAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA4MzEwOTE0MzJaFw0yNzA4MjkwOTE0MzJa 6 | MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29tMFkw 8 | EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEV1dfmKxsFKWo7o6DNBIaIVebCCPAM9C/ 9 | sLBt4pJRre9pWE987DjXZoZ3glc4+DoPMtTmBRqbPVwYcUvpbYY8p6NNMEswDgYD 10 | VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgQjmqDc122u64 11 | ugzacBhR0UUE0xqtGy3d26xqVzZeSXwwCgYIKoZIzj0EAwIDRwAwRAIgXMy26AEU 12 | /GUMPfCMs/nQjQME1ZxBHAYZtKEuRR361JsCIEg9BOZdIoioRivJC+ZUzvJUnkXu 13 | o2HkWiuxLsibGxtE 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICRDCCAeqgAwIBAgIRAIk/1HQ6XgI0p64PQwvUA3owCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwODMxMDkxNDMyWhcNMjcwODI5MDkxNDMy 6 | WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE 8 | AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA 9 | BM0tgEje2ssj/AWFh/70ymdVvVH+8EWtu7/jcn5Hy7gTvewJzHSdF9gID50d/bZx 10 | 65KOreUxetqitV6/m2DgNzujXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG 11 | BgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIEI5qg3NdtruuLoM2nAY 12 | UdFFBNMarRst3dusalc2Xkl8MAoGCCqGSM49BAMCA0gAMEUCIQDufxsHbxkSP/y+ 13 | oM2xZGgHL5XSTJVBqBryk1rd08Af6QIgLiAwtR7iKRbf1pKKCkt66MZzItZXC0po 14 | /45uf29T/sc= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/keystore/46be1d569fe68f33e517c9e0072a0ccfbfb42727480fb8c8d0223af321a7893d_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg46tw2jZtucld26uq 3 | RQAPPB1+y8BilJU2luj/OsMinWahRANCAAR4ocVupLNwdvuV3WwFatwgYMUUUWdt 4 | sc86apw/OpypM+3wRJQboZV5diuq08cmNjgTgdLbPJHqmfd8bnkRspq2 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/signcerts/peer0.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGjCCAcCgAwIBAgIRAPlwF/rUZUP9mqN4wSml4iswCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwODMxMDkxNDMyWhcNMjcwODI5MDkxNDMy 6 | WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEfMB0GA1UEAxMWcGVlcjAub3JnMS5leGFtcGxlLmNvbTBZ 8 | MBMGByqGSM49AgEGCCqGSM49AwEHA0IABHihxW6ks3B2+5XdbAVq3CBgxRRRZ22x 9 | zzpqnD86nKkz7fBElBuhlXl2K6rTxyY2OBOB0ts8keqZ93xueRGymrajTTBLMA4G 10 | A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIEI5qg3Ndtru 11 | uLoM2nAYUdFFBNMarRst3dusalc2Xkl8MAoGCCqGSM49BAMCA0gAMEUCIQD4j0Rn 12 | e1rrd0FSCzsR6u+IuuPK5dI/kR/bh7+VLf0TNgIgCfUtkJvfvzVEwZLFoFyjoHtr 13 | tvwzNUS1U0hEqIaDeo4= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAfCgAwIBAgIRALOo7o5dtcd8yGpCqowtoIUwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwODMxMDkxNDMyWhcNMjcwODI5MDkx 6 | NDMyWjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABAftdw28/JThHyrfF4SCTjHUykfeQZ3eqSwYlkCqYF1Lwzae18o97Biz 10 | doz/BBMjisAoJESyzVOrGj7nGD7EzwWjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIO0/2COT6V/C 12 | xHWvwRPI0sWR90XRurxNbZzOChrMForLMAoGCCqGSM49BAMCA0cAMEQCIGd4ZaLj 13 | 1R4C25obVTI/pWriqWlXXAV7h2ZQfD41nNMYAiAO858VYb4xyLUkF9XGtZJpux4x 14 | 0ClsWNgEp49nBBsecw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAfCgAwIBAgIRALOo7o5dtcd8yGpCqowtoIUwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwODMxMDkxNDMyWhcNMjcwODI5MDkx 6 | NDMyWjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABAftdw28/JThHyrfF4SCTjHUykfeQZ3eqSwYlkCqYF1Lwzae18o97Biz 10 | doz/BBMjisAoJESyzVOrGj7nGD7EzwWjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIO0/2COT6V/C 12 | xHWvwRPI0sWR90XRurxNbZzOChrMForLMAoGCCqGSM49BAMCA0cAMEQCIGd4ZaLj 13 | 1R4C25obVTI/pWriqWlXXAV7h2ZQfD41nNMYAiAO858VYb4xyLUkF9XGtZJpux4x 14 | 0ClsWNgEp49nBBsecw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICZjCCAg2gAwIBAgIQenbZk7+46tsIJy8JAgySaDAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzA4MzEwOTE0MzJaFw0yNzA4MjkwOTE0 6 | MzJaMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMR8wHQYDVQQDExZwZWVyMC5vcmcxLmV4YW1wbGUuY29t 8 | MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE0AZOhWRZ4aOZeLSBioClHt5VDiNT 9 | CeIxn3rVw9oCzlDDMaIZrBG1lI4o2tXOgOGSIPBmRjy736Njc54InlHlsKOBlzCB 10 | lDAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMC 11 | MAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAg7T/YI5PpX8LEda/BE8jSxZH3RdG6 12 | vE1tnM4KGswWisswKAYDVR0RBCEwH4IWcGVlcjAub3JnMS5leGFtcGxlLmNvbYIF 13 | cGVlcjAwCgYIKoZIzj0EAwIDRwAwRAIgU9GgYioYa1Mdhhe5MHyZGXfr4G8gBxwe 14 | dqlWU/mGaPsCIGQpA0VoBrP3Neso3htfZnlWKcbrtCD29HBWmT7ImZT1 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgMvwKsTL9m2NygrLw 3 | dfrlMzyQlUaSPendFhF+2yLGaH2hRANCAATQBk6FZFnho5l4tIGKgKUe3lUOI1MJ 4 | 4jGfetXD2gLOUMMxohmsEbWUjija1c6A4ZIg8GZGPLvfo2NzngieUeWw 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/tlsca/ed3fd82393e95fc2c475afc113c8d2c591f745d1babc4d6d9cce0a1acc168acb_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgkcI0vNVNanWltD+I 3 | VHz5V1u01+X8VOG3a5ZTLRed0MmhRANCAAQH7XcNvPyU4R8q3xeEgk4x1MpH3kGd 4 | 3qksGJZAqmBdS8M2ntfKPewYs3aM/wQTI4rAKCREss1Tqxo+5xg+xM8F 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAfCgAwIBAgIRALOo7o5dtcd8yGpCqowtoIUwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwODMxMDkxNDMyWhcNMjcwODI5MDkx 6 | NDMyWjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABAftdw28/JThHyrfF4SCTjHUykfeQZ3eqSwYlkCqYF1Lwzae18o97Biz 10 | doz/BBMjisAoJESyzVOrGj7nGD7EzwWjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIO0/2COT6V/C 12 | xHWvwRPI0sWR90XRurxNbZzOChrMForLMAoGCCqGSM49BAMCA0cAMEQCIGd4ZaLj 13 | 1R4C25obVTI/pWriqWlXXAV7h2ZQfD41nNMYAiAO858VYb4xyLUkF9XGtZJpux4x 14 | 0ClsWNgEp49nBBsecw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGDCCAb+gAwIBAgIQFSxnLAGsu04zrFkAEwzn6zAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA4MzEwOTE0MzJaFw0yNzA4MjkwOTE0MzJa 6 | MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29tMFkw 8 | EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEV1dfmKxsFKWo7o6DNBIaIVebCCPAM9C/ 9 | sLBt4pJRre9pWE987DjXZoZ3glc4+DoPMtTmBRqbPVwYcUvpbYY8p6NNMEswDgYD 10 | VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgQjmqDc122u64 11 | ugzacBhR0UUE0xqtGy3d26xqVzZeSXwwCgYIKoZIzj0EAwIDRwAwRAIgXMy26AEU 12 | /GUMPfCMs/nQjQME1ZxBHAYZtKEuRR361JsCIEg9BOZdIoioRivJC+ZUzvJUnkXu 13 | o2HkWiuxLsibGxtE 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICRDCCAeqgAwIBAgIRAIk/1HQ6XgI0p64PQwvUA3owCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwODMxMDkxNDMyWhcNMjcwODI5MDkxNDMy 6 | WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE 8 | AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA 9 | BM0tgEje2ssj/AWFh/70ymdVvVH+8EWtu7/jcn5Hy7gTvewJzHSdF9gID50d/bZx 10 | 65KOreUxetqitV6/m2DgNzujXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG 11 | BgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIEI5qg3NdtruuLoM2nAY 12 | UdFFBNMarRst3dusalc2Xkl8MAoGCCqGSM49BAMCA0gAMEUCIQDufxsHbxkSP/y+ 13 | oM2xZGgHL5XSTJVBqBryk1rd08Af6QIgLiAwtR7iKRbf1pKKCkt66MZzItZXC0po 14 | /45uf29T/sc= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/cd96d5260ad4757551ed4a5a991e62130f8008a0bf996e4e4b84cd097a747fec_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgRgQr347ij6cjwX7m 3 | KjzbbD8Tlwdfu6FaubjWJWLGyqahRANCAARXV1+YrGwUpajujoM0EhohV5sII8Az 4 | 0L+wsG3iklGt72lYT3zsONdmhneCVzj4Og8y1OYFGps9XBhxS+lthjyn 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGDCCAb+gAwIBAgIQFSxnLAGsu04zrFkAEwzn6zAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA4MzEwOTE0MzJaFw0yNzA4MjkwOTE0MzJa 6 | MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29tMFkw 8 | EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEV1dfmKxsFKWo7o6DNBIaIVebCCPAM9C/ 9 | sLBt4pJRre9pWE987DjXZoZ3glc4+DoPMtTmBRqbPVwYcUvpbYY8p6NNMEswDgYD 10 | VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgQjmqDc122u64 11 | ugzacBhR0UUE0xqtGy3d26xqVzZeSXwwCgYIKoZIzj0EAwIDRwAwRAIgXMy26AEU 12 | /GUMPfCMs/nQjQME1ZxBHAYZtKEuRR361JsCIEg9BOZdIoioRivJC+ZUzvJUnkXu 13 | o2HkWiuxLsibGxtE 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAfCgAwIBAgIRALOo7o5dtcd8yGpCqowtoIUwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwODMxMDkxNDMyWhcNMjcwODI5MDkx 6 | NDMyWjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABAftdw28/JThHyrfF4SCTjHUykfeQZ3eqSwYlkCqYF1Lwzae18o97Biz 10 | doz/BBMjisAoJESyzVOrGj7nGD7EzwWjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIO0/2COT6V/C 12 | xHWvwRPI0sWR90XRurxNbZzOChrMForLMAoGCCqGSM49BAMCA0cAMEQCIGd4ZaLj 13 | 1R4C25obVTI/pWriqWlXXAV7h2ZQfD41nNMYAiAO858VYb4xyLUkF9XGtZJpux4x 14 | 0ClsWNgEp49nBBsecw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAfCgAwIBAgIRALOo7o5dtcd8yGpCqowtoIUwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwODMxMDkxNDMyWhcNMjcwODI5MDkx 6 | NDMyWjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABAftdw28/JThHyrfF4SCTjHUykfeQZ3eqSwYlkCqYF1Lwzae18o97Biz 10 | doz/BBMjisAoJESyzVOrGj7nGD7EzwWjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIO0/2COT6V/C 12 | xHWvwRPI0sWR90XRurxNbZzOChrMForLMAoGCCqGSM49BAMCA0cAMEQCIGd4ZaLj 13 | 1R4C25obVTI/pWriqWlXXAV7h2ZQfD41nNMYAiAO858VYb4xyLUkF9XGtZJpux4x 14 | 0ClsWNgEp49nBBsecw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICOjCCAeGgAwIBAgIQZbszPe722f2AcfnwpG2ENDAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzA4MzEwOTE0MzJaFw0yNzA4MjkwOTE0 6 | MzJaMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcxLmV4YW1wbGUuY29t 8 | MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE5ZfQwNA0oBGCr7zX4I/Ufq1Ht740 9 | RnkV+6VBceaG4x45bR0a0ZWeslPzmIRXOir9QvqLvnxGY3aJiadX65kNFKNsMGow 10 | DgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAM 11 | BgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIO0/2COT6V/CxHWvwRPI0sWR90XRurxN 12 | bZzOChrMForLMAoGCCqGSM49BAMCA0cAMEQCIF2V2t75M9bgjQ3pktVEYnCS4u0S 13 | Izw6ZNSy8q/i6C6cAiB4V0ejzQYtp5C25F2xMD+JSlwrhBAOJNK1AkTzj9mgWg== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgqAuu2rihnWgQDlHI 3 | 7Gqyn+Bap3mMqbJ7UQLXIT6lwtmhRANCAATll9DA0DSgEYKvvNfgj9R+rUe3vjRG 4 | eRX7pUFx5objHjltHRrRlZ6yU/OYhFc6Kv1C+ou+fEZjdomJp1frmQ0U 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/admincerts/User1@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGTCCAb+gAwIBAgIQPyhm+v0ZIqCo6MATzLc+5jAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA4MzEwOTE0MzJaFw0yNzA4MjkwOTE0MzJa 6 | MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZVc2VyMUBvcmcxLmV4YW1wbGUuY29tMFkw 8 | EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEL/SomNVO3R5nnsemQ4im/UUZ8Ixs7/nH 9 | 3NH1ROfVJ+m7niDf1ZmhvTyiJzrUpI+n5+/OKIX/Z/VhDuAIR/QLLKNNMEswDgYD 10 | VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgQjmqDc122u64 11 | ugzacBhR0UUE0xqtGy3d26xqVzZeSXwwCgYIKoZIzj0EAwIDSAAwRQIhAJk63AHS 12 | CEvJh64Yx5CnWDgDYNoj0jsi+gGheIxbUYgMAiAi/qPG7KEuuDBL4LlZRfkeatMW 13 | ZKPD7ikt+vOYgVnqlA== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICRDCCAeqgAwIBAgIRAIk/1HQ6XgI0p64PQwvUA3owCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwODMxMDkxNDMyWhcNMjcwODI5MDkxNDMy 6 | WjBzMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UE 8 | AxMTY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IA 9 | BM0tgEje2ssj/AWFh/70ymdVvVH+8EWtu7/jcn5Hy7gTvewJzHSdF9gID50d/bZx 10 | 65KOreUxetqitV6/m2DgNzujXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAG 11 | BgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIEI5qg3NdtruuLoM2nAY 12 | UdFFBNMarRst3dusalc2Xkl8MAoGCCqGSM49BAMCA0gAMEUCIQDufxsHbxkSP/y+ 13 | oM2xZGgHL5XSTJVBqBryk1rd08Af6QIgLiAwtR7iKRbf1pKKCkt66MZzItZXC0po 14 | /45uf29T/sc= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore/c75bd6911aca808941c3557ee7c97e90f3952e379497dc55eb903f31b50abc83_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgJ8IrEgxfZzjGsyt+ 3 | 0o27jvhwUJE2W1PrFeZi8LwHbiuhRANCAAQv9KiY1U7dHmeex6ZDiKb9RRnwjGzv 4 | +cfc0fVE59Un6bueIN/VmaG9PKInOtSkj6fn784ohf9n9WEO4AhH9Ass 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/signcerts/User1@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGTCCAb+gAwIBAgIQPyhm+v0ZIqCo6MATzLc+5jAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMS5leGFtcGxlLmNvbTAeFw0xNzA4MzEwOTE0MzJaFw0yNzA4MjkwOTE0MzJa 6 | MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZVc2VyMUBvcmcxLmV4YW1wbGUuY29tMFkw 8 | EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEL/SomNVO3R5nnsemQ4im/UUZ8Ixs7/nH 9 | 3NH1ROfVJ+m7niDf1ZmhvTyiJzrUpI+n5+/OKIX/Z/VhDuAIR/QLLKNNMEswDgYD 10 | VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgQjmqDc122u64 11 | ugzacBhR0UUE0xqtGy3d26xqVzZeSXwwCgYIKoZIzj0EAwIDSAAwRQIhAJk63AHS 12 | CEvJh64Yx5CnWDgDYNoj0jsi+gGheIxbUYgMAiAi/qPG7KEuuDBL4LlZRfkeatMW 13 | ZKPD7ikt+vOYgVnqlA== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAfCgAwIBAgIRALOo7o5dtcd8yGpCqowtoIUwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwODMxMDkxNDMyWhcNMjcwODI5MDkx 6 | NDMyWjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABAftdw28/JThHyrfF4SCTjHUykfeQZ3eqSwYlkCqYF1Lwzae18o97Biz 10 | doz/BBMjisAoJESyzVOrGj7nGD7EzwWjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIO0/2COT6V/C 12 | xHWvwRPI0sWR90XRurxNbZzOChrMForLMAoGCCqGSM49BAMCA0cAMEQCIGd4ZaLj 13 | 1R4C25obVTI/pWriqWlXXAV7h2ZQfD41nNMYAiAO858VYb4xyLUkF9XGtZJpux4x 14 | 0ClsWNgEp49nBBsecw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAfCgAwIBAgIRALOo7o5dtcd8yGpCqowtoIUwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTcwODMxMDkxNDMyWhcNMjcwODI5MDkx 6 | NDMyWjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABAftdw28/JThHyrfF4SCTjHUykfeQZ3eqSwYlkCqYF1Lwzae18o97Biz 10 | doz/BBMjisAoJESyzVOrGj7nGD7EzwWjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIO0/2COT6V/C 12 | xHWvwRPI0sWR90XRurxNbZzOChrMForLMAoGCCqGSM49BAMCA0cAMEQCIGd4ZaLj 13 | 1R4C25obVTI/pWriqWlXXAV7h2ZQfD41nNMYAiAO858VYb4xyLUkF9XGtZJpux4x 14 | 0ClsWNgEp49nBBsecw== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICOzCCAeGgAwIBAgIQat+rcnuTNMrNDQULaEwq7zAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xNzA4MzEwOTE0MzJaFw0yNzA4MjkwOTE0 6 | MzJaMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZVc2VyMUBvcmcxLmV4YW1wbGUuY29t 8 | MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEFcqqFuh5CXSij4Ma6/tySXB9hYZn 9 | 2oFaVJWPn0JIhqj8rl9vHuNzgwoI1ZNR9fKGmrovqaZjcSg87jxh7gZSeaNsMGow 10 | DgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAM 11 | BgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIO0/2COT6V/CxHWvwRPI0sWR90XRurxN 12 | bZzOChrMForLMAoGCCqGSM49BAMCA0gAMEUCIQCWp1joCFbOhXbZ2sPW1e6gJBNG 13 | ZK+JY6Lm0bGk4vBk6QIgLQ5nzPRWHJNRaqIbigk0OLBKQtzv/Nfbsi6DnhNQoZU= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /local/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgf8ybpxd0cfNqWnfX 3 | KRoa6e/hEJGs0zMCkE+5si/xuV+hRANCAAQVyqoW6HkJdKKPgxrr+3JJcH2Fhmfa 4 | gVpUlY+fQkiGqPyuX28e43ODCgjVk1H18oaaui+ppmNxKDzuPGHuBlJ5 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /local/docker-compose.yml: -------------------------------------------------------------------------------- 1 | # 2 | # Copyright IBM Corp All Rights Reserved 3 | # 4 | # SPDX-License-Identifier: Apache-2.0 5 | # 6 | version: '2' 7 | 8 | networks: 9 | basic: 10 | 11 | services: 12 | ca.example.com: 13 | image: hyperledger/fabric-ca 14 | environment: 15 | - FABRIC_CA_HOME=/etc/hyperledger/fabric-ca-server 16 | - FABRIC_CA_SERVER_CA_NAME=ca.example.com 17 | - FABRIC_CA_SERVER_CA_CERTFILE=/etc/hyperledger/fabric-ca-server-config/ca.org1.example.com-cert.pem 18 | - FABRIC_CA_SERVER_CA_KEYFILE=/etc/hyperledger/fabric-ca-server-config/4239aa0dcd76daeeb8ba0cda701851d14504d31aad1b2ddddbac6a57365e497c_sk 19 | ports: 20 | - "7054:7054" 21 | command: sh -c 'fabric-ca-server start -b admin:adminpw' 22 | volumes: 23 | - ./crypto-config/peerOrganizations/org1.example.com/ca/:/etc/hyperledger/fabric-ca-server-config 24 | container_name: ca.example.com 25 | networks: 26 | - basic 27 | 28 | orderer.example.com: 29 | container_name: orderer.example.com 30 | image: hyperledger/fabric-orderer 31 | environment: 32 | - FABRIC_LOGGING_SPEC=info 33 | - ORDERER_GENERAL_LISTENADDRESS=0.0.0.0 34 | - ORDERER_GENERAL_GENESISMETHOD=file 35 | - ORDERER_GENERAL_GENESISFILE=/etc/hyperledger/configtx/genesis.block 36 | - ORDERER_GENERAL_LOCALMSPID=OrdererMSP 37 | - ORDERER_GENERAL_LOCALMSPDIR=/etc/hyperledger/msp/orderer/msp 38 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric/orderer 39 | command: orderer 40 | ports: 41 | - 7050:7050 42 | volumes: 43 | - ./config/:/etc/hyperledger/configtx 44 | - ./crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/:/etc/hyperledger/msp/orderer 45 | - ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/:/etc/hyperledger/msp/peerOrg1 46 | networks: 47 | - basic 48 | 49 | peer0.org1.example.com: 50 | container_name: peer0.org1.example.com 51 | image: hyperledger/fabric-peer 52 | environment: 53 | - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 54 | - CORE_PEER_ID=peer0.org1.example.com 55 | - FABRIC_LOGGING_SPEC=info 56 | - CORE_CHAINCODE_LOGGING_LEVEL=info 57 | - CORE_PEER_LOCALMSPID=Org1MSP 58 | - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/ 59 | - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 60 | # # the following setting starts chaincode containers on the same 61 | # # bridge network as the peers 62 | # # https://docs.docker.com/compose/networking/ 63 | - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=net_basic 64 | - CORE_LEDGER_STATE_STATEDATABASE=CouchDB 65 | - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb:5984 66 | # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD 67 | # provide the credentials for ledger to connect to CouchDB. The username and password must 68 | # match the username and password set for the associated CouchDB. 69 | - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= 70 | - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= 71 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric 72 | command: peer node start #--peer-chaincodedev=true 73 | # command: peer node start --peer-chaincodedev=true 74 | ports: 75 | - 7051:7051 76 | - 7053:7053 77 | volumes: 78 | - /var/run/:/host/var/run/ 79 | - ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/msp/peer 80 | - ./crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/msp/users 81 | - ./config:/etc/hyperledger/configtx 82 | depends_on: 83 | - orderer.example.com 84 | - couchdb 85 | networks: 86 | - basic 87 | 88 | couchdb: 89 | container_name: couchdb 90 | image: hyperledger/fabric-couchdb 91 | # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password 92 | # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. 93 | environment: 94 | - COUCHDB_USER= 95 | - COUCHDB_PASSWORD= 96 | ports: 97 | - 5984:5984 98 | networks: 99 | - basic 100 | 101 | cli: 102 | container_name: cli 103 | image: hyperledger/fabric-tools 104 | tty: true 105 | environment: 106 | - GOPATH=/opt/gopath 107 | - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 108 | - FABRIC_LOGGING_SPEC=info 109 | - CORE_PEER_ID=cli 110 | - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 111 | - CORE_PEER_LOCALMSPID=Org1MSP 112 | - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp 113 | - CORE_CHAINCODE_KEEPALIVE=10 114 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer 115 | command: /bin/bash 116 | volumes: 117 | - /var/run/:/host/var/run/ 118 | - ./../chaincode/:/opt/gopath/src/github.com/ 119 | - ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ 120 | networks: 121 | - basic 122 | #depends_on: 123 | # - orderer.example.com 124 | # - peer0.org1.example.com 125 | # - couchdb 126 | 127 | chaincode: 128 | container_name: chaincode 129 | image: hyperledger/fabric-ccenv 130 | tty: true 131 | environment: 132 | - GOPATH=/opt/gopath 133 | - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 134 | - FABRIC_LOGGING_SPEC=DEBUG 135 | - CORE_PEER_ID=abstore 136 | - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 137 | - CORE_PEER_LOCALMSPID=Org1MSP 138 | - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp 139 | working_dir: /opt/gopath/src/chaincode 140 | command: /bin/bash -c 'sleep 6000000' 141 | volumes: 142 | - /var/run/:/host/var/run/ 143 | - ./msp:/etc/hyperledger/msp 144 | - ./../chaincode:/opt/gopath/src/chaincode 145 | networks: 146 | - basic 147 | -------------------------------------------------------------------------------- /local/generate.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Copyright IBM Corp All Rights Reserved 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | export PATH=$GOPATH/src/github.com/hyperledger/fabric/build/bin:${PWD}/../bin:${PWD}:$PATH 8 | export FABRIC_CFG_PATH=${PWD} 9 | CHANNEL_NAME=mychannel 10 | 11 | # remove previous crypto material and config transactions 12 | rm -fr config/* 13 | rm -fr crypto-config/* 14 | 15 | # generate crypto material 16 | cryptogen generate --config=./crypto-config.yaml 17 | if [ "$?" -ne 0 ]; then 18 | echo "Failed to generate crypto material..." 19 | exit 1 20 | fi 21 | 22 | # generate genesis block for orderer 23 | configtxgen -profile OneOrgOrdererGenesis -outputBlock ./config/genesis.block 24 | if [ "$?" -ne 0 ]; then 25 | echo "Failed to generate orderer genesis block..." 26 | exit 1 27 | fi 28 | 29 | # generate channel configuration transaction 30 | configtxgen -profile OneOrgChannel -outputCreateChannelTx ./config/channel.tx -channelID $CHANNEL_NAME 31 | if [ "$?" -ne 0 ]; then 32 | echo "Failed to generate channel configuration transaction..." 33 | exit 1 34 | fi 35 | 36 | # generate anchor peer transaction 37 | configtxgen -profile OneOrgChannel -outputAnchorPeersUpdate ./config/Org1MSPanchors.tx -channelID $CHANNEL_NAME -asOrg Org1MSP 38 | if [ "$?" -ne 0 ]; then 39 | echo "Failed to generate anchor peer update for Org1MSP..." 40 | exit 1 41 | fi 42 | -------------------------------------------------------------------------------- /local/init.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright IBM Corp All Rights Reserved 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | 8 | # Exit on first error, print all commands. 9 | set -ev 10 | # delete previous creds 11 | rm -rf ~/.hfc-key-store/* 12 | 13 | # copy peer admin credentials into the keyValStore 14 | mkdir -p ~/.hfc-key-store 15 | -------------------------------------------------------------------------------- /local/installChaincode.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -ex 3 | echo "Copying Chaincode to cli container" 4 | docker cp ../chaincode/src/ cli:/opt/gopath/src/github.com/securitization 5 | echo "Install and Instantiate Chaincode" 6 | docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode install -n securitization -v 1.0 -p github.com/securitization 7 | docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode instantiate -o orderer.example.com:7050 -C mychannel -n securitization -v 1.0 -c '{"Args":["101"]}' 8 | echo "Chaincode Instantiated" 9 | sleep 10 10 | echo "Test Chaincode" 11 | docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp" cli peer chaincode invoke -o orderer.example.com:7050 -C mychannel -n securitization -c '{"Args":["read_everything"]}' 12 | -------------------------------------------------------------------------------- /local/startFabric.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright IBM Corp All Rights Reserved 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | # Exit on first error 8 | set -e 9 | export COMPOSE_PROJECT_NAME=net 10 | 11 | # don't rewrite paths for Windows Git Bash users 12 | export MSYS_NO_PATHCONV=1 13 | starttime=$(date +%s) 14 | LANGUAGE=${1:-"golang"} 15 | CC_SRC_PATH=github.com/securitization/go 16 | if [ "$LANGUAGE" = "node" -o "$LANGUAGE" = "NODE" ]; then 17 | CC_SRC_PATH=github.com/securitization/node 18 | fi 19 | 20 | # clean the keystore 21 | rm -rf ./hfc-key-store 22 | 23 | docker-compose -f docker-compose.yml up -d #ca.example.com orderer.example.com peer0.org1.example.com couchdb 24 | 25 | # wait for Hyperledger Fabric to start 26 | export FABRIC_START_TIMEOUT=10 27 | sleep ${FABRIC_START_TIMEOUT} 28 | 29 | # Create the channel 30 | docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer0.org1.example.com peer channel create -o orderer.example.com:7050 -c mychannel -f /etc/hyperledger/configtx/channel.tx 31 | # Join peer0.org1.example.com to the channel. 32 | docker exec -e "CORE_PEER_LOCALMSPID=Org1MSP" -e "CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/users/Admin@org1.example.com/msp" peer0.org1.example.com peer channel join -b mychannel.block 33 | -------------------------------------------------------------------------------- /local/stopFabric.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # Copyright IBM Corp All Rights Reserved 4 | # 5 | # SPDX-License-Identifier: Apache-2.0 6 | # 7 | # Exit on first error, print all commands. 8 | # set -ev 9 | 10 | # Shut down the Docker containers that might be currently running. 11 | docker-compose -f docker-compose.yml stop 12 | docker ps -a | grep hyperledger | awk '{print $1}' | xargs docker stop 13 | docker ps -a | grep hyperledger | awk '{print $1}' | xargs docker rm 14 | docker stop securitization 15 | docker rm securitization 16 | -------------------------------------------------------------------------------- /manifest.yml: -------------------------------------------------------------------------------- 1 | applications: 2 | - name: blockchain-securitization 3 | path: sc-ui 4 | timeout: 180 5 | #command: "npm start | npm install react-backend && PORT=3001 node react-backend/bin/www" 6 | #command: "npm start | PORT=3001 node react-backend/bin/www" 7 | command: PORT=3001 node react-backend/bin/www | NODE_ENV=production node_modules/.bin/webpack-dev-server 8 | #port: 8081 9 | memory: 512M 10 | engines: 11 | node: 8.14.1 12 | buildpack: https://github.com/cloudfoundry/nodejs-buildpack 13 | env: 14 | HOST: 0.0.0.0 15 | #- name: blockchain-securitization-backend-${random-word} 16 | -------------------------------------------------------------------------------- /readme-images/arch-flow-securitization.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/securitization_blockchain/12699070a8619593868b72a0197c65c7e1514917/readme-images/arch-flow-securitization.png -------------------------------------------------------------------------------- /sc-ui/.env.development.local: -------------------------------------------------------------------------------- 1 | # TODO, temporarily adding this to get around "Invalid Host Header" error 2 | DANGEROUSLY_DISABLE_HOST_CHECK=true 3 | -------------------------------------------------------------------------------- /sc-ui/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | 6 | # testing 7 | /coverage 8 | 9 | # production 10 | /build 11 | 12 | # misc 13 | .DS_Store 14 | .env.local 15 | .env.development.local 16 | .env.test.local 17 | .env.production.local 18 | 19 | npm-debug.log* 20 | yarn-debug.log* 21 | yarn-error.log* 22 | -------------------------------------------------------------------------------- /sc-ui/config/env.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const fs = require('fs'); 4 | const path = require('path'); 5 | const paths = require('./paths'); 6 | 7 | // Make sure that including paths.js after env.js will read .env variables. 8 | delete require.cache[require.resolve('./paths')]; 9 | 10 | const NODE_ENV = process.env.NODE_ENV; 11 | if (!NODE_ENV) { 12 | throw new Error( 13 | 'The NODE_ENV environment variable is required but was not specified.' 14 | ); 15 | } 16 | 17 | // https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use 18 | var dotenvFiles = [ 19 | `${paths.dotenv}.${NODE_ENV}.local`, 20 | `${paths.dotenv}.${NODE_ENV}`, 21 | // Don't include `.env.local` for `test` environment 22 | // since normally you expect tests to produce the same 23 | // results for everyone 24 | NODE_ENV !== 'test' && `${paths.dotenv}.local`, 25 | paths.dotenv, 26 | ].filter(Boolean); 27 | 28 | // Load environment variables from .env* files. Suppress warnings using silent 29 | // if this file is missing. dotenv will never modify any environment variables 30 | // that have already been set. Variable expansion is supported in .env files. 31 | // https://github.com/motdotla/dotenv 32 | // https://github.com/motdotla/dotenv-expand 33 | dotenvFiles.forEach(dotenvFile => { 34 | if (fs.existsSync(dotenvFile)) { 35 | require('dotenv-expand')( 36 | require('dotenv').config({ 37 | path: dotenvFile, 38 | }) 39 | ); 40 | } 41 | }); 42 | 43 | // We support resolving modules according to `NODE_PATH`. 44 | // This lets you use absolute paths in imports inside large monorepos: 45 | // https://github.com/facebookincubator/create-react-app/issues/253. 46 | // It works similar to `NODE_PATH` in Node itself: 47 | // https://nodejs.org/api/modules.html#modules_loading_from_the_global_folders 48 | // Note that unlike in Node, only *relative* paths from `NODE_PATH` are honored. 49 | // Otherwise, we risk importing Node.js core modules into an app instead of Webpack shims. 50 | // https://github.com/facebookincubator/create-react-app/issues/1023#issuecomment-265344421 51 | // We also resolve them to make sure all tools using them work consistently. 52 | const appDirectory = fs.realpathSync(process.cwd()); 53 | process.env.NODE_PATH = (process.env.NODE_PATH || '') 54 | .split(path.delimiter) 55 | .filter(folder => folder && !path.isAbsolute(folder)) 56 | .map(folder => path.resolve(appDirectory, folder)) 57 | .join(path.delimiter); 58 | 59 | // Grab NODE_ENV and REACT_APP_* environment variables and prepare them to be 60 | // injected into the application via DefinePlugin in Webpack configuration. 61 | const REACT_APP = /^REACT_APP_/i; 62 | 63 | function getClientEnvironment(publicUrl) { 64 | const raw = Object.keys(process.env) 65 | .filter(key => REACT_APP.test(key)) 66 | .reduce( 67 | (env, key) => { 68 | env[key] = process.env[key]; 69 | return env; 70 | }, 71 | { 72 | // Useful for determining whether we’re running in production mode. 73 | // Most importantly, it switches React into the correct mode. 74 | NODE_ENV: process.env.NODE_ENV || 'development', 75 | // Useful for resolving the correct path to static assets in `public`. 76 | // For example, . 77 | // This should only be used as an escape hatch. Normally you would put 78 | // images into the `src` and `import` them in code to get their paths. 79 | PUBLIC_URL: publicUrl, 80 | } 81 | ); 82 | // Stringify all values so we can feed into Webpack DefinePlugin 83 | const stringified = { 84 | 'process.env': Object.keys(raw).reduce((env, key) => { 85 | env[key] = JSON.stringify(raw[key]); 86 | return env; 87 | }, {}), 88 | }; 89 | 90 | return { raw, stringified }; 91 | } 92 | 93 | module.exports = getClientEnvironment; 94 | -------------------------------------------------------------------------------- /sc-ui/config/jest/cssTransform.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // This is a custom Jest transformer turning style imports into empty objects. 4 | // http://facebook.github.io/jest/docs/en/webpack.html 5 | 6 | module.exports = { 7 | process() { 8 | return 'module.exports = {};'; 9 | }, 10 | getCacheKey() { 11 | // The output is always the same. 12 | return 'cssTransform'; 13 | }, 14 | }; 15 | -------------------------------------------------------------------------------- /sc-ui/config/jest/fileTransform.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const path = require('path'); 4 | 5 | // This is a custom Jest transformer turning file imports into filenames. 6 | // http://facebook.github.io/jest/docs/en/webpack.html 7 | 8 | module.exports = { 9 | process(src, filename) { 10 | return `module.exports = ${JSON.stringify(path.basename(filename))};`; 11 | }, 12 | }; 13 | -------------------------------------------------------------------------------- /sc-ui/config/paths.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | const path = require('path'); 4 | const fs = require('fs'); 5 | const url = require('url'); 6 | 7 | // Make sure any symlinks in the project folder are resolved: 8 | // https://github.com/facebookincubator/create-react-app/issues/637 9 | const appDirectory = fs.realpathSync(process.cwd()); 10 | const resolveApp = relativePath => path.resolve(appDirectory, relativePath); 11 | 12 | const envPublicUrl = process.env.PUBLIC_URL; 13 | 14 | function ensureSlash(path, needsSlash) { 15 | const hasSlash = path.endsWith('/'); 16 | if (hasSlash && !needsSlash) { 17 | return path.substr(path, path.length - 1); 18 | } else if (!hasSlash && needsSlash) { 19 | return `${path}/`; 20 | } else { 21 | return path; 22 | } 23 | } 24 | 25 | const getPublicUrl = appPackageJson => 26 | envPublicUrl || require(appPackageJson).homepage; 27 | 28 | // We use `PUBLIC_URL` environment variable or "homepage" field to infer 29 | // "public path" at which the app is served. 30 | // Webpack needs to know it to put the right 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /sc-ui/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Securitization App", 3 | "name": "Create React App Sample", 4 | "start_url": "./index.html", 5 | "display": "standalone", 6 | "theme_color": "#000000", 7 | "background_color": "#ffffff" 8 | } 9 | -------------------------------------------------------------------------------- /sc-ui/react-backend/app.js: -------------------------------------------------------------------------------- 1 | var createError = require('http-errors'); 2 | var express = require('express'); 3 | var path = require('path'); 4 | var cookieParser = require('cookie-parser'); 5 | var logger = require('morgan'); 6 | 7 | var indexRouter = require('./routes/index'); 8 | var usersRouter = require('./routes/users'); 9 | 10 | var app = express(); 11 | var cors = require('cors') 12 | 13 | console.log("Backend Server Started.") 14 | app.use(cors({credentials: false, origin: true})) 15 | app.options('*', cors()) 16 | app.use(function(req, res, next) { 17 | if (req.method === 'OPTIONS') { 18 | console.log('!OPTIONS'); 19 | res.header("Access-Control-Allow-Origin", "*"); 20 | res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); 21 | res.header("Access-Control-Allow-Methods", "POST, GET, PUT, DELETE, OPTIONS") 22 | res.header("Access-Control-Allow-Credentials", "true") 23 | res.writeHead(200, headers); 24 | res.end(); 25 | } 26 | next(); 27 | }); 28 | 29 | // view engine setup 30 | app.set('views', path.join(__dirname, 'views')); 31 | app.set('view engine', 'jade'); 32 | 33 | app.use(logger('dev')); 34 | app.use(express.json()); 35 | app.use(express.urlencoded({ extended: false })); 36 | app.use(cookieParser()); 37 | app.use(express.static(path.join(__dirname, 'public'))); 38 | app.use('/', indexRouter); 39 | app.use('/users', usersRouter); 40 | 41 | // catch 404 and forward to error handler 42 | app.use(function(req, res, next) { 43 | next(createError(404)); 44 | }); 45 | 46 | // error handler 47 | app.use(function(err, req, res, next) { 48 | // set locals, only providing error in development 49 | res.locals.message = err.message; 50 | res.locals.error = req.app.get('env') === 'development' ? err : {}; 51 | 52 | // render the error page 53 | res.status(err.status || 500); 54 | res.render('error'); 55 | }); 56 | 57 | module.exports = app; 58 | -------------------------------------------------------------------------------- /sc-ui/react-backend/bin/www: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env node 2 | 3 | /** 4 | * Module dependencies. 5 | */ 6 | 7 | var app = require('../app'); 8 | var debug = require('debug')('react-backend:server'); 9 | var http = require('http'); 10 | 11 | /** 12 | * Get port from environment and store in Express. 13 | */ 14 | 15 | var port = normalizePort(process.env.PORT || '30000'); 16 | app.set('port', port); 17 | 18 | console.log("React Server Started") 19 | /** 20 | * Create HTTP server. 21 | */ 22 | 23 | var server = http.createServer(app); 24 | 25 | /** 26 | * Listen on provided port, on all network interfaces. 27 | */ 28 | 29 | server.listen(port); 30 | server.on('error', onError); 31 | server.on('listening', onListening); 32 | 33 | /** 34 | * Normalize a port into a number, string, or false. 35 | */ 36 | 37 | function normalizePort(val) { 38 | var port = parseInt(val, 10); 39 | 40 | if (isNaN(port)) { 41 | // named pipe 42 | return val; 43 | } 44 | 45 | if (port >= 0) { 46 | // port number 47 | return port; 48 | } 49 | 50 | return false; 51 | } 52 | 53 | /** 54 | * Event listener for HTTP server "error" event. 55 | */ 56 | 57 | function onError(error) { 58 | if (error.syscall !== 'listen') { 59 | throw error; 60 | } 61 | 62 | var bind = typeof port === 'string' 63 | ? 'Pipe ' + port 64 | : 'Port ' + port; 65 | 66 | // handle specific listen errors with friendly messages 67 | switch (error.code) { 68 | case 'EACCES': 69 | console.error(bind + ' requires elevated privileges'); 70 | process.exit(1); 71 | break; 72 | case 'EADDRINUSE': 73 | console.error(bind + ' is already in use'); 74 | process.exit(1); 75 | break; 76 | default: 77 | throw error; 78 | } 79 | } 80 | 81 | /** 82 | * Event listener for HTTP server "listening" event. 83 | */ 84 | 85 | function onListening() { 86 | var addr = server.address(); 87 | var bind = typeof addr === 'string' 88 | ? 'pipe ' + addr 89 | : 'port ' + addr.port; 90 | debug('Listening on ' + bind); 91 | } 92 | -------------------------------------------------------------------------------- /sc-ui/react-backend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react-backend", 3 | "version": "0.0.0", 4 | "private": true, 5 | "scripts": { 6 | "start": "node ./bin/www" 7 | }, 8 | "dependencies": { 9 | "cookie-parser": "~1.4.3", 10 | "debug": "~2.6.9", 11 | "express": "~4.16.0", 12 | "http-errors": "~1.6.2", 13 | "jade": "~1.11.0", 14 | "morgan": "~1.9.0", 15 | "underscore": "x.x.x", 16 | "fabric-ca-client": "1.2.0", 17 | "fabric-client": "1.2.0", 18 | "cors": "2.8.4", 19 | "grpc": "1.11.0", 20 | "nopt": "^4.0.1", 21 | "async": "2.6.1" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /sc-ui/react-backend/public/stylesheets/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 50px; 3 | font: 14px "Lucida Grande", Helvetica, Arial, sans-serif; 4 | } 5 | 6 | a { 7 | color: #00B7FF; 8 | } 9 | -------------------------------------------------------------------------------- /sc-ui/react-backend/routes/users.js: -------------------------------------------------------------------------------- 1 | var express = require('express'); 2 | var router = express.Router(); 3 | 4 | /* GET users listing. */ 5 | router.get('/', function(req, res, next) { 6 | res.send('respond with a resource'); 7 | }); 8 | 9 | module.exports = router; 10 | -------------------------------------------------------------------------------- /sc-ui/react-backend/views/error.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= message 5 | h2= error.status 6 | pre #{error.stack} 7 | -------------------------------------------------------------------------------- /sc-ui/react-backend/views/index.jade: -------------------------------------------------------------------------------- 1 | extends layout 2 | 3 | block content 4 | h1= title 5 | p Welcome to #{title} 6 | -------------------------------------------------------------------------------- /sc-ui/react-backend/views/layout.jade: -------------------------------------------------------------------------------- 1 | doctype html 2 | html 3 | head 4 | title= title 5 | link(rel='stylesheet', href='/stylesheets/style.css') 6 | body 7 | block content 8 | -------------------------------------------------------------------------------- /sc-ui/scripts/build.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Do this as the first thing so that any code reading it knows the right env. 4 | process.env.BABEL_ENV = 'production'; 5 | process.env.NODE_ENV = 'production'; 6 | 7 | // Makes the script crash on unhandled rejections instead of silently 8 | // ignoring them. In the future, promise rejections that are not handled will 9 | // terminate the Node.js process with a non-zero exit code. 10 | process.on('unhandledRejection', err => { 11 | throw err; 12 | }); 13 | 14 | // Ensure environment variables are read. 15 | require('../config/env'); 16 | 17 | const path = require('path'); 18 | const chalk = require('chalk'); 19 | const fs = require('fs-extra'); 20 | const webpack = require('webpack'); 21 | const config = require('../config/webpack.config.prod'); 22 | const paths = require('../config/paths'); 23 | const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles'); 24 | const formatWebpackMessages = require('react-dev-utils/formatWebpackMessages'); 25 | const printHostingInstructions = require('react-dev-utils/printHostingInstructions'); 26 | const FileSizeReporter = require('react-dev-utils/FileSizeReporter'); 27 | const printBuildError = require('react-dev-utils/printBuildError'); 28 | 29 | const measureFileSizesBeforeBuild = 30 | FileSizeReporter.measureFileSizesBeforeBuild; 31 | const printFileSizesAfterBuild = FileSizeReporter.printFileSizesAfterBuild; 32 | const useYarn = fs.existsSync(paths.yarnLockFile); 33 | 34 | // These sizes are pretty large. We'll warn for bundles exceeding them. 35 | const WARN_AFTER_BUNDLE_GZIP_SIZE = 512 * 1024; 36 | const WARN_AFTER_CHUNK_GZIP_SIZE = 1024 * 1024; 37 | 38 | // Warn and crash if required files are missing 39 | if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) { 40 | process.exit(1); 41 | } 42 | 43 | // First, read the current file sizes in build directory. 44 | // This lets us display how much they changed later. 45 | measureFileSizesBeforeBuild(paths.appBuild) 46 | .then(previousFileSizes => { 47 | // Remove all content but keep the directory so that 48 | // if you're in it, you don't end up in Trash 49 | fs.emptyDirSync(paths.appBuild); 50 | // Merge with the public folder 51 | copyPublicFolder(); 52 | // Start the webpack build 53 | return build(previousFileSizes); 54 | }) 55 | .then( 56 | ({ stats, previousFileSizes, warnings }) => { 57 | if (warnings.length) { 58 | console.log(chalk.yellow('Compiled with warnings.\n')); 59 | console.log(warnings.join('\n\n')); 60 | console.log( 61 | '\nSearch for the ' + 62 | chalk.underline(chalk.yellow('keywords')) + 63 | ' to learn more about each warning.' 64 | ); 65 | console.log( 66 | 'To ignore, add ' + 67 | chalk.cyan('// eslint-disable-next-line') + 68 | ' to the line before.\n' 69 | ); 70 | } else { 71 | console.log(chalk.green('Compiled successfully.\n')); 72 | } 73 | 74 | console.log('File sizes after gzip:\n'); 75 | printFileSizesAfterBuild( 76 | stats, 77 | previousFileSizes, 78 | paths.appBuild, 79 | WARN_AFTER_BUNDLE_GZIP_SIZE, 80 | WARN_AFTER_CHUNK_GZIP_SIZE 81 | ); 82 | console.log(); 83 | 84 | const appPackage = require(paths.appPackageJson); 85 | const publicUrl = paths.publicUrl; 86 | const publicPath = config.output.publicPath; 87 | const buildFolder = path.relative(process.cwd(), paths.appBuild); 88 | printHostingInstructions( 89 | appPackage, 90 | publicUrl, 91 | publicPath, 92 | buildFolder, 93 | useYarn 94 | ); 95 | }, 96 | err => { 97 | console.log(chalk.red('Failed to compile.\n')); 98 | printBuildError(err); 99 | process.exit(1); 100 | } 101 | ); 102 | 103 | // Create the production build and print the deployment instructions. 104 | function build(previousFileSizes) { 105 | console.log('Creating an optimized production build...'); 106 | 107 | let compiler = webpack(config); 108 | return new Promise((resolve, reject) => { 109 | compiler.run((err, stats) => { 110 | if (err) { 111 | return reject(err); 112 | } 113 | const messages = formatWebpackMessages(stats.toJson({}, true)); 114 | if (messages.errors.length) { 115 | // Only keep the first error. Others are often indicative 116 | // of the same problem, but confuse the reader with noise. 117 | if (messages.errors.length > 1) { 118 | messages.errors.length = 1; 119 | } 120 | return reject(new Error(messages.errors.join('\n\n'))); 121 | } 122 | if ( 123 | process.env.CI && 124 | (typeof process.env.CI !== 'string' || 125 | process.env.CI.toLowerCase() !== 'false') && 126 | messages.warnings.length 127 | ) { 128 | console.log( 129 | chalk.yellow( 130 | '\nTreating warnings as errors because process.env.CI = true.\n' + 131 | 'Most CI servers set it automatically.\n' 132 | ) 133 | ); 134 | return reject(new Error(messages.warnings.join('\n\n'))); 135 | } 136 | return resolve({ 137 | stats, 138 | previousFileSizes, 139 | warnings: messages.warnings, 140 | }); 141 | }); 142 | }); 143 | } 144 | 145 | function copyPublicFolder() { 146 | fs.copySync(paths.appPublic, paths.appBuild, { 147 | dereference: true, 148 | filter: file => file !== paths.appHtml, 149 | }); 150 | } 151 | -------------------------------------------------------------------------------- /sc-ui/scripts/start.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Do this as the first thing so that any code reading it knows the right env. 4 | process.env.BABEL_ENV = 'development'; 5 | process.env.NODE_ENV = 'development'; 6 | 7 | // Makes the script crash on unhandled rejections instead of silently 8 | // ignoring them. In the future, promise rejections that are not handled will 9 | // terminate the Node.js process with a non-zero exit code. 10 | process.on('unhandledRejection', err => { 11 | throw err; 12 | }); 13 | 14 | // Ensure environment variables are read. 15 | require('../config/env'); 16 | 17 | const fs = require('fs'); 18 | const chalk = require('chalk'); 19 | const webpack = require('webpack'); 20 | const WebpackDevServer = require('webpack-dev-server'); 21 | const clearConsole = require('react-dev-utils/clearConsole'); 22 | const checkRequiredFiles = require('react-dev-utils/checkRequiredFiles'); 23 | const { 24 | choosePort, 25 | createCompiler, 26 | prepareProxy, 27 | prepareUrls, 28 | } = require('react-dev-utils/WebpackDevServerUtils'); 29 | const openBrowser = require('react-dev-utils/openBrowser'); 30 | const paths = require('../config/paths'); 31 | const config = require('../config/webpack.config.dev'); 32 | const createDevServerConfig = require('../config/webpackDevServer.config'); 33 | 34 | const useYarn = fs.existsSync(paths.yarnLockFile); 35 | const isInteractive = process.stdout.isTTY; 36 | 37 | // Warn and crash if required files are missing 38 | if (!checkRequiredFiles([paths.appHtml, paths.appIndexJs])) { 39 | process.exit(1); 40 | } 41 | 42 | // Tools like Cloud9 rely on this. 43 | const DEFAULT_PORT = parseInt(process.env.PORT, 10) || 3000; 44 | const HOST = process.env.HOST || '0.0.0.0'; 45 | 46 | if (process.env.HOST) { 47 | console.log( 48 | chalk.cyan( 49 | `Attempting to bind to HOST environment variable: ${chalk.yellow( 50 | chalk.bold(process.env.HOST) 51 | )}` 52 | ) 53 | ); 54 | console.log( 55 | `If this was unintentional, check that you haven't mistakenly set it in your shell.` 56 | ); 57 | console.log(`Learn more here: ${chalk.yellow('http://bit.ly/2mwWSwH')}`); 58 | console.log(); 59 | } 60 | 61 | // We attempt to use the default port but if it is busy, we offer the user to 62 | // run on a different port. `choosePort()` Promise resolves to the next free port. 63 | choosePort(HOST, DEFAULT_PORT) 64 | .then(port => { 65 | if (port == null) { 66 | // We have not found a port. 67 | return; 68 | } 69 | const protocol = process.env.HTTPS === 'true' ? 'https' : 'http'; 70 | const appName = require(paths.appPackageJson).name; 71 | const urls = prepareUrls(protocol, HOST, port); 72 | // Create a webpack compiler that is configured with custom messages. 73 | const compiler = createCompiler(webpack, config, appName, urls, useYarn); 74 | // Load proxy config 75 | const proxySetting = require(paths.appPackageJson).proxy; 76 | const proxyConfig = prepareProxy(proxySetting, paths.appPublic); 77 | // Serve webpack assets generated by the compiler over a web sever. 78 | const serverConfig = createDevServerConfig( 79 | proxyConfig, 80 | urls.lanUrlForConfig 81 | ); 82 | const devServer = new WebpackDevServer(compiler, serverConfig); 83 | // Launch WebpackDevServer. 84 | devServer.listen(port, HOST, err => { 85 | if (err) { 86 | return console.log(err); 87 | } 88 | if (isInteractive) { 89 | clearConsole(); 90 | } 91 | console.log(chalk.cyan('Starting the development server...\n')); 92 | openBrowser(urls.localUrlForBrowser); 93 | }); 94 | 95 | ['SIGINT', 'SIGTERM'].forEach(function(sig) { 96 | process.on(sig, function() { 97 | devServer.close(); 98 | process.exit(); 99 | }); 100 | }); 101 | }) 102 | .catch(err => { 103 | if (err && err.message) { 104 | console.log(err.message); 105 | } 106 | process.exit(1); 107 | }); 108 | -------------------------------------------------------------------------------- /sc-ui/scripts/test.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | // Do this as the first thing so that any code reading it knows the right env. 4 | process.env.BABEL_ENV = 'test'; 5 | process.env.NODE_ENV = 'test'; 6 | process.env.PUBLIC_URL = ''; 7 | 8 | // Makes the script crash on unhandled rejections instead of silently 9 | // ignoring them. In the future, promise rejections that are not handled will 10 | // terminate the Node.js process with a non-zero exit code. 11 | process.on('unhandledRejection', err => { 12 | throw err; 13 | }); 14 | 15 | // Ensure environment variables are read. 16 | require('../config/env'); 17 | 18 | const jest = require('jest'); 19 | let argv = process.argv.slice(2); 20 | 21 | // Watch unless on CI or in coverage mode 22 | if (!process.env.CI && argv.indexOf('--coverage') < 0) { 23 | argv.push('--watch'); 24 | } 25 | 26 | 27 | jest.run(argv); 28 | -------------------------------------------------------------------------------- /sc-ui/src/App.css: -------------------------------------------------------------------------------- 1 | .App { 2 | text-align: center; 3 | } 4 | 5 | .App-logo { 6 | animation: App-logo-spin infinite 20s linear; 7 | height: 80px; 8 | } 9 | 10 | .App-header { 11 | background-color: #222; 12 | height: 150px; 13 | padding: 20px; 14 | color: white; 15 | } 16 | 17 | .App-title { 18 | font-size: 1.5em; 19 | } 20 | 21 | .App-intro { 22 | font-size: large; 23 | } 24 | 25 | @keyframes App-logo-spin { 26 | from { transform: rotate(0deg); } 27 | to { transform: rotate(360deg); } 28 | } 29 | -------------------------------------------------------------------------------- /sc-ui/src/App.test.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import App from './App'; 4 | 5 | it('renders without crashing', () => { 6 | const div = document.createElement('div'); 7 | ReactDOM.render(, div); 8 | ReactDOM.unmountComponentAtNode(div); 9 | }); 10 | -------------------------------------------------------------------------------- /sc-ui/src/components/forms/FormDialog.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Button from '@material-ui/core/Button'; 3 | import TextField from '@material-ui/core/TextField'; 4 | import Dialog from '@material-ui/core/Dialog'; 5 | import DialogActions from '@material-ui/core/DialogActions'; 6 | import DialogContent from '@material-ui/core/DialogContent'; 7 | import DialogContentText from '@material-ui/core/DialogContentText'; 8 | import DialogTitle from '@material-ui/core/DialogTitle'; 9 | 10 | export default class FormDialog extends React.Component { 11 | state = { 12 | open: false, 13 | }; 14 | 15 | handleClickOpen = () => { 16 | this.setState({ open: true }); 17 | }; 18 | 19 | handleClose = () => { 20 | this.setState({ open: false }); 21 | }; 22 | 23 | render() { 24 | return ( 25 |
26 | 27 | 32 | Subscribe 33 | 34 | 35 | To subscribe to this website, please enter your email address here. We will send 36 | updates occasionally. 37 | 38 | 46 | 47 | 48 | 51 | 54 | 55 | 56 |
57 | ); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /sc-ui/src/components/forms/buySecurityForm.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Button from '@material-ui/core/Button'; 3 | import TextField from '@material-ui/core/TextField'; 4 | import Dialog from '@material-ui/core/Dialog'; 5 | import DialogActions from '@material-ui/core/DialogActions'; 6 | import DialogContent from '@material-ui/core/DialogContent'; 7 | import DialogContentText from '@material-ui/core/DialogContentText'; 8 | import DialogTitle from '@material-ui/core/DialogTitle'; 9 | import refreshState from '../helpers/refreshState.js'; 10 | 11 | class BuySecurityForm extends React.Component { 12 | constructor(props) { 13 | super(props); 14 | this.state = { 15 | investor_id: '', 16 | security_id: '' 17 | }; 18 | this.handleIdChange = this.handleIdChange.bind(this); 19 | this.handlePaymentAmountChange = this.handlePaymentAmountChange.bind(this); 20 | 21 | this.handleSubmit = this.handleSubmit.bind(this); 22 | } 23 | 24 | handleIdChange(event) { 25 | console.log(event.target) 26 | this.setState({ 27 | asset_id: event.target.value 28 | }); 29 | } 30 | 31 | handlePaymentAmountChange(event) { 32 | console.log(event.target) 33 | this.setState({ 34 | paymentAmount: event.target.value 35 | }); 36 | } 37 | 38 | handleSubmit = () => { 39 | console.log('buying security: ' + JSON.stringify(this.state)); 40 | var config = { 41 | method: 'POST', 42 | headers: { 43 | 'Accept': 'application/json', 44 | 'Content-Type': 'application/json' 45 | }, 46 | body: JSON.stringify({ 47 | method: "invoke", 48 | params: { 49 | ctorMsg: { 50 | function: 'buy_security', 51 | args: [this.state.investor_id, this.state.security_id] 52 | } 53 | } 54 | }) 55 | } 56 | console.log(config.body) 57 | fetch(window.location.href.replace('30000', '30001') + 'api/chaincode', config).then( () => { 58 | refreshState(2) 59 | }) 60 | this.setState({ open: false }); 61 | } 62 | 63 | handleClickOpen = () => { 64 | this.setState({ open: true }); 65 | }; 66 | 67 | handleClose = () => { 68 | this.setState({ open: false }); 69 | }; 70 | 71 | handleChange = name => event => { 72 | this.setState({ 73 | [name]: event.target.value, 74 | }); 75 | }; 76 | 77 | render() { 78 | return ( 79 |
80 | 81 | 86 | Buy Security 87 | 88 | 96 | 104 | 105 | 106 | 109 | 112 | 113 | 114 |
115 | ); 116 | } 117 | } 118 | export default BuySecurityForm; 119 | -------------------------------------------------------------------------------- /sc-ui/src/components/forms/deleteObjectForm.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Button from '@material-ui/core/Button'; 3 | import TextField from '@material-ui/core/TextField'; 4 | import Dialog from '@material-ui/core/Dialog'; 5 | import DialogActions from '@material-ui/core/DialogActions'; 6 | import DialogContent from '@material-ui/core/DialogContent'; 7 | import DialogContentText from '@material-ui/core/DialogContentText'; 8 | import DialogTitle from '@material-ui/core/DialogTitle'; 9 | import InputAdornment from '@material-ui/core/InputAdornment'; 10 | 11 | 12 | class DeleteObjectForm extends React.Component { 13 | constructor(props) { 14 | super(props); 15 | this.state = { 16 | id: '' 17 | }; 18 | } 19 | handleSubmit = () => { 20 | console.log('deleting object id: ' + JSON.stringify(this.state)); 21 | let config = { 22 | method: 'POST', 23 | headers: { 24 | 'Accept': 'application/json', 25 | 'Content-Type': 'application/json' 26 | }, 27 | body: JSON.stringify({ 28 | method: "invoke", 29 | params: { 30 | ctorMsg: { 31 | function: 'delete', 32 | args: [this.state.id] 33 | } 34 | } 35 | }) 36 | } 37 | console.log(config.body) 38 | fetch(window.location.href.replace('30000', '30001') + 'api/chaincode', config) 39 | this.setState({ open: false }); 40 | } 41 | 42 | handleClickOpen = () => { 43 | this.setState({ open: true }); 44 | }; 45 | 46 | handleClose = () => { 47 | this.setState({ open: false }); 48 | }; 49 | 50 | handleChange = name => event => { 51 | this.setState({ 52 | [name]: event.target.value, 53 | }); 54 | }; 55 | 56 | render() { 57 | return ( 58 |
59 | 60 | 65 | Delete Object 66 | 67 | 76 | 77 | 78 | 81 | 84 | 85 | 86 |
87 | 88 | ); 89 | } 90 | } 91 | export default DeleteObjectForm; 92 | -------------------------------------------------------------------------------- /sc-ui/src/components/forms/fetchObjectForm.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import GenerateCards from "../helpers/genCards.jsx" 4 | 5 | class FetchObject extends React.Component { 6 | constructor(props) { 7 | super(props); 8 | this.state = { 9 | id: '' 10 | }; 11 | 12 | this.handleIdChange = this.handleIdChange.bind(this); 13 | this.handleSubmit = this.handleSubmit.bind(this); 14 | } 15 | 16 | handleIdChange(event) { 17 | console.log(event.target) 18 | this.setState({ 19 | id: event.target.value 20 | }); 21 | } 22 | 23 | handleSubmit(event) { 24 | console.log('Requesting object with id: ' + JSON.stringify(this.state)); 25 | let config = { 26 | method: 'POST', 27 | headers: { 28 | 'Accept': 'application/json', 29 | 'Content-Type': 'application/json' 30 | }, 31 | body: JSON.stringify({ 32 | method: "query", 33 | params: { 34 | ctorMsg: { 35 | function: 'read', 36 | args: Object.values(this.state) 37 | } 38 | } 39 | }) 40 | } 41 | 42 | fetch(window.location.href.replace('30000', '30001') + 'api/chaincode', config) 43 | .then(response => response.json()) 44 | .then((json) =>{ 45 | console.log(json) 46 | const element = GenerateCards(JSON.parse(json)) 47 | }).catch( (err) => { 48 | console.log("fetch failed") 49 | }); 50 | event.preventDefault(); 51 | } 52 | 53 | render() { 54 | return ( 55 |
56 | 60 | 61 | 62 |
63 | ); 64 | } 65 | } 66 | export default FetchObject; 67 | -------------------------------------------------------------------------------- /sc-ui/src/components/forms/initAssetForm.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Button from '@material-ui/core/Button'; 3 | import TextField from '@material-ui/core/TextField'; 4 | import Dialog from '@material-ui/core/Dialog'; 5 | import DialogActions from '@material-ui/core/DialogActions'; 6 | import DialogContent from '@material-ui/core/DialogContent'; 7 | import DialogContentText from '@material-ui/core/DialogContentText'; 8 | import DialogTitle from '@material-ui/core/DialogTitle'; 9 | import refreshState from '../helpers/refreshState.js' 10 | 11 | class InitAssetForm extends React.Component { 12 | constructor(props) { 13 | super(props); 14 | this.state = { 15 | id: '', 16 | interestrate: '', 17 | balance: '', 18 | remainingpayments: '' 19 | }; 20 | this.handleIdChange = this.handleIdChange.bind(this); 21 | this.handleInterestRateChange = this.handleInterestRateChange.bind(this); 22 | this.handleBalanceChange = this.handleBalanceChange.bind(this); 23 | this.handleUnderwritingChange = this.handleUnderwritingChange.bind(this); 24 | this.handleSubmit = this.handleSubmit.bind(this); 25 | } 26 | 27 | handleIdChange(event) { 28 | console.log(event.target) 29 | this.setState({ 30 | id: event.target.value 31 | }); 32 | } 33 | 34 | handleInterestRateChange(event) { 35 | console.log(event.target) 36 | this.setState({ 37 | interestrate: event.target.value 38 | }); 39 | } 40 | 41 | handleBalanceChange(event) { 42 | console.log(event.target) 43 | this.setState({ 44 | balance: event.target.value 45 | }); 46 | } 47 | 48 | handleUnderwritingChange(event) { 49 | this.setState({ 50 | underwriting: event.target.value 51 | }); 52 | } 53 | 54 | handleSubmit = () => { 55 | console.log('creating asset with id: ' + JSON.stringify(this.state)); 56 | var config = { 57 | method: 'POST', 58 | headers: { 59 | 'Accept': 'application/json', 60 | 'Content-Type': 'application/json' 61 | }, 62 | body: JSON.stringify({ 63 | method: "invoke", 64 | params: { 65 | ctorMsg: { 66 | function: "init_asset", 67 | args: [this.state.id, this.state.balance, String(parseFloat(this.state.interestrate) * 0.01) , this.state.remainingpayments] 68 | } 69 | } 70 | }) 71 | } 72 | console.log("initializing asset") 73 | console.log(Date.now()) 74 | fetch(window.location.href.replace('30000', '30001') + 'api/chaincode', config).then ( () => { 75 | refreshState(2) 76 | }) 77 | this.setState({ open: false }); 78 | } 79 | 80 | handleClickOpen = () => { 81 | this.setState({ open: true }); 82 | }; 83 | 84 | handleClose = () => { 85 | this.setState({ open: false }); 86 | }; 87 | 88 | handleChange = name => event => { 89 | this.setState({ 90 | [name]: event.target.value, 91 | }); 92 | }; 93 | 94 | render() { 95 | return ( 96 |
97 | 98 | 103 | Create Asset 104 | 105 | 114 | 123 | 132 | 141 | 142 | 143 | 146 | 149 | 150 | 151 |
152 | 153 | ); 154 | } 155 | } 156 | export default InitAssetForm; 157 | -------------------------------------------------------------------------------- /sc-ui/src/components/forms/initAssetPoolForm.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Button from '@material-ui/core/Button'; 3 | import TextField from '@material-ui/core/TextField'; 4 | import Dialog from '@material-ui/core/Dialog'; 5 | import DialogActions from '@material-ui/core/DialogActions'; 6 | import DialogContent from '@material-ui/core/DialogContent'; 7 | import DialogContentText from '@material-ui/core/DialogContentText'; 8 | import DialogTitle from '@material-ui/core/DialogTitle'; 9 | import refreshState from '../helpers/refreshState.js' 10 | 11 | class InitAssetPoolForm extends React.Component { 12 | constructor(props) { 13 | super(props); 14 | this.state = { 15 | id: '' 16 | }; 17 | this.handleIdChange = this.handleIdChange.bind(this); 18 | this.handleInterestRateChange = this.handleInterestRateChange.bind(this); 19 | this.handleBalanceChange = this.handleBalanceChange.bind(this); 20 | this.handleUnderwritingChange = this.handleUnderwritingChange.bind(this); 21 | 22 | this.handleSubmit = this.handleSubmit.bind(this); 23 | } 24 | 25 | handleIdChange(event) { 26 | console.log(event.target) 27 | this.setState({ 28 | id: event.target.value 29 | }); 30 | } 31 | 32 | handleInterestRateChange(event) { 33 | console.log(event.target) 34 | this.setState({ 35 | interestrate: event.target.value 36 | }); 37 | } 38 | 39 | handleBalanceChange(event) { 40 | console.log(event.target) 41 | this.setState({ 42 | balance: event.target.value 43 | }); 44 | } 45 | 46 | handleUnderwritingChange(event) { 47 | this.setState({ 48 | underwriting: event.target.value 49 | }); 50 | } 51 | 52 | handleSubmit = () => { 53 | console.log('creating asset pool with id: ' + JSON.stringify(this.state)); 54 | let config = { 55 | method: 'POST', 56 | headers: { 57 | 'Accept': 'application/json', 58 | 'Content-Type': 'application/json' 59 | }, 60 | body: JSON.stringify({ 61 | method: "invoke", 62 | params: { 63 | ctorMsg: { 64 | function: 'init_asset_pool', 65 | args: [this.state.id] 66 | } 67 | } 68 | }) 69 | } 70 | console.log(config.body) 71 | fetch(window.location.href.replace('30000', '30001') + 'api/chaincode', config).then( () => { 72 | refreshState(2) 73 | }) 74 | this.setState({ open: false }); 75 | } 76 | 77 | handleClickOpen = () => { 78 | this.setState({ open: true }); 79 | }; 80 | 81 | handleClose = () => { 82 | this.setState({ open: false }); 83 | }; 84 | 85 | handleChange = name => event => { 86 | this.setState({ 87 | [name]: event.target.value, 88 | }); 89 | }; 90 | 91 | render() { 92 | return ( 93 |
94 | 95 | 100 | Create New Asset Pool 101 | 102 | 110 | 111 | 112 | 115 | 118 | 119 | 120 |
121 | 122 | ); 123 | } 124 | } 125 | export default InitAssetPoolForm; 126 | -------------------------------------------------------------------------------- /sc-ui/src/components/forms/initHFClientForm.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom' 3 | import Button from '@material-ui/core/Button'; 4 | import TextField from '@material-ui/core/TextField'; 5 | import Dialog from '@material-ui/core/Dialog'; 6 | import DialogActions from '@material-ui/core/DialogActions'; 7 | import DialogContent from '@material-ui/core/DialogContent'; 8 | import DialogContentText from '@material-ui/core/DialogContentText'; 9 | import DialogTitle from '@material-ui/core/DialogTitle'; 10 | import Modal from '@material-ui/core/Modal'; 11 | import Typography from '@material-ui/core/Typography'; 12 | 13 | class InitHFCForm extends React.Component { 14 | constructor(props) { 15 | super(props); 16 | this.state = { 17 | api_endpoint: '', 18 | chaincode_id: '', 19 | chaincode_version: '', 20 | key: '', 21 | secret: '', 22 | network_id: '' 23 | }; 24 | 25 | this.handleIdChange = this.handleIdChange.bind(this); 26 | this.handleInterestRateChange = this.handleInterestRateChange.bind(this); 27 | this.handleBalanceChange = this.handleBalanceChange.bind(this); 28 | this.handleUnderwritingChange = this.handleUnderwritingChange.bind(this); 29 | 30 | this.handleSubmit = this.handleSubmit.bind(this); 31 | } 32 | 33 | handleIdChange(event) { 34 | console.log(event.target) 35 | this.setState({ 36 | id: event.target.value 37 | }); 38 | } 39 | 40 | handleInterestRateChange(event) { 41 | console.log(event.target) 42 | this.setState({ 43 | interestrate: event.target.value 44 | }); 45 | } 46 | 47 | handleBalanceChange(event) { 48 | console.log(event.target) 49 | this.setState({ 50 | balance: event.target.value 51 | }); 52 | } 53 | 54 | handleUnderwritingChange(event) { 55 | this.setState({ 56 | underwriting: event.target.value 57 | }); 58 | } 59 | 60 | handleSubmit = () => { 61 | console.log('creating hyperledger client: ' + JSON.stringify(this.state)); 62 | var config = { 63 | method: 'POST', 64 | headers: { 65 | 'Accept': 'application/json', 66 | 'Content-Type': 'application/json' 67 | }, 68 | body: JSON.stringify(this.state) 69 | } 70 | fetch(window.location.href.replace('30000', '30001') + 'api/init_hfc_client', config).then( (response) => { 71 | response.json().then( 72 | (body) => { 73 | console.log(body) 74 | } 75 | ) 76 | }) 77 | this.setState({ open: false }); 78 | } 79 | handleClickOpen = () => { 80 | this.setState({ open: true }); 81 | }; 82 | 83 | handleClose = () => { 84 | this.setState({ open: false }); 85 | }; 86 | 87 | handleChange = name => event => { 88 | this.setState({ 89 | [name]: event.target.value, 90 | }); 91 | }; 92 | 93 | handleClickShowPassword = () => { 94 | this.setState({ showPassword: !this.state.showPassword }); 95 | }; 96 | 97 | render() { 98 | return ( 99 |
100 | 101 | 106 | Provide Hyperledger Credentials 107 | 108 | 118 | 128 | 138 | 148 | 157 | 166 | 167 | 168 | 171 | 174 | 175 | 176 |
177 | 178 | ); 179 | } 180 | } 181 | export default InitHFCForm; 182 | -------------------------------------------------------------------------------- /sc-ui/src/components/forms/initInvestorForm.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Button from '@material-ui/core/Button'; 3 | import TextField from '@material-ui/core/TextField'; 4 | import Dialog from '@material-ui/core/Dialog'; 5 | import DialogActions from '@material-ui/core/DialogActions'; 6 | import DialogContent from '@material-ui/core/DialogContent'; 7 | import DialogContentText from '@material-ui/core/DialogContentText'; 8 | import DialogTitle from '@material-ui/core/DialogTitle'; 9 | import refreshState from '../helpers/refreshState.js' 10 | 11 | class InitInvestorForm extends React.Component { 12 | constructor(props) { 13 | super(props); 14 | this.state = { 15 | id: '' 16 | }; 17 | this.handleIdChange = this.handleIdChange.bind(this); 18 | this.handleInterestRateChange = this.handleInterestRateChange.bind(this); 19 | this.handleBalanceChange = this.handleBalanceChange.bind(this); 20 | this.handleUnderwritingChange = this.handleUnderwritingChange.bind(this); 21 | 22 | this.handleSubmit = this.handleSubmit.bind(this); 23 | } 24 | 25 | handleIdChange(event) { 26 | console.log(event.target) 27 | this.setState({ 28 | id: event.target.value 29 | }); 30 | } 31 | 32 | handleInterestRateChange(event) { 33 | console.log(event.target) 34 | this.setState({ 35 | interestrate: event.target.value 36 | }); 37 | } 38 | 39 | handleBalanceChange(event) { 40 | console.log(event.target) 41 | this.setState({ 42 | balance: event.target.value 43 | }); 44 | } 45 | 46 | handleUnderwritingChange(event) { 47 | this.setState({ 48 | underwriting: event.target.value 49 | }); 50 | } 51 | 52 | handleSubmit = () => { 53 | console.log('creating investor with id: ' + JSON.stringify(this.state)); 54 | let config = { 55 | method: 'POST', 56 | headers: { 57 | 'Accept': 'application/json', 58 | 'Content-Type': 'application/json' 59 | }, 60 | body: JSON.stringify({ 61 | method: "invoke", 62 | params: { 63 | ctorMsg: { 64 | function: 'init_investor', 65 | args: [this.state.id] 66 | } 67 | } 68 | }) 69 | } 70 | console.log(config.body) 71 | fetch(window.location.href.replace('30000', '30001') + 'api/chaincode', config) 72 | this.setState({ open: false }); 73 | } 74 | 75 | handleClickOpen = () => { 76 | this.setState({ open: true }); 77 | }; 78 | 79 | handleClose = () => { 80 | this.setState({ open: false }); 81 | }; 82 | 83 | handleChange = name => event => { 84 | this.setState({ 85 | [name]: event.target.value, 86 | }); 87 | }; 88 | 89 | render() { 90 | return ( 91 |
92 | 93 | 98 | Create New Investor 99 | 100 | 108 | 109 | 110 | 113 | 116 | 117 | 118 |
119 | 120 | ); 121 | } 122 | } 123 | export default InitInvestorForm; 124 | -------------------------------------------------------------------------------- /sc-ui/src/components/forms/initOriginatorForm.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Button from '@material-ui/core/Button'; 3 | import TextField from '@material-ui/core/TextField'; 4 | import Dialog from '@material-ui/core/Dialog'; 5 | import DialogActions from '@material-ui/core/DialogActions'; 6 | import DialogContent from '@material-ui/core/DialogContent'; 7 | import DialogContentText from '@material-ui/core/DialogContentText'; 8 | import DialogTitle from '@material-ui/core/DialogTitle'; 9 | import InputAdornment from '@material-ui/core/InputAdornment'; 10 | import refreshState from '../helpers/refreshState.js' 11 | 12 | 13 | class InitOriginatorForm extends React.Component { 14 | constructor(props) { 15 | super(props); 16 | this.state = { 17 | id: '', 18 | processingfee: '', 19 | company: '' 20 | }; 21 | } 22 | handleSubmit = () => { 23 | console.log('creating originator with id: ' + JSON.stringify(this.state)); 24 | let config = { 25 | method: 'POST', 26 | headers: { 27 | 'Accept': 'application/json', 28 | 'Content-Type': 'application/json' 29 | }, 30 | body: JSON.stringify({ 31 | method: "invoke", 32 | params: { 33 | ctorMsg: { 34 | function: 'init_originator', 35 | args: [this.state.id, this.state.company, String(parseFloat(this.state.processingfee) * 0.01)] 36 | } 37 | } 38 | }) 39 | } 40 | console.log(config.body) 41 | fetch(window.location.href.replace('30000', '30001') + 'api/chaincode', config).then( () => { 42 | refreshState() 43 | }) 44 | this.setState({ open: false }); 45 | } 46 | 47 | handleClickOpen = () => { 48 | this.setState({ open: true }); 49 | }; 50 | 51 | handleClose = () => { 52 | this.setState({ open: false }); 53 | }; 54 | 55 | handleChange = name => event => { 56 | this.setState({ 57 | [name]: event.target.value, 58 | }); 59 | }; 60 | 61 | render() { 62 | return ( 63 |
64 | 65 | 70 | Create New Originator 71 | 72 | 81 | 90 | 98 | 99 | 100 | 103 | 106 | 107 | 108 |
109 | 110 | ); 111 | } 112 | } 113 | export default InitOriginatorForm; 114 | -------------------------------------------------------------------------------- /sc-ui/src/components/forms/initSecurityForm.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Button from '@material-ui/core/Button'; 3 | import TextField from '@material-ui/core/TextField'; 4 | import Dialog from '@material-ui/core/Dialog'; 5 | import DialogActions from '@material-ui/core/DialogActions'; 6 | import DialogContent from '@material-ui/core/DialogContent'; 7 | import DialogContentText from '@material-ui/core/DialogContentText'; 8 | import DialogTitle from '@material-ui/core/DialogTitle'; 9 | import refreshState from '../helpers/refreshState.js' 10 | 11 | 12 | class InitSecurityForm extends React.Component { 13 | constructor(props) { 14 | super(props); 15 | this.state = { 16 | id: '', 17 | rating: '', 18 | couponrate: '', 19 | value: '', 20 | monthsuntilmaturity: '', 21 | maturity: '', 22 | pool: '', 23 | investor: '' 24 | }; 25 | 26 | this.handleIdChange = this.handleIdChange.bind(this); 27 | this.handleInterestRateChange = this.handleInterestRateChange.bind(this); 28 | this.handleBalanceChange = this.handleBalanceChange.bind(this); 29 | this.handleUnderwritingChange = this.handleUnderwritingChange.bind(this); 30 | 31 | this.handleSubmit = this.handleSubmit.bind(this); 32 | } 33 | 34 | handleIdChange(event) { 35 | console.log(event.target) 36 | this.setState({ 37 | id: event.target.value 38 | }); 39 | } 40 | 41 | handleInterestRateChange(event) { 42 | console.log(event.target) 43 | this.setState({ 44 | interestrate: event.target.value 45 | }); 46 | } 47 | 48 | handleBalanceChange(event) { 49 | console.log(event.target) 50 | this.setState({ 51 | balance: event.target.value 52 | }); 53 | } 54 | 55 | handleUnderwritingChange(event) { 56 | this.setState({ 57 | underwriting: event.target.value 58 | }); 59 | } 60 | 61 | handleSubmit = () => { 62 | console.log('creating security with id: ' + JSON.stringify(this.state)); 63 | let config = { 64 | method: 'POST', 65 | headers: { 66 | 'Accept': 'application/json', 67 | 'Content-Type': 'application/json' 68 | }, 69 | body: JSON.stringify({ 70 | method: "invoke", 71 | params: { 72 | ctorMsg: { 73 | function: 'init_security', 74 | args: [ this.state.id, String(parseFloat(this.state.couponrate) * 0.01), this.state.pool, this.state.monthsuntilmaturity] 75 | } 76 | } 77 | }) 78 | } 79 | console.log(config.body) 80 | fetch(window.location.href.replace('30000', '30001') + 'api/chaincode', config).then( () => { 81 | refreshState(2) 82 | }) 83 | this.setState({ open: false }); 84 | } 85 | 86 | handleClickOpen = () => { 87 | this.setState({ open: true }); 88 | }; 89 | 90 | handleClose = () => { 91 | this.setState({ open: false }); 92 | }; 93 | 94 | handleChange = name => event => { 95 | this.setState({ 96 | [name]: event.target.value, 97 | }); 98 | }; 99 | 100 | render() { 101 | return ( 102 |
103 | 104 | 109 | Create Security 110 | 111 | 119 | 127 | 135 | 143 | 144 | 145 | 148 | 151 | 152 | 153 |
154 | ); 155 | } 156 | } 157 | export default InitSecurityForm; 158 | -------------------------------------------------------------------------------- /sc-ui/src/components/forms/poolAssetForm.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Button from '@material-ui/core/Button'; 3 | import TextField from '@material-ui/core/TextField'; 4 | import Dialog from '@material-ui/core/Dialog'; 5 | import DialogActions from '@material-ui/core/DialogActions'; 6 | import DialogContent from '@material-ui/core/DialogContent'; 7 | import DialogContentText from '@material-ui/core/DialogContentText'; 8 | import DialogTitle from '@material-ui/core/DialogTitle'; 9 | import refreshState from '../helpers/refreshState.js' 10 | 11 | class PoolAsset extends React.Component { 12 | constructor(props) { 13 | super(props); 14 | this.state = { 15 | assetId: '', 16 | poolId: '' 17 | }; 18 | 19 | this.handlePoolIdChange = this.handlePoolIdChange.bind(this); 20 | this.handleAssetIdChange = this.handleAssetIdChange.bind(this); 21 | 22 | this.handleSubmit = this.handleSubmit.bind(this); 23 | } 24 | 25 | handlePoolIdChange(event) { 26 | console.log(event.target) 27 | this.setState({ 28 | poolId: event.target.value 29 | }); 30 | } 31 | 32 | handleAssetIdChange(event) { 33 | console.log(event.target) 34 | this.setState({ 35 | securityId: event.target.value 36 | }); 37 | } 38 | 39 | handleSubmit = () => { 40 | let config = { 41 | mode: "cors", 42 | method: 'POST', 43 | headers: { 44 | 'Accept': 'application/json', 45 | 'Content-Type': 'application/json' 46 | }, 47 | body: JSON.stringify({ 48 | method: "invoke", 49 | params: { 50 | ctorMsg: { 51 | function: 'pool_asset', 52 | args: Object.values(this.state) 53 | } 54 | } 55 | }) 56 | } 57 | console.log('transferring asset to pool: ') 58 | fetch(window.location.href.replace('30000', '30001') + 'api/chaincode', config).then ( () => { 59 | console.log("submitted request to pool asset") 60 | console.log("getting values of pool") 61 | { 62 | var config_value = { 63 | method: 'POST', 64 | headers: { 65 | 'Accept': 'application/json', 66 | 'Content-Type': 'application/json' 67 | }, 68 | body: JSON.stringify({ 69 | method: "invoke", 70 | params: { 71 | ctorMsg: { 72 | function: 'value_asset_pool', 73 | args: [this.state.assetId] 74 | } 75 | } 76 | }) 77 | } 78 | console.log(Date.now()) 79 | console.log("value pool") 80 | fetch(window.location.href.replace('30000', '30001') + 'api/chaincode', config_value).then( () => { 81 | console.log("getting values of pool") 82 | refreshState(3) 83 | }) 84 | } 85 | }).catch( 86 | console.log("pool asset request failed") 87 | ) 88 | } 89 | 90 | render() { 91 | return ( 92 |
93 | 97 | 101 | 102 | 103 |
104 | ); 105 | } 106 | } 107 | export default PoolAsset; 108 | -------------------------------------------------------------------------------- /sc-ui/src/components/forms/processPaymentForm.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Button from '@material-ui/core/Button'; 3 | import TextField from '@material-ui/core/TextField'; 4 | import Dialog from '@material-ui/core/Dialog'; 5 | import DialogActions from '@material-ui/core/DialogActions'; 6 | import DialogContent from '@material-ui/core/DialogContent'; 7 | import DialogContentText from '@material-ui/core/DialogContentText'; 8 | import DialogTitle from '@material-ui/core/DialogTitle'; 9 | import refreshState from '../helpers/refreshState.js'; 10 | 11 | class ProcessPaymentForm extends React.Component { 12 | constructor(props) { 13 | super(props); 14 | this.state = { 15 | asset_id: '', 16 | paymentamount: '' 17 | }; 18 | this.handleIdChange = this.handleIdChange.bind(this); 19 | this.handlePaymentAmountChange = this.handlePaymentAmountChange.bind(this); 20 | this.handleSubmit = this.handleSubmit.bind(this); 21 | } 22 | 23 | 24 | handleIdChange(event) { 25 | console.log(event.target) 26 | this.setState({ 27 | asset_id: event.target.value 28 | }); 29 | } 30 | 31 | handlePaymentAmountChange(event) { 32 | console.log(event.target) 33 | this.setState({ 34 | paymentAmount: event.target.value 35 | }); 36 | } 37 | 38 | handleSubmit = () => { 39 | this.setState({ open: false }); 40 | var asset_id = this.state.id 41 | console.log('processing payment for asset: ' + JSON.stringify(this.state)); 42 | let config = { 43 | method: 'POST', 44 | headers: { 45 | 'Accept': 'application/json', 46 | 'Content-Type': 'application/json' 47 | }, 48 | body: JSON.stringify({ 49 | method: "invoke", 50 | params: { 51 | ctorMsg: { 52 | function: 'process_payment', 53 | args: [this.state.id, this.state.paymentamount] 54 | } 55 | } 56 | }) 57 | } 58 | console.log(config.body) 59 | fetch(window.location.href.replace('30000', '30001') + 'api/chaincode', config).then ( () => { 60 | refreshState(1) 61 | setTimeout( () => { 62 | { 63 | var config_value = { 64 | method: 'POST', 65 | headers: { 66 | 'Accept': 'application/json', 67 | 'Content-Type': 'application/json' 68 | //"Authorization": "Basic " + new Buffer(key + ":" + secret, "utf8").toString("base64") 69 | }, 70 | body: JSON.stringify({ 71 | method: "invoke", 72 | params: { 73 | ctorMsg: { 74 | function: 'value_asset_pool', 75 | // args: [this.state.id, this.state.balance, this.state.interestrate, this.state.monthlypayment, this.state.underwriting] 76 | args: [asset_id] 77 | //args: Object.values(this.state) 78 | } 79 | } 80 | }) 81 | } 82 | console.log(Date.now()) 83 | console.log("value body") 84 | console.log(config_value) 85 | fetch(window.location.href.replace('30000', '30001') + 'api/chaincode', config_value).then( () => { 86 | refreshState(2) 87 | }) 88 | } 89 | }, 3000) 90 | }) 91 | 92 | 93 | // event.preventDefault(); 94 | } 95 | 96 | handleClickOpen = () => { 97 | this.setState({ open: true }); 98 | }; 99 | 100 | handleClose = () => { 101 | this.setState({ open: false }); 102 | }; 103 | 104 | handleChange = name => event => { 105 | this.setState({ 106 | [name]: event.target.value, 107 | }); 108 | }; 109 | 110 | render() { 111 | return ( 112 |
113 | 114 | 119 | Process Payment 120 | 121 | 129 | 137 | 138 | 139 | 142 | 145 | 146 | 147 |
148 | ); 149 | } 150 | } 151 | export default ProcessPaymentForm; 152 | -------------------------------------------------------------------------------- /sc-ui/src/components/forms/sellSecurityForm.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import Button from '@material-ui/core/Button'; 3 | import TextField from '@material-ui/core/TextField'; 4 | import Dialog from '@material-ui/core/Dialog'; 5 | import DialogActions from '@material-ui/core/DialogActions'; 6 | import DialogContent from '@material-ui/core/DialogContent'; 7 | import DialogContentText from '@material-ui/core/DialogContentText'; 8 | import DialogTitle from '@material-ui/core/DialogTitle'; 9 | import refreshState from '../helpers/refreshState.js'; 10 | 11 | class BuySecurityForm extends React.Component { 12 | constructor(props) { 13 | super(props); 14 | this.state = { 15 | investor_id: '', 16 | security_id: '' 17 | }; 18 | this.handleIdChange = this.handleIdChange.bind(this); 19 | this.handlePaymentAmountChange = this.handlePaymentAmountChange.bind(this); 20 | 21 | this.handleSubmit = this.handleSubmit.bind(this); 22 | } 23 | handleIdChange(event) { 24 | console.log(event.target) 25 | this.setState({ 26 | asset_id: event.target.value 27 | }); 28 | } 29 | 30 | handlePaymentAmountChange(event) { 31 | console.log(event.target) 32 | this.setState({ 33 | paymentAmount: event.target.value 34 | }); 35 | } 36 | 37 | handleSubmit = () => { 38 | console.log('buying security: ' + JSON.stringify(this.state)); 39 | var config = { 40 | method: 'POST', 41 | headers: { 42 | 'Accept': 'application/json', 43 | 'Content-Type': 'application/json' 44 | }, 45 | body: JSON.stringify({ 46 | method: "invoke", 47 | params: { 48 | ctorMsg: { 49 | function: 'sell_security', 50 | args: [this.state.investor_id, this.state.security_id] 51 | } 52 | } 53 | }) 54 | } 55 | console.log(config.body) 56 | fetch(window.location.href.replace('30000', '30001') + 'api/chaincode', config).then( () => { 57 | refreshState() 58 | }) 59 | this.setState({ open: false }); 60 | } 61 | 62 | handleClickOpen = () => { 63 | this.setState({ open: true }); 64 | }; 65 | 66 | handleClose = () => { 67 | this.setState({ open: false }); 68 | refreshState() 69 | }; 70 | 71 | handleChange = name => event => { 72 | this.setState({ 73 | [name]: event.target.value, 74 | }); 75 | }; 76 | 77 | render() { 78 | return ( 79 |
80 | 81 | 86 | Sell Security 87 | 88 | 96 | 104 | 105 | 106 | 109 | 112 | 113 | 114 |
115 | ); 116 | } 117 | } 118 | export default BuySecurityForm; 119 | -------------------------------------------------------------------------------- /sc-ui/src/components/forms/setOriginatorForm.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import refreshState from '../helpers/refreshState.js' 3 | 4 | class SetOriginatorForm extends React.Component { 5 | constructor(props) { 6 | super(props); 7 | this.state = { 8 | assetId: '', 9 | originatorId: '' 10 | }; 11 | 12 | this.handleOriginatorIdChange = this.handleOriginatorIdChange.bind(this); 13 | this.handleAssetIdChange = this.handleAssetIdChange.bind(this); 14 | 15 | this.handleSubmit = this.handleSubmit.bind(this); 16 | } 17 | 18 | handleOriginatorIdChange(event) { 19 | console.log(event.target) 20 | this.setState({ 21 | investorId: event.target.value 22 | }); 23 | } 24 | 25 | handleAssetIdChange(event) { 26 | console.log(event.target) 27 | this.setState({ 28 | securityId: event.target.value 29 | }); 30 | } 31 | 32 | handleSubmit(event) { 33 | console.log('setting originator: ' + JSON.stringify(this.state)); 34 | let config = { 35 | method: 'POST', 36 | headers: { 37 | 'Accept': 'application/json', 38 | 'Content-Type': 'application/json' 39 | }, 40 | body: JSON.stringify({ 41 | method: "invoke", 42 | params: { 43 | ctorMsg: { 44 | function: 'set_originator', 45 | args: Object.values(this.state) 46 | } 47 | } 48 | }) 49 | } 50 | console.log(config.body) 51 | fetch(window.location.href.replace('30000', '30001') + 'api/chaincode', config).then( () => { 52 | refreshState(2) 53 | }) 54 | 55 | event.preventDefault(); 56 | } 57 | 58 | render() { 59 | return ( 60 |
61 | 65 | 69 | 70 | 71 |
72 | ); 73 | } 74 | } 75 | export default SetOriginatorForm; 76 | -------------------------------------------------------------------------------- /sc-ui/src/components/helpers/Tab.js: -------------------------------------------------------------------------------- 1 | // https://medium.com/@diegocasmo/a-simple-react-tabs-component-47cac2cfbb5 2 | export const Tab = (props) => { 3 | return ( 4 |
  • 5 | { 7 | event.preventDefault(); 8 | props.onClick(props.tabIndex); 9 | }}> 10 | 11 | 12 |
  • 13 | ) 14 | } 15 | -------------------------------------------------------------------------------- /sc-ui/src/components/helpers/Tabs.js: -------------------------------------------------------------------------------- 1 | // https://medium.com/@diegocasmo/a-simple-react-tabs-component-47cac2cfbb5 2 | export class Tabs extends Component { 3 | 4 | constructor(props, context) { 5 | super(props, context); 6 | this.state = { 7 | activeTabIndex: this.props.defaultActiveTabIndex 8 | }; 9 | this.handleTabClick = this.handleTabClick.bind(this); 10 | } 11 | 12 | // Toggle currently active tab 13 | handleTabClick(tabIndex) { 14 | this.setState({ 15 | activeTabIndex: tabIndex === this.state.activeTabIndex ? this.props.defaultActiveTabIndex : tabIndex 16 | }); 17 | } 18 | 19 | // Encapsulate component API as props for children 20 | renderChildrenWithTabsApiAsProps() { 21 | return React.Children.map(this.props.children, (child, index) => { 22 | return React.cloneElement(child, { 23 | onClick : this.handleTabClick, 24 | tabIndex: index, 25 | isActive: index === this.state.activeTabIndex 26 | }); 27 | }); 28 | } 29 | 30 | // Render current active tab content 31 | renderActiveTabContent() { 32 | const {children} = this.props; 33 | const {activeTabIndex} = this.state; 34 | if(children[activeTabIndex]) { 35 | return children[activeTabIndex].props.children; 36 | } 37 | } 38 | 39 | render() { 40 | return ( 41 |
    42 |
      43 | {this.renderChildrenWithTabsApiAsProps()} 44 |
    45 |
    46 | {this.renderActiveTabContent()} 47 |
    48 |
    49 | ); 50 | } 51 | }; 52 | -------------------------------------------------------------------------------- /sc-ui/src/components/helpers/genCards.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import Typography from '@material-ui/core/Typography'; 4 | 5 | import Card from '@material-ui/core/Card' 6 | import CardActions from '@material-ui/core/CardActions'; 7 | import CardContent from '@material-ui/core/CardContent'; 8 | 9 | import Button from '@material-ui/core/Button'; 10 | 11 | const cardStyle = { 12 | display: 'block', 13 | width: '30vw', 14 | transitionDuration: '0.3s', 15 | height: '30vw' 16 | } 17 | 18 | const GenerateCards = (props) => { 19 | console.log("in generate cards") 20 | console.log(props) 21 | console.log(props.id) 22 | console.log(props.balance) 23 | return ( 24 | 25 | 26 | 27 | Asset 28 | 29 | 30 | 31 | 32 | ID: {props.id} 33 | 34 | 35 | Balance: {props.balance}
    36 | {'InterestRate: 3.0%'} 37 |
    38 |
    39 | 40 | 41 | 42 | 43 | 44 |
    45 | 46 | ); 47 | } 48 | export default GenerateCards; 49 | -------------------------------------------------------------------------------- /sc-ui/src/components/helpers/refreshState.js: -------------------------------------------------------------------------------- 1 | function refreshState(seconds) { 2 | let config = { 3 | method: 'POST', 4 | headers: { 5 | 'Accept': 'application/json', 6 | 'Content-Type': 'application/json' 7 | }, 8 | body: JSON.stringify({ 9 | method: "query", 10 | params: { 11 | ctorMsg: { 12 | function: 'read_everything', 13 | args: [] 14 | } 15 | } 16 | }) 17 | } 18 | // TODO, what's the best way to do this? don't want to query for state too often. look into "setEvent" blockchain method 19 | var ms = 1000 + (1000 * seconds) 20 | var objects = localStorage.getItem('objects') 21 | setTimeout( () => { 22 | fetch(window.location.href.replace('30000', '30001') + 'api/chaincode', config) 23 | .then(response => response.json()) 24 | .then((json) =>{ 25 | console.log("in refreshState helper") 26 | var stateObjects = JSON.parse(json) 27 | console.log(stateObjects) 28 | // TODO, use react "set state" properly 29 | // this.setState({"objects": JSON.parse(json)}) 30 | localStorage.setItem('objects', json) 31 | return JSON.parse(json) 32 | }).catch( (err) => { 33 | console.log("fetch failed") 34 | }); 35 | }, ms) 36 | 37 | } 38 | 39 | export default refreshState; 40 | -------------------------------------------------------------------------------- /sc-ui/src/components/modal.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IBM/securitization_blockchain/12699070a8619593868b72a0197c65c7e1514917/sc-ui/src/components/modal.js -------------------------------------------------------------------------------- /sc-ui/src/components/tables/SimpleAssetTable.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { withStyles } from '@material-ui/core/styles'; 4 | import Table from '@material-ui/core/Table'; 5 | import TableBody from '@material-ui/core/TableBody'; 6 | import TableCell from '@material-ui/core/TableCell'; 7 | import TableHead from '@material-ui/core/TableHead'; 8 | import TableRow from '@material-ui/core/TableRow'; 9 | import Paper from '@material-ui/core/Paper'; 10 | import Button from '@material-ui/core/Button'; 11 | // import Modal from '@material-ui/core/Modal'; 12 | import Modal from '../modal.js'; 13 | import FormDialog from '../forms/FormDialog.js' 14 | import InitAssetForm from '../forms/initAssetForm.jsx' 15 | import TransferAssetForm from '../forms/transferAssetForm.jsx' 16 | import ProcessPaymentForm from '../forms/processPaymentForm.jsx' 17 | 18 | 19 | const styles = theme => ({ 20 | root: { 21 | width: '100%', 22 | marginTop: theme.spacing.unit * 3, 23 | overflowX: 'auto', 24 | }, 25 | table: { 26 | minWidth: 700, 27 | }, 28 | }); 29 | 30 | let id = 0; 31 | function createData( id, balance, interest, state, remainingpayments, originator, pool, payoffamount ) { 32 | return { id, balance, interest, state, remainingpayments, originator, pool, payoffamount }; 33 | } 34 | 35 | function generateData() { 36 | console.log("localStorage.getItem('objects')") 37 | console.log(localStorage.getItem('objects')) 38 | var data = [] 39 | try { 40 | if ( (localStorage.getItem('objects')) && (localStorage.getItem('objects') != "undefined") && JSON.parse(localStorage.getItem('objects')) && JSON.parse(localStorage.getItem('objects')).assets ) { 41 | var assets = JSON.parse(localStorage.getItem('objects')).assets 42 | } else { 43 | throw "no assets found" 44 | } 45 | } catch(err) { 46 | console.log("Setting 'assets' var to an empty array") 47 | var assets = [] 48 | } 49 | console.log(assets) 50 | if (assets.length == 0) { 51 | return data 52 | } 53 | for (var idx in assets) { 54 | data.push( 55 | createData( 56 | assets[idx].id, assets[idx].balance, assets[idx].interest, assets[idx].state, assets[idx].remainingpayments, assets[idx].originator, assets[idx].pool, assets[idx].payoffamount 57 | ) 58 | ) 59 | if (idx == (assets.length - 1)) { 60 | console.log("data") 61 | console.log(data) 62 | return data 63 | } 64 | } 65 | } 66 | var data = generateData() 67 | 68 | function SimpleAssetTable(props) { 69 | const { classes } = props; 70 | const data = generateData() 71 | return ( 72 | 73 | 74 | 75 | 76 | Asset ID 77 | Balance 78 | Interest Rate 79 | State 80 | Originator 81 | Pool 82 | Payments until Amortization 83 | Expected Amortization Amount 84 | 85 | 86 | 87 | { data.length > 0 ? 88 | data.map(n => { 89 | return ( 90 | 91 | {n.id} 92 | $ {n.balance} 93 | { (n.interest * 100).toFixed(2)}% 94 | {n.state} 95 | {n.originator} 96 | {n.pool} 97 | {n.remainingpayments} 98 | $ {n.payoffamount} 99 | 100 | ); 101 | }) : null} 102 | 103 |
    104 | 105 | 106 | 107 |
    108 | 109 | ); 110 | } 111 | 112 | SimpleAssetTable.propTypes = { 113 | classes: PropTypes.object.isRequired, 114 | }; 115 | 116 | export default withStyles(styles)(SimpleAssetTable); 117 | -------------------------------------------------------------------------------- /sc-ui/src/components/tables/SimpleInvestorTable.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { withStyles } from '@material-ui/core/styles'; 4 | import Table from '@material-ui/core/Table'; 5 | import TableBody from '@material-ui/core/TableBody'; 6 | import TableCell from '@material-ui/core/TableCell'; 7 | import TableHead from '@material-ui/core/TableHead'; 8 | import TableRow from '@material-ui/core/TableRow'; 9 | import Paper from '@material-ui/core/Paper'; 10 | import Button from '@material-ui/core/Button'; 11 | // import Modal from '@material-ui/core/Modal'; 12 | import Modal from '../modal.js'; 13 | import FormDialog from '../forms/FormDialog.js' 14 | import InitInvestorForm from '../forms/initInvestorForm.jsx' 15 | import BuySecurityForm from '../forms/buySecurityForm.jsx' 16 | import SellSecurityForm from '../forms/sellSecurityForm.jsx' 17 | import TransferAssetForm from '../forms/transferAssetForm.jsx' 18 | import ProcessPaymentForm from '../forms/processPaymentForm.jsx' 19 | 20 | 21 | const styles = theme => ({ 22 | root: { 23 | width: '100%', 24 | marginTop: theme.spacing.unit * 3, 25 | overflowX: 'auto', 26 | }, 27 | table: { 28 | minWidth: 700, 29 | }, 30 | }); 31 | 32 | let id = 0; 33 | function createData( id, balance, securities ) { 34 | return { id, balance, securities }; 35 | } 36 | 37 | function generateData() { 38 | 39 | try { 40 | if ((localStorage.getItem('objects') != "undefined") && JSON.parse(localStorage.getItem('objects')) && JSON.parse(localStorage.getItem('objects')).investors) { 41 | var investors = JSON.parse(localStorage.getItem('objects')).investors 42 | } else { 43 | throw "no investors found" 44 | } 45 | } catch (err) { 46 | var investors = [] 47 | console.log(err) 48 | } 49 | 50 | console.log("investors") 51 | console.log(investors) 52 | var data = [] 53 | if (!investors || investors.length == 0) { 54 | return data 55 | } 56 | for (var idx in investors) { 57 | data.push( 58 | createData( 59 | investors[idx].id, investors[idx].balance, investors[idx].securities 60 | ) 61 | ) 62 | if (idx == (investors.length -1)) { 63 | return data 64 | } 65 | } 66 | } 67 | var data = generateData() 68 | 69 | function SimpleInvestorTable(props) { 70 | const { classes } = props; 71 | const data = generateData() 72 | return ( 73 | 74 | 75 | 76 | 77 | Investor ID 78 | Balance 79 | Securities 80 | 81 | 82 | 83 | {data.map(n => { 84 | return ( 85 | 86 | {n.id} 87 | ${n.balance.toFixed(2)} 88 | { n.securities ? n.securities.join(', ') : '' } 89 | 90 | ); 91 | })} 92 | 93 |
    94 | 95 | 96 | 97 |
    98 | 99 | ); 100 | } 101 | 102 | SimpleInvestorTable.propTypes = { 103 | classes: PropTypes.object.isRequired, 104 | }; 105 | 106 | export default withStyles(styles)(SimpleInvestorTable); 107 | -------------------------------------------------------------------------------- /sc-ui/src/components/tables/SimpleOriginatorTable.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { withStyles } from '@material-ui/core/styles'; 4 | import Table from '@material-ui/core/Table'; 5 | import TableBody from '@material-ui/core/TableBody'; 6 | import TableCell from '@material-ui/core/TableCell'; 7 | import TableHead from '@material-ui/core/TableHead'; 8 | import TableRow from '@material-ui/core/TableRow'; 9 | import Paper from '@material-ui/core/Paper'; 10 | import Button from '@material-ui/core/Button'; 11 | // import Modal from '@material-ui/core/Modal'; 12 | import Modal from '../modal.js'; 13 | import FormDialog from '../forms/FormDialog.js' 14 | import InitAssetPoolForm from '../forms/initAssetPoolForm.jsx' 15 | import InitOriginatorForm from '../forms/initOriginatorForm.jsx' 16 | import ProcessPaymentForm from '../forms/processPaymentForm.jsx' 17 | 18 | const styles = theme => ({ 19 | root: { 20 | width: '100%', 21 | marginTop: theme.spacing.unit * 3, 22 | overflowX: 'auto', 23 | }, 24 | table: { 25 | minWidth: 700, 26 | }, 27 | }); 28 | 29 | let id = 0; 30 | function createData( id, processingfee, company, assets, balance ) { 31 | return { id, processingfee, company, assets, balance }; 32 | } 33 | 34 | function generateData() { 35 | 36 | try { 37 | if ((localStorage.getItem('objects') != "undefined") && JSON.parse(localStorage.getItem('objects')) && JSON.parse(localStorage.getItem('objects')).originators) { 38 | console.log("originators found, setting variable") 39 | var originators = JSON.parse(localStorage.getItem('objects')).originators 40 | } else { 41 | throw "no originators found" 42 | } 43 | } catch (err) { 44 | var originators = [] 45 | console.log(err) 46 | } 47 | 48 | var data = [] 49 | if (!originators || originators.length == 0) { 50 | return data 51 | } 52 | for (var idx in originators) { 53 | data.push( 54 | createData( 55 | originators[idx].id, originators[idx].processingfee, originators[idx].company, originators[idx].assets, originators[idx].balance 56 | ) 57 | ) 58 | if (idx == (originators.length -1)) { 59 | return data 60 | } 61 | } 62 | } 63 | var data = generateData() 64 | 65 | function SimpleOriginatorTable(props) { 66 | const { classes } = props; 67 | const data = generateData() 68 | return ( 69 | 70 | 71 | 72 | 73 | Originator ID 74 | Processing Fee 75 | Company 76 | Assets 77 | Balance 78 | 79 | 80 | 81 | {data.map(n => { 82 | return ( 83 | 84 | 85 | {n.id} 86 | 87 | {n.processingfee * 100} % 88 | {n.company} 89 | { n.assets ? n.assets.join(', ') : '' } 90 | $ {n.balance ? n.balance : "0.00" } 91 | 92 | ); 93 | })} 94 | 95 |
    96 | 97 |
    98 | 99 | ); 100 | } 101 | 102 | SimpleOriginatorTable.propTypes = { 103 | classes: PropTypes.object.isRequired, 104 | }; 105 | 106 | export default withStyles(styles)(SimpleOriginatorTable); 107 | -------------------------------------------------------------------------------- /sc-ui/src/components/tables/SimplePoolTable.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { withStyles } from '@material-ui/core/styles'; 4 | import Table from '@material-ui/core/Table'; 5 | import TableBody from '@material-ui/core/TableBody'; 6 | import TableCell from '@material-ui/core/TableCell'; 7 | import TableHead from '@material-ui/core/TableHead'; 8 | import TableRow from '@material-ui/core/TableRow'; 9 | import Paper from '@material-ui/core/Paper'; 10 | import Button from '@material-ui/core/Button'; 11 | // import Modal from '@material-ui/core/Modal'; 12 | import Modal from '../modal.js'; 13 | import FormDialog from '../forms/FormDialog.js' 14 | import InitAssetPoolForm from '../forms/initAssetPoolForm.jsx' 15 | import ProcessPaymentForm from '../forms/processPaymentForm.jsx' 16 | 17 | 18 | const styles = theme => ({ 19 | root: { 20 | width: '100%', 21 | marginTop: theme.spacing.unit * 3, 22 | overflowX: 'auto', 23 | }, 24 | table: { 25 | minWidth: 700, 26 | }, 27 | }); 28 | 29 | let id = 0; 30 | function createData( id, value, assets, securities, excessspread ) { 31 | return { id, value, assets, securities, excessspread }; 32 | } 33 | 34 | function generateData() { 35 | 36 | 37 | try { 38 | if ((localStorage.getItem('objects') != "undefined") && JSON.parse(localStorage.getItem('objects')) && JSON.parse(localStorage.getItem('objects')).pools) { 39 | console.log("pools found, setting variable") 40 | var pools = JSON.parse(localStorage.getItem('objects')).pools 41 | } else { 42 | throw "no pools found" 43 | } 44 | } catch (err) { 45 | var pools = [] 46 | console.log(err) 47 | } 48 | 49 | console.log(pools) 50 | var data = [] 51 | if (!pools || pools.length == 0) { 52 | return data 53 | } 54 | 55 | for (var idx in pools) { 56 | data.push( 57 | createData( 58 | pools[idx].id, pools[idx].Value, pools[idx].assets, pools[idx].securities, pools[idx].excessspread 59 | ) 60 | ) 61 | if (idx == (pools.length -1)) { 62 | console.log("data") 63 | console.log(data) 64 | return data 65 | } 66 | } 67 | } 68 | var data = generateData() 69 | 70 | function SimplePoolTable(props) { 71 | const { classes } = props; 72 | const data = generateData() 73 | return ( 74 | 75 | 76 | 77 | 78 | Pool ID 79 | Pool Assets 80 | Value of Pool Assets (Including Expected Interest) 81 | Securities 82 | 83 | 84 | 85 | {data.map(n => { 86 | return ( 87 | 88 | 89 | {n.id} 90 | 91 | { n.assets ? n.assets.join(', ') : '' } 92 | {n.value.toFixed(2)} 93 | { n.securities ? n.securities.join(', ') : '' } 94 | 95 | ); 96 | })} 97 | 98 |
    99 | 100 |
    101 | 102 | ); 103 | } 104 | 105 | SimplePoolTable.propTypes = { 106 | classes: PropTypes.object.isRequired, 107 | }; 108 | 109 | export default withStyles(styles)(SimplePoolTable); 110 | -------------------------------------------------------------------------------- /sc-ui/src/components/tables/SimpleSecurityTable.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import PropTypes from 'prop-types'; 3 | import { withStyles } from '@material-ui/core/styles'; 4 | import Table from '@material-ui/core/Table'; 5 | import TableBody from '@material-ui/core/TableBody'; 6 | import TableCell from '@material-ui/core/TableCell'; 7 | import TableHead from '@material-ui/core/TableHead'; 8 | import TableRow from '@material-ui/core/TableRow'; 9 | import Paper from '@material-ui/core/Paper'; 10 | import Button from '@material-ui/core/Button'; 11 | // import Modal from '@material-ui/core/Modal'; 12 | import Modal from '../modal.js'; 13 | import FormDialog from '../forms/FormDialog.js' 14 | import InitAssetForm from '../forms/initAssetForm.jsx' 15 | import TransferAssetForm from '../forms/transferAssetForm.jsx' 16 | import ProcessPaymentForm from '../forms/processPaymentForm.jsx' 17 | import BuySecurityForm from '../forms/buySecurityForm.jsx' 18 | import InitSecurityForm from '../forms/initSecurityForm.jsx' 19 | import SellSecurityForm from '../forms/sellSecurityForm.jsx' 20 | 21 | 22 | const styles = theme => ({ 23 | root: { 24 | width: '100%', 25 | marginTop: theme.spacing.unit * 3, 26 | overflowX: 'auto', 27 | }, 28 | table: { 29 | minWidth: 700, 30 | }, 31 | }); 32 | 33 | let id = 0; 34 | function createData( id, rating, couponrate, pool, value, remainingpayments, maturity, investor ) { 35 | return { id, rating, couponrate, pool, value, remainingpayments, maturity, investor }; 36 | } 37 | 38 | function generateData() { 39 | 40 | try { 41 | if ((localStorage.getItem('objects') != "undefined") && JSON.parse(localStorage.getItem('objects')) && JSON.parse(localStorage.getItem('objects')).securities) { 42 | console.log("securities found, setting variable") 43 | var securities = JSON.parse(localStorage.getItem('objects')).securities 44 | } else { 45 | throw "no securities found" 46 | } 47 | } catch (err) { 48 | var securities = [] 49 | console.log(err) 50 | } 51 | 52 | var data = [] 53 | if (!securities || securities.length == 0) { 54 | return data 55 | } 56 | for (var idx in securities) { 57 | data.push( 58 | createData( 59 | securities[idx].id, securities[idx].rating, securities[idx].couponrate, securities[idx].pool, securities[idx].value, securities[idx].remainingpayments, securities[idx].maturity, securities[idx].investor 60 | ) 61 | ) 62 | if (idx == (securities.length -1)) { 63 | return data 64 | } 65 | } 66 | } 67 | var data = generateData() 68 | 69 | function SimpleSecurityTable(props) { 70 | const { classes } = props; 71 | const data = generateData() 72 | return ( 73 | 74 | 75 | 76 | 77 | Security ID 78 | Pool 79 | Coupon Rate 80 | Investor 81 | 82 | 83 | 84 | {data.map(n => { 85 | return ( 86 | 87 | {n.id} 88 | {n.pool} 89 | {n.couponrate.toFixed(2) * 100}% 90 | {n.investor} 91 | 92 | ); 93 | })} 94 | 95 |
    96 | 97 |
    98 | 99 | ); 100 | } 101 | 102 | SimpleSecurityTable.propTypes = { 103 | classes: PropTypes.object.isRequired, 104 | }; 105 | 106 | export default withStyles(styles)(SimpleSecurityTable); 107 | -------------------------------------------------------------------------------- /sc-ui/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | margin: 0; 3 | padding: 0; 4 | font-family: sans-serif; 5 | } 6 | -------------------------------------------------------------------------------- /sc-ui/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import registerServiceWorker from './registerServiceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | registerServiceWorker(); 9 | -------------------------------------------------------------------------------- /sc-ui/src/logo.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /sc-ui/src/registerServiceWorker.js: -------------------------------------------------------------------------------- 1 | // In production, we register a service worker to serve assets from local cache. 2 | 3 | // This lets the app load faster on subsequent visits in production, and gives 4 | // it offline capabilities. However, it also means that developers (and users) 5 | // will only see deployed updates on the "N+1" visit to a page, since previously 6 | // cached resources are updated in the background. 7 | 8 | // To learn more about the benefits of this model, read https://goo.gl/KwvDNy. 9 | // This link also includes instructions on opting out of this behavior. 10 | 11 | const isLocalhost = Boolean( 12 | window.location.hostname === 'localhost' || 13 | // [::1] is the IPv6 localhost address. 14 | window.location.hostname === '[::1]' || 15 | // 127.0.0.1/8 is considered localhost for IPv4. 16 | window.location.hostname.match( 17 | /^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/ 18 | ) 19 | ); 20 | 21 | export default function register() { 22 | if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) { 23 | // The URL constructor is available in all browsers that support SW. 24 | const publicUrl = new URL(process.env.PUBLIC_URL, window.location); 25 | if (publicUrl.origin !== window.location.origin) { 26 | // Our service worker won't work if PUBLIC_URL is on a different origin 27 | // from what our page is served on. This might happen if a CDN is used to 28 | // serve assets; see https://github.com/facebookincubator/create-react-app/issues/2374 29 | return; 30 | } 31 | 32 | window.addEventListener('load', () => { 33 | const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`; 34 | 35 | if (isLocalhost) { 36 | // This is running on localhost. Lets check if a service worker still exists or not. 37 | checkValidServiceWorker(swUrl); 38 | 39 | // Add some additional logging to localhost, pointing developers to the 40 | // service worker/PWA documentation. 41 | navigator.serviceWorker.ready.then(() => { 42 | console.log( 43 | 'This web app is being served cache-first by a service ' + 44 | 'worker. To learn more, visit https://goo.gl/SC7cgQ' 45 | ); 46 | }); 47 | } else { 48 | // Is not local host. Just register service worker 49 | registerValidSW(swUrl); 50 | } 51 | }); 52 | } 53 | } 54 | 55 | function registerValidSW(swUrl) { 56 | navigator.serviceWorker 57 | .register(swUrl) 58 | .then(registration => { 59 | registration.onupdatefound = () => { 60 | const installingWorker = registration.installing; 61 | installingWorker.onstatechange = () => { 62 | if (installingWorker.state === 'installed') { 63 | if (navigator.serviceWorker.controller) { 64 | // At this point, the old content will have been purged and 65 | // the fresh content will have been added to the cache. 66 | // It's the perfect time to display a "New content is 67 | // available; please refresh." message in your web app. 68 | console.log('New content is available; please refresh.'); 69 | } else { 70 | // At this point, everything has been precached. 71 | // It's the perfect time to display a 72 | // "Content is cached for offline use." message. 73 | console.log('Content is cached for offline use.'); 74 | } 75 | } 76 | }; 77 | }; 78 | }) 79 | .catch(error => { 80 | console.error('Error during service worker registration:', error); 81 | }); 82 | } 83 | 84 | function checkValidServiceWorker(swUrl) { 85 | // Check if the service worker can be found. If it can't reload the page. 86 | fetch(swUrl) 87 | .then(response => { 88 | // Ensure service worker exists, and that we really are getting a JS file. 89 | if ( 90 | response.status === 404 || 91 | response.headers.get('content-type').indexOf('javascript') === -1 92 | ) { 93 | // No service worker found. Probably a different app. Reload the page. 94 | navigator.serviceWorker.ready.then(registration => { 95 | registration.unregister().then(() => { 96 | window.location.reload(); 97 | }); 98 | }); 99 | } else { 100 | // Service worker found. Proceed as normal. 101 | registerValidSW(swUrl); 102 | } 103 | }) 104 | .catch(() => { 105 | console.log( 106 | 'No internet connection found. App is running in offline mode.' 107 | ); 108 | }); 109 | } 110 | 111 | export function unregister() { 112 | if ('serviceWorker' in navigator) { 113 | navigator.serviceWorker.ready.then(registration => { 114 | registration.unregister(); 115 | }); 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /sc-ui/webpack.config.js: -------------------------------------------------------------------------------- 1 | const path = require('path'); 2 | const webpack = require('webpack'); 3 | 4 | //target for using npm run [target] in the terminal 5 | //const TARGET = process.env.npm_lifecycle_event; 6 | 7 | //process.env.BABEL_ENV = TARGET; 8 | 9 | const PATHS = { 10 | app: path.join(__dirname, 'src'), 11 | build: path.join(__dirname, 'public'), 12 | lib: path.join(__dirname, 'lib') 13 | } 14 | 15 | module.exports = { 16 | entry:{ 17 | app: PATHS.app 18 | }, 19 | resolve: { 20 | extensions: ['.js','.jsx'] 21 | }, 22 | resolveLoader: { 23 | moduleExtensions: ['-loader'] 24 | }, 25 | output: { 26 | path: PATHS.build, 27 | filename: 'bundle.js' 28 | }, 29 | module:{ 30 | loaders:[ 31 | { 32 | //use regex to test for js and jsx 33 | test: /\.jsx?$/, 34 | loaders: ['babel?cacheDirectory'], 35 | //only include files in the PATHS.app path 36 | include: PATHS.app 37 | }, 38 | { 39 | test: /\.css$/, 40 | loaders: ['style','css'], 41 | include: [PATHS.app,PATHS.lib] 42 | } 43 | ] 44 | }, 45 | // devTool: 'eval-source-map', 46 | devServer:{ 47 | contentBase: PATHS.build, 48 | historyApiFallback: true, 49 | hot: true, 50 | inline: true, 51 | progress: true, 52 | stats: 'errors-only', 53 | host: "0.0.0.0", //process.env.HOST, 54 | port: process.env.PORT, 55 | disableHostCheck: true, 56 | proxy: { 57 | '/api/**': { target: 'http://localhost:30001' , secure: false, changeOrigin: true, pathRewrite: { 58 | '^/api': '' 59 | }} 60 | } 61 | }, 62 | plugins:[ 63 | new webpack.HotModuleReplacementPlugin() 64 | ] 65 | } 66 | -------------------------------------------------------------------------------- /update_chaincode.sh: -------------------------------------------------------------------------------- 1 | docker cp ./chaincode/src/. chaincode:/opt/gopath/src/chaincode/securitization/ 2 | docker exec chaincode bash -c 'pkill -f securitization ' 3 | docker exec chaincode bash -c 'cd /opt/gopath/src/chaincode/securitization ; \ 4 | go build ; if [ "$(echo $?)" == "0" ] ; \ 5 | then CORE_PEER_ADDRESS=peer:7052 CORE_CHAINCODE_ID_NAME=sec:0 ./securitization \ 6 | ; fi' 7 | --------------------------------------------------------------------------------