Function getUrisForMetadataIds

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

    Type Parameters

    Parameters

    Returns string[]

    Remarks

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

    Example

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

    Example

    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)