Returns transactions relating to the given asset.
const assetId = 163650;
const assetTxns = await indexerClient.lookupAssetTransactions(assetId).do();
The asset ID to look up.
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 assetId = 163650;
const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
const assetTxns = await indexerClient
.lookupAssetTransactions(assetId)
.address(address)
.do();
Combined with address, defines what address to filter on, as string.
const assetId = 163650;
const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
const role = "sender";
const assetTxns = await indexerClient
.lookupAssetTransactions(assetId)
.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 assetId = 163650;
const assetTxns = await indexerClient
.lookupAssetTransactions(assetId)
.afterTime(afterTime)
.do();
rfc3339 string
Include results before the given time.
const beforeTime = "2022-02-02T20:20:22.02Z";
const assetId = 163650;
const assetTxns = await indexerClient
.lookupAssetTransactions(assetId)
.beforeTime(beforeTime)
.do();
rfc3339 string
Filtered results should have an amount greater than this value, as int, representing asset units.
const minBalance = 300000;
const assetId = 163650;
const assetTxns = await indexerClient
.lookupAssetTransactions(assetId)
.currencyGreaterThan(minBalance - 1)
.do();
Filtered results should have an amount less than this value, as int, representing asset units.
const maxBalance = 500000;
const assetId = 163650;
const assetTxns = await indexerClient
.lookupAssetTransactions(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 assetId = 163650;
const assetTxns = await indexerClient
.lookupAssetTransactions(assetId)
.excludeCloseTo(true)
.do();
Maximum number of results to return.
const maxResults = 25;
const assetId = 163650;
const assetTxns = await indexerClient
.lookupAssetTransactions(assetId)
.limit(maxResults)
.do();
Include results at or before the specified max-round.
const maxRound = 18309917;
const assetId = 163650;
const assetTxns = await indexerClient
.lookupAssetTransactions(assetId)
.maxRound(maxRound)
.do();
Include results at or after the specified min-round.
const minRound = 18309917;
const assetId = 163650;
const assetTxns = await indexerClient
.lookupAssetTransactions(assetId)
.minRound(minRound)
.do();
The next page of results.
const maxResults = 25;
const assetId = 163650;
const assetTxnsPage1 = await indexerClient
.lookupAssetTransactions(assetId)
.limit(maxResults)
.do();
const assetTxnsPage2 = await indexerClient
.lookupAssetTransactions(assetId)
.limit(maxResults)
.nextToken(assetTxnsPage1["next-token"])
.do();
provided by the previous results.
Specifies a prefix which must be contained in the note field.
const notePrefixBase64Encoded = "Y3JlYXRl";
const assetId = 163650;
const assetTxns = await indexerClient
.lookupAssetTransactions(assetId)
.notePrefix(notePrefixBase64Encoded)
.do();
base64 string or uint8array
Whether or not to include rekeying transactions.
const assetId = 163650;
const assetTxns = await indexerClient
.lookupAssetTransactions(assetId)
.rekeyTo(false)
.do();
Include results for the specified round.
const targetBlock = 18309917;
const assetId = 163650;
const assetTxns = await indexerClient
.lookupAssetTransactions(assetId)
.round(targetBlock)
.do();
Type of signature to filter with.
const assetId = 163650;
const assetTxns = await indexerClient
.lookupAssetTransactions(assetId)
.sigType("lsig")
.do();
one of sig
, msig
, lsig
Type of transaction to filter with.
const assetId = 163650;
const assetTxns = await indexerClient
.lookupAssetTransactions(assetId)
.txType("axfer")
.do();
one of pay
, keyreg
, acfg
, axfer
, afrz
, appl
Lookup the specific transaction by ID.
const txId = "MEUOC4RQJB23CQZRFRKYEI6WBO73VTTPST5A7B3S5OKBUY6LFUDA";
const assetId = 163650;
const assetTxns = await indexerClient
.lookupAssetTransactions(assetId)
.txid(txId)
.do();
Generated using TypeDoc
Base abstract class for JSON requests.
Data: The type returned from the
do()
methodBody: The structure of the response's body