import { Result, URI } from "@adviser/cement"; import { FPEnvelopeMeta, SerializedMeta, V2SerializedMetaKey, Gateway, Loadable, FPEnvelope, SerdeGateway, SerdeGatewayCtx } from "@fireproof/core-types-blockstore"; import { NotFoundError } from "@fireproof/core-types-base"; type V1SerializedMetaKey = SerializedMeta & { readonly key?: string | string[]; readonly keys?: string[]; }; export declare function V2SerializedMetaKeyExtractKey(ctx: SerdeGatewayCtx, v2: V2SerializedMetaKey): Promise>; export declare function decodeAsToSerializedMeta(ctx: SerdeGatewayCtx, raw: Uint8Array): Promise>; export declare function addKeyToDbMetaDecoder(ctx: SerdeGatewayCtx & { readonly lastDecodedMetas?: V2SerializedMetaKey[]; }): SerdeGatewayCtx & { lastDecodedMetas: V2SerializedMetaKey[]; }; export declare function encodeAsV1SerializedMetaKey(ctx: SerdeGatewayCtx, payload: SerializedMeta[]): Promise>; export declare function encodeAsV2SerializedMetaKey(ctx: SerdeGatewayCtx, payload: SerializedMeta[]): Promise>; export declare function addKeyToDbMetaEncoder(ctx: SerdeGatewayCtx, version: "v1" | "v2"): SerdeGatewayCtx; export declare class AddKeyToDbMetaGateway implements SerdeGateway { private readonly sdGw; readonly version: "v1" | "v2"; constructor(gw: Gateway, version: "v1" | "v2"); buildUrl(ctx: SerdeGatewayCtx, baseUrl: URI, key: string): Promise>; start(ctx: SerdeGatewayCtx, baseUrl: URI): Promise>; close(ctx: SerdeGatewayCtx, baseUrl: URI): Promise>; put(ctx: SerdeGatewayCtx, url: URI, body: FPEnvelope): Promise>; get(ctx: SerdeGatewayCtx, url: URI): Promise, Error | NotFoundError>>; readonly lastDecodedMetas: V2SerializedMetaKey[]; delete(ctx: SerdeGatewayCtx, url: URI, loader?: Loadable): Promise>; subscribe(ctx: SerdeGatewayCtx, url: URI, callback: (meta: FPEnvelopeMeta) => Promise): Promise void, Error>>; getPlain(ctx: SerdeGatewayCtx, url: URI, key: string): Promise>; destroy(ctx: SerdeGatewayCtx, baseUrl: URI): Promise>; } export {};