UNPKG

@atproto/repo

Version:

atproto repo and MST implementation

18 lines 1.05 kB
import { CID } from 'multiformats'; import { ReadableBlockstore } from '../storage'; import { MstOpts, NodeData, NodeEntry } from './mst'; 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