TransactionLogger
Defined in: algokit-utils-ts/src/testing/transaction-logger.ts:12
Allows you to keep track of Algorand transaction IDs by wrapping an Algodv2 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: algokit-utils-ts/src/testing/transaction-logger.ts:27
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: algokit-utils-ts/src/testing/transaction-logger.ts:54
Return a proxy that wraps the given Algodv2 with this transaction logger.
Parameters
Section titled “Parameters”AlgodClient
The Algodv2 to wrap
Returns
Section titled “Returns”AlgodClient
The wrapped Algodv2, any transactions sent using this algod instance will be logged by this transaction logger
clear()
Section titled “clear()”clear():
void
Defined in: algokit-utils-ts/src/testing/transaction-logger.ts:34
Clear all logged IDs.
Returns
Section titled “Returns”void
logRawTransaction()
Section titled “logRawTransaction()”logRawTransaction(
signedTransactions):void
Defined in: algokit-utils-ts/src/testing/transaction-logger.ts:41
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: algokit-utils-ts/src/testing/transaction-logger.ts:59
Wait until all logged transactions IDs appear in the given Indexer.
Parameters
Section titled “Parameters”indexer
Section titled “indexer”IndexerClient
Returns
Section titled “Returns”Promise<void>