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 🙏

© 2025 – Pkg Stats / Ryan Hefner

cryptoo

v1.0.2

Published

pay with crypto currencies

Readme

Cryptoo

Set up your own bitcoin payment system the easy way(with 4 APIs).

Usage

const Cryptoo = require('cryptoo');

// Create a cryptoo instance
// Start syncing blockchain data
const cryptoo = new Cryptoo({
  secret: 'sample-secret-e34dc9dff1b8b04c2b678ff7bb1dd02181bfe31b045f77',
});

// Get recovery phrase to backup your HD wallet
cryptoo.getRecoveryPhrase();

// Generate address to receive coins(shoud be recorded for looking up later)
cryptoo.createAddress();

// Fires when an unconfirmed transaction is received to your address
cryptoo.on('unconfirmedTx', ({ address, txHash, value }) => {
  console.log(`saw tx ${value} for ${address}`);
});

// Fires when a transaction to your address has one confirmation
cryptoo.on('confirmedTx', ({ address, txHash, value }) => {
  console.log(`received ${value} for ${address}`);
});

Configuration

new Cryptoo({
  // default 'main', can also be 'testnet'
  network: 'main',
  // default '~/.bcoin', where to store blockchain and wallet data
  chainDataFolder: '~/.bcoin',
  // default: null, secret is used to protect your wallet api, so that if you open port 8332 accedently, other people wll not be able to access you wallet
  secret: 'v8ZgxMBicQKsPd1jmUQY2WBfrmK4tVMfAiSCh6xZXVMcNoDoyjLDRKe',
  // default: false, wether to show bcoin log in console, useful for debuging
  logBcoinLogInConsole: false,
});

Real-life examples

How does cryptoo work

All the major functionlites of Cryptoo is provided by bcoin, Cryptoo is a simple wrapper over bcoin, exposing necessary apis to provide an easier api interface for user to build a payment system. It's about 160 lines of code.

Bcoin is able to start and mantain bitcoin SPV node(light weight node) and also HD wallet(able to derive unlimited addresses from a seed key(recovery phrase))

When Cryptoo instance is created, it will start an SPV node and prepare an HD wallet for you.

Depend on your network enviroment, it might take one to severial hours to sync the blockchain data, the blockchain data and wallet info will be stored in chainDataFolder you configure.

About Security

  1. Close 8332 port: for now cryptoo is a wrapper on bcoin, and bcoin will start an http server listening on this port for accessing wallet data, it's recommand to disable 8332 port for external access.
  2. Define a complex api-key: if you are not able to close 8332 port, you should define a complex api-key

Access your bitcoins

As the wallet provided is an HD wallet, once you get the recovery phrase by invoking the getRecoveryPhrase() API. You can access you wallet by importing it to any wallet support bip44

Recommend HD wallets

  • Mycelium
  • Copay(not able to recover wallet from phrase for testnet)

Roadmap

  • cryptoo-eth

Useful tools

  • faucet testnet bitcoin: http://bitcoinfaucet.uo1.net/send.php