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

round-node

v0.5.41

Published

Client for the Gem cryptocurrency API

Downloads

25

Readme

round-node: A Node.js client for the Gem API

The round client is designed to interact with Gem's API to make building blockchain apps drop dead simple. All the complexity of altcoin protocols and cryptography has been abstracted away so you can focus on building your product. Here are a few of the many great things the API and clients provide:

  • Multi-signature wallets with Gem as a cosigner
  • Bitcoin, Testnet, Litecoin, and Dogecoin support (multisig for all!)
  • Webhook notifications automatically subscribed for you
  • Integrated 2FA solution with arbitrary endpoints to build into your app
  • Simplified balance inqueries
  • Easy address management
  • Hardware Security Modules for co-signing key
  • Rules engine for transactions
  • SDKs for many popular languages

Support information

Installing round-node:

$ npm install round-node --save

Getting Started Tutorial

Table of Contents

Introduction

This tutorial will run you through the process of setting up an application with Gem, creating a wallet, funding an address and creating a transaction.

This tutorial assumes that you have completed the developer signup and that you have successfully installed the client

1. Get Your Credentials

  1. Get your credentials by going to the Gem Developer Console. You will need to grab an api_token, an admin_token, and your totp_secret. When you sign up/in you will see a default application that Gem has created for you. You will also see the api_token for that application as well. After you click on the application you will be directed to a page where you can view your totp_secret as well as create an admin_token. (Learn more about admin_tokens here).

[top]

2. Authenticate as an Application

In this step you will authenticate as one of your Gem applications.

 var creds = {
  api_token: API_TOKEN,
  admin_token: ADMIN_TOKEN,
  totp_secret: TOTP_SECRET
 }

 Round.client()
 .then(function (client) {
   return client.authenticate_application(creds);
 })
 .then(function (application) {
   ...
 })

[top]

3. Create a Wallet

In this step you will create a Gem wallet, which is a 2-of-3 multisig bitcoin wallet.

  1. Create a wallet:
  // application.wallets() returns a 'wallets' resource which
  // will allow you to create a wallet.
  application.wallets()
  .then(function (wallets) {
    return wallets.create({
      name: WALLET_NAME,
      passphrase: SECURE_PASSPHRASE
    }); 
  })
  .then(function (data) {
    var wallet = data.wallet;
    var backup_seed = data.backup_seed
  });

IMPORTANT: Save the backup_seed somewhere safe, ideally on a piece of papper. You will need your backup_seed in case you forget your wallet's password. Gem wallets are multi-sig wallets and we only keep an encrypted copy of your primary pivate seed (which is decrypted client-side usig your wallet's passphrase). Therefor, if you forget your wallet's passphrase there is no way for us to recover a wallet without a backup_seed.

[top]

4. Access the Wallet and Default Account

Wallets and Accounts Gem wallets have accounts that are scoped to a network (i.e. bitcoin, testnet, litecoin, dogecoin). A wallet comes with a default account named 'default'. The default account is a bitcoin account (not testnet).

  1. Access the default account
  wallet.accounts()
  .then(function (accounts) {
    // get the default account
    return accounts.get('default');
  })
  .then(function (account) {
   ...
  })
  1. Or, create a new account
  wallet.accounts()
  .then(function (accounts) {
    return accounts.create({
      name: ACCOUNT_NAME,
      network: NETWORK_OF_YOUR_CHOICE
    });
  })
  .then(function (account) {
   ...
  })

[top]

5. Create and Fund an Address

account.addresses()
.then(function (addresses) {
  return addresses.create();
})
.then(function (address) {
// fund this address
 console.log(address.string)
})

Payments have to be confirmed by the network and on Testnet that can be slow. To monitor for confirmations: input the address into the following url https://live.blockcypher.com/btc-testnet/address/<YOUR ADDRESS>. The current standard number of confirmations for a transaction to be considered safe is 6.

You will be able to make a payment with only one confirmation, however. While you wait for that to happen, feel free to read more details about: Wallets and Accounts

[top]

6. Make a Payment

In this section you’ll learn how to create a payment using your wallet. Once your address gets one confirmation we’ll be able to send a payment out of the wallet. To make a payment, you'll unlock a wallet, generate a list of payees and then call the pay method.

```Javascript
var payees = [{
  address: '18XcgfcK4F8d2VhwqFbCbgqrT44r2yHczr',
  amount: 50000
}]
return account.pay({payees: payees});
})
.then(function (tx) {
  console.log(tx)
})
```

The pay call takes a list of payee objects. A payee is a dict of {'address':ADDRESS, 'amount':amount} where address is the bitcoin address and amount is the number of satoshis. utxo_confirmations default to 6 and represents the number of confirmations an unspent output needs to have in order to be selected for the transaction.

CONGRATS - now build something cool.

[top]