npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

wallet-test-noproduction

v2.12.0

Published

Web3-Onboard makes it simple to connect Ethereum hardware and software wallets to your dapp. Features standardised spec compliant web3 providers for all supported wallets, framework agnostic modern javascript UI with code splitting, CSS customization, mul

Downloads

252

Readme

Web3-Onboard

easy way to connect users to dapps

Features

  • Minimal Dependencies: All wallet dependencies are included in separate packages, so you only include the ones you want to use in your app.
  • Multiple Wallets and Accounts Connection: Allow your users to connect multiple wallets and multiple accounts within each wallet at the same time to your app.
  • Multiple Chain Support: Allow users to switch between chains/networks with ease.
  • Account Center: A persistent interface to manage wallet connections and networks, with a minimal version for mobile
  • Notify: Real-time transaction notifications for the connected wallet addresses for all transaction states
  • Wallet Provider Standardization: All wallet modules expose a provider that is patched to be compliant with the EIP-1193, EIP-1102, EIP-3085 and EIP-3326 specifications.
  • Dynamic Imports: Supporting multiple wallets in your app requires a lot of dependencies. Onboard dynamically imports a wallet and its dependencies only when the user selects it, so that minimal bandwidth is used.

Quickstart

Install the core Onboard library, the injected wallets module and optionally ethers js to support browser extension and mobile wallets:

NPM npm i @web3-onboard/core @web3-onboard/injected-wallets ethers

Yarn yarn add @web3-onboard/core @web3-onboard/injected-wallets ethers

Then initialize in your app:

import Onboard from '@web3-onboard/core'
import injectedModule from '@web3-onboard/injected-wallets'
import { ethers } from 'ethers'

const MAINNET_RPC_URL = 'https://mainnet.infura.io/v3/<INFURA_KEY>'

const injected = injectedModule()

const onboard = Onboard({
  wallets: [injected],
  chains: [
    {
      id: '0x1',
      token: 'ETH',
      label: 'Ethereum Mainnet',
      rpcUrl: MAINNET_RPC_URL
    }
  ]
})

const wallets = await onboard.connectWallet()

console.log(wallets)

if (wallets[0]) {
  // create an ethers provider with the last connected wallet provider
  const ethersProvider = new ethers.providers.Web3Provider(
    wallets[0].provider,
    'any'
  )

  const signer = ethersProvider.getSigner()

  // send a transaction with the ethers provider
  const txn = await signer.sendTransaction({
    to: '0x',
    value: 100000000000000
  })

  const receipt = await txn.wait()
  console.log(receipt)
}

Onboard v1 migration guide

If you're coming from v1, we've created a migration guide for you.

Documentation

For full documentation, check out the README.md for each package:

Core Repo

Injected Wallets

SDK Wallets

Hardware Wallets

Frameworks

Test out the demo app

If you would like to test out the current functionality of V2 in a small browser demo, then:

  • Clone the repo: git clone [email protected]:blocknative/onboard.git
  • Change in to the onboard directory: cd onboard
  • Checkout the V2 feature branch: git checkout v2-web3-onboard
  • Install the dependencies: yarn (if running a M1 mac - yarn install-m1-mac)
  • Run all packages in dev mode: yarn dev
  • View demo app in the browser