@drizzle-utils/current-account-stream

0.2.1 • Public • Published

@drizzle-utils/current-account-stream

Returns an RxJS observable so you can watch for changes to the currently selected account on MetaMask.

Detailed example usage is located in the test-app directory, specifically test-app/src/App.js.

Usage

import createCurrentAccount$ from "@drizzle-utils/current-account-stream";

// pass in your web3 and create the observable
const currentAccount$ = await createCurrentAccount$({ web3 });

// subscribe to the observable
currentAccount$.subscribe(address => console.log(address));

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i @drizzle-utils/current-account-stream

    Weekly Downloads

    0

    Version

    0.2.1

    License

    MIT

    Unpacked Size

    232 kB

    Total Files

    10

    Last publish

    Collaborators

    • adrianmcli
    • cds-amal
    • discriskandbisque
    • honestbonsai