Skip to content

Instantly share code, notes, and snippets.

@OR13
Last active June 18, 2019 02:38
Show Gist options
  • Save OR13/57f19bb395202ba16ed6786f5908d319 to your computer and use it in GitHub Desktop.
Save OR13/57f19bb395202ba16ed6786f5908d319 to your computer and use it in GitHub Desktop.
New Element Sidetree Interface
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(),
db: new element.adapters.database.ElementPouchDBAdapter({
name: `element-pouchdb.${dbName}`,
}),
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment