TransactionLogger
Defined in: src/testing/transaction-logger.ts:11
Allows you to keep track of Algorand transaction IDs by wrapping an AlgodClient in a proxy.
Useful for automated tests.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new TransactionLogger():
TransactionLogger
Returns
Section titled “Returns”TransactionLogger
Accessors
Section titled “Accessors”sentTransactionIds
Section titled “sentTransactionIds”Get Signature
Section titled “Get Signature”get sentTransactionIds(): readonly
string[]
Defined in: src/testing/transaction-logger.ts:26
The list of transaction IDs that has been logged thus far.
Returns
Section titled “Returns”readonly string[]
Methods
Section titled “Methods”capture()
Section titled “capture()”capture(
algod):AlgodClient
Defined in: src/testing/transaction-logger.ts:53
Return a proxy that wraps the given AlgodClient with this transaction logger.
Parameters
Section titled “Parameters”The AlgodClient to wrap
Returns
Section titled “Returns”The wrapped AlgodClient, any transactions sent using this algod instance will be logged by this transaction logger
clear()
Section titled “clear()”clear():
void
Defined in: src/testing/transaction-logger.ts:33
Clear all logged IDs.
Returns
Section titled “Returns”void
logRawTransaction()
Section titled “logRawTransaction()”logRawTransaction(
signedTransactions):void
Defined in: src/testing/transaction-logger.ts:40
The method that captures raw transactions and stores the transaction IDs.
Parameters
Section titled “Parameters”signedTransactions
Section titled “signedTransactions”Uint8Array<ArrayBufferLike> | Uint8Array<ArrayBufferLike>[]
Returns
Section titled “Returns”void
waitForIndexer()
Section titled “waitForIndexer()”waitForIndexer(
indexer):Promise<void>
Defined in: src/testing/transaction-logger.ts:58
Wait until all logged transactions IDs appear in the given Indexer.
Parameters
Section titled “Parameters”indexer
Section titled “indexer”Returns
Section titled “Returns”Promise<void>