UNPKG

@etherna/sdk-js

Version:

Etherna SDKs for operations on the network

33 lines 1.11 kB
export declare class EpochIndex { static readonly maxLevel = 32n; static readonly minLevel = 0n; static readonly maxStart: bigint; static readonly maxUnixTimeStamp: bigint; static readonly minUnixTimeStamp = 0n; /** Epoch start in seconds */ start: bigint; /** Epoch level (32 to 0) */ level: number; constructor(start: bigint, level: number | bigint); get isLeft(): boolean; get isRight(): boolean; get length(): bigint; get marshalBinary(): Uint8Array; get left(): EpochIndex; get right(): EpochIndex; static fromString(epochString: string): EpochIndex; containsTime(at: Date): boolean; getChildAt(at: Date): EpochIndex; getNext(at: Date): EpochIndex; getParent(): EpochIndex; isEqual(other: EpochIndex): boolean; /** * Calculates the lowest common ancestor epoch given two unix times * @param t0 * @param t1 * @returns Lowest common ancestor epoch index */ static lowestCommonAncestor(t0: bigint, t1: bigint): EpochIndex; toString(): string; } //# sourceMappingURL=EpochIndex.d.ts.map