01

Valid Claim

Happy path: valid signature, valid fields, correct key fingerprint.

ACCEPT
02

Tampered Payload

Domain changed by one byte after signing (.com to .con).

INVALID_SIGNATURE
03

Wrong Key

Signed by key B, verified against key A. Fingerprint mismatch.

KEY_NOT_FOUND
04

Expired Key

Valid signature, but the key has an expires date in the past. Policy may reject.

ACCEPT
05

Key Rotation

Accept under the new key, reject under the old key (fingerprint mismatch).

ACCEPT / REJECT
06

Canonicalization Trap

JSON keys deliberately unsorted. Tests that the verifier sorts before verifying.

ACCEPT

File Format

Each test vector directory contains four files:

File Contents
claim.json The MIR claim (human-readable JSON)
canonical.txt Exact canonical byte string that was signed/verified
signature.txt Base64url-encoded Ed25519 signature
expected.json Expected verification result and error code

Example: Valid Claim

From 01-valid-claim/claim.json:

{
  "mir": 1,
  "type": "mir.transaction.completed",
  "domain": "marketplace.example.com",
  "subject": "ea3eeb449dc86b1a3f7fe8567c939b0da26437ecce5e6a7a1f275d2b07ada6d9",
  "timestamp": "2026-02-16T15:30:00Z",
  "keyFingerprint": "39d8b2c6488dca594bc49c4a7e20a634f63e3fcdf5d3616d2c55f28c807ae49a",
  "metadata": {
    "currency": "USD",
    "count": 1
  },
  "sig": "0MASAdeiZcx6S742g1yVxFB9fBODySc6rEWugn-NhyROoUB7MtzcqyZ2F99BJ8ANPnUFPEPozjVOQMnNWfD6DA"
}

Validation Scripts

Generate or validate test vectors against your implementation:

Generate node test-vectors/generate.mjs
Validate node test-vectors/validate.mjs