TransactionQueue
Last updated
Was this helpful?
Last updated
Was this helpful?
Class to manage procedural transaction queues
â–ª Args: any
â–ª ReturnType: any
‹void›
↳ TransactionQueue
Create a transaction queue
Parameters:
Name
Type
Default
Description
transactions
-
list of transactions to be run in this queue
fees
-
-
returnValue
-
value that will be returned by the queue after it is run. It can be a Post Transaction Resolver
args
Args
-
arguments with which the Procedure that generated this queue was instanced
procedureType
ProcedureType.UnnamedProcedure
-
• args: Args
arguments provided to the transaction queue
• entityType: string = "transactionQueue"
type of entity
Optional
erroroptional error information
total cost of running the transactions in the queue. This does not include gas
type of procedure being run
• status: TransactionQueueStatus = TransactionQueueStatus.Idle
status of the transaction queue
array of poly transactions
• uid: string
generated transaction queue unique identifier
â–¸ _refresh(): void
Hydrate the entity
Returns: void
â–¸ onStatusChange(listener
: function): (Anonymous 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
â–¸ (transactionQueue
: this): void
Parameters:
Name
Type
transactionQueue
this
Returns: (Anonymous function)
unsubscribe function
â–¸ onTransactionStatusChange(listener
: function): (Anonymous function)
Subscribe to status changes on individual transactions
Parameters:
â–ª listener: function
callback function that will be called whenever the individual transaction's status changes
Parameters:
Name
Type
transaction
transactionQueue
this
Returns: (Anonymous function)
unsubscribe function
▸ run(): Promise‹ReturnType›
Run the transactions in the queue
Returns: Promise‹ReturnType›
â–¸ toPojo(): object
Convert entity to a POJO (Plain Old Javascript Object)
Returns: object
args: Args
status: TransactionQueueStatus
transactions: object[] = transactions.map(transaction => transaction.toPojo())
uid: string
Static
generateIdâ–¸ generateId(): string
Generate UUID for this Transaction Queue
Returns: string
+ new TransactionQueue(transactions
: [], fees
: , returnValue
: ‹ReturnType›, args
: Args, procedureType
: ):
Defined in
[]
‹ReturnType›
Returns:
Defined in
Defined in
• error? :
Defined in
• fees:
Defined in
• procedureType:
Defined in
Defined in
• transactions: []
Defined in
Overrides .
Defined in
Overrides .
Defined in
Defined in
Defined in
â–¸ (transaction
: , transactionQueue
: this): void
Defined in
Overrides .
Defined in
fees:
procedureType:
Defined in