Permissions
Permissions a Secondary Key has over the Identity. A null value means the key has all permissions of that type (i.e. if assets
is null, the key has permissions over all of the Identity's Assets) Handles all Asset Permissions related functionality
Hierarchy
Namespace‹Asset›
↳ Permissions
Index
Properties
Methods
Properties
assets
• assets: SectionPermissions‹Asset› | null
Defined in src/types/index.ts:917
Assets over which this key has permissions
Protected
context
Protected
context• context: Context
Inherited from void
Defined in src/api/entities/Namespace.ts:11
Protected
parent
Protected
parent• parent: Asset
Inherited from void
Defined in src/api/entities/Namespace.ts:9
portfolios
• portfolios: SectionPermissions‹DefaultPortfolio | NumberedPortfolio› | null
Defined in src/types/index.ts:931
transactionGroups
• transactionGroups: TxGroup[]
Defined in src/types/index.ts:929
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
Defined in src/types/index.ts:921
Transactions this key can execute
Methods
createGroup
▸ createGroup(args
: CreateGroupParams, opts?
: ProcedureOpts): Promise‹TransactionQueue‹CustomPermissionGroup››
Defined in src/api/entities/Asset/Permissions.ts:70
Create a Permission Group for this Asset. Identities can be assigned to Permission Groups as agents. Agents assigned to a Permission Group have said group's permissions over the Asset
note
this method is of type ProcedureMethod, which means you can call createGroup.checkAuthorization on it to see whether the signing Account and Identity have the required roles and permissions to run it
Parameters:
opts?
Returns: Promise‹TransactionQueue‹CustomPermissionGroup››
getAgents
▸ getAgents(): Promise‹AgentWithGroup[]›
Defined in src/api/entities/Asset/Permissions.ts:171
Retrieve a list of agents (Identities which have permissions over the Asset) and their respective Permission Groups
Returns: Promise‹AgentWithGroup[]›
getGroup
▸ getGroup(args
: object): Promise‹CustomPermissionGroup›
Defined in src/api/entities/Asset/Permissions.ts:104
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
id
BigNumber
Returns: Promise‹CustomPermissionGroup›
▸ getGroup(args
: object): Promise‹KnownPermissionGroup›
Defined in src/api/entities/Asset/Permissions.ts:105
Parameters:
▪ args: object
Returns: Promise‹KnownPermissionGroup›
getGroups
▸ getGroups(): Promise‹PermissionGroups›
Defined in src/api/entities/Asset/Permissions.ts:137
Retrieve all Permission Groups of this Asset
Returns: Promise‹PermissionGroups›
inviteAgent
▸ inviteAgent(args
: InviteExternalAgentParams, opts?
: ProcedureOpts): Promise‹TransactionQueue‹AuthorizationRequest››
Defined in src/api/entities/Asset/Permissions.ts:84
Invite an Identity to be an agent with permissions over this Asset
note
this will create an Authorization Request which has to be accepted by the target
Identity. 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 inviteAgent.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››
removeAgent
▸ removeAgent(args
: RemoveExternalAgentParams, opts?
: ProcedureOpts): Promise‹TransactionQueue‹void››
Defined in src/api/entities/Asset/Permissions.ts:94
Revoke an agent's permissions over this Asset
note
this method is of type ProcedureMethod, which means you can call removeAgent.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››
Last updated