Skip to main content

TypeScript: Getting Started

@notareum/sdk is the official TypeScript client for the Notareum Protocol. It works in Node.js 20+, modern browsers (via a bundler), and any framework that accepts standard ESM modules. This page installs the SDK, wires up a provider and signer, and produces your first signed .nota file.

Install

ethers v6 is a peer dependency. The SDK does not bundle it so you control which version your app ships.

Requirements

  • Node.js 20 or newer (for ESM + globalThis.crypto).
  • TypeScript 5.0+ recommended (the SDK ships .d.ts).
  • An Ethereum JSON-RPC endpoint (Alchemy, Infura, QuickNode, local Hardhat, etc.).
  • A signer (a private key, browser wallet, or hardware wallet).

Create a Notareum instance

Current contract addresses live in Contract Addresses. You only need signer for write operations (registering, attesting, staking, locking veNOTA). A bare provider is enough for reads.

Your first .nota file

Signing a .nota file does not require on-chain calls. This runs instantly with only a signer:
serialize() returns a canonical JSON string safe to transport over any channel: email, QR code, messaging app, HTTP body. Recipients can parse and verify it with ntm.nota.parse() and ntm.nota.validate().

Read a contract

No signer required for reads. This returns the on-chain registration record for a resource ID:

Write a contract

Registration is a write. The SDK returns the transaction hash:

Next steps