Account

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

Hierarchy

  • Entity‹UniqueIdentifiers, string›

    Account

Index

Properties

Methods

Properties

address

address: string

Defined in src/api/entities/Account.ts:255

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


authorizations

authorizations: AuthorizationsAccount

Defined in src/api/entities/Account.ts:264


Protected context

context: Context

Inherited from CheckpointSchedule.context

Defined in src/api/entities/Entity.ts:48


key

key: string

Defined in src/api/entities/Account.ts:261

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.uuid

Defined in src/api/entities/Entity.ts:46

Methods

checkPermissions

checkPermissions(permissions: SimplePermissions): Promise‹CheckPermissionsResultAccount››

Defined in src/api/entities/Account.ts:634

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

Parameters:

NameType

permissions

Returns: Promise‹CheckPermissionsResultAccount››

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


exists

exists(): Promise‹boolean›

Overrides Entity.exists

Defined in src/api/entities/Account.ts:700

Determine whether this Account exists on chain

Returns: Promise‹boolean›


getBalance

getBalance(): Promise‹AccountBalance

Defined in src/api/entities/Account.ts:286

Get the free/locked POLYX balance of the Account

note can be subscribed to

Returns: Promise‹AccountBalance

getBalance(callback: SubCallbackAccountBalance›): Promise‹UnsubCallback

Defined in src/api/entities/Account.ts:287

Parameters:

NameType

callback

Returns: Promise‹UnsubCallback


getIdentity

getIdentity(): Promise‹Identity | null›

Defined in src/api/entities/Account.ts:327

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

Returns: Promise‹Identity | null›


getPermissions

getPermissions(): Promise‹Permissions

Defined in src/api/entities/Account.ts:593

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


getSubsidy

getSubsidy(): Promise‹SubsidyWithAllowance | null›

Defined in src/api/entities/Account.ts:308

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 | null›

getSubsidy(callback: SubCallbackSubsidyWithAllowance | null›): Promise‹UnsubCallback

Defined in src/api/entities/Account.ts:309

Parameters:

NameType

callback

Returns: Promise‹UnsubCallback


getTransactionHistory

getTransactionHistory(filters: object): Promise‹ResultSetExtrinsicData››

Defined in src/api/entities/Account.ts:361

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= {}

NameTypeDescription

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‹ResultSetExtrinsicData››


getTransactionHistoryV2

getTransactionHistoryV2(filters: object): Promise‹ResultSetExtrinsicData››

Defined in src/api/entities/Account.ts:469

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= {}

NameTypeDescription

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‹ResultSetExtrinsicData››


hasPermissions

hasPermissions(permissions: SimplePermissions): Promise‹boolean›

Defined in src/api/entities/Account.ts:691

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

deprecated in favor of checkPermissions

Parameters:

NameType

permissions

Returns: Promise‹boolean›


isEqual

isEqual(entity: Entity‹unknown, unknown›): boolean

Inherited from CheckpointSchedule.isEqual

Defined in src/api/entities/Entity.ts:61

Determine whether this Entity is the same as another one

Parameters:

NameType

entity

Entity‹unknown, unknown›

Returns: boolean


isFrozen

isFrozen(): Promise‹boolean›

Defined in src/api/entities/Account.ts:572

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.toHuman

Defined in src/api/entities/Account.ts:707

Return the Account's address

Returns: string


Static generateUuid

generateUuidIdentifiers›(identifiers: Identifiers): string

Inherited from CheckpointSchedule.generateUuid

Defined in src/api/entities/Entity.ts:14

Generate the Entity's UUID from its identifying properties

Type parameters:

Identifiers

Parameters:

NameTypeDescription

identifiers

Identifiers

Returns: string


Static unserialize

unserializeIdentifiers›(serialized: string): Identifiers

Inherited from CheckpointSchedule.unserialize

Defined in src/api/entities/Entity.ts:23

Unserialize a UUID into its Unique Identifiers

Type parameters:

Identifiers

Parameters:

NameTypeDescription

serialized

string

UUID to unserialize

Returns: Identifiers

Last updated