@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.
@@ -4130,9 +4130,11 @@ function parseSignedCompactUcanAttenuation(input, expectedCid) {
4130
4130
  const signature = decodeBase64Url(signatureSegment);
4131
4131
  if (!import_ed255192.ed25519.verify(signature, new TextEncoder().encode(`${headerSegment}.${payloadSegment}`), publicKey))
4132
4132
  throw new Error("compact UCAN signature is invalid");
4133
+ if (typeof payloadValue.aud !== "string" || payloadValue.aud.length === 0)
4134
+ throw new Error("compact UCAN signed audience is missing");
4133
4135
  const cid = CID.createV1(85, create(30, (0, import_blake3.blake3)(new TextEncoder().encode(input)))).toString();
4134
4136
  if (expectedCid !== void 0 && cid !== expectedCid) throw new Error("compact UCAN CID does not match exact Authorization bytes");
4135
- return { cid, payload: { att } };
4137
+ return { cid, payload: { att, aud: payloadValue.aud } };
4136
4138
  }
4137
4139
  function parsePolicySessionUcan(authorization, expectedProofs) {
4138
4140
  const parsed = parseCompactUcanAuthorization(authorization);