import BigNumber from 'bignumber.js'; import { AuthorizationRequest, BaseAsset, Context, CustomPermissionGroup, KnownPermissionGroup, Namespace } from '../../../../../internal'; import { AgentWithGroup, CreateGroupParams, InviteExternalAgentParams, PermissionGroups, PermissionGroupType, ProcedureMethod, RemoveExternalAgentParams } from '../../../../../types'; /** * Handles all Asset Permissions related functionality */ export declare class Permissions extends Namespace { /** * @hidden */ constructor(parent: BaseAsset, context: Context); /** * 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 */ createGroup: ProcedureMethod; /** * Invite an Identity to be an agent with permissions over this Asset * * @note the signing Identity must be an agent of this Asset holding `externalAgents.acceptBecomeAgent` * permission — granted by `TxGroup.ExternalAgentManagement` or `PermissionGroupType.Full`. The chain * checks this when the `target` accepts, against the Identity that created the Authorization Request, * so an invitation sent without it can never be accepted. If no existing Permission Group matches the * requested permissions, `externalAgents.createGroupAndAddAuth` permission is also required * * @note this will create an {@link AuthorizationRequest | Authorization Request} which has to be accepted by the `target` Identity. * An {@link api/entities/Account!Account | Account} or {@link Identity} can fetch its pending Authorization Requests by calling {@link api/entities/common/namespaces/Authorizations!Authorizations.getReceived | authorizations.getReceived}. * Also, an Account or Identity can directly fetch the details of an Authorization Request by calling {@link api/entities/common/namespaces/Authorizations!Authorizations.getOne | authorizations.getOne} */ inviteAgent: ProcedureMethod; /** * Revoke an agent's permissions over this Asset */ removeAgent: ProcedureMethod; /** * Retrieve a Custom Permission Group by its ID * * @param args.id - Permission Group identifier * * @returns Promise that resolves to the Custom Permission Group * * @throws if there is no Permission Group with the passed ID */ getGroup(args: { id: BigNumber; }): Promise; /** * Retrieve a Known Permission Group by its type * * @param args.type - The Known Permission Group type * * @returns Promise that resolves to the Known Permission Group */ getGroup(args: { type: PermissionGroupType; }): Promise; /** * Retrieve all Permission Groups of this Asset */ getGroups(): Promise; /** * Retrieve a list of agents (Identities which have permissions over the Asset) and * their respective Permission Groups */ getAgents(): Promise; } //# sourceMappingURL=index.d.ts.map