Polymesh SDK API Reference
v6.0.0
v6.0.0
  • Introduction
  • Globals
  • Classes
    • Account
    • AuthorizationRequest
    • Authorizations
    • Checkpoint
    • CheckpointSchedule
    • Checkpoints
    • Claims
    • Compliance
    • Context
    • CorporateAction
    • CorporateActions
    • Count
    • CurrentAccount
    • CurrentIdentity
    • DefaultPortfolio
    • DefaultTrustedClaimIssuer
    • Distributions
    • DividendDistribution
    • Documents
    • Entity
    • Identity
    • IdentityAuthorizations
    • Instruction
    • Issuance
    • Middleware
    • NumberedPortfolio
    • Offerings
    • Percentage
    • Polymesh
    • PolymeshError
    • PolymeshTransaction
    • PolymeshTransactionBase
    • PolymeshTransactionBatch
    • Portfolio
    • Portfolios
    • Requirements
    • Schedules
    • SecurityToken
    • Settlements
    • Sto
    • TickerReservation
    • TokenHolders
    • TransactionQueue
    • TransferRestrictionBase
    • TransferRestrictions
    • TrustedClaimIssuers
    • Venue
  • Enums
    • AffirmationStatus
    • AuthorizationType
    • CalendarUnit
    • ClaimType
    • ConditionTarget
    • ConditionType
    • CorporateActionKind
    • CountryCode
    • ErrorCode
    • InstructionStatus
    • InstructionType
    • KnownTokenType
    • ProposalStage
    • RoleType
    • ScopeType
    • StoBalanceStatus
    • StoSaleStatus
    • StoTimingStatus
    • TargetTreatment
    • TickerReservationStatus
    • TokenIdentifierType
    • TransactionArgumentType
    • TransactionQueueStatus
    • TransactionStatus
    • TransferError
    • TransferRestrictionType
    • TransferStatus
    • TxGroup
    • VenueType
  • Interfaces
    • AccountData
    • ActiveTransferRestrictions
    • AddBatchTransactionOpts
    • AddClaimsParams
    • AddInstructionParams
    • AddInstructionsParams
    • AddInvestorUniquenessClaimParams
    • AddTransactionOpts
    • AddTransactionOptsBase
    • ArrayTransactionArgument
    • Balance
    • CalendarPeriod
    • CddProviderRole
    • CheckpointWithData
    • ClaimClassicTickerParams
    • ClaimData
    • ClaimScope
    • ClaimTarget
    • ComplexTransactionArgument
    • ConditionCompliance
    • ConnectParamsBase
    • ConstructorParams
    • ConsumeParams
    • ControllerTransferParams
    • CorporateActionDefaults
    • CorporateActionTargets
    • CountTransferRestriction
    • CountTransferRestrictionInput
    • CreateCheckpointScheduleParams
    • CreateSecurityTokenParams
    • CreateVenueParams
    • DeletePortfolioParams
    • DistributionParticipant
    • DistributionPayment
    • DistributionWithDetails
    • DividendDistributionDetails
    • DividendDistributionParams
    • EditClaimsParams
    • EventIdentifier
    • ExtrinsicData
    • Fees
    • HistoricSettlement
    • IdentityBalance
    • IdentityWithClaims
    • InstructionAffirmation
    • InvestInStoParams
    • Investment
    • InviteAccountParams
    • IssueTokensParams
    • KeyringPair
    • LeaveIdentityParams
    • Leg
    • LinkCaDocsParams
    • MiddlewareConfig
    • ModifyCorporateActionsAgentParams
    • ModifyInstructionAffirmationParams
    • ModifyPrimaryIssuanceAgentParams
    • ModifySignerPermissionsParams
    • ModifyTokenTrustedClaimIssuersAddSetParams
    • ModifyTokenTrustedClaimIssuersRemoveParams
    • MoveFundsParams
    • NetworkProperties
    • PaginationOptions
    • PayDividendsParams
    • PercentageTransferRestriction
    • PercentageTransferRestrictionInput
    • Permissions
    • PermissionsLike
    • PlainTransactionArgument
    • PortfolioBalance
    • PortfolioCustodianRole
    • PortfolioMovement
    • ProcedureAuthorizationStatus
    • ProcedureMethod
    • ProposalDetails
    • ProposalTimeFrames
    • ProposalVote
    • RedeemTokenParams
    • RegisterIdentityParams
    • RemoveCheckpointScheduleParams
    • RemoveCorporateActionParams
    • RemoveSecondaryKeysParams
    • RenamePortfolioParams
    • Requirement
    • RequirementCompliance
    • ReserveTickerParams
    • ResultSet
    • RevokeClaimsParams
    • ScheduleDetails
    • ScheduleWithDetails
    • Scope
    • SecondaryKey
    • SecurityTokenDetails
    • SetAssetRequirementsParams
    • SetCountTransferRestrictionsParams
    • SetCustodianParams
    • SetPercentageTransferRestrictionsParams
    • SetTokenDocumentsParams
    • SettlementLeg
    • SimpleEnumTransactionArgument
    • StoDetails
    • StoStatus
    • StoTier
    • StoWithDetails
    • TaxWithholding
    • TickerOwnerRole
    • TickerReservationDetails
    • Tier
    • ToggleFreezeSecondaryKeysParams
    • ToggleFreezeStoParams
    • ToggleFreezeTransfersParams
    • TogglePauseRequirementsParams
    • TokenCaaRole
    • TokenDocument
    • TokenIdentifier
    • TokenOwnerRole
    • TokenPiaRole
    • TransferBreakdown
    • TransferPolyxParams
    • TransferRestriction
    • TransferRestrictionInputBase
    • TransferRestrictionResult
    • TransferTickerOwnershipParams
    • TransferTokenOwnershipParams
    • TrustedClaimIssuer
    • UiKeyring
    • UniqueIdentifiers
    • VenueDetails
    • VenueOwnerRole
