Function: parseTokenClassKey
parseTokenClassKey(
tokenClassKey):GalaChainTokenClassKey
Parse a pipe- or dollar-separated token class key.
The LAST three segments are always category, type and additionalKey; everything before
them is the collection. Parsing from the right is required because real collections contain
the $ delimiter themselves (for example $GMUSIC), so a plain left-to-right split('$')
shifts every field. Nothing here says anything about the token's symbol: a class key carries
no symbol, which must come from the token class or trading-symbol registry.
token class key gala chain additional
Parameters
| Parameter | Type |
|---|---|
tokenClassKey | TokenRef |
token class key ref
Returns
GalaChainTokenClassKey
gala chain token class key
Example
parseTokenClassKey('$GMUSIC$Unit$none$none').collection; // '$GMUSIC'