This function returns the Metadata IDs for a specific badge URI. Returns an empty array if not found.
The badge metadata array is the timeline values (BadgeMetadataTimeline.badgeMetadata), not the cached fetched values from the API.
import { getMetadataIdsForUri } from 'bitbadgesjs-sdk'const collection: BitBadgesCollection<bigint> = { ... }const uri = 'https://bitbadges.io/collection/1/badge/1'const metadataIds = getMetadataIdsForUri(uri, collection.getBadgeMetadataTimelineValue()) Copy
import { getMetadataIdsForUri } from 'bitbadgesjs-sdk'const collection: BitBadgesCollection<bigint> = { ... }const uri = 'https://bitbadges.io/collection/1/badge/1'const metadataIds = getMetadataIdsForUri(uri, collection.getBadgeMetadataTimelineValue())
This can also be used with the BitBadges collection interface
import { BitBadgesCollection } from 'bitbadgesjs-sdk'const collection: BitBadgesCollection<bigint> = { ... }const uri = 'https://bitbadges.io/collection/1/badge/1'const metadataIds = collection.getMetadataIdsForUri(uri) Copy
import { BitBadgesCollection } from 'bitbadgesjs-sdk'const collection: BitBadgesCollection<bigint> = { ... }const uri = 'https://bitbadges.io/collection/1/badge/1'const metadataIds = collection.getMetadataIdsForUri(uri)
This function returns the Metadata IDs for a specific badge URI. Returns an empty array if not found.
Remarks
The badge metadata array is the timeline values (BadgeMetadataTimeline.badgeMetadata), not the cached fetched values from the API.
Example
Example
This can also be used with the BitBadges collection interface