git clone git@github.com:hyperledger/fabric-samples.git;
cd fabric-samples;
./scripts/bootstrap.sh 1.4.0 1.4.0 0.4.14;
cd chaincode-docker-devmode;
docker-compose -f docker-compose-simple.yaml up;
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 0x242c3Cb5d8d9E68a8bBfaC9D6704583f1df80AD6 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class MyComponent extends Component { | |
| render() { | |
| return (<div>MyComponent</div>); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { graphql, compose } from "react-apollo"; | |
| import { getPokemon } from "./query"; | |
| import { connect } from "react-redux"; | |
| import client from "../Apollo"; | |
| import { | |
| pokemonLoadStarted, | |
| pokemonLoaded, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from "react"; | |
| import { mount } from "enzyme"; | |
| import toJSON from "enzyme-to-json"; | |
| import { MockedProvider } from "react-apollo/test-utils"; | |
| import { addTypenameToDocument } from "apollo-client"; | |
| import configureStore from "redux-mock-store"; | |
| import { connect } from "react-redux"; | |
| import { graphql, compose } from "react-apollo"; | |
| import { getPokemon } from "../query"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const Web3 = require('web3'); | |
| const fundMetaMaskFromDefaultAccounts = async (amountETH, providerUrl) => { | |
| if (window.web3) { | |
| const metaMaskWeb3 = window.web3; | |
| const ganacheWeb3 = new Web3(new Web3.providers.HttpProvider(providerUrl)); | |
| const getAccounts = someWeb3 => { | |
| return new Promise((resolve, reject) => { | |
| someWeb3.eth.getAccounts(async (err, accounts) => { | |
| if (err) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const MerkleTools = require("merkle-tools"); | |
| const crypto = require("crypto"); | |
| const sha256 = data => { | |
| const h = crypto.createHash("sha256"); | |
| h.update(data); | |
| return h.digest("hex"); | |
| }; | |
| let treeOptions = { |
ProVerif is a tool for automatically analyzing the security of cryptographic protocols. Support is provided for, but not limited to, cryptographic primitives including:
symmetric and asymmetric encryption; digital signatures; hash functions; bit-commitment; and non-interactive zero-knowledge proofs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const sidetree = new element.Sidetree({ | |
| blockchain: element.blockchain.ethereum.configure({ | |
| hdPath: "m/44'/60'/0'/0/0", | |
| mnemonic: config.mnemonic, | |
| providerUrl: config.web3ProviderUrl, | |
| }), | |
| storage: element.storage.ipfs.configure({ | |
| multiaddr: config.ipfsApiMultiAddr, | |
| }), | |
| serviceBus: new element.adapters.serviceBus.ElementNanoBusAdapter(), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const generateActors = (count) => { | |
| for (let i = 0; i < count; i++) { | |
| const mks = new element.MnemonicKeySystem(element.MnemonicKeySystem.generateMnemonic()); | |
| const didUniqueSuffix = element.op.getDidUniqueSuffix({ | |
| primaryKey: mks.getKeyForPurpose('primary', 0), | |
| recoveryPublicKey: mks.getKeyForPurpose('recovery', 0).publicKey, | |
| }); | |
| const actor = { | |
| '@context': 'https://schema.org', | |
| '@type': 'Person', |