UNPKG

@ickb/utils

Version:

General utilities built on top of CCC

20 lines 596 B
import { ccc } from "@ckb-ccc/core"; export type EpochLike = { number: ccc.Num; index: ccc.Num; length: ccc.Num; } | ccc.Epoch; export declare class Epoch { readonly number: ccc.Num; readonly index: ccc.Num; readonly length: ccc.Num; private constructor(); static from(epochLike: EpochLike): Epoch; static fromHex(hex: ccc.Hex): Epoch; toHex(): ccc.Hex; compare(other: EpochLike): 1 | 0 | -1; add(other: EpochLike): Epoch; sub(other: EpochLike): Epoch; toUnix(reference: ccc.ClientBlockHeader): bigint; } //# sourceMappingURL=epoch.d.ts.map