This directory contains test vectors for implementing and verifying HTTP Schnorr Auth (NIP-98) implementations.
test-vectors.json- Signed test vectors with 10 test cases
| ID | Description | Expected |
|---|---|---|
| valid-get-request | Valid GET request authentication event | ACCEPT |
| valid-post-with-payload | Valid POST request with payload hash | ACCEPT |
| invalid-signature | Event with corrupted signature | REJECT |
| wrong-kind | Event with wrong kind (not 27235) | REJECT |
| expired-event | Event older than 60 seconds | REJECT |
| url-mismatch | URL in event doesn't match request URL | REJECT |
| method-mismatch | Method in event doesn't match request method | REJECT |
| missing-url-tag | Event missing required 'u' tag | REJECT |
| missing-method-tag | Event missing required 'method' tag | REJECT |
| payload-hash-mismatch | Payload hash doesn't match request body | REJECT |
A test key pair is provided for verification (DO NOT use in production):
- Private Key:
e8f32e723decf4051aefac8e2c93c9c5b214313817cdb01a1494b917c8436b35 - Public Key:
39a36013301597daef41fbe593a02cc513d0b55527ec2df1050e2e8ff49c85c2
Implementations should:
- Parse each test vector
- Verify the signature using BIP-340 Schnorr verification
- Check that the result matches the
expectedfield - For REJECT cases, optionally check
expected_statusfor HTTP status code
- NIP-98 - HTTP Auth
- NIP-01 - Basic Protocol (event structure)
- BIP-340 - Schnorr Signatures
- HTTP Schnorr Auth Spec