Function: parseInlineCustomData()
Parse + sanitize a free-form customData string into a Metadata object. Returns null on any failure (oversized, malformed JSON, wrong type, missing required…
parseInlineCustomData(
customData):Metadata<bigint> |null
Defined in: packages/bitbadgesjs-sdk/src/api-indexer/metadata/inlineCustomData.ts:108
Parse + sanitize a free-form customData string into a Metadata
object. Returns null on any failure (oversized, malformed JSON,
wrong type, missing required shape, etc.). Never throws, never
returns the raw parsed object.
Required shape gate: must have at least one of name, image, or
description as a non-empty string. Per-preset stricter shapes are
enforced at write time by builders / CLI; this read-side helper
stays permissive on optionals so legacy customData with name-only
still resolves.
Parameters
customData
string
Returns
Metadata<bigint> | null