{
 "v": 1,
 "type": "mirror.sdk-vectors",
 "spec": "/mirror-protocol-spec.md#82-canonical-forms-and-derivations-normative",
 "note": "Verification vectors for any Mirror SDK: canonical JSON, kid, ES256 selection by kid, signature form, the refusal scan, webhook ids and delivery checks, residency. Keys here are throwaway test keys generated for this file, never an operator's. Compare the listed fields; reasons are prose and may differ by language.",
 "keys": {
  "operator": {
   "kid": "mir-23b2d5b25e76f774",
   "alg": "ES256",
   "use": "sig",
   "kty": "EC",
   "crv": "P-256",
   "x": "PefBGGm-a-f9iTC-4jyxGidvWRFY5L42UYA0tkfo6r0",
   "y": "nVHNTfqohuomz10LVzKbXQlAmDZOH_1_uEyPRsLGkdk"
  },
  "other": {
   "kid": "mir-4c611a15dcbf70f8",
   "alg": "ES256",
   "use": "sig",
   "kty": "EC",
   "crv": "P-256",
   "x": "INfOmrHIMZK-A6P1-PorNRoQB6t0SuGGWuHfGXs5PFQ",
   "y": "ecmFkQJTi5c8jWYiNAM7ysBJk6aZwxRwvsOfXRTwePw"
  },
  "webhook_sender": {
   "kid": "mir-e561ffb9f1eedc00",
   "alg": "ES256",
   "use": "sig",
   "kty": "EC",
   "crv": "P-256",
   "x": "hVjKi4qLrzb3B1IxktA-c8Dx62sesbztlm0o0TRYovc",
   "y": "bnWQTD3a0zi2OPhNDMuScfpB1cMXen2UD_zx2kO9ls8"
  }
 },
 "numbers": [
  {
   "json": "0",
   "text": "0"
  },
  {
   "json": "-0",
   "text": "0"
  },
  {
   "json": "1",
   "text": "1"
  },
  {
   "json": "-1",
   "text": "-1"
  },
  {
   "json": "100",
   "text": "100"
  },
  {
   "json": "1.0",
   "text": "1"
  },
  {
   "json": "0.1",
   "text": "0.1"
  },
  {
   "json": "1.5",
   "text": "1.5"
  },
  {
   "json": "-2.5",
   "text": "-2.5"
  },
  {
   "json": "1e21",
   "text": "1e+21"
  },
  {
   "json": "1e20",
   "text": "100000000000000000000"
  },
  {
   "json": "123456789012345680000",
   "text": "123456789012345680000"
  },
  {
   "json": "1e-7",
   "text": "1e-7"
  },
  {
   "json": "1e-6",
   "text": "0.000001"
  },
  {
   "json": "0.000001234",
   "text": "0.000001234"
  },
  {
   "json": "1.5e-7",
   "text": "1.5e-7"
  },
  {
   "json": "2.5e+25",
   "text": "2.5e+25"
  },
  {
   "json": "12345.6789",
   "text": "12345.6789"
  },
  {
   "json": "5e-324",
   "text": "5e-324"
  },
  {
   "json": "1.7976931348623157e308",
   "text": "1.7976931348623157e+308"
  },
  {
   "json": "9007199254740993",
   "text": "9007199254740992"
  },
  {
   "json": "0.30000000000000004",
   "text": "0.30000000000000004"
  },
  {
   "json": "4.35",
   "text": "4.35"
  },
  {
   "json": "1E3",
   "text": "1000"
  },
  {
   "json": "-1.25e-10",
   "text": "-1.25e-10"
  },
  {
   "json": "3.141592653589793",
   "text": "3.141592653589793"
  }
 ],
 "canonical": [
  {
   "name": "key order is UTF-16 code units, not code points",
   "json": "{\"ｚ\":1,\"😀\":2,\"b\":3,\"a\":4,\"B\":5,\"é\":6}",
   "text": "{\"B\":5,\"a\":4,\"b\":3,\"é\":6,\"😀\":2,\"ｚ\":1}"
  },
  {
   "name": "nested objects and arrays keep array order",
   "json": "{\"z\":[3,{\"y\":null,\"x\":[true,false]}],\"a\":{\"c\":\"\",\"b\":[]}}",
   "text": "{\"a\":{\"b\":[],\"c\":\"\"},\"z\":[3,{\"x\":[true,false],\"y\":null}]}"
  },
  {
   "name": "string escapes are JSON.stringify's",
   "json": "{\"s\":\"q\\\" b\\\\ \\b\\f\\n\\r\\t \\u0000 \\u001f \\u007f\"}",
   "text": "{\"s\":\"q\\\" b\\\\ \\b\\f\\n\\r\\t \\u0000 \\u001f \"}"
  },
  {
   "name": "non-ASCII passes through, U+2028/2029 raw",
   "json": "{\"s\":\"café     😀 中\"}",
   "text": "{\"s\":\"café     😀 中\"}"
  },
  {
   "name": "the published canonical vector",
   "json": "{\"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}"
  },
  {
   "name": "empty containers",
   "json": "{\"a\":{},\"b\":[],\"c\":[{}],\"d\":[[]]}",
   "text": "{\"a\":{},\"b\":[],\"c\":[{}],\"d\":[[]]}"
  },
  {
   "name": "top-level array",
   "json": "[1,\"two\",{\"b\":2,\"a\":1},null]",
   "text": "[1,\"two\",{\"a\":1,\"b\":2},null]"
  }
 ],
 "kid": [
  {
   "jwk": {
    "kty": "EC",
    "crv": "P-256",
    "x": "PefBGGm-a-f9iTC-4jyxGidvWRFY5L42UYA0tkfo6r0",
    "y": "nVHNTfqohuomz10LVzKbXQlAmDZOH_1_uEyPRsLGkdk"
   },
   "kid": "mir-23b2d5b25e76f774"
  },
  {
   "jwk": {
    "kty": "EC",
    "crv": "P-256",
    "x": "INfOmrHIMZK-A6P1-PorNRoQB6t0SuGGWuHfGXs5PFQ",
    "y": "ecmFkQJTi5c8jWYiNAM7ysBJk6aZwxRwvsOfXRTwePw"
   },
   "kid": "mir-4c611a15dcbf70f8"
  },
  {
   "jwk": {
    "kty": "EC",
    "crv": "P-256",
    "x": "hVjKi4qLrzb3B1IxktA-c8Dx62sesbztlm0o0TRYovc",
    "y": "bnWQTD3a0zi2OPhNDMuScfpB1cMXen2UD_zx2kO9ls8"
   },
   "kid": "mir-e561ffb9f1eedc00"
  },
  {
   "jwk": {
    "kty": "EC",
    "crv": "P-256",
    "x": "EAJbUBNAOWbekLk8T6d6h6zj1qK04Kq19aBX1HLsFB4",
    "y": "kZ9AHCHeWIWJPpXvVwemN8kA5L5gvrYJWpXwyyDhoNM"
   },
   "kid": "mir-717795b0024c7ec2"
  }
 ],
 "canonical_key": [
  {
   "raw": "sar_filed",
   "canonical": "sar_filed"
  },
  {
   "raw": "SarFiled",
   "canonical": "sar_filed"
  },
  {
   "raw": "sarFiled",
   "canonical": "sar_filed"
  },
  {
   "raw": "SAR-FILED",
   "canonical": "sar_filed"
  },
  {
   "raw": "__sar__filed__",
   "canonical": "sar_filed"
  },
  {
   "raw": "ｓａｒ＿ｆｉｌｅｄ",
   "canonical": "sar_filed"
  },
  {
   "raw": "s​ar_filed",
   "canonical": "sar_filed"
  },
  {
   "raw": "sаr_filed",
   "canonical": "sar_filed"
  },
  {
   "raw": "рrivate_key",
   "canonical": "private_key"
  },
  {
   "raw": "riskScore",
   "canonical": "risk_score"
  },
  {
   "raw": "RISK.SCORE",
   "canonical": "risk_score"
  },
  {
   "raw": "risk score",
   "canonical": "risk_score"
  },
  {
   "raw": "low_price_per_unit",
   "canonical": "low_price_per_unit"
  },
  {
   "raw": "bands",
   "canonical": "bands"
  },
  {
   "raw": "independence_grade",
   "canonical": "independence_grade"
  },
  {
   "raw": "­salt﻿",
   "canonical": "salt"
  },
  {
   "raw": "fee_bps",
   "canonical": "fee_bps"
  },
  {
   "raw": "IBAN",
   "canonical": "iban"
  },
  {
   "raw": "Suspicious Activity Report",
   "canonical": "suspicious_activity_report"
  }
 ],
 "scan": [
  {
   "name": "a clean verdict",
   "record": {
    "v": 1,
    "type": "mirror.trade-reconciliation",
    "verdict": "divergent",
    "cleared": false,
    "disclaimer": "not a risk score; a reason to look, never a filing decision"
   },
   "expect": {
    "clean": true
   }
  },
  {
   "name": "a risk score",
   "record": {
    "v": 1,
    "verdict": "divergent",
    "risk_score": 0.7
   },
   "expect": {
    "clean": false,
    "offending_key": "risk_score",
    "category": "risk_score"
   }
  },
  {
   "name": "a filing decision, nested in an array",
   "record": {
    "v": 1,
    "notes": [
     {
      "ok": 1
     },
     {
      "escalation": {
       "sar_filed": true
      }
     }
    ]
   },
   "expect": {
    "clean": false,
    "offending_key": "sar_filed",
    "category": "filing_decision"
   }
  },
  {
   "name": "a salt",
   "record": {
    "v": 1,
    "legs": [
     {
      "role": "invoice",
      "salt": "ab"
     }
    ]
   },
   "expect": {
    "clean": false,
    "offending_key": "salt",
    "category": "secret_leak"
   }
  },
  {
   "name": "an IBAN",
   "record": {
    "v": 1,
    "payment": {
     "IBAN": "x"
    }
   },
   "expect": {
    "clean": false,
    "offending_key": "IBAN",
    "category": "settlement"
   }
  },
  {
   "name": "a basis-points fee",
   "record": {
    "v": 1,
    "pricing": {
     "feeBps": 3
    }
   },
   "expect": {
    "clean": false,
    "offending_key": "feeBps",
    "category": "volume_fee"
   }
  },
  {
   "name": "a Cyrillic homoglyph",
   "record": {
    "v": 1,
    "sаr_filed": true
   },
   "expect": {
    "clean": false,
    "offending_key": "sаr_filed",
    "category": "filing_decision"
   }
  },
  {
   "name": "a zero-width disguise",
   "record": {
    "v": 1,
    "risk​_score": 1
   },
   "expect": {
    "clean": false,
    "offending_key": "risk​_score",
    "category": "risk_score"
   }
  },
  {
   "name": "fullwidth letters",
   "record": {
    "v": 1,
    "ｓａｌｔ": "x"
   },
   "expect": {
    "clean": false,
    "offending_key": "ｓａｌｔ",
    "category": "secret_leak"
   }
  },
  {
   "name": "keys only: forbidden words in VALUES are fine",
   "record": {
    "v": 1,
    "note": "risk_score sar_filed salt"
   },
   "expect": {
    "clean": true
   }
  },
  {
   "name": "near misses are not matches",
   "record": {
    "v": 1,
    "low_price_per_unit": 1,
    "bands": [
     1
    ],
    "independence_grade": "A"
   },
   "expect": {
    "clean": true
   }
  },
  {
   "name": "33 levels deep: unscannable",
   "record": {
    "d": {
     "d": {
      "d": {
       "d": {
        "d": {
         "d": {
          "d": {
           "d": {
            "d": {
             "d": {
              "d": {
               "d": {
                "d": {
                 "d": {
                  "d": {
                   "d": {
                    "d": {
                     "d": {
                      "d": {
                       "d": {
                        "d": {
                         "d": {
                          "d": {
                           "d": {
                            "d": {
                             "d": {
                              "d": {
                               "d": {
                                "d": {
                                 "d": {
                                  "d": {
                                   "d": {
                                    "d": {
                                     "leaf": "x"
                                    }
                                   }
                                  }
                                 }
                                }
                               }
                              }
                             }
                            }
                           }
                          }
                         }
                        }
                       }
                      }
                     }
                    }
                   }
                  }
                 }
                }
               }
              }
             }
            }
           }
          }
         }
        }
       }
      }
     }
    }
   },
   "expect": {
    "clean": false,
    "unscannable": true
   }
  },
  {
   "name": "30 levels deep: scannable",
   "record": {
    "d": {
     "d": {
      "d": {
       "d": {
        "d": {
         "d": {
          "d": {
           "d": {
            "d": {
             "d": {
              "d": {
               "d": {
                "d": {
                 "d": {
                  "d": {
                   "d": {
                    "d": {
                     "d": {
                      "d": {
                       "d": {
                        "d": {
                         "d": {
                          "d": {
                           "d": {
                            "d": {
                             "d": {
                              "d": {
                               "d": {
                                "d": {
                                 "d": {
                                  "leaf": "x"
                                 }
                                }
                               }
                              }
                             }
                            }
                           }
                          }
                         }
                        }
                       }
                      }
                     }
                    }
                   }
                  }
                 }
                }
               }
              }
             }
            }
           }
          }
         }
        }
       }
      }
     }
    }
   },
   "expect": {
    "clean": true
   }
  }
 ],
 "records": [
  {
   "name": "a genuine record, low-S",
   "signed": {
    "record": {
     "v": 1,
     "type": "mirror.trade-reconciliation",
     "shipment_ref": "l:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
     "verdict": "divergent",
     "cleared": false,
     "amount_note": "café",
     "n": [
      1.5,
      100,
      0.000001,
      1e+21
     ],
     "disclaimer": "not a risk score"
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-23b2d5b25e76f774",
     "signature": "PE4Ccyp8LuDyfk9wHRBOV-a8UqN_IyqsLglAiu3sqgJrkBI__OPnuA6syJUzV09HYj3pUO-Aigdwsf8OV26VOw",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "jwks": "operator",
   "expect": {
    "valid": true,
    "signature_ok": true,
    "refused": null,
    "offending_key": null,
    "category": null,
    "signature_form": "low_s"
   }
  },
  {
   "name": "its high-S twin: the same signing, still valid, reported high_s",
   "signed": {
    "record": {
     "v": 1,
     "type": "mirror.trade-reconciliation",
     "shipment_ref": "l:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
     "verdict": "divergent",
     "cleared": false,
     "amount_note": "café",
     "n": [
      1.5,
      100,
      0.000001,
      1e+21
     ],
     "disclaimer": "not a risk score"
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-23b2d5b25e76f774",
     "signature": "PE4Ccyp8LuDyfk9wHRBOV-a8UqN_IyqsLglAiu3sqgKUb-2_AxwYSPFTN2rMqLC4WqkRXLeXFH2DB8u0pPSQFg",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "jwks": "operator",
   "expect": {
    "valid": true,
    "signature_ok": true,
    "refused": null,
    "offending_key": null,
    "category": null,
    "signature_form": "high_s"
   }
  },
  {
   "name": "one field changed after signing",
   "signed": {
    "record": {
     "v": 1,
     "type": "mirror.trade-reconciliation",
     "shipment_ref": "l:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
     "verdict": "reconciled",
     "cleared": true,
     "amount_note": "café",
     "n": [
      1.5,
      100,
      0.000001,
      1e+21
     ],
     "disclaimer": "not a risk score"
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-23b2d5b25e76f774",
     "signature": "PE4Ccyp8LuDyfk9wHRBOV-a8UqN_IyqsLglAiu3sqgJrkBI__OPnuA6syJUzV09HYj3pUO-Aigdwsf8OV26VOw",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "jwks": "operator",
   "expect": {
    "valid": false,
    "signature_ok": false,
    "refused": null,
    "offending_key": null,
    "category": null,
    "signature_form": null
   }
  },
  {
   "name": "the key is selected by kid, not keys[0]",
   "signed": {
    "record": {
     "v": 1,
     "type": "mirror.trade-reconciliation",
     "shipment_ref": "l:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
     "verdict": "divergent",
     "cleared": false,
     "amount_note": "café",
     "n": [
      1.5,
      100,
      0.000001,
      1e+21
     ],
     "disclaimer": "not a risk score"
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-23b2d5b25e76f774",
     "signature": "PE4Ccyp8LuDyfk9wHRBOV-a8UqN_IyqsLglAiu3sqgJrkBI__OPnuA6syJUzV09HYj3pUO-Aigdwsf8OV26VOw",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "jwks": "both",
   "expect": {
    "valid": true,
    "signature_ok": true,
    "refused": null,
    "offending_key": null,
    "category": null,
    "signature_form": "low_s"
   }
  },
  {
   "name": "no published key for this kid",
   "signed": {
    "record": {
     "v": 1,
     "type": "mirror.trade-reconciliation",
     "shipment_ref": "l:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
     "verdict": "divergent",
     "cleared": false,
     "amount_note": "café",
     "n": [
      1.5,
      100,
      0.000001,
      1e+21
     ],
     "disclaimer": "not a risk score"
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-23b2d5b25e76f774",
     "signature": "PE4Ccyp8LuDyfk9wHRBOV-a8UqN_IyqsLglAiu3sqgJrkBI__OPnuA6syJUzV09HYj3pUO-Aigdwsf8OV26VOw",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "jwks": "other",
   "expect": {
    "valid": false,
    "signature_ok": false,
    "refused": null,
    "offending_key": null,
    "category": null,
    "signature_form": null
   }
  },
  {
   "name": "an empty key set",
   "signed": {
    "record": {
     "v": 1,
     "type": "mirror.trade-reconciliation",
     "shipment_ref": "l:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
     "verdict": "divergent",
     "cleared": false,
     "amount_note": "café",
     "n": [
      1.5,
      100,
      0.000001,
      1e+21
     ],
     "disclaimer": "not a risk score"
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-23b2d5b25e76f774",
     "signature": "PE4Ccyp8LuDyfk9wHRBOV-a8UqN_IyqsLglAiu3sqgJrkBI__OPnuA6syJUzV09HYj3pUO-Aigdwsf8OV26VOw",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "jwks": "empty",
   "expect": {
    "valid": false,
    "signature_ok": false,
    "refused": null,
    "offending_key": null,
    "category": null,
    "signature_form": null
   }
  },
  {
   "name": "an algorithm other than ES256",
   "signed": {
    "record": {
     "v": 1,
     "type": "mirror.trade-reconciliation",
     "shipment_ref": "l:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
     "verdict": "divergent",
     "cleared": false,
     "amount_note": "café",
     "n": [
      1.5,
      100,
      0.000001,
      1e+21
     ],
     "disclaimer": "not a risk score"
    },
    "proof": {
     "alg": "HS256",
     "kid": "mir-23b2d5b25e76f774",
     "signature": "PE4Ccyp8LuDyfk9wHRBOV-a8UqN_IyqsLglAiu3sqgJrkBI__OPnuA6syJUzV09HYj3pUO-Aigdwsf8OV26VOw",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "jwks": "operator",
   "expect": {
    "valid": false,
    "signature_ok": false,
    "refused": null,
    "offending_key": null,
    "category": null,
    "signature_form": null
   }
  },
  {
   "name": "a signature that is not base64url",
   "signed": {
    "record": {
     "v": 1,
     "type": "mirror.trade-reconciliation",
     "shipment_ref": "l:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
     "verdict": "divergent",
     "cleared": false,
     "amount_note": "café",
     "n": [
      1.5,
      100,
      0.000001,
      1e+21
     ],
     "disclaimer": "not a risk score"
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-23b2d5b25e76f774",
     "signature": "not*base64url!",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "jwks": "operator",
   "expect": {
    "valid": false,
    "signature_ok": false,
    "refused": null,
    "offending_key": null,
    "category": null,
    "signature_form": null
   }
  },
  {
   "name": "a signature of the wrong length",
   "signed": {
    "record": {
     "v": 1,
     "type": "mirror.trade-reconciliation",
     "shipment_ref": "l:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
     "verdict": "divergent",
     "cleared": false,
     "amount_note": "café",
     "n": [
      1.5,
      100,
      0.000001,
      1e+21
     ],
     "disclaimer": "not a risk score"
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-23b2d5b25e76f774",
     "signature": "PE4Ccyp8LuDyfk9wHRBOV-a8UqN_IyqsLglAiu3s",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "jwks": "operator",
   "expect": {
    "valid": false,
    "signature_ok": false,
    "refused": null,
    "offending_key": null,
    "category": null,
    "signature_form": null
   }
  },
  {
   "name": "a genuine signature over a risk score",
   "signed": {
    "record": {
     "v": 1,
     "type": "mirror.trade-reconciliation",
     "shipment_ref": "l:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
     "verdict": "divergent",
     "cleared": false,
     "amount_note": "café",
     "n": [
      1.5,
      100,
      0.000001,
      1e+21
     ],
     "disclaimer": "not a risk score",
     "risk_score": 0.9
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-23b2d5b25e76f774",
     "signature": "Wjm6NtAXIpEeZCeQLw_zgcVVxhHxDJlNL_qn9rq3sMgysTAedX2OgIxcCUgczpt3s70C0yiJbYzZYsNwH9zQPQ",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "jwks": "operator",
   "expect": {
    "valid": false,
    "signature_ok": true,
    "refused": "forbidden_field",
    "offending_key": "risk_score",
    "category": "risk_score",
    "signature_form": null
   }
  },
  {
   "name": "a genuine signature over a disguised filing decision",
   "signed": {
    "record": {
     "v": 1,
     "type": "mirror.trade-reconciliation",
     "shipment_ref": "l:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
     "verdict": "divergent",
     "cleared": false,
     "amount_note": "café",
     "n": [
      1.5,
      100,
      0.000001,
      1e+21
     ],
     "disclaimer": "not a risk score",
     "sаr_filed": true
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-23b2d5b25e76f774",
     "signature": "BTy8kt9dlZVwKqb_rRprQNCssfvphuvafz4kdLwvN4wfuyBq9DCR03W6wWC-RldC8u1dkgOdygWiMhApmLvbZA",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "jwks": "operator",
   "expect": {
    "valid": false,
    "signature_ok": true,
    "refused": "forbidden_field",
    "offending_key": "sаr_filed",
    "category": "filing_decision",
    "signature_form": null
   }
  },
  {
   "name": "a genuine signature over a record too deep to scan",
   "signed": {
    "record": {
     "v": 1,
     "type": "mirror.trade-reconciliation",
     "shipment_ref": "l:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
     "verdict": "divergent",
     "cleared": false,
     "amount_note": "café",
     "n": [
      1.5,
      100,
      0.000001,
      1e+21
     ],
     "disclaimer": "not a risk score",
     "nest": {
      "d": {
       "d": {
        "d": {
         "d": {
          "d": {
           "d": {
            "d": {
             "d": {
              "d": {
               "d": {
                "d": {
                 "d": {
                  "d": {
                   "d": {
                    "d": {
                     "d": {
                      "d": {
                       "d": {
                        "d": {
                         "d": {
                          "d": {
                           "d": {
                            "d": {
                             "d": {
                              "d": {
                               "d": {
                                "d": {
                                 "d": {
                                  "d": {
                                   "d": {
                                    "d": {
                                     "d": {
                                      "d": {
                                       "leaf": "x"
                                      }
                                     }
                                    }
                                   }
                                  }
                                 }
                                }
                               }
                              }
                             }
                            }
                           }
                          }
                         }
                        }
                       }
                      }
                     }
                    }
                   }
                  }
                 }
                }
               }
              }
             }
            }
           }
          }
         }
        }
       }
      }
     }
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-23b2d5b25e76f774",
     "signature": "i0j9cVgZutRcJBI51CAHGoOc8tquBp6-4CqlsTcxEgkAr7JL8WlPlbgDRhZNMmDaSN9B7J3F0ZAv3gMHEpIN5g",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "jwks": "operator",
   "expect": {
    "valid": false,
    "signature_ok": true,
    "refused": "unscannable",
    "offending_key": null,
    "category": null,
    "signature_form": null
   }
  },
  {
   "name": "forbidden words in values only",
   "signed": {
    "record": {
     "v": 1,
     "type": "mirror.trade-reconciliation",
     "shipment_ref": "l:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
     "verdict": "divergent",
     "cleared": false,
     "amount_note": "café",
     "n": [
      1.5,
      100,
      0.000001,
      1e+21
     ],
     "disclaimer": "never a risk_score, never sar_filed"
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-23b2d5b25e76f774",
     "signature": "dL9_JuCMIfOWoGDJAO2uBvwD1sCkap_vgmGQour05hUrF4kqiI3vmGehTMPk06ygI2GJKRi9x6J9P1-GrC9bHQ",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "jwks": "operator",
   "expect": {
    "valid": true,
    "signature_ok": true,
    "refused": null,
    "offending_key": null,
    "category": null,
    "signature_form": "low_s"
   }
  },
  {
   "name": "no proof at all",
   "signed": {
    "record": {
     "v": 1,
     "type": "mirror.trade-reconciliation",
     "shipment_ref": "l:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
     "verdict": "divergent",
     "cleared": false,
     "amount_note": "café",
     "n": [
      1.5,
      100,
      0.000001,
      1e+21
     ],
     "disclaimer": "not a risk score"
    }
   },
   "jwks": "operator",
   "expect": {
    "valid": false,
    "signature_ok": false,
    "refused": null,
    "offending_key": null,
    "category": null,
    "signature_form": null
   }
  }
 ],
 "webhook_ids": [
  {
   "kid": "mir-0000000000000001",
   "url": "https://hooks.bank-a.example/m",
   "events": [
    "recall.notice",
    "verdict.signed"
   ],
   "record": {
    "v": 1,
    "type": "mirror.reconciliation",
    "shipment_ref": "l:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb",
    "verdict": "reconciled",
    "leg_authentication": {
     "attestations": [
      {
       "kid": "mir-0000000000000001",
       "sig": "c2ln"
      }
     ],
     "signature": "x"
    }
   },
   "subscription_id": "wh_330ef56469edde0c85b9ca7d",
   "record_digest": "c5f5dabfb33031d383f558e8a80a94cb039465e6967152f48bd47e60edac09ea",
   "delivery_id": "whd_9ea396493e8792b22aae58b45b638388"
  },
  {
   "kid": "mir-00000000000000ff",
   "url": "https://h.bank-b.example/x?y=1",
   "events": [
    "verdict.signed"
   ],
   "record": {
    "v": 1,
    "verdict": "divergent"
   },
   "subscription_id": "wh_a2a1286109409d9fff508da4",
   "record_digest": "873bb932e77956ae3b660d1a73de87f9c2843f385ff1f6a9d0b72a0675b635da",
   "delivery_id": "whd_6a9c63991afe870967876d8a3fe78872"
  }
 ],
 "deliveries": [
  {
   "name": "a genuine delivery",
   "body": {
    "record": {
     "v": 1,
     "type": "mirror.webhook-delivery",
     "id": "whd_ed5c0454343b70bf467a3adf463e943d",
     "event": "verdict.signed",
     "to": "mir-sdk-member-a",
     "subscription": "wh_49663125136e3b8fa9e8342e",
     "attempt": 1,
     "sent_at_ms": 1790683200000,
     "payload": {
      "record": {
       "v": 1,
       "type": "mirror.trade-reconciliation",
       "shipment_ref": "l:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
       "verdict": "undetermined",
       "cleared": false,
       "undetermined_reason": "insufficient_independence",
       "leg_authentication": {
        "legs": [
         {
          "role": "invoice",
          "kid": "mir-sdk-member-a",
          "state": "authentic"
         }
        ]
       },
       "disclaimer": "sdk vector"
      },
      "proof": {
       "alg": "ES256",
       "kid": "mir-e561ffb9f1eedc00",
       "signature": "NsiaashjD_SLe-LIvE1tf4_hWVCokACZboPdBb5N9JMrz7gpLthtHX4nXllG5huMSS8l57XRUWn0-BAQli56sg",
       "canonicalization": "recursively sorted keys",
       "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
      }
     },
     "disclaimer": "A notification of a signed Mirror record, delivered at least once. Dedupe on id. The payload verifies on its own against the operator JWKS; this envelope only proves who it was sent to and when. Not the record of truth - the ledger is."
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-e561ffb9f1eedc00",
     "signature": "U56lpwhrFFKTF1X65HFZaZlrpzAT3KVuizdLtW9PUcF9gTxX8y1mRVbpsww5YOLka_vmPFm0vWQg7TNa5wHbSA",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "me": "mir-sdk-member-a",
   "now_ms": 1790683201000,
   "seen": [],
   "expect": {
    "ok": true,
    "duplicate": false,
    "event": "verdict.signed",
    "id": "whd_ed5c0454343b70bf467a3adf463e943d"
   }
  },
  {
   "name": "addressed to someone else",
   "body": {
    "record": {
     "v": 1,
     "type": "mirror.webhook-delivery",
     "id": "whd_ed5c0454343b70bf467a3adf463e943d",
     "event": "verdict.signed",
     "to": "mir-sdk-member-a",
     "subscription": "wh_49663125136e3b8fa9e8342e",
     "attempt": 1,
     "sent_at_ms": 1790683200000,
     "payload": {
      "record": {
       "v": 1,
       "type": "mirror.trade-reconciliation",
       "shipment_ref": "l:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
       "verdict": "undetermined",
       "cleared": false,
       "undetermined_reason": "insufficient_independence",
       "leg_authentication": {
        "legs": [
         {
          "role": "invoice",
          "kid": "mir-sdk-member-a",
          "state": "authentic"
         }
        ]
       },
       "disclaimer": "sdk vector"
      },
      "proof": {
       "alg": "ES256",
       "kid": "mir-e561ffb9f1eedc00",
       "signature": "NsiaashjD_SLe-LIvE1tf4_hWVCokACZboPdBb5N9JMrz7gpLthtHX4nXllG5huMSS8l57XRUWn0-BAQli56sg",
       "canonicalization": "recursively sorted keys",
       "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
      }
     },
     "disclaimer": "A notification of a signed Mirror record, delivered at least once. Dedupe on id. The payload verifies on its own against the operator JWKS; this envelope only proves who it was sent to and when. Not the record of truth - the ledger is."
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-e561ffb9f1eedc00",
     "signature": "U56lpwhrFFKTF1X65HFZaZlrpzAT3KVuizdLtW9PUcF9gTxX8y1mRVbpsww5YOLka_vmPFm0vWQg7TNa5wHbSA",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "me": "mir-somebody-else",
   "now_ms": 1790683201000,
   "seen": [],
   "expect": {
    "ok": false,
    "code": "wrong_recipient"
   }
  },
  {
   "name": "signed more than five minutes ago",
   "body": {
    "record": {
     "v": 1,
     "type": "mirror.webhook-delivery",
     "id": "whd_ed5c0454343b70bf467a3adf463e943d",
     "event": "verdict.signed",
     "to": "mir-sdk-member-a",
     "subscription": "wh_49663125136e3b8fa9e8342e",
     "attempt": 1,
     "sent_at_ms": 1790683200000,
     "payload": {
      "record": {
       "v": 1,
       "type": "mirror.trade-reconciliation",
       "shipment_ref": "l:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
       "verdict": "undetermined",
       "cleared": false,
       "undetermined_reason": "insufficient_independence",
       "leg_authentication": {
        "legs": [
         {
          "role": "invoice",
          "kid": "mir-sdk-member-a",
          "state": "authentic"
         }
        ]
       },
       "disclaimer": "sdk vector"
      },
      "proof": {
       "alg": "ES256",
       "kid": "mir-e561ffb9f1eedc00",
       "signature": "NsiaashjD_SLe-LIvE1tf4_hWVCokACZboPdBb5N9JMrz7gpLthtHX4nXllG5huMSS8l57XRUWn0-BAQli56sg",
       "canonicalization": "recursively sorted keys",
       "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
      }
     },
     "disclaimer": "A notification of a signed Mirror record, delivered at least once. Dedupe on id. The payload verifies on its own against the operator JWKS; this envelope only proves who it was sent to and when. Not the record of truth - the ledger is."
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-e561ffb9f1eedc00",
     "signature": "U56lpwhrFFKTF1X65HFZaZlrpzAT3KVuizdLtW9PUcF9gTxX8y1mRVbpsww5YOLka_vmPFm0vWQg7TNa5wHbSA",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "me": "mir-sdk-member-a",
   "now_ms": 1790683560000,
   "seen": [],
   "expect": {
    "ok": false,
    "code": "stale"
   }
  },
  {
   "name": "dated more than a minute ahead",
   "body": {
    "record": {
     "v": 1,
     "type": "mirror.webhook-delivery",
     "id": "whd_ed5c0454343b70bf467a3adf463e943d",
     "event": "verdict.signed",
     "to": "mir-sdk-member-a",
     "subscription": "wh_49663125136e3b8fa9e8342e",
     "attempt": 1,
     "sent_at_ms": 1790683200000,
     "payload": {
      "record": {
       "v": 1,
       "type": "mirror.trade-reconciliation",
       "shipment_ref": "l:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
       "verdict": "undetermined",
       "cleared": false,
       "undetermined_reason": "insufficient_independence",
       "leg_authentication": {
        "legs": [
         {
          "role": "invoice",
          "kid": "mir-sdk-member-a",
          "state": "authentic"
         }
        ]
       },
       "disclaimer": "sdk vector"
      },
      "proof": {
       "alg": "ES256",
       "kid": "mir-e561ffb9f1eedc00",
       "signature": "NsiaashjD_SLe-LIvE1tf4_hWVCokACZboPdBb5N9JMrz7gpLthtHX4nXllG5huMSS8l57XRUWn0-BAQli56sg",
       "canonicalization": "recursively sorted keys",
       "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
      }
     },
     "disclaimer": "A notification of a signed Mirror record, delivered at least once. Dedupe on id. The payload verifies on its own against the operator JWKS; this envelope only proves who it was sent to and when. Not the record of truth - the ledger is."
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-e561ffb9f1eedc00",
     "signature": "U56lpwhrFFKTF1X65HFZaZlrpzAT3KVuizdLtW9PUcF9gTxX8y1mRVbpsww5YOLka_vmPFm0vWQg7TNa5wHbSA",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "me": "mir-sdk-member-a",
   "now_ms": 1790683080000,
   "seen": [],
   "expect": {
    "ok": false,
    "code": "from_the_future"
   }
  },
  {
   "name": "already seen: acknowledged as a duplicate",
   "body": {
    "record": {
     "v": 1,
     "type": "mirror.webhook-delivery",
     "id": "whd_ed5c0454343b70bf467a3adf463e943d",
     "event": "verdict.signed",
     "to": "mir-sdk-member-a",
     "subscription": "wh_49663125136e3b8fa9e8342e",
     "attempt": 1,
     "sent_at_ms": 1790683200000,
     "payload": {
      "record": {
       "v": 1,
       "type": "mirror.trade-reconciliation",
       "shipment_ref": "l:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
       "verdict": "undetermined",
       "cleared": false,
       "undetermined_reason": "insufficient_independence",
       "leg_authentication": {
        "legs": [
         {
          "role": "invoice",
          "kid": "mir-sdk-member-a",
          "state": "authentic"
         }
        ]
       },
       "disclaimer": "sdk vector"
      },
      "proof": {
       "alg": "ES256",
       "kid": "mir-e561ffb9f1eedc00",
       "signature": "NsiaashjD_SLe-LIvE1tf4_hWVCokACZboPdBb5N9JMrz7gpLthtHX4nXllG5huMSS8l57XRUWn0-BAQli56sg",
       "canonicalization": "recursively sorted keys",
       "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
      }
     },
     "disclaimer": "A notification of a signed Mirror record, delivered at least once. Dedupe on id. The payload verifies on its own against the operator JWKS; this envelope only proves who it was sent to and when. Not the record of truth - the ledger is."
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-e561ffb9f1eedc00",
     "signature": "U56lpwhrFFKTF1X65HFZaZlrpzAT3KVuizdLtW9PUcF9gTxX8y1mRVbpsww5YOLka_vmPFm0vWQg7TNa5wHbSA",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "me": "mir-sdk-member-a",
   "now_ms": 1790683201000,
   "seen": [
    "whd_ed5c0454343b70bf467a3adf463e943d"
   ],
   "expect": {
    "ok": true,
    "duplicate": true,
    "event": "verdict.signed",
    "id": "whd_ed5c0454343b70bf467a3adf463e943d"
   }
  },
  {
   "name": "an id that does not derive from its subscription and record",
   "body": {
    "record": {
     "v": 1,
     "type": "mirror.webhook-delivery",
     "id": "whd_00000000000000000000000000000000",
     "event": "verdict.signed",
     "to": "mir-sdk-member-a",
     "subscription": "wh_49663125136e3b8fa9e8342e",
     "attempt": 1,
     "sent_at_ms": 1790683200000,
     "payload": {
      "record": {
       "v": 1,
       "type": "mirror.trade-reconciliation",
       "shipment_ref": "l:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
       "verdict": "undetermined",
       "cleared": false,
       "undetermined_reason": "insufficient_independence",
       "leg_authentication": {
        "legs": [
         {
          "role": "invoice",
          "kid": "mir-sdk-member-a",
          "state": "authentic"
         }
        ]
       },
       "disclaimer": "sdk vector"
      },
      "proof": {
       "alg": "ES256",
       "kid": "mir-e561ffb9f1eedc00",
       "signature": "NsiaashjD_SLe-LIvE1tf4_hWVCokACZboPdBb5N9JMrz7gpLthtHX4nXllG5huMSS8l57XRUWn0-BAQli56sg",
       "canonicalization": "recursively sorted keys",
       "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
      }
     },
     "disclaimer": "A notification of a signed Mirror record, delivered at least once. Dedupe on id. The payload verifies on its own against the operator JWKS; this envelope only proves who it was sent to and when. Not the record of truth - the ledger is."
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-e561ffb9f1eedc00",
     "signature": "UamUfHkhdI8a0ko6C8X2ThHFYKxp2mIPAaG3_LTo-00iV06OPMa3IbLiCnSg9-VFihLQFVvPvraQgciioWRTZg",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "me": "mir-sdk-member-a",
   "now_ms": 1790683201000,
   "seen": [],
   "expect": {
    "ok": false,
    "code": "bad_id"
   }
  },
  {
   "name": "a payload altered, envelope re-signed",
   "body": {
    "record": {
     "v": 1,
     "type": "mirror.webhook-delivery",
     "id": "whd_ed5c0454343b70bf467a3adf463e943d",
     "event": "verdict.signed",
     "to": "mir-sdk-member-a",
     "subscription": "wh_49663125136e3b8fa9e8342e",
     "attempt": 1,
     "sent_at_ms": 1790683200000,
     "payload": {
      "record": {
       "v": 1,
       "type": "mirror.trade-reconciliation",
       "shipment_ref": "l:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
       "verdict": "reconciled",
       "cleared": false,
       "undetermined_reason": "insufficient_independence",
       "leg_authentication": {
        "legs": [
         {
          "role": "invoice",
          "kid": "mir-sdk-member-a",
          "state": "authentic"
         }
        ]
       },
       "disclaimer": "sdk vector"
      },
      "proof": {
       "alg": "ES256",
       "kid": "mir-e561ffb9f1eedc00",
       "signature": "NsiaashjD_SLe-LIvE1tf4_hWVCokACZboPdBb5N9JMrz7gpLthtHX4nXllG5huMSS8l57XRUWn0-BAQli56sg",
       "canonicalization": "recursively sorted keys",
       "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
      }
     },
     "disclaimer": "A notification of a signed Mirror record, delivered at least once. Dedupe on id. The payload verifies on its own against the operator JWKS; this envelope only proves who it was sent to and when. Not the record of truth - the ledger is."
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-e561ffb9f1eedc00",
     "signature": "Fbg46DehfNsRdwQswHsL6SHGCbjMJuNRwTm5_r9YAMAWCqtGFvcWmuz7OaU0sE6rIaBWf1WhZKpMh29CeRyL1g",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "me": "mir-sdk-member-a",
   "now_ms": 1790683201000,
   "seen": [],
   "expect": {
    "ok": false,
    "code": "bad_payload"
   }
  },
  {
   "name": "no receiver identity given",
   "body": {
    "record": {
     "v": 1,
     "type": "mirror.webhook-delivery",
     "id": "whd_ed5c0454343b70bf467a3adf463e943d",
     "event": "verdict.signed",
     "to": "mir-sdk-member-a",
     "subscription": "wh_49663125136e3b8fa9e8342e",
     "attempt": 1,
     "sent_at_ms": 1790683200000,
     "payload": {
      "record": {
       "v": 1,
       "type": "mirror.trade-reconciliation",
       "shipment_ref": "l:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
       "verdict": "undetermined",
       "cleared": false,
       "undetermined_reason": "insufficient_independence",
       "leg_authentication": {
        "legs": [
         {
          "role": "invoice",
          "kid": "mir-sdk-member-a",
          "state": "authentic"
         }
        ]
       },
       "disclaimer": "sdk vector"
      },
      "proof": {
       "alg": "ES256",
       "kid": "mir-e561ffb9f1eedc00",
       "signature": "NsiaashjD_SLe-LIvE1tf4_hWVCokACZboPdBb5N9JMrz7gpLthtHX4nXllG5huMSS8l57XRUWn0-BAQli56sg",
       "canonicalization": "recursively sorted keys",
       "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
      }
     },
     "disclaimer": "A notification of a signed Mirror record, delivered at least once. Dedupe on id. The payload verifies on its own against the operator JWKS; this envelope only proves who it was sent to and when. Not the record of truth - the ledger is."
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-e561ffb9f1eedc00",
     "signature": "U56lpwhrFFKTF1X65HFZaZlrpzAT3KVuizdLtW9PUcF9gTxX8y1mRVbpsww5YOLka_vmPFm0vWQg7TNa5wHbSA",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "me": "",
   "now_ms": 1790683201000,
   "seen": [],
   "expect": {
    "ok": false,
    "code": "no_audience_check"
   }
  },
  {
   "name": "no replay guard given",
   "body": {
    "record": {
     "v": 1,
     "type": "mirror.webhook-delivery",
     "id": "whd_ed5c0454343b70bf467a3adf463e943d",
     "event": "verdict.signed",
     "to": "mir-sdk-member-a",
     "subscription": "wh_49663125136e3b8fa9e8342e",
     "attempt": 1,
     "sent_at_ms": 1790683200000,
     "payload": {
      "record": {
       "v": 1,
       "type": "mirror.trade-reconciliation",
       "shipment_ref": "l:cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc",
       "verdict": "undetermined",
       "cleared": false,
       "undetermined_reason": "insufficient_independence",
       "leg_authentication": {
        "legs": [
         {
          "role": "invoice",
          "kid": "mir-sdk-member-a",
          "state": "authentic"
         }
        ]
       },
       "disclaimer": "sdk vector"
      },
      "proof": {
       "alg": "ES256",
       "kid": "mir-e561ffb9f1eedc00",
       "signature": "NsiaashjD_SLe-LIvE1tf4_hWVCokACZboPdBb5N9JMrz7gpLthtHX4nXllG5huMSS8l57XRUWn0-BAQli56sg",
       "canonicalization": "recursively sorted keys",
       "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
      }
     },
     "disclaimer": "A notification of a signed Mirror record, delivered at least once. Dedupe on id. The payload verifies on its own against the operator JWKS; this envelope only proves who it was sent to and when. Not the record of truth - the ledger is."
    },
    "proof": {
     "alg": "ES256",
     "kid": "mir-e561ffb9f1eedc00",
     "signature": "U56lpwhrFFKTF1X65HFZaZlrpzAT3KVuizdLtW9PUcF9gTxX8y1mRVbpsww5YOLka_vmPFm0vWQg7TNa5wHbSA",
     "canonicalization": "recursively sorted keys",
     "note": "ES256 over the record as canonical JSON (recursively sorted keys). Verify offline against the published JWKS by matching proof.kid; no database, no network."
    }
   },
   "me": "mir-sdk-member-a",
   "now_ms": 1790683201000,
   "seen": null,
   "expect": {
    "ok": false,
    "code": "no_replay_guard"
   }
  },
  {
   "name": "not a delivery at all",
   "body": {
    "hello": "world"
   },
   "me": "mir-sdk-member-a",
   "now_ms": 1790683201000,
   "seen": [],
   "expect": {
    "ok": false,
    "code": "malformed"
   }
  }
 ],
 "residency": [
  {
   "name": "eu, runtime-observed",
   "record": {
    "v": 1,
    "type": "mirror.residency",
    "at": "2026-09-29T12:00:00.000Z",
    "processing": {
     "platform": "cloudflare durable object",
     "jurisdiction": "eu",
     "evidence": "runtime",
     "observed_colo": "FRA"
    },
    "storage": {
     "platform": "supabase",
     "region": "eu-central-1",
     "jurisdiction": "eu",
     "evidence": "declared"
    },
    "edge": {
     "colo": null,
     "body_read_at_edge": null,
     "note": "The Cloudflare data centre that first receives a request can be anywhere; it forwards the request to the processing location without reading the body. Pinning that hop needs Cloudflare Regional Services, which this rail does not use."
    },
    "commitment": "Processing and storage of everything this operator receives are in the EU jurisdiction; processing is enforced by the platform and observed at runtime.",
    "not_covered": [
     "the first edge hop (TLS termination and forwarding) can be outside the jurisdiction",
     "Cloudflare logs a Durable Object id outside its jurisdiction for billing and debugging",
     "storage residency is declared by the database project's region, not observed at runtime",
     "a member's own systems, the bander and anything a member sends elsewhere"
    ],
    "disclaimer": "The operator's signed statement of where it processes and stores what it receives. Processing is observed at runtime only where evidence says runtime; storage is declared. It is not an audit of the hosting providers, and it does not cover the first edge hop, which can be anywhere."
   },
   "jurisdiction": "eu",
   "expect": {
    "ok": true,
    "reasons": []
   }
  },
  {
   "name": "eu, only declared",
   "record": {
    "v": 1,
    "type": "mirror.residency",
    "at": "2026-09-29T12:00:00.000Z",
    "processing": {
     "platform": "node",
     "jurisdiction": "eu",
     "evidence": "declared",
     "observed_colo": null
    },
    "storage": {
     "platform": null,
     "region": null,
     "jurisdiction": "eu",
     "evidence": "declared"
    },
    "edge": {
     "colo": null,
     "body_read_at_edge": null,
     "note": "The Cloudflare data centre that first receives a request can be anywhere; it forwards the request to the processing location without reading the body. Pinning that hop needs Cloudflare Regional Services, which this rail does not use."
    },
    "commitment": "No residency commitment: processing and storage are not both pinned to one jurisdiction with processing observed at runtime.",
    "not_covered": [
     "the first edge hop (TLS termination and forwarding) can be outside the jurisdiction",
     "Cloudflare logs a Durable Object id outside its jurisdiction for billing and debugging",
     "storage residency is declared by the database project's region, not observed at runtime",
     "a member's own systems, the bander and anything a member sends elsewhere"
    ],
    "disclaimer": "The operator's signed statement of where it processes and stores what it receives. Processing is observed at runtime only where evidence says runtime; storage is declared. It is not an audit of the hosting providers, and it does not cover the first edge hop, which can be anywhere."
   },
   "jurisdiction": "eu",
   "expect": {
    "ok": false,
    "reasons": [
     "processing in eu is only declared, not observed at runtime"
    ]
   }
  },
  {
   "name": "nothing pinned",
   "record": {
    "v": 1,
    "type": "mirror.residency",
    "at": "2026-09-29T12:00:00.000Z",
    "processing": {
     "platform": null,
     "jurisdiction": null,
     "evidence": "none",
     "observed_colo": null
    },
    "storage": {
     "platform": null,
     "region": null,
     "jurisdiction": null,
     "evidence": "none"
    },
    "edge": {
     "colo": null,
     "body_read_at_edge": null,
     "note": "The Cloudflare data centre that first receives a request can be anywhere; it forwards the request to the processing location without reading the body. Pinning that hop needs Cloudflare Regional Services, which this rail does not use."
    },
    "commitment": "No residency commitment: processing and storage are not both pinned to one jurisdiction with processing observed at runtime.",
    "not_covered": [
     "the first edge hop (TLS termination and forwarding) can be outside the jurisdiction",
     "Cloudflare logs a Durable Object id outside its jurisdiction for billing and debugging",
     "storage residency is declared by the database project's region, not observed at runtime",
     "a member's own systems, the bander and anything a member sends elsewhere"
    ],
    "disclaimer": "The operator's signed statement of where it processes and stores what it receives. Processing is observed at runtime only where evidence says runtime; storage is declared. It is not an audit of the hosting providers, and it does not cover the first edge hop, which can be anywhere."
   },
   "jurisdiction": "eu",
   "expect": {
    "ok": false,
    "reasons": [
     "processing is not pinned to any jurisdiction",
     "storage is not pinned to any jurisdiction"
    ]
   }
  },
  {
   "name": "asked about another jurisdiction",
   "record": {
    "v": 1,
    "type": "mirror.residency",
    "at": "2026-09-29T12:00:00.000Z",
    "processing": {
     "platform": "cloudflare durable object",
     "jurisdiction": "eu",
     "evidence": "runtime",
     "observed_colo": "FRA"
    },
    "storage": {
     "platform": "supabase",
     "region": "eu-central-1",
     "jurisdiction": "eu",
     "evidence": "declared"
    },
    "edge": {
     "colo": null,
     "body_read_at_edge": null,
     "note": "The Cloudflare data centre that first receives a request can be anywhere; it forwards the request to the processing location without reading the body. Pinning that hop needs Cloudflare Regional Services, which this rail does not use."
    },
    "commitment": "Processing and storage of everything this operator receives are in the EU jurisdiction; processing is enforced by the platform and observed at runtime.",
    "not_covered": [
     "the first edge hop (TLS termination and forwarding) can be outside the jurisdiction",
     "Cloudflare logs a Durable Object id outside its jurisdiction for billing and debugging",
     "storage residency is declared by the database project's region, not observed at runtime",
     "a member's own systems, the bander and anything a member sends elsewhere"
    ],
    "disclaimer": "The operator's signed statement of where it processes and stores what it receives. Processing is observed at runtime only where evidence says runtime; storage is declared. It is not an audit of the hosting providers, and it does not cover the first edge hop, which can be anywhere."
   },
   "jurisdiction": "us",
   "expect": {
    "ok": false,
    "reasons": [
     "processing is in eu",
     "storage is in eu"
    ]
   }
  },
  {
   "name": "an unknown jurisdiction",
   "record": {
    "v": 1,
    "type": "mirror.residency",
    "at": "2026-09-29T12:00:00.000Z",
    "processing": {
     "platform": "cloudflare durable object",
     "jurisdiction": "eu",
     "evidence": "runtime",
     "observed_colo": "FRA"
    },
    "storage": {
     "platform": "supabase",
     "region": "eu-central-1",
     "jurisdiction": "eu",
     "evidence": "declared"
    },
    "edge": {
     "colo": null,
     "body_read_at_edge": null,
     "note": "The Cloudflare data centre that first receives a request can be anywhere; it forwards the request to the processing location without reading the body. Pinning that hop needs Cloudflare Regional Services, which this rail does not use."
    },
    "commitment": "Processing and storage of everything this operator receives are in the EU jurisdiction; processing is enforced by the platform and observed at runtime.",
    "not_covered": [
     "the first edge hop (TLS termination and forwarding) can be outside the jurisdiction",
     "Cloudflare logs a Durable Object id outside its jurisdiction for billing and debugging",
     "storage residency is declared by the database project's region, not observed at runtime",
     "a member's own systems, the bander and anything a member sends elsewhere"
    ],
    "disclaimer": "The operator's signed statement of where it processes and stores what it receives. Processing is observed at runtime only where evidence says runtime; storage is declared. It is not an audit of the hosting providers, and it does not cover the first edge hop, which can be anywhere."
   },
   "jurisdiction": "mars",
   "expect": {
    "ok": false,
    "reasons": [
     "unknown jurisdiction 'mars' (known: eu, us, fedramp)"
    ]
   }
  }
 ]
}
