Function getUrisForMetadataIds

  • This returns the URIs for a specific Metadata ID. Returns an empty array if not found.

    Type Parameters

    Parameters

    Returns string[]

    The badge metadata array is the timeline values (BadgeMetadataTimeline.badgeMetadata), not the cached fetched values from the API.

    import { getUrisForMetadataId } from 'bitbadgesjs-sdk'
    const collection: BitBadgesCollection<bigint> = { ... }
    const metadataId = 123n
    const uris = getUrisForMetadataId(metadataId, collection.getBadgeMetadataTimelineValue())

    This can also be used with the BitBadges collection interface

    import { BitBadgesCollection } from 'bitbadgesjs-sdk'
    const collection: BitBadgesCollection<bigint> = { ... }
    const metadataId = 123n
    const uris = collection.getUrisForMetadataId(metadataId)