api_entities_Account.Account
@polymeshassociation/polymesh-sdk / Modules / api/entities/Account / Account
Class: Account
api/entities/Account.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
Table of contents
Properties
Methods
Properties
address
• address: string
Polymesh-specific address of the Account. Serves as an identifier
Defined in
authorizations
• authorizations: Authorizations
<Account
>
Defined in
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.
Defined in
uuid
• uuid: string
Inherited from
Defined in
Methods
checkPermissions
▸ checkPermissions(permissions
): Promise
<CheckPermissionsResult
<Account
>>
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
Defined in
exists
▸ exists(): Promise
<boolean
>
Determine whether this Account exists on chain
Returns
Promise
<boolean
>
Overrides
Defined in
getBalance
▸ getBalance(): Promise
<Balance
>
Get the free/locked POLYX balance of the Account
note
can be subscribed to
Returns
Promise
<Balance
>
Defined in
▸ getBalance(callback
): Promise
<UnsubCallback
>
Parameters
Name | Type |
---|---|
|
Returns
Promise
<UnsubCallback
>
Defined in
getIdentity
▸ getIdentity(): Promise
<null
| Identity
>
Retrieve the Identity associated to this Account (null if there is none)
Returns
Promise
<null
| Identity
>
Defined in
getPermissions
▸ getPermissions(): Promise
<Permissions
>
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
>
Defined in
getSubsidy
▸ getSubsidy(): Promise
<null
| SubsidyWithAllowance
>
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
<null
| SubsidyWithAllowance
>
Defined in
▸ getSubsidy(callback
): Promise
<UnsubCallback
>
Parameters
Name | Type |
---|---|
|
|
Returns
Promise
<UnsubCallback
>
Defined in
getTransactionHistory
▸ getTransactionHistory(filters?
): Promise
<ResultSet
<ExtrinsicData
>>
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
Name | Type | Description |
---|---|---|
|
| - |
|
| - |
|
| - |
|
| - |
|
| page size |
|
| page offset |
|
| whether the transaction was successful or not |
|
| tag associated with the transaction |
Returns
Promise
<ResultSet
<ExtrinsicData
>>
Defined in
hasPermissions
▸ hasPermissions(permissions
): Promise
<boolean
>
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
>
Defined in
isEqual
▸ isEqual(entity
): boolean
Determine whether this Entity is the same as another one
Parameters
Name | Type |
---|---|
|
|
Returns
boolean
Inherited from
Defined in
isFrozen
▸ isFrozen(): Promise
<boolean
>
Check whether this Account is frozen. If frozen, it cannot perform any Identity related action until the primary Account of the Identity unfreezes all secondary Accounts
note
returns false if the Account isn't associated to any Identity
Returns
Promise
<boolean
>
Defined in
toHuman
▸ toHuman(): string
Return the Account's address
Returns
string
Overrides
Defined in
generateUuid
▸ Static
generateUuid<Identifiers
>(identifiers
): string
Generate the Entity's UUID from its identifying properties
Type parameters
Name |
---|
|
Parameters
Name | Type |
---|---|
|
|
Returns
string
Inherited from
Defined in
unserialize
▸ Static
unserialize<Identifiers
>(serialized
): Identifiers
Unserialize a UUID into its Unique Identifiers
Type parameters
Name |
---|
|
Parameters
Name | Type | Description |
---|---|---|
|
| UUID to unserialize |
Returns
Identifiers
Inherited from
Defined in
Last updated