ResolveDenom
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
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
| Field | Type | Description |
|---|---|---|
denom | string | Full wrapped (badges:<collectionId>:<baseDenom>) or alias (badgeslp:<collectionId>:<baseDenom>) denom. |
Response
{
"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" }]
}
]
}
}
}| Field | Type | Description |
|---|---|---|
pathType | string | "wrapper" for badges: denoms, "alias" for badgeslp: denoms. |
collectionId | string | Resolved collection ID. |
baseDenom | string | Denom suffix after <prefix><collectionId>:. |
matchedTokenId | string | Extracted canonical token ID when matched via a {id} placeholder wrapper path; empty for exact matches and aliases. |
wrapperPath | CosmosCoinWrapperPath | Populated when pathType is "wrapper". |
aliasPath | AliasPath | Populated when pathType is "alias". |
Behavior
- Exact wrapper path matches take precedence over
{id}placeholder matches. - Placeholder
{id}matches requireallowOverrideWithAnyValidToken: true, a canonical positive integer token ID (no leading zeros), and membership incollection.validTokenIds. - Fails with
InvalidArgumentifdenomis empty, lacks thebadges:orbadgeslp:prefix, or is malformed; fails withNotFoundif the collection or matching path does not exist. - Also callable from Solidity via
resolveDenomon the tokenization precompile (0x1001).