Docs
v1

Reference

Test vectors

Known inputs and outputs for wallets, addresses, amounts, hashing, transactions, payloads, the messenger and TenQ, to check another implementation byte for byte.

On this page

The tenrai-test-vectors repository holds known inputs and outputs for everything another implementation has to reproduce exactly. Each file is a copy from the node repository, where a test compares it with the Rust code on every run.

FilePins
wallet-derivation-v1.json24 words and passphrase to key seeds, fingerprints and addresses, TCC-0001
wallet-file-v1.jsonThe TRAISEED1 wallet file, TCC-0002
address-v1.jsonKey, spend lock, address and payment URI on every network, the burn address, inputs a parser refuses
address-words-v1.jsonVerification words, TCC-0003
address-proof-v1.jsonAddress ownership proofs, TCC-0004
amounts-v1.jsonTRAI text to atoms and back
domain-hash-v1.jsonThe framed SHA-384 behind every identifier
transaction-v1.jsonBody, transaction ID, mass, signed messages and signed wire of a payment, a referenced key, a burn and a stake
recipient-payloads-v1.jsonOne payload per recipient, TCC-0005
messenger-v1.jsonMessenger frames and their texts, TCC-0009
coin-selection-v1.jsonWhich coins the Tenrai wallets spend
tenq-v1.jsonTenQ work values for a fixed preimage

Bytes are lower-case hex, amounts decimal strings of atoms. Signatures are ML-DSA-65 with the FIPS 204 randomness the file names, so they reproduce exactly. Error names come from the Rust code; another implementation only has to refuse the same inputs.

Samples

Wallet derivation, 32 zero bytes of entropy and no passphrase:

Text
words         abandon (23 times) art
fingerprint   TRAI-5442-0D83
address 0/0   dtrai1qyquxvhgj27zx2993t9hkefl4vv0y3nc4je2hrkgq7s2zz26vd78kkugum8p4r6hv46sn3wzyd

Verification words:

Text
trai1qyqh6sszds5zmd86z6sgmtklh3drys0dwcrarwmdsn7vyj9rt7stm4p0rdxrx90kyqdqgq9cs9
windmill talc frosty fjord frothy sorghum

Amounts:

TextAtoms
12.51250000000
0.000000011
1., .5, 01, 1e3, -1, 1.000000001refused

Domain hash, SHA-384(u16_be(len(domain)) ‖ domain ‖ u64_be(field count) ‖ u64_be(len) ‖ field …):

Text
TRAI_EXAMPLE_V1, no fields
77cb722af619ca033b12b3e11e81168fa1513dd109e26c1c87a185a2caa838eb62c0458087d33c1bc8710921657bc1d0
TRAI_EXAMPLE_V1, fields "a" and "b"
8b4cff9c78b94abba017cb796c5c7731c3138e6b9709bd37cd17b3a0165cbeec64e4af47843fe423c823c1454f3214d9
TRAI_EXAMPLE_V1, field "ab"
ab762878361f642ef86394c1b4004a52a6abc537ecc5972fa956aee2abd8abe7ca22a8ffa53e0f25627b178bfbe416f8

A payment with two inputs, two outputs and the payload invoice 42 has 10,887 wire bytes, mass 10,965 and the transaction ID 844a308dc09e44cd11124b8a486494da68050138a80bb26279459b74fed0bb36ddc623d88f2c6b4830bff8b164461aa8 under the manifest in transaction-v1.json.

Type to search guides, concepts and reference pages.