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 🙏

© 2026 – Pkg Stats / Ryan Hefner

sign-hbwallet

v1.0.0

Published

Package support connection from your dapps website to Web3 in HBWallet

Readme

sign-hbwallet

npm version

Installation

npm install sign-hbwallet --save

or

yarn add sign-hbwallet

This project was created by HB Wallet.

Available Function

In the project directory, you can run :

onConnectWallet

This will allow connection from your dapps website to Web3 in HBWallet . This will return a status as object like

 {
    status: WEB3_STATUS constant,
    network: NETWORK_ETHER constant,
    address: Address of connected account
  }

Available Constant

NETWORK_ETHER

  { key: 1, type: 'Mainnet' },
  { key: 2, type: 'Morden' },
  { key: 3, type: 'Ropsten' },
  { key: 4, type: 'Rinkeby' },
  { key: 42, type: 'Kovan' },
  { key: 5777, type: 'Private' }

WEB3_STATUS

{
  Loading: 'loading',
  NoWeb3: 'noweb3',
  Error: 'error',
  Locked: 'locked',
  ChangeAccount: 'changeaccount',
  Ready: 'ready'
}

Usage example

import React from 'react'
import { onConnectWallet, NETWORK_ETHER } from 'sign-hbwallet'

class HomePage extends React.PureComponent {
  constructor(props) {
    super(props)
    this.state = {
      web3Wallet: {}
    }
  }

  async componentDidMount() {
    setInterval(() => {
      this.refreshWeb3()
    }, 1000)
  }

  refreshWeb3 = async () => {
    const { web3Wallet } = this.state
    const newWeb3Status = await onConnectWallet(web3Wallet)

    // Need to get signed in here
    if (((newWeb3Status && newWeb3Status.status) !== web3Wallet.status)) {
      this.setState({ web3Wallet: newWeb3Status })
    }
  }

  render() {
    const { web3Wallet } = this.state
    return (
      <div>
        <h1>{'HB Wallet'}</h1>
        <div>{'Your address: ' + ((web3Wallet && web3Wallet.account) ? web3Wallet.account : '...')}</div>
        <div>{'Your network: ' + ((web3Wallet && web3Wallet.network) ? NETWORK_ETHER.find(itm => itm.key === web3Wallet.network).type : '...')}</div>
      </div>
    )
  }
}
export default HomePage