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:251

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


authorizations

authorizations: AuthorizationsAccount

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


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:257

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:518

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:584

Determine whether this Account exists on chain

Returns: Promise‹boolean›


getBalance

getBalance(): Promise‹AccountBalance

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

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:283

Parameters:

NameType

callback

Returns: Promise‹UnsubCallback


getIdentity

getIdentity(): Promise‹Identity | null›

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

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:477

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:304

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:305

Parameters:

NameType

callback

Returns: Promise‹UnsubCallback


getTransactionHistory

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

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

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


hasPermissions

hasPermissions(permissions: SimplePermissions): Promise‹boolean›

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

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:456

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›


toJson

toJson(): string

Overrides Entity.toJson

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

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