Class: AssetPermissions
api/entities/Identity/AssetPermissions.AssetPermissions
Handles all Asset Permissions (External Agents) related functionality on the Identity side
Hierarchy
-
Namespace
<Identity
>↳
AssetPermissions
Methods
checkPermissions
▸ checkPermissions(args
): Promise
<CheckPermissionsResult
<Identity
>>
Check whether this Identity has specific transaction Permissions over an Asset
Parameters
Name | Type |
---|---|
args | Object |
args.asset | string | BaseAsset |
args.transactions | null | TxTag [] |
Returns
Promise
<CheckPermissionsResult
<Identity
>>
Defined in
api/entities/Identity/AssetPermissions.ts:129
enabledAt
▸ enabledAt(«destructured»
): 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
Parameters
Name | Type |
---|---|
«destructured» | Object |
› asset | string | FungibleAsset | NftCollection |
Returns
Promise
<null
| EventIdentifier
>
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
Defined in
api/entities/Identity/AssetPermissions.ts:319
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:100
getGroup
▸ getGroup(«destructured»
): Promise
<CustomPermissionGroup
| KnownPermissionGroup
>
Retrieve this Identity's Permission Group for a specific Asset
Parameters
Name | Type |
---|---|
«destructured» | Object |
› asset | string | BaseAsset |
Returns
Promise
<CustomPermissionGroup
| KnownPermissionGroup
>
Defined in
api/entities/Identity/AssetPermissions.ts:279
getOperationHistory
▸ getOperationHistory(opts
): Promise
<ResultSet
<EventIdentifier
>>
Retrieve all Events triggered by Operations this Identity has performed on a specific Asset
Parameters
Name | Type | Description |
---|---|---|
opts | Object | - |
opts.asset | string | FungibleAsset | - |
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
>>
Note
uses the middlewareV2
Note
supports pagination
Defined in
api/entities/Identity/AssetPermissions.ts:373
setGroup
▸ setGroup(args
, opts?
): Promise
<GenericPolymeshTransaction
<CustomPermissionGroup
| KnownPermissionGroup
, CustomPermissionGroup
| KnownPermissionGroup
>>
Assign this Identity to a different Permission Group for a given Asset
Parameters
Name | Type |
---|---|
args | SetPermissionGroupParams |
opts? | ProcedureOpts |
Returns
Promise
<GenericPolymeshTransaction
<CustomPermissionGroup
| KnownPermissionGroup
, CustomPermissionGroup
| KnownPermissionGroup
>>
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
Defined in
api/entities/Identity/AssetPermissions.ts:358
waive
▸ waive(args
, opts?
): Promise
<GenericPolymeshTransaction
<void
, void
>>
Abdicate from the current Permissions Group for a given Asset. This means that this Identity will no longer have any permissions over said Asset
Parameters
Name | Type |
---|---|
args | WaivePermissionsParams |
opts? | ProcedureOpts |
Returns
Promise
<GenericPolymeshTransaction
<void
, void
>>
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