import { MapDB } from '@ethereumjs/util'; import { StateNetworkContentType } from './types.js'; import type { TAccountTrieNodeKey, TContractCodeKey, TNibbles, TStorageTrieNodeKey } from './types.js'; import type { DB, EncodingOpts } from '@ethereumjs/util'; import type { AbstractLevel } from 'abstract-level'; export declare const keyType: (contentKey: Uint8Array) => StateNetworkContentType; export declare class AccountTrieNodeContentKey { static encode({ path, nodeHash }: TAccountTrieNodeKey): Uint8Array; static decode(key: Uint8Array): TAccountTrieNodeKey; } export declare class StorageTrieNodeContentKey { static encode({ address, path, nodeHash }: TStorageTrieNodeKey): Uint8Array; static decode(key: Uint8Array): TStorageTrieNodeKey; } export declare class ContractCodeContentKey { static encode({ address, codeHash }: TContractCodeKey): Uint8Array; static decode(key: Uint8Array): TContractCodeKey; } export type TStateNetworkContentKey = TAccountTrieNodeKey | TStorageTrieNodeKey | TContractCodeKey; export declare class StateNetworkContentKey { static encode(opts: TAccountTrieNodeKey | TStorageTrieNodeKey | TContractCodeKey): Uint8Array; static decode(key: Uint8Array): TStateNetworkContentKey; } export declare class StateNetworkContentId { static fromKeyObj(key: TAccountTrieNodeKey | TStorageTrieNodeKey | TContractCodeKey): Uint8Array; static fromBytes(key: Uint8Array): Uint8Array; } export declare function wrapDBContent(contentKey: Uint8Array, dbContent: string): string; export declare function calculateAddressRange(address: bigint, radius: bigint): { min: bigint; max: bigint; }; export declare const compareDistance: (nodeId: string, nodeA: Uint8Array, nodeB: Uint8Array) => Uint8Array; export declare class PortalTrieDB extends MapDB implements DB { db: AbstractLevel; temp: Map; constructor(db: AbstractLevel); put(key: string, value: string): Promise; get(key: string, _opts?: EncodingOpts): Promise; del(key: string): Promise; keys(): Promise<[string]>; tempKeys(): IterableIterator; } export declare function getDatabaseKey(contentKey: Uint8Array): string; export declare function getDatabaseContent(type: StateNetworkContentType, content: Uint8Array): string; export declare function nextOffer(path: TNibbles, proof: Uint8Array[]): Promise<{ curRlp: Uint8Array; nodes: Uint8Array[]; newpaths: ("0" | "1" | "2" | "c" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "a" | "b" | "d" | "e" | "f")[]; }>; //# sourceMappingURL=util.d.ts.map