import JSONRequest from '../jsonrequest.js'; import { HTTPClient, HTTPClientResponse } from '../../client.js'; import { Address } from '../../../encoding/address.js'; import { AccountResponse } from './models/types.js'; export default class LookupAccountByID extends JSONRequest { private account; /** * Returns information about the given account. * * #### Example * ```typescript * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA"; * const accountInfo = await indexerClient.lookupAccountByID(address).do(); * ``` * * [Response data schema details](https://developer.algorand.org/docs/rest-apis/indexer/#get-v2accountsaccount-id) * @param account - The address of the account to look up. * @category GET */ constructor(c: HTTPClient, account: string | Address); /** * @returns `/v2/accounts/${account}` */ path(): string; /** * Specify round to filter with. * * #### Example * ```typescript * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA"; * const targetBlock = 18309917; * const accountInfo = await indexerClient * .lookupAccountByID(address) * .round(targetBlock) * .do(); * ``` * @param round */ round(round: number | bigint): this; /** * Include all items including closed accounts, deleted applications, destroyed assets, opted-out asset holdings, and closed-out application localstates. * * #### Example 1 * ```typescript * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA"; * const accountInfo = await indexerClient * .lookupAccountByID(address) * .includeAll(false) * .do(); * ``` * * #### Example 2 * ```typescript * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA"; * const accountInfo = await indexerClient * .lookupAccountByID(address) * .includeAll() * .do(); * ``` * @param value */ includeAll(value?: boolean): this; /** * 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. * * #### Example 1 * ```typescript * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA"; * const accountInfo = await indexerClient * .lookupAccountByID(address) * .exclude("all") * .do(); * ``` * * #### Example 2 * ```typescript * const address = "XBYLS2E6YI6XXL5BWCAMOA4GTWHXWENZMX5UHXMRNWWUQ7BXCY5WC5TEPA"; * const accountInfo = await indexerClient * .lookupAccountByID(address) * .exclude("assets,created-assets") * .do(); * ``` * @remarks By default, it behaves as exclude=none * @param exclude - Array of `all`, `assets`, `created-assets`, `apps-local-state`, `created-apps`, `none` * @category query */ exclude(exclude: string): this; prepare(response: HTTPClientResponse): AccountResponse; }