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

@awakentax/sdk

v0.2.0

Published

Official TypeScript SDK for the Awaken Embedded Tax API. Find or create a user, attach their wallets, and get a portal URL they can open.

Readme

@awakentax/sdk

Official TypeScript SDK for the Awaken Embedded Tax API. Give your users a complete crypto tax experience from your backend in one call.

npm install @awakentax/sdk

Quickstart

import { Awaken } from "@awakentax/sdk";

const awaken = new Awaken({
  clientId: process.env.AWAKEN_CLIENT_ID!,
  apiSecret: process.env.AWAKEN_API_SECRET!,
});

// Finds or creates the user, attaches their wallets, and starts importing.
const { url } = await awaken.crunch({
  userId: "user-42",
  email: "[email protected]",
  wallets: [
    { address: "0xabc…", provider: "ethereum" },
    { address: "SolanaAddress…", provider: "solana" },
  ],
});

// Send the user here. Awaken shows import progress, their tax preview,
// and lets them generate and download reports.
redirect(url);

crunch is safe to call again for the same userId: the user is reused and a fresh short-lived URL is issued each time.

What crunch returns

| Field | Meaning | | ------------- | ------------------------------------------------------------------------ | | url | Ready-to-open hosted portal URL with a short-lived access token baked in | | accessToken | The token inside url, if you want to build your own link | | expiresAt | ISO timestamp when the URL stops working | | referenceId | Echo of your userId; use it in every other call | | user | The embedded user (id, partner branding) | | accounts | Accounts created by this call |

Build your own UI

Every endpoint in the REST reference is available as a typed method. Use your userId as the referenceId.

// Gains, income, and transaction count for a tax year
const preview = await awaken.tax.preview("user-42", { year: 2025 });
preview.capGainsTotal; // "$17,090.55"

// Import progress after crunch
const { accounts } = await awaken.syncs.list("user-42");

// Reports are generated asynchronously
await awaken.reports.create("user-42", { year: 2025, reportType: "irs_8949" });
const reports = await awaken.reports.list("user-42");
const { fileName, bytes } = await awaken.reports.download(
  "user-42",
  reports[0].id,
);
// `fileName` is a single safe path segment; join it onto your own directory.

| Namespace | Methods | | ---------------------- | ------------------------------------------ | | awaken.crunch | find-or-create user + wallets + portal URL | | awaken.users | create, get | | awaken.accounts | list, create | | awaken.syncs | list, get, create | | awaken.tax | preview, recalculate, activeJob | | awaken.reports | list, create, download | | awaken.accessTokens | create | | awaken.links | create, email, forUser | | awaken.discountCodes | create |

Authentication

Pass your client id and API secret. They map to the x-client-id and x-api-secret headers. A legacy single apiKey is also accepted.

Keep credentials on your server. The only thing that should reach a browser is the url from crunch or a token from accessTokens.create, both of which are scoped to one user and expire.

The client never prints its credentials: console.log(awaken) and JSON.stringify(awaken) show nothing sensitive. Requests are sent with redirect: "manual", so a redirect is reported as an AwakenError rather than followed with your headers attached, and baseUrl must be https. A local sandbox over plain http needs allowInsecureBaseUrl: true; never set that in production.

Errors

Non-2xx responses, redirects, and 2xx bodies that are not the JSON envelope throw an AwakenError carrying the API's message, the HTTP status, and the raw body. error.body and error.path can include the reference id and, on validation errors, the submitted email, so redact them before sending errors to a log aggregator.

import { AwakenError } from "@awakentax/sdk";

try {
  await awaken.tax.preview("missing-user");
} catch (error) {
  if (error instanceof AwakenError && error.status === 404) {
    // create the user first
  }
}

Options

new Awaken({
  clientId,
  apiSecret,
  baseUrl: "https://api.awaken.tax/api", // default; must be https
  allowInsecureBaseUrl: false, // default; only for a plain-http local sandbox
  portalUrl: "https://embed.awaken.tax", // default, used when building portal URLs
  timeoutMs: 30_000, // default
  fetch: customFetch, // default: global fetch (Node 18+)
});

Requirements

Node 18 or newer, or any runtime with a global fetch. Ships ESM and CommonJS builds with type declarations.