import { Hash, HoprDB, UINT256 } from '@hoprnet/hopr-utils'; import type { PeerId } from '@libp2p/interface-peer-id'; export declare const DB_ITERATION_BLOCK_SIZE = 10000; export declare const TOTAL_ITERATIONS = 100000; export declare function findCommitmentPreImage(db: HoprDB, channelId: Hash): Promise; export declare function bumpCommitment(db: HoprDB, channelId: Hash, newCommitment: Hash): Promise; type GetCommitment = () => Promise; type SetCommitment = (commitment: Hash) => Promise; /** * Simple class encapsulating channel information * used to generate the initial channel commitment. */ export declare class ChannelCommitmentInfo { readonly chainId: number; readonly contractAddress: string; readonly channelId: Hash; readonly channelEpoch: UINT256; constructor(chainId: number, contractAddress: string, channelId: Hash, channelEpoch: UINT256); /** * Generate the initial commitment seed using this channel information and the given * private node key. * All members need to be specified (non-null). * @param peerId Local node ID. */ createInitialCommitmentSeed(peerId: PeerId): Uint8Array; } export declare function initializeCommitment(db: HoprDB, peerId: PeerId, channelInfo: ChannelCommitmentInfo, getChainCommitment: GetCommitment, setChainCommitment: SetCommitment): Promise; export {}; //# sourceMappingURL=commitment.d.ts.map