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".
Include accounts that use this spending key.
const authAddr = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA";
const accounts = await indexerClient
.searchAccounts()
.authAddr(authAddr)
.do();
Filter for this application.
const appId = 60553466;
const accounts = await indexerClient
.searchAccounts()
.applicationID(appId)
.do();
Asset ID to filter with.
const assetID = 163650;
const accounts = await indexerClient
.searchAccounts()
.assetID(assetID)
.do();
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 accounts = await indexerClient
.searchAccounts()
.currencyGreaterThan(minBalance - 1)
.do();
const assetID = 163650;
const minBalance = 300000;
const accounts = await indexerClient
.searchAccounts()
.assetID(assetID)
.currencyGreaterThan(minBalance - 1)
.do();
If you are looking for accounts with the currency amount greater than 0, simply construct the query without currencyGreaterThan
because it doesn't accept -1
, and passing the 0
currency-greater-than
value would exclude accounts with a 0 amount.
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 accounts = await indexerClient
.searchAccounts()
.currencyLessThan(maxBalance + 1)
.do();
const assetID = 163650;
const maxBalance = 500000;
const accounts = await indexerClient
.searchAccounts()
.assetID(assetID)
.currencyLessThan(maxBalance + 1)
.do();
Exclude additional items such as asset holdings, application local data stored for this account, asset parameters created by this account, and application parameters created by this account.
const accounts = await indexerClient
.searchAccounts()
.exclude("all")
.do();
const accounts = await indexerClient
.searchAccounts()
.exclude("assets,created-assets")
.do();
By default, it behaves as exclude=none
Array of all
, assets
, created-assets
, apps-local-state
, created-apps
, none
Includes all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates
const assetId = 163650;
const accounts = await indexerClient
.searchAccounts()
.includeAll(false)
.do();
const assetId = 163650;
const accounts = await indexerClient
.searchAccounts()
.includeAll()
.do();
default true when called without passing a value
Maximum number of results to return.
const maxResults = 25;
const accounts = await indexerClient
.searchAccounts()
.limit(maxResults)
.do();
The next page of results.
const maxResults = 25;
const accountsPage1 = await indexerClient
.searchAccounts()
.limit(maxResults)
.do();
const accountsPage2 = await indexerClient
.searchAccounts()
.limit(maxResults)
.nextToken(accountsPage1["next-token"])
.do();
provided by the previous results
Include results for the specified round.
const targetBlock = 18309917;
const accounts = await indexerClient
.searchAccounts()
.round(targetBlock)
.do();
For performance reasons, this parameter may be disabled on some configurations.
Generated using TypeDoc
Returns information about indexed accounts.
Example
Response data schema details