@gala-chain/api ∙ API
API > TokenInstance
Class: TokenInstance
Contents
- Extends
- Constructors
- new TokenInstance()
- Properties
- additionalKey
- category
- collection
- instance
- isNonFungible
- owner
- type
- COMPOSITEKEY_NS
- FUNGIBLE_TOKEN_INSTANCE
- ID_SPLIT_CHAR
- ID_SUB_SPLIT_CHAR
- INDEX_KEY
- MIN_UNICODE_RUNE_VALUE
- Methods
- GetCompositeKeyString()
- getCompositeKey()
- serialize()
- toPlainObject()
- validate()
- validateOrReject()
- CreateCompositeKey()
- GetCompositeKeyFromString()
- GetFungibleInstanceFromClass()
- buildInstanceKeyList()
- buildInstanceKeyObject()
- deserialize()
- getCompositeKeyFromParts()
- getStringKeyFromParts()
- isFungible()
- isNFT()
Extends
Constructors
new TokenInstance()
new TokenInstance():
TokenInstance
Inherited from
Properties
additionalKey
additionalKey:
string
Source
chain-api/src/types/TokenInstance.ts:250
category
category:
string
Source
chain-api/src/types/TokenInstance.ts:242
collection
collection:
string
Source
chain-api/src/types/TokenInstance.ts:238
instance
instance:
BigNumber
Source
chain-api/src/types/TokenInstance.ts:257
isNonFungible
isNonFungible:
boolean
Source
chain-api/src/types/TokenInstance.ts:260
owner
owner?:
string
Source
chain-api/src/types/TokenInstance.ts:264
type
type:
string
Source
chain-api/src/types/TokenInstance.ts:246
COMPOSITEKEY_NS
staticCOMPOSITEKEY_NS:string="\x00"
Inherited from
Source
chain-api/src/types/ChainObject.ts:43
FUNGIBLE_TOKEN_INSTANCE
staticFUNGIBLE_TOKEN_INSTANCE:BigNumber
Source
chain-api/src/types/TokenInstance.ts:268
ID_SPLIT_CHAR
staticID_SPLIT_CHAR:string="$"
Inherited from
Source
chain-api/src/types/ChainObject.ts:46
ID_SUB_SPLIT_CHAR
staticID_SUB_SPLIT_CHAR:string="|"
Inherited from
Source
chain-api/src/types/ChainObject.ts:48
INDEX_KEY
staticINDEX_KEY:string="GCTI2"
Source
chain-api/src/types/TokenInstance.ts:266
MIN_UNICODE_RUNE_VALUE
staticMIN_UNICODE_RUNE_VALUE:string="\u0000"
Inherited from
ChainObject.MIN_UNICODE_RUNE_VALUE
Source
chain-api/src/types/ChainObject.ts:41
Methods
GetCompositeKeyString()
GetCompositeKeyString():
string
Source
chain-api/src/types/TokenInstance.ts:272
getCompositeKey()
getCompositeKey():
string
Inherited from
Source
chain-api/src/types/ChainObject.ts:77
serialize()
serialize():
string
Inherited from
Source
chain-api/src/types/ChainObject.ts:50
toPlainObject()
toPlainObject():
Record\<string,unknown>
Inherited from
Source
chain-api/src/types/ChainObject.ts:66
validate()
validate():
Promise\<ValidationError[]>
Inherited from
Source
chain-api/src/types/ChainObject.ts:54
validateOrReject()
validateOrReject():
Promise\<void>
Inherited from
Source
chain-api/src/types/ChainObject.ts:58
CreateCompositeKey()
staticCreateCompositeKey(token):string
Parameters
▪ token: TokenInstanceKeyProperties
Source
chain-api/src/types/TokenInstance.ts:288
GetCompositeKeyFromString()
staticGetCompositeKeyFromString(tokenCid):string
Parameters
▪ tokenCid: string
Source
chain-api/src/types/TokenInstance.ts:298
GetFungibleInstanceFromClass()
staticGetFungibleInstanceFromClass(token):string
Parameters
▪ token: TokenClassKeyProperties
Source
chain-api/src/types/TokenInstance.ts:277
buildInstanceKeyList()
staticbuildInstanceKeyList(token): [string,string,string,string,string]
Parameters
▪ token: TokenInstanceKeyProperties
Source
chain-api/src/types/TokenInstance.ts:310
buildInstanceKeyObject()
staticbuildInstanceKeyObject(token):Promise\<TokenInstanceKey>
Parameters
▪ token: TokenInstanceKeyProperties
Source
chain-api/src/types/TokenInstance.ts:318
deserialize()
staticdeserialize\<T>(constructor,object):T
Type parameters
▪ T
Parameters
▪ constructor: ClassConstructor\<Inferred\<T, ChainObject>>
▪ object: string | Record\<string, unknown> | Record\<string, unknown>[]
Inherited from
Source
chain-api/src/types/ChainObject.ts:70
getCompositeKeyFromParts()
staticgetCompositeKeyFromParts(indexKey,parts):string
Parameters
▪ indexKey: string
▪ parts: unknown[]
Inherited from
ChainObject.getCompositeKeyFromParts
Source
chain-api/src/types/ChainObject.ts:102
getStringKeyFromParts()
staticgetStringKeyFromParts(parts):string
Parameters
▪ parts: string[]
Inherited from
ChainObject.getStringKeyFromParts
Source
chain-api/src/types/ChainObject.ts:122
isFungible()
staticisFungible(instanceId):boolean
Parameters
▪ instanceId: BigNumber
Source
chain-api/src/types/TokenInstance.ts:336
isNFT()
staticisNFT(instanceId):boolean
Parameters
▪ instanceId: BigNumber