├── .DS_Store ├── Airline-Miles-Site ├── airline-miles-site.html ├── index.js └── styles.css ├── LICENSE ├── README.md ├── fabric-chrome-extension ├── .DS_Store ├── hyperledger-Icon.png ├── manifest.json └── src │ ├── .DS_Store │ ├── confirmationPopup.html │ ├── popup.html │ ├── scripts │ ├── background.js │ ├── confirmationPopup.js │ ├── contentScript.js │ ├── injected.js │ ├── jquery-3.3.1.min.js │ └── popup.js │ └── styles │ ├── confirmationPopup.css │ └── popup.css ├── fabric-network ├── .DS_Store ├── Server │ ├── .gitignore │ ├── README.md │ ├── controller.js │ ├── network-config.yaml │ ├── package-lock.json │ ├── package.json │ ├── registerAdmin.js │ ├── registerUser.js │ ├── routes.js │ ├── server.js │ ├── setup.sh │ └── startFabric.sh ├── basic-network │ ├── .DS_Store │ ├── .env │ ├── README.md │ ├── config │ │ ├── Org1MSPanchors.tx │ │ ├── Org2MSPanchors.tx │ │ ├── channel.tx │ │ ├── genesis.block │ │ └── mychannel.block │ ├── configtx.yaml │ ├── crypto-config.yaml │ ├── crypto-config │ │ ├── .DS_Store │ │ ├── ordererOrganizations │ │ │ └── example.com │ │ │ │ ├── ca │ │ │ │ ├── 8fa1400ab48dd142b89ac9647fa6e89e0b442339ed74fdb17dd17fa9ef7efe7f_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 │ │ │ │ │ │ └── 84777acf9ed8e38a7562e0a3e8f2cad25e91d3a4052827a3a22c1eaf7d5f1208_sk │ │ │ │ │ ├── signcerts │ │ │ │ │ │ └── orderer.example.com-cert.pem │ │ │ │ │ └── tlscacerts │ │ │ │ │ │ └── tlsca.example.com-cert.pem │ │ │ │ │ └── tls │ │ │ │ │ ├── ca.crt │ │ │ │ │ ├── server.crt │ │ │ │ │ └── server.key │ │ │ │ ├── tlsca │ │ │ │ ├── 82e1e0749e9e093b33a8e201074294f71e8beafb1b4fb3ada6213bb66adbe25d_sk │ │ │ │ └── tlsca.example.com-cert.pem │ │ │ │ └── users │ │ │ │ └── Admin@example.com │ │ │ │ ├── msp │ │ │ │ ├── admincerts │ │ │ │ │ └── Admin@example.com-cert.pem │ │ │ │ ├── cacerts │ │ │ │ │ └── ca.example.com-cert.pem │ │ │ │ ├── keystore │ │ │ │ │ └── b4461c73d25f407033370503dfcab7551dbf003caa8d70532cd3ae191aeca086_sk │ │ │ │ ├── signcerts │ │ │ │ │ └── Admin@example.com-cert.pem │ │ │ │ └── tlscacerts │ │ │ │ │ └── tlsca.example.com-cert.pem │ │ │ │ └── tls │ │ │ │ ├── ca.crt │ │ │ │ ├── client.crt │ │ │ │ └── client.key │ │ └── peerOrganizations │ │ │ ├── org1.example.com │ │ │ ├── ca │ │ │ │ ├── 0ce9cef4beed1a810990dd2fb20b9d734b24a33337138260b079c9cf1e155282_sk │ │ │ │ └── ca.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 │ │ │ │ │ │ └── 1a67f936fbe54245b10212ddb03393717c12412c0c31394496160e3c9b89acff_sk │ │ │ │ │ ├── signcerts │ │ │ │ │ │ └── peer0.org1.example.com-cert.pem │ │ │ │ │ └── tlscacerts │ │ │ │ │ │ └── tlsca.org1.example.com-cert.pem │ │ │ │ │ └── tls │ │ │ │ │ ├── ca.crt │ │ │ │ │ ├── server.crt │ │ │ │ │ └── server.key │ │ │ ├── tlsca │ │ │ │ ├── b89685c7b4d4b95eec6cb482ac8982cfe30496100d1684b2f48f8b570c137c44_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 │ │ │ │ │ │ └── 9cbcbe051a2f2e901b44c9c560d069bf3abf2ce52dce4c28d30ecc13dd9a5807_sk │ │ │ │ │ ├── signcerts │ │ │ │ │ │ └── Admin@org1.example.com-cert.pem │ │ │ │ │ └── tlscacerts │ │ │ │ │ │ └── tlsca.org1.example.com-cert.pem │ │ │ │ └── tls │ │ │ │ │ ├── ca.crt │ │ │ │ │ ├── client.crt │ │ │ │ │ └── client.key │ │ │ │ └── User1@org1.example.com │ │ │ │ ├── msp │ │ │ │ ├── admincerts │ │ │ │ │ └── User1@org1.example.com-cert.pem │ │ │ │ ├── cacerts │ │ │ │ │ └── ca.org1.example.com-cert.pem │ │ │ │ ├── keystore │ │ │ │ │ └── 606969537bd31e77a00e6b423b1c57d3ac21f38854c1947a2ef797066e05efed_sk │ │ │ │ ├── signcerts │ │ │ │ │ └── User1@org1.example.com-cert.pem │ │ │ │ └── tlscacerts │ │ │ │ │ └── tlsca.org1.example.com-cert.pem │ │ │ │ └── tls │ │ │ │ ├── ca.crt │ │ │ │ ├── client.crt │ │ │ │ └── client.key │ │ │ └── org2.example.com │ │ │ ├── ca │ │ │ ├── 08fb03c1e0c05eb2ed28a63a1b40535737a1ff6de3dc69d5a404264d3a036690_sk │ │ │ └── ca.org2.example.com-cert.pem │ │ │ ├── msp │ │ │ ├── admincerts │ │ │ │ └── Admin@org2.example.com-cert.pem │ │ │ ├── cacerts │ │ │ │ └── ca.org2.example.com-cert.pem │ │ │ └── tlscacerts │ │ │ │ └── tlsca.org2.example.com-cert.pem │ │ │ ├── peers │ │ │ └── peer0.org2.example.com │ │ │ │ ├── msp │ │ │ │ ├── admincerts │ │ │ │ │ └── Admin@org2.example.com-cert.pem │ │ │ │ ├── cacerts │ │ │ │ │ └── ca.org2.example.com-cert.pem │ │ │ │ ├── keystore │ │ │ │ │ └── 2ece1772d34f64c4c903034ce9e82f06b63f5c57ecf36060151571409fb5c68e_sk │ │ │ │ ├── signcerts │ │ │ │ │ └── peer0.org2.example.com-cert.pem │ │ │ │ └── tlscacerts │ │ │ │ │ └── tlsca.org2.example.com-cert.pem │ │ │ │ └── tls │ │ │ │ ├── ca.crt │ │ │ │ ├── server.crt │ │ │ │ └── server.key │ │ │ ├── tlsca │ │ │ ├── 7beaec219859a619c47d5cd45c6818b29cce379644c28b689ffc856bb27c0ad7_sk │ │ │ └── tlsca.org2.example.com-cert.pem │ │ │ └── users │ │ │ ├── Admin@org2.example.com │ │ │ ├── msp │ │ │ │ ├── admincerts │ │ │ │ │ └── Admin@org2.example.com-cert.pem │ │ │ │ ├── cacerts │ │ │ │ │ └── ca.org2.example.com-cert.pem │ │ │ │ ├── keystore │ │ │ │ │ └── dbb4a34820ef2c1fbe40f3d149f5fb86e6d0e252db73facdae33218650fcbb0a_sk │ │ │ │ ├── signcerts │ │ │ │ │ └── Admin@org2.example.com-cert.pem │ │ │ │ └── tlscacerts │ │ │ │ │ └── tlsca.org2.example.com-cert.pem │ │ │ └── tls │ │ │ │ ├── ca.crt │ │ │ │ ├── client.crt │ │ │ │ └── client.key │ │ │ └── User1@org2.example.com │ │ │ ├── msp │ │ │ ├── admincerts │ │ │ │ └── User1@org2.example.com-cert.pem │ │ │ ├── cacerts │ │ │ │ └── ca.org2.example.com-cert.pem │ │ │ ├── keystore │ │ │ │ └── cc51c42193f79eba926b49854c8cbdfff823017a5202a42c9079a651a7168be5_sk │ │ │ ├── signcerts │ │ │ │ └── User1@org2.example.com-cert.pem │ │ │ └── tlscacerts │ │ │ │ └── tlsca.org2.example.com-cert.pem │ │ │ └── tls │ │ │ ├── ca.crt │ │ │ ├── client.crt │ │ │ └── client.key │ ├── docker-compose.yml │ ├── generate.sh │ ├── init.sh │ ├── start.sh │ ├── stop.sh │ └── teardown.sh └── chaincode │ ├── .DS_Store │ ├── AirLineMiles │ ├── AirLineMiles │ ├── AirLineMiles.go │ └── AirLineMiles_test.go │ ├── AirlineMilesExchange │ ├── AirlineMilesExchange │ └── AirlineMilesExchange.go │ ├── BoatExchange │ ├── BoatExchange │ └── BoatExchange.go │ ├── sample-chaincode.go │ └── testing │ ├── testing │ └── testing.go └── site-example ├── fabric-site.html ├── index.js └── styles.css /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-chrome-extension/438769b948b412f068ff1ec80f6633647eb6c272/.DS_Store -------------------------------------------------------------------------------- /Airline-Miles-Site/airline-miles-site.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Airline Miles 5 | 6 | 7 | 8 | 9 |
10 |

Airline Miles Website

11 |
12 | 13 |
14 |

Test querying users:

15 |
16 | User Name:
17 | 18 |

19 | 20 |
21 |

User Info:

22 |

23 |
24 | 25 |
26 |

Test querying flights:

27 |
28 | Flight Id:
29 | 30 |

31 | 32 |
33 |

Value:

34 |

35 |
36 | 37 |
38 |

Test submitting Transaction:

39 |
40 | Key:
41 | 42 |

43 | Value:
44 | 45 |

46 | 47 |
48 |

Transaction ID:

49 |

50 |
51 | 52 |
53 |

Test AUTO submitting Transaction:

54 |
55 | Key:
56 | 57 |

58 | Value:
59 | 60 |

61 | 62 |
63 |

Status:

64 |

65 |
66 | 67 |
68 |

Purchase flight:

69 |
70 | User Name:
71 | 72 |

73 | Flight Id:
74 | 75 |

76 | 77 |
78 |

Response:

79 |

80 |
81 | 82 |
83 |

Initalize ledger:

84 |
85 | 86 |
87 |

Response:

88 |

89 |
90 | 91 |
92 |

Test querying Transaction ID:

93 |
94 | Transaction ID:
95 | 96 |

97 | 98 |
99 |

Transaction Data:

100 |

