@atbash/sdk 0.8.0-dev.0 → 0.9.0-dev.0

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/dist/index.mjs CHANGED
@@ -43892,6 +43892,15 @@ function encryptedLength(plaintextByteLength) {
43892
43892
  // src-ts/encrypted-toolcall.ts
43893
43893
  var { Buffer: PolyBuffer, gtx: pcgtx } = index;
43894
43894
  var MERKLE_HASH_VERSION = 2;
43895
+ function claimHashHex(toolName, action, context, toolArgsJson) {
43896
+ const canonical = JSON.stringify([
43897
+ toolName.trim(),
43898
+ normalizeActionForHash(action),
43899
+ context.trim(),
43900
+ toolArgsJson.trim()
43901
+ ]);
43902
+ return bytesToHex2(sha256(new TextEncoder().encode(canonical)));
43903
+ }
43895
43904
  function normalizeActionForHash(action) {
43896
43905
  action = action.trim();
43897
43906
  try {
@@ -43954,7 +43963,15 @@ function signEncryptedToolCall(toolCallId, action, context, toolName, toolArgsJs
43954
43963
  );
43955
43964
  return signOpWithBytes(
43956
43965
  "log_encrypted_tool_call",
43957
- [toolCallId, toolName, contentCipher, actionHash],
43966
+ [
43967
+ toolCallId,
43968
+ toolName,
43969
+ contentCipher,
43970
+ actionHash,
43971
+ // Empty = "the org's current key"; the chain resolves it.
43972
+ PolyBuffer.from(new Uint8Array(0)),
43973
+ claimHashHex(toolName, action, context, toolArgsJson)
43974
+ ],
43958
43975
  privkeyHex,
43959
43976
  blockchainRidHex
43960
43977
  );
@@ -46121,6 +46138,7 @@ export {
46121
46138
  MemoryIntegrityError,
46122
46139
  PointerStore,
46123
46140
  SignatureVerificationError,
46141
+ claimHashHex,
46124
46142
  classifyMemoryRead,
46125
46143
  classifyMemoryWrite,
46126
46144
  commitMemoryVersion,