@7h3/protocol 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/index.js +1 -0
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -2432,6 +2432,7 @@ async function Gn(e, t) {
2432
2432
  let e = await t.replayCache.consume(n.envelope, r);
2433
2433
  if (!e.ok) throw Error(e.reason ?? "Queue message replay detected");
2434
2434
  }
2435
+ if ((typeof n.payload == "string" ? n.payload : JSON.stringify(n.payload)) !== n.envelope.body.content) throw Error("Queue message payload does not match the signed content — the payload field was modified in transit");
2435
2436
  return {
2436
2437
  payload: n.payload,
2437
2438
  envelope: n.envelope
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@7h3/protocol",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "7h3 Protocol: deterministic, signed, replay-safe AI-to-AI message envelopes (wire 7h3/0.1).",
5
5
  "type": "module",
6
6
  "main": "./index.js",