| Algorithm 4 Merkle-Batch Audit Anchoring | |
| Require: evidence queue , batch size B, flush interval | |
| 1: while gateway is running do | |
| 2: collect into buffer | |
| 3: if or elapsed then | |
| 4: MerkleRoot | |
| 5: Sign | |
| 6: SubmitAsync | ▹ non-blocking; edge path never waits |
| 7: persist and proofs off-chain; | |
| 8: end if | |
| 9: end while | |