-
Notifications
You must be signed in to change notification settings - Fork 11
api.entities.Asset.Permissions.Permissions
api/entities/Asset/Permissions.Permissions
Handles all Asset Permissions related functionality
-
Namespace
<Asset
>↳
Permissions
▸ createGroup(args
, opts?
): Promise
<GenericPolymeshTransaction
<CustomPermissionGroup
, CustomPermissionGroup
>>
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
Name | Type |
---|---|
args |
CreateGroupParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<CustomPermissionGroup
, CustomPermissionGroup
>>
▸ getAgents(): Promise
<AgentWithGroup
[]>
Retrieve a list of agents (Identities which have permissions over the Asset) and their respective Permission Groups
Promise
<AgentWithGroup
[]>
▸ 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
Name | Type |
---|---|
args |
Object |
args.id |
BigNumber |
Promise
<CustomPermissionGroup
>
▸ getGroup(args
): Promise
<KnownPermissionGroup
>
Name | Type |
---|---|
args |
Object |
args.type |
PermissionGroupType |
Promise
<KnownPermissionGroup
>
▸ getGroups(): Promise
<PermissionGroups
>
Retrieve all Permission Groups of this Asset
Promise
<PermissionGroups
>
▸ inviteAgent(args
, opts?
): Promise
<GenericPolymeshTransaction
<AuthorizationRequest
, AuthorizationRequest
>>
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
Name | Type |
---|---|
args |
InviteExternalAgentParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<AuthorizationRequest
, AuthorizationRequest
>>
▸ removeAgent(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
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
Name | Type |
---|---|
args |
RemoveExternalAgentParams |
opts? |
ProcedureOpts |
Promise
<GenericPolymeshTransaction
<void
, void
>>
Entities
- Account
- Asset
- Authorization Request
- Checkpoint
- Checkpoint Schedule
- Corporate Action
- Corporate Action Base
- Custom Permission Group
- Default Portfolio
- Default Trusted Claim Issuer
- Dividend Distribution
- Entity
- Identity
- Instruction
- Known Permission Group
- Metadata Entry
- Multi Sig Proposal
- Numbered Portfolio
- Offering
- Permission Group
- Portfolio
- Subsidies
- Subsidy
- Ticker Reservation
- Venue
- Authorizations
- Types