Polymesh SDK API Reference
beta
beta
  • Globals
  • Classes
    • Account
    • AccountManagement
    • Asset
    • AssetHolders
    • AssetPermissions
    • Assets
    • AuthorizationRequest
    • Authorizations
    • Checkpoint
    • CheckpointSchedule
    • Checkpoints
    • Claims
    • Compliance
    • CorporateAction
    • CorporateActionBase
    • CorporateActions
    • Count
    • CustomPermissionGroup
    • DefaultPortfolio
    • DefaultTrustedClaimIssuer
    • Distributions
    • DividendDistribution
    • Documents
    • Entity
    • Identities
    • Identity
    • IdentityAuthorizations
    • Instruction
    • Issuance
    • KnownPermissionGroup
    • Network
    • NumberedPortfolio
    • Offering
    • Offerings
    • Percentage
    • PermissionGroup
    • Permissions
    • Polymesh
    • PolymeshError
    • PolymeshTransaction
    • PolymeshTransactionBase
    • PolymeshTransactionBatch
    • Portfolio
    • Portfolios
    • Requirements
    • Schedules
    • Settlements
    • Subsidy
    • TickerReservation
    • TransactionQueue
    • TransferRestrictionBase
    • TransferRestrictions
    • TrustedClaimIssuers
    • Venue
  • Enums
  • Interfaces
Powered by GitBook
On this page
  • Hierarchy
  • Index
  • Properties
  • Methods
  • Properties
  • address
  • authorizations
  • Protected context
  • key
  • uuid
  • Methods
  • checkPermissions
  • exists
  • getBalance
  • getIdentity
  • getPermissions
  • getSubsidy
  • getTransactionHistory
  • getTransactionHistoryV2
  • hasPermissions
  • isEqual
  • isFrozen
  • toHuman
  • Static generateUuid
  • Static unserialize

Was this helpful?

  1. Classes

Account

PreviousClassesNextAccountManagement

Last updated 2 years ago

Was this helpful?

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

Hierarchy

  • ‹UniqueIdentifiers, string›

    ↳ Account

Index

Properties

Methods

Properties

address

• address: string

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


authorizations


Protected context

• context: Context


key

• key: string

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

Methods

checkPermissions

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

Parameters:

Name
Type

permissions

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


exists

▸ exists(): Promise‹boolean›

Determine whether this Account exists on chain

Returns: Promise‹boolean›


getBalance

Get the free/locked POLYX balance of the Account

note can be subscribed to

Parameters:

Name
Type

callback


getIdentity

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


getPermissions

Retrieve the Permissions this Account has as a Permissioned Account for its corresponding Identity

throws if there is no Identity associated with the Account


getSubsidy

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

Parameters:

Name
Type

callback


getTransactionHistory

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

Name
Type
Description

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


getTransactionHistoryV2

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

Name
Type
Description

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


hasPermissions

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

deprecated in favor of checkPermissions

Parameters:

Name
Type

permissions

Returns: Promise‹boolean›


isEqual

Determine whether this Entity is the same as another one

Parameters:

Name
Type

entity

Returns: boolean


isFrozen

▸ isFrozen(): Promise‹boolean›

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

Return the Account's address

Returns: string


Static generateUuid

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

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

Unserialize a UUID into its Unique Identifiers

Type parameters:

â–ª Identifiers

Parameters:

Name
Type
Description

serialized

string

UUID to unserialize

Returns: Identifiers

Defined in

• authorizations: ‹›

Defined in

Inherited from .

Defined in

Defined in

Inherited from .

Defined in

▸ checkPermissions(permissions: ): Promise‹‹››

Defined in

Returns: Promise‹‹››

Overrides .

Defined in

▸ getBalance(): Promise‹›

Defined in

Returns: Promise‹›

▸ getBalance(callback: ‹›): Promise‹›

Defined in

‹›

Returns: Promise‹›

▸ getIdentity(): Promise‹ | null›

Defined in

Returns: Promise‹ | null›

▸ getPermissions(): Promise‹›

Defined in

Returns: Promise‹›

▸ getSubsidy(): Promise‹ | null›

Defined in

Returns: Promise‹ | null›

▸ getSubsidy(callback: ‹ | null›): Promise‹›

Defined in

‹ | null›

Returns: Promise‹›

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

Defined in

Returns: Promise‹‹››

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

Defined in

Returns: Promise‹‹››

▸ hasPermissions(permissions: ): Promise‹boolean›

Defined in

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

Inherited from .

Defined in

‹unknown, unknown›

Defined in

Overrides .

Defined in

Inherited from .

Defined in

Inherited from .

Defined in

src/api/entities/Account.ts:255
Authorizations
Account
src/api/entities/Account.ts:264
src/api/entities/Entity.ts:48
src/api/entities/Account.ts:261
src/api/entities/Entity.ts:46
SimplePermissions
CheckPermissionsResult
Account
src/api/entities/Account.ts:634
CheckPermissionsResult
Account
src/api/entities/Account.ts:700
src/api/entities/Account.ts:286
src/api/entities/Account.ts:287
Identity
src/api/entities/Account.ts:327
Identity
Permissions
src/api/entities/Account.ts:593
Permissions
SubsidyWithAllowance
src/api/entities/Account.ts:308
SubsidyWithAllowance
src/api/entities/Account.ts:309
ResultSet
ExtrinsicData
src/api/entities/Account.ts:361
ResultSet
ExtrinsicData
ResultSet
ExtrinsicData
src/api/entities/Account.ts:469
ResultSet
ExtrinsicData
SimplePermissions
src/api/entities/Account.ts:691
Entity
src/api/entities/Entity.ts:61
src/api/entities/Account.ts:572
src/api/entities/Account.ts:707
src/api/entities/Entity.ts:14
src/api/entities/Entity.ts:23
Entity
address
authorizations
context
key
uuid
checkPermissions
exists
getBalance
getIdentity
getPermissions
getSubsidy
getTransactionHistory
getTransactionHistoryV2
hasPermissions
isEqual
isFrozen
toHuman
generateUuid
unserialize
SimplePermissions
SimplePermissions
Entity
CheckpointSchedule
CheckpointSchedule
Entity
SubsidyWithAllowance
CheckpointSchedule
Entity
CheckpointSchedule
CheckpointSchedule
SubsidyWithAllowance
AccountBalance
AccountBalance
SubCallback
AccountBalance
UnsubCallback
UnsubCallback
SubCallback
UnsubCallback
UnsubCallback
SubCallback
AccountBalance
SubCallback
exists
toHuman
context
uuid
isEqual
generateUuid
unserialize