Permissions
Handles all Security Token Permissions related functionality Permissions a Secondary Key has over the Identity. A null value means the key has all permissions of that type (i.e. if tokens is null, the key has permissions over all of the Identity's Security Tokens)

Hierarchy

Index

Properties

Methods

Properties

Protected context

context: Context
Inherited from void

Protected parent

parent: SecurityToken
Inherited from void

portfolios

tokens

tokens: SectionPermissionsSecurityToken› | null
Security Tokens over which this key has permissions

transactionGroups

transactionGroups: TxGroup[]
list of Transaction Groups this key can execute. Having permissions over a TxGroup means having permissions over every TxTag in said group. Partial group permissions are not covered by this value. For a full picture of transaction permissions, see the transactions property
NOTE: If transactions is null, ignore this value

transactions

transactions: TransactionPermissions | null
Transactions this key can execute

Methods

createGroup

createGroup(args: CreateGroupParams, opts?: ProcedureOpts): Promise‹TransactionQueueCustomPermissionGroup››
Create a Permission group for this Security Token. Identities can then be assigned to said group as Agents. Agents assigned to a group have said group's permissions over this Security Token
note this method is of type ProcedureMethod, which means you can call createGroup.checkAuthorization on it to see whether the Current Account has the required permissions to run it
Parameters:
Name
Type
opts?
Returns: Promise‹TransactionQueueCustomPermissionGroup››

getAgents

getAgents(): Promise‹AgentWithGroup[]›
Retrieve a list of Agents (Identities which have permissions over the Security Token) and their respective Permission Groups
Returns: Promise‹AgentWithGroup[]›

getGroup

getGroup(args: object): Promise‹CustomPermissionGroup
Retrieve a single Permission Group by its ID (or type). Passing an ID will fetch a Custom Permission Group, while passing a type will fetch a Known Permission Group
throws if there is no Permission Group with the passed ID
Parameters:
args: object
Name
Type
id
BigNumber
Returns: Promise‹CustomPermissionGroup
getGroup(args: object): Promise‹KnownPermissionGroup
Parameters:
args: object
Name
Type
Returns: Promise‹KnownPermissionGroup

getGroups

getGroups(): Promise‹object›
Retrieve all Permission Groups of this Security Token
Returns: Promise‹object›

inviteAgent

inviteAgent(args: InviteExternalAgentParams, opts?: ProcedureOpts): Promise‹TransactionQueue‹void››
Invite an Identity to be an Agent with permissions over this Security Token
note this method is of type ProcedureMethod, which means you can call inviteAgent.checkAuthorization on it to see whether the Current Account has the required permissions to run it
Parameters:
Name
Type
opts?
Returns: Promise‹TransactionQueue‹void››

removeAgent

removeAgent(args: RemoveExternalAgentParams, opts?: ProcedureOpts): Promise‹TransactionQueue‹void››
Revoke an Agent's permissions for this Security Token
note this method is of type ProcedureMethod, which means you can call removeAgent.checkAuthorization on it to see whether the Current Account has the required permissions to run it
Parameters:
Name
Type
opts?
Returns: Promise‹TransactionQueue‹void››
Last modified 26d ago