@nakafa/aksara-contracts 0.40.0 → 0.41.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/README.md +1 -1
- package/dist/projection/digest.d.ts +35 -35
- package/dist/projection/verify.d.ts +87 -87
- package/dist/quran/snapshot/row/hash.d.ts +50 -50
- package/dist/release/result/digest.d.ts +4 -4
- package/dist/release/snapshot/verify.d.ts +21 -21
- package/dist/runtime/verify.d.ts +54 -54
- package/dist/transport/request.d.ts +90 -90
- package/dist/transport/response.d.ts +138 -138
- package/dist/tryout/catalog-hash.d.ts +18 -18
- package/package.json +1 -28
- package/dist/adoption/protected.d.ts +0 -125
- package/dist/adoption/protected.js +0 -70
- package/dist/adoption/public.d.ts +0 -619
- package/dist/adoption/public.js +0 -121
- package/dist/adoption/runtime.d.ts +0 -1297
- package/dist/adoption/runtime.js +0 -40
- package/dist/adoption/schema.d.ts +0 -3794
- package/dist/adoption/schema.js +0 -125
- package/dist/adoption/transport.d.ts +0 -23257
- package/dist/adoption/transport.js +0 -74
- package/dist/adoption/verify.d.ts +0 -457
- package/dist/adoption/verify.js +0 -167
package/dist/adoption/runtime.js
DELETED
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { Effect, Schema } from "effect";
|
|
2
|
-
import { RendererManifestEnvelopeSchema, SignedContentArtifactSchema, SignedContentReleaseSchema, } from "#contracts/adoption/schema";
|
|
3
|
-
import { decodeContract } from "#contracts/decode";
|
|
4
|
-
import { MAX_PROTECTED_RUNTIME_SELECTORS } from "#contracts/runtime/protected/limits";
|
|
5
|
-
import { ProtectedContentRuntimeFoundSchema as CurrentProtectedContentRuntimeFoundSchema, ProtectedContentRuntimeItemSchema as CurrentProtectedContentRuntimeItemSchema, } from "#contracts/runtime/protected/spec";
|
|
6
|
-
import { ContentRuntimeFailureSchema, ContentRuntimeMissingSchema, } from "#contracts/runtime/result";
|
|
7
|
-
import { PublicContentRuntimeFoundSchema as CurrentPublicContentRuntimeFoundSchema } from "#contracts/runtime/spec";
|
|
8
|
-
/** Keeps the existing public identity invariant across exact signed schemas. */
|
|
9
|
-
export const PublicContentRuntimeFoundSchema = CurrentPublicContentRuntimeFoundSchema.mapFields((fields) => ({
|
|
10
|
-
...fields,
|
|
11
|
-
artifact: SignedContentArtifactSchema,
|
|
12
|
-
release: SignedContentReleaseSchema,
|
|
13
|
-
rendererManifest: RendererManifestEnvelopeSchema,
|
|
14
|
-
}), { unsafePreserveChecks: true });
|
|
15
|
-
export const PublicContentRuntimeResponseSchema = Schema.Union([
|
|
16
|
-
PublicContentRuntimeFoundSchema,
|
|
17
|
-
ContentRuntimeMissingSchema,
|
|
18
|
-
ContentRuntimeFailureSchema,
|
|
19
|
-
]);
|
|
20
|
-
export const ProtectedContentRuntimeItemSchema = CurrentProtectedContentRuntimeItemSchema.mapFields((fields) => ({
|
|
21
|
-
...fields,
|
|
22
|
-
artifact: SignedContentArtifactSchema,
|
|
23
|
-
}));
|
|
24
|
-
const ItemsSchema = Schema.Array(ProtectedContentRuntimeItemSchema).check(Schema.isMinLength(1), Schema.isMaxLength(MAX_PROTECTED_RUNTIME_SELECTORS), Schema.makeFilter((items) => new Set(items.map(({ artifact }) => artifact.artifactHash)).size ===
|
|
25
|
-
items.length, { message: "Expected unique protected runtime artifacts." }));
|
|
26
|
-
/** Preserves response size and selection bounds while retaining signed bodies. */
|
|
27
|
-
export const ProtectedContentRuntimeFoundSchema = CurrentProtectedContentRuntimeFoundSchema.mapFields((fields) => ({
|
|
28
|
-
...fields,
|
|
29
|
-
items: ItemsSchema,
|
|
30
|
-
rendererManifest: RendererManifestEnvelopeSchema,
|
|
31
|
-
}), { unsafePreserveChecks: true });
|
|
32
|
-
export const ProtectedContentRuntimeResponseSchema = Schema.Union([
|
|
33
|
-
ProtectedContentRuntimeFoundSchema,
|
|
34
|
-
ContentRuntimeMissingSchema,
|
|
35
|
-
ContentRuntimeFailureSchema,
|
|
36
|
-
]);
|
|
37
|
-
/** Strictly decodes public evidence with independent signed entity selection. */
|
|
38
|
-
export const decodePublicContentRuntimeResponse = Effect.fn("AksaraContracts.adoption.decodePublicRuntimeResponse")((input) => decodeContract(PublicContentRuntimeResponseSchema, "PublicContentRuntimeResponse", input));
|
|
39
|
-
/** Strictly decodes retained protected bodies without mutating authenticated bytes. */
|
|
40
|
-
export const decodeProtectedContentRuntimeResponse = Effect.fn("AksaraContracts.adoption.decodeProtectedRuntimeResponse")((input) => decodeContract(ProtectedContentRuntimeResponseSchema, "ProtectedContentRuntimeResponse", input));
|