# 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-v2/classes/entity)‹UniqueIdentifiers›

  ↳ **Account**

  ↳ [CurrentAccount](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/classes/currentaccount)

## Index

### Properties

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

### Methods

* [getBalance](#getbalance)
* [getIdentity](#getidentity)
* [getTransactionHistory](#gettransactionhistory)
* [generateUuid](#static-generateuuid)
* [unserialize](#static-unserialize)

## Properties

### address

• **address**: *string*

*Defined in* [*src/api/entities/Account.ts:47*](https://github.com/PolymathNetwork/polymesh-sdk/blob/5b409784/src/api/entities/Account.ts#L47)

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

### authorizations

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

*Defined in* [*src/api/entities/Account.ts:55*](https://github.com/PolymathNetwork/polymesh-sdk/blob/5b409784/src/api/entities/Account.ts#L55)

### `Protected` context

• **context**: [*Context*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/classes/context)

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

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

### key

• **key**: *string*

*Defined in* [*src/api/entities/Account.ts:52*](https://github.com/PolymathNetwork/polymesh-sdk/blob/5b409784/src/api/entities/Account.ts#L52)

public key of the account. This is a hex representation of the address that is transversal to any Substrate chain

### uuid

• **uuid**: *string*

*Inherited from* [*Entity*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/classes/entity)*.*[*uuid*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/entity#uuid)

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

## Methods

### getBalance

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

*Defined in* [*src/api/entities/Account.ts:75*](https://github.com/PolymathNetwork/polymesh-sdk/blob/5b409784/src/api/entities/Account.ts#L75)

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-v2/interfaces/accountbalance)*›*

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

*Defined in* [*src/api/entities/Account.ts:76*](https://github.com/PolymathNetwork/polymesh-sdk/blob/5b409784/src/api/entities/Account.ts#L76)

**Parameters:**

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

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

### getIdentity

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

*Defined in* [*src/api/entities/Account.ts:94*](https://github.com/PolymathNetwork/polymesh-sdk/blob/5b409784/src/api/entities/Account.ts#L94)

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

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

### getTransactionHistory

▸ **getTransactionHistory**(`filters`: object): *Promise‹*[*ResultSet*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/interfaces/resultset)*‹*[*ExtrinsicData*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/interfaces/extrinsicdata)*››*

*Defined in* [*src/api/entities/Account.ts:125*](https://github.com/PolymathNetwork/polymesh-sdk/blob/5b409784/src/api/entities/Account.ts#L125)

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

**Parameters:**

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

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

**Returns:** *Promise‹*[*ResultSet*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/interfaces/resultset)*‹*[*ExtrinsicData*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/interfaces/extrinsicdata)*››*

### `Static` generateUuid

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

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

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

Generate the Entity's UUID from its identifying properties

**Type parameters:**

▪ **Identifiers**: *object*

**Parameters:**

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

**Returns:** *string*

### `Static` unserialize

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

*Inherited from* [*Entity*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/classes/entity)*.*[*unserialize*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v2/entity#static-unserialize)

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

Unserialize a UUID into its Unique Identifiers

**Type parameters:**

▪ **Identifiers**: *object*

**Parameters:**

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

**Returns:** *Identifiers*
