Skip to content

LinkdropHQ/linkdrop-widget-provider

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linkdrop Widget Provider

Install

yarn add ssh://[email protected]:LinkdropHQ/linkdrop-widget-provider.git

Usage

import LinkdropWidget from 'linkdrop-widget-provider'
import Web3 from 'web3' // v1.2.1

// init provider
let widget
const initProvider = async () => { 
  widget = new LinkdropWidget({
   network: 'rinkeby'
  })
  
  // will resolve after user registers or logs in
  await widget.provider.enable()
  
  // use web3
  const web3 = new Web3(widget.provider)
  const accounts = await web3.eth.getAccounts()
  console.log({ accounts })
}

// show widget
widget.showWidget()

// hide widget
widget.hideWidget()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published