Optional
_isWhether the metadata is currently being updated.
Optional
additionalHeader links for this item displayed right under the title
Optional
attributesThe attributes for this item
Optional
bannerThe banner image for this item.
Optional
categoryThe category for this item (e.g. "Education", "Attendance").
The description of this item. Supports markdown.
Optional
externalThe external URL for this item.
Optional
fetchedThe time the metadata was fetched.
Optional
fetchedThe block the metadata was fetched at.
The image for this item.
The name of this item.
Optional
offThe off-chain transferability info for this item (used for badges - off-chain, disregard for others)
Optional
socialsThe socials for this item
Optional
tagsThe tags for this item
Optional
videoThe video for this item. 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.
Deep copies the object and returns a new instance.
Converts the object to a different NumberType equivalent.
Optional
options: ConvertOptionsCompares 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").
Optional
normalizeNumberTypes: booleanInternal helper method to convert the number fields of the object to a different NumberType equivalent.
Checks if the object has number fields.
Converts the object to a JSON object with all primitive types.
Converts the object to a JSON string.
Static
DefaultReturns a new Metadata object with default placeholder values. By default, it returns as .convert
method.
import { Numberify } from 'bitbadgesjs-sdk'
const metadata = Metadata.DefaultPlaceholderMetadata().convert(Numberify)
Static
ErrorReturns a new Metadata object with default placeholder values. By default, it returns as .convert
method.
import { Numberify } from 'bitbadgesjs-sdk'
const metadata = Metadata.ErrorMetadata().convert(Numberify)