AccountManagement

Handles functionality related to Account Management

Hierarchy

  • AccountManagement

Index

Methods

Methods

freezeSecondaryAccounts

freezeSecondaryAccounts(opts?: ProcedureOpts): Promise‹TransactionQueue‹void››

Defined in src/AccountManagement.ts:167

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:

NameType

opts?

Returns: Promise‹TransactionQueue‹void››


getAccount

getAccount(args: object): Account

Defined in src/AccountManagement.ts:248

Return an Account instance from an address

Parameters:

args: object

NameType

address

string

Returns: Account


getAccountBalance

getAccountBalance(args?: undefined | object): Promise‹AccountBalance

Defined in src/AccountManagement.ts:202

Get the free/locked POLYX balance of an Account

note can be subscribed to

Parameters:

NameType

args?

undefined | object

Returns: Promise‹AccountBalance

getAccountBalance(callback: SubCallbackAccountBalance›): Promise‹UnsubCallback

Defined in src/AccountManagement.ts:203

Parameters:

NameType

callback

Returns: Promise‹UnsubCallback

getAccountBalance(args: object, callback: SubCallbackAccountBalance›): Promise‹UnsubCallback

Defined in src/AccountManagement.ts:204

Parameters:

args: object

NameType

account

string | Account

callback: SubCallbackAccountBalance

Returns: Promise‹UnsubCallback


getSigningAccount

getSigningAccount(): Account | null

Defined in src/AccountManagement.ts:257

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

Returns: Account | null


getSigningAccounts

getSigningAccounts(): Promise‹Account[]›

Defined in src/AccountManagement.ts:270

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[]›


inviteAccount

inviteAccount(args: InviteAccountParams, opts?: ProcedureOpts): Promise‹TransactionQueueAuthorizationRequest››

Defined in src/AccountManagement.ts:157

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‹TransactionQueueAuthorizationRequest››


leaveIdentity

leaveIdentity(opts?: ProcedureOpts): Promise‹TransactionQueue‹void››

Defined in src/AccountManagement.ts:109

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:

NameType

opts?

Returns: Promise‹TransactionQueue‹void››


modifyPermissions

modifyPermissions(args: ModifySignerPermissionsParams, opts?: ProcedureOpts): Promise‹TransactionQueue‹void››

Defined in src/AccountManagement.ts:143

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››


removeSecondaryAccounts

removeSecondaryAccounts(args: RemoveSecondaryAccountsParams, opts?: ProcedureOpts): Promise‹TransactionQueue‹void››

Defined in src/AccountManagement.ts:119

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››


revokePermissions

revokePermissions(args: object, opts?: ProcedureOpts): Promise‹TransactionQueue‹void››

Defined in src/AccountManagement.ts:131

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:

args: object

NameType

secondaryAccounts

Optional opts: ProcedureOpts

Returns: Promise‹TransactionQueue‹void››


subsidizeAccount

subsidizeAccount(args: SubsidizeAccountParams, opts?: ProcedureOpts): Promise‹TransactionQueueAuthorizationRequest››

Defined in src/AccountManagement.ts:191

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‹TransactionQueueAuthorizationRequest››


unfreezeSecondaryAccounts

unfreezeSecondaryAccounts(opts?: ProcedureOpts): Promise‹TransactionQueue‹void››

Defined in src/AccountManagement.ts:177

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:

NameType

opts?

Returns: Promise‹TransactionQueue‹void››

Last updated