Polymesh SDK API Reference
beta
beta
  • Globals
  • Classes
    • Account
    • AccountManagement
    • Asset
    • AssetHolders
    • AssetPermissions
    • Assets
    • AuthorizationRequest
    • Authorizations
    • Checkpoint
    • CheckpointSchedule
    • Checkpoints
    • Claims
    • Compliance
    • CorporateAction
    • CorporateActionBase
    • CorporateActions
    • Count
    • CustomPermissionGroup
    • DefaultPortfolio
    • DefaultTrustedClaimIssuer
    • Distributions
    • DividendDistribution
    • Documents
    • Entity
    • Identities
    • Identity
    • IdentityAuthorizations
    • Instruction
    • Issuance
    • KnownPermissionGroup
    • Network
    • NumberedPortfolio
    • Offering
    • Offerings
    • Percentage
    • PermissionGroup
    • Permissions
    • Polymesh
    • PolymeshError
    • PolymeshTransaction
    • PolymeshTransactionBase
    • PolymeshTransactionBatch
    • Portfolio
    • Portfolios
    • Requirements
    • Schedules
    • Settlements
    • Subsidy
    • TickerReservation
    • TransactionQueue
    • TransferRestrictionBase
    • TransferRestrictions
    • TrustedClaimIssuers
    • Venue
  • Enums
  • Interfaces
Powered by GitBook
On this page
  • Hierarchy
  • Index
  • Properties
  • Methods
  • Properties
  • Protected context
  • Protected parent
  • Methods
  • checkPermissions
  • enabledAt
  • enabledAtV2
  • get
  • getGroup
  • getOperationHistory
  • getOperationHistoryV2
  • hasPermissions
  • setGroup
  • waive

Was this helpful?

  1. Classes

AssetPermissions

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

Hierarchy

  • Namespace‹Identity›

    ↳ AssetPermissions

Index

Properties

  • context

  • parent

Methods

  • checkPermissions

  • enabledAt

  • enabledAtV2

  • get

  • getGroup

  • getOperationHistory

  • getOperationHistoryV2

  • hasPermissions

  • setGroup

  • waive

Properties

Protected context

• context: Context

Inherited from void

Defined in src/api/entities/Namespace.ts:11


Protected parent

• parent: Identity

Inherited from void

Defined in src/api/entities/Namespace.ts:9

Methods

checkPermissions

▸ checkPermissions(args: object): Promise‹CheckPermissionsResult‹Identity››

Defined in src/api/entities/Identity/AssetPermissions.ts:136

Check whether this Identity has specific transaction Permissions over an Asset

Parameters:

▪ args: object

Name
Type

asset

transactions

TxTag[] | null

Returns: Promise‹CheckPermissionsResult‹Identity››


enabledAt

▸ enabledAt(__namedParameters: object): Promise‹EventIdentifier | null›

Defined in src/api/entities/Identity/AssetPermissions.ts:340

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

Returns: Promise‹EventIdentifier | null›


enabledAtV2

▸ enabledAtV2(__namedParameters: object): Promise‹EventIdentifier | null›

Defined in src/api/entities/Identity/AssetPermissions.ts:365

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

Returns: Promise‹EventIdentifier | null›


get

▸ get(): Promise‹AssetWithGroup[]›

Defined in src/api/entities/Identity/AssetPermissions.ts:107

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

Returns: Promise‹AssetWithGroup[]›


getGroup

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

Defined in src/api/entities/Identity/AssetPermissions.ts:300

Retrieve this Identity's Permission Group for a specific Asset

Parameters:

▪ __namedParameters: object

Name
Type

asset

Returns: Promise‹CustomPermissionGroup | KnownPermissionGroup›


getOperationHistory

▸ getOperationHistory(opts: object): Promise‹ResultSet‹EventIdentifier››

Defined in src/api/entities/Identity/AssetPermissions.ts:415

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

-

eventId?

EventId

filters results by event

moduleId?

ModuleId

filters results by module

size?

BigNumber

page size

start?

BigNumber

page offset

Returns: Promise‹ResultSet‹EventIdentifier››


getOperationHistoryV2

▸ getOperationHistoryV2(opts: object): Promise‹ResultSet‹EventIdentifier››

Defined in src/api/entities/Identity/AssetPermissions.ts:500

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

-

eventId?

EventId

filters results by event

moduleId?

ModuleId

filters results by module

size?

BigNumber

page size

start?

BigNumber

page offset

Returns: Promise‹ResultSet‹EventIdentifier››


hasPermissions

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

Defined in src/api/entities/Identity/AssetPermissions.ts:288

Check whether this Identity has specific transaction Permissions over an Asset

deprecated in favor of checkPermissions

Parameters:

▪ args: object

Name
Type

asset

transactions

TxTag[] | null

Returns: Promise‹boolean›


setGroup

▸ setGroup(args: SetPermissionGroupParams, opts?: ProcedureOpts): Promise‹TransactionQueue‹CustomPermissionGroup | KnownPermissionGroup››

Defined in src/api/entities/Identity/AssetPermissions.ts:400

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:

Name
Type

args

opts?

Returns: Promise‹TransactionQueue‹CustomPermissionGroup | KnownPermissionGroup››


waive

▸ waive(args: WaivePermissionsParams, opts?: ProcedureOpts): Promise‹TransactionQueue‹void››

Defined in src/api/entities/Identity/AssetPermissions.ts:390

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:

Name
Type

args

opts?

Returns: Promise‹TransactionQueue‹void››

PreviousAssetHoldersNextAssets

Last updated 2 years ago

Was this helpful?

| string

string | ‹›

string | ‹›

string | ‹›

string |

string |

| string

Asset
Asset
Asset
Asset
Asset
Asset
Asset
SetPermissionGroupParams
ProcedureOpts
WaivePermissionsParams
ProcedureOpts