@tinycloud/sdk-core 3.1.0 → 3.2.0-beta.2

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.cjs CHANGED
@@ -132,6 +132,7 @@ __export(index_exports, {
132
132
  MAX_CONTENT_BYTES: () => MAX_CONTENT_BYTES,
133
133
  MAX_LEGACY_ENVELOPE_EXPIRES_AT: () => MAX_LEGACY_ENVELOPE_EXPIRES_AT,
134
134
  MAX_SEALED_SHARE_CONTENT_BYTES: () => MAX_SEALED_SHARE_CONTENT_BYTES,
135
+ MAX_SECRET_SCOPE_LENGTH: () => import_sdk_services9.MAX_SECRET_SCOPE_LENGTH,
135
136
  MAX_SHARE_ARTIFACT_BYTES: () => MAX_SHARE_ARTIFACT_BYTES,
136
137
  MAX_SHARE_CONTENT_BYTES: () => MAX_SHARE_CONTENT_BYTES,
137
138
  ManifestValidationError: () => ManifestValidationError,
@@ -180,6 +181,7 @@ __export(index_exports, {
180
181
  SECRETS_SPACE: () => SECRETS_SPACE,
181
182
  SECRET_NAME_RE: () => import_sdk_services9.SECRET_NAME_RE,
182
183
  SECRET_RECORDS_SCHEMA: () => import_bootstrap4.SECRET_RECORDS_SCHEMA,
184
+ SECRET_SCOPE_RE: () => import_sdk_services9.SECRET_SCOPE_RE,
183
185
  SERVICE_LONG_TO_SHORT: () => SERVICE_LONG_TO_SHORT,
184
186
  SERVICE_SHORT_TO_LONG: () => SERVICE_SHORT_TO_LONG,
185
187
  SPACE: () => import_bootstrap4.SPACE,
@@ -215,6 +217,7 @@ __export(index_exports, {
215
217
  Space: () => Space,
216
218
  SpaceErrorCodes: () => SpaceErrorCodes,
217
219
  SpaceService: () => SpaceService,
220
+ TC832_RESERVED_SCOPES: () => import_sdk_services9.TC832_RESERVED_SCOPES,
218
221
  TINYCLOUD_ACCOUNT_SPACE_MANIFEST: () => import_bootstrap4.TINYCLOUD_ACCOUNT_SPACE_MANIFEST,
219
222
  TINYCLOUD_AGENTS_SPACE_MANIFEST: () => import_bootstrap4.TINYCLOUD_AGENTS_SPACE_MANIFEST,
220
223
  TINYCLOUD_APPLICATIONS_SPACE_MANIFEST: () => import_bootstrap4.TINYCLOUD_APPLICATIONS_SPACE_MANIFEST,
@@ -238,6 +241,7 @@ __export(index_exports, {
238
241
  addressStorageKey: () => addressStorageKey,
239
242
  admitPolicyCredentialV3: () => admitPolicyCredentialV3,
240
243
  admitPolicyCredentialV4: () => admitPolicyCredentialV4,
244
+ appSecretScope: () => import_sdk_services9.appSecretScope,
241
245
  applyPrefix: () => applyPrefix,
242
246
  authorizationVerdictOf: () => import_sdk_services9.authorizationVerdictOf,
243
247
  bootstrapEncryptionNetworkId: () => import_bootstrap4.bootstrapEncryptionNetworkId,
@@ -4705,9 +4709,11 @@ function parseSignedCompactUcanAttenuation(input, expectedCid) {
4705
4709
  const signature = decodeBase64Url2(signatureSegment);
4706
4710
  if (!import_ed255193.ed25519.verify(signature, new TextEncoder().encode(`${headerSegment}.${payloadSegment}`), publicKey))
4707
4711
  throw new Error("compact UCAN signature is invalid");
4712
+ if (typeof payloadValue.aud !== "string" || payloadValue.aud.length === 0)
4713
+ throw new Error("compact UCAN signed audience is missing");
4708
4714
  const cid2 = CID.createV1(85, create(30, (0, import_blake3.blake3)(new TextEncoder().encode(input)))).toString();
4709
4715
  if (expectedCid !== void 0 && cid2 !== expectedCid) throw new Error("compact UCAN CID does not match exact Authorization bytes");
4710
- return { cid: cid2, payload: { att } };
4716
+ return { cid: cid2, payload: { att, aud: payloadValue.aud } };
4711
4717
  }
4712
4718
  function parsePolicySessionUcan(authorization, expectedProofs) {
4713
4719
  const parsed = parseCompactUcanAuthorization(authorization);