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
Polymesh-specific address of the account. Serves as an identifier

authorizations

authorizations: AuthorizationsAccount

Protected context

context: Context
Inherited from Entity.context

key

key: string
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

Methods

exists

exists(): Promise‹boolean›
Overrides Entity.exists
Determine whether this Account exists on chain
Returns: Promise‹boolean›

getBalance

getBalance(): Promise‹AccountBalance
Get the free/locked POLYX balance of the account
note can be subscribed to
Returns: Promise‹AccountBalance
getBalance(callback: SubCallbackAccountBalance›): Promise‹UnsubCallback
Parameters:
Name
Type
callback
Returns: Promise‹UnsubCallback

getIdentity

getIdentity(): Promise‹Identity | null›
Retrieve the Identity associated to this Account (null if there is none)
Returns: Promise‹Identity | null›

getPermissions

getPermissions(): Promise‹Permissions›
Retrieve the Permissions this Signer has as a Signing Key for its corresponding Identity
Returns: Promise‹Permissions›

getSubsidy

getSubsidy(): Promise‹Omit‹Subsidy, "beneficiary"› | null›
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‹Omit‹Subsidy, "beneficiary"› | null›
getSubsidy(callback: SubCallback‹Omit‹Subsidy, "beneficiary"› | null›): Promise‹UnsubCallback
Parameters:
Name
Type
callback
SubCallback‹Omit‹Subsidy, "beneficiary"› | null›
Returns: Promise‹UnsubCallback

getTransactionHistory

getTransactionHistory(filters: object): Promise‹ResultSetExtrinsicData››
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‹ResultSetExtrinsicData››

hasPermissions

hasPermissions(permissions: SimplePermissions): Promise‹boolean›
Check if this Account possesses certain Permissions for its corresponding Identity
Parameters:
Name
Type
permissions
Returns: Promise‹boolean›

isEqual

isEqual(entity: Entity‹unknown, unknown›): boolean
Inherited from Entity.isEqual
Determine whether this Entity is the same as another one
Parameters:
Name
Type
entity
Entity‹unknown, unknown›
Returns: boolean

isFrozen

isFrozen(): Promise‹boolean›
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››
Leave the Account's Identity. This operation can only be done if the 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
opts?
Returns: Promise‹TransactionQueue‹void››

toJson

toJson(): string
Overrides Entity.toJson
Return the Account's address
Returns: string

Static generateUuid

generateUuidIdentifiers›(identifiers: Identifiers): string
Inherited from Entity.generateUuid
Generate the Entity's UUID from its identifying properties
Type parameters:
Identifiers
Parameters:
Name
Type
Description
identifiers
Identifiers
Returns: string

Static unserialize

unserializeIdentifiers›(serialized: string): Identifiers
Inherited from Entity.unserialize
Unserialize a UUID into its Unique Identifiers
Type parameters:
Identifiers
Parameters:
Name
Type
Description
serialized
string
UUID to unserialize
Returns: Identifiers
Last modified 26d ago