Powered by GitBook
On this page
  • Type parameters
  • Hierarchy
  • Index
  • Constructors
  • Properties
  • Methods
  • Constructors
  • constructor
  • Properties
  • Optional error
  • status
  • transactions
  • Methods
  • getMinFees
  • onProcessedByMiddleware
  • onStatusChange
  • onTransactionStatusChange
  • run

Was this helpful?

  1. Classes

TransactionQueue

PreviousTokenHoldersNextTransferRestrictionBase

Last updated 3 years ago

Was this helpful?

Class to manage procedural transaction queues

Type parameters

▪ ProcedureReturnType

▪ ReturnType

▪ TransactionArgs: unknown[][]

Hierarchy

  • TransactionQueue

Index

Constructors

Properties

Methods

Constructors

constructor

Create a transaction queue

Parameters:

▪ args: object

Name

Type

Description

procedureResult

MaybePostTransactionValue‹ProcedureReturnType›

value that will be returned by the queue after it is run. It can be a [[PostTransactionValue]]

transactions

PolymeshTransactionArray‹TransactionArgs›

list of transactions to be run in this queue

transformer?

undefined | function

function that transforms the procedure's return value before returning it after the queue is run

Properties

Optional error

optional error information

status

status of the queue

transactions

• transactions: PolymeshTransactionArray‹TransactionArgs›

transactions that will be run in the queue

Methods

getMinFees

Retrieves a lower bound of the fees required to execute this transaction queue. Transaction fees can be higher at execution time for two reasons:

  • One or more transactions (or arguments) depend on the result of another transaction in the queue.

    This means fees can't be calculated for said transaction until previous transactions in the queue have run

  • Protocol fees may vary between when this value is fetched and when the transaction is actually executed because of a

    governance vote

note transaction fees that are paid by a third party aren't included in this total

onProcessedByMiddleware

▸ onProcessedByMiddleware(listener: function): function

Subscribe to the results of this queue being processed by the harvester (and as such, available to the middleware)

note this event will be fired even if the queue fails

throws if the middleware wasn't enabled when instantiating the SDK client

Parameters:

▪ listener: function

callback function that will be called whenever the middleware is updated with the latest data. If there is an error (timeout or middleware offline) it will be passed to this callback

Parameters:

Name

Type

err?

Returns: function

unsubscribe function

▸ (): void

onStatusChange

▸ onStatusChange(listener: function): function

Subscribe to status changes on the Transaction Queue

Parameters:

▪ listener: function

callback function that will be called whenever the Transaction Queue's status changes

Parameters:

Name

Type

transactionQueue

this

err?

Returns: function

unsubscribe function

▸ (): void

onTransactionStatusChange

▸ onTransactionStatusChange‹TxArgs, Values›(listener: function): function

Subscribe to status changes on individual transactions

Type parameters:

▪ TxArgs: unknown[]

▪ Values: unknown[]

Parameters:

▪ listener: function

callback function that will be called whenever the individual transaction's status changes

Parameters:

Name

Type

transaction

transactionQueue

this

Returns: function

unsubscribe function

▸ (): void

run

▸ run(): Promise‹ReturnType›

Run the transactions in the queue in sequential order. If a transaction fails or the user refuses to sign it, one of two things can happen:

1) If transaction.isCritical === true, the entire queue fails and the corresponding error is stored in this.error as well as thrown 2) Otherwise, the queue continues executing and the error is stored in transaction.error

Returns: Promise‹ReturnType›

+ new TransactionQueue(args: object, context: ):

Defined in

▪ context:

Returns:

• error? :

Defined in

• status: = TransactionQueueStatus.Idle

Defined in

Defined in

▸ getMinFees(): Promise‹›

Defined in

Returns: Promise‹›

Defined in

▸ (err?: ): void

Defined in

▸ (transactionQueue: this, err?: ): void

Defined in

▸ (transaction: ‹TxArgs, Values›, transactionQueue: this): void

‹TxArgs, Values›

Defined in

Context
TransactionQueue
src/base/TransactionQueue.ts:84
Context
TransactionQueue
PolymeshError
src/base/TransactionQueue.ts:52
TransactionQueueStatus
src/base/TransactionQueue.ts:47
src/base/TransactionQueue.ts:42
Fees
src/base/TransactionQueue.ts:198
Fees
src/base/TransactionQueue.ts:259
PolymeshError
src/base/TransactionQueue.ts:222
PolymeshError
src/base/TransactionQueue.ts:239
PolymeshTransactionBase
src/base/TransactionQueue.ts:129
constructor
error
status
transactions
getMinFees
onProcessedByMiddleware
onStatusChange
onTransactionStatusChange
run
PolymeshError
PolymeshError
PolymeshTransactionBase