# CurrentAccount

Represents the current account that is bound to the SDK instance

## Hierarchy

↳ [Account](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/account)

↳ **CurrentAccount**

## Index

### Properties

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

### Methods

* [getBalance](#getbalance)
* [getIdentity](#getidentity)
* [getPermissions](#getpermissions)
* [getTransactionHistory](#gettransactionhistory)
* [hasPermissions](#haspermissions)
* [isEqual](#isequal)
* [isFrozen](#isfrozen)
* [leaveIdentity](#leaveidentity)
* [generateUuid](#static-generateuuid)
* [unserialize](#static-unserialize)

## Properties

### address

• **address**: *string*

*Inherited from* [*Account*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/account)*.*[*address*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/account#address)

*Defined in* [*src/api/entities/Account.ts:45*](https://github.com/PolymathNetwork/polymesh-sdk/blob/23062de4/src/api/entities/Account.ts#L45)

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

### authorizations

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

*Inherited from* [*Account*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/account)*.*[*authorizations*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/account#authorizations)

*Defined in* [*src/api/entities/Account.ts:53*](https://github.com/PolymathNetwork/polymesh-sdk/blob/23062de4/src/api/entities/Account.ts#L53)

### `Protected` context

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

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

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

### key

• **key**: *string*

*Inherited from* [*Account*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/account)*.*[*key*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/account#key)

*Defined in* [*src/api/entities/Account.ts:50*](https://github.com/PolymathNetwork/polymesh-sdk/blob/23062de4/src/api/entities/Account.ts#L50)

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* [*CheckpointSchedule*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/checkpointschedule)*.*[*uuid*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/checkpointschedule#uuid)

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

## Methods

### getBalance

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

*Inherited from* [*Account*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/account)*.*[*getBalance*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/account#getbalance)

*Defined in* [*src/api/entities/Account.ts:75*](https://github.com/PolymathNetwork/polymesh-sdk/blob/23062de4/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-v6/globals#accountbalance)*›*

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

*Inherited from* [*Account*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/account)*.*[*getBalance*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/account#getbalance)

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

**Parameters:**

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

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

### getIdentity

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

*Overrides* [*Account*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/account)*.*[*getIdentity*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/account#getidentity)

*Defined in* [*src/api/entities/CurrentAccount.ts:43*](https://github.com/PolymathNetwork/polymesh-sdk/blob/23062de4/src/api/entities/CurrentAccount.ts#L43)

Retrieve the current Identity (null if there is none)

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

### getPermissions

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

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

Retrieve the Permissions this Signer has as a Signing Key for its corresponding Identity

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

### getTransactionHistory

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

*Inherited from* [*Account*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/account)*.*[*getTransactionHistory*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/account#gettransactionhistory)

*Defined in* [*src/api/entities/Account.ts:126*](https://github.com/PolymathNetwork/polymesh-sdk/blob/23062de4/src/api/entities/Account.ts#L126)

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

**`note`** uses the middleware

**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-v6/interfaces/resultset)*‹*[*ExtrinsicData*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/interfaces/extrinsicdata)*››*

### hasPermissions

▸ **hasPermissions**(`permissions`: [PermissionsLike](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/interfaces/permissionslike)): *Promise‹boolean›*

*Defined in* [*src/api/entities/CurrentAccount.ts:80*](https://github.com/PolymathNetwork/polymesh-sdk/blob/23062de4/src/api/entities/CurrentAccount.ts#L80)

Check if this Account possesses certain Permissions for its corresponding Identity

**Parameters:**

| Name          | Type                                                                                                                 |
| ------------- | -------------------------------------------------------------------------------------------------------------------- |
| `permissions` | [PermissionsLike](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/interfaces/permissionslike) |

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

### isEqual

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

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

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

Whether this Entity is the same as another one

**Parameters:**

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

**Returns:** *boolean*

### isFrozen

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

*Inherited from* [*Account*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/account)*.*[*isFrozen*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/account#isfrozen)

*Defined in* [*src/api/entities/Account.ts:211*](https://github.com/PolymathNetwork/polymesh-sdk/blob/23062de4/src/api/entities/Account.ts#L211)

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

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

### leaveIdentity

▸ **leaveIdentity**(`args`: void): *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/transactionqueue)*‹void››*

*Defined in* [*src/api/entities/CurrentAccount.ts:36*](https://github.com/PolymathNetwork/polymesh-sdk/blob/23062de4/src/api/entities/CurrentAccount.ts#L36)

Leave the current Identity. This operation can only be done if this Account is a secondary key for the Identity

**`note`** this method is of type [ProcedureMethod](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/interfaces/proceduremethod), which means you can call `leaveIdentity.checkAuthorization` on it to see whether the Current Account has the required permissions to run it

**Parameters:**

| Name   | Type |
| ------ | ---- |
| `args` | void |

**Returns:** *Promise‹*[*TransactionQueue*](https://developers.polymath.network/polymesh-sdk-api-reference/docs-v6/classes/transactionqueue)*‹void››*

### `Static` generateUuid

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

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

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

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