api.entities.Checkpoint.Checkpoint - PolymeshAssociation/polymesh-sdk GitHub Wiki
api/entities/Checkpoint.Checkpoint
Represents a snapshot of the Asset's holders and their respective balances at a certain point in time
-
Entity
<UniqueIdentifiers
,HumanReadable
>↳
Checkpoint
• asset: FungibleAsset
Asset whose balances are being recorded in this Checkpoint
• id: BigNumber
Checkpoint identifier number
• uuid: string
▸ allBalances(paginationOpts?
): Promise
<ResultSet
<IdentityBalance
>>
Retrieve all Asset Holder balances at this Checkpoint
Name | Type |
---|---|
paginationOpts? |
PaginationOptions |
Promise
<ResultSet
<IdentityBalance
>>
Note
supports pagination
Note
current Asset holders who didn't hold any tokens when the Checkpoint was created will be listed with a balance of 0. This arises from a chain storage optimization and pagination.
See
balance for a more detailed explanation of the logic
api/entities/Checkpoint.ts:107
▸ balance(args?
): Promise
<BigNumber
>
Retrieve the balance of a specific Asset Holder Identity at this Checkpoint
Name | Type | Description |
---|---|---|
args? |
Object |
- |
args.identity |
string | Identity
|
defaults to the signing Identity |
Promise
<BigNumber
>
Note
A checkpoint only records balances when they change. The implementation is to query for all balance updates for [ticker, did] pair. If no balance updates have happened since the Checkpoint has been created, then the storage will not have an entry for the user. Instead the current balance should be used. The balance is stored only when the Identity makes a transaction after a Checkpoint is created. This helps keep storage usage to a minimum
api/entities/Checkpoint.ts:201
▸ createdAt(): Promise
<Date
>
Retrieve this Checkpoint's creation date
Promise
<Date
>
▸ exists(): Promise
<boolean
>
Determine whether this Checkpoint exists on chain
Promise
<boolean
>
api/entities/Checkpoint.ts:246
▸ isEqual(entity
): boolean
Determine whether this Entity is the same as another one
Name | Type |
---|---|
entity |
Entity <unknown , unknown > |
boolean
▸ toHuman(): HumanReadable
Return the Checkpoint's ticker and identifier
api/entities/Checkpoint.ts:268
▸ totalSupply(): Promise
<BigNumber
>
Retrieve the Asset's total supply at this checkpoint
Promise
<BigNumber
>
▸ Static
generateUuid<Identifiers
>(identifiers
): string
Generate the Entity's UUID from its identifying properties
Name |
---|
Identifiers |
Name | Type |
---|---|
identifiers |
Identifiers |
string
▸ Static
unserialize<Identifiers
>(serialized
): Identifiers
Unserialize a UUID into its Unique Identifiers
Name |
---|
Identifiers |
Name | Type | Description |
---|---|---|
serialized |
string |
UUID to unserialize |
Identifiers