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: SectionPermissionsarrow-up-right‹Asset› | null

Defined in src/types/index.ts:908arrow-up-right

Assets over which this key has permissions


Protected context

• context: Context

Inherited from void

Defined in src/api/entities/Namespace.ts:11arrow-up-right


Protected parent

• parent: Asset

Inherited from void

Defined in src/api/entities/Namespace.ts:9arrow-up-right


portfolios

• portfolios: SectionPermissionsarrow-up-right‹DefaultPortfolio | NumberedPortfolio› | null

Defined in src/types/index.ts:922arrow-up-right


transactionGroups

• transactionGroups: TxGrouparrow-up-right[]

Defined in src/types/index.ts:920arrow-up-right

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: TransactionPermissionsarrow-up-right | null

Defined in src/types/index.ts:912arrow-up-right

Transactions this key can execute

Methods

createGroup

▸ createGroup(args: CreateGroupParamsarrow-up-right, opts?: ProcedureOptsarrow-up-right): Promise‹TransactionQueue‹CustomPermissionGroup››

Defined in src/api/entities/Asset/Permissions.ts:70arrow-up-right

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 ProcedureMethodarrow-up-right, which means you can call createGroup.checkAuthorizationarrow-up-right on it to see whether the signing Account and Identity have the required roles and permissions to run it

Parameters:

Returns: Promise‹TransactionQueue‹CustomPermissionGroup››


getAgents

▸ getAgents(): Promise‹AgentWithGrouparrow-up-right[]›

Defined in src/api/entities/Asset/Permissions.ts:171arrow-up-right

Retrieve a list of agents (Identities which have permissions over the Asset) and their respective Permission Groups

Returns: Promise‹AgentWithGrouparrow-up-right[]›


getGroup

▸ getGroup(args: object): Promise‹CustomPermissionGroup›

Defined in src/api/entities/Asset/Permissions.ts:104arrow-up-right

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›

Defined in src/api/entities/Asset/Permissions.ts:105arrow-up-right

Parameters:

â–ª args: object

Returns: Promise‹KnownPermissionGroup›


getGroups

▸ getGroups(): Promise‹PermissionGroupsarrow-up-right›

Defined in src/api/entities/Asset/Permissions.ts:137arrow-up-right

Retrieve all Permission Groups of this Asset

Returns: Promise‹PermissionGroupsarrow-up-right›


inviteAgent

▸ inviteAgent(args: InviteExternalAgentParamsarrow-up-right, opts?: ProcedureOptsarrow-up-right): Promise‹TransactionQueue‹AuthorizationRequest››

Defined in src/api/entities/Asset/Permissions.ts:84arrow-up-right

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 Accountarrow-up-right or Identityarrow-up-right 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 ProcedureMethodarrow-up-right, which means you can call inviteAgent.checkAuthorizationarrow-up-right 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: RemoveExternalAgentParamsarrow-up-right, opts?: ProcedureOptsarrow-up-right): Promise‹TransactionQueue‹void››

Defined in src/api/entities/Asset/Permissions.ts:94arrow-up-right

Revoke an agent's permissions over this Asset

note this method is of type ProcedureMethodarrow-up-right, which means you can call removeAgent.checkAuthorizationarrow-up-right 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

Was this helpful?