Creates an instance of AccountModule.
Configuration object for the account module
ProtectedbaseBase URL for the API endpoints
Protected OptionalapiOptional API key for authenticated requests
ProtectedloggerLogger instance for account operations
ProtectedfetchProtectedMakes an API request with the given parameters. Handles parameter sanitization, API key inclusion, and error handling.
API endpoint to call
Query parameters
Promise resolving to the API response
Get CFX balance for a single address. Retrieves the current CFX balance for a specific address.
Parameters for the balance query
Parameters for fetching account balance. Used to query the CFX balance of a specific address at a given block.
Account address to check balance for (in hex format)
Optionaltag?: BlockTagBlock tag to query balance at (e.g. 'latest_state', 'latest_confirmed')
The account balance
Get CFX balance for multiple addresses in a single call. Retrieves current CFX balances for multiple addresses efficiently.
Parameters for the multi-balance query
Parameters for fetching multiple account balances. Allows querying CFX balances for multiple addresses in a single call.
Array of account addresses to check balances for (in hex format)
Optionaltag?: BlockTagBlock tag to query balances at (e.g. 'latest_state', 'latest_confirmed')
The account balances
Get a list of normal transactions by address. Retrieves all normal (non-internal) transactions for a specific address.
Parameters for the transaction list query
Parameters for getting transaction list. Used to query normal (non-internal) transactions for an address.
Optionalpage?: numberPage number (1-based)
Optionaloffset?: numberPage offset.
Optionalskip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optionallimit?: numberNumber of records per page. Maximum 100.
Optionalsort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
OptionalminTimestamp?: numberMinimum timestamp in seconds
OptionalmaxTimestamp?: numberMaximum timestamp in seconds
OptionalstartBlock?: numberStarting block number
OptionalendBlock?: numberEnding block number
Account address to get transactions for (in hex format)
Optionalstartblock?: numberStart block number
Optionalendblock?: numberEnd block number
Optionaltxhash?: stringTransaction hash to filter by
List of transactions
Get a list of internal transactions. Retrieves all internal transactions (contract-to-contract transfers) for a specific address.
Parameters for the internal transaction list query
Parameters for getting internal transaction list
TxlistinternalParams
Optionalpage?: numberPage number (1-based)
Optionaloffset?: numberPage offset.
Optionalskip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optionallimit?: numberNumber of records per page. Maximum 100.
Optionalsort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
OptionalminTimestamp?: numberMinimum timestamp in seconds
OptionalmaxTimestamp?: numberMaximum timestamp in seconds
OptionalstartBlock?: numberStarting block number
OptionalendBlock?: numberEnding block number
Account address to get internal transactions for
Optionalstartblock?: numberStart block number
Optionalendblock?: numberEnd block number
Optionaltxhash?: stringTransaction hash
List of internal transactions
Get a list of token transfers. Retrieves all token transfer events for a specific address or contract.
Parameters for the token transfer list query
Parameters for getting token transaction list
TokentxParams
Optionalpage?: numberPage number (1-based)
Optionaloffset?: numberPage offset.
Optionalskip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optionallimit?: numberNumber of records per page. Maximum 100.
Optionalsort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
OptionalminTimestamp?: numberMinimum timestamp in seconds
OptionalmaxTimestamp?: numberMaximum timestamp in seconds
OptionalstartBlock?: numberStarting block number
OptionalendBlock?: numberEnding block number
Account address to get token transactions for
Optionalcontractaddress?: stringContract address to filter transactions by
Optionalstartblock?: numberStart block number
Optionalendblock?: numberEnd block number
List of token transfers
Get a list of NFT token transfers. Retrieves all NFT transfer events for a specific address or contract.
Parameters for the NFT transfer list query
Parameters for getting token transaction list
TokentxParams
Optionalpage?: numberPage number (1-based)
Optionaloffset?: numberPage offset.
Optionalskip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optionallimit?: numberNumber of records per page. Maximum 100.
Optionalsort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
OptionalminTimestamp?: numberMinimum timestamp in seconds
OptionalmaxTimestamp?: numberMaximum timestamp in seconds
OptionalstartBlock?: numberStarting block number
OptionalendBlock?: numberEnding block number
Account address to get token transactions for
Optionalcontractaddress?: stringContract address to filter transactions by
Optionalstartblock?: numberStart block number
Optionalendblock?: numberEnd block number
List of NFT transfers
Get a list of blocks mined by an address. Retrieves all blocks that were mined by a specific address.
Parameters for the mined blocks query
Parameters for getting mined blocks
GetminedblocksParams
Optionalpage?: numberPage number (1-based)
Optionaloffset?: numberPage offset.
Optionalskip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optionallimit?: numberNumber of records per page. Maximum 100.
Optionalsort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Miner address to get blocks for
List of mined blocks
Get balance history for an address. Retrieves the historical balance of an address at a specific block number.
Parameters for the balance history query
Parameters for getting balance history
BalancehistoryParams
Historical balance information
Module for handling account-related operations on Conflux eSpace. Provides methods for querying account balances, transactions, token transfers, and other account data.
AccountModule