UNPKG

@etherna/sdk-js

Version:

Etherna SDKs for operations on the network

39 lines 1.49 kB
import type { Reference } from "../clients"; import type { EpochIndex } from "./EpochIndex"; declare global { interface Uint8Array { toUnixTimestamp(): bigint; toUnixDate(): Date; } interface Date { toUnixTimestamp(): bigint; toBytes(): Uint8Array; } interface BigInt { toDate(): Date; normalized(): bigint; } } export declare class EpochFeedChunk { index: EpochIndex; payload: Uint8Array; reference: Reference; static readonly AccountBytesLength = 20; static readonly IdentifierBytesLength = 32; static readonly IndexBytesLength = 32; static readonly MaxPayloadBytesSize = 3991; static readonly ReferenceHashRegex: RegExp; static readonly TimeStampByteSize = 8; static readonly TopicBytesLength = 32; static readonly MinPayloadByteSize = 8; static readonly MaxContentPayloadBytesSize: number; timestamp: Date | null; constructor(index: EpochIndex, payload: Uint8Array, reference: Reference); isEqual(chunk: EpochFeedChunk): boolean; getContentPayload(): Uint8Array; static buildChunkPayload(contentPayload: Uint8Array, at?: Date): Uint8Array; static buildIdentifier(topic: Uint8Array, index: EpochIndex): Uint8Array; static buildReferenceHash(account: string, identifier: Uint8Array): Reference; static buildReferenceHash(account: string, topic: Uint8Array, index: EpochIndex): Reference; } //# sourceMappingURL=EpochFeedChunk.d.ts.map