getAlgoIndexerClient
getAlgoIndexerClient(
config?):IndexerClient
Defined in: algokit-utils-ts/src/network-client.ts:121
Parameters
Section titled “Parameters”config?
Section titled “config?”The config if you want to override the default (getting config from process.env)
Returns
Section titled “Returns”IndexerClient
Examples
Section titled “Examples”Default (load from environment variables)
// Uses process.env.INDEXER_SERVER, process.env.INDEXER_PORT and process.env.INDEXER_TOKEN const indexer = getAlgoIndexerClient() await indexer.makeHealthCheck().do()AlgoNode (testnet)
const indexer = getAlgoIndexerClient(getAlgoNodeConfig('testnet', 'indexer')) await indexer.makeHealthCheck().do()AlgoNode (mainnet)
const indexer = getAlgoIndexerClient(getAlgoNodeConfig('mainnet', 'indexer')) await indexer.makeHealthCheck().do()Custom (e.g. default LocalNet, although we recommend loading this into a .env and using the Default option instead)
const indexer = getAlgoIndexerClient({server: 'http://localhost', port: '8980', token: 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'}) await indexer.makeHealthCheck().do()