Interface iMetadata<T>

interface iMetadata<T> {
    _isUpdating?: boolean;
    attributes?: {
        name: string;
        type?: "url" | "date";
        value: string | number | boolean;
    }[];
    category?: string;
    description: string;
    externalUrl?: string;
    fetchedAt?: T;
    fetchedAtBlock?: T;
    image: string;
    name: string;
    offChainTransferabilityInfo?: {
        assignMethod: string;
        host: string;
    };
    socials?: {
        [key: string]: string;
    };
    tags?: string[];
    video?: string;
}

Type Parameters

Implemented by

Properties

_isUpdating?: boolean

Whether the metadata is currently being updated.

attributes?: {
    name: string;
    type?: "url" | "date";
    value: string | number | boolean;
}[]

The attributes of the badge or badge collection

Type declaration

  • name: string
  • Optional type?: "url" | "date"
  • value: string | number | boolean
category?: string

The category of the badge or badge collection (e.g. "Education", "Attendance").

description: string

The description of the badge or badge collection. Supports markdown.

externalUrl?: string

The external URL of the badge or badge collection.

fetchedAt?: T

The time the metadata was fetched.

fetchedAtBlock?: T

The block the metadata was fetched at.

image: string

The image of the badge or badge collection.

name: string

The name of the badge or badge collection.

offChainTransferabilityInfo?: {
    assignMethod: string;
    host: string;
}

The off-chain transferability info of the badge or badge collection

Type declaration

  • assignMethod: string
  • host: string
socials?: {
    [key: string]: string;
}

The socials of the badge or badge collection

Type declaration

  • [key: string]: string
tags?: string[]

The tags of the badge or badge collection

video?: string

The video of the badge or badge collection. If a standard video is used, this should be a link to the video. We will use image as the poster image. If a youtube video is used, we embed it as an iframe.