@hesohq/verify-wasm 0.5.1-dev.110 → 0.5.1-dev.115

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.
package/heso_wasm.d.ts CHANGED
@@ -409,6 +409,18 @@ export function approvalTokenFrame(nonce: Uint8Array, expiry_unix_secs: bigint,
409
409
  */
410
410
  export function approvalTokenPayload(content_json: string, nonce: Uint8Array, expiry_unix_secs: bigint, decision: string, scope: string): Uint8Array;
411
411
 
412
+ /**
413
+ * BLAKE3 (64 lowercase hex) of the RAW input bytes — the result-hash primitive,
414
+ * matching the Node SDK's `blake3Hex`. Unlike `contentHash`/`anchoredContentHash`
415
+ * this does NOT canonicalize: it hashes exactly the bytes given. wasm-bindgen maps
416
+ * a JS `Uint8Array` to `&[u8]`, so the web passes UTF-8-encoded text or raw file
417
+ * bytes. Used by the visual-replay verifier to reproduce the recorder's
418
+ * `blake3(rawFileBytes)` recipe / action-map fingerprint in the browser.
419
+ * Never panics (BLAKE3 accepts any slice, including empty); allocation is bounded
420
+ * by the input plus a fixed 64-byte hex string.
421
+ */
422
+ export function blake3Hex(bytes: Uint8Array): string;
423
+
412
424
  /**
413
425
  * Compute a domain-separated BLAKE3 chain-link digest from two 64-hex hashes.
414
426
  * Replaces the `@noble`-backed chain helper in `crypto.ts`.
@@ -768,6 +780,7 @@ export interface InitOutput {
768
780
  readonly quorumCosignPayload: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
769
781
  readonly contentHash: (a: number, b: number, c: number) => void;
770
782
  readonly anchoredContentHash: (a: number, b: number, c: number) => void;
783
+ readonly blake3Hex: (a: number, b: number, c: number) => void;
771
784
  readonly shortHash: (a: number, b: number, c: number, d: number, e: number) => void;
772
785
  readonly chainHashHex: (a: number, b: number, c: number, d: number, e: number) => void;
773
786
  readonly verifyApprovalToken: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
package/heso_wasm.js CHANGED
@@ -1353,6 +1353,37 @@ export function approvalTokenPayload(content_json, nonce, expiry_unix_secs, deci
1353
1353
  }
1354
1354
  }
1355
1355
 
1356
+ /**
1357
+ * BLAKE3 (64 lowercase hex) of the RAW input bytes — the result-hash primitive,
1358
+ * matching the Node SDK's `blake3Hex`. Unlike `contentHash`/`anchoredContentHash`
1359
+ * this does NOT canonicalize: it hashes exactly the bytes given. wasm-bindgen maps
1360
+ * a JS `Uint8Array` to `&[u8]`, so the web passes UTF-8-encoded text or raw file
1361
+ * bytes. Used by the visual-replay verifier to reproduce the recorder's
1362
+ * `blake3(rawFileBytes)` recipe / action-map fingerprint in the browser.
1363
+ * Never panics (BLAKE3 accepts any slice, including empty); allocation is bounded
1364
+ * by the input plus a fixed 64-byte hex string.
1365
+ * @param {Uint8Array} bytes
1366
+ * @returns {string}
1367
+ */
1368
+ export function blake3Hex(bytes) {
1369
+ let deferred2_0;
1370
+ let deferred2_1;
1371
+ try {
1372
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
1373
+ const ptr0 = passArray8ToWasm0(bytes, wasm.__wbindgen_export);
1374
+ const len0 = WASM_VECTOR_LEN;
1375
+ wasm.blake3Hex(retptr, ptr0, len0);
1376
+ var r0 = getDataViewMemory0().getInt32(retptr + 4 * 0, true);
1377
+ var r1 = getDataViewMemory0().getInt32(retptr + 4 * 1, true);
1378
+ deferred2_0 = r0;
1379
+ deferred2_1 = r1;
1380
+ return getStringFromWasm0(r0, r1);
1381
+ } finally {
1382
+ wasm.__wbindgen_add_to_stack_pointer(16);
1383
+ wasm.__wbindgen_export3(deferred2_0, deferred2_1, 1);
1384
+ }
1385
+ }
1386
+
1356
1387
  /**
1357
1388
  * Compute a domain-separated BLAKE3 chain-link digest from two 64-hex hashes.
1358
1389
  * Replaces the `@noble`-backed chain helper in `crypto.ts`.
package/heso_wasm_bg.wasm CHANGED
Binary file
@@ -37,6 +37,7 @@ export const l1CosignPayload: (a: number, b: number, c: number, d: number, e: nu
37
37
  export const quorumCosignPayload: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number) => void;
38
38
  export const contentHash: (a: number, b: number, c: number) => void;
39
39
  export const anchoredContentHash: (a: number, b: number, c: number) => void;
40
+ export const blake3Hex: (a: number, b: number, c: number) => void;
40
41
  export const shortHash: (a: number, b: number, c: number, d: number, e: number) => void;
41
42
  export const chainHashHex: (a: number, b: number, c: number, d: number, e: number) => void;
42
43
  export const verifyApprovalToken: (a: number, b: number, c: number, d: number, e: number, f: number, g: number, h: number, i: number, j: number, k: number, l: number) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hesohq/verify-wasm",
3
- "version": "0.5.1-dev.110",
3
+ "version": "0.5.1-dev.115",
4
4
  "description": "HESO Enterprise trust layer — browser WASM verify-only surface (ESM)",
5
5
  "type": "module",
6
6
  "scripts": {