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

bip44-constants

v340.0.0

Published

Bitcoin BIP44 constants.

Downloads

18,783

Readme

BIP44 Constants

NPM Package

This package provides BIP44 coin constants as found here: https://github.com/satoshilabs/slips/blob/master/slip-0044.md

You can read more about BIP44.

Install

npm i --save bip44-constants

Usage

const constants = require('bip44-constants')
console.log(constants)

// iterate through constants
// format: constant, coinSymbol, coinName
// ie. [ 0x80000002, "LTC", "Litecoin" ]
// Some rows have no coin and are just indices and constants
constants.forEach(row => {
  const constant = row[0]
  const coinSymbol = row[1]
  const coinName = row[2]

  // ...
  console.log(coinName, coinSymbol, constant)
})

// Find your coin by using filter
const liteCoin = constants.filter(item => item[1] === 'LTC')
// ---- OR filter on multiple elements if you are aware of duplicates
const liquidBitcoin = constants.filter(item => item[1] === 'LBTC' && item[2] === 'Liquid BTC')

// Be sure to assert there was only one result
assert(liteCoin.length === 1)
assert(liquidBitcoin.length === 1)

console.log(liteCoin[0])
// [ 2147483650, 'LTC', 'Litecoin' ]
console.log(liquidBitcoin[0])
// [ 2147485424, 'LBTC', 'Liquid BTC' ]

console.log(liteCoin[0][0])
// 2147483650 (which is 0x80000002 in hex)
console.log(liquidBitcoin[0][0])
// 2147485424 (which is 0x800006f0 in hex)

Contributors

If you notice that index.js is out of date, please run npm run update and submit a pull request! Alternatively, please submit an issue to notify us that is out of date.

LICENSE MIT