@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.
@@ -1,9 +1,7 @@
1
1
  "use strict";
2
- var __create = Object.create;
3
2
  var __defProp = Object.defineProperty;
4
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
4
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
5
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
6
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
9
7
  var __export = (target, all) => {
@@ -18,14 +16,6 @@ var __copyProps = (to, from3, except, desc) => {
18
16
  }
19
17
  return to;
20
18
  };
21
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
- // If the importer is in node compatibility mode or this is not an ESM
23
- // file that has been converted to a CommonJS file using a Babel-
24
- // compatible transform (i.e. "__esModule" has not been set), then set
25
- // "default" to the CommonJS "module.exports" for node compatibility.
26
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
- mod
28
- ));
29
19
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
20
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
31
21
 
@@ -1465,13 +1455,12 @@ function digest(input, options) {
1465
1455
  }
1466
1456
  var identity2 = { code, name, encode: encode4, digest };
1467
1457
 
1468
- // ../../node_modules/multiformats/dist/src/hashes/sha2.js
1469
- var sha2_exports = {};
1470
- __export(sha2_exports, {
1458
+ // ../../node_modules/multiformats/dist/src/hashes/sha2-browser.js
1459
+ var sha2_browser_exports = {};
1460
+ __export(sha2_browser_exports, {
1471
1461
  sha256: () => sha2562,
1472
1462
  sha512: () => sha512
1473
1463
  });
1474
- var import_crypto = __toESM(require("crypto"), 1);
1475
1464
 
1476
1465
  // ../../node_modules/multiformats/dist/src/hashes/hasher.js
1477
1466
  var DEFAULT_MIN_DIGEST_LENGTH = 20;
@@ -1521,16 +1510,19 @@ function createDigest(digest2, code2, truncate) {
1521
1510
  return create(code2, digest2);
1522
1511
  }
1523
1512
 
1524
- // ../../node_modules/multiformats/dist/src/hashes/sha2.js
1513
+ // ../../node_modules/multiformats/dist/src/hashes/sha2-browser.js
1514
+ function sha(name2) {
1515
+ return async (data) => new Uint8Array(await crypto.subtle.digest(name2, data));
1516
+ }
1525
1517
  var sha2562 = from2({
1526
1518
  name: "sha2-256",
1527
1519
  code: 18,
1528
- encode: (input) => coerce(import_crypto.default.createHash("sha256").update(input).digest())
1520
+ encode: sha("SHA-256")
1529
1521
  });
1530
1522
  var sha512 = from2({
1531
1523
  name: "sha2-512",
1532
1524
  code: 19,
1533
- encode: (input) => coerce(import_crypto.default.createHash("sha512").update(input).digest())
1525
+ encode: sha("SHA-512")
1534
1526
  });
1535
1527
 
1536
1528
  // ../../node_modules/multiformats/dist/src/cid.js
@@ -1872,7 +1864,7 @@ var cidSymbol = /* @__PURE__ */ Symbol.for("@ipld/js-cid/CID");
1872
1864
 
1873
1865
  // ../../node_modules/multiformats/dist/src/basics.js
1874
1866
  var bases = { ...identity_exports, ...base2_exports, ...base8_exports, ...base10_exports, ...base16_exports, ...base32_exports, ...base36_exports, ...base58_exports, ...base64_exports, ...base256emoji_exports };
1875
- var hashes = { ...sha2_exports, ...identity_exports2 };
1867
+ var hashes = { ...sha2_browser_exports, ...identity_exports2 };
1876
1868
 
1877
1869
  // src/policy/signed-object.ts
1878
1870
  var import_viem3 = require("viem");
@@ -3265,60 +3257,4 @@ var objectHasOwn4 = Object.hasOwn ?? Object.prototype.hasOwnProperty.call.bind(
3265
3257
  function hasOwn3(object, key) {
3266
3258
  return objectHasOwn4(object, key);
3267
3259
  }
3268
- // Annotate the CommonJS export names for ESM import in node:
3269
- 0 && (module.exports = {
3270
- ED25519_JCS_SIGNATURE_SUITE,
3271
- EIP191_JCS_SIGNATURE_SUITE,
3272
- OWNER_NODE_ENDPOINT_SCHEMA,
3273
- POLICY_ENGINE_RECORD_SCHEMA,
3274
- POLICY_SCHEMA,
3275
- POLICY_STATUS_SCHEMA,
3276
- POLICY_VERSION_V0,
3277
- PolicyAuthoringError,
3278
- PolicyCapabilityError,
3279
- SignatureMaterialError,
3280
- SignatureVerificationError,
3281
- SignedObjectCanonicalizationError,
3282
- SignedObjectDigestError,
3283
- SignedObjectIdError,
3284
- SignedObjectProfileError,
3285
- SignedObjectSchemaError,
3286
- SigningKeyBindingError,
3287
- TRANSCRIPT_SHARE_BOOTSTRAP_SCHEMA,
3288
- UnsupportedSignatureSuiteError,
3289
- W3C_VC_CREDENTIAL_VERIFIER,
3290
- canonicalizePolicyCapability,
3291
- canonicalizeSignedObjectUnsigned,
3292
- composeTranscriptShareBootstrap,
3293
- createAndSignPolicy,
3294
- createAndSignPolicyEngineRecord,
3295
- createAndSignPolicyStatus,
3296
- createAndSignRequesterPolicyEngineRecord,
3297
- createAndSignSignedObject,
3298
- createAndSignTranscriptSharePolicy,
3299
- createUnsignedPolicyEngineRecord,
3300
- deriveSignedObjectMaterial,
3301
- jcsCanonicalize,
3302
- normalizeJson,
3303
- normalizePolicyCapability,
3304
- policyCapabilityContains,
3305
- policyCapabilityDigestHex,
3306
- serializeJcsJson,
3307
- signedObjectIdFor,
3308
- toSignedObjectError,
3309
- validatePolicyEngineRecordSigned,
3310
- validatePolicyEngineRecordSignedShape,
3311
- validatePolicyEngineRecordUnsigned,
3312
- validatePolicySigned,
3313
- validatePolicySignedShape,
3314
- validatePolicyStatusSigned,
3315
- validatePolicyStatusSignedShape,
3316
- validatePolicyStatusUnsigned,
3317
- validatePolicyUnsigned,
3318
- verifyPolicy,
3319
- verifyPolicyEngineRecord,
3320
- verifyPolicyEngineRecordForRequester,
3321
- verifyPolicyStatus,
3322
- verifySignedObject
3323
- });
3324
3260
  //# sourceMappingURL=index.cjs.map