getTransactionCount method

Future<int> getTransactionCount(
  1. XCBAddress address, {
  2. BlockNum? atBlock,
})

Gets the amount of transactions issued by the specified address.

This function allows specifying a custom block mined in the past to get historical data. By default, BlockNum.current will be used.

Implementation

Future<int> getTransactionCount(XCBAddress address, {BlockNum? atBlock}) {
  final blockParam = _getBlockParam(atBlock);

  return _makeRPCCall<String>('xcb_getTransactionCount', [
    address.hexNo0x,
    blockParam,
  ]).then((hex) => hexToInt(hex).toInt());
}