Skip to main content

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.

Parameters​

ParameterType
tokenClassKeyTokenRef

Returns​

GalaChainTokenClassKey

Example​

parseTokenClassKey('$GMUSIC$Unit$none$none').collection; // '$GMUSIC'