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:64
Polymesh-specific address of the account. Serves as an identifier
authorizations
• authorizations: Authorizations‹Account›
Defined in src/api/entities/Account.ts:72
Protected
context
Protected
context• context: Context
Defined in src/api/entities/Entity.ts:48
key
• key: string
Defined in src/api/entities/Account.ts:69
public key of the account. This is a hex representation of the address that is transversal to any Substrate chain
uuid
• uuid: string
Defined in src/api/entities/Entity.ts:46
Methods
exists
▸ exists(): Promise‹boolean›
Defined in src/api/entities/Account.ts:446
Determine whether this Account exists on chain
Returns: Promise‹boolean›
getBalance
▸ getBalance(): Promise‹AccountBalance›
Defined in src/api/entities/Account.ts:109
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:110
Parameters:
Returns: Promise‹UnsubCallback›
getIdentity
▸ getIdentity(): Promise‹Identity | null›
Defined in src/api/entities/Account.ts:152
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:290
Retrieve the Permissions this Signer has as a Signing Key for its corresponding Identity
Returns: Promise‹Permissions›
getSubsidy
▸ getSubsidy(): Promise‹Omit‹Subsidy, "beneficiary"› | null›
Defined in src/api/entities/Account.ts:131
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‹Omit‹Subsidy, "beneficiary"› | null›
▸ getSubsidy(callback
: SubCallback‹Omit‹Subsidy, "beneficiary"› | null›): Promise‹UnsubCallback›
Defined in src/api/entities/Account.ts:132
Parameters:
Returns: Promise‹UnsubCallback›
getTransactionHistory
▸ getTransactionHistory(filters
: object): Promise‹ResultSet‹ExtrinsicData››
Defined in src/api/entities/Account.ts:184
Retrieve a list of transactions signed by this account. Can be filtered using parameters
note
uses the middleware
Parameters:
▪Default value
filters: object= {}
Returns: Promise‹ResultSet‹ExtrinsicData››
hasPermissions
▸ hasPermissions(permissions
: SimplePermissions): Promise‹boolean›
Defined in src/api/entities/Account.ts:318
Check if this Account possesses certain Permissions for its corresponding Identity
Parameters:
Returns: Promise‹boolean›
isEqual
▸ isEqual(entity
: Entity‹unknown, unknown›): boolean
Defined in src/api/entities/Entity.ts:61
Determine whether this Entity is the same as another one
Parameters:
Returns: boolean
isFrozen
▸ isFrozen(): Promise‹boolean›
Defined in src/api/entities/Account.ts:269
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
▸ leaveIdentity(args
: void, opts?
: ProcedureOpts): Promise‹TransactionQueue‹void››
Defined in src/api/entities/Account.ts:100
Leave the Account's Identity. This operation can only be done if the Account is a secondary key for the Identity
note
this method is of type ProcedureMethod, which means you can call leaveIdentity.checkAuthorization
on it to see whether the Current Account has the required permissions to run it
Parameters:
Returns: Promise‹TransactionQueue‹void››
toJson
▸ toJson(): string
Defined in src/api/entities/Account.ts:453
Return the Account's address
Returns: string
Static
generateUuid
Static
generateUuid▸ generateUuid‹Identifiers›(identifiers
: Identifiers): string
Inherited from Entity.generateUuid
Defined in src/api/entities/Entity.ts:14
Generate the Entity's UUID from its identifying properties
Type parameters:
▪ Identifiers
Parameters:
Returns: string
Static
unserialize
Static
unserialize▸ unserialize‹Identifiers›(serialized
: string): Identifiers
Inherited from Entity.unserialize
Defined in src/api/entities/Entity.ts:23
Unserialize a UUID into its Unique Identifiers
Type parameters:
▪ Identifiers
Parameters:
Returns: Identifiers
Last updated