@fabricorg/sdui-release 0.3.0 → 0.6.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/CHANGELOG.md +209 -0
- package/README.md +10 -3
- package/dist/chunk-BTWHVBZ3.js +255 -0
- package/dist/chunk-BTWHVBZ3.js.map +1 -0
- package/dist/contracts-4fL-Yh38.d.cts +399 -0
- package/dist/contracts-4fL-Yh38.d.ts +399 -0
- package/dist/contracts.cjs +286 -0
- package/dist/contracts.cjs.map +1 -0
- package/dist/contracts.d.cts +4 -0
- package/dist/contracts.d.ts +4 -0
- package/dist/contracts.js +21 -0
- package/dist/contracts.js.map +1 -0
- package/dist/index.cjs +603 -23
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +120 -261
- package/dist/index.d.ts +120 -261
- package/dist/index.js +355 -20
- package/dist/index.js.map +1 -1
- package/dist/node-crypto.cjs +51 -0
- package/dist/node-crypto.cjs.map +1 -0
- package/dist/node-crypto.d.cts +9 -0
- package/dist/node-crypto.d.ts +9 -0
- package/dist/node-crypto.js +26 -0
- package/dist/node-crypto.js.map +1 -0
- package/package.json +32 -8
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../contracts.ts"],"sourcesContent":["import type { ActionExecutionContract, PortableJsonSchema } from \"@fabricorg/platform\";\nimport type { SduiDocument, SduiTokenSet, ResolvedSduiComponentPack } from \"./types\";\nexport type {\n\tSduiActionRef,\n\tSduiDocument,\n\tSduiFragment,\n\tSduiFragmentValue,\n\tSduiTokenSet,\n\tResolvedSduiComponentPack,\n} from \"./types\";\n\nexport const SDUI_RELEASE_V3_FORMAT_VERSION = 3 as const;\nexport const RELEASE_CHANNEL_POINTER_FORMAT_VERSION = 1 as const;\n\nexport interface ExperienceViewRoute {\n\treference: `capability://${string}`;\n\tname: `${string}/${string}`;\n\tversion: string;\n\tparameterSchema?: PortableJsonSchema;\n\tparameterSchemaDigest?: string;\n}\n\nexport interface ExperienceIntentRoute {\n\treference: `capability://${string}`;\n\tactionId: `${string}.${string}`;\n\tversion: number;\n\tparameterSchema?: PortableJsonSchema;\n\tparameterSchemaDigest?: string;\n\texecution?: ActionExecutionContract;\n}\n\nexport interface EffectiveFragmentGrant {\n\ttreeId: \"root\" | string;\n\tfragmentId: string;\n\tviews: readonly string[];\n\tintents: readonly string[];\n}\n\nexport interface SduiReleaseV3 {\n\tformatVersion: typeof SDUI_RELEASE_V3_FORMAT_VERSION;\n\tkind: \"experience-release\";\n\tissuer: string;\n\tapplication: string;\n\treleaseDigest: string;\n\tassemblyDigest: string;\n\tdocument: SduiDocument;\n\ttokenSet: SduiTokenSet;\n\tcomponentPacks: ResolvedSduiComponentPack[];\n\troutes: {\n\t\tviews: ExperienceViewRoute[];\n\t\tintents: ExperienceIntentRoute[];\n\t};\n\teffectiveGrants: EffectiveFragmentGrant[];\n}\n\nexport interface ReleaseChannelPointer {\n\tformatVersion: typeof RELEASE_CHANNEL_POINTER_FORMAT_VERSION;\n\tkind: \"release-channel-pointer\";\n\tissuer: string;\n\tapplication: string;\n\tchannel: string;\n\tgeneration: number;\n\tactiveReleaseDigest: string;\n\tassemblyDigest: string;\n\tissuedAt: string;\n\tnotBefore?: string;\n\texpiresAt?: string;\n\tfallbackReleaseDigests?: readonly string[];\n}\n\nexport interface ReleaseVerificationKey {\n\tkeyId: string;\n\talgorithm: \"ES256\";\n\tkey: unknown;\n}\n\nexport interface ReleaseTrustStore {\n\tresolveKey(input: { keyId: string; issuer: string; algorithm: \"ES256\" }): ReleaseVerificationKey | undefined | Promise<ReleaseVerificationKey | undefined>;\n}\n\nexport interface ReleaseCryptoPort {\n\tverify(input: {\n\t\talgorithm: \"ES256\";\n\t\tkey: unknown;\n\t\tsigningInput: Uint8Array;\n\t\tsignature: Uint8Array;\n\t}): Promise<boolean>;\n\tdigestSha256(bytes: Uint8Array): Promise<Uint8Array>;\n}\n\nexport interface ReleaseGenerationStore {\n\tget(key: string): Promise<{ generation: number; pointerDigest: string } | undefined>;\n\t/**\n\t * Atomically accepts `generation` only when it is greater than the stored\n\t * value for `key`. Implementations must compare and write in one operation.\n\t */\n\tacceptIfHigher(key: string, generation: number, pointerDigest: string): Promise<boolean>;\n}\n\nexport interface VerifySignedExperienceArtifactInput {\n\tcompactJws: string;\n\texpectedType: \"fabric-experience-release+jws\" | \"fabric-release-channel-pointer+jws\";\n\tcrypto: ReleaseCryptoPort;\n\ttrust: ReleaseTrustStore;\n\tmaxBytes?: number;\n}\n\nconst encoder = new TextEncoder();\nconst decoder = new TextDecoder(\"utf-8\", { fatal: true });\nconst HEX_DIGEST = /^[a-f0-9]{64}$/;\n\n/**\n * RFC 8785 JSON Canonicalization Scheme for values already restricted to the\n * JSON data model. Invalid Unicode, non-finite numbers and non-JSON values are\n * rejected rather than normalized differently by another runtime.\n */\nexport function canonicalizeJcs(value: unknown): string {\n\treturn canonical(value, 0);\n}\n\nfunction canonical(value: unknown, depth: number): string {\n\tif (depth > 64) throw new Error(\"Canonical JSON exceeds the maximum depth of 64.\");\n\tif (value === null) return \"null\";\n\tif (typeof value === \"boolean\") return value ? \"true\" : \"false\";\n\tif (typeof value === \"number\") {\n\t\tif (!Number.isFinite(value)) throw new Error(\"Canonical JSON numbers must be finite.\");\n\t\treturn Object.is(value, -0) ? \"0\" : JSON.stringify(value);\n\t}\n\tif (typeof value === \"string\") {\n\t\tassertValidUnicode(value);\n\t\treturn JSON.stringify(value);\n\t}\n\tif (Array.isArray(value)) return `[${value.map((entry) => canonical(entry, depth + 1)).join(\",\")}]`;\n\tif (typeof value !== \"object\") throw new Error(`Canonical JSON cannot encode ${typeof value}.`);\n\tconst record = value as Record<string, unknown>;\n\tconst keys = Object.keys(record).sort();\n\treturn `{${keys.map((key) => {\n\t\tassertValidUnicode(key);\n\t\treturn `${JSON.stringify(key)}:${canonical(record[key], depth + 1)}`;\n\t}).join(\",\")}}`;\n}\n\nfunction assertValidUnicode(value: string): void {\n\tfor (let index = 0; index < value.length; index += 1) {\n\t\tconst code = value.charCodeAt(index);\n\t\tif (code >= 0xd800 && code <= 0xdbff) {\n\t\t\tconst next = value.charCodeAt(index + 1);\n\t\t\tif (!(next >= 0xdc00 && next <= 0xdfff)) throw new Error(\"Canonical JSON contains an unpaired Unicode surrogate.\");\n\t\t\tindex += 1;\n\t\t} else if (code >= 0xdc00 && code <= 0xdfff) {\n\t\t\tthrow new Error(\"Canonical JSON contains an unpaired Unicode surrogate.\");\n\t\t}\n\t}\n}\n\nexport async function verifySignedExperienceArtifact(\n\tinput: VerifySignedExperienceArtifactInput,\n): Promise<Record<string, unknown>> {\n\tconst maxBytes = input.maxBytes ?? 1_048_576;\n\tif (encoder.encode(input.compactJws).byteLength > maxBytes) {\n\t\tthrow new Error(`Signed experience artifact exceeds the ${maxBytes}-byte size limit.`);\n\t}\n\tconst parts = input.compactJws.split(\".\");\n\tif (parts.length !== 3 || parts.some((part) => part.length === 0)) throw new Error(\"Signed experience artifact must be a compact JWS.\");\n\tconst header = parseSegment(parts[0]!, \"protected header\");\n\tif (header.alg !== \"ES256\") throw new Error(\"Signed experience artifacts must use ES256.\");\n\tif (header.typ !== input.expectedType) throw new Error(`Signed experience artifact type must be ${input.expectedType}.`);\n\tif (typeof header.kid !== \"string\" || !header.kid) throw new Error(\"Signed experience artifact requires a key id.\");\n\tconst payloadBytes = decodeBase64Url(parts[1]!);\n\tconst payload = parseJsonBytes(payloadBytes, \"payload\");\n\tif (typeof payload.issuer !== \"string\" || !payload.issuer) throw new Error(\"Signed experience artifact requires an issuer.\");\n\tconst key = await input.trust.resolveKey({ keyId: header.kid, issuer: payload.issuer, algorithm: \"ES256\" });\n\tif (!key || key.algorithm !== \"ES256\") throw new Error(\"Signed experience artifact has no trusted key.\");\n\tconst signature = decodeBase64Url(parts[2]!);\n\tif (signature.byteLength !== 64) throw new Error(\"ES256 signatures must be 64-byte JOSE signatures.\");\n\tconst verified = await input.crypto.verify({\n\t\talgorithm: \"ES256\",\n\t\tkey: key.key,\n\t\tsigningInput: encoder.encode(`${parts[0]}.${parts[1]}`),\n\t\tsignature,\n\t});\n\tif (!verified) throw new Error(\"Signed experience artifact signature is invalid.\");\n\treturn payload;\n}\n\nexport async function verifySignedExperienceRelease(input: {\n\tcompactJws: string;\n\tcrypto: ReleaseCryptoPort;\n\ttrust: ReleaseTrustStore;\n\texpected: { issuer: string; application: string; assemblyDigest: string };\n\tmaxBytes?: number;\n}): Promise<SduiReleaseV3> {\n\tconst payload = await verifySignedExperienceArtifact({\n\t\tcompactJws: input.compactJws,\n\t\texpectedType: \"fabric-experience-release+jws\",\n\t\tcrypto: input.crypto,\n\t\ttrust: input.trust,\n\t\t...(input.maxBytes === undefined ? {} : { maxBytes: input.maxBytes }),\n\t});\n\tassertSduiReleaseV3(payload);\n\tif (payload.issuer !== input.expected.issuer\n\t\t|| payload.application !== input.expected.application\n\t\t|| payload.assemblyDigest !== input.expected.assemblyDigest) {\n\t\tthrow new Error(\"Signed experience release does not match the expected issuer, application, and assembly.\");\n\t}\n\tconst { releaseDigest, ...body } = payload;\n\tconst digest = await input.crypto.digestSha256(encoder.encode(canonicalizeJcs(body)));\n\tconst expectedDigest = [...digest].map((byte) => byte.toString(16).padStart(2, \"0\")).join(\"\");\n\tif (releaseDigest !== expectedDigest) throw new Error(\"Signed experience release digest does not match its canonical content.\");\n\treturn payload;\n}\n\nexport function assertSduiReleaseV3(value: unknown): asserts value is SduiReleaseV3 {\n\tif (!value || typeof value !== \"object\" || Array.isArray(value)) throw new Error(\"SDUI Release v3 must be an object.\");\n\tconst release = value as Record<string, unknown>;\n\tif (release.formatVersion !== SDUI_RELEASE_V3_FORMAT_VERSION || release.kind !== \"experience-release\") {\n\t\tthrow new Error(\"SDUI Release v3 has an unsupported format.\");\n\t}\n\tfor (const field of [\"issuer\", \"application\", \"releaseDigest\", \"assemblyDigest\"] as const) {\n\t\tif (typeof release[field] !== \"string\" || !release[field]) throw new Error(`SDUI Release v3 ${field} is required.`);\n\t}\n\tif (!HEX_DIGEST.test(release.releaseDigest as string) || !HEX_DIGEST.test(release.assemblyDigest as string)) {\n\t\tthrow new Error(\"SDUI Release v3 digests must be lowercase SHA-256 values.\");\n\t}\n\tif (!release.document || typeof release.document !== \"object\"\n\t\t|| !release.tokenSet || typeof release.tokenSet !== \"object\"\n\t\t|| !Array.isArray(release.componentPacks)\n\t\t|| !release.routes || typeof release.routes !== \"object\"\n\t\t|| !Array.isArray((release.routes as Record<string, unknown>).views)\n\t\t|| !Array.isArray((release.routes as Record<string, unknown>).intents)\n\t\t|| !Array.isArray(release.effectiveGrants)) {\n\t\tthrow new Error(\"SDUI Release v3 is structurally incomplete.\");\n\t}\n\tconst routes = release.routes as { views: unknown[]; intents: unknown[] };\n\tassertUniqueRecords(routes.views, \"view route\", (route) => {\n\t\tconst record = assertRecord(route, \"view route\");\n\t\tassertCapabilityReference(record.reference, \"view route\");\n\t\tassertNonEmptyString(record.name, \"view route name\");\n\t\tassertNonEmptyString(record.version, \"view route version\");\n\t\tif (record.parameterSchemaDigest !== undefined) {\n\t\t\tassertHexDigest(record.parameterSchemaDigest, \"view route parameterSchemaDigest\");\n\t\t}\n\t\treturn record.reference as string;\n\t});\n\tassertUniqueRecords(routes.intents, \"intent route\", (route) => {\n\t\tconst record = assertRecord(route, \"intent route\");\n\t\tassertCapabilityReference(record.reference, \"intent route\");\n\t\tassertNonEmptyString(record.actionId, \"intent route actionId\");\n\t\tif (!Number.isSafeInteger(record.version) || (record.version as number) < 1) {\n\t\t\tthrow new Error(\"SDUI Release v3 intent route version must be a positive integer.\");\n\t\t}\n\t\tif (record.parameterSchemaDigest !== undefined) {\n\t\t\tassertHexDigest(record.parameterSchemaDigest, \"intent route parameterSchemaDigest\");\n\t\t}\n\t\treturn record.reference as string;\n\t});\n\tassertUniqueRecords(release.effectiveGrants as unknown[], \"effective grant\", (grant) => {\n\t\tconst record = assertRecord(grant, \"effective grant\");\n\t\tassertNonEmptyString(record.treeId, \"effective grant treeId\");\n\t\tassertNonEmptyString(record.fragmentId, \"effective grant fragmentId\");\n\t\tif (!Array.isArray(record.views) || !record.views.every((item) => typeof item === \"string\")\n\t\t\t|| !Array.isArray(record.intents) || !record.intents.every((item) => typeof item === \"string\")) {\n\t\t\tthrow new Error(\"SDUI Release v3 effective grant routes must be string arrays.\");\n\t\t}\n\t\treturn `${record.treeId as string}\\0${record.fragmentId as string}`;\n\t});\n}\n\nfunction assertRecord(value: unknown, label: string): Record<string, unknown> {\n\tif (!value || typeof value !== \"object\" || Array.isArray(value)) throw new Error(`SDUI Release v3 ${label} must be an object.`);\n\treturn value as Record<string, unknown>;\n}\n\nfunction assertNonEmptyString(value: unknown, label: string): asserts value is string {\n\tif (typeof value !== \"string\" || !value) throw new Error(`SDUI Release v3 ${label} is required.`);\n}\n\nfunction assertHexDigest(value: unknown, label: string): asserts value is string {\n\tif (typeof value !== \"string\" || !HEX_DIGEST.test(value)) throw new Error(`SDUI Release v3 ${label} must be a lowercase SHA-256 value.`);\n}\n\nfunction assertCapabilityReference(value: unknown, label: string): asserts value is `capability://${string}` {\n\tif (typeof value !== \"string\" || !value.startsWith(\"capability://\")) throw new Error(`SDUI Release v3 ${label} reference is invalid.`);\n}\n\nfunction assertUniqueRecords(values: unknown[], label: string, identity: (value: unknown) => string): void {\n\tconst seen = new Set<string>();\n\tfor (const value of values) {\n\t\tconst key = identity(value);\n\t\tif (seen.has(key)) throw new Error(`SDUI Release v3 has a duplicate ${label}.`);\n\t\tseen.add(key);\n\t}\n}\n\nexport async function activateReleaseChannelPointer(input: {\n\tcompactJws: string;\n\tcrypto: ReleaseCryptoPort;\n\ttrust: ReleaseTrustStore;\n\tgenerations: ReleaseGenerationStore;\n\texpected: { issuer: string; application: string; channel: string };\n\tnow?: Date;\n}): Promise<ReleaseChannelPointer> {\n\tconst payload = await verifySignedExperienceArtifact({\n\t\tcompactJws: input.compactJws,\n\t\texpectedType: \"fabric-release-channel-pointer+jws\",\n\t\tcrypto: input.crypto,\n\t\ttrust: input.trust,\n\t});\n\tassertReleaseChannelPointer(payload);\n\tif (payload.issuer !== input.expected.issuer\n\t\t|| payload.application !== input.expected.application\n\t\t|| payload.channel !== input.expected.channel) {\n\t\tthrow new Error(\"Release channel pointer does not match the expected issuer, application, and channel.\");\n\t}\n\tconst now = (input.now ?? new Date()).getTime();\n\tif (payload.notBefore !== undefined && now < parseTimestamp(payload.notBefore, \"notBefore\")) {\n\t\tthrow new Error(\"Release channel pointer is not active yet.\");\n\t}\n\tif (payload.expiresAt !== undefined && now >= parseTimestamp(payload.expiresAt, \"expiresAt\")) {\n\t\tthrow new Error(\"Release channel pointer has expired.\");\n\t}\n\tconst generationKey = `${payload.issuer}:${payload.application}:${payload.channel}`;\n\tconst pointerDigestBytes = await input.crypto.digestSha256(encoder.encode(canonicalizeJcs(payload)));\n\tconst pointerDigest = [...pointerDigestBytes].map((byte) => byte.toString(16).padStart(2, \"0\")).join(\"\");\n\tconst current = await input.generations.get(generationKey);\n\tif (current !== undefined && payload.generation < current.generation) {\n\t\tthrow new Error(\"Release channel pointer is older than the accepted generation.\");\n\t}\n\tif (current?.generation === payload.generation && current.pointerDigest !== pointerDigest) {\n\t\tthrow new Error(\"Release channel generation is already bound to a different signed pointer.\");\n\t}\n\tif (current?.generation !== payload.generation) {\n\t\tconst accepted = await input.generations.acceptIfHigher(generationKey, payload.generation, pointerDigest);\n\t\tif (!accepted) {\n\t\t\tconst raced = await input.generations.get(generationKey);\n\t\t\tif (raced?.generation !== payload.generation || raced.pointerDigest !== pointerDigest) {\n\t\t\t\tthrow new Error(\"Release channel pointer lost an activation race to a different generation.\");\n\t\t\t}\n\t\t}\n\t}\n\treturn payload;\n}\n\nexport function assertReleaseChannelPointer(value: unknown): asserts value is ReleaseChannelPointer {\n\tif (!value || typeof value !== \"object\" || Array.isArray(value)) throw new Error(\"Release channel pointer must be an object.\");\n\tconst pointer = value as Record<string, unknown>;\n\tif (pointer.formatVersion !== RELEASE_CHANNEL_POINTER_FORMAT_VERSION || pointer.kind !== \"release-channel-pointer\") {\n\t\tthrow new Error(\"Release channel pointer has an unsupported format.\");\n\t}\n\tfor (const field of [\"issuer\", \"application\", \"channel\", \"issuedAt\"] as const) {\n\t\tif (typeof pointer[field] !== \"string\" || !pointer[field]) throw new Error(`Release channel pointer ${field} is required.`);\n\t}\n\tif (!Number.isSafeInteger(pointer.generation) || (pointer.generation as number) < 0) throw new Error(\"Release channel pointer generation must be a non-negative safe integer.\");\n\tif (!HEX_DIGEST.test(String(pointer.activeReleaseDigest)) || !HEX_DIGEST.test(String(pointer.assemblyDigest))) {\n\t\tthrow new Error(\"Release channel pointer digests must be lowercase SHA-256 values.\");\n\t}\n\tif (pointer.fallbackReleaseDigests !== undefined\n\t\t&& (!Array.isArray(pointer.fallbackReleaseDigests)\n\t\t\t|| !pointer.fallbackReleaseDigests.every((digest) => typeof digest === \"string\" && HEX_DIGEST.test(digest))\n\t\t\t|| new Set(pointer.fallbackReleaseDigests).size !== pointer.fallbackReleaseDigests.length)) {\n\t\tthrow new Error(\"Release channel pointer fallbackReleaseDigests must contain unique lowercase SHA-256 values.\");\n\t}\n\tparseTimestamp(pointer.issuedAt as string, \"issuedAt\");\n}\n\nfunction parseSegment(segment: string, label: string): Record<string, unknown> {\n\treturn parseJsonBytes(decodeBase64Url(segment), label);\n}\n\nfunction parseJsonBytes(bytes: Uint8Array, label: string): Record<string, unknown> {\n\tlet value: unknown;\n\ttry { value = JSON.parse(decoder.decode(bytes)); }\n\tcatch { throw new Error(`Signed experience artifact ${label} is not valid UTF-8 JSON.`); }\n\tif (!value || typeof value !== \"object\" || Array.isArray(value)) throw new Error(`Signed experience artifact ${label} must be an object.`);\n\treturn value as Record<string, unknown>;\n}\n\nfunction decodeBase64Url(value: string): Uint8Array {\n\tif (!/^[A-Za-z0-9_-]+$/.test(value)) throw new Error(\"Signed experience artifact contains invalid base64url.\");\n\tconst padded = value.replace(/-/g, \"+\").replace(/_/g, \"/\").padEnd(Math.ceil(value.length / 4) * 4, \"=\");\n\tlet binary: string;\n\ttry { binary = atob(padded); }\n\tcatch { throw new Error(\"Signed experience artifact contains invalid base64url.\"); }\n\treturn Uint8Array.from(binary, (character) => character.charCodeAt(0));\n}\n\nfunction parseTimestamp(value: string, field: string): number {\n\tif (!/(?:Z|[+-]\\d{2}:\\d{2})$/.test(value)) throw new Error(`Release channel pointer ${field} must be RFC 3339 with an explicit offset.`);\n\tconst parsed = Date.parse(value);\n\tif (Number.isNaN(parsed)) throw new Error(`Release channel pointer ${field} is invalid.`);\n\treturn parsed;\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAWO,IAAM,iCAAiC;AACvC,IAAM,yCAAyC;AA+FtD,IAAM,UAAU,IAAI,YAAY;AAChC,IAAM,UAAU,IAAI,YAAY,SAAS,EAAE,OAAO,KAAK,CAAC;AACxD,IAAM,aAAa;AAOZ,SAAS,gBAAgB,OAAwB;AACvD,SAAO,UAAU,OAAO,CAAC;AAC1B;AAEA,SAAS,UAAU,OAAgB,OAAuB;AACzD,MAAI,QAAQ,GAAI,OAAM,IAAI,MAAM,iDAAiD;AACjF,MAAI,UAAU,KAAM,QAAO;AAC3B,MAAI,OAAO,UAAU,UAAW,QAAO,QAAQ,SAAS;AACxD,MAAI,OAAO,UAAU,UAAU;AAC9B,QAAI,CAAC,OAAO,SAAS,KAAK,EAAG,OAAM,IAAI,MAAM,wCAAwC;AACrF,WAAO,OAAO,GAAG,OAAO,EAAE,IAAI,MAAM,KAAK,UAAU,KAAK;AAAA,EACzD;AACA,MAAI,OAAO,UAAU,UAAU;AAC9B,uBAAmB,KAAK;AACxB,WAAO,KAAK,UAAU,KAAK;AAAA,EAC5B;AACA,MAAI,MAAM,QAAQ,KAAK,EAAG,QAAO,IAAI,MAAM,IAAI,CAAC,UAAU,UAAU,OAAO,QAAQ,CAAC,CAAC,EAAE,KAAK,GAAG,CAAC;AAChG,MAAI,OAAO,UAAU,SAAU,O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AM,wDAAwD;AAC7G,QAAM,SAAS,MAAM,QAAQ,MAAM,GAAG,EAAE,QAAQ,MAAM,GAAG,EAAE,OAAO,KAAK,KAAK,MAAM,SAAS,CAAC,IAAI,GAAG,GAAG;AACtG,MAAI;AACJ,MAAI;AAAE,aAAS,KAAK,MAAM;AAAA,EAAG,QACvB;AAAE,UAAM,IAAI,MAAM,wDAAwD;AAAA,EAAG;AACnF,SAAO,WAAW,KAAK,QAAQ,CAAC,cAAc,UAAU,WAAW,CAAC,CAAC;AACtE;AAEA,SAAS,eAAe,OAAe,OAAuB;AAC7D,MAAI,CAAC,yBAAyB,KAAK,KAAK,EAAG,OAAM,IAAI,MAAM,2BAA2B,KAAK,4CAA4C;AACvI,QAAM,SAAS,KAAK,MAAM,KAAK;AAC/B,MAAI,OAAO,MAAM,MAAM,EAAG,OAAM,IAAI,MAAM,2BAA2B,KAAK,cAAc;AACxF,SAAO;AACR;","names":[]}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import '@fabricorg/platform';
|
|
2
|
+
export { E as EffectiveFragmentGrant, h as ExperienceIntentRoute, i as ExperienceViewRoute, j as RELEASE_CHANNEL_POINTER_FORMAT_VERSION, k as ReleaseChannelPointer, l as ReleaseCryptoPort, m as ReleaseGenerationStore, n as ReleaseTrustStore, o as ReleaseVerificationKey, R as ResolvedSduiComponentPack, s as SDUI_RELEASE_V3_FORMAT_VERSION, u as SduiActionRef, b as SduiDocument, c as SduiFragment, A as SduiFragmentValue, B as SduiReleaseV3, e as SduiTokenSet, V as VerifySignedExperienceArtifactInput, G as activateReleaseChannelPointer, H as assertReleaseChannelPointer, I as assertSduiReleaseV3, J as canonicalizeJcs, K as verifySignedExperienceArtifact, L as verifySignedExperienceRelease } from './contracts-4fL-Yh38.cjs';
|
|
3
|
+
import '@fabricorg/gen-capability';
|
|
4
|
+
import '@fabricorg/assembly';
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import '@fabricorg/platform';
|
|
2
|
+
export { E as EffectiveFragmentGrant, h as ExperienceIntentRoute, i as ExperienceViewRoute, j as RELEASE_CHANNEL_POINTER_FORMAT_VERSION, k as ReleaseChannelPointer, l as ReleaseCryptoPort, m as ReleaseGenerationStore, n as ReleaseTrustStore, o as ReleaseVerificationKey, R as ResolvedSduiComponentPack, s as SDUI_RELEASE_V3_FORMAT_VERSION, u as SduiActionRef, b as SduiDocument, c as SduiFragment, A as SduiFragmentValue, B as SduiReleaseV3, e as SduiTokenSet, V as VerifySignedExperienceArtifactInput, G as activateReleaseChannelPointer, H as assertReleaseChannelPointer, I as assertSduiReleaseV3, J as canonicalizeJcs, K as verifySignedExperienceArtifact, L as verifySignedExperienceRelease } from './contracts-4fL-Yh38.js';
|
|
3
|
+
import '@fabricorg/gen-capability';
|
|
4
|
+
import '@fabricorg/assembly';
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RELEASE_CHANNEL_POINTER_FORMAT_VERSION,
|
|
3
|
+
SDUI_RELEASE_V3_FORMAT_VERSION,
|
|
4
|
+
activateReleaseChannelPointer,
|
|
5
|
+
assertReleaseChannelPointer,
|
|
6
|
+
assertSduiReleaseV3,
|
|
7
|
+
canonicalizeJcs,
|
|
8
|
+
verifySignedExperienceArtifact,
|
|
9
|
+
verifySignedExperienceRelease
|
|
10
|
+
} from "./chunk-BTWHVBZ3.js";
|
|
11
|
+
export {
|
|
12
|
+
RELEASE_CHANNEL_POINTER_FORMAT_VERSION,
|
|
13
|
+
SDUI_RELEASE_V3_FORMAT_VERSION,
|
|
14
|
+
activateReleaseChannelPointer,
|
|
15
|
+
assertReleaseChannelPointer,
|
|
16
|
+
assertSduiReleaseV3,
|
|
17
|
+
canonicalizeJcs,
|
|
18
|
+
verifySignedExperienceArtifact,
|
|
19
|
+
verifySignedExperienceRelease
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=contracts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|