# Account

Represents an Account in the Polymesh blockchain. Accounts can hold POLYX, control Identities and vote on proposals (among other things)

## Hierarchy

* [Entity](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/entity)‹UniqueIdentifiers, string›

  ↳ **Account**

## Index

### Properties

* [address](#address)
* [authorizations](#authorizations)
* [context](#protected-context)
* [key](#key)
* [uuid](#uuid)

### Methods

* [checkPermissions](#checkpermissions)
* [exists](#exists)
* [getBalance](#getbalance)
* [getIdentity](#getidentity)
* [getPermissions](#getpermissions)
* [getSubsidy](#getsubsidy)
* [getTransactionHistory](#gettransactionhistory)
* [getTransactionHistoryV2](#gettransactionhistoryv2)
* [hasPermissions](#haspermissions)
* [isEqual](#isequal)
* [isFrozen](#isfrozen)
* [toHuman](#tohuman)
* [generateUuid](#static-generateuuid)
* [unserialize](#static-unserialize)

## Properties

### address

• **address**: *string*

*Defined in* [*src/api/entities/Account.ts:255*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Account.ts#L255)

Polymesh-specific address of the Account. Serves as an identifier

***

### authorizations

• **authorizations**: [*Authorizations*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/authorizations)*‹*[*Account*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/account)*›*

*Defined in* [*src/api/entities/Account.ts:264*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Account.ts#L264)

***

### `Protected` context

• **context**: *Context*

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

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

***

### key

• **key**: *string*

*Defined in* [*src/api/entities/Account.ts:261*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Account.ts#L261)

A hex representation of the cryptographic public key of the Account. This is consistent across Substrate chains, while the address depends on the chain as well.

***

### uuid

• **uuid**: *string*

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

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

## Methods

### checkPermissions

▸ **checkPermissions**(`permissions`: [SimplePermissions](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/simplepermissions.md)): *Promise‹*[*CheckPermissionsResult*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/checkpermissionsresult.md)*‹*[*Account*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/enums/signertype.md#account)*››*

*Defined in* [*src/api/entities/Account.ts:634*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Account.ts#L634)

Check if this Account possesses certain Permissions to act on behalf of its corresponding Identity

**Parameters:**

| Name          | Type                                                                                                                     |
| ------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `permissions` | [SimplePermissions](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/simplepermissions.md) |

**Returns:** *Promise‹*[*CheckPermissionsResult*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/checkpermissionsresult.md)*‹*[*Account*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/enums/signertype.md#account)*››*

which permissions the Account is missing (if any) and the final result

***

### exists

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

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

*Defined in* [*src/api/entities/Account.ts:700*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Account.ts#L700)

Determine whether this Account exists on chain

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

***

### getBalance

▸ **getBalance**(): *Promise‹*[*AccountBalance*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/globals#accountbalance)*›*

*Defined in* [*src/api/entities/Account.ts:286*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Account.ts#L286)

Get the free/locked POLYX balance of the Account

**`note`** can be subscribed to

**Returns:** *Promise‹*[*AccountBalance*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/globals#accountbalance)*›*

▸ **getBalance**(`callback`: [SubCallback](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/globals#subcallback)‹[AccountBalance](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/globals#accountbalance)›): *Promise‹*[*UnsubCallback*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/globals#unsubcallback)*›*

*Defined in* [*src/api/entities/Account.ts:287*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Account.ts#L287)

**Parameters:**

| Name       | Type                                                                                                                                                                                                                           |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `callback` | [SubCallback](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/globals#subcallback)‹[AccountBalance](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/globals#accountbalance)› |

**Returns:** *Promise‹*[*UnsubCallback*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/globals#unsubcallback)*›*

***

### getIdentity

▸ **getIdentity**(): *Promise‹*[*Identity*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/identity) *| null›*

*Defined in* [*src/api/entities/Account.ts:327*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Account.ts#L327)

Retrieve the Identity associated to this Account (null if there is none)

**Returns:** *Promise‹*[*Identity*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/identity) *| null›*

***

### getPermissions

▸ **getPermissions**(): *Promise‹*[*Permissions*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/permissions)*›*

*Defined in* [*src/api/entities/Account.ts:593*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Account.ts#L593)

Retrieve the Permissions this Account has as a Permissioned Account for its corresponding Identity

**`throws`** if there is no Identity associated with the Account

**Returns:** *Promise‹*[*Permissions*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/classes/permissions)*›*

***

### getSubsidy

▸ **getSubsidy**(): *Promise‹*[*SubsidyWithAllowance*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/subsidywithallowance.md) *| null›*

*Defined in* [*src/api/entities/Account.ts:308*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Account.ts#L308)

Get the subsidized balance of this Account and the subsidizer Account. If this Account isn't being subsidized, return null

**`note`** can be subscribed to

**Returns:** *Promise‹*[*SubsidyWithAllowance*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/subsidywithallowance.md) *| null›*

▸ **getSubsidy**(`callback`: [SubCallback](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/globals#subcallback)‹[SubsidyWithAllowance](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/subsidywithallowance.md) | null›): *Promise‹*[*UnsubCallback*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/globals#unsubcallback)*›*

*Defined in* [*src/api/entities/Account.ts:309*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Account.ts#L309)

**Parameters:**

| Name       | Type                                                                                                                                                                                                                                                |
| ---------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `callback` | [SubCallback](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/globals#subcallback)‹[SubsidyWithAllowance](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/subsidywithallowance.md) \| null› |

**Returns:** *Promise‹*[*UnsubCallback*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/globals#unsubcallback)*›*

***

### getTransactionHistory

▸ **getTransactionHistory**(`filters`: object): *Promise‹*[*ResultSet*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/resultset.md)*‹*[*ExtrinsicData*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/extrinsicdata.md)*››*

*Defined in* [*src/api/entities/Account.ts:361*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Account.ts#L361)

Retrieve a list of transactions signed by this Account. Can be filtered using parameters

**`note`** if both `blockNumber` and `blockHash` are passed, only `blockNumber` is taken into account

**`note`** uses the middleware

**Parameters:**

▪`Default value` **filters**: *object*= {}

| Name           | Type                       | Description                                   |
| -------------- | -------------------------- | --------------------------------------------- |
| `blockHash?`   | undefined \| string        | -                                             |
| `blockNumber?` | BigNumber                  | -                                             |
| `orderBy?`     | TransactionOrderByInput    | -                                             |
| `size?`        | BigNumber                  | page size                                     |
| `start?`       | BigNumber                  | page offset                                   |
| `success?`     | undefined \| false \| true | whether the transaction was successful or not |
| `tag?`         | TxTag                      | tag associated with the transaction           |

**Returns:** *Promise‹*[*ResultSet*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/resultset.md)*‹*[*ExtrinsicData*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/extrinsicdata.md)*››*

***

### getTransactionHistoryV2

▸ **getTransactionHistoryV2**(`filters`: object): *Promise‹*[*ResultSet*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/resultset.md)*‹*[*ExtrinsicData*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/extrinsicdata.md)*››*

*Defined in* [*src/api/entities/Account.ts:469*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Account.ts#L469)

Retrieve a list of transactions signed by this Account. Can be filtered using parameters

**`note`** if both `blockNumber` and `blockHash` are passed, only `blockNumber` is taken into account

**`note`** uses the middlewareV2

**Parameters:**

▪`Default value` **filters**: *object*= {}

| Name           | Type                       | Description                                   |
| -------------- | -------------------------- | --------------------------------------------- |
| `blockHash?`   | undefined \| string        | -                                             |
| `blockNumber?` | BigNumber                  | -                                             |
| `orderBy?`     | ExtrinsicsOrderBy          | -                                             |
| `size?`        | BigNumber                  | page size                                     |
| `start?`       | BigNumber                  | page offset                                   |
| `success?`     | undefined \| false \| true | whether the transaction was successful or not |
| `tag?`         | TxTag                      | tag associated with the transaction           |

**Returns:** *Promise‹*[*ResultSet*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/resultset.md)*‹*[*ExtrinsicData*](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/extrinsicdata.md)*››*

***

### hasPermissions

▸ **hasPermissions**(`permissions`: [SimplePermissions](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/simplepermissions.md)): *Promise‹boolean›*

*Defined in* [*src/api/entities/Account.ts:691*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Account.ts#L691)

Check if this Account possesses certain Permissions to act on behalf of its corresponding Identity

**`deprecated`** in favor of `checkPermissions`

**Parameters:**

| Name          | Type                                                                                                                     |
| ------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `permissions` | [SimplePermissions](https://github.com/PolymathNetwork/polymesh-sdk/blob/docs/beta/docs/interfaces/simplepermissions.md) |

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

***

### isEqual

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

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

*Defined in* [*src/api/entities/Entity.ts:61*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/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/docs-beta/classes/entity)‹unknown, unknown› |

**Returns:** *boolean*

***

### isFrozen

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

*Defined in* [*src/api/entities/Account.ts:572*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Account.ts#L572)

Check whether this Account is frozen. If frozen, it cannot perform any action until the primary Account of the Identity unfreezes all secondary Accounts

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

***

### toHuman

▸ **toHuman**(): *string*

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

*Defined in* [*src/api/entities/Account.ts:707*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/src/api/entities/Account.ts#L707)

Return the Account's address

**Returns:** *string*

***

### `Static` generateUuid

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

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

*Defined in* [*src/api/entities/Entity.ts:14*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/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/docs-beta/classes/checkpointschedule)*.*[*unserialize*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-beta/checkpointschedule#static-unserialize)

*Defined in* [*src/api/entities/Entity.ts:23*](https://github.com/PolymathNetwork/polymesh-sdk/blob/31a16a34/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*
