TokenPermissions

Handles all Token Permissions (External Agents) related functionality on the Identity side

Hierarchy

  • Namespace‹Identity

    TokenPermissions

Index

Properties

Methods

Properties

Protected context

context: Context

Inherited from void

Defined in src/api/entities/Namespace.ts:11

Protected parent

parent: Identity

Inherited from void

Defined in src/api/entities/Namespace.ts:9

Methods

enabledAt

enabledAt(__namedParameters: object): Promise‹EventIdentifier | null›

Defined in src/api/entities/Identity/TokenPermissions.ts:264

Retrieve the identifier data (block number, date and event index) of the event that was emitted when this Identity was enabled/added as an Agent with permissions over a specific Security Token

note uses the middleware

note there is a possibility that the data is not ready by the time it is requested. In that case, null is returned

Parameters:

__namedParameters: object

Name

Type

token

string | SecurityToken‹›

Returns: Promise‹EventIdentifier | null›

get

get(): Promise‹TokenWithGroup[]›

Defined in src/api/entities/Identity/TokenPermissions.ts:72

Retrieve all the Security Tokens over which this Identity has permissions, with the corresponding Permission Group

Returns: Promise‹TokenWithGroup[]›

getGroup

getGroup(__namedParameters: object): Promise‹CustomPermissionGroup | KnownPermissionGroup

Defined in src/api/entities/Identity/TokenPermissions.ts:224

Retrieve this Identity's Permission Group for a specific Security Token

Parameters:

__namedParameters: object

Name

Type

token

string | SecurityToken‹›

Returns: Promise‹CustomPermissionGroup | KnownPermissionGroup

hasPermissions

hasPermissions(args: object): Promise‹boolean›

Defined in src/api/entities/Identity/TokenPermissions.ts:101

Check whether this Identity has specific transaction Permissions over a Security Token

Parameters:

args: object

Name

Type

token

SecurityToken | string

transactions

TxTag[] | null

Returns: Promise‹boolean›

setGroup

setGroup(args: SetPermissionGroupParams, opts?: ProcedureOpts): Promise‹TransactionQueueCustomPermissionGroup | KnownPermissionGroup››

Defined in src/api/entities/Identity/TokenPermissions.ts:301

Assign this Identity to a different Permission Group for a given Security Token

note this method is of type ProcedureMethod, which means you can call setGroup.checkAuthorization on it to see whether the Current Account has the required permissions to run it

Parameters:

Returns: Promise‹TransactionQueueCustomPermissionGroup | KnownPermissionGroup››

waive

waive(args: WaivePermissionsParams, opts?: ProcedureOpts): Promise‹TransactionQueue‹void››

Defined in src/api/entities/Identity/TokenPermissions.ts:291

Abdicate from the current Permissions Group for a given Security Token. This means that this Identity will no longer have any permissions over said Token

note this method is of type ProcedureMethod, which means you can call waive.checkAuthorization on it to see whether the Current Account has the required permissions to run it

Parameters:

Returns: Promise‹TransactionQueue‹void››

Last updated