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

yellow-sdk

v0.0.3

Published

Yellow Node.js SDK. An NPM module to easily integrate with the Yellow bitcoin payments API.

Readme

Yellow Node.js SDK

This is the Yellow Node SDK. This simple SDK contains couple of node functions that makes it easy to integrate with the Yellow API. To get started just:

sudo npm install yellow-sdk

Examples

var yellow = require('yellow-sdk');

var api_key = 'Eo2XE5SrHcJVdqK9uIDU',
    api_secret = '73jnZflRHpGReqFxzwF_JtynRNmZXoQspPaxTtsy',
    payload = {
            base_ccy   : "USD",
            base_price : "0.05",
            callback   : "https://merchant.com/callback-url"
    };

yellow.createInvoice(api_key, api_secret, payload, function(error, response, body){
    if (!error && response.statusCode == 200) {
        //print the result beautifully
        console.log(JSON.stringify(body, null, 4));
    } else if(error) {
      console.log(error)
    }

});

With no errors, you should see something similar to the following in your terminal:

{
    "address": "155xsayoDXxRFP9rxDoecmpVUo7y5xKtc7", // Invoice Address
    "base_ccy": "USD",
    "base_price": "0.05",
    "callback": "https://example.com",
    "expiration": "2015-03-10T18:17:51.248Z", // Each invoice expires after 10 minutes of creation
    "id": "6dd264975861fddbfe4404ed995f1ca4", // Invoice ID (to query the invoice later if you need to!)
    "invoice_ccy": "BTC",
    "invoice_price": "0.00017070",
    "received": "0",
    "redirect": null,
    "remaining": "0.00017070",
    "server_time": "2015-03-10T18:07:51.454Z",
    "status": "new", // Status of the invoice. Other values are "authorizing" for unconfirmed transactions, and "paid" for confirmed transactions
    "url": "https://cdn.yellowpay.co/invoice.5f0d082e.html?invoiceId=6dd264975861fddbfe4404ed995f1ca4" // Direct URL for the invoice. You can use it to embed the invoice widget in an iframe on your website.
}

To query an invoice that you created, just pass in the invoice_id to the queryInvoice function:

yellow.queryInvoice(api_key, api_secret, invoice_id, function(error, response, body){
    if (!error && response.statusCode == 200) {
        //print the result beautifully
        console.log(JSON.stringify(body, null, 4));
    } else if(error) {
      console.log(error)
    }

});

With no errors, you should get the same invoice data you got when you created the invoice.

Verifying Yellow POST requests

To verify that the request you just receive really is from us, we created a helper function that checks the signature of the request. This method will return true if the signature matches (verified), or false if it doesn't match (not verified).

is_verified = yellow.verifyIPN(api_secret, host_url, request_nonce, request_signature, request_body)

Since this method only works in the context of a web app, check the full demo code for more info on how to use it.