api_entities_Asset_Permissions.Permissions
@polymeshassociation/polymesh-sdk / Modules / api/entities/Asset/Permissions / Permissions
Class: Permissions
api/entities/Asset/Permissions.Permissions
Handles all Asset Permissions related functionality
Hierarchy
Namespace
<Asset
>↳
Permissions
Table of contents
Methods
Methods
createGroup
▸ createGroup(args
, opts?
): Promise
<TransactionQueue
<CustomPermissionGroup
, CustomPermissionGroup
, unknown
[][]>>
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
, CustomPermissionGroup
, unknown
[][]>>
Defined in
api/entities/Asset/Permissions.ts:70
getAgents
▸ getAgents(): Promise
<AgentWithGroup
[]>
Retrieve a list of agents (Identities which have permissions over the Asset) and their respective Permission Groups
Returns
Promise
<AgentWithGroup
[]>
Defined in
api/entities/Asset/Permissions.ts:171
getGroup
▸ getGroup(args
): 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
args.id
BigNumber
Returns
Promise
<CustomPermissionGroup
>
Defined in
api/entities/Asset/Permissions.ts:104
▸ getGroup(args
): Promise
<KnownPermissionGroup
>
Parameters
args
Object
args.type
Returns
Promise
<KnownPermissionGroup
>
Defined in
api/entities/Asset/Permissions.ts:105
getGroups
▸ getGroups(): Promise
<PermissionGroups
>
Retrieve all Permission Groups of this Asset
Returns
Promise
<PermissionGroups
>
Defined in
api/entities/Asset/Permissions.ts:137
inviteAgent
▸ inviteAgent(args
, opts?
): Promise
<TransactionQueue
<AuthorizationRequest
, AuthorizationRequest
, unknown
[][]>>
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
, AuthorizationRequest
, unknown
[][]>>
Defined in
api/entities/Asset/Permissions.ts:84
removeAgent
▸ removeAgent(args
, opts?
): Promise
<TransactionQueue
<void
, void
, unknown
[][]>>
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
, void
, unknown
[][]>>
Defined in
Last updated