@tinycloud/sdk-core 2.11.0-beta.1 → 2.11.0-beta.10

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.
@@ -1383,13 +1383,12 @@ function digest(input, options) {
1383
1383
  }
1384
1384
  var identity2 = { code, name, encode: encode4, digest };
1385
1385
 
1386
- // ../../node_modules/multiformats/dist/src/hashes/sha2.js
1387
- var sha2_exports = {};
1388
- __export(sha2_exports, {
1386
+ // ../../node_modules/multiformats/dist/src/hashes/sha2-browser.js
1387
+ var sha2_browser_exports = {};
1388
+ __export(sha2_browser_exports, {
1389
1389
  sha256: () => sha2562,
1390
1390
  sha512: () => sha512
1391
1391
  });
1392
- import crypto from "crypto";
1393
1392
 
1394
1393
  // ../../node_modules/multiformats/dist/src/hashes/hasher.js
1395
1394
  var DEFAULT_MIN_DIGEST_LENGTH = 20;
@@ -1439,16 +1438,19 @@ function createDigest(digest2, code2, truncate) {
1439
1438
  return create(code2, digest2);
1440
1439
  }
1441
1440
 
1442
- // ../../node_modules/multiformats/dist/src/hashes/sha2.js
1441
+ // ../../node_modules/multiformats/dist/src/hashes/sha2-browser.js
1442
+ function sha(name2) {
1443
+ return async (data) => new Uint8Array(await crypto.subtle.digest(name2, data));
1444
+ }
1443
1445
  var sha2562 = from2({
1444
1446
  name: "sha2-256",
1445
1447
  code: 18,
1446
- encode: (input) => coerce(crypto.createHash("sha256").update(input).digest())
1448
+ encode: sha("SHA-256")
1447
1449
  });
1448
1450
  var sha512 = from2({
1449
1451
  name: "sha2-512",
1450
1452
  code: 19,
1451
- encode: (input) => coerce(crypto.createHash("sha512").update(input).digest())
1453
+ encode: sha("SHA-512")
1452
1454
  });
1453
1455
 
1454
1456
  // ../../node_modules/multiformats/dist/src/cid.js
@@ -1790,7 +1792,7 @@ var cidSymbol = /* @__PURE__ */ Symbol.for("@ipld/js-cid/CID");
1790
1792
 
1791
1793
  // ../../node_modules/multiformats/dist/src/basics.js
1792
1794
  var bases = { ...identity_exports, ...base2_exports, ...base8_exports, ...base10_exports, ...base16_exports, ...base32_exports, ...base36_exports, ...base58_exports, ...base64_exports, ...base256emoji_exports };
1793
- var hashes = { ...sha2_exports, ...identity_exports2 };
1795
+ var hashes = { ...sha2_browser_exports, ...identity_exports2 };
1794
1796
 
1795
1797
  // src/policy/signed-object.ts
1796
1798
  import { bytesToHex as bytesToHex2, sha256 as sha2563, verifyMessage } from "viem";