# Checkpoint

Represents a snapshot of the Asset's holders and their respective balances at a certain point in time

## Hierarchy

* [Entity](https://developers.polymath.network/polymesh-sdk-api-reference/classes/entity)‹UniqueIdentifiers, [HumanReadable](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/humanreadable.md)›

  ↳ **Checkpoint**

## Index

### Properties

* [asset](#asset)
* [context](#protected-context)
* [id](#id)
* [uuid](#uuid)

### Methods

* [allBalances](#allbalances)
* [balance](#balance)
* [createdAt](#createdat)
* [exists](#exists)
* [isEqual](#isequal)
* [toJson](#tojson)
* [totalSupply](#totalsupply)
* [generateUuid](#static-generateuuid)
* [unserialize](#static-unserialize)

## Properties

### asset

• **asset**: [*Asset*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/asset)

*Defined in* [*src/api/entities/Checkpoint.ts:51*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Checkpoint.ts#L51)

Asset whose balances are being recorded in this Checkpoint

***

### `Protected` context

• **context**: *Context*

*Inherited from* [*CheckpointSchedule*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/checkpointschedule)*.*[*context*](https://developers.polymath.network/polymesh-sdk-api-reference/checkpointschedule#protected-context)

*Defined in* [*src/api/entities/Entity.ts:48*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Entity.ts#L48)

***

### id

• **id**: *BigNumber*

*Defined in* [*src/api/entities/Checkpoint.ts:46*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Checkpoint.ts#L46)

Checkpoint identifier number

***

### uuid

• **uuid**: *string*

*Inherited from* [*CheckpointSchedule*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/checkpointschedule)*.*[*uuid*](https://developers.polymath.network/polymesh-sdk-api-reference/checkpointschedule#uuid)

*Defined in* [*src/api/entities/Entity.ts:46*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Entity.ts#L46)

## Methods

### allBalances

▸ **allBalances**(`paginationOpts?`: [PaginationOptions](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/paginationoptions.md)): *Promise‹*[*ResultSet*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/resultset.md)*‹*[*IdentityBalance*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/identitybalance.md)*››*

*Defined in* [*src/api/entities/Checkpoint.ts:108*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Checkpoint.ts#L108)

Retrieve all Asset Holder balances at this Checkpoint

**`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](#balance) for a more detailed explanation of the logic

**Parameters:**

| Name              | Type                                                                                                                        |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------- |
| `paginationOpts?` | [PaginationOptions](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/paginationoptions.md) |

**Returns:** *Promise‹*[*ResultSet*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/resultset.md)*‹*[*IdentityBalance*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/identitybalance.md)*››*

***

### balance

▸ **balance**(`args?`: undefined | object): *Promise‹BigNumber›*

*Defined in* [*src/api/entities/Checkpoint.ts:201*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Checkpoint.ts#L201)

Retrieve the balance of a specific Asset Holder Identity at this Checkpoint

**`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

**Parameters:**

| Name    | Type                |
| ------- | ------------------- |
| `args?` | undefined \| object |

**Returns:** *Promise‹BigNumber›*

***

### createdAt

▸ **createdAt**(): *Promise‹Date›*

*Defined in* [*src/api/entities/Checkpoint.ts:86*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Checkpoint.ts#L86)

Retrieve this Checkpoint's creation date

**Returns:** *Promise‹Date›*

***

### exists

▸ **exists**(): *Promise‹boolean›*

*Overrides* [*Entity*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/entity)*.*[*exists*](https://developers.polymath.network/polymesh-sdk-api-reference/entity#abstract-exists)

*Defined in* [*src/api/entities/Checkpoint.ts:245*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Checkpoint.ts#L245)

Determine whether this Checkpoint exists on chain

**Returns:** *Promise‹boolean›*

***

### isEqual

▸ **isEqual**(`entity`: [Entity](https://developers.polymath.network/polymesh-sdk-api-reference/classes/entity)‹unknown, unknown›): *boolean*

*Inherited from* [*CheckpointSchedule*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/checkpointschedule)*.*[*isEqual*](https://developers.polymath.network/polymesh-sdk-api-reference/checkpointschedule#isequal)

*Defined in* [*src/api/entities/Entity.ts:61*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Entity.ts#L61)

Determine whether this Entity is the same as another one

**Parameters:**

| Name     | Type                                                                                                      |
| -------- | --------------------------------------------------------------------------------------------------------- |
| `entity` | [Entity](https://developers.polymath.network/polymesh-sdk-api-reference/classes/entity)‹unknown, unknown› |

**Returns:** *boolean*

***

### toJson

▸ **toJson**(): [*HumanReadable*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/humanreadable.md)

*Overrides* [*Entity*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/entity)*.*[*toJson*](https://developers.polymath.network/polymesh-sdk-api-reference/entity#abstract-tojson)

*Defined in* [*src/api/entities/Checkpoint.ts:265*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Checkpoint.ts#L265)

Return the Checkpoint's ticker and identifier

**Returns:** [*HumanReadable*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/docs/v14/docs/interfaces/humanreadable.md)

***

### totalSupply

▸ **totalSupply**(): *Promise‹BigNumber›*

*Defined in* [*src/api/entities/Checkpoint.ts:68*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Checkpoint.ts#L68)

Retrieve the Asset's total supply at this checkpoint

**Returns:** *Promise‹BigNumber›*

***

### `Static` generateUuid

▸ **generateUuid**‹**Identifiers**›(`identifiers`: Identifiers): *string*

*Inherited from* [*CheckpointSchedule*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/checkpointschedule)*.*[*generateUuid*](https://developers.polymath.network/polymesh-sdk-api-reference/checkpointschedule#static-generateuuid)

*Defined in* [*src/api/entities/Entity.ts:14*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Entity.ts#L14)

Generate the Entity's UUID from its identifying properties

**Type parameters:**

▪ **Identifiers**

**Parameters:**

| Name          | Type        | Description |
| ------------- | ----------- | ----------- |
| `identifiers` | Identifiers |             |

**Returns:** *string*

***

### `Static` unserialize

▸ **unserialize**‹**Identifiers**›(`serialized`: string): *Identifiers*

*Inherited from* [*CheckpointSchedule*](https://developers.polymath.network/polymesh-sdk-api-reference/classes/checkpointschedule)*.*[*unserialize*](https://developers.polymath.network/polymesh-sdk-api-reference/checkpointschedule#static-unserialize)

*Defined in* [*src/api/entities/Entity.ts:23*](https://github.com/PolymeshAssociation/polymesh-sdk/blob/46845947/src/api/entities/Entity.ts#L23)

Unserialize a UUID into its Unique Identifiers

**Type parameters:**

▪ **Identifiers**

**Parameters:**

| Name         | Type   | Description         |
| ------------ | ------ | ------------------- |
| `serialized` | string | UUID to unserialize |

**Returns:** *Identifiers*
