UNPKG

@atproto/repo

Version:

atproto repo and MST implementation

18 lines 1.06 kB
import { Cid } from '@atproto/lex-data'; import { ReadableBlockstore } from '../storage/index.js'; import { MstOpts, NodeData, NodeEntry } from './mst.js'; export declare const leadingZerosOnHash: (key: string | Uint8Array) => Promise<number>; export declare const layerForEntries: (entries: NodeEntry[]) => Promise<number | null>; export declare const deserializeNodeData: (storage: ReadableBlockstore, data: NodeData, opts?: Partial<MstOpts>) => Promise<NodeEntry[]>; export declare const serializeNodeData: (entries: NodeEntry[]) => NodeData; export declare const countPrefixLen: (a: string, b: string) => number; export declare const cidForEntries: (entries: NodeEntry[]) => Promise<Cid>; export declare const isValidMstKey: (str: string) => boolean; export declare const validCharsRegex: RegExp; export declare const isValidChars: (str: string) => boolean; export declare const ensureValidMstKey: (str: string) => void; export declare class InvalidMstKeyError extends Error { key: string; constructor(key: string); } //# sourceMappingURL=util.d.ts.map