> ## Documentation Index
> Fetch the complete documentation index at: https://sealforge.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Test vectors

> Cross-language vectors for commitments, memos, ZIP 321 URIs, Merkle leaves, nodes, roots and a 20-bid result.

**Authoritative file:** `crates/sealforge-core/tests/fixtures/vectors.json`. Values below are copied from it for reading; if they ever differ, the file wins and this page is wrong.

* Generate: `cargo run -p sealforge-core --example vectors` (prints the JSON).
* Generator: `crates/sealforge-core/tests/support/vectors.rs`. It also recomputes the Merkle node and roots straight from the byte layouts in [2.4](https://sealforge.mintlify.site/protocol/commitments.md#domain-table), independently of `MerkleTree`, and asserts they agree.
* Checked in CI by Rust (`crates/sealforge-core/tests/vectors.rs`, `vectors_match_the_checked_in_file`) and TypeScript (`packages/bid/src/bid.test.ts`, "shared vectors file": commitments, memos, URI). The Merkle and result vectors are Rust-only, because the browser runs the Rust auditor as WASM.
* Regenerate after an intentional change: `UPDATE_FIXTURES=1 cargo test -p sealforge-core --test vectors`, then review the diff.

## Inputs

| Name | Value |
| - | - |
| `auction_code` | `7K3QX9MZ2P` |
| `refund_ua` | `utest1refundexample` (not a real address; the hash doesn't validate it) |
| `escrow_ua` | `utest1escrowexample` |
| `salt` | `0101…01` (32 × `0x01`) |
| `amount_zat` | `42000000` |
| `price_zat` | `42000000` |
| `deposit_zat` | `100000000` |

## Deposit mode

| Vector | Value |
| - | - |
| `bid_commitment` | `76d9fde6644588bafdcfda79e63389a225284a84b51e634ab02a43ad2070592e` |
| `bid_memo` | `SF1:7K3QX9MZ2P:76d9fde6644588bafdcfda79e63389a225284a84b51e634ab02a43ad2070592e:utest1refundexample` |
| `payment_uri` | `zcash:utest1escrowexample?amount=0.42&memo=U0YxOjdLM1FYOU1aMlA6NzZkOWZkZTY2NDQ1ODhiYWZkY2ZkYTc5ZTYzMzg5YTIyNTI4NGE4NGI1MWU2MzRhYjAyYTQzYWQyMDcwNTkyZTp1dGVzdDFyZWZ1bmRleGFtcGxl` |

## Sealed-reveal mode

| Vector | Value |
| - | - |
| `price_commitment` | `3be46b6b494a7ca47c27b63d4e525861cca83f3c1d6cf25d17124ae1da5c542f` |
| `bid_memo` | `SF1:7K3QX9MZ2P:3be46b6b494a7ca47c27b63d4e525861cca83f3c1d6cf25d17124ae1da5c542f:utest1refundexample` |
| `reveal_memo` | `SF1R:7K3QX9MZ2P:3be46b6b494a7ca47c27b63d4e525861cca83f3c1d6cf25d17124ae1da5c542f:42000000:0101010101010101010101010101010101010101010101010101010101010101` |

## Merkle

| Leaf | txid | output\_index | amount\_zat | commitment | leaf hash |
| - | - | - | - | - | - |
| a | `11` × 32 | 1 | 42000000 | deposit-mode `bid_commitment` | `1815be44023bfca27374e0dc3e59fe35cbc25e507285064784ca0a32d419ce40` |
| b | `22` × 32 | 0 | 100000000 | `price_commitment` | `2fbe00df4d6ba8fcd83c817eb89d922dfc1ddee552570f4bd4959c5f31bcb9c8` |
| c | `33` × 32 | 2 | 7000000 | `44` × 32 | `11e5b5a6b5c4c55a63333b8b4e309d7d0f691baa20c1539dd79605132e841d12` |

| Vector | Definition | Value |
| - | - | - |
| `node_ab` | `BLAKE2b(sealforge_node1\0, min(a,b) ‖ max(a,b))` | `317d07e482dafe7e2742550b9ec4ac27010f11ed1afcf2910d39c50e57304372` |
| `root_2_leaves` | `BLAKE2b(sealforge_root1\0, 2 (u64 LE) ‖ node_ab)` | `b99176c36c5ad55af2fb78dfdc3bcd151132f2b5766a4510460fd866cf4a793b` |
| `root_3_leaves` | Leaves a, b, c sorted, padded to 4 with a zero leaf, count 3 | `ced51032d4c3ad87ed08bc127ab37700159bbea51c0ca65d2a3869e6215b33a2` |

## 20-bid result

Fixture `crates/sealforge-core/tests/fixtures/bids-20.json` (deterministic, generated by `crates/sealforge-core/tests/pipeline.rs`). Uniform price, quantity 10, reserve 1,000,000 zat. Full per-bid outcomes: `bids-20.expected.json`.

| Field | Value |
| - | - |
| `clearing_price_zat` | 295847153 |
| `total_volume_zat` | 5606266561 |
| `valid_bid_count` | 20 |
| `winner_count` | 10 |
| `merkle_root` | `92cd8722fe266d6b35d3b8145ac101e26389218a1ccfafe8d1db0f559fbfe475` |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.