AccountManagement

Handles functionality related to Account Management

Hierarchy

  • AccountManagement

Index

Methods

Methods

freezeSecondaryAccounts

▸ freezeSecondaryAccounts(opts?: ProcedureOptsarrow-up-right): Promise‹TransactionQueue‹void››

Defined in src/AccountManagement.ts:167arrow-up-right

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 NoArgsProcedureMethodarrow-up-right, which means you can call freezeSecondaryAccounts.checkAuthorizationarrow-up-right on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters:

Returns: Promise‹TransactionQueue‹void››


getAccount

â–¸ getAccount(args: object): Account

Defined in src/AccountManagement.ts:248arrow-up-right

Return an Account instance from an address

Parameters:

â–ª args: object

Name
Type

address

string

Returns: Account


getAccountBalance

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

Defined in src/AccountManagement.ts:202arrow-up-right

Get the free/locked POLYX balance of an Account

note can be subscribed to

Parameters:

Name
Type

args?

undefined | object

Returns: Promise‹AccountBalance›

▸ getAccountBalance(callback: SubCallback‹AccountBalance›): Promise‹UnsubCallback›

Defined in src/AccountManagement.ts:203arrow-up-right

Parameters:

Name
Type

callback

Returns: Promise‹UnsubCallback›

▸ getAccountBalance(args: object, callback: SubCallback‹AccountBalance›): Promise‹UnsubCallback›

Defined in src/AccountManagement.ts:204arrow-up-right

Parameters:

â–ª args: object

Name
Type

account

string | Account

▪ callback: SubCallback‹AccountBalance›

Returns: Promise‹UnsubCallback›


getSigningAccount

â–¸ getSigningAccount(): Account | null

Defined in src/AccountManagement.ts:257arrow-up-right

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:270arrow-up-right

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: InviteAccountParamsarrow-up-right, opts?: ProcedureOptsarrow-up-right): Promise‹TransactionQueue‹AuthorizationRequest››

Defined in src/AccountManagement.ts:157arrow-up-right

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 Accountarrow-up-right or Identityarrow-up-right 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 ProcedureMethodarrow-up-right, which means you can call inviteAccount.checkAuthorizationarrow-up-right on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters:

Returns: Promise‹TransactionQueue‹AuthorizationRequest››


leaveIdentity

▸ leaveIdentity(opts?: ProcedureOptsarrow-up-right): Promise‹TransactionQueue‹void››

Defined in src/AccountManagement.ts:109arrow-up-right

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 NoArgsProcedureMethodarrow-up-right, which means you can call leaveIdentity.checkAuthorizationarrow-up-right on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters:

Returns: Promise‹TransactionQueue‹void››


modifyPermissions

▸ modifyPermissions(args: ModifySignerPermissionsParamsarrow-up-right, opts?: ProcedureOptsarrow-up-right): Promise‹TransactionQueue‹void››

Defined in src/AccountManagement.ts:143arrow-up-right

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 ProcedureMethodarrow-up-right, which means you can call modifyPermissions.checkAuthorizationarrow-up-right 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: RemoveSecondaryAccountsParamsarrow-up-right, opts?: ProcedureOptsarrow-up-right): Promise‹TransactionQueue‹void››

Defined in src/AccountManagement.ts:119arrow-up-right

Remove a list of secondary Accounts associated with the signing Identity

note this method is of type ProcedureMethodarrow-up-right, which means you can call removeSecondaryAccounts.checkAuthorizationarrow-up-right 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?: ProcedureOptsarrow-up-right): Promise‹TransactionQueue‹void››

Defined in src/AccountManagement.ts:131arrow-up-right

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 ProcedureMethodarrow-up-right, which means you can call revokePermissions.checkAuthorizationarrow-up-right on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters:

â–ª args: object

Name
Type

secondaryAccounts

â–ªOptional opts: ProcedureOptsarrow-up-right

Returns: Promise‹TransactionQueue‹void››


subsidizeAccount

▸ subsidizeAccount(args: SubsidizeAccountParamsarrow-up-right, opts?: ProcedureOptsarrow-up-right): Promise‹TransactionQueue‹AuthorizationRequest››

Defined in src/AccountManagement.ts:191arrow-up-right

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 Accountarrow-up-right or Identityarrow-up-right 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 ProcedureMethodarrow-up-right, which means you can call subsidizeAccount.checkAuthorizationarrow-up-right on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters:

Returns: Promise‹TransactionQueue‹AuthorizationRequest››


unfreezeSecondaryAccounts

▸ unfreezeSecondaryAccounts(opts?: ProcedureOptsarrow-up-right): Promise‹TransactionQueue‹void››

Defined in src/AccountManagement.ts:177arrow-up-right

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 NoArgsProcedureMethodarrow-up-right, which means you can call unfreezeSecondaryAccounts.checkAuthorizationarrow-up-right on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters:

Returns: Promise‹TransactionQueue‹void››

Last updated

Was this helpful?