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

@lunch-money/coinbase-to-lunch-money

v3.2.0

Published

A wrapper around the coinbase API for enabling Lunch Money to gather information about a user's account.

Readme

Coinbase to Lunch Money

This repo exposes an interface for extracting balances using the Coinbase v3 API for the purpose of displaying balances in Lunch Money.

As of February 5, 2025 the Coinbase App Legacy API keys which the current Lunch Money plugin uses have been expired. Therefore all Lunch Money users will need to re-link their Coinbase accounts using the new API public and private keys.

As of Jun 29, 2026, the connector will support keys encrypted in both ECDSA and Ed25519. Coinbase now defaults to creating key in Ed25519 format, but supports legacy ECDSA formatted keys.

Installation

yarn install
yarn build

Testing

There are three levels of tests, each with a different purpose and setup requirement.

1. Unit tests (no setup required)

Runs against simulated Coinbase API responses using moxios. Validates connector logic without any real credentials or network access.

yarn test

2. Key format validation (no setup required)

Validates that all supported key formats — ECDSA and Ed25519, with and without PEM headers — are correctly signed and successfully reach the Coinbase API. Uses revoked keys committed to the repo, so no credentials are needed.

Each test reports one of three outcomes:

  • authorized — key format is valid and credentials are still active
  • Coinbase rejected — key format is valid, credentials were revoked (expected for committed fixtures)
  • signing failed — key format is broken; the JWT could not be signed and Coinbase was never reached (test fails)

The final test deliberately uses a malformed key to confirm that signing failures are detected and reported separately from Coinbase auth errors.

yarn test:live:validate-formats

Note: This test makes real network calls to the Coinbase API and requires internet access. It is not included in yarn test and should not be run in offline CI.

Generating test fixtures

The four key fixture files used by the format validation tests were generated from two source keys using test-live/create-fixtures.ts. It takes one ECDSA key (with PEM headers) and one Ed25519 key (raw base64, no headers) and produces all four variants — stripping headers from the ECDSA key and constructing a proper PKCS#8 PEM from the raw Ed25519 bytes. The input files match what Coinbase currently exports when creating an API key with one of the two supported encryption types.

If the fixture files ever need to be regenerated (e.g. after rotating keys or if Coinbase changes their key format), place new source files in test-live/ as input-ecdsa.json and input-ed25519.json and run:

npx ts-node test-live/create-fixtures.ts

If committing updated files to the repo, please make sure that the credentials are revoked!

3. Live end-to-end test (requires a valid Coinbase API key)

Validates a real Coinbase connection end-to-end using your own credentials. Requires a cdp_api_key.json file in the test-live/ directory — this file is not committed to the repo and must be supplied by the tester.

To obtain the key file:

  1. Go to https://www.coinbase.com/settings/api
  2. Create a new API key and download the generated cdp_api_key.json
  3. Copy it to test-live/cdp_api_key.json

Then run:

yarn test:live:keys

You can inspect the output to confirm the returned balances match your account. The test checks your balances twice — once normally, and once with forced single-account pagination to exercise the pagination logic. It is normal for the Coinbase API to return multiple accounts with zero balances alongside accounts with balances.