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
Properties
address
• address: string
Polymesh-specific address of the Account. Serves as an identifier
Defined in
api/entities/Account/index.ts:88
authorizations
• authorizations: Authorizations
<Account
>
Defined in
api/entities/Account/index.ts:97
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
api/entities/Account/index.ts:94
subsidies
• subsidies: Subsidies
Defined in
api/entities/Account/index.ts:98
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 |
---|---|
permissions | SimplePermissions |
Returns
Promise
<CheckPermissionsResult
<Account
>>
which permissions the Account is missing (if any) and the final result
Defined in
api/entities/Account/index.ts:367
exists
▸ exists(): Promise
<boolean
>
Determine whether this Account exists on chain
Returns
Promise
<boolean
>
Overrides
Defined in
api/entities/Account/index.ts:450
getBalance
▸ getBalance(): Promise
<Balance
>
Get the free/locked POLYX balance of the Account
Returns
Promise
<Balance
>
Note
can be subscribed to, if connected to node using a web socket
Defined in
api/entities/Account/index.ts:121
▸ getBalance(callback
): Promise
<UnsubCallback
>
Parameters
Name | Type |
---|---|
callback | SubCallback <Balance > |
Returns
Promise
<UnsubCallback
>
Defined in
api/entities/Account/index.ts:122
getCurrentNonce
▸ getCurrentNonce(): Promise
<BigNumber
>
Retrieve the current nonce for this Account
Returns
Promise
<BigNumber
>
Defined in
api/entities/Account/index.ts:464
getIdentity
▸ getIdentity(): Promise
<null
| Identity
>
Retrieve the Identity associated to this Account (null if there is none)
Returns
Promise
<null
| Identity
>
Defined in
api/entities/Account/index.ts:141
getMultiSig
▸ getMultiSig(): Promise
<null
| MultiSig
>
Fetch the MultiSig this Account is part of. If this Account is not a signer on any MultiSig, return null
Returns
Promise
<null
| MultiSig
>
Defined in
api/entities/Account/index.ts:422
getNextAssetId
▸ getNextAssetId(): Promise
<string
>
Returns next assetID that will be generated for this Identity
Returns
Promise
<string
>
Defined in
api/entities/Account/index.ts:609
getOffChainReceipts
▸ getOffChainReceipts(): Promise
<BigNumber
[]>
Returns all off chain receipts used by this Account
Returns
Promise
<BigNumber
[]>
Defined in
api/entities/Account/index.ts:582
getPendingProposals
▸ getPendingProposals(): Promise
<MultiSigProposal
[]>
Returns pending MultiSig proposals for this Account
Returns
Promise
<MultiSigProposal
[]>
Note
uses the middleware
Throws
if the Account is not a signer on any MultiSig
Defined in
api/entities/Account/index.ts:566
getPermissions
▸ getPermissions(): Promise
<Permissions
>
Retrieve the Permissions this Account has as a Permissioned Account for its corresponding Identity
Returns
Promise
<Permissions
>
Throws
if there is no Identity associated with the Account
Defined in
api/entities/Account/index.ts:314
getPolyxTransactions
▸ getPolyxTransactions(filters
): Promise
<ResultSet
<HistoricPolyxTransaction
>>
Returns POLYX transactions associated with this account
Parameters
Name | Type | Description |
---|---|---|
filters | Object | - |
filters.size? | BigNumber | page size |
filters.start? | BigNumber | page offset |
Returns
Promise
<ResultSet
<HistoricPolyxTransaction
>>
Note
uses the middleware
Defined in
api/entities/Account/index.ts:548
getTransactionHistory
▸ getTransactionHistory(filters?
): Promise
<ResultSet
<ExtrinsicData
>>
Retrieve a list of transactions signed by this Account. Can be filtered using parameters
Parameters
Name | Type | Description |
---|---|---|
filters | Object | - |
filters.blockHash? | string | - |
filters.blockNumber? | BigNumber | - |
filters.orderBy? | ExtrinsicsOrderBy | - |
filters.size? | BigNumber | page size |
filters.start? | BigNumber | page offset |
filters.success? | boolean | whether the transaction was successful or not |
filters.tag? | TxTag | tag associated with the transaction |
Returns
Promise
<ResultSet
<ExtrinsicData
>>
Note
if both blockNumber
and blockHash
are passed, only blockNumber
is taken into account.
Also, for ordering by block_id, one should pass ExtrinsicsOrderBy.CreatedAtAsc
or ExtrinsicsOrderBy.CreatedAtDesc
in order of their choice (since block ID is a string field in middleware v2)
Note
uses the middleware v2
Defined in
api/entities/Account/index.ts:177
getTypeInfo
▸ getTypeInfo(): Promise
<AccountTypeInfo
>
Retrieve the type of Account, and its relation to an Identity, if applicable
Returns
Promise
<AccountTypeInfo
>
Defined in
api/entities/Account/index.ts:485
isEqual
▸ isEqual(entity
): boolean
Determine whether this Entity is the same as another one
Parameters
Name | Type |
---|---|
entity | Entity <unknown , unknown > |
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
Returns
Promise
<boolean
>
Note
returns false if the Account isn't associated to any Identity
Defined in
api/entities/Account/index.ts:293
toHuman
▸ toHuman(): string
Return the Account's address
Returns
string
Overrides
Defined in
api/entities/Account/index.ts:457
generateUuid
▸ Static
generateUuid<Identifiers
>(identifiers
): string
Generate the Entity's UUID from its identifying properties
Type parameters
Name |
---|
Identifiers |
Parameters
Name | Type |
---|---|
identifiers | Identifiers |
Returns
string
Inherited from
Defined in
unserialize
▸ Static
unserialize<Identifiers
>(serialized
): Identifiers
Unserialize a UUID into its Unique Identifiers
Type parameters
Name |
---|
Identifiers |
Parameters
Name | Type | Description |
---|---|---|
serialized | string | UUID to unserialize |
Returns
Identifiers