import { PublicSignKey } from "@peerbit/crypto"; import { type AppendOptions, type Change, Entry } from "@peerbit/log"; import { Program, type ProgramEvents } from "@peerbit/program"; import { RPC, type RPCRequestOptions, type RequestContext } from "@peerbit/rpc"; import { type ReplicationDomainHash, SharedLog, type SharedLogOptions } from "@peerbit/shared-log"; import { AbstractSearchResult, SearchRequest } from "./query.js"; import { Range } from "./range.js"; import { StringIndex, StringOperation } from "./string-index.js"; export declare const STRING_STORE_TYPE = "string_store"; export type CanRead = (key?: PublicSignKey) => Promise | boolean; export interface StringEvents { change: CustomEvent>; } export type CanPerform = (operation: StringOperation, context: TransactionContext) => Promise | boolean; export type Args = { canRead?: CanRead; canPerform?: CanPerform; log?: SharedLogOptions>; }; export type TransactionContext = { entry: Entry; }; export declare class DString extends Program { _log: SharedLog; query: RPC; _index: StringIndex; _canRead?: CanRead; constructor(properties: { id?: Uint8Array; query?: RPC; }); open(options?: Args): Promise; private _canPerform; add(value: string, index: Range, options?: AppendOptions): Promise<{ entry: Entry; removed: import("@peerbit/log").ShallowOrFullEntry[]; }>; del(index: Range, options?: AppendOptions): Promise<{ entry: Entry; removed: import("@peerbit/log").ShallowOrFullEntry[]; }>; queryHandler(query: SearchRequest, ctx: RequestContext): Promise; getValue(options?: { remote: { callback: (string: string) => any; queryOptions: RPCRequestOptions; }; }): Promise; } //# sourceMappingURL=string-store.d.ts.map