Class FetchDoc<T>

Type Parameters

Hierarchy (view full)

Implements

Constructors

Properties

_docId: string

A unique stringified document ID

_id?: string

A unique document ID (Mongo DB ObjectID)

content?: Metadata<T> | ApprovalInfoDetails<T> | {
    [cosmosAddressOrListId: string]: BalanceArray<T>;
} | ChallengeDetails<T>

The content of the fetch document. Note that we store balances in BALANCES_DB and not here to avoid double storage.

Type declaration

db: "ApprovalInfo" | "Metadata" | "Balances" | "ChallengeInfo"

The type of content fetched. This is used for querying purposes

fetchedAt: T

The time the document was fetched

fetchedAtBlock: T

The block the document was fetched

isPermanent: boolean

True if the document is permanent (i.e. fetched from a permanent URI like IPFS)

Methods

  • Compares this object's fields to another object's fields for equality. Equality is determined by comparing the JSON representations of the objects.

    If normalizeNumberTypes is true, then all number types will be compared as strings (i.e. "1n" === "1" === 1). Else, they will be compared as their native types (i.e. 1n !== 1 !== "1").

    Type Parameters

    Parameters

    • other: undefined | null | CustomType<U>
    • Optional normalizeNumberTypes: boolean

    Returns boolean