Conformance · spec mirror/1 · 53 golden vectors
53 vectors. No partial conformance.
Frozen golden vectors. An independent implementation that reproduces every `expected` byte-for-byte interoperates on the rail. There is no partial conformance: a single differing byte is a silent reconciliation error. This page re-derives 46 of them in your browser with Mirror's own kernels, and names the 7 it cannot run here.
The vectors
Named after what they guard.
A diff in this pack reads as "you changed what a short shipment does", not "vector 47 moved". Open any one for its exact input and expected output.
Commit primitives 14 vectors
The per-shipment salt, the band, the corridor's id and the whole party-side payload. Every other answer rests on these bytes.
salt_derivationderiveSaltHMAC-SHA256(secret, 'mirror:'+ref); the per-shipment salt two banks derive.not run
{
"op": "deriveSalt",
"shared_secret": "conformance-vectors-fixed-secret-do-not-use-in-production-0000",
"shipment_ref": "SHIP-0001"
}{
"salt": "cd37f2de72df59c6dc34ef3f9dd1809b27cde20b962a9d6071b629119887901c"
}band_plain_integerbandOfvalue/unit exactly on no edge; a mid-table band.not run
{
"op": "bandOf",
"value": 120000,
"unit_qty": 1000,
"corridor_edges": [
50,
100,
150,
200
]
}{
"band": 2
}band_on_edge_exactbandOfvalue/unit lands EXACTLY on an edge (100). Strictly-greater fails, so it is the LOWER band.not run
{
"op": "bandOf",
"value": 100000,
"unit_qty": 1000,
"corridor_edges": [
50,
100,
150,
200
]
}{
"band": 1
}on_edge_integer_moneybandOfTHE FLOAT TRAP: 2065.84/17 is EXACTLY 121.52. A float divide gives 121.52000000000001 and mis-bands one band too high. Exact decimal keeps it on the lower band.not run
{
"op": "bandOf",
"value": 2065.84,
"unit_qty": 17,
"corridor_edges": [
121.52,
200
]
}{
"band": 0,
"float_would_give": 1
}corridor_idcorridorIdstable id of an agreed edge set; two banks reach it without coordinating a label.not run
{
"op": "corridorId",
"corridor_edges": [
50,
100,
150,
200
]
}{
"corridor_id": "c:acb1acec883ad53093f4860109d6c730863be8ed11c216f4bfb7f24592b90fac"
}commit_legcommitLegthe whole party-side payload: salted band commitments (band +/- tolerance) and a salted corridor commitment. No value, unit or band in it.not run
{
"op": "commitLeg",
"shipment_ref": "SHIP-0002",
"role": "invoice",
"value": 120000,
"unit_qty": 1000,
"corridor_edges": [
50,
100,
150,
200
],
"shared_secret": "conformance-vectors-fixed-secret-do-not-use-in-production-0000",
"tolerance": 1
}{
"leg": {
"shipment_ref": "SHIP-0002",
"role": "invoice",
"bandable": true,
"commitments": [
"5272ecc6f7401e1f7d7ec7f2ea1a73ec3a9677405c1a51a316aed9d73418086a",
"d91e061377ce8df5cc053b4541755a90da94441ef8fa52e16ffc437bce81dc09",
"91f984ef2caa87a925dc0ad4ce87a785c65fa0819c960a74bb15589bec85a9d8"
],
"corridor_commitment": "b6d2986165fe068ddadd30d31c2025827b8d1abcef403d4042c25d1133d795d1"
}
}commit_leg_near_edgecommitLega value a rounding error below the 150 edge commits to its band AND the band above (near-edge), so two honest banks straddling the edge still reconcile. Off by default; opt-in via the table's edge_margin.not run
{
"op": "commitLeg",
"shipment_ref": "SHIP-0003",
"role": "invoice",
"value": 149900,
"unit_qty": 1000,
"corridor_edges": [
50,
100,
150,
200
],
"shared_secret": "conformance-vectors-fixed-secret-do-not-use-in-production-0000",
"tolerance": 0,
"edge_margin": 0.005
}{
"leg": {
"shipment_ref": "SHIP-0003",
"role": "invoice",
"bandable": true,
"commitments": [
"3a8a9a9e90bcb00249baee68c5ce42cf9c88724f25258f37034f19cbecfb0f7c",
"40c06e07b850f1b2123cb5106a6e69fb2949f7355b14af112d97184eb0850c56"
],
"corridor_commitment": "a4d4353a40e75f4304665a12b7fb42edd8a06eba12a4632729c4a269444c8ef9"
},
"commits_two_bands": true,
"is_bands_2_and_3": true
}commit_leg_unbandablecommitLegvalue 0 -> not bandable; a sendable payload that carries NO commitments, so the operator refuses to clear the shipment.not run
{
"op": "commitLeg",
"shipment_ref": "SHIP-0003",
"role": "customs",
"value": 0,
"unit_qty": 0,
"corridor_edges": [
50,
100,
150,
200
],
"shared_secret": "conformance-vectors-fixed-secret-do-not-use-in-production-0000",
"tolerance": 1
}{
"leg": {
"shipment_ref": "SHIP-0003",
"role": "customs",
"bandable": false,
"commitments": [],
"corridor_commitment": null
}
}commit_leg_closed_in_rangecommitLega value INSIDE a closed table (120/unit on [50,100,150,200]) commits exactly what the open table commits - closure changes nothing in range.not run
{
"op": "commitLeg",
"shipment_ref": "SHIP-0004",
"role": "invoice",
"value": 120000,
"unit_qty": 1000,
"corridor_edges": [
50,
100,
150,
200
],
"shared_secret": "conformance-vectors-fixed-secret-do-not-use-in-production-0000",
"tolerance": 1,
"closed": true
}{
"leg": {
"shipment_ref": "SHIP-0004",
"role": "invoice",
"bandable": true,
"commitments": [
"24e8c98f87957b7926e1f6764148fe5dadd4b5fbe6d5a6f876dc390673909767",
"ce2e71e346f2444864de937667c45ef3adc1c6350ab6027206f33eebd4b413bd",
"5ddbf2391241286d6110ca3c72f4e1546614cbddd3b7b31abf81bbc28c030aec"
],
"corridor_commitment": "6b01159bec574e9600c8bb2f24f102ac16740703cf4cffee8bbaadcbfe3b971b"
},
"equals_open_table": true
}commit_leg_closed_above_tablecommitLeg250/unit is above the last edge of a closed table: 2t+1 = 3 out-of-range markers keyed by the salt and the role, the same count a mid-band leg emits, so the operator cannot tell it from any other leg.not run
{
"op": "commitLeg",
"shipment_ref": "SHIP-0004",
"role": "customs",
"value": 250000,
"unit_qty": 1000,
"corridor_edges": [
50,
100,
150,
200
],
"shared_secret": "conformance-vectors-fixed-secret-do-not-use-in-production-0000",
"tolerance": 1,
"closed": true
}{
"leg": {
"shipment_ref": "SHIP-0004",
"role": "customs",
"bandable": true,
"commitments": [
"9875a72881eb834d63a199a64172951ade5cff54258cb67e0930eab451d93e74",
"854843427d854889a07a39888e26d7eff3f19679fc43a44be8d7c8046f40667b",
"8de6b6e0405d5a51b4f73bb12ce380daf167a616e8bc280d464bfa22ebe5e551"
],
"corridor_commitment": "6b01159bec574e9600c8bb2f24f102ac16740703cf4cffee8bbaadcbfe3b971b"
},
"are_out_of_range_markers": true
}commit_leg_closed_below_tablecommitLeg20/unit is below the first edge of a closed table: one marker at tolerance 0, never band 0.not run
{
"op": "commitLeg",
"shipment_ref": "SHIP-0004",
"role": "payment",
"value": 20000,
"unit_qty": 1000,
"corridor_edges": [
50,
100,
150,
200
],
"shared_secret": "conformance-vectors-fixed-secret-do-not-use-in-production-0000",
"tolerance": 0,
"closed": true
}{
"leg": {
"shipment_ref": "SHIP-0004",
"role": "payment",
"bandable": true,
"commitments": [
"c24c9da5c4a8fff15f2e913f7cf3d0bf96acfdfc0585609e0d437a6289e6b908"
],
"corridor_commitment": "6b01159bec574e9600c8bb2f24f102ac16740703cf4cffee8bbaadcbfe3b971b"
},
"are_out_of_range_markers": true
}commit_leg_closed_near_edgecommitLeg200.5/unit is 0.25% above the last edge; with a 0.5% near-edge margin it joins the interior band next to that edge (band 3) and is not out of range - the margin keeps its promise at the table's boundary too.not run
{
"op": "commitLeg",
"shipment_ref": "SHIP-0005",
"role": "invoice",
"value": 200500,
"unit_qty": 1000,
"corridor_edges": [
50,
100,
150,
200
],
"shared_secret": "conformance-vectors-fixed-secret-do-not-use-in-production-0000",
"tolerance": 0,
"closed": true,
"edge_margin": 0.005
}{
"leg": {
"shipment_ref": "SHIP-0005",
"role": "invoice",
"bandable": true,
"commitments": [
"322cea9fb707077f3d0b8547015f2d5d403af40d6f054fa8528495bd2f36288a"
],
"corridor_commitment": "51bfa43090e0cd3e100da896d686c5e63cbc5f11fb129719dff3af4aa50b25a1"
},
"is_band_3_only": true
}commit_leg_closed_not_booleancommitLeg`closed` must be a boolean or absent; the string 'yes' is an ambiguous table, so the leg is unbandable rather than guessed at.not run
{
"op": "commitLeg",
"shipment_ref": "SHIP-0004",
"role": "invoice",
"value": 120000,
"unit_qty": 1000,
"corridor_edges": [
50,
100,
150,
200
],
"shared_secret": "conformance-vectors-fixed-secret-do-not-use-in-production-0000",
"tolerance": 0,
"closed": "yes"
}{
"leg": {
"shipment_ref": "SHIP-0004",
"role": "invoice",
"bandable": false,
"commitments": [],
"corridor_commitment": null
}
}commit_leg_ratiocommitLega ratio leg is an ordinary commitLeg: value 8,300,000 for 1,000 t against the effective quantity 1,000 x R = 8,275,500, on the published closed ratio-10 table - ratio 1.003, band 2.not run
{
"op": "commitLeg",
"shipment_ref": "SHIP-0006",
"role": "invoice",
"value": 8300000,
"unit_qty": 8275500,
"corridor_edges": [
0.85,
0.95,
1.05,
1.15
],
"shared_secret": "conformance-vectors-fixed-secret-do-not-use-in-production-0000",
"tolerance": 0,
"closed": true
}{
"leg": {
"shipment_ref": "SHIP-0006",
"role": "invoice",
"bandable": true,
"commitments": [
"1a5d002ad56aff43dc2753eb03b6fd5a21208fc8025749548cc69477502c0efc"
],
"corridor_commitment": "45c8a525ed97000a07786bd871cf37b9ec77bc0722f406769fe69f3c20d49472"
}
}Reconciliation 14 vectors
Named scenarios and the verdict each must produce. Rebuilt here from their stated inputs at 1,000 units and the pack's fixed secret, on the published table unless a fixture states its own; two fixtures that name roles but not prices band every leg at 120.00, and the mixed one bands customs on [40, 90, 140]. The closed-table fixtures show a ceiling that can be met, and two legs four times above the table that clear on the open table and never on the closed one.
clean_clearreconcileall legs in the same band, tolerance 0 -> reconciled.not run
{
"op": "reconcile",
"shipment_ref": "R-CLEAN",
"tolerance": 0,
"legs_price_per_unit": [
{
"role": "invoice",
"ppu": 120
},
{
"role": "customs",
"ppu": 121
},
{
"role": "payment",
"ppu": 119
}
]
}{
"verdict": "reconciled",
"cleared": true,
"match_window": {
"tolerance": 0,
"band_gap_that_still_clears": 0,
"bands": 5,
"widest_bounded_ratio": 2,
"widest_bounded_example": {
"low_price_per_unit": 50,
"high_price_per_unit": 100,
"low_band": 1,
"high_band": 1
},
"reaches_open_band": true,
"plain_english": "A clear here asserts the two legs COMMITTED the SAME band of the agreed table - the strongest assertion band comparison can make, and an assertion about the committed labels: that each label is the band of its true value is checked at audit, by opening. Note that a band is still a range: the widest one spans 50 to 100 per unit, so even same-band agreement is consistent with a 2x price difference. And because the lowest and highest bands are open-ended, pairs that touch either one clear at NO bounded ratio at all.",
"how_to_narrow": null
}
}over_invoice_2xreconcileinvoice at $120/unit vs customs at $240/unit at tolerance 0 -> DIVERGENT. The textbook over-invoicing.not run
{
"op": "reconcile",
"shipment_ref": "R-OVER",
"tolerance": 0,
"legs_price_per_unit": [
{
"role": "invoice",
"ppu": 120
},
{
"role": "customs",
"ppu": 240
}
]
}{
"verdict": "divergent",
"cleared": false,
"match_window": {
"tolerance": 0,
"band_gap_that_still_clears": 0,
"bands": 5,
"widest_bounded_ratio": 2,
"widest_bounded_example": {
"low_price_per_unit": 50,
"high_price_per_unit": 100,
"low_band": 1,
"high_band": 1
},
"reaches_open_band": true,
"plain_english": "A clear here asserts the two legs COMMITTED the SAME band of the agreed table - the strongest assertion band comparison can make, and an assertion about the committed labels: that each label is the band of its true value is checked at audit, by opening. Note that a band is still a range: the widest one spans 50 to 100 per unit, so even same-band agreement is consistent with a 2x price difference. And because the lowest and highest bands are open-ended, pairs that touch either one clear at NO bounded ratio at all.",
"how_to_narrow": null
}
}tolerance_1_spongereconcilethe SAME 2x at tolerance 1 -> reconciled, BUT the match_window states the corridor clears up to a 4x ratio. The tolerance is visible, not silent.not run
{
"op": "reconcile",
"shipment_ref": "R-SPONGE",
"tolerance": 1,
"legs_price_per_unit": [
{
"role": "invoice",
"ppu": 120
},
{
"role": "customs",
"ppu": 240
}
]
}{
"verdict": "reconciled",
"cleared": true,
"match_window": {
"tolerance": 1,
"band_gap_that_still_clears": 2,
"bands": 5,
"widest_bounded_ratio": 4,
"widest_bounded_example": {
"low_price_per_unit": 50,
"high_price_per_unit": 200,
"low_band": 1,
"high_band": 3
},
"reaches_open_band": true,
"plain_english": "A clear here asserts only that the two legs committed bands within 2 band(s) of each other. Under this table that is consistent with a price difference of up to 4x - a leg at 50 per unit and a leg at 200 per unit both clear. And because the lowest and highest bands are open-ended, pairs that touch either one clear at NO bounded ratio at all.",
"how_to_narrow": "Tolerance is a set-union performed at the operator and is invisible in the price. If the corridor needs slack for FX or rounding, put it in the TABLE - narrower or logarithmic edges - where it is ratified, versioned and readable. Do not buy it with tolerance."
}
}missing_required_legreconcilepolicy requires three roles, only two present -> undetermined with the missing role named.not run
{
"op": "reconcile",
"shipment_ref": "R-MISS2",
"required_roles": [
"invoice",
"customs",
"payment"
],
"present": [
"invoice",
"customs"
]
}{
"verdict": "undetermined",
"cleared": false,
"missing_roles": [
"payment"
]
}mixed_corridor_tablesreconcilethe two legs were banded against DIFFERENT agreed tables -> undetermined; a clear across incomparable bands would be meaningless.not run
{
"op": "reconcile",
"shipment_ref": "R-MIX",
"note": "invoice on [50,100,150,200], customs on [40,90,140]"
}{
"verdict": "undetermined",
"cleared": false
}closed_windowmatchWindowthe match window of a closed table at tolerance 1: the widest pair is two bands apart, a price just above 100 against 115 per unit, so 1.15x - and no window reaches an open band.not run
{
"op": "matchWindow",
"corridor_edges": [
100,
105,
110,
115,
120,
125
],
"tolerance": 1,
"edge_margin": null,
"closed": true
}{
"match_window": {
"tolerance": 1,
"band_gap_that_still_clears": 2,
"bands": 7,
"widest_bounded_ratio": 1.15,
"widest_bounded_example": {
"low_price_per_unit": 100,
"high_price_per_unit": 115,
"low_band": 1,
"high_band": 3
},
"reaches_open_band": false,
"closed": true,
"plain_english": "A clear here asserts only that the two legs committed bands within 2 band(s) of each other. Under this table that is consistent with a price difference of up to 1.15x - a leg at 100 per unit and a leg at 115 per unit both clear. The table is CLOSED: a value below the first edge or above the last commits markers no other leg can match, so pairs outside the table never clear and this ratio bounds every clear.",
"how_to_narrow": "Tolerance is a set-union performed at the operator and is invisible in the price. If the corridor needs slack for FX or rounding, put it in the TABLE - narrower or logarithmic edges - where it is ratified, versioned and readable. Do not buy it with tolerance."
}
}closed_window_exact_ratiomatchWindowa closed table whose one interior band is (100, 110]: the ratio is exactly 1.1x. A float ceil gives 1.11x, which would fail an honest 1.1x ceiling; the exact decimal ceil does not.not run
{
"op": "matchWindow",
"corridor_edges": [
100,
110
],
"tolerance": 0,
"edge_margin": null,
"closed": true
}{
"widest_bounded_ratio": 1.1,
"float_ceil_would_give": 1.11
}closed_ceiling_clearreconcile112 and 113 per unit, same band of the closed table, tolerance 0, ratified 1.1x ceiling -> reconciled WITHIN the ceiling. On an open table no ceiling could ever be met.not run
{
"op": "reconcile",
"shipment_ref": "R-CLOSED",
"corridor_edges": [
100,
105,
110,
115,
120,
125
],
"closed": true,
"max_ratio": 1.1,
"tolerance": 0,
"legs_price_per_unit": [
{
"role": "invoice",
"ppu": 112
},
{
"role": "customs",
"ppu": 113
}
]
}{
"verdict": "reconciled",
"cleared": true,
"match_window": {
"tolerance": 0,
"band_gap_that_still_clears": 0,
"bands": 7,
"widest_bounded_ratio": 1.05,
"widest_bounded_example": {
"low_price_per_unit": 100,
"high_price_per_unit": 105,
"low_band": 1,
"high_band": 1
},
"reaches_open_band": false,
"closed": true,
"plain_english": "A clear here asserts the two legs COMMITTED the SAME band of the agreed table - the strongest assertion band comparison can make, about the committed labels; that each label is the band of its true value is checked at audit, by opening. Under this table that is consistent with a price difference of up to 1.05x - a leg at 100 per unit and a leg at 105 per unit both clear. The table is CLOSED: a value below the first edge or above the last commits markers no other leg can match, so pairs outside the table never clear and this ratio bounds every clear.",
"how_to_narrow": null
}
}closed_ceiling_tolerance_too_widereconcilethe same legs at tolerance 2: the window would clear 1.25x, wider than the ratified 1.1x -> undetermined. Slack bought with tolerance is refused.not run
{
"op": "reconcile",
"shipment_ref": "R-CLOSED-T2",
"corridor_edges": [
100,
105,
110,
115,
120,
125
],
"closed": true,
"max_ratio": 1.1,
"tolerance": 2,
"legs_price_per_unit": [
{
"role": "invoice",
"ppu": 112
},
{
"role": "customs",
"ppu": 113
}
]
}{
"verdict": "undetermined",
"cleared": false,
"widest_bounded_ratio": 1.25
}closed_far_outside_never_clearsreconcileTHE OPEN-BAND HOLE: 500 and 510 per unit, four times the top of a table that ends at 125. On the open table both land in the top band and CLEAR; on the closed table both commit markers and read DIVERGENT.not run
{
"op": "reconcile",
"shipment_ref": "R-OUTSIDE",
"corridor_edges": [
100,
105,
110,
115,
120,
125
],
"tolerance": 0,
"legs_price_per_unit": [
{
"role": "invoice",
"ppu": 500
},
{
"role": "customs",
"ppu": 510
}
]
}{
"open_table_verdict": "reconciled",
"closed_table_verdict": "divergent"
}open_table_ceiling_never_metreconcilethe same agreeing legs on an OPEN table with a 1.1x ceiling -> undetermined: an open table's outer bands bound nothing, so it can never honour a finite ceiling.not run
{
"op": "reconcile",
"shipment_ref": "R-OPEN-CEIL",
"corridor_edges": [
100,
105,
110,
115,
120,
125
],
"closed": false,
"max_ratio": 1.1,
"tolerance": 0,
"legs_price_per_unit": [
{
"role": "invoice",
"ppu": 112
},
{
"role": "customs",
"ppu": 113
}
]
}{
"verdict": "undetermined",
"cleared": false
}dims_cleancommitDimensions+reconcilesame quantity band, same unit-price band -> reconciled.not run
{
"op": "commitDimensions+reconcile",
"legs": [
{
"role": "invoice",
"quantity": 1000,
"unit_price": 100
},
{
"role": "customs",
"quantity": 1000,
"unit_price": 100
}
],
"quantity_edges": [
500,
1000,
2000,
5000
],
"unit_price_edges": [
50,
100,
150,
200
],
"tolerance": 0
}{
"first_leg_commitment": {
"v": 1,
"type": "mirror.dimension-commitment",
"locator": "dims_clean",
"role": "invoice",
"bandable": true,
"basis": "quantity+unit_price",
"banded_dimensions": [
"quantity",
"unit_price"
],
"dimensions": [
{
"dimension": "quantity",
"bandable": true,
"commitments": [
"b4b2f90c4f0012ba999679aa1aed58333e2e5361341c21c04816dd5b410c0bd7"
],
"corridor_commitment": "24e06cce4546cec4da637ebb7198cfbbc76e695694bbc15b1dee83d09a33dbf6",
"tolerance": 0
},
{
"dimension": "unit_price",
"bandable": true,
"commitments": [
"647176975ac048469503f22e152a40a10f25344383523c3f4817871c00ad4d12"
],
"corridor_commitment": "25b32b0c1940ab5b767fea8292b2638813eb8c4c128d4e4457ac0cd28b71dfbb",
"tolerance": 0
}
],
"refused": [],
"reason": "Banded 2 dimension(s) locally and sent commitments only. Quantity and unit price are separated, so a matched-factor move cannot hide inside a single price-per-unit band.",
"disclaimer": "Salted band commitments for each dimension, computed inside the institution: no quantity, unit price, total value or band index is in this record, and the operator holds no shared secret with which to open one. Corridor tables for BOTH dimensions are party-supplied; Mirror invents no prices and no volumes. NOT a zero-knowledge proof and NOT secure multiparty computation - a counterparty who shares the secret can brute-force a low-cardinality band. The basis field discloses which two figures the party held, never their values."
},
"verdict": "reconciled",
"expected_verdict": "reconciled"
}matched_factor_structurecommitDimensions+reconcileunit price agrees, quantity is 5x -> DIVERGENT. A single price-per-unit band cannot see this; two dimensions can.not run
{
"op": "commitDimensions+reconcile",
"legs": [
{
"role": "invoice",
"quantity": 1000,
"unit_price": 100
},
{
"role": "customs",
"quantity": 5000,
"unit_price": 100
}
],
"quantity_edges": [
500,
1000,
2000,
5000
],
"unit_price_edges": [
50,
100,
150,
200
],
"tolerance": 0
}{
"first_leg_commitment": {
"v": 1,
"type": "mirror.dimension-commitment",
"locator": "matched_factor_structure",
"role": "invoice",
"bandable": true,
"basis": "quantity+unit_price",
"banded_dimensions": [
"quantity",
"unit_price"
],
"dimensions": [
{
"dimension": "quantity",
"bandable": true,
"commitments": [
"0845b44b77340164da97b8d1136dd5a6b9184b73ef2012765c48b10ffbef19c9"
],
"corridor_commitment": "60c1807d49b073e3a3222322ee5de32d5e3b93629d7df088df8ecf63003e7127",
"tolerance": 0
},
{
"dimension": "unit_price",
"bandable": true,
"commitments": [
"4d36619315ce978786ce870b2ebedf5cbdfda82050d229583957ff164191d4c7"
],
"corridor_commitment": "48e93501df6970b13009c20c462e6359bcd95f0f84ef8cf9a927ef9323897a70",
"tolerance": 0
}
],
"refused": [],
"reason": "Banded 2 dimension(s) locally and sent commitments only. Quantity and unit price are separated, so a matched-factor move cannot hide inside a single price-per-unit band.",
"disclaimer": "Salted band commitments for each dimension, computed inside the institution: no quantity, unit price, total value or band index is in this record, and the operator holds no shared secret with which to open one. Corridor tables for BOTH dimensions are party-supplied; Mirror invents no prices and no volumes. NOT a zero-knowledge proof and NOT secure multiparty computation - a counterparty who shares the secret can brute-force a low-cardinality band. The basis field discloses which two figures the party held, never their values."
},
"verdict": "divergent",
"expected_verdict": "divergent"
}short_shipmentcommitDimensions+reconcilequantity agrees, unit price is 2x -> DIVERGENT on the price dimension.not run
{
"op": "commitDimensions+reconcile",
"legs": [
{
"role": "invoice",
"quantity": 1000,
"unit_price": 100
},
{
"role": "customs",
"quantity": 1000,
"unit_price": 200
}
],
"quantity_edges": [
500,
1000,
2000,
5000
],
"unit_price_edges": [
50,
100,
150,
200
],
"tolerance": 0
}{
"first_leg_commitment": {
"v": 1,
"type": "mirror.dimension-commitment",
"locator": "short_shipment",
"role": "invoice",
"bandable": true,
"basis": "quantity+unit_price",
"banded_dimensions": [
"quantity",
"unit_price"
],
"dimensions": [
{
"dimension": "quantity",
"bandable": true,
"commitments": [
"e7ffe601cf47738c30b656bae80f797d1c6f1cae38498300ba1da2cf195332b2"
],
"corridor_commitment": "3d9cd82a290d7e5f21c7bdac0ff9c30705a1a618c9f5979cc163f2f06c0d2b88",
"tolerance": 0
},
{
"dimension": "unit_price",
"bandable": true,
"commitments": [
"5b6e4fe9ed33199657faa9941afb83206d6892e979de832fc3994e819e5b19db"
],
"corridor_commitment": "e5736fa1ceb29ce1d6bda32467d48056177b4773ef231970d206e39bfb4e417c",
"tolerance": 0
}
],
"refused": [],
"reason": "Banded 2 dimension(s) locally and sent commitments only. Quantity and unit price are separated, so a matched-factor move cannot hide inside a single price-per-unit band.",
"disclaimer": "Salted band commitments for each dimension, computed inside the institution: no quantity, unit price, total value or band index is in this record, and the operator holds no shared secret with which to open one. Corridor tables for BOTH dimensions are party-supplied; Mirror invents no prices and no volumes. NOT a zero-knowledge proof and NOT secure multiparty computation - a counterparty who shares the secret can brute-force a low-cardinality band. The basis field discloses which two figures the party held, never their values."
},
"verdict": "divergent",
"expected_verdict": "divergent"
}Locators 13 vectors
How two banks reach one opaque shipment key without sending each other the reference - and what must be refused rather than hashed.
locator_commitmentlocatorCommitment'l:' + double-hashed, key-first, length-prefixed. Two banks resolving the same LC number reach the same commitment.not run
{
"op": "locatorCommitment",
"corridor_key": "mirror-conformance-locator-test-key-v1-FIXED-NOT-FOR-USE",
"type": "lc",
"value": "LC-99823-AXB"
}{
"commitment": "l:fd381f99e71592baa03b7f7db1a55a6d7f9f8f2aadcdd48d658e5ee9a9faafb8"
}locator_normalisationlocatorCommitmentcase and whitespace are formatting: ' lc-99823-axb ' reaches the same commitment as 'LC-99823-AXB'.not run
{
"op": "locatorCommitment",
"corridor_key": "mirror-conformance-locator-test-key-v1-FIXED-NOT-FOR-USE",
"type": "lc",
"value": " lc-99823-axb "
}{
"commitment": "l:fd381f99e71592baa03b7f7db1a55a6d7f9f8f2aadcdd48d658e5ee9a9faafb8",
"equals_canonical": true
}locator_punctuation_is_contentlocatorCommitmentpunctuation in a free-form reference is CONTENT: 'LC/99823/AXB' and 'LC-99823-AXB' are different references and must not share a commitment.not run
{
"op": "locatorCommitment",
"corridor_key": "mirror-conformance-locator-test-key-v1-FIXED-NOT-FOR-USE",
"type": "lc",
"value": "LC/99823/AXB"
}{
"commitment": "l:8bfa731ca41cb93b97a6a7559f25e08b7f0594dcdae1bbc452ba734cffb6578a",
"equals_canonical": false
}locator_embedded_separatorlocatorCommitmentan invoice number that itself contains the length-prefix separator ':' is hashed unambiguously - length-prefixing makes the encoding injective.not run
{
"op": "locatorCommitment",
"corridor_key": "mirror-conformance-locator-test-key-v1-FIXED-NOT-FOR-USE",
"type": "inv",
"value": {
"invoice_no": "INV/2027/00417:xz",
"invoice_date": "2027-01-15",
"incoterms": "FOB",
"hs4": "8541"
}
}{
"commitment": "l:a69740ac0b68f0720de9cca930a34e4075c8ff71c4135ce078b8a92bcd603476"
}locator_warehouse_receiptlocatorCommitmentwr is an issuer-scoped composite [issuer, receipt_no]: a receipt number alone collides across warehouses.not run
{
"op": "locatorCommitment",
"corridor_key": "mirror-conformance-locator-test-key-v1-FIXED-NOT-FOR-USE",
"type": "wr",
"value": {
"issuer": "WHSE-SG-017",
"receipt_no": "WR-2027-000881"
}
}{
"commitment": "l:e15b6ff71456c3d737bbe2297f05a1196489174eaa1c3335a848736ee3f94cde"
}locator_purchase_orderlocatorCommitmentpo is [issuer, po_no, po_date], every part required.not run
{
"op": "locatorCommitment",
"corridor_key": "mirror-conformance-locator-test-key-v1-FIXED-NOT-FOR-USE",
"type": "po",
"value": {
"issuer": "BUYER-DE-44",
"po_no": "PO-7712",
"po_date": "2027-02-03"
}
}{
"commitment": "l:c8d527e1f1763b0bea7075a29bbaac984d40a833a7fcd889ff3699792b4aa2af"
}locator_air_waybilllocatorCommitmentawb is the 11-digit IATA number: separators are formatting and the mod-7 check digit must hold.not run
{
"op": "locatorCommitment",
"corridor_key": "mirror-conformance-locator-test-key-v1-FIXED-NOT-FOR-USE",
"type": "awb",
"value": "020-12345675"
}{
"commitment": "l:083de89de29664a7cd38cb5085ed606f8bc00b0f8028497b9459a6225ee05394",
"equals_spaced": true
}locator_containerlocatorCommitmentctr is a cargo-intrinsic key [container_no, pol, onboard_date] for a FULL container load, with an ISO 6346 check digit. Separators in the box number and port are formatting.not run
{
"op": "locatorCommitment",
"corridor_key": "mirror-conformance-locator-test-key-v1-FIXED-NOT-FOR-USE",
"type": "ctr",
"value": {
"container_no": "CSQU3054383",
"pol": "CNSHA",
"onboard_date": "2027-03-01",
"full_container_load": true
}
}{
"commitment": "l:5d48bc24ec61a3553aae6b39b1857d99bfd54a7bcc4a170a0609458da1112013",
"equals_spaced": true
}locator_container_voyage_bindinglocatorCommitmentthe same container on a different on-board date is a DIFFERENT key, so a reused box cannot join two voyages.not run
{
"op": "locatorCommitment",
"corridor_key": "mirror-conformance-locator-test-key-v1-FIXED-NOT-FOR-USE",
"type": "ctr",
"value": {
"container_no": "CSQU3054383",
"pol": "CNSHA",
"onboard_date": "2027-05-19",
"full_container_load": true
}
}{
"commitment": "l:99ed6bce7a036070388c3326f79a4c5e755a50ce24093ffb5398dec260f3719b",
"differs_from_first_voyage": true
}locator_vessellocatorCommitmentimo is the full-cargo bulk key [imo_no, pol, load_date]: a leading 'IMO' is removed and the IMO check digit must hold.not run
{
"op": "locatorCommitment",
"corridor_key": "mirror-conformance-locator-test-key-v1-FIXED-NOT-FOR-USE",
"type": "imo",
"value": {
"imo_no": "IMO 9074729",
"pol": "NLRTM",
"load_date": "2027-04-10",
"full_cargo": true
}
}{
"commitment": "l:66d381deb56db2c5d79ccb0af24f535c6c58183d8d47c1739c37288aa376bfbe"
}locator_container_lcl_refusedlocatorCommitmenta consolidated (LCL) container is refused: a container-level key would join unrelated consignments.not run
{
"op": "locatorCommitment",
"corridor_key": "mirror-conformance-locator-test-key-v1-FIXED-NOT-FOR-USE",
"type": "ctr",
"value": {
"container_no": "CSQU3054383",
"pol": "CNSHA",
"onboard_date": "2027-03-01",
"full_container_load": false
}
}{
"commitment": null,
"refused": true
}locator_container_check_digit_refusedlocatorCommitmenta container number failing its ISO 6346 check digit is refused rather than hashed.not run
{
"op": "locatorCommitment",
"corridor_key": "mirror-conformance-locator-test-key-v1-FIXED-NOT-FOR-USE",
"type": "ctr",
"value": {
"container_no": "CSQU3054384",
"pol": "CNSHA",
"onboard_date": "2027-03-01",
"full_container_load": true
}
}{
"commitment": null,
"refused": true
}locator_flag_not_boolean_refusedlocatorCommitmentthe full-load assertion must be the boolean true; the string 'true' is refused.not run
{
"op": "locatorCommitment",
"corridor_key": "mirror-conformance-locator-test-key-v1-FIXED-NOT-FOR-USE",
"type": "ctr",
"value": {
"container_no": "CSQU3054383",
"pol": "CNSHA",
"onboard_date": "2027-03-01",
"full_container_load": "true"
}
}{
"commitment": null,
"refused": true
}Encodings and ids 9 vectors
Canonical JSON, key ids, webhook ids, the newer commitment blocks a second implementation must reproduce, and the public reference a ratio corridor divides by.
ratio_referenceratio.deriveReferenceR from a quorum of cited public figures: the exact median (two figures: the exact mean, 8275.5), refused beyond the ratified spread; the PIN carries each file's SHA-256 and never a value. The set id is 'rs:' + H(canon(set)).Node runner
{
"op": "ratio.deriveReference",
"reference_set": {
"table": "ratio-10",
"sources": [
{
"source": "Publisher One",
"instrument": "Copper cathode, grade A, cash settlement",
"publication": "daily official price",
"basis": "CIF Rotterdam",
"currency": "USD",
"unit": "t"
},
{
"source": "Publisher Two",
"instrument": "Copper cathode, grade A, cash settlement",
"publication": "daily official price",
"basis": "CIF Rotterdam",
"currency": "USD",
"unit": "t"
},
{
"source": "Publisher Three",
"instrument": "Copper cathode, grade A, cash settlement",
"publication": "daily official price",
"basis": "CIF Rotterdam",
"currency": "USD",
"unit": "t"
}
],
"quorum": 2,
"max_spread": "0.05",
"rule": "on_board_date"
},
"figures": {
"set_id": "rs:2157678dc583dda15033428c018b9f550ef725c86b009c20ed8b8cebad7b6606",
"date": "2026-10-05",
"figures": [
{
"source": 0,
"value": "8250",
"file_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
{
"source": 1,
"value": "8301",
"file_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
}
]
}
}{
"set_id": "rs:2157678dc583dda15033428c018b9f550ef725c86b009c20ed8b8cebad7b6606",
"reference": "8275.5",
"pin": {
"set_id": "rs:2157678dc583dda15033428c018b9f550ef725c86b009c20ed8b8cebad7b6606",
"date": "2026-10-05",
"rule": "on_board_date",
"figures": [
{
"source": 0,
"file_sha256": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
{
"source": 1,
"file_sha256": "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"
}
]
}
}canonical_jsoncanonicalcanon(): keys sorted by UTF-16 code unit ('B' < 'a' < 'b'), arrays in order, undefined inside an object signs as null, no whitespace, shortest numbers, non-ASCII passed through (signed RECORD strings are ASCII by rule; the encoding itself is total).not run
{
"op": "canonical",
"value": {
"b": [
3,
{
"d": null,
"c": "café"
}
],
"a": 1.5,
"B": true,
"n": 100,
"e": 0.000001
}
}{
"text": "{\"B\":true,\"a\":1.5,\"b\":[3,{\"c\":\"café\",\"d\":null}],\"e\":0.000001,\"n\":100}"
}kid_derivationkidOfkid = 'mir-' + first 16 hex of sha256(canon({crv, kty, x, y})) over the PUBLIC half only (this is the published demo operator key).not run
{
"op": "kidOf",
"jwk": {
"kty": "EC",
"crv": "P-256",
"x": "EAJbUBNAOWbekLk8T6d6h6zj1qK04Kq19aBX1HLsFB4",
"y": "kZ9AHCHeWIWJPpXvVwemN8kA5L5gvrYJWpXwyyDhoNM"
}
}{
"kid": "mir-717795b0024c7ec2"
}fine_commitments_nestedcommitNesteda fine band under the SAME salt: H(salt + ':fine:' + band) over the fine window, sorted as strings; the fine table commitment is H(salt + '|f|' + corridor_id(fine)).Node runner
{
"op": "commitNested",
"shipment_ref": "SHIP-0001",
"value": 120000,
"unit_qty": 1000,
"corridor_edges": [
50,
100,
150,
200
],
"fine_edges": [
50,
75,
100,
125,
150,
175,
200
],
"fine_tolerance": 1,
"shared_secret": "conformance-vectors-fixed-secret-do-not-use-in-production-0000"
}{
"commitments": [
"46e942429dd78a0020beb09721b9d99066d0a51f47f53cca759363abd4e79e75",
"5c62937a74ec5fdc88c67158cd9591929c3ff4a079c5a8b9d8d02c51b44e1ce5",
"c9f8d2dabbf991f0c4fd7d783493d104f9ea85c01ddc12d47884c7d1467e96d0"
],
"table_commitment": "54b949bff2e294db1b8e58cb981985bd7bb2a821112668054272c890c269fb78",
"coarse_commitments": [
"1d3fddf035eee50adcc5b93c57fabd173c996baa64072feb09b3dcb8e360a1a9"
]
}basis_commitmentbasisCommitmentthe pricing basis, normalised (currency upper, unit lower, Incoterm upper) then H(salt + '|b|' + canon(basis)).Node runner
{
"op": "basisCommitment",
"shipment_ref": "SHIP-0001",
"shared_secret": "conformance-vectors-fixed-secret-do-not-use-in-production-0000",
"basis": {
"currency": "eur",
"unit": "T",
"incoterm": "cif",
"place": "Rotterdam"
}
}{
"commitment": "67bdd1b38276f1426e4c7a1bc5b3996e13119cb2d59ae40376127835fe14ebc0"
}origin_commitmentoriginCommitmentthe booked document's figures as decimal strings, missing optional fields null, length-prefixed with the doc salt and the domain tag: 'o:' + H(lp(doc_salt) + lp('mirror:origin:v1') + lp(canon(doc))).Node runner
{
"op": "originCommitment",
"document": {
"value": 4000000,
"unit_qty": 10000,
"currency": "EUR",
"basis": "CIF Rotterdam"
},
"doc_salt": "0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f"
}{
"commitment": "o:536a976c9efe9d9bdc74f33c9281392c03b6cca760c9cb09962b9538bba7e33a"
}bulletin_declared_massdeclaredPhysicalthe physical witness: cargo_key = container|port|date; locator 'cl:' + derive('locator'), salt 'ps:' + derive('salt'); mass commitments H(lp(salt)+lp('mirror:bulletin:mass')+lp(band)) over the tolerance window, sorted as strings.Node runner
{
"op": "declaredPhysical",
"receipt_secret": "abababababababababababababababababababababababababababababababab",
"cargo": {
"container": "CSQU3054383",
"port": "AEDXB",
"load_date": "2026-09-12"
},
"table_edges": [
7000,
7500,
8000,
8500,
9000,
9500,
10000
],
"declared_kg": 8200,
"tolerance": 1
}{
"locator": "cl:caec71460f9fe4b81ae3701fb093f342bcb4b8f41bf71e65ac43ea42b7eeb792",
"commitments": [
"1ea8fcf8222177b3a9815534e63bbbfad5aefa0552bc9c28f2ef34aec2201fab",
"2117c07fbebfbdb7574904a18092e0b07c99556991b5c754a1837f2a9e3c9185",
"e55becfe5b0f69e5087d5507184c7f9048020020cc57440a9af6a65b6fb66394"
],
"table_commitment": "9aa0f5853309e9231474a69bf332a642f134369a3f7354cf697c93455d576017",
"tolerance": 1
}bulletin_declared_gradedeclaredQualitythe quality axis: the same construction under the assay certificate secret, with the domain tag 'mirror:bulletin:quality'.Node runner
{
"op": "declaredQuality",
"certificate_secret": "cdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcdcd",
"cargo": {
"container": "CSQU3054383",
"port": "AEDXB",
"load_date": "2026-09-12"
},
"table_edges": [
585,
750,
916,
995,
999.5
],
"declared_grade": 999.9,
"tolerance": 0
}{
"locator": "cl:fda5109eaf24cc4d3354964e7895e1871a2d284ef5673ffe88466b2d3bc42158",
"commitments": [
"dc80170021297ed0584b43c43aed351d106670b9c21142a5dfdd5c51f8090bf2"
],
"table_commitment": "3e32d3c9902fcb56522b8618e46fad4794232e1a75b2b2f4614d51f18c00fc7c",
"tolerance": 0
}webhook_idswebhookIdsa receiver in any language recomputes both: the subscription id from (kid, url, events) and the delivery id from (subscription, H(canon(record))) - stable across retries and across a retried verdict.not run
{
"op": "webhookIds",
"kid": "mir-0000000000000001",
"url": "https://hooks.bank-a.example/m",
"events": [
"recall.notice",
"verdict.signed"
],
"record": {
"v": 1,
"type": "mirror.reconciliation",
"shipment_ref": "l:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"verdict": "reconciled",
"leg_authentication": {
"attestations": [
{
"kid": "mir-0000000000000001",
"sig": "c2lnbmF0dXJl"
}
]
}
}
}{
"subscription_id": "wh_330ef56469edde0c85b9ca7d",
"delivery_id": "whd_fc5464a6ec27e1f78706a9af3caac0f1"
}Refusals 3 vectors
The wall, expressed as outcomes: a volume fee, a weak secret and a filing field are all refused.
billing_volume_fee_refusedbilling.assertNoVolumeFeea rate card naming a basis-points fee is a HARD failure: Mirror never sees a value and will not sit in the payment path.not run
{
"op": "billing.assertNoVolumeFee",
"node": {
"pricing": {
"bps": 2
}
}
}{
"throws": true
}secret_too_weak_refusedsecret.strengtha composed, memorable corridor secret is below the 128-bit floor and is refused: shipment_ref is in the clear and the band space is tiny, so the secret IS the guarantee.Node runner
{
"op": "secret.strength",
"secret": "corridor-hs8541-2026"
}{
"ok": false,
"bits_below_floor": true
}sar_field_injection_refusedoperator.sar_walla leg or context carrying a SAR/STR filing field is refused 400 sar_wall at the operator, at any depth. Report the STRUCTURE here; keep the filing decision inside your institution.not run
{
"op": "operator.sar_wall",
"example_request": {
"shipment_ref": "X",
"legs": [],
"context": {
"escalation": {
"sar_filed": true,
"sar_ref": "SAR-99"
}
}
}
}{
"refused": true,
"code": "sar_wall",
"banned_keys": [
"disclosure_id",
"disclosure_to_le",
"filed_sar",
"filing_decision",
"filing_id",
"filing_ref",
"filing_status",
"fincen",
"fincen_form",
"fiu_filing",
"fiu_reference",
"fiu_report",
"goaml_ref",
"goaml_report",
"law_enforcement_referral",
"le_referral",
"nca_ref",
"nca_sar",
"reported_to_fiu",
"sar",
"sar_decision",
"sar_filed",
"sar_id",
"sar_narrative",
"sar_ref",
"sar_reference",
"sar_status",
"sars",
"str",
"str_filed",
"str_id",
"str_narrative",
"str_ref",
"str_reference",
"str_status",
"suspicious_activity",
"suspicious_activity_report",
"suspicious_transaction",
"suspicious_transaction_report",
"tipoff",
"tipping_off"
],
"note": "Enforced in core.js before dispatch; exercised over the wire in server tests. A single banned key anywhere in the request body triggers it."
}Rendered at build time from /conformance-vectors.json · sha256 4558d28593c5296f… · written from the kernels by server/build-vectors.js; server/vectors.test.js fails on any drift
Run every one yourself
All 53, in Node, in one command.
The shared secret in these vectors is FIXED so the vectors are reproducible. That is a property of TEST vectors, not guidance: a real corridor secret is generated (>=128 bits) and never composed, never reused, and never sent to the operator.
- Regenerate the pack from the kernels and diff it. Any difference fails, naming the command that fixes it.
node server/vectors.test.js
- Check a second, independent implementation. Written against the spec text, not the kernel, it must land on the same bytes for every primitive.
node conformance/reference-impl.test.js
- Ask the operator for a fresh challenge. Seeded inputs, your code's answers, all-or-nothing:
GET /conformance/challengethenPOST /conformance/attest.