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
  • assets
  • Protected context
  • Protected parent
  • portfolios
  • transactionGroups
  • transactions
  • Methods
  • createGroup
  • getAgents
  • getGroup
  • getGroups
  • inviteAgent
  • removeAgent

Was this helpful?

  1. Classes

Permissions

PreviousPermissionGroupNextPolymesh

Last updated 2 years ago

Was this helpful?

Permissions a Secondary Key has over the Identity. A null value means the key has all permissions of that type (i.e. if assets is null, the key has permissions over all of the Identity's Assets) Handles all Asset Permissions related functionality

Hierarchy

  • Namespace‹›

    ↳ Permissions

Index

Properties

Methods

Properties

assets

Assets over which this key has permissions


Protected context

• context: Context

Inherited from void


Protected parent

Inherited from void


portfolios


transactionGroups

list of Transaction Groups this key can execute. Having permissions over a TxGroup means having permissions over every TxTag in said group. Partial group permissions are not covered by this value. For a full picture of transaction permissions, see the transactions property

NOTE: If transactions is null, ignore this value


transactions

Transactions this key can execute

Methods

createGroup

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

Parameters:

Name
Type

args

opts?


getAgents

Retrieve a list of agents (Identities which have permissions over the Asset) and their respective Permission Groups


getGroup

Retrieve a single Permission Group by its ID (or type). Passing an ID will fetch a Custom Permission Group, while passing a type will fetch a Known Permission Group

throws if there is no Permission Group with the passed ID

Parameters:

â–ª args: object

Name
Type

id

BigNumber

Parameters:

â–ª args: object

Name
Type

type


getGroups

Retrieve all Permission Groups of this Asset


inviteAgent

Invite an Identity to be an agent with permissions over this Asset

Parameters:

Name
Type

args

opts?


removeAgent

Revoke an agent's permissions over this Asset

Parameters:

Name
Type

args

opts?

• assets: ‹› | null

Defined in

Defined in

• parent:

Defined in

• portfolios: ‹ | › | null

Defined in

• transactionGroups: []

Defined in

• transactions: | null

Defined in

▸ createGroup(args: , opts?: ): Promise‹‹››

Defined in

note this method is of type , which means you can call on it to see whether the signing Account and Identity have the required roles and permissions to run it

Returns: Promise‹‹››

▸ getAgents(): Promise‹[]›

Defined in

Returns: Promise‹[]›

▸ getGroup(args: object): Promise‹›

Defined in

Returns: Promise‹›

▸ getGroup(args: object): Promise‹›

Defined in

Returns: Promise‹›

▸ getGroups(): Promise‹›

Defined in

Returns: Promise‹›

▸ inviteAgent(args: , opts?: ): Promise‹‹››

Defined in

note this will create an which has to be accepted by the target Identity. An or can fetch its pending Authorization Requests by calling . Also, an Account or Identity can directly fetch the details of an Authorization Request by calling

note this method is of type , which means you can call on it to see whether the signing Account and Identity have the required roles and permissions to run it

Returns: Promise‹‹››

▸ removeAgent(args: , opts?: ): Promise‹‹void››

Defined in

note this method is of type , which means you can call on it to see whether the signing Account and Identity have the required roles and permissions to run it

Returns: Promise‹‹void››

SectionPermissions
Asset
src/types/index.ts:917
src/api/entities/Namespace.ts:11
Asset
src/api/entities/Namespace.ts:9
SectionPermissions
DefaultPortfolio
NumberedPortfolio
src/types/index.ts:931
TxGroup
src/types/index.ts:929
TransactionPermissions
src/types/index.ts:921
CreateGroupParams
ProcedureOpts
TransactionQueue
CustomPermissionGroup
src/api/entities/Asset/Permissions.ts:70
ProcedureMethod
createGroup.checkAuthorization
TransactionQueue
CustomPermissionGroup
AgentWithGroup
src/api/entities/Asset/Permissions.ts:171
AgentWithGroup
CustomPermissionGroup
src/api/entities/Asset/Permissions.ts:104
CustomPermissionGroup
KnownPermissionGroup
src/api/entities/Asset/Permissions.ts:105
KnownPermissionGroup
PermissionGroups
src/api/entities/Asset/Permissions.ts:137
PermissionGroups
InviteExternalAgentParams
ProcedureOpts
TransactionQueue
AuthorizationRequest
src/api/entities/Asset/Permissions.ts:84
ProcedureMethod
inviteAgent.checkAuthorization
TransactionQueue
AuthorizationRequest
RemoveExternalAgentParams
ProcedureOpts
TransactionQueue
src/api/entities/Asset/Permissions.ts:94
ProcedureMethod
removeAgent.checkAuthorization
TransactionQueue
Asset
assets
context
parent
portfolios
transactionGroups
transactions
createGroup
getAgents
getGroup
getGroups
inviteAgent
removeAgent
CreateGroupParams
ProcedureOpts
PermissionGroupType
InviteExternalAgentParams
ProcedureOpts
RemoveExternalAgentParams
ProcedureOpts
Authorization Request
Account
Identity
authorizations.getReceived
authorizations.getOne