classifyKind
@totemsdk/realtime / classifyKind
Function: classifyKind()
classifyKind(
tokenid,decimals,total,artimage):"native"|"token"|"nft"
Classify a portfolio entry based on its fields.
All three conditions must be met for 'nft':
- artimage is present (non-empty string)
- decimals === 0
- total === '1'
Everything else with a non-'0x00' tokenid is 'token'.
Parameters
tokenid
string
decimals
number
total
string
artimage
string | undefined
Returns
"native" | "token" | "nft"