JavaScript / Node.js SDK

Read, verify and write TigerTag chips from JavaScript.

The SDK of the open TigerTag protocol for 3D-printing filament and resin: it turns a chip's bytes into material, colour, print settings and quantity, checks its ECDSA-P256 signature offline, and builds new tags byte for byte.

npm ↗GitHub ↗

$ npm install tigertag

const { TigerTag } = require('tigertag');

const tag = TigerTag.fromPages(uid, payload);  // from your NFC SDK
console.log(tag.pretty());  // human-readable summary
console.log(String(tag.verify()));  // VALID / NOT SIGNED / INVALID
console.log(tag.toDict());  // JSON-ready object
Current version on npm
1.2.1Current version on npm
Uses the built-in crypto and fetch
Node.js 18+Uses the built-in crypto and fetch
Runtime dependencies for parsing and verification
0Runtime dependencies for parsing and verification
Open-source licence, with a patent grant
Apache-2.0Open-source licence, with a patent grant

What the SDK does

One package for every side of a TigerTag chip: reading, checking, writing, and keeping its data up to date.

Read any dump

fromPages(), fromDump() and fromFile() take a UID with 80 or 144 bytes, or a full 180-byte dump. pretty(), describe() and toDict() return text, a plain-language paragraph or JSON-ready objects.

Verify authenticity offline

verify() checks the ECDSA-P256 signature that binds the chip UID to its product data, with the public key bundled in the package. Result: valid, invalid, unsigned, no_key or no_uid.

Create and patch tags

create(), asInit(), patch() and erase() build chip bytes. A TigerTag is immutable: patch() returns a new one, and refuses to change idTigertag, idProduct, uid or the signature.

Build from the catalogue

TigerTag.fromCatalog(productId) builds a complete TigerTag+ from the official product catalogue, downloaded on first use and cached in a per-user folder.

Sync with the manufacturer

For TigerTag+ chips, rawApi(), diffApi() and patchFromApi() fetch the brand's current product data, list what differs from the chip and apply it.

Reference data, offline first

The material, brand, aspect, type, diameter and unit tables ship in the package and update at most once a day; offline: true or TIGERTAG_OFFLINE=1 means zero network calls.

Read a chip

Pass the 7-byte UID and the bytes your NFC library reads to TigerTag.fromPages(). pretty(), verify() and toDict() return a readable summary, the signature result and a JSON-ready object. It works right after npm install, with no setup.

A TigerTag chip

Change and write

Every change returns a new TigerTag; toBytes() gives the bytes to write back. erase() gives a blank chip.

TigerTag

Try it without a reader: the playground

A local web page, served by the SDK itself, that builds and decodes TigerTag chips and shows every byte. No NFC hardware is needed. The playground never writes a signature: only a certified manufacturer can issue one.

Questions

How do I install the TigerTag JavaScript SDK?

Run npm install tigertag, or pnpm add tigertag, yarn add tigertag or bun add tigertag. It needs Node.js 18 or later and no other package for parsing and verification.

Does it need an internet connection?

No. The reference tables and the signature public key ship in the package, so reading and verifying work offline. The network is only used for the daily table check, the product catalogue and the TigerTag+ cloud methods; offline: true or TIGERTAG_OFFLINE=1 turns it off.

Which NFC chips and readers does it work with?

TigerTag uses NTAG213, NTAG215 and NTAG216 chips (ISO 14443-3). The SDK takes the UID and the bytes your NFC library reads, so it is not tied to one reader; the README shows nfc-pcsc with an ACR122U.

How does it check that a chip is genuine?

verify() checks the chip's ECDSA-P256 signature over its UID and product identifiers, with the public key bundled in the package. It returns valid, invalid, unsigned, no_key or no_uid, without a server call.

Can it write chips?

It builds the bytes: create(), patch(), asInit(), erase() and fromCatalog() give a TigerTag whose toBytes() is the payload your NFC library writes. The playground's Burn button writes it to the chips on connected readers.

One command to start

npm install tigertag, then TigerTag.fromPages(uid, payload).

View on npm