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: Authorizations‹Account›
Defined in src/api/entities/Account.ts:260
Protected
context
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‹CheckPermissionsResult‹Account››
Defined in src/api/entities/Account.ts:518
Check if this Account possesses certain Permissions to act on behalf of its corresponding Identity
Parameters:
permissions
Returns: Promise‹CheckPermissionsResult‹Account››
which permissions the Account is missing (if any) and the final result
exists
▸ exists(): Promise‹boolean›
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
: SubCallback‹AccountBalance›): Promise‹UnsubCallback›
Defined in src/api/entities/Account.ts:283
Parameters:
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
: SubCallback‹SubsidyWithAllowance | null›): Promise‹UnsubCallback›
Defined in src/api/entities/Account.ts:305
Parameters:
callback
SubCallback‹SubsidyWithAllowance | null›
Returns: Promise‹UnsubCallback›
getTransactionHistory
▸ getTransactionHistory(filters
: object): Promise‹ResultSet‹ExtrinsicData››
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= {}
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‹ResultSet‹ExtrinsicData››
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:
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:
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
Defined in src/api/entities/Account.ts:591
Return the Account's address
Returns: string
Static
generateUuid
Static
generateUuid▸ generateUuid‹Identifiers›(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:
identifiers
Identifiers
Returns: string
Static
unserialize
Static
unserialize▸ unserialize‹Identifiers›(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:
serialized
string
UUID to unserialize
Returns: Identifiers
Last updated