Skip to content

Contract for a per-standard info builder. Implementations live in the indexer (where extra fetches are available) and are registered into the builders map…

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/info-builders.ts:74

Contract for a per-standard info builder. Implementations live in the indexer (where extra fetches are available) and are registered into the builders map passed to buildStandardsInfo.

A builder owns EVERYTHING about its standard:

  • build() produces the live standardsInfo (fetch-time, attached to the collection response).
  • index() maps that same computed info into the persisted, indexable CollectionIndexProjection. Omit it to fall back to a status-only projection ({ status: info.status, extras: info }).
  • expiry declares the standard's clock-only status transition, if any.

Type Parameters

TInfo

TInfo

Properties

expiry?

readonly optional expiry?: StandardExpiryRule

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/info-builders.ts:80

Clock-only status transition for the query layer, if this standard has one.


standardName

readonly standardName: string

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/info-builders.ts:75

Methods

build()

build(collection, ctx): Promise<TInfo | null>

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/info-builders.ts:76

Parameters

collection

BitBadgesCollection<bigint>

ctx

StandardInfoCtx

Returns

Promise<TInfo | null>


index()?

optional index(collection, info, ctx): CollectionIndexProjection

Defined in: packages/bitbadgesjs-sdk/src/api-indexer/info-builders.ts:78

Map the built info → persisted, indexable projection.

Parameters

collection

BitBadgesCollection<bigint>

info

TInfo

ctx

StandardInfoCtx

Returns

CollectionIndexProjection

Edit this page on GitHub