AssetPermissions

Handles all Asset Permissions (External Agents) related functionality on the Identity side

Hierarchy

  • Namespace‹Identity›

    ↳ AssetPermissions

Index

Properties

Methods

Properties

Protected context

• context: Context

Inherited from void

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


Protected parent

• parent: Identity

Inherited from void

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

Methods

checkPermissions

▸ checkPermissions(args: object): Promise‹CheckPermissionsResultarrow-up-right‹Identityarrow-up-right››

Defined in src/api/entities/Identity/AssetPermissions.ts:136arrow-up-right

Check whether this Identity has specific transaction Permissions over an Asset

Parameters:

â–ª args: object

Name
Type

asset

Asset | string

transactions

TxTag[] | null

Returns: Promise‹CheckPermissionsResultarrow-up-right‹Identityarrow-up-right››


enabledAt

▸ enabledAt(__namedParameters: object): Promise‹EventIdentifierarrow-up-right | null›

Defined in src/api/entities/Identity/AssetPermissions.ts:340arrow-up-right

Retrieve the identifier data (block number, date and event index) of the event that was emitted when this Identity was enabled/added as an Agent with permissions over a specific Asset

note uses the middleware

note there is a possibility that the data is not ready by the time it is requested. In that case, null is returned

Parameters:

â–ª __namedParameters: object

Name
Type

asset

string | Asset‹›

Returns: Promise‹EventIdentifierarrow-up-right | null›


enabledAtV2

▸ enabledAtV2(__namedParameters: object): Promise‹EventIdentifierarrow-up-right | null›

Defined in src/api/entities/Identity/AssetPermissions.ts:365arrow-up-right

Retrieve the identifier data (block number, date and event index) of the event that was emitted when this Identity was enabled/added as an Agent with permissions over a specific Asset

note uses the middlewareV2

note there is a possibility that the data is not ready by the time it is requested. In that case, null is returned

Parameters:

â–ª __namedParameters: object

Name
Type

asset

string | Asset‹›

Returns: Promise‹EventIdentifierarrow-up-right | null›


get

▸ get(): Promise‹AssetWithGrouparrow-up-right[]›

Defined in src/api/entities/Identity/AssetPermissions.ts:107arrow-up-right

Retrieve all the Assets over which this Identity has permissions, with the corresponding Permission Group

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


getGroup

▸ getGroup(__namedParameters: object): Promise‹CustomPermissionGroup | KnownPermissionGroup›

Defined in src/api/entities/Identity/AssetPermissions.ts:300arrow-up-right

Retrieve this Identity's Permission Group for a specific Asset

Parameters:

â–ª __namedParameters: object

Name
Type

asset

string | Asset‹›

Returns: Promise‹CustomPermissionGroup | KnownPermissionGroup›


getOperationHistory

▸ getOperationHistory(opts: object): Promise‹ResultSetarrow-up-right‹EventIdentifierarrow-up-right››

Defined in src/api/entities/Identity/AssetPermissions.ts:415arrow-up-right

Retrieve all Events triggered by Operations this Identity has performed on a specific Asset

note uses the middleware

note supports pagination

Parameters:

â–ª opts: object

Name
Type
Description

asset

string | Asset

-

eventId?

EventId

filters results by event

moduleId?

ModuleId

filters results by module

size?

BigNumber

page size

start?

BigNumber

page offset

Returns: Promise‹ResultSetarrow-up-right‹EventIdentifierarrow-up-right››


getOperationHistoryV2

▸ getOperationHistoryV2(opts: object): Promise‹ResultSetarrow-up-right‹EventIdentifierarrow-up-right››

Defined in src/api/entities/Identity/AssetPermissions.ts:500arrow-up-right

Retrieve all Events triggered by Operations this Identity has performed on a specific Asset

note uses the middlewareV2

note supports pagination

Parameters:

â–ª opts: object

Name
Type
Description

asset

string | Asset

-

eventId?

EventId

filters results by event

moduleId?

ModuleId

filters results by module

size?

BigNumber

page size

start?

BigNumber

page offset

Returns: Promise‹ResultSetarrow-up-right‹EventIdentifierarrow-up-right››


hasPermissions

▸ hasPermissions(args: object): Promise‹boolean›

Defined in src/api/entities/Identity/AssetPermissions.ts:288arrow-up-right

Check whether this Identity has specific transaction Permissions over an Asset

deprecated in favor of checkPermissions

Parameters:

â–ª args: object

Name
Type

asset

Asset | string

transactions

TxTag[] | null

Returns: Promise‹boolean›


setGroup

▸ setGroup(args: SetPermissionGroupParamsarrow-up-right, opts?: ProcedureOptsarrow-up-right): Promise‹TransactionQueue‹CustomPermissionGroup | KnownPermissionGroup››

Defined in src/api/entities/Identity/AssetPermissions.ts:400arrow-up-right

Assign this Identity to a different Permission Group for a given Asset

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


waive

▸ waive(args: WaivePermissionsParamsarrow-up-right, opts?: ProcedureOptsarrow-up-right): Promise‹TransactionQueue‹void››

Defined in src/api/entities/Identity/AssetPermissions.ts:390arrow-up-right

Abdicate from the current Permissions Group for a given Asset. This means that this Identity will no longer have any permissions over said Asset

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