Creates a new AccountWrapper instance
API configuration options
API configuration options. Contains settings for connecting to the Conflux eSpace Scanner API.
Target network environment
Optional
apiKey?: stringAPI key for authentication
Optional
host?: stringCustom API host URL
Protected
formatFormat a timestamp value to a human-readable date string.
The timestamp to format
Formatted date string
Protected
formatCFXFormat a CFX value with appropriate decimal places and units.
The CFX value to format
Formatted CFX value
Protected
formatFormat a gas value with appropriate units.
The gas value to format
Formatted gas value
Protected
formatFormat a numeric value with appropriate separators.
The number to format
Formatted number string
Protected
formatFormat a value with specified decimal places.
The value to format
Number of decimal places
Formatted value with specified decimals
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)
Optional
tag?: BlockTagBlock tag to query balance at (e.g. 'latest_state', 'latest_confirmed')
If true, returns the raw balance in Drip without formatting
The account balance, formatted with CFX units unless returnRaw is true
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)
Optional
tag?: BlockTagBlock tag to query balances at (e.g. 'latest_state', 'latest_confirmed')
If true, returns the raw balances in Drip without formatting
Array of [address, balance] pairs
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.
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Optional
startBlock?: numberStarting block number
Optional
endBlock?: numberEnding block number
Account address to get transactions for (in hex format)
Optional
startblock?: numberStart block number
Optional
endblock?: numberEnd block number
Optional
txhash?: stringTransaction hash to filter by
If true, returns the raw transaction data without formatting
List of transactions with formatted values
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
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Optional
startBlock?: numberStarting block number
Optional
endBlock?: numberEnding block number
Account address to get internal transactions for
Optional
startblock?: numberStart block number
Optional
endblock?: numberEnd block number
Optional
txhash?: stringTransaction hash
If true, returns the raw transaction data without formatting
List of internal transactions with formatted values
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
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Optional
startBlock?: numberStarting block number
Optional
endBlock?: numberEnding block number
Account address to get token transactions for
Optional
contractaddress?: stringContract address to filter transactions by
Optional
startblock?: numberStart block number
Optional
endblock?: numberEnd block number
If true, returns the raw transfer data without formatting
List of token transfers with formatted values
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
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Optional
minTimestamp?: numberMinimum timestamp in seconds
Optional
maxTimestamp?: numberMaximum timestamp in seconds
Optional
startBlock?: numberStarting block number
Optional
endBlock?: numberEnding block number
Account address to get token transactions for
Optional
contractaddress?: stringContract address to filter transactions by
Optional
startblock?: numberStart block number
Optional
endblock?: numberEnd block number
If true, returns the raw transfer data without formatting
List of NFT transfers with formatted values
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
Optional
page?: numberPage number (1-based)
Optional
offset?: numberPage offset.
Optional
skip?: numberNumber of records to skip (pageSize * (pageNumber - 1)). Maximum 10000.
Optional
limit?: numberNumber of records per page. Maximum 100.
Optional
sort?: "asc" | "desc"Sort order by timestamp (ASC for ascending, DESC for descending)
Miner address to get blocks for
If true, returns the raw block data without formatting
List of mined blocks with formatted values
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
If true, returns the raw balance in Drip without formatting
Historical balance with formatted values
Wrapper class for account-related operations. Extends BaseWrapper to provide formatted data responses.
Example