@drizzle-utils/core
A tool to make frontend dapp development a little bit sweeter.
Usage
import DrizzleUtils from "@drizzle-utils/core";
const drizzleUtils = new DrizzleUtils();
await drizzleUtils.init();
console.log(drizzleUtils.web3);
console.log(drizzleUtils.accounts);
drizzleUtils.currentAccount$.subscribe(addr => console.log("addr"));
Note that, drizzleUtils.currentAccount$
is a regular RxJS 6 Observable. In its simplest usage, we simply subscribe to it and log out the current account address.
For a real usage example, see the test-app
directory. Or more specifically, test-app/src/App.js
.