@gala-chain/api ∙ API
API > TokenHold
Class: TokenHold
Contents
- Constructors
- new TokenHold(params)
- Properties
- created
- createdBy
- expires
- instanceId
- lockAuthority
- name
- quantity
- DEFAULT_EXPIRES
- Methods
- isExpired()
- matches()
- createValid()
- sortByAscendingExpiration()
Constructors
new TokenHold(params)
new TokenHold(
params
?):TokenHold
Parameters
▪ params?: object
▪ params.created?: number
▪ params.createdBy?: string
▪ params.expires?: number
▪ params.instanceId?: BigNumber
▪ params.lockAuthority?: string
▪ params.name?: string
▪ params.quantity?: BigNumber
Source
chain-api/src/types/TokenBalance.ts:595
Properties
created
readonly
created:number
Source
chain-api/src/types/TokenBalance.ts:575
createdBy
readonly
createdBy:string
Source
chain-api/src/types/TokenBalance.ts:562
expires
readonly
expires:number
Source
chain-api/src/types/TokenBalance.ts:579
instanceId
readonly
instanceId:BigNumber
Source
chain-api/src/types/TokenBalance.ts:567
lockAuthority
lockAuthority?:
string
Source
chain-api/src/types/TokenBalance.ts:593
name
readonly
name?:string
Source
chain-api/src/types/TokenBalance.ts:583
quantity
readonly
quantity:BigNumber
Source
chain-api/src/types/TokenBalance.ts:571
DEFAULT_EXPIRES
static
readonly
DEFAULT_EXPIRES:0
=0
Source
chain-api/src/types/TokenBalance.ts:559
Methods
isExpired()
isExpired(
currentTime
):boolean
Parameters
▪ currentTime: number
Source
chain-api/src/types/TokenBalance.ts:642
matches()
matches(
instanceId
,name
):boolean
Parameters
▪ instanceId: BigNumber
▪ name: undefined
| string
Source
chain-api/src/types/TokenBalance.ts:638
createValid()
static
createValid(params
):Promise
\<TokenHold
>
Parameters
▪ params: object
▪ params.created: number
▪ params.createdBy: string
▪ params.expires: undefined
| number
▪ params.instanceId: BigNumber
▪ params.lockAuthority: undefined
| string
▪ params.name: undefined
| string
▪ params.quantity: BigNumber
Source
chain-api/src/types/TokenBalance.ts:619
sortByAscendingExpiration()
static
sortByAscendingExpiration(a
,b
):0
|1
|-1
Parameters
▪ a: TokenHold
▪ b: TokenHold