Polymesh SDK API Reference
v11.0.2
v11.0.2
  • Globals
  • Classes
    • Account
    • AuthorizationRequest
    • Authorizations
    • Checkpoint
    • CheckpointSchedule
    • Checkpoints
    • Claims
    • Compliance
    • Context
    • CorporateAction
    • CorporateActions
    • Count
    • CustomPermissionGroup
    • DefaultPortfolio
    • DefaultTrustedClaimIssuer
    • Distributions
    • DividendDistribution
    • Documents
    • Entity
    • Identity
    • IdentityAuthorizations
    • Instruction
    • Issuance
    • KnownPermissionGroup
    • Middleware
    • NumberedPortfolio
    • Offerings
    • Percentage
    • PermissionGroup
    • Permissions
    • Polymesh
    • PolymeshError
    • PolymeshTransaction
    • PolymeshTransactionBase
    • PolymeshTransactionBatch
    • Portfolio
    • Portfolios
    • Requirements
    • Schedules
    • SecurityToken
    • Settlements
    • Sto
    • TickerReservation
    • TokenHolders
    • TokenPermissions
    • 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
  • exists
  • getBalance
  • getIdentity
  • getPermissions
  • getSubsidy
  • getTransactionHistory
  • hasPermissions
  • isEqual
  • isFrozen
  • leaveIdentity
  • toJson
  • Static generateUuid
  • Static unserialize

Was this helpful?

  1. Classes

Account

PreviousClassesNextAuthorizationRequest

Last updated 3 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


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

Methods

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

▸ getPermissions(): Promise‹Permissions›

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

Returns: Promise‹Permissions›


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


hasPermissions

Check if this Account possesses certain Permissions for its corresponding Identity

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 key of the Identity unfreezes all secondary keys

Returns: Promise‹boolean›


leaveIdentity

Leave the Account's Identity. This operation can only be done if the Account is a secondary key for the Identity

Parameters:

Name
Type

args

void

opts?


toJson

â–¸ toJson(): 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

• context:

Inherited from .

Defined in

Defined in

Inherited from .

Defined in

Overrides .

Defined in

▸ getBalance(): Promise‹›

Defined in

Returns: Promise‹›

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

Defined in

‹›

Returns: Promise‹›

▸ getIdentity(): Promise‹ | null›

Defined in

Returns: Promise‹ | null›

Defined in

▸ getSubsidy(): Promise‹Omit‹, "beneficiary"› | null›

Defined in

Returns: Promise‹Omit‹, "beneficiary"› | null›

▸ getSubsidy(callback: ‹Omit‹, "beneficiary"› | null›): Promise‹›

Defined in

‹Omit‹, "beneficiary"› | null›

Returns: Promise‹›

▸ getTransactionHistory(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

▸ leaveIdentity(args: void, opts?: ): Promise‹‹void››

Defined in

note this method is of type , which means you can call leaveIdentity.checkAuthorization on it to see whether the Current Account has the required permissions to run it

Returns: Promise‹‹void››

Overrides .

Defined in

Inherited from .

Defined in

Inherited from .

Defined in

Entity
address
authorizations
context
key
uuid
exists
getBalance
getIdentity
getPermissions
getSubsidy
getTransactionHistory
hasPermissions
isEqual
isFrozen
leaveIdentity
toJson
generateUuid
unserialize
src/api/entities/Account.ts:64
Authorizations
Account
src/api/entities/Account.ts:72
Context
Entity
context
src/api/entities/Entity.ts:48
src/api/entities/Account.ts:69
Entity
uuid
src/api/entities/Entity.ts:46
Entity
exists
src/api/entities/Account.ts:446
AccountBalance
src/api/entities/Account.ts:109
AccountBalance
SubCallback
AccountBalance
UnsubCallback
src/api/entities/Account.ts:110
UnsubCallback
Identity
src/api/entities/Account.ts:152
Identity
src/api/entities/Account.ts:290
Subsidy
src/api/entities/Account.ts:131
Subsidy
SubCallback
Subsidy
UnsubCallback
src/api/entities/Account.ts:132
UnsubCallback
ResultSet
ExtrinsicData
src/api/entities/Account.ts:184
ResultSet
ExtrinsicData
SimplePermissions
src/api/entities/Account.ts:318
Entity
Entity
isEqual
src/api/entities/Entity.ts:61
src/api/entities/Account.ts:269
ProcedureOpts
TransactionQueue
src/api/entities/Account.ts:100
ProcedureMethod
TransactionQueue
Entity
toJson
src/api/entities/Account.ts:453
Entity
generateUuid
src/api/entities/Entity.ts:14
Entity
unserialize
src/api/entities/Entity.ts:23
SubCallback
AccountBalance
SubCallback
Subsidy
SimplePermissions
Entity
ProcedureOpts