@tinycloud/sdk-core 3.1.0 → 3.2.0-beta.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.
- package/dist/{credential-admission-ohx0XnQr.d.cts → credential-admission-1EOQgdzY.d.cts} +1 -0
- package/dist/{credential-admission-BaP4pdpy.d.ts → credential-admission-CJ1ZPqcx.d.ts} +1 -0
- package/dist/delegations/index.cjs.map +1 -1
- package/dist/delegations/index.js.map +1 -1
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/policy/index.cjs +3 -1
- package/dist/policy/index.cjs.map +1 -1
- package/dist/policy/index.d.cts +2 -2
- package/dist/policy/index.d.ts +2 -2
- package/dist/policy/index.js +3 -1
- package/dist/policy/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4705,9 +4705,11 @@ function parseSignedCompactUcanAttenuation(input, expectedCid) {
|
|
|
4705
4705
|
const signature = decodeBase64Url2(signatureSegment);
|
|
4706
4706
|
if (!import_ed255193.ed25519.verify(signature, new TextEncoder().encode(`${headerSegment}.${payloadSegment}`), publicKey))
|
|
4707
4707
|
throw new Error("compact UCAN signature is invalid");
|
|
4708
|
+
if (typeof payloadValue.aud !== "string" || payloadValue.aud.length === 0)
|
|
4709
|
+
throw new Error("compact UCAN signed audience is missing");
|
|
4708
4710
|
const cid2 = CID.createV1(85, create(30, (0, import_blake3.blake3)(new TextEncoder().encode(input)))).toString();
|
|
4709
4711
|
if (expectedCid !== void 0 && cid2 !== expectedCid) throw new Error("compact UCAN CID does not match exact Authorization bytes");
|
|
4710
|
-
return { cid: cid2, payload: { att } };
|
|
4712
|
+
return { cid: cid2, payload: { att, aud: payloadValue.aud } };
|
|
4711
4713
|
}
|
|
4712
4714
|
function parsePolicySessionUcan(authorization, expectedProofs) {
|
|
4713
4715
|
const parsed = parseCompactUcanAuthorization(authorization);
|