CurrentAccount

Represents the current account that is bound to the SDK instance

Hierarchy

↳ Account

↳ CurrentAccount

Index

Properties

Methods

Properties

address

• address: string

Inherited from Account.address

Defined in src/api/entities/Account.ts:55arrow-up-right

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

authorizations

• authorizations: Authorizations‹Account›

Inherited from Account.authorizations

Defined in src/api/entities/Account.ts:63arrow-up-right

Protected context

• context: Context

Inherited from Entity.context

Defined in src/api/entities/Entity.ts:48arrow-up-right

key

• key: string

Inherited from Account.key

Defined in src/api/entities/Account.ts:60arrow-up-right

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

Defined in src/api/entities/Entity.ts:46arrow-up-right

Methods

getBalance

▸ getBalance(): Promise‹AccountBalance›

Inherited from Account.getBalance

Defined in src/api/entities/Account.ts:85arrow-up-right

Get the free/locked POLYX balance of the account

note can be subscribed to

Returns: Promise‹AccountBalance›

▸ getBalance(callback: SubCallback‹AccountBalance›): Promise‹UnsubCallback›

Inherited from Account.getBalance

Defined in src/api/entities/Account.ts:86arrow-up-right

Parameters:

Name

Type

callback

Returns: Promise‹UnsubCallback›

getIdentity

▸ getIdentity(): Promise‹CurrentIdentity | null›

Overrides Account.getIdentity

Defined in src/api/entities/CurrentAccount.ts:37arrow-up-right

Retrieve the current Identity (null if there is none)

Returns: Promise‹CurrentIdentity | null›

getPermissions

▸ getPermissions(): Promise‹Permissions›

Inherited from Account.getPermissions

Defined in src/api/entities/Account.ts:242arrow-up-right

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

Returns: Promise‹Permissions›

getTransactionHistory

▸ getTransactionHistory(filters: object): Promise‹ResultSet‹ExtrinsicData››

Inherited from Account.getTransactionHistory

Defined in src/api/entities/Account.ts:136arrow-up-right

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

hasPermissions

▸ hasPermissions(permissions: SimplePermissions): Promise‹boolean›

Inherited from Account.hasPermissions

Defined in src/api/entities/Account.ts:270arrow-up-right

Check if this Account possesses certain Permissions for its corresponding Identity

Parameters:

Name

Type

Returns: Promise‹boolean›

isEqual

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

Inherited from Entity.isEqual

Defined in src/api/entities/Entity.ts:61arrow-up-right

Whether this Entity is the same as another one

Parameters:

Name

Type

entity

Entity‹unknown, unknown›

Returns: boolean

isFrozen

▸ isFrozen(): Promise‹boolean›

Inherited from Account.isFrozen

Defined in src/api/entities/Account.ts:221arrow-up-right

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, opts?: ProcedureOpts): Promise‹TransactionQueue‹void››

Defined in src/api/entities/CurrentAccount.ts:30arrow-up-right

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, 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‹void››

toJson

â–¸ toJson(): string

Inherited from Account.toJson

Overrides Entity.toJson

Defined in src/api/entities/Account.ts:396arrow-up-right

Return the Account's address

Returns: string

Static generateUuid

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

Inherited from Entity.generateUuid

Defined in src/api/entities/Entity.ts:14arrow-up-right

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 Entity.unserialize

Defined in src/api/entities/Entity.ts:23arrow-up-right

Unserialize a UUID into its Unique Identifiers

Type parameters:

â–ª Identifiers

Parameters:

Name

Type

Description

serialized

string

UUID to unserialize

Returns: Identifiers

Last updated

Was this helpful?