HTTPClient object.
Optional
intDecoding: IntDecodingThe method to use for decoding integers from this request's response. See the setIntDecoding method for more details.
Execute the request, but do not process the response data in any way.
A promise which resolves to the raw response data, exactly as returned by the server.
Additional headers to send in the request. Optional.
Prepare a JSON response before returning it.
Use this method to change and restructure response
data as needed after receiving it from the do()
method.
Response body received
Configure how integers in this request's JSON response will be decoded.
The options are:
The method to use when parsing the response for this request. Must be one of "default", "safe", "mixed", or "bigint".
Only include transactions with this address in one of the transaction fields.
const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
const txns = await indexerClient
.searchForTransactions()
.address(address)
.do();
Alternatively, use indexerClient.lookupAccountTransactions(address).do()
Combined with address, defines what address to filter on, as string.
const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
const role = "freeze-target";
const txns = await indexerClient
.searchForTransactions()
.address(address)
.addressRole(role)
.do();
one of sender
, receiver
, freeze-target
Include results after the given time.
const afterTime = "2022-10-21T00:00:11.55Z";
const txns = await indexerClient
.searchForTransactions()
.afterTime(afterTime)
.do();
rfc3339 string
Filter for this application.
const appId = 60553466;
const txns = await indexerClient
.searchForTransactions()
.applicationID(appId)
.do();
Asset ID to filter with.
const assetID = 163650;
const txns = await indexerClient
.searchForTransactions()
.assetID(assetID)
.do();
Alternatively, use indexerClient.lookupAssetTransactions(assetId).do()
Include results before the given time.
const beforeTime = "2022-02-02T20:20:22.02Z";
const txns = await indexerClient
.searchForTransactions()
.beforeTime(beforeTime)
.do();
rfc3339 string
Filtered results should have an amount greater than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units.
const minBalance = 300000;
const txns = await indexerClient
.searchForTransactions()
.currencyGreaterThan(minBalance - 1)
.do();
const assetID = 163650;
const minBalance = 300000;
const txns = await indexerClient
.searchForTransactions()
.assetID(assetID)
.currencyGreaterThan(minBalance - 1)
.do();
Filtered results should have an amount less than this value, as int, representing microAlgos, unless an asset-id is provided, in which case units are in the asset's units.
const maxBalance = 500000;
const txns = await indexerClient
.searchForTransactions()
.currencyLessThan(maxBalance + 1)
.do();
const assetID = 163650;
const maxBalance = 500000;
const txns = await indexerClient
.searchForTransactions()
.assetID(assetID)
.currencyLessThan(maxBalance + 1)
.do();
Whether or not to consider the close-to
field as a receiver when filtering transactions, as bool. Set to true
to ignore close-to
.
const txns = await indexerClient
.searchForTransactions()
.excludeCloseTo(true)
.do();
Maximum number of results to return.
const maxResults = 25;
const txns = await indexerClient
.searchForTransactions()
.limit(maxResults)
.do();
Include results at or before the specified max-round.
const maxRound = 18309917;
const txns = await indexerClient
.searchForTransactions()
.maxRound(maxRound)
.do();
Include results at or after the specified min-round.
const minRound = 18309917;
const txns = await indexerClient
.searchForTransactions()
.minRound(minRound)
.do();
The next page of results.
const maxResults = 25;
const txnsPage1 = await indexerClient
.searchForTransactions()
.limit(maxResults)
.do();
const txnsPage2 = await indexerClient
.searchForTransactions()
.limit(maxResults)
.nextToken(txnsPage1["next-token"])
.do();
provided by the previous results
Specifies a prefix which must be contained in the note field.
const notePrefixBase64Encoded = "Y3JlYXRl";
const txns = await indexerClient
.searchForTransactions()
.notePrefix(notePrefixBase64Encoded)
.do();
base64 string or uint8array
Whether or not to include rekeying transactions.
const txns = await indexerClient
.searchForTransactions()
.rekeyTo(false)
.do();
Include results for the specified round.
const targetBlock = 18309917;
const txns = await indexerClient
.searchForTransactions()
.round(targetBlock)
.do();
Alternatively, use indexerClient.lookupBlock(targetBlock).do()
Type of signature to filter with.
const txns = await indexerClient
.searchForTransactions()
.sigType("sig")
.do();
one of sig
, msig
, lsig
Type of transaction to filter with.
const txns = await indexerClient
.searchForTransactions()
.txType("keyreg")
.do();
one of pay
, keyreg
, acfg
, axfer
, afrz
, appl
, stpf
Lookup the specific transaction by ID.
const txId = "MEUOC4RQJB23CQZRFRKYEI6WBO73VTTPST5A7B3S5OKBUY6LFUDA";
const txns = await indexerClient
.searchForTransactions()
.txid(txId)
.do();
Alternatively, use indexerClient.lookupTransactionByID(txnId).do()
Generated using TypeDoc
Returns information about indexed transactions.
Example
Response data schema details