0.3.1-alpha.0 • Published 5 years ago
@drizzle-utils/core v0.3.1-alpha.0
@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(); // drizzleUtils is a stateful instance
await drizzleUtils.init(); // init method returns a promise
console.log(drizzleUtils.web3); // the web3 instance wrapped by drizzle-utils
console.log(drizzleUtils.accounts); // this is always kept up-to-date
// you can also subscribe to the currentAccount$ observable
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
.
0.3.1-alpha.0
5 years ago
0.3.0-alpha.0
5 years ago
0.2.1
5 years ago
0.2.0
5 years ago
0.1.7-alpha.0
5 years ago
0.1.6-alpha.0
5 years ago
0.1.4-alpha.0
5 years ago
0.1.3-alpha.0
5 years ago
0.1.2-alpha.0
5 years ago