api_entities_Identity_AssetPermissions.AssetPermissions
@polymeshassociation/polymesh-sdk / Modules / api/entities/Identity/AssetPermissions / AssetPermissions
Class: AssetPermissions
api/entities/Identity/AssetPermissions.AssetPermissions
Handles all Asset Permissions (External Agents) related functionality on the Identity side
Hierarchy
Namespace
<Identity
>↳
AssetPermissions
Table of contents
Methods
Methods
checkPermissions
▸ checkPermissions(args
): Promise
<CheckPermissionsResult
<Identity
>>
Check whether this Identity has specific transaction Permissions over an Asset
Parameters
Returns
Promise
<CheckPermissionsResult
<Identity
>>
Defined in
api/entities/Identity/AssetPermissions.ts:133
enabledAt
▸ enabledAt(__namedParameters
): Promise
<null
| EventIdentifier
>
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
__namedParameters.asset
string
| Asset
Returns
Promise
<null
| EventIdentifier
>
Defined in
api/entities/Identity/AssetPermissions.ts:337
get
▸ get(): Promise
<AssetWithGroup
[]>
Retrieve all the Assets over which this Identity has permissions, with the corresponding Permission Group
Returns
Promise
<AssetWithGroup
[]>
Defined in
api/entities/Identity/AssetPermissions.ts:104
getGroup
▸ getGroup(__namedParameters
): Promise
<CustomPermissionGroup
| KnownPermissionGroup
>
Retrieve this Identity's Permission Group for a specific Asset
Parameters
__namedParameters
Object
__namedParameters.asset
string
| Asset
Returns
Promise
<CustomPermissionGroup
| KnownPermissionGroup
>
Defined in
api/entities/Identity/AssetPermissions.ts:297
getOperationHistory
▸ getOperationHistory(opts
): Promise
<ResultSet
<EventIdentifier
>>
Retrieve all Events triggered by Operations this Identity has performed on a specific Asset
note
uses the middleware
note
supports pagination
Parameters
opts
Object
-
opts.eventId?
EventIdEnum
filters results by event
opts.moduleId?
ModuleIdEnum
filters results by module
opts.size?
BigNumber
page size
opts.start?
BigNumber
page offset
Returns
Promise
<ResultSet
<EventIdentifier
>>
Defined in
api/entities/Identity/AssetPermissions.ts:386
hasPermissions
▸ hasPermissions(args
): Promise
<boolean
>
Check whether this Identity has specific transaction Permissions over an Asset
deprecated
in favor of checkPermissions
Parameters
Returns
Promise
<boolean
>
Defined in
api/entities/Identity/AssetPermissions.ts:285
setGroup
▸ setGroup(args
, opts?
): Promise
<TransactionQueue
<CustomPermissionGroup
| KnownPermissionGroup
, CustomPermissionGroup
| KnownPermissionGroup
, unknown
[][]>>
Assign this Identity to a different Permission Group for a given Asset
note
this method is of type ProcedureMethod, which means you can call setGroup.checkAuthorization 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
, CustomPermissionGroup
| KnownPermissionGroup
, unknown
[][]>>
Defined in
api/entities/Identity/AssetPermissions.ts:371
waive
▸ waive(args
, opts?
): Promise
<TransactionQueue
<void
, void
, unknown
[][]>>
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 ProcedureMethod, which means you can call waive.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
<void
, void
, unknown
[][]>>
Defined in
Last updated