@tinycloud/sdk-core 2.11.0-beta.8 → 2.11.0-beta.9

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.
@@ -2153,13 +2153,12 @@ function digest(input, options) {
2153
2153
  }
2154
2154
  var identity2 = { code: code2, name, encode: encode4, digest };
2155
2155
 
2156
- // ../../node_modules/multiformats/dist/src/hashes/sha2.js
2157
- var sha2_exports = {};
2158
- __export(sha2_exports, {
2156
+ // ../../node_modules/multiformats/dist/src/hashes/sha2-browser.js
2157
+ var sha2_browser_exports = {};
2158
+ __export(sha2_browser_exports, {
2159
2159
  sha256: () => sha256,
2160
2160
  sha512: () => sha512
2161
2161
  });
2162
- import crypto2 from "crypto";
2163
2162
 
2164
2163
  // ../../node_modules/multiformats/dist/src/hashes/hasher.js
2165
2164
  var DEFAULT_MIN_DIGEST_LENGTH = 20;
@@ -2209,16 +2208,19 @@ function createDigest(digest4, code3, truncate) {
2209
2208
  return create(code3, digest4);
2210
2209
  }
2211
2210
 
2212
- // ../../node_modules/multiformats/dist/src/hashes/sha2.js
2211
+ // ../../node_modules/multiformats/dist/src/hashes/sha2-browser.js
2212
+ function sha(name2) {
2213
+ return async (data) => new Uint8Array(await crypto.subtle.digest(name2, data));
2214
+ }
2213
2215
  var sha256 = from2({
2214
2216
  name: "sha2-256",
2215
2217
  code: 18,
2216
- encode: (input) => coerce(crypto2.createHash("sha256").update(input).digest())
2218
+ encode: sha("SHA-256")
2217
2219
  });
2218
2220
  var sha512 = from2({
2219
2221
  name: "sha2-512",
2220
2222
  code: 19,
2221
- encode: (input) => coerce(crypto2.createHash("sha512").update(input).digest())
2223
+ encode: sha("SHA-512")
2222
2224
  });
2223
2225
 
2224
2226
  // ../../node_modules/multiformats/dist/src/cid.js
@@ -2560,7 +2562,7 @@ var cidSymbol = /* @__PURE__ */ Symbol.for("@ipld/js-cid/CID");
2560
2562
 
2561
2563
  // ../../node_modules/multiformats/dist/src/basics.js
2562
2564
  var bases = { ...identity_exports, ...base2_exports, ...base8_exports, ...base10_exports, ...base16_exports, ...base32_exports, ...base36_exports, ...base58_exports, ...base64_exports, ...base256emoji_exports };
2563
- var hashes = { ...sha2_exports, ...identity_exports2 };
2565
+ var hashes = { ...sha2_browser_exports, ...identity_exports2 };
2564
2566
 
2565
2567
  // src/delegations/SharingService.ts
2566
2568
  import { ed25519 as ed255193 } from "@noble/curves/ed25519";