import { z } from 'zod'; export declare const DappEventSchema: "network.xyo.dapp.event" & { readonly __schema: true; }; export declare const DappEventIdSchema: "network.xyo.dapp.event.id" & { readonly __schema: true; }; export declare const DappEventRecordSchema: "network.xyo.dapp.event.record" & { readonly __schema: true; }; export declare const DappEventSequenceZod: z.ZodNumber; export declare const DappEventStreamReadLimitZod: z.ZodNumber; export declare const DappEventStreamPartitionZod: z.ZodObject<{ streamId: z.ZodString; partitionId: z.ZodString; }, z.core.$strict>; export declare const DappEventStreamReadInputZod: z.ZodObject<{ streamId: z.ZodString; partitionId: z.ZodString; cursor: z.ZodNumber; limit: z.ZodNumber; }, z.core.$strict>; export type DappEventStreamPartition = z.infer; export type DappEventStreamReadInput = z.infer; export declare const DappEventSourceZod: z.ZodObject<{ kind: z.ZodString; sourceId: z.ZodString; }, z.core.$strict>; export type DappEventSource = z.infer; export declare const DappEventContentZod: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"inline-json">; contentHash: z.ZodString; body: z.ZodType>; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"content-addressed">; contentHash: z.ZodString; }, z.core.$strict>], "kind">; export type DappEventContent = z.infer; export declare const DappEventTransformationZod: z.ZodObject<{ id: z.ZodString; schemaVersion: z.ZodNumber; }, z.core.$strict>; export type DappEventTransformation = z.infer; export declare const DappEventDraftInputZod: z.ZodObject<{ schema: z.ZodLiteral<"network.xyo.dapp.event" & { readonly __schema: true; }>; schemaVersion: z.ZodLiteral<1>; streamId: z.ZodString; partitionId: z.ZodString; eventType: z.ZodString; source: z.ZodObject<{ kind: z.ZodString; sourceId: z.ZodString; }, z.core.$strict>; content: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"inline-json">; contentHash: z.ZodString; body: z.ZodType>; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"content-addressed">; contentHash: z.ZodString; }, z.core.$strict>], "kind">; provenanceHash: z.ZodString; transformation: z.ZodObject<{ id: z.ZodString; schemaVersion: z.ZodNumber; }, z.core.$strict>; }, z.core.$strict>; export type DappEventDraftInput = z.infer; export declare const DappEventIdPreimageZod: z.ZodObject<{ schema: z.ZodLiteral<"network.xyo.dapp.event.id" & { readonly __schema: true; }>; schemaVersion: z.ZodLiteral<1>; hashAlgorithm: z.ZodLiteral<"jcs-sha256-v1">; streamId: z.ZodString; partitionId: z.ZodString; eventType: z.ZodString; source: z.ZodObject<{ kind: z.ZodString; sourceId: z.ZodString; }, z.core.$strict>; contentHash: z.ZodString; }, z.core.$strict>; export type DappEventIdPreimage = z.infer; export declare const DappEventDraftPreimageZod: z.ZodObject<{ schema: z.ZodLiteral<"network.xyo.dapp.event" & { readonly __schema: true; }>; schemaVersion: z.ZodLiteral<1>; streamId: z.ZodString; partitionId: z.ZodString; eventType: z.ZodString; source: z.ZodObject<{ kind: z.ZodString; sourceId: z.ZodString; }, z.core.$strict>; content: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"inline-json">; contentHash: z.ZodString; body: z.ZodType>; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"content-addressed">; contentHash: z.ZodString; }, z.core.$strict>], "kind">; provenanceHash: z.ZodString; transformation: z.ZodObject<{ id: z.ZodString; schemaVersion: z.ZodNumber; }, z.core.$strict>; hashAlgorithm: z.ZodLiteral<"jcs-sha256-v1">; eventId: z.ZodString; }, z.core.$strict>; export type DappEventDraftPreimage = z.infer; export declare const DappEventDraftZod: z.ZodObject<{ schema: z.ZodLiteral<"network.xyo.dapp.event" & { readonly __schema: true; }>; schemaVersion: z.ZodLiteral<1>; streamId: z.ZodString; partitionId: z.ZodString; eventType: z.ZodString; source: z.ZodObject<{ kind: z.ZodString; sourceId: z.ZodString; }, z.core.$strict>; content: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"inline-json">; contentHash: z.ZodString; body: z.ZodType>; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"content-addressed">; contentHash: z.ZodString; }, z.core.$strict>], "kind">; provenanceHash: z.ZodString; transformation: z.ZodObject<{ id: z.ZodString; schemaVersion: z.ZodNumber; }, z.core.$strict>; hashAlgorithm: z.ZodLiteral<"jcs-sha256-v1">; eventId: z.ZodString; fingerprint: z.ZodString; }, z.core.$strict>; export type DappEventDraft = z.infer; export declare const DappEventStreamAppendInputZod: z.ZodObject<{ draft: z.ZodObject<{ schema: z.ZodLiteral<"network.xyo.dapp.event" & { readonly __schema: true; }>; schemaVersion: z.ZodLiteral<1>; streamId: z.ZodString; partitionId: z.ZodString; eventType: z.ZodString; source: z.ZodObject<{ kind: z.ZodString; sourceId: z.ZodString; }, z.core.$strict>; content: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"inline-json">; contentHash: z.ZodString; body: z.ZodType>; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"content-addressed">; contentHash: z.ZodString; }, z.core.$strict>], "kind">; provenanceHash: z.ZodString; transformation: z.ZodObject<{ id: z.ZodString; schemaVersion: z.ZodNumber; }, z.core.$strict>; hashAlgorithm: z.ZodLiteral<"jcs-sha256-v1">; eventId: z.ZodString; fingerprint: z.ZodString; }, z.core.$strict>; }, z.core.$strict>; export type DappEventStreamAppendInput = z.infer; export declare const DappEventRecordZod: z.ZodObject<{ schema: z.ZodLiteral<"network.xyo.dapp.event.record" & { readonly __schema: true; }>; schemaVersion: z.ZodLiteral<1>; sequence: z.ZodNumber; event: z.ZodObject<{ schema: z.ZodLiteral<"network.xyo.dapp.event" & { readonly __schema: true; }>; schemaVersion: z.ZodLiteral<1>; streamId: z.ZodString; partitionId: z.ZodString; eventType: z.ZodString; source: z.ZodObject<{ kind: z.ZodString; sourceId: z.ZodString; }, z.core.$strict>; content: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"inline-json">; contentHash: z.ZodString; body: z.ZodType>; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"content-addressed">; contentHash: z.ZodString; }, z.core.$strict>], "kind">; provenanceHash: z.ZodString; transformation: z.ZodObject<{ id: z.ZodString; schemaVersion: z.ZodNumber; }, z.core.$strict>; hashAlgorithm: z.ZodLiteral<"jcs-sha256-v1">; eventId: z.ZodString; fingerprint: z.ZodString; }, z.core.$strict>; }, z.core.$strict>; export type DappEventRecord = z.infer; export declare const DappEventAppendDecisionZod: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"appended">; nextTail: z.ZodNumber; record: z.ZodObject<{ schema: z.ZodLiteral<"network.xyo.dapp.event.record" & { readonly __schema: true; }>; schemaVersion: z.ZodLiteral<1>; sequence: z.ZodNumber; event: z.ZodObject<{ schema: z.ZodLiteral<"network.xyo.dapp.event" & { readonly __schema: true; }>; schemaVersion: z.ZodLiteral<1>; streamId: z.ZodString; partitionId: z.ZodString; eventType: z.ZodString; source: z.ZodObject<{ kind: z.ZodString; sourceId: z.ZodString; }, z.core.$strict>; content: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"inline-json">; contentHash: z.ZodString; body: z.ZodType>; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"content-addressed">; contentHash: z.ZodString; }, z.core.$strict>], "kind">; provenanceHash: z.ZodString; transformation: z.ZodObject<{ id: z.ZodString; schemaVersion: z.ZodNumber; }, z.core.$strict>; hashAlgorithm: z.ZodLiteral<"jcs-sha256-v1">; eventId: z.ZodString; fingerprint: z.ZodString; }, z.core.$strict>; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"duplicate">; nextTail: z.ZodNumber; record: z.ZodObject<{ schema: z.ZodLiteral<"network.xyo.dapp.event.record" & { readonly __schema: true; }>; schemaVersion: z.ZodLiteral<1>; sequence: z.ZodNumber; event: z.ZodObject<{ schema: z.ZodLiteral<"network.xyo.dapp.event" & { readonly __schema: true; }>; schemaVersion: z.ZodLiteral<1>; streamId: z.ZodString; partitionId: z.ZodString; eventType: z.ZodString; source: z.ZodObject<{ kind: z.ZodString; sourceId: z.ZodString; }, z.core.$strict>; content: z.ZodDiscriminatedUnion<[z.ZodObject<{ kind: z.ZodLiteral<"inline-json">; contentHash: z.ZodString; body: z.ZodType>; }, z.core.$strict>, z.ZodObject<{ kind: z.ZodLiteral<"content-addressed">; contentHash: z.ZodString; }, z.core.$strict>], "kind">; provenanceHash: z.ZodString; transformation: z.ZodObject<{ id: z.ZodString; schemaVersion: z.ZodNumber; }, z.core.$strict>; hashAlgorithm: z.ZodLiteral<"jcs-sha256-v1">; eventId: z.ZodString; fingerprint: z.ZodString; }, z.core.$strict>; }, z.core.$strict>; }, z.core.$strict>, z.ZodObject<{ eventId: z.ZodString; existingFingerprint: z.ZodString; incomingFingerprint: z.ZodString; kind: z.ZodLiteral<"collision">; nextTail: z.ZodNumber; }, z.core.$strict>], "kind">; export type DappEventAppendDecision = z.infer; /** * Atomically allocate one partition sequence or return the existing allocation. * The event-ID index, record, and next tail are one durability boundary. */ export interface DappEventStreamAppendPort { append(input: DappEventStreamAppendInput): Promise; } /** Read a finite contiguous partition snapshot without waiting for later appends. */ export interface DappEventStreamReadPort { read(input: DappEventStreamReadInput & { readonly signal?: AbortSignal; }): AsyncIterable; /** Return the partition's next unallocated sequence. */ tail(input: DappEventStreamPartition): Promise; } export interface DappEventStreamPort extends DappEventStreamAppendPort, DappEventStreamReadPort { } export declare function hashDappEventId(value: unknown): string; export declare function hashDappEventFingerprint(value: unknown): string; export declare function createDappEventDraft(value: unknown): DappEventDraft; export declare function verifyDappEventDraft(value: unknown): DappEventDraft; export declare function createDappEventRecord(draftValue: unknown, sequenceValue: unknown): DappEventRecord; export declare function verifyDappEventRecord(value: unknown): DappEventRecord; export declare function verifyDappEventAppendDecision(value: unknown, draftValue: unknown): DappEventAppendDecision; export declare function decideDappEventAppend(input: { readonly draft: unknown; readonly existing?: unknown; readonly tail: unknown; }): DappEventAppendDecision; //# sourceMappingURL=eventStream.d.ts.map