@tinycloud/sdk-core 2.11.0-beta.8 → 2.11.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.
@@ -1706,13 +1706,12 @@ function digest(input, options) {
1706
1706
  }
1707
1707
  var identity2 = { code, name, encode: encode4, digest };
1708
1708
 
1709
- // ../../node_modules/multiformats/dist/src/hashes/sha2.js
1710
- var sha2_exports = {};
1711
- __export(sha2_exports, {
1709
+ // ../../node_modules/multiformats/dist/src/hashes/sha2-browser.js
1710
+ var sha2_browser_exports = {};
1711
+ __export(sha2_browser_exports, {
1712
1712
  sha256: () => sha2562,
1713
1713
  sha512: () => sha512
1714
1714
  });
1715
- import crypto from "crypto";
1716
1715
 
1717
1716
  // ../../node_modules/multiformats/dist/src/hashes/hasher.js
1718
1717
  var DEFAULT_MIN_DIGEST_LENGTH = 20;
@@ -1762,27 +1761,30 @@ function createDigest(digest2, code2, truncate) {
1762
1761
  return create(code2, digest2);
1763
1762
  }
1764
1763
 
1765
- // ../../node_modules/multiformats/dist/src/hashes/sha2.js
1764
+ // ../../node_modules/multiformats/dist/src/hashes/sha2-browser.js
1765
+ function sha(name2) {
1766
+ return async (data) => new Uint8Array(await crypto.subtle.digest(name2, data));
1767
+ }
1766
1768
  var sha2562 = from2({
1767
1769
  name: "sha2-256",
1768
1770
  code: 18,
1769
- encode: (input) => coerce(crypto.createHash("sha256").update(input).digest())
1771
+ encode: sha("SHA-256")
1770
1772
  });
1771
1773
  var sha512 = from2({
1772
1774
  name: "sha2-512",
1773
1775
  code: 19,
1774
- encode: (input) => coerce(crypto.createHash("sha512").update(input).digest())
1776
+ encode: sha("SHA-512")
1775
1777
  });
1776
1778
 
1777
1779
  // ../../node_modules/multiformats/dist/src/basics.js
1778
1780
  var bases = { ...identity_exports, ...base2_exports, ...base8_exports, ...base10_exports, ...base16_exports, ...base32_exports, ...base36_exports, ...base58_exports, ...base64_exports, ...base256emoji_exports };
1779
- var hashes = { ...sha2_exports, ...identity_exports2 };
1781
+ var hashes = { ...sha2_browser_exports, ...identity_exports2 };
1780
1782
 
1781
1783
  // src/policy/signed-object.ts
1782
1784
  import { bytesToHex as bytesToHex2, sha256 as sha2563, verifyMessage } from "viem";
1783
1785
 
1784
1786
  // src/identity.ts
1785
- import { getAddress, isAddress } from "viem";
1787
+ import { getAddress, isAddress, recoverMessageAddress } from "viem";
1786
1788
  var IdentityParseError = class extends Error {
1787
1789
  constructor(message) {
1788
1790
  super(message);