Function: parseTokenId()
GalaChain core SDK 1.0.0-rc.8 / bridge / parseTokenId
Function: parseTokenId()
parseTokenId(
tokenId):ParsedTokenId
Defined in: packages/gala-core-sdk/dist/bridge.d.ts:2668
Parse a TokenId (string or object) to TokenClassKey and stringified form.
Parameters
tokenId
Token identifier (pipe-delimited string or TokenClassKey object)
Returns
Parsed token with TokenClassKey and stringified form
Throws
GalaSDKError INVALID_TOKEN_REFERENCE (tokenId, bad_class_key) if it is neither
Example
parseTokenId('GALA|Unit|none|none');
parseTokenId({ collection: 'GALA', category: 'Unit', type: 'none', additionalKey: 'none' });