Class BadgeMetadata<T>

BadgeMetadata is used to represent the metadata for a range of badge IDs. The metadata can be hosted via a URI (via uri) or stored on-chain (via customData).

We take first-match only for the badge IDs. If a badge ID is in multiple BadgeMetadata, we take the first match in a linear search.

Type Parameters

Hierarchy (view full)




badgeIds: UintRangeArray<T>

The badge IDs corresponding to the URI.

customData: string

Arbitrary custom data that can be stored on-chain

uri: string

The URI where to fetch the badge metadata from.


  • 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


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

    Returns boolean