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
  • addInstruction
  • affirmInstruction
  • canSettle
  • canTransfer
  • createVenue
  • getInstruction
  • getVenue

Was this helpful?

  1. Classes

Settlements

PreviousSchedulesNextSubsidy

Last updated 2 years ago

Was this helpful?

Handles all Asset Settlements related functionality Handles all Settlement related functionality

Hierarchy

  • Namespace‹›

    ↳ Settlements

Index

Properties

Methods

Properties

Protected context

• context: Context

Inherited from void


Protected parent

Inherited from void

Methods

addInstruction

Create an Instruction to exchange Assets

Parameters:

Name
Type

args

opts?


affirmInstruction

Affirm an Instruction (authorize)

Parameters:

Name
Type

args

opts?


canSettle

Check whether it is possible to create a settlement Instruction to transfer a certain amount of this Asset's tokens between two Portfolios.

note this takes locked tokens into account. For example, if portfolio A has 1000 tokens and this function is called to check if 700 of them can be transferred to portfolio B (assuming everything else checks out) the result will be success. If an instruction is created and authorized to transfer those 700 tokens, they would become locked. From that point, further calls to this function would yield failed results because of the funds being locked, even though they haven't been transferred yet

Parameters:

â–ª args: object

Name
Type
Description

amount

BigNumber

amount of tokens to transfer

from?

sender Portfolio (optional, defaults to the signing Identity's Default Portfolio)

to

receiver Portfolio


canTransfer

Check whether it is possible to create a settlement instruction to transfer a certain amount of this asset between two Portfolios. Returns a breakdown of the transaction containing general errors (such as insufficient balance or invalid receiver), any broken transfer restrictions, and any compliance failures

note this takes locked tokens into account. For example, if portfolio A has 1000 tokens and this function is called to check if 700 of them can be transferred to portfolio B (assuming everything else checks out) the result will be success. If an instruction is created and authorized to transfer those 700 tokens, they would become locked. From that point, further calls to this function would yield failed results because of the funds being locked, even though they haven't been transferred yet

Parameters:

â–ª args: object

Name
Type
Description

amount

BigNumber

amount of tokens to transfer

from?

sender Portfolio (optional, defaults to the signing Identity's Default Portfolio)

to

receiver Portfolio


createVenue

Create a Venue under the ownership of the signing Identity

Parameters:

Name
Type

args

opts?


getInstruction

Retrieve an Instruction by its ID

Parameters:

â–ª args: object

Name
Type

id

BigNumber


getVenue

Retrieve a Venue by its ID

Parameters:

â–ª args: object

Name
Type

id

BigNumber

Defined in

Defined in

• parent:

Defined in

▸ addInstruction(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‹‹[], ››

▸ affirmInstruction(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‹‹››

▸ canSettle(args: object): Promise‹›

Defined in

deprecated in favor of

Returns: Promise‹›

▸ canTransfer(args: object): Promise‹›

Defined in

Returns: Promise‹›

▸ createVenue(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‹‹››

▸ getInstruction(args: object): Promise‹›

Defined in

Returns: Promise‹›

▸ getVenue(args: object): Promise‹›

Defined in

Returns: Promise‹›

src/api/entities/Namespace.ts:11
src/Settlements.ts:25
Asset
src/api/entities/Namespace.ts:9
AddInstructionWithVenueIdParams
ProcedureOpts
TransactionQueue
Instruction
Instruction
src/Settlements.ts:118
ProcedureMethod
addInstruction.checkAuthorization
TransactionQueue
Instruction
Instruction
AffirmInstructionParams
ProcedureOpts
TransactionQueue
Instruction
src/Settlements.ts:128
ProcedureMethod
affirmInstruction.checkAuthorization
TransactionQueue
Instruction
TransferStatus
src/api/entities/Asset/Settlements.ts:38
TransferStatus
TransferBreakdown
src/api/entities/Asset/Settlements.ts:107
TransferBreakdown
CreateVenueParams
ProcedureOpts
TransactionQueue
Venue
src/Settlements.ts:108
ProcedureMethod
createVenue.checkAuthorization
TransactionQueue
Venue
Instruction
src/Settlements.ts:86
Instruction
Venue
src/Settlements.ts:65
Venue
Asset
context
parent
addInstruction
affirmInstruction
canSettle
canTransfer
createVenue
getInstruction
getVenue
canTransfer
AddInstructionWithVenueIdParams
ProcedureOpts
AffirmInstructionParams
ProcedureOpts
CreateVenueParams
ProcedureOpts
PortfolioLike
PortfolioLike
PortfolioLike
PortfolioLike