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:255
Polymesh-specific address of the Account. Serves as an identifier
authorizations
• authorizations: Authorizations‹Account›
Defined in src/api/entities/Account.ts:264
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:261
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:634
Check if this Account possesses certain Permissions to act on behalf of its corresponding Identity
Parameters:
Name | Type |
---|---|
|
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:700
Determine whether this Account exists on chain
Returns: Promise‹boolean›
getBalance
▸ getBalance(): Promise‹AccountBalance›
Defined in src/api/entities/Account.ts:286
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:287
Parameters:
Name | Type |
---|---|
|
Returns: Promise‹UnsubCallback›
getIdentity
▸ getIdentity(): Promise‹Identity | null›
Defined in src/api/entities/Account.ts:327
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:593
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:308
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:309
Parameters:
Name | Type |
---|---|
| SubCallback‹SubsidyWithAllowance | null› |
Returns: Promise‹UnsubCallback›
getTransactionHistory
▸ getTransactionHistory(filters
: object): Promise‹ResultSet‹ExtrinsicData››
Defined in src/api/entities/Account.ts:361
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 |
---|---|---|
| undefined | string | - |
| BigNumber | - |
| TransactionOrderByInput | - |
| BigNumber | page size |
| BigNumber | page offset |
| undefined | false | true | whether the transaction was successful or not |
| TxTag | tag associated with the transaction |
Returns: Promise‹ResultSet‹ExtrinsicData››
getTransactionHistoryV2
▸ getTransactionHistoryV2(filters
: object): Promise‹ResultSet‹ExtrinsicData››
Defined in src/api/entities/Account.ts:469
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 |
---|---|---|
| undefined | string | - |
| BigNumber | - |
| ExtrinsicsOrderBy | - |
| BigNumber | page size |
| BigNumber | page offset |
| undefined | false | true | whether the transaction was successful or not |
| TxTag | tag associated with the transaction |
Returns: Promise‹ResultSet‹ExtrinsicData››
hasPermissions
▸ hasPermissions(permissions
: SimplePermissions): Promise‹boolean›
Defined in src/api/entities/Account.ts:691
Check if this Account possesses certain Permissions to act on behalf of its corresponding Identity
deprecated
in favor of checkPermissions
Parameters:
Name | Type |
---|---|
|
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:
Name | Type |
---|---|
| Entity‹unknown, unknown› |
Returns: boolean
isFrozen
▸ isFrozen(): Promise‹boolean›
Defined in src/api/entities/Account.ts:572
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
Defined in src/api/entities/Account.ts:707
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:
Name | Type | Description |
---|---|---|
| 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:
Name | Type | Description |
---|---|---|
| string | UUID to unserialize |
Returns: Identifiers
Last updated