Socket
Socket
Sign inDemoInstall

@drizzle-utils/core

Package Overview
Dependencies
8
Maintainers
4
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @drizzle-utils/core

A tool to make frontend dapp development a little bit sweeter.


Version published
Maintainers
4
Created

Readme

Source

@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.

FAQs

Last updated on 30 Jun 2019

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc