api_client_AccountManagement.AccountManagement

@polymeshassociation/polymesh-sdk / Modules / api/client/AccountManagement / AccountManagement

Class: AccountManagement

api/client/AccountManagement.AccountManagement

Handles functionality related to Account Management

Table of contents

Methods

Methods

freezeSecondaryAccounts

freezeSecondaryAccounts(opts?): Promise<TransactionQueue<void, void, unknown[][]>>

Freeze all of the secondary Accounts in the signing Identity. This means revoking their permission to perform any operation on the blockchain and freezing their funds until the Accounts are unfrozen via unfreezeSecondaryAccounts

note this method is of type NoArgsProcedureMethod, which means you can call freezeSecondaryAccounts.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters

Returns

Promise<TransactionQueue<void, void, unknown[][]>>

Defined in

api/client/AccountManagement.ts:167


getAccount

getAccount(args): Account

Return an Account instance from an address

Parameters

Returns

Account

Defined in

api/client/AccountManagement.ts:248


getAccountBalance

getAccountBalance(args?): Promise<Balance>

Get the free/locked POLYX balance of an Account

note can be subscribed to

Parameters

Returns

Promise<Balance>

Defined in

api/client/AccountManagement.ts:202

getAccountBalance(callback): Promise<UnsubCallback>

Parameters

Returns

Promise<UnsubCallback>

Defined in

api/client/AccountManagement.ts:203

getAccountBalance(args, callback): Promise<UnsubCallback>

Parameters

Returns

Promise<UnsubCallback>

Defined in

api/client/AccountManagement.ts:204


getSigningAccount

getSigningAccount(): null | Account

Return the signing Account, or null if no signing Account has been set

Returns

null | Account

Defined in

api/client/AccountManagement.ts:257


getSigningAccounts

getSigningAccounts(): Promise<Account[]>

Return a list that contains all the signing Accounts associated to the SDK instance's Signing Manager

throws — if there is no Signing Manager attached to the SDK

Returns

Promise<Account[]>

Defined in

api/client/AccountManagement.ts:270


inviteAccount

inviteAccount(args, opts?): Promise<TransactionQueue<AuthorizationRequest, AuthorizationRequest, unknown[][]>>

Send an invitation to an Account to join the signing Identity as a secondary Account

note this will create an Authorization Request which has to be accepted by the targetAccount. An Account or Identity can fetch its pending Authorization Requests by calling authorizations.getReceived. Also, an Account or Identity can directly fetch the details of an Authorization Request by calling authorizations.getOne

note this method is of type ProcedureMethod, which means you can call inviteAccount.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters

Returns

Promise<TransactionQueue<AuthorizationRequest, AuthorizationRequest, unknown[][]>>

Defined in

api/client/AccountManagement.ts:157


leaveIdentity

leaveIdentity(opts?): Promise<TransactionQueue<void, void, unknown[][]>>

Disassociate the signing Account from its Identity. This operation can only be done if the signing Account is a secondary Account

note this method is of type NoArgsProcedureMethod, which means you can call leaveIdentity.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters

Returns

Promise<TransactionQueue<void, void, unknown[][]>>

Defined in

api/client/AccountManagement.ts:109


modifyPermissions

modifyPermissions(args, opts?): Promise<TransactionQueue<void, void, unknown[][]>>

Modify all permissions of a list of secondary Accounts associated with the signing Identity

throws if the signing Account is not the primary Account of the Identity whose secondary Account permissions are being modified

note this method is of type ProcedureMethod, which means you can call modifyPermissions.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters

Returns

Promise<TransactionQueue<void, void, unknown[][]>>

Defined in

api/client/AccountManagement.ts:143


removeSecondaryAccounts

removeSecondaryAccounts(args, opts?): Promise<TransactionQueue<void, void, unknown[][]>>

Remove a list of secondary Accounts associated with the signing Identity

note this method is of type ProcedureMethod, which means you can call removeSecondaryAccounts.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters

Returns

Promise<TransactionQueue<void, void, unknown[][]>>

Defined in

api/client/AccountManagement.ts:119


revokePermissions

revokePermissions(args, opts?): Promise<TransactionQueue<void, void, unknown[][]>>

Revoke all permissions of a list of secondary Accounts associated with the signing Identity

throws if the signing Account is not the primary Account of the Identity whose secondary Account permissions are being revoked

note this method is of type ProcedureMethod, which means you can call revokePermissions.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters

Returns

Promise<TransactionQueue<void, void, unknown[][]>>

Defined in

api/client/AccountManagement.ts:131


subsidizeAccount

subsidizeAccount(args, opts?): Promise<TransactionQueue<AuthorizationRequest, AuthorizationRequest, unknown[][]>>

Send an Authorization Request to an Account to subsidize its transaction fees

note this will create an Authorization Request which has to be accepted by the beneficiary Account. An Account or Identity can fetch its pending Authorization Requests by calling authorizations.getReceived. Also, an Account or Identity can directly fetch the details of an Authorization Request by calling authorizations.getOne

note this method is of type ProcedureMethod, which means you can call subsidizeAccount.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters

Returns

Promise<TransactionQueue<AuthorizationRequest, AuthorizationRequest, unknown[][]>>

Defined in

api/client/AccountManagement.ts:191


unfreezeSecondaryAccounts

unfreezeSecondaryAccounts(opts?): Promise<TransactionQueue<void, void, unknown[][]>>

Unfreeze all of the secondary Accounts in the signing Identity. This will restore their permissions as they were before being frozen

note this method is of type NoArgsProcedureMethod, which means you can call unfreezeSecondaryAccounts.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters

Returns

Promise<TransactionQueue<void, void, unknown[][]>>

Defined in

api/client/AccountManagement.ts:177

Last updated