Skip to main content

Your First .nota File

This guide takes you from an empty project to a signed .nota file you can share with anyone. By the end, you will have:
  1. Created a .nota file describing a wallet address.
  2. Signed it with an Ethereum key.
  3. Serialized it to a canonical JSON string.
  4. Handed it to a recipient.
  5. Verified the signature on the recipient side.
No on-chain calls are involved. Everything here runs locally with one dependency: a signer.

Prerequisites

  • Node.js 20+ (Python 3.10+ or Rust 1.75+ also work; examples here use TypeScript)
  • An Ethereum private key for signing (a throwaway is fine for the tutorial)

Step 1: Install the SDK

Step 2: Create the file

Create alice.ts:
Run it:
You now have a file alice.nota on disk. Open it; it’s a JSON document with a resource block describing the wallet, an issuer block identifying Alice, and a signature block holding the ECDSA signature and signer address.

Step 3: Share the file

The JSON string is safe to send over any channel:
  • Paste it into an email, a Signal/Telegram/WhatsApp message, or a chat DM.
  • Encode it as a QR code with any standard library.
  • Attach the file to a Git commit, a GitHub issue, an IPFS upload.
  • Serve it from an HTTPS endpoint on your site.

Step 4: Verify on the recipient side

Create bob.ts:
Run it:
If the signature is valid, Bob sees Alice’s wallet address, signer address, and issuer name. If the file was tampered with, parse() or validate() throws.

What you learned

  • .nota files are self-contained JSON documents.
  • Signing is purely local: no gas, no RPC, no protocol state.
  • Serialization is canonical: every SDK produces byte-identical output.
  • Validation detects tampering, missing fields, and signature mismatch.

Next: go on-chain

To give Alice’s file a public, revocable on-chain record (so Bob does not need Alice to hand him the file every time), see Registering a Resource.