Skip to content

ResolveDenom maps a wrapped (badges:) or alias (badgeslp:) Cosmos denom back to its collection ID, matched token ID, and path metadata.

Resolves a tokenization wrapped (badges:<collectionId>:<baseDenom>) or alias (badgeslp:<collectionId>:<baseDenom>) Cosmos denom back to its source collection ID, matched token ID (for {id} placeholder wrapper paths), and full path definition.

Example

bash
curl "https://lcd.bitbadges.io/bitbadges/bitbadgeschain/tokenization/resolve_denom/badges%3A1%3Autoken"
curl "https://lcd.bitbadges.io/bitbadges/bitbadgeschain/tokenization/resolve_denom/badgeslp%3A1%3Amylp"

Request

FieldTypeDescription
denomstringFull wrapped (badges:<collectionId>:<baseDenom>) or alias (badgeslp:<collectionId>:<baseDenom>) denom.

Response

json
{
  "pathType": "wrapper",
  "collectionId": "1",
  "baseDenom": "nft-42",
  "matchedTokenId": "42",
  "wrapperPath": {
    "denom": "nft-{id}",
    "symbol": "NFT",
    "allowOverrideWithAnyValidToken": true,
    "conversion": {
      "sideA": { "amount": "1" },
      "sideB": [
        {
          "amount": "1",
          "tokenIds": [{ "start": "1", "end": "1" }],
          "ownershipTimes": [{ "start": "1", "end": "18446744073709551615" }]
        }
      ]
    }
  }
}
FieldTypeDescription
pathTypestring"wrapper" for badges: denoms, "alias" for badgeslp: denoms.
collectionIdstringResolved collection ID.
baseDenomstringDenom suffix after <prefix><collectionId>:.
matchedTokenIdstringExtracted canonical token ID when matched via a {id} placeholder wrapper path; empty for exact matches and aliases.
wrapperPathCosmosCoinWrapperPathPopulated when pathType is "wrapper".
aliasPathAliasPathPopulated when pathType is "alias".

Behavior

  • Exact wrapper path matches take precedence over {id} placeholder matches.
  • Placeholder {id} matches require allowOverrideWithAnyValidToken: true, a canonical positive integer token ID (no leading zeros), and membership in collection.validTokenIds.
  • Fails with InvalidArgument if denom is empty, lacks the badges: or badgeslp: prefix, or is malformed; fails with NotFound if the collection or matching path does not exist.
  • Also callable from Solidity via resolveDenom on the tokenization precompile (0x1001).

Edit this page on GitHub