getCounterForAccount static method

Future<int> getCounterForAccount(
  1. String server,
  2. String publicKeyHash, {
  3. String chainid = 'main',
})

Implementation

static Future<int> getCounterForAccount(String server, String publicKeyHash,
    {String chainid = 'main'}) async {
  var response = await HttpHelper.performGetRequest(server,
      'chains/$chainid/blocks/head/context/contracts/$publicKeyHash/counter');
  return int.parse(response.toString().replaceAll('"', ''), radix: 10);
}