Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

README.md

SNS conformance vectors

Machine-readable test vectors for the SNS commitment and resolution layer (ODNCA-STD-001, STD-004, SNS-NAME-1). An implementation that reproduces every value in sns-test-vectors-v1.json is byte-compatible with the ORDnet reference implementations — that file is the certification, in the tradition of the Bitcoin BIPs' vector files.

Provenance

These vectors are not hand-written. They are generated by running the two independent reference implementations — the merkle core of ORDnet-SNS-Merkle-Resolver and of ODNCA-verify — against the same inputs, and a vector is only emitted where both produce identical output. A disagreement aborts generation.

What is covered

Section What an implementation must reproduce
name_normalisation parseAddress results for 15 inputs — case folding, trimming, sns: scheme, @-forms, and the rejects (null) for malformed input
leaves The frozen canonical leaf JSON (key order v,name,origin,outpoint,script,pubkey,h) and its sha256 with the 0x00 leaf domain
tree The merkle root over five synthetic entries, and the proof path + positions for every leaf (0x01 node domain)
must_fail Mutations that a correct verifier must reject
onchain_anchor_informative The genesis commitment constants, for context — verify them against the chain, not against this file

The entries are synthetic and deterministic on purpose: no live data is needed to run a conformance check, and the expected values never change.

Using them

Load the JSON, feed each section to your implementation, and compare byte-for-byte. In any language: fold leaves[i].leaf_sha256 through tree.proofs[i].path/positions (sha256, 0x00/0x01 domains) and you must land on tree.root — then flip one field and confirm you do not.