101 |
102 | 103 | -------------------------------------------------------------------------------- /Airline-Miles-Site/index.js: -------------------------------------------------------------------------------- 1 | window.addEventListener('load', async () => { 2 | if ((typeof fabricInterface !== 'undefined') && (fabricInterface.info === "Hyperledger Fabric Extension")) { 3 | console.log('Detected Extension'); 4 | } else { 5 | console.log('Extension not detected'); 6 | } 7 | console.log(fabricInterface); 8 | }); 9 | 10 | let queryUser = async () => { // Make Dynamic!!!! 11 | let key = document.getElementById('query-user-input').value; 12 | try { 13 | 14 | const request = { 15 | //targets : --- letting this default to the peers assigned to the channel 16 | chaincodeId: 'airlineMiles', 17 | fcn: 'queryUser', 18 | args: [key], 19 | chainId: 'mychannel', 20 | }; 21 | 22 | let ledger_value = await fabricInterface.queryLedger(request); 23 | console.log('testing get function: ', ledger_value); 24 | document.getElementById('query-user-response').innerHTML = ledger_value.value; 25 | return ledger_value; 26 | } catch (error) { 27 | console.log('Could not find value ERROR::', error); 28 | } 29 | } 30 | 31 | let queryFlight = async () => { // Make Dynamic!!!! 32 | let key = document.getElementById('query-flight-input').value; 33 | try { 34 | 35 | const request = { 36 | //targets : --- letting this default to the peers assigned to the channel 37 | chaincodeId: 'airlineMiles', 38 | fcn: 'queryFlight', 39 | args: [key], 40 | chainId: 'mychannel', 41 | }; 42 | // const request = { 43 | // //targets : --- letting this default to the peers assigned to the channel 44 | // chaincodeId: 'airlineMiles', 45 | // fcn: 'initLedger', 46 | // args: [], 47 | // chainId: 'mychannel', 48 | // }; 49 | 50 | let ledger_value = await fabricInterface.queryLedger(request); 51 | console.log('testing get function: ', ledger_value); 52 | document.getElementById('query-flight-response').innerHTML = ledger_value.value; 53 | return ledger_value; 54 | } catch (error) { 55 | console.log('Could not find value ERROR::', error); 56 | } 57 | } 58 | 59 | let queryAllFlights = async () => { // Make Dynamic!!!! 60 | let key = document.getElementById('query-flight-input').value; 61 | try { 62 | 63 | const request = { 64 | //targets : --- letting this default to the peers assigned to the channel 65 | chaincodeId: 'airlineMiles', 66 | fcn: 'queryAllFlights', 67 | args: [], 68 | chainId: 'mychannel', 69 | }; 70 | 71 | let ledger_value = await fabricInterface.queryLedger(request); 72 | console.log('testing get function: ', ledger_value); 73 | document.getElementById('query-flight-response').innerHTML = ledger_value.value; 74 | return ledger_value; 75 | } catch (error) { 76 | console.log('Could not find value ERROR::', error); 77 | } 78 | } 79 | 80 | let queryTransaction = async () => { 81 | let id = document.getElementById('transaction_id_input').value; 82 | try { 83 | let response = await fabricInterface.getTransaction(id); 84 | document.getElementById('TransactionData').innerHTML = response; 85 | return response; 86 | } catch (error) { 87 | console.log('Could not find value ERROR::', error); 88 | } 89 | } 90 | 91 | let submitTransactionProposal = async () => { 92 | let key = document.getElementById('set_key_input').value; 93 | let value = document.getElementById('set_value_input').value; 94 | try { 95 | // const request = { 96 | // //targets : --- letting this default to the peers assigned to the channel 97 | // chaincodeId: 'airlineMiles', 98 | // fcn: 'addUser', 99 | // args: [key, value], 100 | // chainId: 'mychannel', 101 | // }; 102 | const request = { 103 | //targets : --- letting this default to the peers assigned to the channel 104 | chaincodeId: 'airlineMiles', 105 | fcn: 'addFlight', 106 | args: ['5', "8/27/18", 'American', 'Tokyo', 'Dallas', '100'], 107 | chainId: 'mychannel', 108 | }; 109 | // const request = { 110 | // //targets : --- letting this default to the peers assigned to the channel 111 | // chaincodeId: 'airlineMiles', 112 | // fcn: 'initLedger', 113 | // args: [], 114 | // chainId: 'mychannel', 115 | // }; 116 | 117 | let response = await fabricInterface.submitTransactionProposal(request); 118 | let transactionReponse = await fabricInterface.submitSignedProposal(response); 119 | document.getElementById('TransactionResponse').innerHTML = transactionReponse; 120 | return transactionReponse.TransactionID; 121 | } catch (error) { 122 | console.log('Could not find value ERROR::', error); 123 | } 124 | } 125 | 126 | let autoSubmitTransaction = async () => { 127 | let key = document.getElementById('auto_set_key_input').value; 128 | let value = document.getElementById('auto_set_value_input').value; 129 | try { 130 | const request = { 131 | //targets : --- letting this default to the peers assigned to the channel 132 | chaincodeId: 'airlineMiles', 133 | fcn: 'addFlight', 134 | args: ['5', "8/27/18",'American', 'Tokyo', 'Dallas', '100'], 135 | chainId: 'mychannel', 136 | }; 137 | let response = await fabricInterface.autoSubmitTransaction(request); 138 | console.log('Auto submit transaction response: ', response); 139 | document.getElementById('AutoTransactionResponse').innerHTML = response.status; 140 | return response.TransactionID; 141 | } catch (error) { 142 | console.log('Could not find value ERROR::', error); 143 | } 144 | } 145 | 146 | let initLedger = async () => { 147 | try { 148 | const request = { 149 | //targets : --- letting this default to the peers assigned to the channel 150 | chaincodeId: 'airlineMiles', 151 | fcn: 'initLedger', 152 | args: [], 153 | chainId: 'mychannel', 154 | }; 155 | let response = await fabricInterface.autoSubmitTransaction(request); 156 | console.log('initLedger response: ', response); 157 | document.getElementById('init-response').innerHTML = response.TransactionID; 158 | return response.TransactionID; 159 | } catch (error) { 160 | console.log('Could not find value ERROR::', error); 161 | } 162 | } 163 | 164 | let purchaseFlight = async () => { 165 | let user_name = document.getElementById('purchase-flight-user-input').value; 166 | let flight_id = document.getElementById('purchase-flight-flight-id-input').value; 167 | try { 168 | const request = { 169 | //targets : --- letting this default to the peers assigned to the channel 170 | chaincodeId: 'airlineMiles', 171 | fcn: 'purchaseFlight', 172 | args: [user_name, flight_id], 173 | chainId: 'mychannel', 174 | }; 175 | let response = await fabricInterface.autoSubmitTransaction(request); 176 | console.log('Auto submit transaction response: ', response); 177 | document.getElementById('purchase-flight-response').innerHTML = response.TransactionID; 178 | return response.TransactionID; 179 | } catch (error) { 180 | console.log('Could not find value ERROR::', error); 181 | } 182 | } 183 | -------------------------------------------------------------------------------- /Airline-Miles-Site/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #428bca; 3 | font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; 4 | margin: 0px; 5 | padding: 0px; 6 | width: 100%; 7 | } 8 | h1 { 9 | margin: 0px; 10 | margin-left: 30px; 11 | line-height: 1.6; 12 | } 13 | .head-wrapper { 14 | background-color: #f9f9f9; 15 | box-shadow: rgba(0, 0, 0, 0.4) 0 3px 3px; 16 | } 17 | .content-wrapper { 18 | background-color: #2C2F33; 19 | } 20 | .fabric-test-box { 21 | background-color: #f9f9f9; 22 | border-top: solid 1px lightgrey; 23 | box-shadow: rgba(0, 0, 0, 0.4) 0 4px 4px; 24 | border-radius: 3px; 25 | width: 30%; 26 | margin-left: 20px; 27 | margin-top: 3%; 28 | float: left; 29 | text-align: center; 30 | } 31 | 32 | input { 33 | border-radius: 3px; 34 | border: 1px solid #C2C2C2; 35 | box-shadow: 1px 1px 4px #EBEBEB; 36 | font-weight: bold; 37 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Lab Name 2 | Hyperledger Fabric Chrome Extension 3 | 4 | # Short Description 5 | This is a Fabric Chrome extension paired with a Javascript API. Users should be able to use the Chrome Extension to authenticate to a Fabric network. The Chrome Extension should provide a JavaScript API that websites call to perform the following functions 6 | - detect presence of extension 7 | - initiate a transaction 8 | - read blockchain data allowed by the extension 9 | This is an internship project, full description and context can be found on this page https://wiki.hyperledger.org/internship/project_ideas 10 | 11 | This project is similar to MetaMask, which works with Ethereum: https://metamask.io/ 12 | 13 | # Scope of Lab 14 | Internship Project 15 | 16 | # Initial Committers 17 | Daniel McSheehy (DanielMcSheehy, dsm140130@utdallas.edu) 18 | 19 | # Sponsor 20 | Sheehan Anderson (srderson, sranderson@gmail.com) 21 | Binh Nguyen (binhn, binh1010010110@gmail.com) 22 | 23 | # Instructions 24 | - [Install npm](https://www.npmjs.com/get-npm) 25 | - Clone repo with `git clone https://github.com/hyperledger-labs/fabric-chrome-extension/edit/master/README.md` to desired directory. 26 | - `cd fabric-network/Server` 27 | 28 | If you have Fabric 1.2 installed: 29 | - `cd bash startFabric.sh` 30 | - In a second tab in the same directory run `bash registerAdmin.sh` and then `bash registerUser.sh`. 31 | - In the third tab (same location) run `nodemon server.js`. 32 | 33 | If you do not have Hyperledger Fabric Installed: 34 | run `setup.sh`. (This will install Fabric, register Admin/User, launch a fabric network, and start the middleware automatically) 35 | 36 | Install Chrome extension: 37 | - Go to `chrome://extensions/` and turn on Developer mode on the top right. 38 | - To install chrome extension click "Load Unpacked" on the extensions page and then select `fabric-chrome-extension` folder inside this project. 39 | 40 | - For testing open `site-example/fabric-site.html` with chrome to use with the extension. 41 | 42 | # Usage 43 | - On the chrome extension UI there is an input label Network url. Type in http://localhost:8000 and then click set. 44 | - The chrome extension will fetch the peer and orderer url from the middle ware (service discovery) and insert into the forms. 45 | - Click submit. 46 | 47 | - When changing network settings click `save network settings` on extension to save it. (Saved peers are displayed in green, not grey) 48 | 49 | - On the example site, try submitting a key and value on the send transaction forms and then hit send. 50 | - Opening the console should show more information about transactions and responses. 51 | -------------------------------------------------------------------------------- /fabric-chrome-extension/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-chrome-extension/438769b948b412f068ff1ec80f6633647eb6c272/fabric-chrome-extension/.DS_Store -------------------------------------------------------------------------------- /fabric-chrome-extension/hyperledger-Icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-chrome-extension/438769b948b412f068ff1ec80f6633647eb6c272/fabric-chrome-extension/hyperledger-Icon.png -------------------------------------------------------------------------------- /fabric-chrome-extension/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Hyperledger Chrome extension", 3 | "version": "0.0.1", 4 | "manifest_version": 2, 5 | "description": "", 6 | "browser_action": { 7 | "default_title": "Hyperledger", 8 | "default_popup": "src/popup.html" 9 | }, 10 | "permissions": [ 11 | "", "storage" 12 | ], 13 | "content_scripts": [ 14 | { 15 | "matches": [ 16 | "" 17 | ], 18 | "js": [ 19 | "src/scripts/contentScript.js" 20 | ], 21 | "run_at": "document_start" 22 | } 23 | ], 24 | "background": { 25 | "scripts": ["src/scripts/background.js"], 26 | "persistent": true 27 | }, 28 | "web_accessible_resources": ["*.js"], 29 | "icons": { 30 | "16": "hyperledger-Icon.png" 31 | } 32 | } -------------------------------------------------------------------------------- /fabric-chrome-extension/src/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-chrome-extension/438769b948b412f068ff1ec80f6633647eb6c272/fabric-chrome-extension/src/.DS_Store -------------------------------------------------------------------------------- /fabric-chrome-extension/src/confirmationPopup.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 86 | 87 |
-------------------------------------------------------------------------------- /fabric-chrome-extension/src/popup.html: -------------------------------------------------------------------------------- 1 | 2 |
3 | 4 | 5 | 6 | 7 | 8 |
9 |
10 | NetworkURL: 11 | 12 | 13 |
14 |
15 |
16 |
17 | OrdererURL: 18 | 19 |
20 |
21 | 22 |
23 |
24 | Peers: 25 |
26 |
    27 |
28 | 29 |
30 | + 31 |
32 |
33 |
34 |
35 | 36 |
37 |
38 | Add Peer: 39 | 40 | 41 |
42 |
43 | 44 |
45 | 48 | 51 |
52 | 53 | 54 | 55 | 56 | 57 |
-------------------------------------------------------------------------------- /fabric-chrome-extension/src/scripts/background.js: -------------------------------------------------------------------------------- 1 | chrome.runtime.onMessage.addListener((request, sender, sendResponse) => { 2 | if (request.type == "content_script") { 3 | let payload = request.payload; 4 | // Adding variables to window object 5 | // so confirmationPopup.js has access. 6 | // (Only chrome extension has access to these) 7 | window.sendResponse = sendResponse; 8 | window.payload = payload; 9 | window.selectedFunction = request.function; 10 | window.id = request.id; 11 | //! Temparary bypass for querying ledger without requiring user confirmation 12 | //! Only for demo, remove after!! 13 | if (request.function === 'queryLedger') { 14 | queryLedger(payload).then((result) => { 15 | console.log('query result heree: ', result); 16 | sendResponse({ 17 | type: 'background', 18 | id: request.id, 19 | function: request.function, 20 | response: result 21 | }); 22 | }); 23 | return true; 24 | } else { 25 | chrome.tabs.create({ 26 | url: chrome.extension.getURL('src/confirmationPopup.html'), 27 | active: false 28 | }, (tab) => { 29 | // After the tab has been created, open a window to inject the tab 30 | chrome.windows.create({ 31 | tabId: tab.id, 32 | type: 'popup', 33 | focused: true, 34 | height: 490, 35 | width: 350, 36 | left: 1000 37 | }); 38 | }); 39 | return true; // To insure background stays active until popup is clicked. 40 | } 41 | } 42 | }); 43 | // Using var instead of let because these need to be global variables 44 | // so they can be seen on window object (for confirmationPopup.js) 45 | var getTransaction = async (payload) => { 46 | let response = await postRequest('getTransaction', payload); 47 | return response; 48 | } 49 | //! confirmationPopup should directly call post Request. 50 | var submitTransactionProposal = async (payload) => { 51 | let response = await postRequest('submitTransactionProposal', payload); 52 | return response; 53 | } 54 | 55 | var submitSignedProposal = async(payload) => { 56 | let response = await postRequest('submitSignedProposal', payload); 57 | return response; 58 | } 59 | 60 | var autoSubmitTransaction = async(payload) => { 61 | let response = await postRequest('autoSubmitTransaction', payload); 62 | return response; 63 | } 64 | 65 | var queryLedger = async(payload) => { 66 | let response = await postRequest('queryLedger', payload); 67 | return response; 68 | } 69 | 70 | var postRequest = async(selectedFunction, payload) => { 71 | try { 72 | const response = await fetch(`${payload.networkURL}/${selectedFunction}`, { 73 | method: 'POST', 74 | headers: { 75 | 'Accept': 'application/json', 76 | 'Content-Type': 'application/json' 77 | }, 78 | body: JSON.stringify(payload) 79 | }); 80 | const content = await response.json(); 81 | return content; 82 | } catch (error) { 83 | console.log('Error with network request: ', error); 84 | return error; 85 | } 86 | } 87 | 88 | -------------------------------------------------------------------------------- /fabric-chrome-extension/src/scripts/confirmationPopup.js: -------------------------------------------------------------------------------- 1 | window.onload = () => { 2 | chrome.runtime.getBackgroundPage(async (background)=> { 3 | let payload = background.payload; 4 | let request = payload.request; 5 | let id = background.id; 6 | let selectedFunction = background.selectedFunction; 7 | $("#transaction-type").text(selectedFunction); 8 | console.log('payload: ', payload); 9 | 10 | // Normal transaction/query 11 | if (typeof payload.request !== 'undefined') { 12 | $("#transaction-function").text(request.fcn); 13 | let argsString = `[${request.args.map((arg) =>(' ' + arg))}]`; 14 | $("#transaction-args").text(argsString); 15 | $("#transaction-chaincode").text(request.chaincodeId); 16 | $("#transaction-channel").text(request.chainId); 17 | // Sending signed Proposals from endorsers to orderer: 18 | } else if (typeof payload.signedRequest !== 'undefined') { 19 | $('#function-label').text('Number of signed responses: '); 20 | $("#transaction-function").text(payload.signedRequest.proposalResponses.length); 21 | 22 | $('#args-label').text('TxId: '); 23 | transactionIdString = payload.tx_id._transaction_id.slice(0,20) + '...'; 24 | $("#transaction-args").text(transactionIdString); 25 | // Querying transaction by id: 26 | } else { 27 | $('#args-label').text('TxId: '); 28 | transactionIdString = payload.id.slice(0,20) + '...'; 29 | $("#transaction-args").text(transactionIdString); 30 | } 31 | 32 | let peerString = payload.peerURLs.map((peer) => (peer + ' ')); 33 | $("#transaction-peers").text(peerString); 34 | $("#transaction-orderers").text(payload.ordererURL); 35 | 36 | $("#confirm-button").click( async () => { 37 | $('#confirm-button').toggle(); 38 | $('#loading-circle').toggle(); 39 | let result = await background[selectedFunction](payload); 40 | console.log('query result: ', result); 41 | background.sendResponse({ 42 | type: 'background', 43 | id: id, 44 | function: selectedFunction, 45 | response: result 46 | }); 47 | window.close(); // Close popup 48 | }); 49 | }); 50 | }; 51 | 52 | -------------------------------------------------------------------------------- /fabric-chrome-extension/src/scripts/contentScript.js: -------------------------------------------------------------------------------- 1 | // Injecting script.js into web page 2 | let script = document.createElement('script'); 3 | script.src = chrome.extension.getURL('src/scripts/injected.js'); 4 | (document.head||document.documentElement).appendChild(script); 5 | script.onload = () => { 6 | script.remove(); 7 | }; 8 | 9 | 10 | // Listen to to injected.js then send => background.js 11 | window.addEventListener("message", (event) => { 12 | try { 13 | if ((event.source === window) && (typeof event.data.type !== 'undefined') && (event.data.type === "webpage")) { 14 | chrome.storage.sync.get(['networkConfig'], (results) => { 15 | let RequestPayload = event.data.payload; 16 | RequestPayload.networkURL = results.networkConfig.networkURL; 17 | RequestPayload.ordererURL = results.networkConfig.ordererURL; 18 | RequestPayload.peerURLs = results.networkConfig.peerURLs; 19 | 20 | chrome.runtime.sendMessage({ 21 | type: 'content_script', 22 | id: event.data.id, 23 | function: event.data.function, 24 | payload: RequestPayload 25 | }, (response) => { 26 | console.log('response: ', response); 27 | // Relay Response to Injected.js (webpage) 28 | window.postMessage(response, "*"); 29 | }); 30 | }); 31 | } 32 | } catch (error) { 33 | console.log('error with message: ', error); 34 | } 35 | }, false); 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /fabric-chrome-extension/src/scripts/injected.js: -------------------------------------------------------------------------------- 1 | 2 | // Will be injected into the webpage from contentScript.js 3 | class fabricController { 4 | constructor () { 5 | this.info = "Hyperledger Fabric Extension"; 6 | } 7 | 8 | async getTransaction(id) { 9 | let requestPayload = { 10 | id: id, 11 | }; 12 | // Sending message to contentScript.js: 13 | let result = await this.sendMessage('getTransaction', requestPayload); 14 | return result.response; 15 | } 16 | async submitTransactionProposal(request) { 17 | try { 18 | let requestPayload = { 19 | request: request, 20 | }; 21 | let result = await this.sendMessage('submitTransactionProposal', requestPayload); 22 | console.log('Proposal Response: ', result); 23 | return result.response; 24 | } catch (error) { 25 | console.log('Could not submit transaction proposal ERROR::', error); 26 | } 27 | } 28 | 29 | async submitSignedProposal(signedRequestPayload) { 30 | try { 31 | let requestPayload = { 32 | signedRequest: signedRequestPayload.proposalRequest, 33 | tx_id: signedRequestPayload.tx_id, 34 | }; 35 | let result = await this.sendMessage('submitSignedProposal', requestPayload); 36 | console.log('Signed result: ', result); 37 | return result.response; 38 | } catch (error) { 39 | console.log('Could not submit transaction ERROR::', error); 40 | } 41 | } 42 | 43 | async autoSubmitTransaction(request) { // Convience function to automatically send transaction & signed proposal 44 | let requestPayload = { 45 | request: request, 46 | }; 47 | try { 48 | let result = await this.sendMessage('autoSubmitTransaction', requestPayload); 49 | console.log('Signed result: ', result.response); 50 | return result.response; 51 | } catch (error) { 52 | console.log('Could not find item ERROR::', error); 53 | } 54 | } 55 | 56 | async queryLedger(request) { 57 | let requestPayload = { 58 | request: request, 59 | }; 60 | try { 61 | let result = await this.sendMessage('queryLedger', requestPayload); 62 | return this.convertResponseToJson(result); 63 | } catch (error) { 64 | console.log('Could not find item ERROR::', error); 65 | } 66 | } 67 | 68 | convertResponseToJson(result) { 69 | return JSON.parse(String(result.response.value)); 70 | } 71 | 72 | async sendMessage(function_name, payload) { 73 | // giving transaction message a random id similar to a hash to safely allow multiple transactions at once. 74 | let randomId = Math.random().toString(36).substring(7); 75 | let message = { 76 | type: 'webpage', 77 | id: randomId, 78 | function: function_name, 79 | payload: payload 80 | } 81 | window.postMessage(message, '*'); 82 | // Listen to messages from contentScript.js: 83 | const readMessage = () => new Promise(resolve => window.addEventListener('message', (event) => { 84 | if ((event.data.type === "background") && (event.data.id === randomId)) resolve(event.data); 85 | })); 86 | let result = await readMessage(); 87 | return result; 88 | } 89 | 90 | } 91 | var fabricInterface = new fabricController(); 92 | // Some js Frameworks work better with window objects rather than injected global variables. Both are available 93 | window.fabricInterface = fabricInterface; 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | -------------------------------------------------------------------------------- /fabric-chrome-extension/src/scripts/popup.js: -------------------------------------------------------------------------------- 1 | document.getElementById('network_url_button').addEventListener("click", 2 | (event) => { getNetworkEndpoints() }); 3 | 4 | document.getElementById('network_reset_button').addEventListener("click", 5 | (event) => { clearNetworkConfigStorage() }); 6 | 7 | document.getElementById('add_peer_button').addEventListener("click", 8 | (event) => { submitPeer() }); 9 | 10 | document.getElementById('submit_network_button').addEventListener("click", 11 | (event) => { submitNetworkConfig() }); 12 | 13 | document.getElementById('peer-add-button').addEventListener("click", 14 | (event) => { togglePeerInputDisplay() }); 15 | // Load stored network configurations to form. 16 | try { 17 | chrome.storage.sync.get(['networkConfig'], (results) => { 18 | if (typeof results.networkConfig.networkURL !== undefined) { 19 | $('#network_url_input').val(results.networkConfig.networkURL); 20 | $('#orderer_url_input').val(results.networkConfig.ordererURL); 21 | results.networkConfig.peerURLs.map((peer) => prependPeer(peer)); 22 | displaySavedPeers(); 23 | } 24 | }); 25 | } catch (error) { 26 | console.log('error with loading persisted settings'); 27 | } 28 | 29 | const getNetworkEndpoints = async() => { 30 | try { //http://localhost:8000 31 | let networkURL = document.getElementById('network_url_input').value; 32 | const response = await fetch(`${networkURL}/network`); 33 | const body = await response.json(); 34 | console.log('Network Response: ', body); 35 | $('.peer_list').empty(); 36 | body.peers.map((peer) => prependPeer(peer)); 37 | let ordererInput = document.getElementById('orderer_url_input'); 38 | ordererInput.value = body.orderers[0]; // Default is the first! 39 | } catch (error) { 40 | console.log('Error with setting network configurations'); 41 | } 42 | } 43 | // console.log('Peer and Orderer detected: ', getNetworkEndpoints()); 44 | const submitPeer = () => { 45 | let peerInput = $('#peer_url_input').val(); 46 | togglePeerInputDisplay(); 47 | prependPeer(peerInput); 48 | } 49 | 50 | const prependPeer = (peerURLs) => { 51 | if (peerURLs.length > 0) { 52 | $('
  • ').text(peerURLs).prependTo('.peer_list'); 53 | //console.log('peerInput', peerInput); 54 | $('#peer_url_input').val(''); 55 | $('.peer').click(function() { 56 | $(this).remove(); 57 | }); 58 | } 59 | } 60 | 61 | const displaySavedPeers = () => { 62 | $(".peer_list").find("li").each(function(){ 63 | $(this).removeClass('peer').addClass('peer saved'); 64 | }); 65 | } 66 | 67 | const togglePeerInputDisplay = () => { 68 | $('#peer-input-box').toggle(); 69 | } 70 | 71 | const submitNetworkConfig = () => { 72 | try { 73 | console.log('SHowing up?') 74 | let networkURL = $('#network_url_input').val(); 75 | let ordererURL = $('#orderer_url_input').val(); 76 | let peerURLs = []; 77 | $(".peer_list").find("li").each(function(){ 78 | let selected_peers = $(this).text(); 79 | peerURLs.push(selected_peers); 80 | }); 81 | displaySavedPeers(); 82 | chrome.tabs.query({active: true, currentWindow: true}, (tabs) => { 83 | chrome.storage.sync.set({ 84 | networkConfig: { 85 | networkURL: networkURL, 86 | ordererURL: ordererURL, 87 | peerURLs: peerURLs 88 | } 89 | }, () => { 90 | console.log('Stored Network Configurations'); 91 | }); 92 | }); 93 | } catch (error) { 94 | console.log('Error with submitting network from: ', error); 95 | } 96 | 97 | } 98 | 99 | const clearNetworkConfigStorage = () => { 100 | chrome.storage.sync.remove(['networkConfig'], (results) => { 101 | $('#network_url_input').val(''); 102 | $('#peer_url_input').val(''); 103 | $('#network_url_input').val(''); 104 | $('#orderer_url_input').val(''); 105 | $('.peer_list').html(''); 106 | }); 107 | } 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | -------------------------------------------------------------------------------- /fabric-chrome-extension/src/styles/confirmationPopup.css: -------------------------------------------------------------------------------- 1 | .popup-confirmation-outer-wrapper { 2 | margin: -7px; 3 | width: 350px; 4 | background-color: #F7F8FE; 5 | font-family: 'Helvetica', 'Arial', sans-serif; 6 | } 7 | 8 | .popup-confirmation-header { 9 | background-color: white; 10 | border-bottom-right-radius: 5px; 11 | border-bottom-left-radius: 5px; 12 | box-shadow: 0px 1px 8px grey; 13 | padding: 5px; 14 | text-align: center; 15 | } 16 | 17 | .popup-confirmation-transaction-wrapper { 18 | background-color: #FFFFFF; 19 | box-shadow: 0px 1px 8px grey; 20 | display: inline-block; 21 | margin: 15px; 22 | border-radius: 5px; 23 | } 24 | 25 | .popup-confirmation-transaction-label { 26 | font-weight: bold; 27 | } 28 | 29 | .popup-confirmation-transaction-data { 30 | text-align: right; 31 | margin-left: 10px; 32 | display: inline-block; 33 | } 34 | 35 | .popup-confirmation-content{ 36 | display: inline-block; 37 | margin: 5px; 38 | padding: 5px; 39 | border-radius: 5px; 40 | } 41 | 42 | .popup-confirmation-button-wrapper { 43 | margin-top: 10px; 44 | display: flex; 45 | text-align: center; 46 | justify-content: center; 47 | font-size: 30px; 48 | } 49 | 50 | h1 { 51 | font-size: 1em; 52 | } 53 | 54 | button { 55 | display: block; 56 | width: 54px; 57 | height: 33px; 58 | margin: 10px; 59 | line-height: 27px; 60 | border-radius: 20px; 61 | border: 1px solid #979797; 62 | font-size: 10px; 63 | color: white; 64 | background-color: #007bff; 65 | border-color: #007bff; 66 | } 67 | 68 | button:hover { 69 | background-color: #00b3db; 70 | } 71 | 72 | .loader { 73 | display: none; 74 | margin-left: 130px; 75 | margin-bottom: 10px; 76 | border: 16px solid #f3f3f3; /* Light grey */ 77 | border-top: 16px solid #3498db; /* Blue */ 78 | border-radius: 50%; 79 | width: 20px; 80 | height: 20px; 81 | animation: spin 1s linear infinite; 82 | } 83 | 84 | @keyframes spin { 85 | 0% { transform: rotate(0deg); } 86 | 100% { transform: rotate(360deg); } 87 | } -------------------------------------------------------------------------------- /fabric-chrome-extension/src/styles/popup.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: #F7F8FE; 3 | font-family: 'Helvetica', 'Arial', sans-serif; 4 | } 5 | .network-wrapper { 6 | width: 275px; 7 | height: 69px; 8 | margin: 10px; 9 | border-radius: 8px; 10 | background-color: #FFFFFF; 11 | box-shadow: 1px 1px 8px grey; 12 | } 13 | .network-wrapper.add-peer { 14 | display: none; 15 | margin-top: 15px; 16 | background-color: #D8D8D8; 17 | border: 1px solid #979797; 18 | } 19 | .form-wrapper { 20 | display: inline-block; 21 | margin-left: 15px; 22 | margin-top: 5px; 23 | } 24 | .network-wrapper-orderer { 25 | margin-left: 10px; 26 | } 27 | .peer-wrapper { 28 | width: 275px; 29 | margin: 10px; 30 | margin-top: 20px; 31 | background-color: #FFFFFF; 32 | border-radius: 8px; 33 | box-shadow: 1px 1px 8px grey; 34 | } 35 | .peer-inner-wrapper { 36 | display: inline-block; 37 | width: 85%; 38 | margin: 20px; 39 | } 40 | .peer-container{ 41 | display: flex; 42 | flex-direction: column; 43 | align-items: center; 44 | justify-content: center; 45 | } 46 | .peer_list { 47 | width: 75%; 48 | } 49 | .peer { 50 | height: 29px; 51 | width: 132px; 52 | margin-top: 15px; 53 | border-radius: 8px; 54 | background-color: #D8D8D8; 55 | border: 1px solid #979797; 56 | display: flex; 57 | align-items: center; 58 | justify-content: center; 59 | } 60 | .peer:hover { 61 | background-color: #dc3545; 62 | text-decoration: line-through; 63 | } 64 | .peer.saved{ 65 | background-color: #28a745; 66 | color: white; 67 | } 68 | 69 | .peer.saved:hover { 70 | background-color: #dc3545; 71 | text-decoration: line-through; 72 | } 73 | .peer-add-button { 74 | width: 34px; 75 | height: 33px; 76 | margin-top: 10px; 77 | display: flex; 78 | text-align: center; 79 | justify-content: center; 80 | line-height: 27px; 81 | border-radius: 20px; 82 | border: 1px solid #979797; 83 | box-shadow: 1px 1px 8px 1px #979797; 84 | background-color: #D8D8D8; 85 | font-size: 30px; 86 | } 87 | .peer-add-button:hover { 88 | background-color: white; 89 | } 90 | .submit-button-container { 91 | display: flex; 92 | align-items: center; 93 | justify-content: center; 94 | margin-top: 25px; 95 | } 96 | .button-submit { 97 | margin-right: 10px; 98 | background-color: #007bff; 99 | border-color: #007bff; 100 | border-radius: 8px; 101 | padding: 4px; 102 | } 103 | input{ 104 | width: 215px; 105 | height: 20px; 106 | border: 1px solid #9B9B9B; 107 | font-size: 1rem; 108 | color: #495057; 109 | border-radius: 4px; 110 | margin-top: 3px; 111 | } 112 | button { 113 | padding: 4px; 114 | border-radius: 3px; 115 | font-weight: 400; 116 | text-align: center; 117 | white-space: nowrap; 118 | vertical-align: middle; 119 | margin-top: -5px; 120 | color: #fff; 121 | background-color: #007bff; 122 | border-color: #007bff; 123 | } 124 | 125 | button:hover { 126 | background-color: #00b3db; 127 | } 128 | -------------------------------------------------------------------------------- /fabric-network/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-chrome-extension/438769b948b412f068ff1ec80f6633647eb6c272/fabric-network/.DS_Store -------------------------------------------------------------------------------- /fabric-network/Server/.gitignore: -------------------------------------------------------------------------------- 1 | # Emacs backup files 2 | *~ 3 | *# 4 | .#* 5 | # Vim file artifacts 6 | .*.sw* 7 | # installed platform-specific binaries 8 | /bin 9 | .DS_Store 10 | .project 11 | 12 | # fabric sdk node modules 13 | node_modules -------------------------------------------------------------------------------- /fabric-network/Server/README.md: -------------------------------------------------------------------------------- 1 | ## Hyperledger Fabric Sample Application 2 | 3 | This application demonstrates the creation and transfer of tuna fish shipments between actors leveraging Hyperledger Fabric in the supply chain. In this exercise we will set up the minimum number of nodes required to develop chaincode. It has a single peer and a single organization. 4 | 5 | if getting error about running ./startFabric.sh permission 6 | 7 | chmod a+x startFabric.sh 8 | 9 | This code is based on code written by the Hyperledger Fabric community. Source code can be found here: (https://github.com/hyperledger/fabric-samples). 10 | -------------------------------------------------------------------------------- /fabric-network/Server/network-config.yaml: -------------------------------------------------------------------------------- 1 | name: "Network" 2 | version: '1.0' 3 | 4 | channels: 5 | mychannel: 6 | orderers: 7 | - orderer.example.com 8 | peers: 9 | peer0.org1.example.com: 10 | endorsingPeer: true 11 | chaincodeQuery: true 12 | ledgerQuery: true 13 | eventSource: true 14 | discover: true 15 | peer0.org2.example.com: 16 | endorsingPeer: true 17 | chaincodeQuery: false 18 | ledgerQuery: true 19 | eventSource: false 20 | discover: true 21 | 22 | organizations: 23 | Org1: 24 | mspid: Org1MSP 25 | peers: 26 | - peer0.org1.example.com 27 | certificateAuthorities: 28 | - ca-org1 29 | adminPrivateKey: 30 | path: ../basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/9cbcbe051a2f2e901b44c9c560d069bf3abf2ce52dce4c28d30ecc13dd9a5807_sk 31 | signedCert: 32 | path: ../basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem 33 | 34 | Org2: 35 | mspid: Org2MSP 36 | peers: 37 | - peer0.org2.example.com 38 | certificateAuthorities: 39 | - ca-org2 40 | adminPrivateKey: 41 | path: ../basic-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/2ece1772d34f64c4c903034ce9e82f06b63f5c57ecf36060151571409fb5c68e_sk 42 | signedCert: 43 | path: ../basic-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem 44 | 45 | orderers: 46 | orderer.example.com: 47 | url: grpcs://localhost:7050 48 | grpcOptions: 49 | ssl-target-name-override: orderer.example.com 50 | grpc-max-send-message-length: 15 51 | tlsCACerts: 52 | path: ../basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert 53 | 54 | peers: 55 | peer0.org1.example.com: 56 | url: grpcs://localhost:7051 57 | grpcOptions: 58 | ssl-target-name-override: peer0.org1.example.com 59 | grpc.keepalive_time_ms: 600000 60 | tlsCACerts: 61 | path: ../basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts/org1.example.com-cert.pem 62 | 63 | peer0.org2.example.com: 64 | url: grpcs://localhost:9051 65 | grpcOptions: 66 | ssl-target-name-override: peer0.org2.example.com 67 | tlsCACerts: 68 | path: ../basic-network/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/tlscacerts/org2.example.com-cert.pem 69 | 70 | certificateAuthorities: 71 | ca-org1: 72 | url: https://localhost:7054 73 | httpOptions: 74 | verify: false 75 | tlsCACerts: 76 | path: ../basic-network/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert 77 | registrar: 78 | - enrollId: admin 79 | enrollSecret: adminpw 80 | caName: caorg1 81 | -------------------------------------------------------------------------------- /fabric-network/Server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Fabric-app", 3 | "version": "1.0.0", 4 | "description": "Hyperledger Fabric MOOC Sample Application", 5 | "main": "server.js", 6 | "dependencies": { 7 | "atob": "^2.1.1", 8 | "body-parser": "latest", 9 | "btoa": "^1.2.1", 10 | "bytebuffer": "^5.0.1", 11 | "ejs": "latest", 12 | "express": "latest", 13 | "fabric-ca-client": "^1.0.2", 14 | "fabric-client": "1.2.0", 15 | "grpc": "^1.13.0" 16 | }, 17 | "license": "Apache-2.0", 18 | "keywords": [ 19 | "Hyperledger", 20 | "Fabric", 21 | "Application" 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /fabric-network/Server/registerAdmin.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | /* 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | /* 6 | * Chaincode Invoke 7 | 8 | This code is based on code written by the Hyperledger Fabric community. 9 | Original code can be found here: https://gerrit.hyperledger.org/r/#/c/14395/4/fabcar/enrollAdmin.js 10 | */ 11 | 12 | var Fabric_Client = require('fabric-client'); 13 | var Fabric_CA_Client = require('fabric-ca-client'); 14 | 15 | var path = require('path'); 16 | var util = require('util'); 17 | var os = require('os'); 18 | 19 | // 20 | var fabric_client = new Fabric_Client(); 21 | var fabric_ca_client = null; 22 | var admin_user = null; 23 | var member_user = null; 24 | var store_path = path.join(os.homedir(), '.hfc-key-store'); 25 | console.log(' Store path:'+store_path); 26 | 27 | // create the key value store as defined in the fabric-client/config/default.json 'key-value-store' setting 28 | Fabric_Client.newDefaultKeyValueStore({ path: store_path 29 | }).then((state_store) => { 30 | // assign the store to the fabric client 31 | fabric_client.setStateStore(state_store); 32 | var crypto_suite = Fabric_Client.newCryptoSuite(); 33 | // use the same location for the state store (where the users' certificate are kept) 34 | // and the crypto store (where the users' keys are kept) 35 | var crypto_store = Fabric_Client.newCryptoKeyStore({path: store_path}); 36 | crypto_suite.setCryptoKeyStore(crypto_store); 37 | fabric_client.setCryptoSuite(crypto_suite); 38 | var tlsOptions = { 39 | trustedRoots: [], 40 | verify: false 41 | }; 42 | // be sure to change the http to https when the CA is running TLS enabled 43 | fabric_ca_client = new Fabric_CA_Client('http://localhost:7054', tlsOptions , 'ca.example.com', crypto_suite); 44 | 45 | // first check to see if the admin is already enrolled 46 | return fabric_client.getUserContext('admin', true); 47 | }).then((user_from_store) => { 48 | if (user_from_store && user_from_store.isEnrolled()) { 49 | console.log('Successfully loaded admin from persistence'); 50 | admin_user = user_from_store; 51 | return null; 52 | } else { 53 | // need to enroll it with CA server 54 | return fabric_ca_client.enroll({ 55 | enrollmentID: 'admin', 56 | enrollmentSecret: 'adminpw' 57 | }).then((enrollment) => { 58 | console.log('Successfully enrolled admin user "admin"'); 59 | return fabric_client.createUser( 60 | {username: 'admin', 61 | mspid: 'Org1MSP', 62 | cryptoContent: { privateKeyPEM: enrollment.key.toBytes(), signedCertPEM: enrollment.certificate } 63 | }); 64 | }).then((user) => { 65 | admin_user = user; 66 | return fabric_client.setUserContext(admin_user); 67 | }).catch((err) => { 68 | console.error('Failed to enroll and persist admin. Error: ' + err.stack ? err.stack : err); 69 | throw new Error('Failed to enroll admin'); 70 | }); 71 | } 72 | }).then(() => { 73 | console.log('Assigned the admin user to the fabric client ::' + admin_user.toString()); 74 | }).catch((err) => { 75 | console.error('Failed to enroll admin: ' + err); 76 | }); -------------------------------------------------------------------------------- /fabric-network/Server/registerUser.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | /* 3 | * SPDX-License-Identifier: Apache-2.0 4 | */ 5 | /* 6 | * Chaincode Invoke 7 | 8 | This code is based on code written by the Hyperledger Fabric community. 9 | Original code can be found here: https://gerrit.hyperledger.org/r/#/c/14395/4/fabcar/registerUser.js 10 | 11 | */ 12 | 13 | var Fabric_Client = require('fabric-client'); 14 | var Fabric_CA_Client = require('fabric-ca-client'); 15 | 16 | var path = require('path'); 17 | var util = require('util'); 18 | var os = require('os'); 19 | 20 | var fabric_client = new Fabric_Client(); 21 | var fabric_ca_client = null; 22 | var admin_user = null; 23 | var member_user = null; 24 | var store_path = path.join(os.homedir(), '.hfc-key-store'); 25 | console.log(' Store path:' + store_path); 26 | 27 | // create the key value store as defined in the fabric-client/config/default.json 'key-value-store' setting 28 | Fabric_Client.newDefaultKeyValueStore({ path: store_path 29 | }).then((state_store) => { 30 | // assign the store to the fabric client 31 | fabric_client.setStateStore(state_store); 32 | var crypto_suite = Fabric_Client.newCryptoSuite(); 33 | // use the same location for the state store (where the users' certificate are kept) 34 | // and the crypto store (where the users' keys are kept) 35 | var crypto_store = Fabric_Client.newCryptoKeyStore({path: store_path}); 36 | crypto_suite.setCryptoKeyStore(crypto_store); 37 | fabric_client.setCryptoSuite(crypto_suite); 38 | var tlsOptions = { 39 | trustedRoots: [], 40 | verify: false 41 | }; 42 | // be sure to change the http to https when the CA is running TLS enabled 43 | fabric_ca_client = new Fabric_CA_Client('http://localhost:7054', null , '', crypto_suite); 44 | 45 | // first check to see if the admin is already enrolled 46 | return fabric_client.getUserContext('admin', true); 47 | }).then((user_from_store) => { 48 | if (user_from_store && user_from_store.isEnrolled()) { 49 | console.log('Successfully loaded admin from persistence'); 50 | admin_user = user_from_store; 51 | } else { 52 | throw new Error('Failed to get admin.... run registerAdmin.js'); 53 | } 54 | 55 | // at this point we should have the admin user 56 | // first need to register the user with the CA server 57 | return fabric_ca_client.register({enrollmentID: 'user1', affiliation: 'org1.department1'}, admin_user); 58 | }).then((secret) => { 59 | // next we need to enroll the user with CA server 60 | console.log('Successfully registered user1 - secret:'+ secret); 61 | 62 | return fabric_ca_client.enroll({enrollmentID: 'user1', enrollmentSecret: secret}); 63 | }).then((enrollment) => { 64 | console.log('Successfully enrolled member user "user1" '); 65 | return fabric_client.createUser( 66 | {username: 'user1', 67 | mspid: 'Org1MSP', 68 | cryptoContent: { privateKeyPEM: enrollment.key.toBytes(), signedCertPEM: enrollment.certificate } 69 | }); 70 | }).then((user) => { 71 | member_user = user; 72 | 73 | return fabric_client.setUserContext(member_user); 74 | }).then(()=>{ 75 | console.log('User1 was successfully registered and enrolled and is ready to intreact with the fabric network'); 76 | 77 | }).catch((err) => { 78 | console.error('Failed to register: ' + err); 79 | if(err.toString().indexOf('Authorization') > -1) { 80 | console.error('Authorization failures may be caused by having admin credentials from a previous CA instance.\n' + 81 | 'Try again after deleting the contents of the store directory '+store_path); 82 | } 83 | }); -------------------------------------------------------------------------------- /fabric-network/Server/routes.js: -------------------------------------------------------------------------------- 1 | //SPDX-License-Identifier: Apache-2.0 2 | 3 | var controller = require('./controller.js'); 4 | 5 | module.exports = (app) => { 6 | app.get('/network', (req, res) => { 7 | controller.getNetwork(req, res); 8 | }); 9 | app.post('/getTransaction', (req, res) => { 10 | controller.getTransaction(req, res); 11 | }); 12 | app.post('/autoSubmitTransaction', (req, res) => { 13 | controller.autoSubmitTransaction(req, res); 14 | }); 15 | app.post('/submitTransactionProposal', (req, res) => { 16 | controller.submitTransactionProposal(req, res); 17 | }); 18 | app.post('/submitSignedProposal', (req, res) => { 19 | controller.submitSignedProposal(req, res); 20 | }); 21 | app.post('/queryLedger', (req, res) => { 22 | controller.queryLedger(req, res); 23 | }); 24 | } 25 | -------------------------------------------------------------------------------- /fabric-network/Server/server.js: -------------------------------------------------------------------------------- 1 | //SPDX-License-Identifier: Apache-2.0 2 | 3 | // nodejs server setup 4 | 5 | // call the packages we need 6 | var express = require('express'); // call express 7 | var app = express(); // define our app using express 8 | var cors = require('cors') 9 | var bodyParser = require('body-parser'); 10 | var http = require('http') 11 | var fs = require('fs'); 12 | var Fabric_Client = require('fabric-client'); 13 | var path = require('path'); 14 | var util = require('util'); 15 | var os = require('os'); 16 | 17 | var app = express(); 18 | 19 | app.use((req, res, next) => { 20 | res.header("Access-Control-Allow-Origin", "*"); 21 | res.header("Access-Control-Allow-Headers", "Origin, X-Requested-With, Content-Type, Accept"); 22 | next(); 23 | }); 24 | 25 | app.use(bodyParser.json()); 26 | 27 | require('./routes.js')(app); 28 | 29 | // Save our port 30 | var port = process.env.PORT || 8000; 31 | 32 | // Start the server and listen on port 33 | app.listen(port,() => { 34 | console.log("Live on port: " + port); 35 | }); 36 | 37 | -------------------------------------------------------------------------------- /fabric-network/Server/setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Install Fabric binaries 4 | curl -sSL http://bit.ly/2ysbOFE | bash -s 1.2.0 1.2.0 0.4.10 5 | sleep 5 6 | 7 | export PATH=$PWD/bin:$PATH 8 | 9 | # start network script 10 | bash ./startFabric.sh 11 | # Remove user log key store before login 12 | rm ~/.hfc-key-store/* 13 | 14 | #node scripts for registering Admin and uers 15 | node registerAdmin.js 16 | sleep 5 17 | node registerUser.js 18 | # Start middleware for Chrome Extension 19 | node server.js -------------------------------------------------------------------------------- /fabric-network/Server/startFabric.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # SPDX-License-Identifier: Apache-2.0 4 | # This code is based on code written by the Hyperledger Fabric community. 5 | # Original code can be found here: https://github.com/hyperledger/fabric-samples/blob/release/fabcar/startFabric.sh 6 | # 7 | # Exit on first error 8 | 9 | set -e 10 | 11 | # don't rewrite paths for Windows Git Bash users 12 | export MSYS_NO_PATHCONV=1 13 | 14 | starttime=$(date +%s) 15 | 16 | if [ ! -d ~/.hfc-key-store/ ]; then 17 | mkdir ~/.hfc-key-store/ 18 | fi 19 | 20 | # launch network; create channel and join peer to channel 21 | cd ../basic-network 22 | ./start.sh 23 | 24 | # Now launch the CLI container in order to install, instantiate chaincode 25 | # and prime the ledger with our 10 tuna catches 26 | 27 | # docker-compose -f ./docker-compose.yml up #VERY IMPORTANT ASK ABOUT THIS!!!!! Need this to run chaincode 28 | docker-compose -f ./docker-compose.yml up -d cli 29 | 30 | # cd ../Boat-app 31 | # echo "Deleting Previous Keys" 32 | # rm ~/.hfc-key-store/* 33 | # echo "Registering Admin and User" 34 | # node registerAdmin.js 35 | # sleep 10 36 | # node registerUser.js 37 | # sleep 10 38 | 39 | # cd ../basic-network 40 | # docker exec -it cli bash 41 | # echo "Installing ChainCode on Peers" 42 | 43 | 44 | printf "\nTotal execution time : $(($(date +%s) - starttime)) secs ...\n\n" 45 | printf "\nStart with the registerAdmin.js, then registerUser.js, then server.js\n\n" -------------------------------------------------------------------------------- /fabric-network/basic-network/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-chrome-extension/438769b948b412f068ff1ec80f6633647eb6c272/fabric-network/basic-network/.DS_Store -------------------------------------------------------------------------------- /fabric-network/basic-network/.env: -------------------------------------------------------------------------------- 1 | COMPOSE_PROJECT_NAME=net 2 | -------------------------------------------------------------------------------- /fabric-network/basic-network/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 | This code is written by the Hyperledger Fabric community. Original source code can be found here: (https://github.com/hyperledger/fabric-samples). 15 | 16 | ## Licenses 17 | 18 | Source code is licensed under the Apache License, Version 2.0 (the "License"). You may obtain a copy of the License at 19 | 20 | (http://www.apache.org/licenses/LICENSE-2.0) 21 | 22 | 23 | Creative Commons License
    Documentation is licensed under a Creative Commons Attribution 4.0 International License 24 | 25 | -------------------------------------------------------------------------------- /fabric-network/basic-network/config/Org1MSPanchors.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-chrome-extension/438769b948b412f068ff1ec80f6633647eb6c272/fabric-network/basic-network/config/Org1MSPanchors.tx -------------------------------------------------------------------------------- /fabric-network/basic-network/config/Org2MSPanchors.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-chrome-extension/438769b948b412f068ff1ec80f6633647eb6c272/fabric-network/basic-network/config/Org2MSPanchors.tx -------------------------------------------------------------------------------- /fabric-network/basic-network/config/channel.tx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-chrome-extension/438769b948b412f068ff1ec80f6633647eb6c272/fabric-network/basic-network/config/channel.tx -------------------------------------------------------------------------------- /fabric-network/basic-network/config/genesis.block: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-chrome-extension/438769b948b412f068ff1ec80f6633647eb6c272/fabric-network/basic-network/config/genesis.block -------------------------------------------------------------------------------- /fabric-network/basic-network/config/mychannel.block: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-chrome-extension/438769b948b412f068ff1ec80f6633647eb6c272/fabric-network/basic-network/config/mychannel.block -------------------------------------------------------------------------------- /fabric-network/basic-network/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 | - &Org2 48 | # DefaultOrg defines the organization which is used in the sampleconfig 49 | # of the fabric.git development environment 50 | Name: Org2MSP 51 | 52 | # ID to load the MSP definition as 53 | ID: Org2MSP 54 | 55 | MSPDir: crypto-config/peerOrganizations/org2.example.com/msp 56 | 57 | AnchorPeers: 58 | # AnchorPeers defines the location of peers which can be used 59 | # for cross org gossip communication. Note, this value is only 60 | # encoded in the genesis block in the Application section context 61 | - Host: peer0.org2.example.com 62 | Port: 7051 #TODO: Change port? 63 | 64 | 65 | ################################################################################ 66 | # 67 | # SECTION: Orderer 68 | # 69 | # - This section defines the values to encode into a config transaction or 70 | # genesis block for orderer related parameters 71 | # 72 | ################################################################################ 73 | Orderer: &OrdererDefaults 74 | 75 | # Orderer Type: The orderer implementation to start 76 | # Available types are "solo" and "kafka" 77 | OrdererType: solo 78 | 79 | Addresses: 80 | - orderer.example.com:7050 81 | 82 | # Batch Timeout: The amount of time to wait before creating a batch 83 | BatchTimeout: 2s 84 | 85 | # Batch Size: Controls the number of messages batched into a block 86 | BatchSize: 87 | 88 | # Max Message Count: The maximum number of messages to permit in a batch 89 | MaxMessageCount: 10 90 | 91 | # Absolute Max Bytes: The absolute maximum number of bytes allowed for 92 | # the serialized messages in a batch. 93 | AbsoluteMaxBytes: 99 MB 94 | 95 | # Preferred Max Bytes: The preferred maximum number of bytes allowed for 96 | # the serialized messages in a batch. A message larger than the preferred 97 | # max bytes will result in a batch larger than preferred max bytes. 98 | PreferredMaxBytes: 512 KB 99 | 100 | Kafka: 101 | # Brokers: A list of Kafka brokers to which the orderer connects 102 | # NOTE: Use IP:port notation 103 | Brokers: 104 | - 127.0.0.1:9092 105 | 106 | # Organizations is the list of orgs which are defined as participants on 107 | # the orderer side of the network 108 | Organizations: 109 | 110 | ################################################################################ 111 | # 112 | # SECTION: Application 113 | # 114 | # - This section defines the values to encode into a config transaction or 115 | # genesis block for application related parameters 116 | # 117 | ################################################################################ 118 | Application: &ApplicationDefaults 119 | 120 | # Organizations is the list of orgs which are defined as participants on 121 | # the application side of the network 122 | Organizations: 123 | 124 | ################################################################################ 125 | # 126 | # Profile 127 | # 128 | # - Different configuration profiles may be encoded here to be specified 129 | # as parameters to the configtxgen tool 130 | # 131 | ################################################################################ 132 | Profiles: 133 | 134 | OneOrgOrdererGenesis: 135 | Orderer: 136 | <<: *OrdererDefaults 137 | Organizations: 138 | - *OrdererOrg 139 | Consortiums: 140 | SampleConsortium: 141 | Organizations: 142 | - *Org1 143 | - *Org2 144 | OneOrgChannel: 145 | Consortium: SampleConsortium 146 | Application: 147 | <<: *ApplicationDefaults 148 | Organizations: 149 | - *Org1 150 | - *Org2 151 | 152 | 153 | 154 | -------------------------------------------------------------------------------- /fabric-network/basic-network/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 | # --------------------------------------------------------------------------- 31 | # "Specs" 32 | # --------------------------------------------------------------------------- 33 | # Uncomment this section to enable the explicit definition of hosts in your 34 | # configuration. Most users will want to use Template, below 35 | # 36 | # Specs is an array of Spec entries. Each Spec entry consists of two fields: 37 | # - Hostname: (Required) The desired hostname, sans the domain. 38 | # - CommonName: (Optional) Specifies the template or explicit override for 39 | # the CN. By default, this is the template: 40 | # 41 | # "{{.Hostname}}.{{.Domain}}" 42 | # 43 | # which obtains its values from the Spec.Hostname and 44 | # Org.Domain, respectively. 45 | # --------------------------------------------------------------------------- 46 | # Specs: 47 | # - Hostname: foo # implicitly "foo.org1.example.com" 48 | # CommonName: foo27.org5.example.com # overrides Hostname-based FQDN set above 49 | # - Hostname: bar 50 | # - Hostname: baz 51 | # --------------------------------------------------------------------------- 52 | # "Template" 53 | # --------------------------------------------------------------------------- 54 | # Allows for the definition of 1 or more hosts that are created sequentially 55 | # from a template. By default, this looks like "peer%d" from 0 to Count-1. 56 | # You may override the number of nodes (Count), the starting index (Start) 57 | # or the template used to construct the name (Hostname). 58 | # 59 | # Note: Template and Specs are not mutually exclusive. You may define both 60 | # sections and the aggregate nodes will be created for you. Take care with 61 | # name collisions 62 | # --------------------------------------------------------------------------- 63 | Template: 64 | Count: 1 65 | # Start: 5 66 | # Hostname: {{.Prefix}}{{.Index}} # default 67 | # --------------------------------------------------------------------------- 68 | # "Users" 69 | # --------------------------------------------------------------------------- 70 | # Count: The number of user accounts _in addition_ to Admin 71 | # --------------------------------------------------------------------------- 72 | Users: 73 | Count: 1 74 | 75 | 76 | 77 | - Name: Org2 78 | Domain: org2.example.com 79 | 80 | Template: 81 | Count: 1 82 | 83 | Users: 84 | Count: 1 85 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-chrome-extension/438769b948b412f068ff1ec80f6633647eb6c272/fabric-network/basic-network/crypto-config/.DS_Store -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/ca/8fa1400ab48dd142b89ac9647fa6e89e0b442339ed74fdb17dd17fa9ef7efe7f_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgiBlwQtn1f6I+vjL5 3 | PbSaeSyD3hmi8q9od4NWAkGBdUahRANCAAQcBpWCtWk6XpLaKtO0KkFhxoIG9F3m 4 | mMY8uOp4d+AJjmJ2EPqHncipk2gB9Oirx7KfhEfmYDaFNVc9s0sDNW4y 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/ca/ca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICMDCCAdagAwIBAgIRAJttQhOPcFdyvqkG5b22SOwwCgYIKoZIzj0EAwIwaTEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt 5 | cGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZaMGkxCzAJBgNV 6 | BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp 7 | c2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEXMBUGA1UEAxMOY2EuZXhhbXBsZS5j 8 | b20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQcBpWCtWk6XpLaKtO0KkFhxoIG 9 | 9F3mmMY8uOp4d+AJjmJ2EPqHncipk2gB9Oirx7KfhEfmYDaFNVc9s0sDNW4yo18w 10 | XTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMBAf8EBTAD 11 | AQH/MCkGA1UdDgQiBCCPoUAKtI3RQriayWR/puieC0QjOe10/bF90X+p737+fzAK 12 | BggqhkjOPQQDAgNIADBFAiEAnJcruSnUAimmOv1Ot5/VtvCxuGYQecN+xV56tkrf 13 | fuICIH3yacZoaV8/G/lypRdRPAwPCBJnzEaP03DIxNSkzSJX 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/msp/admincerts/Admin@example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICCjCCAbCgAwIBAgIQBHKOuDLEEDPxsTFWe4FdvTAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTE4MDgwMjE3MTcwNloXDTI4MDczMDE3MTcwNlowVjELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xGjAYBgNVBAMMEUFkbWluQGV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI 8 | zj0DAQcDQgAEoRXQjCc+uT+tbhMk7dBUF3R8MxcIWYnjKoNwECKDGZ0Ob3MQ2bN/ 9 | ALXA+N5AEg7w8qc3misilnm+f4pat/3FfqNNMEswDgYDVR0PAQH/BAQDAgeAMAwG 10 | A1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgj6FACrSN0UK4mslkf6bongtEIzntdP2x 11 | fdF/qe9+/n8wCgYIKoZIzj0EAwIDSAAwRQIhAJiXhGh7DF726qLskp2n44/dsNfR 12 | UOCznR5H3RIHkvn+AiAoXhH3RuoyNITg9wMqOE4dgAXS8ClUeTPzxH+qwR1RKg== 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/msp/cacerts/ca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICMDCCAdagAwIBAgIRAJttQhOPcFdyvqkG5b22SOwwCgYIKoZIzj0EAwIwaTEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt 5 | cGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZaMGkxCzAJBgNV 6 | BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp 7 | c2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEXMBUGA1UEAxMOY2EuZXhhbXBsZS5j 8 | b20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQcBpWCtWk6XpLaKtO0KkFhxoIG 9 | 9F3mmMY8uOp4d+AJjmJ2EPqHncipk2gB9Oirx7KfhEfmYDaFNVc9s0sDNW4yo18w 10 | XTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMBAf8EBTAD 11 | AQH/MCkGA1UdDgQiBCCPoUAKtI3RQriayWR/puieC0QjOe10/bF90X+p737+fzAK 12 | BggqhkjOPQQDAgNIADBFAiEAnJcruSnUAimmOv1Ot5/VtvCxuGYQecN+xV56tkrf 13 | fuICIH3yacZoaV8/G/lypRdRPAwPCBJnzEaP03DIxNSkzSJX 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/msp/tlscacerts/tlsca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNTCCAdugAwIBAgIQSeLwX0q/x1ugv5MYxKilYDAKBggqhkjOPQQDAjBsMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4 5 | YW1wbGUuY29tMB4XDTE4MDgwMjE3MTcwNloXDTI4MDczMDE3MTcwNlowbDELMAkG 6 | A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu 7 | Y2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5leGFt 8 | cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABErIjkmCMCif/Qv1BkNU 9 | pGcQKiwokzXjzPLwdf88b+X1duZW5zYGZiT1Ne5MR4CV2uZySbpzNbIJyWaAj+VP 10 | pb+jXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB 11 | /wQFMAMBAf8wKQYDVR0OBCIEIILh4HSengk7M6jiAQdClPcei+r7G0+zraYhO7Zq 12 | 2+JdMAoGCCqGSM49BAMCA0gAMEUCIQD38rv1hVabu92tLi6mxlRc/gE+7ToSMW+X 13 | nGlUsEK7bwIgdX9Iiz0To2mWGDPYJl3Uu9zg0jBavA0tCV8lH/M+6ec= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/admincerts/Admin@example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICCjCCAbCgAwIBAgIQBHKOuDLEEDPxsTFWe4FdvTAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTE4MDgwMjE3MTcwNloXDTI4MDczMDE3MTcwNlowVjELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xGjAYBgNVBAMMEUFkbWluQGV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI 8 | zj0DAQcDQgAEoRXQjCc+uT+tbhMk7dBUF3R8MxcIWYnjKoNwECKDGZ0Ob3MQ2bN/ 9 | ALXA+N5AEg7w8qc3misilnm+f4pat/3FfqNNMEswDgYDVR0PAQH/BAQDAgeAMAwG 10 | A1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgj6FACrSN0UK4mslkf6bongtEIzntdP2x 11 | fdF/qe9+/n8wCgYIKoZIzj0EAwIDSAAwRQIhAJiXhGh7DF726qLskp2n44/dsNfR 12 | UOCznR5H3RIHkvn+AiAoXhH3RuoyNITg9wMqOE4dgAXS8ClUeTPzxH+qwR1RKg== 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/cacerts/ca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICMDCCAdagAwIBAgIRAJttQhOPcFdyvqkG5b22SOwwCgYIKoZIzj0EAwIwaTEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt 5 | cGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZaMGkxCzAJBgNV 6 | BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp 7 | c2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEXMBUGA1UEAxMOY2EuZXhhbXBsZS5j 8 | b20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQcBpWCtWk6XpLaKtO0KkFhxoIG 9 | 9F3mmMY8uOp4d+AJjmJ2EPqHncipk2gB9Oirx7KfhEfmYDaFNVc9s0sDNW4yo18w 10 | XTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMBAf8EBTAD 11 | AQH/MCkGA1UdDgQiBCCPoUAKtI3RQriayWR/puieC0QjOe10/bF90X+p737+fzAK 12 | BggqhkjOPQQDAgNIADBFAiEAnJcruSnUAimmOv1Ot5/VtvCxuGYQecN+xV56tkrf 13 | fuICIH3yacZoaV8/G/lypRdRPAwPCBJnzEaP03DIxNSkzSJX 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/keystore/84777acf9ed8e38a7562e0a3e8f2cad25e91d3a4052827a3a22c1eaf7d5f1208_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgisGJuFB9XjG0Amki 3 | p1v6XaXiGsKWcODjBEP4sXYWpxyhRANCAASSci109MYtKXEEZlOft4pkiIgxiiLL 4 | W0IBN/ndTydh4RF93lYFBLdsocenq8nb4Mzm4usulGCgd2TAWVClsqqQ 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/signcerts/orderer.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICDDCCAbKgAwIBAgIQIA1armVrQ7cx4a2n5krnozAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTE4MDgwMjE3MTcwNloXDTI4MDczMDE3MTcwNlowWDELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xHDAaBgNVBAMTE29yZGVyZXIuZXhhbXBsZS5jb20wWTATBgcqhkjOPQIBBggq 8 | hkjOPQMBBwNCAASSci109MYtKXEEZlOft4pkiIgxiiLLW0IBN/ndTydh4RF93lYF 9 | BLdsocenq8nb4Mzm4usulGCgd2TAWVClsqqQo00wSzAOBgNVHQ8BAf8EBAMCB4Aw 10 | DAYDVR0TAQH/BAIwADArBgNVHSMEJDAigCCPoUAKtI3RQriayWR/puieC0QjOe10 11 | /bF90X+p737+fzAKBggqhkjOPQQDAgNIADBFAiEA0+dEV+UqnBOtaH5Z+IxzZqzF 12 | A7DDfxbIJmmbBLnW7L0CIHdOs/MzW+ZN9qJ+gAfrFiov8jySwoY5K8yW0KlkKAF/ 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/msp/tlscacerts/tlsca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNTCCAdugAwIBAgIQSeLwX0q/x1ugv5MYxKilYDAKBggqhkjOPQQDAjBsMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4 5 | YW1wbGUuY29tMB4XDTE4MDgwMjE3MTcwNloXDTI4MDczMDE3MTcwNlowbDELMAkG 6 | A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu 7 | Y2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5leGFt 8 | cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABErIjkmCMCif/Qv1BkNU 9 | pGcQKiwokzXjzPLwdf88b+X1duZW5zYGZiT1Ne5MR4CV2uZySbpzNbIJyWaAj+VP 10 | pb+jXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB 11 | /wQFMAMBAf8wKQYDVR0OBCIEIILh4HSengk7M6jiAQdClPcei+r7G0+zraYhO7Zq 12 | 2+JdMAoGCCqGSM49BAMCA0gAMEUCIQD38rv1hVabu92tLi6mxlRc/gE+7ToSMW+X 13 | nGlUsEK7bwIgdX9Iiz0To2mWGDPYJl3Uu9zg0jBavA0tCV8lH/M+6ec= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNTCCAdugAwIBAgIQSeLwX0q/x1ugv5MYxKilYDAKBggqhkjOPQQDAjBsMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4 5 | YW1wbGUuY29tMB4XDTE4MDgwMjE3MTcwNloXDTI4MDczMDE3MTcwNlowbDELMAkG 6 | A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu 7 | Y2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5leGFt 8 | cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABErIjkmCMCif/Qv1BkNU 9 | pGcQKiwokzXjzPLwdf88b+X1duZW5zYGZiT1Ne5MR4CV2uZySbpzNbIJyWaAj+VP 10 | pb+jXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB 11 | /wQFMAMBAf8wKQYDVR0OBCIEIILh4HSengk7M6jiAQdClPcei+r7G0+zraYhO7Zq 12 | 2+JdMAoGCCqGSM49BAMCA0gAMEUCIQD38rv1hVabu92tLi6mxlRc/gE+7ToSMW+X 13 | nGlUsEK7bwIgdX9Iiz0To2mWGDPYJl3Uu9zg0jBavA0tCV8lH/M+6ec= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICWjCCAgCgAwIBAgIRAJtnTRUFimTMovGFlsktkh0wCgYIKoZIzj0EAwIwbDEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l 5 | eGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZaMFgxCzAJ 6 | BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh 7 | bmNpc2NvMRwwGgYDVQQDExNvcmRlcmVyLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0C 8 | AQYIKoZIzj0DAQcDQgAELl8tfl1xfpN9UJsl63QZj7ezL65gMk8F2vUJU1INmxln 9 | hoMB3UYcaFBVOudben8nh4I3NdW5cqiptfMgGgmoeKOBljCBkzAOBgNVHQ8BAf8E 10 | BAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMAwGA1UdEwEB/wQC 11 | MAAwKwYDVR0jBCQwIoAgguHgdJ6eCTszqOIBB0KU9x6L6vsbT7OtpiE7tmrb4l0w 12 | JwYDVR0RBCAwHoITb3JkZXJlci5leGFtcGxlLmNvbYIHb3JkZXJlcjAKBggqhkjO 13 | PQQDAgNIADBFAiEAp6ynmk20/8hp5HI8U2bnvpXhZxU5bl3Q4emkVCdd/9wCIHtG 14 | PgeD86M4P0A2SRXPxXNNKaEYZx/NiHBf7lniIFNu 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/orderers/orderer.example.com/tls/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgWRdRxSLUidHDzmSD 3 | W1UUOKXVMn8yeJfr07JIgXKcEzahRANCAAQuXy1+XXF+k31QmyXrdBmPt7MvrmAy 4 | TwXa9QlTUg2bGWeGgwHdRhxoUFU651t6fyeHgjc11blyqKm18yAaCah4 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/tlsca/82e1e0749e9e093b33a8e201074294f71e8beafb1b4fb3ada6213bb66adbe25d_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgrEVqvMez4XugkjC6 3 | dokgM6XYcNmVEsR70IRQYUcle0+hRANCAARKyI5JgjAon/0L9QZDVKRnECosKJM1 4 | 48zy8HX/PG/l9XbmVuc2BmYk9TXuTEeAldrmckm6czWyCclmgI/lT6W/ 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/tlsca/tlsca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNTCCAdugAwIBAgIQSeLwX0q/x1ugv5MYxKilYDAKBggqhkjOPQQDAjBsMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4 5 | YW1wbGUuY29tMB4XDTE4MDgwMjE3MTcwNloXDTI4MDczMDE3MTcwNlowbDELMAkG 6 | A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu 7 | Y2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5leGFt 8 | cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABErIjkmCMCif/Qv1BkNU 9 | pGcQKiwokzXjzPLwdf88b+X1duZW5zYGZiT1Ne5MR4CV2uZySbpzNbIJyWaAj+VP 10 | pb+jXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB 11 | /wQFMAMBAf8wKQYDVR0OBCIEIILh4HSengk7M6jiAQdClPcei+r7G0+zraYhO7Zq 12 | 2+JdMAoGCCqGSM49BAMCA0gAMEUCIQD38rv1hVabu92tLi6mxlRc/gE+7ToSMW+X 13 | nGlUsEK7bwIgdX9Iiz0To2mWGDPYJl3Uu9zg0jBavA0tCV8lH/M+6ec= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/admincerts/Admin@example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICCjCCAbCgAwIBAgIQBHKOuDLEEDPxsTFWe4FdvTAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTE4MDgwMjE3MTcwNloXDTI4MDczMDE3MTcwNlowVjELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xGjAYBgNVBAMMEUFkbWluQGV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI 8 | zj0DAQcDQgAEoRXQjCc+uT+tbhMk7dBUF3R8MxcIWYnjKoNwECKDGZ0Ob3MQ2bN/ 9 | ALXA+N5AEg7w8qc3misilnm+f4pat/3FfqNNMEswDgYDVR0PAQH/BAQDAgeAMAwG 10 | A1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgj6FACrSN0UK4mslkf6bongtEIzntdP2x 11 | fdF/qe9+/n8wCgYIKoZIzj0EAwIDSAAwRQIhAJiXhGh7DF726qLskp2n44/dsNfR 12 | UOCznR5H3RIHkvn+AiAoXhH3RuoyNITg9wMqOE4dgAXS8ClUeTPzxH+qwR1RKg== 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/cacerts/ca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICMDCCAdagAwIBAgIRAJttQhOPcFdyvqkG5b22SOwwCgYIKoZIzj0EAwIwaTEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRcwFQYDVQQDEw5jYS5leGFt 5 | cGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZaMGkxCzAJBgNV 6 | BAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJhbmNp 7 | c2NvMRQwEgYDVQQKEwtleGFtcGxlLmNvbTEXMBUGA1UEAxMOY2EuZXhhbXBsZS5j 8 | b20wWTATBgcqhkjOPQIBBggqhkjOPQMBBwNCAAQcBpWCtWk6XpLaKtO0KkFhxoIG 9 | 9F3mmMY8uOp4d+AJjmJ2EPqHncipk2gB9Oirx7KfhEfmYDaFNVc9s0sDNW4yo18w 10 | XTAOBgNVHQ8BAf8EBAMCAaYwDwYDVR0lBAgwBgYEVR0lADAPBgNVHRMBAf8EBTAD 11 | AQH/MCkGA1UdDgQiBCCPoUAKtI3RQriayWR/puieC0QjOe10/bF90X+p737+fzAK 12 | BggqhkjOPQQDAgNIADBFAiEAnJcruSnUAimmOv1Ot5/VtvCxuGYQecN+xV56tkrf 13 | fuICIH3yacZoaV8/G/lypRdRPAwPCBJnzEaP03DIxNSkzSJX 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/keystore/b4461c73d25f407033370503dfcab7551dbf003caa8d70532cd3ae191aeca086_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg/j9DUyQ8Gy8YkrC9 3 | Bl1dez6fECj5loxLaWoZz3EQqYOhRANCAAShFdCMJz65P61uEyTt0FQXdHwzFwhZ 4 | ieMqg3AQIoMZnQ5vcxDZs38AtcD43kASDvDypzeaKyKWeb5/ilq3/cV+ 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/signcerts/Admin@example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICCjCCAbCgAwIBAgIQBHKOuDLEEDPxsTFWe4FdvTAKBggqhkjOPQQDAjBpMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xFzAVBgNVBAMTDmNhLmV4YW1w 5 | bGUuY29tMB4XDTE4MDgwMjE3MTcwNloXDTI4MDczMDE3MTcwNlowVjELMAkGA1UE 6 | BhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFuY2lz 7 | Y28xGjAYBgNVBAMMEUFkbWluQGV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZI 8 | zj0DAQcDQgAEoRXQjCc+uT+tbhMk7dBUF3R8MxcIWYnjKoNwECKDGZ0Ob3MQ2bN/ 9 | ALXA+N5AEg7w8qc3misilnm+f4pat/3FfqNNMEswDgYDVR0PAQH/BAQDAgeAMAwG 10 | A1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgj6FACrSN0UK4mslkf6bongtEIzntdP2x 11 | fdF/qe9+/n8wCgYIKoZIzj0EAwIDSAAwRQIhAJiXhGh7DF726qLskp2n44/dsNfR 12 | UOCznR5H3RIHkvn+AiAoXhH3RuoyNITg9wMqOE4dgAXS8ClUeTPzxH+qwR1RKg== 13 | -----END CERTIFICATE----- 14 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/msp/tlscacerts/tlsca.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNTCCAdugAwIBAgIQSeLwX0q/x1ugv5MYxKilYDAKBggqhkjOPQQDAjBsMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4 5 | YW1wbGUuY29tMB4XDTE4MDgwMjE3MTcwNloXDTI4MDczMDE3MTcwNlowbDELMAkG 6 | A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu 7 | Y2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5leGFt 8 | cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABErIjkmCMCif/Qv1BkNU 9 | pGcQKiwokzXjzPLwdf88b+X1duZW5zYGZiT1Ne5MR4CV2uZySbpzNbIJyWaAj+VP 10 | pb+jXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB 11 | /wQFMAMBAf8wKQYDVR0OBCIEIILh4HSengk7M6jiAQdClPcei+r7G0+zraYhO7Zq 12 | 2+JdMAoGCCqGSM49BAMCA0gAMEUCIQD38rv1hVabu92tLi6mxlRc/gE+7ToSMW+X 13 | nGlUsEK7bwIgdX9Iiz0To2mWGDPYJl3Uu9zg0jBavA0tCV8lH/M+6ec= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICNTCCAdugAwIBAgIQSeLwX0q/x1ugv5MYxKilYDAKBggqhkjOPQQDAjBsMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEUMBIGA1UEChMLZXhhbXBsZS5jb20xGjAYBgNVBAMTEXRsc2NhLmV4 5 | YW1wbGUuY29tMB4XDTE4MDgwMjE3MTcwNloXDTI4MDczMDE3MTcwNlowbDELMAkG 6 | A1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBGcmFu 7 | Y2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5leGFt 8 | cGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABErIjkmCMCif/Qv1BkNU 9 | pGcQKiwokzXjzPLwdf88b+X1duZW5zYGZiT1Ne5MR4CV2uZySbpzNbIJyWaAj+VP 10 | pb+jXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNVHSUECDAGBgRVHSUAMA8GA1UdEwEB 11 | /wQFMAMBAf8wKQYDVR0OBCIEIILh4HSengk7M6jiAQdClPcei+r7G0+zraYhO7Zq 12 | 2+JdMAoGCCqGSM49BAMCA0gAMEUCIQD38rv1hVabu92tLi6mxlRc/gE+7ToSMW+X 13 | nGlUsEK7bwIgdX9Iiz0To2mWGDPYJl3Uu9zg0jBavA0tCV8lH/M+6ec= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/client.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICLTCCAdOgAwIBAgIRAOJgvu4fW+atJwwwRNYAMOEwCgYIKoZIzj0EAwIwbDEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xFDASBgNVBAoTC2V4YW1wbGUuY29tMRowGAYDVQQDExF0bHNjYS5l 5 | eGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZaMFYxCzAJ 6 | BgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1TYW4gRnJh 7 | bmNpc2NvMRowGAYDVQQDDBFBZG1pbkBleGFtcGxlLmNvbTBZMBMGByqGSM49AgEG 8 | CCqGSM49AwEHA0IABIZsZLDuZTxzDvyN9+/7iUoTxYZUPLp25/TgvJlMpaPiS3e0 9 | rQ3u2VPp4xeFlh7DpDJ+AWW7M8hRmVO429mcWyijbDBqMA4GA1UdDwEB/wQEAwIF 10 | oDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwDAYDVR0TAQH/BAIwADAr 11 | BgNVHSMEJDAigCCC4eB0np4JOzOo4gEHQpT3Hovq+xtPs62mITu2atviXTAKBggq 12 | hkjOPQQDAgNIADBFAiEAqPiCOx/kDIzxaACOjVfunxItuPNnA4MmfQgQrESHMGcC 13 | IHg424m1+BUECDeRgyF+4ZweW0Cp0CoBgssrZbzW5gVR 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/ordererOrganizations/example.com/users/Admin@example.com/tls/client.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgNtuB2a+0A814N4VN 3 | X3VdInBdaj7YWLDiYQAwqNsS8e6hRANCAASGbGSw7mU8cw78jffv+4lKE8WGVDy6 4 | duf04LyZTKWj4kt3tK0N7tlT6eMXhZYew6QyfgFluzPIUZlTuNvZnFso 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/ca/0ce9cef4beed1a810990dd2fb20b9d734b24a33337138260b079c9cf1e155282_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg0PmtUFQeyhNw++La 3 | SW43xDsLYMzzl6ZPjy/0+5UkmBmhRANCAASLC8Iqmgnq71wgEZVawGBLE3cdrEWk 4 | SiLqNm1K43rfmWZr4PFg2MniRtWz+HoVOWaDSYynErDEr7q2xEu2Df9d 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/ca/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICQjCCAemgAwIBAgIQIDHHXULr6Py3soUdu91U6jAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMS5leGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZa 6 | MHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMRwwGgYDVQQD 8 | ExNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE 9 | iwvCKpoJ6u9cIBGVWsBgSxN3HaxFpEoi6jZtSuN635lma+DxYNjJ4kbVs/h6FTlm 10 | g0mMpxKwxK+6tsRLtg3/XaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYG 11 | BFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgDOnO9L7tGoEJkN0vsgud 12 | c0skozM3E4JgsHnJzx4VUoIwCgYIKoZIzj0EAwIDRwAwRAIgcIoQoFkU274vUWSo 13 | S0cZKbJIIPo4++r6ickUBD3gB74CIBn69hteuIGceCxPRLj4gio8ctFm89SdNw0G 14 | TOX5b6Bv 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGjCCAcCgAwIBAgIRAJ1E143DmB0Oaz5ofx9mmCcwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcxNzA2 6 | WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMS5leGFtcGxlLmNvbTBZ 8 | MBMGByqGSM49AgEGCCqGSM49AwEHA0IABKlKccnTtvmAm/onGyGmMOOV9xO06ao2 9 | 7dERZoNMC7ecYeM+TaoRa79WlKXvSxgz/LM1VcLbD0xApKw8x8UyzFCjTTBLMA4G 10 | A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIAzpzvS+7RqB 11 | CZDdL7ILnXNLJKMzNxOCYLB5yc8eFVKCMAoGCCqGSM49BAMCA0gAMEUCIQC8py0w 12 | FqioTdzAxjcpe+4HhqmcRNdi185w7sD1BeZkagIgb926CV8t4f8pdZ6wX7VIHfTN 13 | /nV3aPJuEsAGrgFWEWE= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICQjCCAemgAwIBAgIQIDHHXULr6Py3soUdu91U6jAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMS5leGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZa 6 | MHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMRwwGgYDVQQD 8 | ExNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE 9 | iwvCKpoJ6u9cIBGVWsBgSxN3HaxFpEoi6jZtSuN635lma+DxYNjJ4kbVs/h6FTlm 10 | g0mMpxKwxK+6tsRLtg3/XaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYG 11 | BFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgDOnO9L7tGoEJkN0vsgud 12 | c0skozM3E4JgsHnJzx4VUoIwCgYIKoZIzj0EAwIDRwAwRAIgcIoQoFkU274vUWSo 13 | S0cZKbJIIPo4++r6ickUBD3gB74CIBn69hteuIGceCxPRLj4gio8ctFm89SdNw0G 14 | TOX5b6Bv 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSjCCAfCgAwIBAgIRAMMaqrGgRWbPewJQc173nKwwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcx 6 | NzA2WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABDaFz4Pvqg9wFwhoaYukXOR5muegDwT/8UDx0S2jqnni6WPOpPHWpxGo 10 | LSCYlH0/hgiaCwdnmvKtqIPBatE6X+ejXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEILiWhce01Lle 12 | 7Gy0gqyJgs/jBJYQDRaEsvSPi1cME3xEMAoGCCqGSM49BAMCA0gAMEUCIQDpxHNS 13 | d7D+GDIBN3KPmsuks/HgwXFciruDBX6kvliBUwIgTHClx+M/7HGOG96UwtJEEGo+ 14 | 2lPZNVLqDk3L8JKxk1c= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGjCCAcCgAwIBAgIRAJ1E143DmB0Oaz5ofx9mmCcwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcxNzA2 6 | WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMS5leGFtcGxlLmNvbTBZ 8 | MBMGByqGSM49AgEGCCqGSM49AwEHA0IABKlKccnTtvmAm/onGyGmMOOV9xO06ao2 9 | 7dERZoNMC7ecYeM+TaoRa79WlKXvSxgz/LM1VcLbD0xApKw8x8UyzFCjTTBLMA4G 10 | A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIAzpzvS+7RqB 11 | CZDdL7ILnXNLJKMzNxOCYLB5yc8eFVKCMAoGCCqGSM49BAMCA0gAMEUCIQC8py0w 12 | FqioTdzAxjcpe+4HhqmcRNdi185w7sD1BeZkagIgb926CV8t4f8pdZ6wX7VIHfTN 13 | /nV3aPJuEsAGrgFWEWE= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICQjCCAemgAwIBAgIQIDHHXULr6Py3soUdu91U6jAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMS5leGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZa 6 | MHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMRwwGgYDVQQD 8 | ExNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE 9 | iwvCKpoJ6u9cIBGVWsBgSxN3HaxFpEoi6jZtSuN635lma+DxYNjJ4kbVs/h6FTlm 10 | g0mMpxKwxK+6tsRLtg3/XaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYG 11 | BFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgDOnO9L7tGoEJkN0vsgud 12 | c0skozM3E4JgsHnJzx4VUoIwCgYIKoZIzj0EAwIDRwAwRAIgcIoQoFkU274vUWSo 13 | S0cZKbJIIPo4++r6ickUBD3gB74CIBn69hteuIGceCxPRLj4gio8ctFm89SdNw0G 14 | TOX5b6Bv 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/keystore/1a67f936fbe54245b10212ddb03393717c12412c0c31394496160e3c9b89acff_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg8ySbSsk1LMgl5BM+ 3 | wnP8+0v4wovIrOC1A4g8GFVICn+hRANCAATOTfex4G7pitNZmfznuGu1TrHdiw4n 4 | W2ZmrK4EFQ1TRRQ03ticdrQk2GktFPaaF6YziSOf9SJ28LQtmfeNANfl 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/signcerts/peer0.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGDCCAb+gAwIBAgIQe+/QWciXsplSjUwIGptSVzAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMS5leGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZa 6 | MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMR8wHQYDVQQDExZwZWVyMC5vcmcxLmV4YW1wbGUuY29tMFkw 8 | EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEzk33seBu6YrTWZn857hrtU6x3YsOJ1tm 9 | ZqyuBBUNU0UUNN7YnHa0JNhpLRT2mhemM4kjn/UidvC0LZn3jQDX5aNNMEswDgYD 10 | VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgDOnO9L7tGoEJ 11 | kN0vsgudc0skozM3E4JgsHnJzx4VUoIwCgYIKoZIzj0EAwIDRwAwRAIgIq4uI/ez 12 | Z3C+ZOFCXydLWpOZ1pM1w+Vt0xH/srIhIy4CIDpNYX+V5mRzDySAHK+yQrYkS0r/ 13 | 09zNyLc0ga3/2Y0l 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSjCCAfCgAwIBAgIRAMMaqrGgRWbPewJQc173nKwwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcx 6 | NzA2WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABDaFz4Pvqg9wFwhoaYukXOR5muegDwT/8UDx0S2jqnni6WPOpPHWpxGo 10 | LSCYlH0/hgiaCwdnmvKtqIPBatE6X+ejXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEILiWhce01Lle 12 | 7Gy0gqyJgs/jBJYQDRaEsvSPi1cME3xEMAoGCCqGSM49BAMCA0gAMEUCIQDpxHNS 13 | d7D+GDIBN3KPmsuks/HgwXFciruDBX6kvliBUwIgTHClx+M/7HGOG96UwtJEEGo+ 14 | 2lPZNVLqDk3L8JKxk1c= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSjCCAfCgAwIBAgIRAMMaqrGgRWbPewJQc173nKwwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcx 6 | NzA2WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABDaFz4Pvqg9wFwhoaYukXOR5muegDwT/8UDx0S2jqnni6WPOpPHWpxGo 10 | LSCYlH0/hgiaCwdnmvKtqIPBatE6X+ejXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEILiWhce01Lle 12 | 7Gy0gqyJgs/jBJYQDRaEsvSPi1cME3xEMAoGCCqGSM49BAMCA0gAMEUCIQDpxHNS 13 | d7D+GDIBN3KPmsuks/HgwXFciruDBX6kvliBUwIgTHClx+M/7HGOG96UwtJEEGo+ 14 | 2lPZNVLqDk3L8JKxk1c= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICZjCCAg2gAwIBAgIQbGtFhNkZ3atw9M6Cq7vTlDAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3 6 | MDZaMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMR8wHQYDVQQDExZwZWVyMC5vcmcxLmV4YW1wbGUuY29t 8 | MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEtTgwzBp0xziTMm9smCH9WYY13svC 9 | +r9l8rs3qtXs2yZBWQUg0JoqNfwAQ77hK7Le3B8MT7m0k71B/U2d11/tYqOBlzCB 10 | lDAOBgNVHQ8BAf8EBAMCBaAwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMC 11 | MAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAguJaFx7TUuV7sbLSCrImCz+MElhAN 12 | FoSy9I+LVwwTfEQwKAYDVR0RBCEwH4IWcGVlcjAub3JnMS5leGFtcGxlLmNvbYIF 13 | cGVlcjAwCgYIKoZIzj0EAwIDRwAwRAIgQlVzabSU4qSL/jkZU9xc1QPFdC63O4MJ 14 | SoHTGOfj6B4CID9lMUtrLV8+ZpXkQZ+zvsy2gb08U44hbb9o3DFurj6m 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/tls/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg3LRjR6keKM5fr2sm 3 | HyUCSGzaIynbXRE4if/RR0Qg8jehRANCAAS1ODDMGnTHOJMyb2yYIf1ZhjXey8L6 4 | v2Xyuzeq1ezbJkFZBSDQmio1/ABDvuErst7cHwxPubSTvUH9TZ3XX+1i 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/tlsca/b89685c7b4d4b95eec6cb482ac8982cfe30496100d1684b2f48f8b570c137c44_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgz0z3zZVAze9esxwQ 3 | vPnti9iigNLdQfvMcE100G4p01WhRANCAAQ2hc+D76oPcBcIaGmLpFzkeZrnoA8E 4 | //FA8dEto6p54uljzqTx1qcRqC0gmJR9P4YImgsHZ5ryraiDwWrROl/n 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/tlsca/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSjCCAfCgAwIBAgIRAMMaqrGgRWbPewJQc173nKwwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcx 6 | NzA2WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABDaFz4Pvqg9wFwhoaYukXOR5muegDwT/8UDx0S2jqnni6WPOpPHWpxGo 10 | LSCYlH0/hgiaCwdnmvKtqIPBatE6X+ejXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEILiWhce01Lle 12 | 7Gy0gqyJgs/jBJYQDRaEsvSPi1cME3xEMAoGCCqGSM49BAMCA0gAMEUCIQDpxHNS 13 | d7D+GDIBN3KPmsuks/HgwXFciruDBX6kvliBUwIgTHClx+M/7HGOG96UwtJEEGo+ 14 | 2lPZNVLqDk3L8JKxk1c= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/admincerts/Admin@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGjCCAcCgAwIBAgIRAJ1E143DmB0Oaz5ofx9mmCcwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcxNzA2 6 | WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMS5leGFtcGxlLmNvbTBZ 8 | MBMGByqGSM49AgEGCCqGSM49AwEHA0IABKlKccnTtvmAm/onGyGmMOOV9xO06ao2 9 | 7dERZoNMC7ecYeM+TaoRa79WlKXvSxgz/LM1VcLbD0xApKw8x8UyzFCjTTBLMA4G 10 | A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIAzpzvS+7RqB 11 | CZDdL7ILnXNLJKMzNxOCYLB5yc8eFVKCMAoGCCqGSM49BAMCA0gAMEUCIQC8py0w 12 | FqioTdzAxjcpe+4HhqmcRNdi185w7sD1BeZkagIgb926CV8t4f8pdZ6wX7VIHfTN 13 | /nV3aPJuEsAGrgFWEWE= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICQjCCAemgAwIBAgIQIDHHXULr6Py3soUdu91U6jAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMS5leGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZa 6 | MHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMRwwGgYDVQQD 8 | ExNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE 9 | iwvCKpoJ6u9cIBGVWsBgSxN3HaxFpEoi6jZtSuN635lma+DxYNjJ4kbVs/h6FTlm 10 | g0mMpxKwxK+6tsRLtg3/XaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYG 11 | BFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgDOnO9L7tGoEJkN0vsgud 12 | c0skozM3E4JgsHnJzx4VUoIwCgYIKoZIzj0EAwIDRwAwRAIgcIoQoFkU274vUWSo 13 | S0cZKbJIIPo4++r6ickUBD3gB74CIBn69hteuIGceCxPRLj4gio8ctFm89SdNw0G 14 | TOX5b6Bv 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/keystore/9cbcbe051a2f2e901b44c9c560d069bf3abf2ce52dce4c28d30ecc13dd9a5807_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgUfSX9zMZ+gO3XxGm 3 | AorsAkZp0TrOaciudeajiK1u0H6hRANCAASpSnHJ07b5gJv6JxshpjDjlfcTtOmq 4 | Nu3REWaDTAu3nGHjPk2qEWu/VpSl70sYM/yzNVXC2w9MQKSsPMfFMsxQ 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/signcerts/Admin@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGjCCAcCgAwIBAgIRAJ1E143DmB0Oaz5ofx9mmCcwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcxNzA2 6 | WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMS5leGFtcGxlLmNvbTBZ 8 | MBMGByqGSM49AgEGCCqGSM49AwEHA0IABKlKccnTtvmAm/onGyGmMOOV9xO06ao2 9 | 7dERZoNMC7ecYeM+TaoRa79WlKXvSxgz/LM1VcLbD0xApKw8x8UyzFCjTTBLMA4G 10 | A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIAzpzvS+7RqB 11 | CZDdL7ILnXNLJKMzNxOCYLB5yc8eFVKCMAoGCCqGSM49BAMCA0gAMEUCIQC8py0w 12 | FqioTdzAxjcpe+4HhqmcRNdi185w7sD1BeZkagIgb926CV8t4f8pdZ6wX7VIHfTN 13 | /nV3aPJuEsAGrgFWEWE= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSjCCAfCgAwIBAgIRAMMaqrGgRWbPewJQc173nKwwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcx 6 | NzA2WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABDaFz4Pvqg9wFwhoaYukXOR5muegDwT/8UDx0S2jqnni6WPOpPHWpxGo 10 | LSCYlH0/hgiaCwdnmvKtqIPBatE6X+ejXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEILiWhce01Lle 12 | 7Gy0gqyJgs/jBJYQDRaEsvSPi1cME3xEMAoGCCqGSM49BAMCA0gAMEUCIQDpxHNS 13 | d7D+GDIBN3KPmsuks/HgwXFciruDBX6kvliBUwIgTHClx+M/7HGOG96UwtJEEGo+ 14 | 2lPZNVLqDk3L8JKxk1c= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSjCCAfCgAwIBAgIRAMMaqrGgRWbPewJQc173nKwwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcx 6 | NzA2WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABDaFz4Pvqg9wFwhoaYukXOR5muegDwT/8UDx0S2jqnni6WPOpPHWpxGo 10 | LSCYlH0/hgiaCwdnmvKtqIPBatE6X+ejXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEILiWhce01Lle 12 | 7Gy0gqyJgs/jBJYQDRaEsvSPi1cME3xEMAoGCCqGSM49BAMCA0gAMEUCIQDpxHNS 13 | d7D+GDIBN3KPmsuks/HgwXFciruDBX6kvliBUwIgTHClx+M/7HGOG96UwtJEEGo+ 14 | 2lPZNVLqDk3L8JKxk1c= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/client.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICPDCCAeKgAwIBAgIRAJpbVOZvLDLnZ01gAtTW+4kwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcx 6 | NzA2WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMS5leGFtcGxlLmNv 8 | bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABH0ZyZQ+stOP1550MPZCAgtY2K+w 9 | mi3ykS69eAuTcPminn5Avyi/Lw86bHvGC8N81rXrQyJmmkRy+BFVBOyG9HKjbDBq 10 | MA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIw 11 | DAYDVR0TAQH/BAIwADArBgNVHSMEJDAigCC4loXHtNS5XuxstIKsiYLP4wSWEA0W 12 | hLL0j4tXDBN8RDAKBggqhkjOPQQDAgNIADBFAiEArmVa4CBK1X4FJ1eG5uKF0eYN 13 | 81K+Xl26e6Mmy4E2PKoCIAnW57ZGtNG0uZmLK8nkRseDYoX6Yi19vAouHt/WAVHU 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/users/Admin@org1.example.com/tls/client.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgl3RAitxrEGLIEUlP 3 | jsGBg6lPTovdPF23mLgUgGq5SB2hRANCAAR9GcmUPrLTj9eedDD2QgILWNivsJot 4 | 8pEuvXgLk3D5op5+QL8ovy8POmx7xgvDfNa160MiZppEcvgRVQTshvRy 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/admincerts/User1@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGTCCAb+gAwIBAgIQIFgwTcIJEEuJx8afXi4tLTAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMS5leGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZa 6 | MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZVc2VyMUBvcmcxLmV4YW1wbGUuY29tMFkw 8 | EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaUzra7fWkxJulFB4M+yb26e8beNrJYuZ 9 | q4ECVno55ZYDR8JTboHJ6tYnV1tnGzYgj+QXnFo5yHdcp0YibgJigKNNMEswDgYD 10 | VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgDOnO9L7tGoEJ 11 | kN0vsgudc0skozM3E4JgsHnJzx4VUoIwCgYIKoZIzj0EAwIDSAAwRQIhAOFMHu/k 12 | 1cp3HUM0H1cjefoIp1x8jMYtWhWXFwbYjzRbAiAcY6LqBBywmQNNg96E1oOEVv1Y 13 | BFQ7/8VTd9HTWdbpog== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/cacerts/ca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICQjCCAemgAwIBAgIQIDHHXULr6Py3soUdu91U6jAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMS5leGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZa 6 | MHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcxLmV4YW1wbGUuY29tMRwwGgYDVQQD 8 | ExNjYS5vcmcxLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE 9 | iwvCKpoJ6u9cIBGVWsBgSxN3HaxFpEoi6jZtSuN635lma+DxYNjJ4kbVs/h6FTlm 10 | g0mMpxKwxK+6tsRLtg3/XaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYG 11 | BFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgDOnO9L7tGoEJkN0vsgud 12 | c0skozM3E4JgsHnJzx4VUoIwCgYIKoZIzj0EAwIDRwAwRAIgcIoQoFkU274vUWSo 13 | S0cZKbJIIPo4++r6ickUBD3gB74CIBn69hteuIGceCxPRLj4gio8ctFm89SdNw0G 14 | TOX5b6Bv 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/keystore/606969537bd31e77a00e6b423b1c57d3ac21f38854c1947a2ef797066e05efed_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgtI93Jl+2p/hGykjM 3 | e/mRB42C2y9KQqnlYVrKfy46Kc+hRANCAARpTOtrt9aTEm6UUHgz7Jvbp7xt42sl 4 | i5mrgQJWejnllgNHwlNugcnq1idXW2cbNiCP5BecWjnId1ynRiJuAmKA 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/signcerts/User1@org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGTCCAb+gAwIBAgIQIFgwTcIJEEuJx8afXi4tLTAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMS5leGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZa 6 | MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZVc2VyMUBvcmcxLmV4YW1wbGUuY29tMFkw 8 | EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEaUzra7fWkxJulFB4M+yb26e8beNrJYuZ 9 | q4ECVno55ZYDR8JTboHJ6tYnV1tnGzYgj+QXnFo5yHdcp0YibgJigKNNMEswDgYD 10 | VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgDOnO9L7tGoEJ 11 | kN0vsgudc0skozM3E4JgsHnJzx4VUoIwCgYIKoZIzj0EAwIDSAAwRQIhAOFMHu/k 12 | 1cp3HUM0H1cjefoIp1x8jMYtWhWXFwbYjzRbAiAcY6LqBBywmQNNg96E1oOEVv1Y 13 | BFQ7/8VTd9HTWdbpog== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/msp/tlscacerts/tlsca.org1.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSjCCAfCgAwIBAgIRAMMaqrGgRWbPewJQc173nKwwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcx 6 | NzA2WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABDaFz4Pvqg9wFwhoaYukXOR5muegDwT/8UDx0S2jqnni6WPOpPHWpxGo 10 | LSCYlH0/hgiaCwdnmvKtqIPBatE6X+ejXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEILiWhce01Lle 12 | 7Gy0gqyJgs/jBJYQDRaEsvSPi1cME3xEMAoGCCqGSM49BAMCA0gAMEUCIQDpxHNS 13 | d7D+GDIBN3KPmsuks/HgwXFciruDBX6kvliBUwIgTHClx+M/7HGOG96UwtJEEGo+ 14 | 2lPZNVLqDk3L8JKxk1c= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSjCCAfCgAwIBAgIRAMMaqrGgRWbPewJQc173nKwwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzEuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzEuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcx 6 | NzA2WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMS5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABDaFz4Pvqg9wFwhoaYukXOR5muegDwT/8UDx0S2jqnni6WPOpPHWpxGo 10 | LSCYlH0/hgiaCwdnmvKtqIPBatE6X+ejXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEILiWhce01Lle 12 | 7Gy0gqyJgs/jBJYQDRaEsvSPi1cME3xEMAoGCCqGSM49BAMCA0gAMEUCIQDpxHNS 13 | d7D+GDIBN3KPmsuks/HgwXFciruDBX6kvliBUwIgTHClx+M/7HGOG96UwtJEEGo+ 14 | 2lPZNVLqDk3L8JKxk1c= 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICOjCCAeGgAwIBAgIQXyJhY0OZX40dIbJmLC2sVTAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMS5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMS5leGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3 6 | MDZaMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZVc2VyMUBvcmcxLmV4YW1wbGUuY29t 8 | MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEOLVaxvxdZpmmChMP25WX26jW7xai 9 | JqPcNH46tJ8mrMLgSeX0F9h64jNEbjmupN+2dJRhXkWbFsmIoPBX8soKOqNsMGow 10 | DgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAM 11 | BgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAILiWhce01Lle7Gy0gqyJgs/jBJYQDRaE 12 | svSPi1cME3xEMAoGCCqGSM49BAMCA0cAMEQCIDVy/7YrLGP9fYpfia+o17SjpvUc 13 | RVnidwFJlM+W3XmcAiBbzbeUsAgfKAfNEjSnPDEn63dxJcuPeqCHyP/blMqWEA== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org1.example.com/users/User1@org1.example.com/tls/client.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgGkLMf8K57upe+H2q 3 | 7XJqfMhK3BBQ88SAYJBx4O3KtSWhRANCAAQ4tVrG/F1mmaYKEw/blZfbqNbvFqIm 4 | o9w0fjq0nyaswuBJ5fQX2HriM0RuOa6k37Z0lGFeRZsWyYig8Ffyygo6 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/ca/08fb03c1e0c05eb2ed28a63a1b40535737a1ff6de3dc69d5a404264d3a036690_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg2dTpQ5EPpZWjX8ZF 3 | PhxDe39s+8nZR+1WF3B/8pIzRMmhRANCAATSvqotqIBO5/xDAxAeHm6cYDH9CPfs 4 | BaROYZMZZpg6eQgQIWbRhtOAZ8+IkFUPikoNgUANbgYJklKUMsIIw7GB 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/ca/ca.org2.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICQzCCAemgAwIBAgIQU4UPWnEif7AwZfK4zrTyQzAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMi5leGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZa 6 | MHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcyLmV4YW1wbGUuY29tMRwwGgYDVQQD 8 | ExNjYS5vcmcyLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE 9 | 0r6qLaiATuf8QwMQHh5unGAx/Qj37AWkTmGTGWaYOnkIECFm0YbTgGfPiJBVD4pK 10 | DYFADW4GCZJSlDLCCMOxgaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYG 11 | BFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgCPsDweDAXrLtKKY6G0BT 12 | Vzeh/23j3GnVpAQmTToDZpAwCgYIKoZIzj0EAwIDSAAwRQIhAOBKwfP366AvdLTz 13 | 0TkDoqSt0+FtOwyzIoDBu3TBZ57uAiAZucfHsKRZR3KQD1soSPFdxxwmUtPsmWpm 14 | K6MG42EV4Q== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/msp/admincerts/Admin@org2.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGjCCAcCgAwIBAgIRAJ3EVEz+azvfIyFk276yY3gwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzIuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcxNzA2 6 | WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMi5leGFtcGxlLmNvbTBZ 8 | MBMGByqGSM49AgEGCCqGSM49AwEHA0IABAdLfI03vSoqMdZKEYIb5EEU2iCG49on 9 | aPJMLr++M59iMXgvWMTiHBngmihjHFf47qcauaRtR0q45H40PnXot0KjTTBLMA4G 10 | A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIAj7A8HgwF6y 11 | 7SimOhtAU1c3of9t49xp1aQEJk06A2aQMAoGCCqGSM49BAMCA0gAMEUCIQCMUZUe 12 | rZ9TJDZOXtreGhttFfl+XnVlNqmqCDFHQB62TQIgEkjDdn6QZf9mP/FQ2HiezHsu 13 | q+Sp1yNF07B+nowJ+yg= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICQzCCAemgAwIBAgIQU4UPWnEif7AwZfK4zrTyQzAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMi5leGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZa 6 | MHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcyLmV4YW1wbGUuY29tMRwwGgYDVQQD 8 | ExNjYS5vcmcyLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE 9 | 0r6qLaiATuf8QwMQHh5unGAx/Qj37AWkTmGTGWaYOnkIECFm0YbTgGfPiJBVD4pK 10 | DYFADW4GCZJSlDLCCMOxgaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYG 11 | BFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgCPsDweDAXrLtKKY6G0BT 12 | Vzeh/23j3GnVpAQmTToDZpAwCgYIKoZIzj0EAwIDSAAwRQIhAOBKwfP366AvdLTz 13 | 0TkDoqSt0+FtOwyzIoDBu3TBZ57uAiAZucfHsKRZR3KQD1soSPFdxxwmUtPsmWpm 14 | K6MG42EV4Q== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAfCgAwIBAgIRAOAueUb/IwOx+T6dgum/oDUwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcx 6 | NzA2WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABKqWCJdu52UAOERzVhk3YsosZqIVwepPCCeyoY6u/4ZHLQPO0sbLHet5 10 | 0b8NmpzY9NPADzS0bLVFgf/7OiF1QeKjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIHvq7CGYWaYZ 12 | xH1c1FxoGLKczjeWRMKLaJ/8hWuyfArXMAoGCCqGSM49BAMCA0cAMEQCIH/Tv8ud 13 | w2VBw6juuqKWi0BUqmty79ZoPiX32EmyZqCiAiA/u0iY+TUz/LC2R+15VlKJpvVm 14 | TALm5ohXfllerIXG/Q== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/admincerts/Admin@org2.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGjCCAcCgAwIBAgIRAJ3EVEz+azvfIyFk276yY3gwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzIuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcxNzA2 6 | WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMi5leGFtcGxlLmNvbTBZ 8 | MBMGByqGSM49AgEGCCqGSM49AwEHA0IABAdLfI03vSoqMdZKEYIb5EEU2iCG49on 9 | aPJMLr++M59iMXgvWMTiHBngmihjHFf47qcauaRtR0q45H40PnXot0KjTTBLMA4G 10 | A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIAj7A8HgwF6y 11 | 7SimOhtAU1c3of9t49xp1aQEJk06A2aQMAoGCCqGSM49BAMCA0gAMEUCIQCMUZUe 12 | rZ9TJDZOXtreGhttFfl+XnVlNqmqCDFHQB62TQIgEkjDdn6QZf9mP/FQ2HiezHsu 13 | q+Sp1yNF07B+nowJ+yg= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICQzCCAemgAwIBAgIQU4UPWnEif7AwZfK4zrTyQzAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMi5leGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZa 6 | MHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcyLmV4YW1wbGUuY29tMRwwGgYDVQQD 8 | ExNjYS5vcmcyLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE 9 | 0r6qLaiATuf8QwMQHh5unGAx/Qj37AWkTmGTGWaYOnkIECFm0YbTgGfPiJBVD4pK 10 | DYFADW4GCZJSlDLCCMOxgaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYG 11 | BFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgCPsDweDAXrLtKKY6G0BT 12 | Vzeh/23j3GnVpAQmTToDZpAwCgYIKoZIzj0EAwIDSAAwRQIhAOBKwfP366AvdLTz 13 | 0TkDoqSt0+FtOwyzIoDBu3TBZ57uAiAZucfHsKRZR3KQD1soSPFdxxwmUtPsmWpm 14 | K6MG42EV4Q== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/keystore/2ece1772d34f64c4c903034ce9e82f06b63f5c57ecf36060151571409fb5c68e_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgPCTJLzMqUyBcaKpv 3 | zoDQx0u8QUhg/UozhBoHgNlcS7ahRANCAARUYLHAUATk822Lj75ReIcXvwLCP+Ey 4 | 9hjcXLwHPOB8wDzVDvYF8lVhDpzllpcJcxIHWGVNuI4oi5NbnING9bgU 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/signcerts/peer0.org2.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGjCCAcCgAwIBAgIRAMsMCMCf4qEoynpDccg1BMgwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzIuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcxNzA2 6 | WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEfMB0GA1UEAxMWcGVlcjAub3JnMi5leGFtcGxlLmNvbTBZ 8 | MBMGByqGSM49AgEGCCqGSM49AwEHA0IABFRgscBQBOTzbYuPvlF4hxe/AsI/4TL2 9 | GNxcvAc84HzAPNUO9gXyVWEOnOWWlwlzEgdYZU24jiiLk1ucg0b1uBSjTTBLMA4G 10 | A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIAj7A8HgwF6y 11 | 7SimOhtAU1c3of9t49xp1aQEJk06A2aQMAoGCCqGSM49BAMCA0gAMEUCIQCkQCgd 12 | dyeWoenTWNS9sbCQHPo1XREw8xQcqS9LrbdDCgIgYGH1N5i+SCMRDhGDQJKluI8H 13 | klZpnI7SvWFecbnglNs= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAfCgAwIBAgIRAOAueUb/IwOx+T6dgum/oDUwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcx 6 | NzA2WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABKqWCJdu52UAOERzVhk3YsosZqIVwepPCCeyoY6u/4ZHLQPO0sbLHet5 10 | 0b8NmpzY9NPADzS0bLVFgf/7OiF1QeKjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIHvq7CGYWaYZ 12 | xH1c1FxoGLKczjeWRMKLaJ/8hWuyfArXMAoGCCqGSM49BAMCA0cAMEQCIH/Tv8ud 13 | w2VBw6juuqKWi0BUqmty79ZoPiX32EmyZqCiAiA/u0iY+TUz/LC2R+15VlKJpvVm 14 | TALm5ohXfllerIXG/Q== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAfCgAwIBAgIRAOAueUb/IwOx+T6dgum/oDUwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcx 6 | NzA2WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABKqWCJdu52UAOERzVhk3YsosZqIVwepPCCeyoY6u/4ZHLQPO0sbLHet5 10 | 0b8NmpzY9NPADzS0bLVFgf/7OiF1QeKjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIHvq7CGYWaYZ 12 | xH1c1FxoGLKczjeWRMKLaJ/8hWuyfArXMAoGCCqGSM49BAMCA0cAMEQCIH/Tv8ud 13 | w2VBw6juuqKWi0BUqmty79ZoPiX32EmyZqCiAiA/u0iY+TUz/LC2R+15VlKJpvVm 14 | TALm5ohXfllerIXG/Q== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICZzCCAg6gAwIBAgIRAJys4baG3sRuu+95UiANbiowCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcx 6 | NzA2WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEfMB0GA1UEAxMWcGVlcjAub3JnMi5leGFtcGxlLmNv 8 | bTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABFYwOE+002UJgspk8+Js84qkTFqg 9 | CvFyhR7ywkLicylukjQjA1BR3biXwlBtJ/2UYYhGRJp3yELUECC5epSgqXCjgZcw 10 | gZQwDgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcD 11 | AjAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIHvq7CGYWaYZxH1c1FxoGLKczjeW 12 | RMKLaJ/8hWuyfArXMCgGA1UdEQQhMB+CFnBlZXIwLm9yZzIuZXhhbXBsZS5jb22C 13 | BXBlZXIwMAoGCCqGSM49BAMCA0cAMEQCIDCFk8EwMy/gMBrNrbdntPZvOsubhKpB 14 | yAh18SrH+X0WAiB3sd2tXmFertbfF92clzCP5TIcjYnZDvIC5/MnuqDbig== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/tls/server.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgo3RNKSdIn2sFidPd 3 | e7fNv9m4JAxwaS+Q6b/IWvlDRg2hRANCAARWMDhPtNNlCYLKZPPibPOKpExaoArx 4 | coUe8sJC4nMpbpI0IwNQUd24l8JQbSf9lGGIRkSad8hC1BAguXqUoKlw 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/tlsca/7beaec219859a619c47d5cd45c6818b29cce379644c28b689ffc856bb27c0ad7_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgSLWiRzkOVDzFIrtW 3 | wzDCrffgXaF/m1tJEd+gz1VaF1qhRANCAASqlgiXbudlADhEc1YZN2LKLGaiFcHq 4 | TwgnsqGOrv+GRy0DztLGyx3redG/DZqc2PTTwA80tGy1RYH/+zohdUHi 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/tlsca/tlsca.org2.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAfCgAwIBAgIRAOAueUb/IwOx+T6dgum/oDUwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcx 6 | NzA2WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABKqWCJdu52UAOERzVhk3YsosZqIVwepPCCeyoY6u/4ZHLQPO0sbLHet5 10 | 0b8NmpzY9NPADzS0bLVFgf/7OiF1QeKjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIHvq7CGYWaYZ 12 | xH1c1FxoGLKczjeWRMKLaJ/8hWuyfArXMAoGCCqGSM49BAMCA0cAMEQCIH/Tv8ud 13 | w2VBw6juuqKWi0BUqmty79ZoPiX32EmyZqCiAiA/u0iY+TUz/LC2R+15VlKJpvVm 14 | TALm5ohXfllerIXG/Q== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/admincerts/Admin@org2.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGjCCAcCgAwIBAgIRAJ3EVEz+azvfIyFk276yY3gwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzIuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcxNzA2 6 | WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMi5leGFtcGxlLmNvbTBZ 8 | MBMGByqGSM49AgEGCCqGSM49AwEHA0IABAdLfI03vSoqMdZKEYIb5EEU2iCG49on 9 | aPJMLr++M59iMXgvWMTiHBngmihjHFf47qcauaRtR0q45H40PnXot0KjTTBLMA4G 10 | A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIAj7A8HgwF6y 11 | 7SimOhtAU1c3of9t49xp1aQEJk06A2aQMAoGCCqGSM49BAMCA0gAMEUCIQCMUZUe 12 | rZ9TJDZOXtreGhttFfl+XnVlNqmqCDFHQB62TQIgEkjDdn6QZf9mP/FQ2HiezHsu 13 | q+Sp1yNF07B+nowJ+yg= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICQzCCAemgAwIBAgIQU4UPWnEif7AwZfK4zrTyQzAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMi5leGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZa 6 | MHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcyLmV4YW1wbGUuY29tMRwwGgYDVQQD 8 | ExNjYS5vcmcyLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE 9 | 0r6qLaiATuf8QwMQHh5unGAx/Qj37AWkTmGTGWaYOnkIECFm0YbTgGfPiJBVD4pK 10 | DYFADW4GCZJSlDLCCMOxgaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYG 11 | BFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgCPsDweDAXrLtKKY6G0BT 12 | Vzeh/23j3GnVpAQmTToDZpAwCgYIKoZIzj0EAwIDSAAwRQIhAOBKwfP366AvdLTz 13 | 0TkDoqSt0+FtOwyzIoDBu3TBZ57uAiAZucfHsKRZR3KQD1soSPFdxxwmUtPsmWpm 14 | K6MG42EV4Q== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/keystore/dbb4a34820ef2c1fbe40f3d149f5fb86e6d0e252db73facdae33218650fcbb0a_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgS/sGufHQ/uMByeFI 3 | iTDdc13mpYkgtM0L/LQ2kTlojJ2hRANCAAQHS3yNN70qKjHWShGCG+RBFNoghuPa 4 | J2jyTC6/vjOfYjF4L1jE4hwZ4JooYxxX+O6nGrmkbUdKuOR+ND516LdC 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/signcerts/Admin@org2.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGjCCAcCgAwIBAgIRAJ3EVEz+azvfIyFk276yY3gwCgYIKoZIzj0EAwIwczEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHDAaBgNVBAMTE2Nh 5 | Lm9yZzIuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcxNzA2 6 | WjBbMQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMN 7 | U2FuIEZyYW5jaXNjbzEfMB0GA1UEAwwWQWRtaW5Ab3JnMi5leGFtcGxlLmNvbTBZ 8 | MBMGByqGSM49AgEGCCqGSM49AwEHA0IABAdLfI03vSoqMdZKEYIb5EEU2iCG49on 9 | aPJMLr++M59iMXgvWMTiHBngmihjHFf47qcauaRtR0q45H40PnXot0KjTTBLMA4G 10 | A1UdDwEB/wQEAwIHgDAMBgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIAj7A8HgwF6y 11 | 7SimOhtAU1c3of9t49xp1aQEJk06A2aQMAoGCCqGSM49BAMCA0gAMEUCIQCMUZUe 12 | rZ9TJDZOXtreGhttFfl+XnVlNqmqCDFHQB62TQIgEkjDdn6QZf9mP/FQ2HiezHsu 13 | q+Sp1yNF07B+nowJ+yg= 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAfCgAwIBAgIRAOAueUb/IwOx+T6dgum/oDUwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcx 6 | NzA2WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABKqWCJdu52UAOERzVhk3YsosZqIVwepPCCeyoY6u/4ZHLQPO0sbLHet5 10 | 0b8NmpzY9NPADzS0bLVFgf/7OiF1QeKjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIHvq7CGYWaYZ 12 | xH1c1FxoGLKczjeWRMKLaJ/8hWuyfArXMAoGCCqGSM49BAMCA0cAMEQCIH/Tv8ud 13 | w2VBw6juuqKWi0BUqmty79ZoPiX32EmyZqCiAiA/u0iY+TUz/LC2R+15VlKJpvVm 14 | TALm5ohXfllerIXG/Q== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAfCgAwIBAgIRAOAueUb/IwOx+T6dgum/oDUwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcx 6 | NzA2WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABKqWCJdu52UAOERzVhk3YsosZqIVwepPCCeyoY6u/4ZHLQPO0sbLHet5 10 | 0b8NmpzY9NPADzS0bLVFgf/7OiF1QeKjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIHvq7CGYWaYZ 12 | xH1c1FxoGLKczjeWRMKLaJ/8hWuyfArXMAoGCCqGSM49BAMCA0cAMEQCIH/Tv8ud 13 | w2VBw6juuqKWi0BUqmty79ZoPiX32EmyZqCiAiA/u0iY+TUz/LC2R+15VlKJpvVm 14 | TALm5ohXfllerIXG/Q== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/tls/client.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICOjCCAeGgAwIBAgIQNpdiCgmefbKkMxeDdhOrJDAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMi5leGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3 6 | MDZaMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZBZG1pbkBvcmcyLmV4YW1wbGUuY29t 8 | MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEC+MMNueRwMSHm00Y7IUz9eXQjBlw 9 | QNKK1JWeT0WG36DA8uwHCWtfkjMyGkiyX5H3TYPcJyCYwOhNUSgrxT3QCKNsMGow 10 | DgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAM 11 | BgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIHvq7CGYWaYZxH1c1FxoGLKczjeWRMKL 12 | aJ/8hWuyfArXMAoGCCqGSM49BAMCA0cAMEQCIApANfzlMILR51aFDAUH3vheSinV 13 | 2rdQhK+mkiUQP70oAiADcdxYPKCx2g7XgQtNw4PvRgR0Mn6w5zz/0cDEyOjtCg== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/users/Admin@org2.example.com/tls/client.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg4pjWL4kBMuRwjDUf 3 | Pg2+frQi4pHn9CHceS6NZhk+MxyhRANCAAQL4ww255HAxIebTRjshTP15dCMGXBA 4 | 0orUlZ5PRYbfoMDy7AcJa1+SMzIaSLJfkfdNg9wnIJjA6E1RKCvFPdAI 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/admincerts/User1@org2.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGDCCAb+gAwIBAgIQXpL0eDMZoYqBe96MeMZkBDAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMi5leGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZa 6 | MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZVc2VyMUBvcmcyLmV4YW1wbGUuY29tMFkw 8 | EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEG37tBhYEgcLaF/AlOO05EJQ41MUX+ua4 9 | Vxq7RoCTA2siIB+vNrEkKdWURPFI8G9DjaoXBdEvIEgIMhtKPV2uxqNNMEswDgYD 10 | VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgCPsDweDAXrLt 11 | KKY6G0BTVzeh/23j3GnVpAQmTToDZpAwCgYIKoZIzj0EAwIDRwAwRAIgcFMh3mVn 12 | oCXdpiHNsmjP/9Na3rk4jZMXTgovgXPM9wECIHnhTF8jcD1zTcx46xEcUj+LgnE8 13 | cL/oFPWI6J/7uYDv 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/cacerts/ca.org2.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICQzCCAemgAwIBAgIQU4UPWnEif7AwZfK4zrTyQzAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMi5leGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZa 6 | MHMxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMRkwFwYDVQQKExBvcmcyLmV4YW1wbGUuY29tMRwwGgYDVQQD 8 | ExNjYS5vcmcyLmV4YW1wbGUuY29tMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE 9 | 0r6qLaiATuf8QwMQHh5unGAx/Qj37AWkTmGTGWaYOnkIECFm0YbTgGfPiJBVD4pK 10 | DYFADW4GCZJSlDLCCMOxgaNfMF0wDgYDVR0PAQH/BAQDAgGmMA8GA1UdJQQIMAYG 11 | BFUdJQAwDwYDVR0TAQH/BAUwAwEB/zApBgNVHQ4EIgQgCPsDweDAXrLtKKY6G0BT 12 | Vzeh/23j3GnVpAQmTToDZpAwCgYIKoZIzj0EAwIDSAAwRQIhAOBKwfP366AvdLTz 13 | 0TkDoqSt0+FtOwyzIoDBu3TBZ57uAiAZucfHsKRZR3KQD1soSPFdxxwmUtPsmWpm 14 | K6MG42EV4Q== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/keystore/cc51c42193f79eba926b49854c8cbdfff823017a5202a42c9079a651a7168be5_sk: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgWPfmWXS7Tru8UM46 3 | yzbaewDGcO8dUE3KKLFOCrfiLwehRANCAAQbfu0GFgSBwtoX8CU47TkQlDjUxRf6 4 | 5rhXGrtGgJMDayIgH682sSQp1ZRE8Ujwb0ONqhcF0S8gSAgyG0o9Xa7G 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/signcerts/User1@org2.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICGDCCAb+gAwIBAgIQXpL0eDMZoYqBe96MeMZkBDAKBggqhkjOPQQDAjBzMQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEcMBoGA1UEAxMTY2Eu 5 | b3JnMi5leGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3MDZa 6 | MFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQHEw1T 7 | YW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZVc2VyMUBvcmcyLmV4YW1wbGUuY29tMFkw 8 | EwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEG37tBhYEgcLaF/AlOO05EJQ41MUX+ua4 9 | Vxq7RoCTA2siIB+vNrEkKdWURPFI8G9DjaoXBdEvIEgIMhtKPV2uxqNNMEswDgYD 10 | VR0PAQH/BAQDAgeAMAwGA1UdEwEB/wQCMAAwKwYDVR0jBCQwIoAgCPsDweDAXrLt 11 | KKY6G0BTVzeh/23j3GnVpAQmTToDZpAwCgYIKoZIzj0EAwIDRwAwRAIgcFMh3mVn 12 | oCXdpiHNsmjP/9Na3rk4jZMXTgovgXPM9wECIHnhTF8jcD1zTcx46xEcUj+LgnE8 13 | cL/oFPWI6J/7uYDv 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/msp/tlscacerts/tlsca.org2.example.com-cert.pem: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAfCgAwIBAgIRAOAueUb/IwOx+T6dgum/oDUwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcx 6 | NzA2WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABKqWCJdu52UAOERzVhk3YsosZqIVwepPCCeyoY6u/4ZHLQPO0sbLHet5 10 | 0b8NmpzY9NPADzS0bLVFgf/7OiF1QeKjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIHvq7CGYWaYZ 12 | xH1c1FxoGLKczjeWRMKLaJ/8hWuyfArXMAoGCCqGSM49BAMCA0cAMEQCIH/Tv8ud 13 | w2VBw6juuqKWi0BUqmty79ZoPiX32EmyZqCiAiA/u0iY+TUz/LC2R+15VlKJpvVm 14 | TALm5ohXfllerIXG/Q== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/tls/ca.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICSTCCAfCgAwIBAgIRAOAueUb/IwOx+T6dgum/oDUwCgYIKoZIzj0EAwIwdjEL 3 | MAkGA1UEBhMCVVMxEzARBgNVBAgTCkNhbGlmb3JuaWExFjAUBgNVBAcTDVNhbiBG 4 | cmFuY2lzY28xGTAXBgNVBAoTEG9yZzIuZXhhbXBsZS5jb20xHzAdBgNVBAMTFnRs 5 | c2NhLm9yZzIuZXhhbXBsZS5jb20wHhcNMTgwODAyMTcxNzA2WhcNMjgwNzMwMTcx 6 | NzA2WjB2MQswCQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UE 7 | BxMNU2FuIEZyYW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0G 8 | A1UEAxMWdGxzY2Eub3JnMi5leGFtcGxlLmNvbTBZMBMGByqGSM49AgEGCCqGSM49 9 | AwEHA0IABKqWCJdu52UAOERzVhk3YsosZqIVwepPCCeyoY6u/4ZHLQPO0sbLHet5 10 | 0b8NmpzY9NPADzS0bLVFgf/7OiF1QeKjXzBdMA4GA1UdDwEB/wQEAwIBpjAPBgNV 11 | HSUECDAGBgRVHSUAMA8GA1UdEwEB/wQFMAMBAf8wKQYDVR0OBCIEIHvq7CGYWaYZ 12 | xH1c1FxoGLKczjeWRMKLaJ/8hWuyfArXMAoGCCqGSM49BAMCA0cAMEQCIH/Tv8ud 13 | w2VBw6juuqKWi0BUqmty79ZoPiX32EmyZqCiAiA/u0iY+TUz/LC2R+15VlKJpvVm 14 | TALm5ohXfllerIXG/Q== 15 | -----END CERTIFICATE----- 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/tls/client.crt: -------------------------------------------------------------------------------- 1 | -----BEGIN CERTIFICATE----- 2 | MIICOjCCAeGgAwIBAgIQEJyLTqOCYGv4bUQQhIHQnDAKBggqhkjOPQQDAjB2MQsw 3 | CQYDVQQGEwJVUzETMBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZy 4 | YW5jaXNjbzEZMBcGA1UEChMQb3JnMi5leGFtcGxlLmNvbTEfMB0GA1UEAxMWdGxz 5 | Y2Eub3JnMi5leGFtcGxlLmNvbTAeFw0xODA4MDIxNzE3MDZaFw0yODA3MzAxNzE3 6 | MDZaMFsxCzAJBgNVBAYTAlVTMRMwEQYDVQQIEwpDYWxpZm9ybmlhMRYwFAYDVQQH 7 | Ew1TYW4gRnJhbmNpc2NvMR8wHQYDVQQDDBZVc2VyMUBvcmcyLmV4YW1wbGUuY29t 8 | MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAE5k+DaHhrzwMDEPHXuyZqiQB2L9gF 9 | olysUEoX/G1/sMUcAA1o0KWkpdj5XTLfk+ozZgpNIKvwqs1k/12BWmxa36NsMGow 10 | DgYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAM 11 | BgNVHRMBAf8EAjAAMCsGA1UdIwQkMCKAIHvq7CGYWaYZxH1c1FxoGLKczjeWRMKL 12 | aJ/8hWuyfArXMAoGCCqGSM49BAMCA0cAMEQCIDWy/VLB97uy7hJZ7Pero0sVtCMM 13 | B9CcHDDiQQ4Jjga8AiBSmtNZOM4PrunXfBotZ/tVIxjNpoRkTibdLHAmgVVsRg== 14 | -----END CERTIFICATE----- 15 | -------------------------------------------------------------------------------- /fabric-network/basic-network/crypto-config/peerOrganizations/org2.example.com/users/User1@org2.example.com/tls/client.key: -------------------------------------------------------------------------------- 1 | -----BEGIN PRIVATE KEY----- 2 | MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgNZVeCSuwyvYEnwNN 3 | eaeeJS19kYEaZAe6ep4FjDMYmOOhRANCAATmT4NoeGvPAwMQ8de7JmqJAHYv2AWi 4 | XKxQShf8bX+wxRwADWjQpaSl2PldMt+T6jNmCk0gq/CqzWT/XYFabFrf 5 | -----END PRIVATE KEY----- 6 | -------------------------------------------------------------------------------- /fabric-network/basic-network/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/0ce9cef4beed1a810990dd2fb20b9d734b24a33337138260b079c9cf1e155282_sk 19 | ports: 20 | - "7054:7054" 21 | command: sh -c 'fabric-ca-server start -b admin:adminpw -d' 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 | - ORDERER_GENERAL_LOGLEVEL=debug 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 | - CORE_LOGGING_PEER=debug 56 | - CORE_CHAINCODE_LOGGING_LEVEL=DEBUG 57 | - CORE_PEER_LOCALMSPID=Org1MSP 58 | - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/ 59 | - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 60 | - CORE_PEER_LISTENADDRESS=peer0.org1.example.com:7051 # # 61 | - CORE_PEER_GOSSIP_ENDPOINT=peer0.org1.example.com:7051 # # Added GOSSIP 62 | - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org1.example.com:7051 # # 63 | # # the following setting starts chaincode containers on the same 64 | # # bridge network as the peers 65 | # # https://docs.docker.com/compose/networking/ 66 | - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_basic 67 | - CORE_LEDGER_STATE_STATEDATABASE=CouchDB 68 | - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb:5984 69 | # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD 70 | # provide the credentials for ledger to connect to CouchDB. The username and password must 71 | # match the username and password set for the associated CouchDB. 72 | - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= 73 | - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= 74 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric 75 | command: peer node start 76 | # command: peer node start --peer-chaincodedev=true 77 | ports: 78 | - 7051:7051 79 | - 7053:7053 80 | volumes: 81 | - /var/run/:/host/var/run/ 82 | - ./crypto-config/peerOrganizations/org1.example.com/peers/peer0.org1.example.com/msp:/etc/hyperledger/msp/peer 83 | - ./crypto-config/peerOrganizations/org1.example.com/users:/etc/hyperledger/msp/users 84 | - ./config:/etc/hyperledger/configtx 85 | depends_on: 86 | - orderer.example.com 87 | - couchdb 88 | networks: 89 | - basic 90 | 91 | peer0.org2.example.com: 92 | container_name: peer0.org2.example.com 93 | image: hyperledger/fabric-peer 94 | environment: 95 | - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 96 | - CORE_PEER_ID=peer0.org2.example.com 97 | - CORE_LOGGING_PEER=debug 98 | - CORE_CHAINCODE_LOGGING_LEVEL=DEBUG 99 | - CORE_PEER_LOCALMSPID=Org2MSP 100 | - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp/peer/ 101 | - CORE_PEER_ADDRESS=peer0.org2.example.com:7051 102 | - CORE_PEER_LISTENADDRESS=peer0.org2.example.com:7051 # # 103 | - CORE_PEER_GOSSIP_ENDPOINT=peer0.org2.example.com:7051 # # Added GOSSIP 104 | - CORE_PEER_GOSSIP_EXTERNALENDPOINT=peer0.org2.example.com:7051 # # 105 | # # the following setting starts chaincode containers on the same 106 | # # bridge network as the peers 107 | # # https://docs.docker.com/compose/networking/ 108 | - CORE_VM_DOCKER_HOSTCONFIG_NETWORKMODE=${COMPOSE_PROJECT_NAME}_basic 109 | - CORE_LEDGER_STATE_STATEDATABASE=CouchDB 110 | - CORE_LEDGER_STATE_COUCHDBCONFIG_COUCHDBADDRESS=couchdb:5984 111 | # The CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME and CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD 112 | # provide the credentials for ledger to connect to CouchDB. The username and password must 113 | # match the username and password set for the associated CouchDB. 114 | - CORE_LEDGER_STATE_COUCHDBCONFIG_USERNAME= 115 | - CORE_LEDGER_STATE_COUCHDBCONFIG_PASSWORD= 116 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric 117 | command: peer node start 118 | # command: peer node start --peer-chaincodedev=true 119 | ports: 120 | - 9051:7051 #! New ports 121 | - 9053:7053 122 | volumes: 123 | - /var/run/:/host/var/run/ 124 | - ./crypto-config/peerOrganizations/org2.example.com/peers/peer0.org2.example.com/msp:/etc/hyperledger/msp/peer 125 | - ./crypto-config/peerOrganizations/org2.example.com/users:/etc/hyperledger/msp/users 126 | - ./config:/etc/hyperledger/configtx 127 | depends_on: 128 | - orderer.example.com 129 | - couchdb 130 | networks: 131 | - basic 132 | 133 | couchdb: 134 | container_name: couchdb 135 | image: hyperledger/fabric-couchdb 136 | # Populate the COUCHDB_USER and COUCHDB_PASSWORD to set an admin user and password 137 | # for CouchDB. This will prevent CouchDB from operating in an "Admin Party" mode. 138 | environment: 139 | - COUCHDB_USER= 140 | - COUCHDB_PASSWORD= 141 | ports: 142 | - 5984:5984 143 | networks: 144 | - basic 145 | 146 | cli: 147 | container_name: cli 148 | image: hyperledger/fabric-tools 149 | tty: true 150 | environment: 151 | - GOPATH=/opt/gopath 152 | - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 153 | - CORE_LOGGING_LEVEL=DEBUG 154 | - CORE_PEER_ID=cli 155 | - CORE_PEER_ADDRESS=peer0.org1.example.com:7051 156 | - CORE_PEER_LOCALMSPID=Org1MSP 157 | - CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org1.example.com/users/Admin@org1.example.com/msp 158 | - CORE_CHAINCODE_KEEPALIVE=10 159 | working_dir: /opt/gopath/src/github.com/hyperledger/fabric/peer 160 | command: /bin/bash 161 | volumes: 162 | - /var/run/:/host/var/run/ 163 | - ./../chaincode/:/opt/gopath/src/github.com/ 164 | - ./crypto-config:/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/ 165 | - ./config:/opt/gopath/src/github.com/hyperledger/fabric/peer 166 | networks: 167 | - basic 168 | 169 | chaincode: 170 | container_name: chaincode 171 | image: hyperledger/fabric-ccenv 172 | tty: true 173 | environment: 174 | - GOPATH=/opt/gopath 175 | - CORE_VM_ENDPOINT=unix:///host/var/run/docker.sock 176 | - CORE_LOGGING_LEVEL=DEBUG 177 | - CORE_PEER_ID=example02 178 | - CORE_PEER_ADDRESS=peer:7051 179 | - CORE_PEER_LOCALMSPID=DEFAULT 180 | - CORE_PEER_MSPCONFIGPATH=/etc/hyperledger/msp 181 | working_dir: /opt/gopath/src/chaincode 182 | command: /bin/bash -c 'sleep 6000000' 183 | volumes: 184 | - /var/run/:/host/var/run/ 185 | - ./msp:/etc/hyperledger/msp 186 | - ./../chaincode:/opt/gopath/src/chaincode 187 | depends_on: 188 | - orderer.example.com 189 | - peer0.org1.example.com 190 | #depends_on: 191 | # - orderer.example.com 192 | # - peer0.org1.example.com 193 | # - couchdb 194 | -------------------------------------------------------------------------------- /fabric-network/basic-network/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 for Org1 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 | 43 | # generate anchor peer transaction for Org2 44 | configtxgen -profile OneOrgChannel -outputAnchorPeersUpdate ./config/Org2MSPanchors.tx -channelID $CHANNEL_NAME -asOrg Org2MSP 45 | if [ "$?" -ne 0 ]; then 46 | echo "Failed to generate anchor peer update for Org1MSP..." 47 | exit 1 48 | fi 49 | -------------------------------------------------------------------------------- /fabric-network/basic-network/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 | cp creds/* ~/.hfc-key-store 16 | -------------------------------------------------------------------------------- /fabric-network/basic-network/start.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 | # don't rewrite paths for Windows Git Bash users 11 | export MSYS_NO_PATHCONV=1 12 | 13 | docker-compose -f docker-compose.yml down 14 | 15 | docker-compose -f docker-compose.yml up -d ca.example.com orderer.example.com peer0.org1.example.com peer0.org2.example.com couchdb cli 16 | 17 | # wait for Hyperledger Fabric to start 18 | # incase of errors when running later commands, issue export FABRIC_START_TIMEOUT= 19 | export FABRIC_START_TIMEOUT=10 20 | #echo ${FABRIC_START_TIMEOUT} 21 | sleep ${FABRIC_START_TIMEOUT} 22 | 23 | # Create the channel 24 | 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 channel create -o orderer.example.com:7050 -c mychannel -f channel.tx 25 | # Join peer0.org1.example.com to the channel. 26 | docker exec -e "CORE_PEER_ADDRESS=peer0.org1.example.com:7051" -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 channel join -b mychannel.block 27 | # # Join peer0.org2.example.com to the channel. 28 | docker exec -e "CORE_PEER_ADDRESS=peer0.org2.example.com:7051" -e "CORE_PEER_LOCALMSPID=Org2MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp" cli peer channel join -b mychannel.block 29 | 30 | 31 | docker exec -e "CORE_PEER_ADDRESS=peer0.org1.example.com:7051" -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 -p github.com/testing -n testing -v 1.0 32 | sleep 3 33 | docker exec -e "CORE_PEER_ADDRESS=peer0.org1.example.com:7051" -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 testing -v 1.0 -c '{"Args":["0","Daniel"]}' -P "AND ('Org1MSP.member', 'Org2MSP.member')" 34 | sleep 3 35 | 36 | # #! Second Organization and new peer: 37 | 38 | docker exec -e "CORE_PEER_ADDRESS=peer0.org2.example.com:7051" -e "CORE_PEER_LOCALMSPID=Org2MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp" cli peer chaincode install -p github.com/testing -n testing -v 1.0 39 | sleep 3 40 | 41 | #! Installing Airline Miles Chainecode: 42 | docker exec -e "CORE_PEER_ADDRESS=peer0.org1.example.com:7051" -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 -p github.com/AirlineMiles -n airlineMiles -v 2.1 43 | sleep 3 44 | docker exec -e "CORE_PEER_ADDRESS=peer0.org2.example.com:7051" -e "CORE_PEER_LOCALMSPID=Org2MSP" -e "CORE_PEER_MSPCONFIGPATH=/opt/gopath/src/github.com/hyperledger/fabric/peer/crypto/peerOrganizations/org2.example.com/users/Admin@org2.example.com/msp" cli peer chaincode install -p github.com/AirlineMiles -n airlineMiles -v 2.1 45 | sleep 3 46 | 47 | docker exec -e "CORE_PEER_ADDRESS=peer0.org1.example.com:7051" -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 airlineMiles -v 2.1 -c '{"Args":[""]}' -P "AND ('Org1MSP.member', 'Org2MSP.member')" 48 | sleep 3 49 | docker exec -e "CORE_PEER_ADDRESS=peer0.org1.example.com:7051" -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 airlineMiles -c '{"function":"initLedger","Args":[""]}' 50 | 51 | -------------------------------------------------------------------------------- /fabric-network/basic-network/stop.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 | -------------------------------------------------------------------------------- /fabric-network/basic-network/teardown.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 -e 9 | 10 | # Shut down the Docker containers for the system tests. 11 | docker-compose -f docker-compose.yml kill && docker-compose -f docker-compose.yml down 12 | 13 | # remove the local state 14 | rm -f ~/.hfc-key-store/* 15 | 16 | # remove chaincode docker images 17 | docker rmi $(docker images dev-* -q) 18 | 19 | # Your system is now clean 20 | -------------------------------------------------------------------------------- /fabric-network/chaincode/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-chrome-extension/438769b948b412f068ff1ec80f6633647eb6c272/fabric-network/chaincode/.DS_Store -------------------------------------------------------------------------------- /fabric-network/chaincode/AirLineMiles/AirLineMiles: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-chrome-extension/438769b948b412f068ff1ec80f6633647eb6c272/fabric-network/chaincode/AirLineMiles/AirLineMiles -------------------------------------------------------------------------------- /fabric-network/chaincode/AirLineMiles/AirLineMiles.go: -------------------------------------------------------------------------------- 1 | //SPDX-License-Identifier: Apache-2.0 2 | 3 | // Import dependencies 4 | // Import the chaincode shim package and the peer protobuf package 5 | 6 | /* This code is based on code written by the Hyperledger Fabric community. 7 | Original code can be found here: https://github.com/hyperledger/fabric-samples/blob/release/chaincode/chaincode_example02/chaincode_example02.go 8 | */ 9 | 10 | package main 11 | 12 | import ( 13 | "encoding/json" 14 | "fmt" 15 | "strconv" 16 | 17 | "github.com/hyperledger/fabric/core/chaincode/shim" 18 | "github.com/hyperledger/fabric/protos/peer" 19 | ) 20 | 21 | // AirlineMilesChaincode implements a simple chaincode to manage an asset 22 | type AirlineMilesChaincode struct { 23 | } 24 | 25 | type user struct { 26 | Name string `json:"Name"` 27 | AirlineMiles int `json:"AirlineMiles"` 28 | Flights map[string]flight `json:"Flights"` 29 | } 30 | 31 | type flight struct { 32 | Id string `json:"Id"` 33 | Date string `json:"Date"` 34 | Airline string `json:"Airline"` 35 | Location string `json:"Location"` 36 | From string `json:"From"` 37 | Price int `json:"Price"` 38 | } 39 | 40 | // Init is called during chaincode instantiation to initialize 41 | // data. We'll be adding more in this function later on. 42 | func (t *AirlineMilesChaincode) Init(stub shim.ChaincodeStubInterface) peer.Response { 43 | return shim.Success(nil) 44 | } 45 | 46 | // Invoke is called per transaction on the chaincode. Each transaction is 47 | // either a 'get' or a 'set' on the asset created by Init function. The Set 48 | // method may create a new asset by specifying a new key-value pair. 49 | func (t *AirlineMilesChaincode) Invoke(stub shim.ChaincodeStubInterface) peer.Response { 50 | // Extract the function and args from the transaction proposal 51 | fn, args := stub.GetFunctionAndParameters() 52 | 53 | var result string 54 | var err error 55 | 56 | switch fn { 57 | case "initLedger": 58 | result, err = initLedger(stub) 59 | case "queryUser": 60 | result, err = queryUser(stub, args) 61 | case "queryFlight": 62 | result, err = queryFlight(stub, args) 63 | case "queryAllFlights": 64 | result, err = queryAllFlights(stub) 65 | case "addUser": 66 | result, err = addUser(stub, args) 67 | case "addFlight": 68 | result, err = addFlight(stub, args) 69 | case "purchaseFlight": 70 | result, err = purchaseFlight(stub, args) 71 | } 72 | if err != nil { 73 | return shim.Error(err.Error()) 74 | } 75 | 76 | // Return the result as success payload 77 | return shim.Success([]byte(result)) 78 | } 79 | 80 | func initLedger(stub shim.ChaincodeStubInterface) (string, error) { 81 | users := map[string]user{} 82 | flights := map[string]flight{} 83 | 84 | users["Daniel"] = user{ 85 | Name: "Daniel", 86 | AirlineMiles: 2000, 87 | Flights: map[string]flight{}, 88 | } 89 | flights["0"] = flight{ 90 | Id: "0", 91 | Date: "8/27/18", 92 | Airline: "Org1", 93 | Location: "London", 94 | From: "Dallas", 95 | Price: 500, 96 | } 97 | flights["1"] = flight{ 98 | Id: "1", 99 | Date: "8/27/18", 100 | Airline: "Org2", 101 | Location: "Tokyo", 102 | From: "Dallas", 103 | Price: 750, 104 | } 105 | flights["2"] = flight{ 106 | Id: "2", 107 | Date: "8/27/18", 108 | Airline: "Org1", 109 | Location: "Madrid", 110 | From: "Dallas", 111 | Price: 1000, 112 | } 113 | flights["3"] = flight{ 114 | Id: "3", 115 | Date: "8/27/18", 116 | Airline: "Org2", 117 | Location: "Berlin", 118 | From: "Dallas", 119 | Price: 950, 120 | } 121 | usersAsBytes, _ := json.Marshal(users) 122 | flightsAsBytes, _ := json.Marshal(flights) 123 | err := stub.PutState("Users", usersAsBytes) 124 | er := stub.PutState("Flights", flightsAsBytes) 125 | if (err != nil) && (er != nil) { 126 | return "", fmt.Errorf("Failed to intialize ledger") 127 | } 128 | return string(flightsAsBytes), err 129 | } 130 | 131 | // Set stores the asset (both key and value) on the ledger. If the key exists, 132 | // it will override the value with the new one 133 | func queryUser(stub shim.ChaincodeStubInterface, args []string) (string, error) { 134 | if len(args) != 1 { 135 | return "", fmt.Errorf("Incorrect arguments. Expecting a key") 136 | } 137 | 138 | users := map[string]user{} 139 | usersAsBytes, err := stub.GetState("Users") 140 | json.Unmarshal(usersAsBytes, &users) 141 | selectedUserAsBytes, err := json.Marshal(users[args[0]]) //Require string? 142 | 143 | if err != nil { 144 | return "", fmt.Errorf("Failed to get asset: %s with error: %s", args[0], err) 145 | } 146 | if selectedUserAsBytes == nil { 147 | return "", fmt.Errorf("Asset not found: %s", args[0]) 148 | } 149 | return string(selectedUserAsBytes), nil 150 | } 151 | 152 | // Get returns the value of the specified asset key 153 | func queryFlight(stub shim.ChaincodeStubInterface, args []string) (string, error) { 154 | if len(args) != 1 { 155 | return "", fmt.Errorf("Incorrect arguments. Expecting an id") 156 | } 157 | 158 | flights := map[string]flight{} 159 | flightsAsBytes, err := stub.GetState("Flights") 160 | json.Unmarshal(flightsAsBytes, &flights) 161 | selectedFlightAsBytes, err := json.Marshal(flights[args[0]]) 162 | 163 | if err != nil { 164 | return "", fmt.Errorf("Failed to get asset: %s with error: %s", args[0], err) 165 | } 166 | if selectedFlightAsBytes == nil { 167 | return "", fmt.Errorf("Asset not found: %s", args[0]) 168 | } 169 | return string(selectedFlightAsBytes), nil 170 | } 171 | 172 | func queryAllFlights(stub shim.ChaincodeStubInterface) (string, error) { 173 | 174 | flightsAsBytes, err := stub.GetState("Flights") 175 | 176 | if err != nil { 177 | return "", fmt.Errorf("Failed to get assets") 178 | } 179 | if flightsAsBytes == nil { 180 | return "", fmt.Errorf("Assets not found") 181 | } 182 | return string(flightsAsBytes), nil //! Possibly change after testing behavior? 183 | } 184 | 185 | func addUser(stub shim.ChaincodeStubInterface, args []string) (string, error) { 186 | if len(args) != 2 { 187 | return "", fmt.Errorf("Incorrect arguments. Expecting two arguments (name, number of Airline miles)") 188 | } 189 | userAirlineMiles, _ := strconv.Atoi(args[1]) 190 | users := map[string]user{} 191 | usersAsBytes, _ := stub.GetState("Users") 192 | json.Unmarshal(usersAsBytes, &users) 193 | 194 | users[args[0]] = user{ 195 | Name: args[0], 196 | AirlineMiles: userAirlineMiles, 197 | Flights: map[string]flight{}, 198 | } 199 | updatedUsersAsBytes, _ := json.Marshal(users) 200 | err := stub.PutState("Users", updatedUsersAsBytes) 201 | if err != nil { 202 | return "", fmt.Errorf("Failed to set asset: %s", args[0]) 203 | } 204 | return string(updatedUsersAsBytes), nil 205 | } 206 | 207 | func addFlight(stub shim.ChaincodeStubInterface, args []string) (string, error) { 208 | if len(args) != 6 { 209 | return "", fmt.Errorf("Incorrect arguments. Expecting five arguments (id, date, airline, location, origin city, and price)") 210 | } 211 | flightPrice, _ := strconv.Atoi(args[5]) 212 | flights := map[string]flight{} 213 | flightsAsBytes, _ := stub.GetState("Flights") 214 | json.Unmarshal(flightsAsBytes, &flights) 215 | 216 | flights[args[0]] = flight{ 217 | Id: args[0], 218 | Date: args[1], 219 | Airline: args[2], 220 | Location: args[3], 221 | From: args[4], 222 | Price: flightPrice, 223 | } 224 | 225 | updatedFlightAsBytes, _ := json.Marshal(flights) 226 | err := stub.PutState("Flights", updatedFlightAsBytes) 227 | if err != nil { 228 | return "", fmt.Errorf("Failed to set asset: %s", args[0]) 229 | } 230 | return string(updatedFlightAsBytes), nil 231 | } 232 | 233 | func purchaseFlight(stub shim.ChaincodeStubInterface, args []string) (string, error) { 234 | if len(args) != 2 { 235 | return "", fmt.Errorf("Incorrect arguments. Expecting two arguments (user name, and flight id)") 236 | } 237 | flightsAsBytes, _ := stub.GetState("Flights") 238 | usersAsBytes, _ := stub.GetState("Users") 239 | 240 | flights := map[string]flight{} 241 | users := map[string]user{} 242 | 243 | json.Unmarshal(flightsAsBytes, &flights) 244 | json.Unmarshal(usersAsBytes, &users) 245 | 246 | purchaser := users[args[0]] 247 | userAirlineMiles := purchaser.AirlineMiles 248 | selectedFlight := flights[args[1]] 249 | flightCost := selectedFlight.Price 250 | 251 | if flightCost <= 0 { 252 | return "", fmt.Errorf("Error getting flight price") 253 | } 254 | if userAirlineMiles <= 0 { 255 | return "", fmt.Errorf("Error getting user airline miles") 256 | } 257 | if userAirlineMiles >= flightCost { 258 | purchaser.AirlineMiles = userAirlineMiles - flightCost 259 | purchaser.Flights[selectedFlight.Id] = selectedFlight 260 | // Ugly work-around because you cannot assign to map indexes directly :( 261 | users[args[0]] = purchaser 262 | 263 | updatedUserAsBytes, _ := json.Marshal(users) 264 | err := stub.PutState("Users", updatedUserAsBytes) 265 | if err != nil { 266 | return "", fmt.Errorf("Failed to set asset: %s", args[0]) 267 | } 268 | return string(updatedUserAsBytes), nil 269 | } else { 270 | return "", fmt.Errorf("User does not have enough funds") 271 | } 272 | } 273 | 274 | // main function starts up the chaincode in the container during instantiate 275 | func main() { 276 | err := shim.Start(new(AirlineMilesChaincode)) 277 | if err != nil { 278 | fmt.Println("Could not start Airline Mile Chaincode") 279 | } else { 280 | fmt.Println("Airline Mile Chaincode successfully started") 281 | } 282 | } 283 | -------------------------------------------------------------------------------- /fabric-network/chaincode/AirLineMiles/AirLineMiles_test.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "fmt" 5 | "testing" 6 | 7 | "github.com/hyperledger/fabric/core/chaincode/shim" 8 | ) 9 | 10 | func TestInvokeInit(t *testing.T) { 11 | fmt.Println("Starting") 12 | 13 | // Instantiate mockStub using CarDemo as the target chaincode to unit test 14 | stub := shim.NewMockStub("mockStub", new(AirlineMilesChaincode)) 15 | if stub == nil { 16 | t.Fatalf("MockStub creation failed") 17 | } 18 | 19 | // Here we perform a "mock invoke" to invoke the function "initVehiclePart" method with associated parameters 20 | // The first parameter is the function we are invoking 21 | result := stub.MockInvoke("0.01", 22 | [][]byte{[]byte("initLedger")}) 23 | 24 | // We expect a shim.ok if all goes well 25 | if result.Status != shim.OK { 26 | t.Fatalf("Expected unauthorized user error to be returned") 27 | } 28 | 29 | // here we validate we can retrieve the vehiclePart object we just committed by serianNumber 30 | valAsbytes, err := stub.GetState("Flights") 31 | if err != nil { 32 | t.Errorf("Failed to get state for " + "Flights") 33 | } else if valAsbytes == nil { 34 | t.Errorf("Flight does not exist: " + "Flights") 35 | } 36 | 37 | fmt.Println(string(valAsbytes)) 38 | 39 | result_purchase_flight := stub.MockInvoke("0.01", 40 | [][]byte{[]byte("purchaseFlight"), 41 | []byte("Daniel"), 42 | []byte("0")}) 43 | 44 | if result_purchase_flight.Status != shim.OK { 45 | t.Fatalf("Expected unauthorized user error to be returned") 46 | } 47 | 48 | fmt.Println(result_purchase_flight) 49 | 50 | UsersAsBytes, err := stub.GetState("Users") 51 | if err != nil { 52 | t.Errorf("Failed to get state for ") 53 | } else { 54 | fmt.Println(string(UsersAsBytes)) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /fabric-network/chaincode/AirlineMilesExchange/AirlineMilesExchange: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-chrome-extension/438769b948b412f068ff1ec80f6633647eb6c272/fabric-network/chaincode/AirlineMilesExchange/AirlineMilesExchange -------------------------------------------------------------------------------- /fabric-network/chaincode/AirlineMilesExchange/AirlineMilesExchange.go: -------------------------------------------------------------------------------- 1 | //SPDX-License-Identifier: Apache-2.0 2 | 3 | // Import dependencies 4 | // Import the chaincode shim package and the peer protobuf package 5 | 6 | /* This code is based on code written by the Hyperledger Fabric community. 7 | Original code can be found here: https://github.com/hyperledger/fabric-samples/blob/release/chaincode/chaincode_example02/chaincode_example02.go 8 | */ 9 | 10 | package main 11 | 12 | import ( 13 | "encoding/json" 14 | "fmt" 15 | "strconv" 16 | 17 | "github.com/hyperledger/fabric/core/chaincode/shim" 18 | "github.com/hyperledger/fabric/protos/peer" 19 | ) 20 | 21 | // AirlineMilesChaincode implements a simple chaincode to manage an asset 22 | type AirlineMilesChaincode struct { 23 | } 24 | 25 | type user struct { 26 | Name string `json:"Name"` 27 | AirlineMiles int `json:"AirlineMiles"` 28 | Flights map[string]flight `json:"Flights"` 29 | } 30 | 31 | type flight struct { 32 | Id string `json:"Id"` 33 | Airline string `json:"Airline"` 34 | Location string `json:"Location"` 35 | Price int `json:"Price"` 36 | } 37 | 38 | // Init is called during chaincode instantiation to initialize 39 | // data. We'll be adding more in this function later on. 40 | func (t *AirlineMilesChaincode) Init(stub shim.ChaincodeStubInterface) peer.Response { 41 | return shim.Success(nil) 42 | } 43 | 44 | // Invoke is called per transaction on the chaincode. Each transaction is 45 | // either a 'get' or a 'set' on the asset created by Init function. The Set 46 | // method may create a new asset by specifying a new key-value pair. 47 | func (t *AirlineMilesChaincode) Invoke(stub shim.ChaincodeStubInterface) peer.Response { 48 | // Extract the function and args from the transaction proposal 49 | fn, args := stub.GetFunctionAndParameters() 50 | 51 | var result string 52 | var err error 53 | 54 | switch fn { 55 | case "initLedger": 56 | result, err = initLedger(stub) 57 | case "queryUser": 58 | result, err = queryUser(stub, args) 59 | case "queryFlight": 60 | result, err = queryFlight(stub, args) 61 | case "queryAllFlights": 62 | result, err = queryAllFlights(stub) 63 | case "addUser": 64 | result, err = addUser(stub, args) 65 | } 66 | if err != nil { 67 | return shim.Error(err.Error()) 68 | } 69 | 70 | // Return the result as success payload 71 | return shim.Success([]byte(result)) 72 | } 73 | 74 | func initLedger(stub shim.ChaincodeStubInterface) (string, error) { 75 | users := map[string]user{} 76 | flights := map[string]flight{} 77 | 78 | users["Daniel"] = user{ 79 | Name: "Daniel", 80 | AirlineMiles: 2000, 81 | Flights: map[string]flight{}, 82 | } 83 | flights["0"] = flight{ 84 | Id: "0", 85 | Airline: "Org1", 86 | Location: "London", 87 | Price: 500, 88 | } 89 | flights["1"] = flight{ 90 | Id: "1", 91 | Airline: "Org2", 92 | Location: "Tokyo", 93 | Price: 750, 94 | } 95 | usersAsBytes, _ := json.Marshal(users) 96 | flightsAsBytes, _ := json.Marshal(flights) 97 | err := stub.PutState("Users", usersAsBytes) 98 | er := stub.PutState("Flights", flightsAsBytes) 99 | if (err != nil) && (er != nil) { 100 | return "", fmt.Errorf("Failed to intialize ledger") 101 | } 102 | return string(flightsAsBytes), err 103 | } 104 | 105 | // Set stores the asset (both key and value) on the ledger. If the key exists, 106 | // it will override the value with the new one 107 | func queryUser(stub shim.ChaincodeStubInterface, args []string) (string, error) { 108 | if len(args) != 1 { 109 | return "", fmt.Errorf("Incorrect arguments. Expecting a key") 110 | } 111 | 112 | users := map[string]user{} 113 | usersAsBytes, err := stub.GetState("Users") 114 | json.Unmarshal(usersAsBytes, &users) 115 | selectedUserAsBytes, err := json.Marshal(users[args[0]]) //Require string? 116 | 117 | if err != nil { 118 | return "", fmt.Errorf("Failed to get asset: %s with error: %s", args[0], err) 119 | } 120 | if selectedUserAsBytes == nil { 121 | return "", fmt.Errorf("Asset not found: %s", args[0]) 122 | } 123 | return string(selectedUserAsBytes), nil 124 | } 125 | 126 | // Get returns the value of the specified asset key 127 | func queryFlight(stub shim.ChaincodeStubInterface, args []string) (string, error) { 128 | if len(args) != 1 { 129 | return "", fmt.Errorf("Incorrect arguments. Expecting an id") 130 | } 131 | 132 | flights := map[string]flight{} 133 | flightsAsBytes, err := stub.GetState("Flights") 134 | json.Unmarshal(flightsAsBytes, &flights) 135 | selectedFlightAsBytes, err := json.Marshal(flights[args[0]]) 136 | 137 | if err != nil { 138 | return "", fmt.Errorf("Failed to get asset: %s with error: %s", args[0], err) 139 | } 140 | if selectedFlightAsBytes == nil { 141 | return "", fmt.Errorf("Asset not found: %s", args[0]) 142 | } 143 | return string(selectedFlightAsBytes), nil 144 | } 145 | 146 | func queryAllFlights(stub shim.ChaincodeStubInterface) (string, error) { 147 | 148 | flightsAsBytes, err := stub.GetState("Flights") 149 | 150 | if err != nil { 151 | return "", fmt.Errorf("Failed to get assets") 152 | } 153 | if flightsAsBytes == nil { 154 | return "", fmt.Errorf("Assets not found") 155 | } 156 | return string(flightsAsBytes), nil //! Possibly change after testing behavior? 157 | } 158 | 159 | func addUser(stub shim.ChaincodeStubInterface, args []string) (string, error) { 160 | if len(args) != 2 { 161 | return "", fmt.Errorf("Incorrect arguments. Expecting two arguments (name, number of Airline miles)") 162 | } 163 | userAirlineMiles, _ := strconv.Atoi(args[1]) 164 | users := map[string]user{} 165 | usersAsBytes, _ := stub.GetState("Users") 166 | json.Unmarshal(usersAsBytes, &users) 167 | 168 | users[args[0]] = user{ 169 | Name: args[0], 170 | AirlineMiles: userAirlineMiles, 171 | Flights: map[string]flight{}, 172 | } 173 | updatedUsersAsBytes, _ := json.Marshal(users) 174 | err := stub.PutState("Users", updatedUsersAsBytes) 175 | if err != nil { 176 | return "", fmt.Errorf("Failed to set asset: %s", args[0]) 177 | } 178 | return string(updatedUsersAsBytes), nil 179 | } 180 | 181 | func addFlight(stub shim.ChaincodeStubInterface, args []string) (string, error) { 182 | if len(args) != 4 { 183 | return "", fmt.Errorf("Incorrect arguments. Expecting four arguments (id, airline, location, price)") 184 | } 185 | flightPrice, _ := strconv.Atoi(args[3]) 186 | flights := map[string]flight{} 187 | flightsAsBytes, _ := stub.GetState("Flights") 188 | json.Unmarshal(flightsAsBytes, &flights) 189 | 190 | flights[args[0]] = flight{ 191 | Id: args[0], 192 | Airline: args[1], 193 | Location: args[2], 194 | Price: flightPrice, 195 | } 196 | updatedFlightAsBytes, _ := json.Marshal(flights) 197 | err := stub.PutState("Flights", updatedFlightAsBytes) 198 | if err != nil { 199 | return "", fmt.Errorf("Failed to set asset: %s", args[0]) 200 | } 201 | return string(updatedFlightAsBytes), nil 202 | } 203 | 204 | func purchaseFlight(stub shim.ChaincodeStubInterface, args []string) (string, error) { 205 | if len(args) != 2 { 206 | return "", fmt.Errorf("Incorrect arguments. Expecting two arguments (user name, and flight id)") 207 | } 208 | flightsAsBytes, _ := stub.GetState("Flights") 209 | usersAsBytes, _ := stub.GetState("Users") 210 | 211 | flights := map[string]flight{} 212 | users := map[string]user{} 213 | 214 | json.Unmarshal(flightsAsBytes, &flights) 215 | json.Unmarshal(usersAsBytes, &users) 216 | 217 | purchaser := users[args[0]] 218 | userAirlineMiles := purchaser.AirlineMiles 219 | selectedFlight := flights[args[1]] 220 | flightCost := selectedFlight.Price 221 | 222 | if flightCost <= 0 { 223 | return "", fmt.Errorf("Error getting flight price") 224 | } 225 | if userAirlineMiles <= 0 { 226 | return "", fmt.Errorf("Error getting user airline miles") 227 | } 228 | if userAirlineMiles >= flightCost { 229 | purchaser.AirlineMiles = userAirlineMiles - flightCost 230 | purchaser.Flights[selectedFlight.Id] = selectedFlight 231 | // Ugly work-around because you cannot assign to map indexes directly :( 232 | users[args[0]] = purchaser 233 | 234 | updatedUserAsBytes, _ := json.Marshal(users) 235 | err := stub.PutState("Users", updatedUserAsBytes) 236 | if err != nil { 237 | return "", fmt.Errorf("Failed to set asset: %s", args[0]) 238 | } 239 | return string(updatedUserAsBytes), nil 240 | } else { 241 | return "", fmt.Errorf("User does not have enough funds") 242 | } 243 | } 244 | 245 | // main function starts up the chaincode in the container during instantiate 246 | func main() { 247 | err := shim.Start(new(AirlineMilesChaincode)) 248 | if err != nil { 249 | fmt.Println("Could not start Airline Mile Chaincode") 250 | } else { 251 | fmt.Println("Airline Mile Chaincode successfully started") 252 | } 253 | } 254 | -------------------------------------------------------------------------------- /fabric-network/chaincode/BoatExchange/BoatExchange: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-chrome-extension/438769b948b412f068ff1ec80f6633647eb6c272/fabric-network/chaincode/BoatExchange/BoatExchange -------------------------------------------------------------------------------- /fabric-network/chaincode/BoatExchange/BoatExchange.go: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright IBM Corp All Rights Reserved 3 | * 4 | * SPDX-License-Identifier: Apache-2.0 5 | */ 6 | 7 | package main 8 | 9 | import ( 10 | "encoding/json" 11 | "fmt" 12 | 13 | "github.com/hyperledger/fabric/core/chaincode/shim" 14 | peer "github.com/hyperledger/fabric/protos/peer" 15 | ) 16 | 17 | // SimpleAsset implements a simple chaincode to manage an asset 18 | type SimpleAsset struct { 19 | } 20 | 21 | type Boat struct { 22 | holder string `json:"string"` 23 | make string `json:"string"` 24 | } 25 | 26 | // Init is called during chaincode instantiation to initialize any 27 | // data. Note that chaincode upgrade also calls this function to reset 28 | // or to migrate data. 29 | func (t *SimpleAsset) Init(stub shim.ChaincodeStubInterface) peer.Response { 30 | // Get the args from the transaction proposal 31 | args := stub.GetStringArgs() 32 | if len(args) != 3 { 33 | return shim.Error("Incorrect arguments. Expecting a key, holder and boat make") 34 | } 35 | 36 | // Set up any variables or assets here by calling stub.PutState() 37 | 38 | // We store the key and the value on the ledger 39 | boatObject := Boat{holder: args[1], make: args[2]} 40 | boatAsBytes, _ := json.Marshal(boatObject) 41 | err := stub.PutState(args[0], boatAsBytes) 42 | 43 | if err != nil { 44 | return shim.Error(fmt.Sprintf("Failed to create asset: %s", args[0])) 45 | } 46 | return shim.Success(nil) 47 | } 48 | 49 | // Invoke is called per transaction on the chaincode. Each transaction is 50 | // either a 'get' or a 'set' on the asset created by Init function. The Set 51 | // method may create a new asset by specifying a new key-value pair. 52 | func (t *SimpleAsset) Invoke(stub shim.ChaincodeStubInterface) peer.Response { 53 | // Extract the function and args from the transaction proposal 54 | fn, args := stub.GetFunctionAndParameters() 55 | 56 | var result string 57 | var err error 58 | if fn == "set" { 59 | result, err = set(stub, args) 60 | } else { // assume 'get' even if fn is nil 61 | result, err = get(stub, args) 62 | } 63 | if err != nil { 64 | return shim.Error(err.Error()) 65 | } 66 | 67 | // Return the result as success payload 68 | return shim.Success([]byte(result)) 69 | } 70 | 71 | // Set stores the asset (both key and value) on the ledger. If the key exists, 72 | // it will override the value with the new one 73 | func set(stub shim.ChaincodeStubInterface, args []string) (string, error) { // Key, owner, type 74 | if len(args) != 3 { 75 | return "", fmt.Errorf("Incorrect arguments. Expecting a key, owner, and boat make") 76 | } 77 | 78 | boatObject := Boat{holder: args[1], make: args[2]} 79 | boatAsBytes, _ := json.Marshal(boatObject) 80 | err := stub.PutState(args[0], boatAsBytes) 81 | if err != nil { 82 | return "", fmt.Errorf("Failed to set asset: %s", args[0]) 83 | } 84 | return string(boatAsBytes), nil 85 | } 86 | 87 | // Get returns the value of the specified asset key 88 | func get(stub shim.ChaincodeStubInterface, args []string) (string, error) { 89 | if len(args) != 1 { 90 | return "", fmt.Errorf("Incorrect arguments. Expecting a key") 91 | } 92 | 93 | value, err := stub.GetState(args[0]) 94 | if err != nil { 95 | return "", fmt.Errorf("Failed to get asset: %s with error: %s", args[0], err) 96 | } 97 | if value == nil { 98 | return "", fmt.Errorf("Asset not found: %s", args[0]) 99 | } 100 | return string(value), nil 101 | } 102 | 103 | // main function starts up the chaincode in the container during instantiate 104 | func main() { 105 | fmt.Printf("Working not locally") 106 | if err := shim.Start(new(SimpleAsset)); err != nil { 107 | fmt.Printf("Error starting SimpleAsset chaincode: %s", err) 108 | } 109 | } 110 | -------------------------------------------------------------------------------- /fabric-network/chaincode/sample-chaincode.go: -------------------------------------------------------------------------------- 1 | //SPDX-License-Identifier: Apache-2.0 2 | 3 | // Import dependencies 4 | // Import the chaincode shim package and the peer protobuf package 5 | 6 | /* This code is based on code written by the Hyperledger Fabric community. 7 | Original code can be found here: https://github.com/hyperledger/fabric-samples/blob/release/chaincode/chaincode_example02/chaincode_example02.go 8 | */ 9 | 10 | package main 11 | 12 | import ( 13 | "fmt" 14 | 15 | "github.com/hyperledger/fabric/core/chaincode/shim" 16 | "github.com/hyperledger/fabric/protos/peer" 17 | ) 18 | 19 | // SampleChaincode implements a simple chaincode to manage an asset 20 | type SampleChaincode struct { 21 | 22 | } 23 | 24 | // Init is called during chaincode instantiation to initialize 25 | // data. We'll be adding more in this function later on. 26 | func (t *SampleChaincode) Init(stub shim.ChaincodeStubInterface) peer.Response { 27 | // Get the args from the transaction proposal 28 | args := stub.GetStringArgs() 29 | if len(args) != 2 { 30 | return shim.Error("Incorrect arguments. Expecting a key and a value") 31 | } 32 | 33 | // Set up any variables or assets here by calling stub.PutState() 34 | 35 | // We store the key and the value on the ledger 36 | err := stub.PutState(args[0], []byte(args[1])) 37 | if err != nil { 38 | return shim.Error(fmt.Sprintf("Failed to create asset: %s", args[0])) 39 | } 40 | return shim.Success(nil) 41 | } 42 | 43 | // Invoke is called per transaction on the chaincode. Each transaction is 44 | // either a 'get' or a 'set' on the asset created by Init function. The Set 45 | // method may create a new asset by specifying a new key-value pair. 46 | func (t *SampleChaincode) Invoke(stub shim.ChaincodeStubInterface) peer.Response { 47 | // Extract the function and args from the transaction proposal 48 | fn, args := stub.GetFunctionAndParameters() 49 | 50 | var result string 51 | var err error 52 | if fn == "set" { 53 | result, err = set(stub, args) 54 | } else { // assume 'get' even if fn is nil 55 | result, err = get(stub, args) 56 | } 57 | if err != nil { 58 | return shim.Error(err.Error()) 59 | } 60 | 61 | // Return the result as success payload 62 | return shim.Success([]byte(result)) 63 | } 64 | 65 | // Set stores the asset (both key and value) on the ledger. If the key exists, 66 | // it will override the value with the new one 67 | func set(stub shim.ChaincodeStubInterface, args []string) (string, error) { 68 | if len(args) != 2 { 69 | return "", fmt.Errorf("Incorrect arguments. Expecting a key and a value") 70 | } 71 | 72 | err := stub.PutState(args[0], []byte(args[1])) 73 | if err != nil { 74 | return "", fmt.Errorf("Failed to set asset: %s", args[0]) 75 | } 76 | return args[1], nil 77 | } 78 | 79 | // Get returns the value of the specified asset key 80 | func get(stub shim.ChaincodeStubInterface, args []string) (string, error) { 81 | if len(args) != 1 { 82 | return "", fmt.Errorf("Incorrect arguments. Expecting a key") 83 | } 84 | 85 | value, err := stub.GetState(args[0]) 86 | if err != nil { 87 | return "", fmt.Errorf("Failed to get asset: %s with error: %s", args[0], err) 88 | } 89 | if value == nil { 90 | return "", fmt.Errorf("Asset not found: %s", args[0]) 91 | } 92 | return string(value), nil 93 | } 94 | 95 | // main function starts up the chaincode in the container during instantiate 96 | func main() { 97 | err := shim.Start(new(SampleChaincode)) 98 | if err != nil { 99 | fmt.Println("Could not start SampleChaincode") 100 | } else { 101 | fmt.Println("SampleChaincode successfully started") 102 | } 103 | } -------------------------------------------------------------------------------- /fabric-network/chaincode/testing/testing: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hyperledger-labs/fabric-chrome-extension/438769b948b412f068ff1ec80f6633647eb6c272/fabric-network/chaincode/testing/testing -------------------------------------------------------------------------------- /fabric-network/chaincode/testing/testing.go: -------------------------------------------------------------------------------- 1 | //SPDX-License-Identifier: Apache-2.0 2 | 3 | // Import dependencies 4 | // Import the chaincode shim package and the peer protobuf package 5 | 6 | /* This code is based on code written by the Hyperledger Fabric community. 7 | Original code can be found here: https://github.com/hyperledger/fabric-samples/blob/release/chaincode/chaincode_example02/chaincode_example02.go 8 | */ 9 | 10 | package main 11 | 12 | import ( 13 | "fmt" 14 | 15 | "github.com/hyperledger/fabric/core/chaincode/shim" 16 | "github.com/hyperledger/fabric/protos/peer" 17 | ) 18 | 19 | // SampleChaincode implements a simple chaincode to manage an asset 20 | type SampleChaincode struct { 21 | } 22 | 23 | // Init is called during chaincode instantiation to initialize 24 | // data. We'll be adding more in this function later on. 25 | func (t *SampleChaincode) Init(stub shim.ChaincodeStubInterface) peer.Response { 26 | // Get the args from the transaction proposal 27 | args := stub.GetStringArgs() 28 | if len(args) != 2 { 29 | return shim.Error("Incorrect arguments. Expecting a key and a value") 30 | } 31 | 32 | // Set up any variables or assets here by calling stub.PutState() 33 | 34 | // We store the key and the value on the ledger 35 | err := stub.PutState(args[0], []byte(args[1])) 36 | if err != nil { 37 | return shim.Error(fmt.Sprintf("Failed to create asset: %s", args[0])) 38 | } 39 | return shim.Success(nil) 40 | } 41 | 42 | // Invoke is called per transaction on the chaincode. Each transaction is 43 | // either a 'get' or a 'set' on the asset created by Init function. The Set 44 | // method may create a new asset by specifying a new key-value pair. 45 | func (t *SampleChaincode) Invoke(stub shim.ChaincodeStubInterface) peer.Response { 46 | // Extract the function and args from the transaction proposal 47 | fn, args := stub.GetFunctionAndParameters() 48 | 49 | var result string 50 | var err error 51 | if fn == "set" { 52 | result, err = set(stub, args) 53 | } else { // assume 'get' even if fn is nil 54 | result, err = get(stub, args) 55 | } 56 | if err != nil { 57 | return shim.Error(err.Error()) 58 | } 59 | 60 | // Return the result as success payload 61 | return shim.Success([]byte(result)) 62 | } 63 | 64 | // Set stores the asset (both key and value) on the ledger. If the key exists, 65 | // it will override the value with the new one 66 | func set(stub shim.ChaincodeStubInterface, args []string) (string, error) { 67 | if len(args) != 2 { 68 | return "", fmt.Errorf("Incorrect arguments. Expecting a key and a value") 69 | } 70 | 71 | err := stub.PutState(args[0], []byte(args[1])) 72 | if err != nil { 73 | return "", fmt.Errorf("Failed to set asset: %s", args[0]) 74 | } 75 | return args[1], nil 76 | } 77 | 78 | // Get returns the value of the specified asset key 79 | func get(stub shim.ChaincodeStubInterface, args []string) (string, error) { 80 | if len(args) != 1 { 81 | return "", fmt.Errorf("Incorrect arguments. Expecting a key") 82 | } 83 | 84 | value, err := stub.GetState(args[0]) 85 | if err != nil { 86 | return "", fmt.Errorf("Failed to get asset: %s with error: %s", args[0], err) 87 | } 88 | if value == nil { 89 | return "", fmt.Errorf("Asset not found: %s", args[0]) 90 | } 91 | return string(value), nil 92 | } 93 | 94 | // main function starts up the chaincode in the container during instantiate 95 | func main() { 96 | err := shim.Start(new(SampleChaincode)) 97 | if err != nil { 98 | fmt.Println("Could not start SampleChaincode") 99 | } else { 100 | fmt.Println("SampleChaincode successfully started") 101 | } 102 | } 103 | -------------------------------------------------------------------------------- /site-example/fabric-site.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Hyperledger Fabric Website 5 | 6 | 7 | 8 | 9 |
    10 |

    Hyperledger Fabric Website

    11 |
    12 | 13 |
    14 |

    Test querying the ledger:

    15 |
    16 | Key:
    17 | 18 |

    19 | 20 |
    21 |

    Value:

    22 |

    23 |
    24 | 25 |
    26 |

    Test submitting Transaction:

    27 |
    28 | Key:
    29 | 30 |

    31 | Value:
    32 | 33 |

    34 | 35 |
    36 |

    Transaction ID:

    37 |

    38 |
    39 | 40 |
    41 |

    Test AUTO submitting Transaction:

    42 |
    43 | Key:
    44 | 45 |

    46 | Value:
    47 | 48 |

    49 | 50 |
    51 |

    Transaction ID:

    52 |

    53 |
    54 | 55 |
    56 |

    Test querying Transaction ID:

    57 |
    58 | Transaction ID:
    59 | 60 |

    61 | 62 |
    63 |

    Transaction Data:

    64 |

    65 |
    66 | 67 | -------------------------------------------------------------------------------- /site-example/index.js: -------------------------------------------------------------------------------- 1 | window.addEventListener('load', async () => { 2 | if ((typeof fabricInterface !== 'undefined') && (fabricInterface.info === "Hyperledger Fabric Extension")) { 3 | console.log('Detected Extension'); 4 | } else { 5 | console.log('Extension not detected'); 6 | } 7 | console.log(fabricInterface); 8 | }); 9 | 10 | let queryLedger = async () => { // Make Dynamic!!!! 11 | let key = document.getElementById('query_key_input').value; 12 | try { 13 | const request = { 14 | //targets : --- letting this default to the peers assigned to the channel 15 | chaincodeId: 'testing', 16 | fcn: 'get', 17 | args: [key], 18 | chainId: 'mychannel', 19 | }; 20 | 21 | let ledger_value = await fabricInterface.queryLedger(request); 22 | console.log('testing get function: ', ledger_value); 23 | document.getElementById('queryResponse').innerHTML = ledger_value.value; 24 | return ledger_value; 25 | } catch (error) { 26 | console.log('Could not find value ERROR::', error); 27 | } 28 | } 29 | 30 | 31 | let queryTransaction = async () => { 32 | let id = document.getElementById('transaction_id_input').value; 33 | try { 34 | let response = await fabricInterface.getTransaction(id); 35 | document.getElementById('TransactionData').innerHTML = response; 36 | return response; 37 | } catch (error) { 38 | console.log('Could not find value ERROR::', error); 39 | } 40 | } 41 | 42 | let submitTransactionProposal = async () => { 43 | let key = document.getElementById('set_key_input').value; 44 | let value = document.getElementById('set_value_input').value; 45 | try { 46 | const request = { 47 | //targets : --- letting this default to the peers assigned to the channel 48 | chaincodeId: 'testing', 49 | fcn: 'set', 50 | args: [key, value], 51 | chainId: 'mychannel', 52 | }; 53 | let response = await fabricInterface.submitTransactionProposal(request); 54 | let transactionReponse = await fabricInterface.submitSignedProposal(response); 55 | document.getElementById('TransactionResponse').innerHTML = transactionReponse.response; 56 | return transactionReponse.TransactionID; 57 | } catch (error) { 58 | console.log('Could not find value ERROR::', error); 59 | } 60 | } 61 | 62 | let autoSubmitTransaction = async () => { 63 | let key = document.getElementById('auto_set_key_input').value; 64 | let value = document.getElementById('auto_set_value_input').value; 65 | try { 66 | const request = { 67 | //targets : --- letting this default to the peers assigned to the channel 68 | chaincodeId: 'testing', 69 | fcn: 'set', 70 | args: [key, value], 71 | chainId: 'mychannel', 72 | }; 73 | let response = await fabricInterface.autoSubmitTransaction(request); 74 | console.log('Auto submit transaction response: ', response); 75 | document.getElementById('AutoTransactionResponse').innerHTML = response.TransactionID; 76 | return response.TransactionID; 77 | } catch (error) { 78 | console.log('Could not find value ERROR::', error); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /site-example/styles.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; 3 | margin: 0px; 4 | padding: 0px; 5 | width: 100%; 6 | } 7 | h1 { 8 | margin: 10px; 9 | margin-left: 30px; 10 | line-height: 1.6; 11 | } 12 | .head-wrapper { 13 | box-shadow: rgba(0, 0, 0, 0.4) 0 3px 3px; 14 | } 15 | .content-wrapper { 16 | background-color: #2C2F33; 17 | } 18 | .fabric-test-box { 19 | border-top: solid 1px lightgrey; 20 | box-shadow: rgba(0, 0, 0, 0.4) 0 4px 4px; 21 | border-radius: 3px; 22 | width: 30%; 23 | margin-left: 20px; 24 | margin-top: 3%; 25 | float: left; 26 | text-align: center; 27 | } --------------------------------------------------------------------------------