getAddressTxsChain method

Future<List<Transaction>> getAddressTxsChain(
  1. String address, {
  2. String lastSeenTxid = "",
})

Get transaction history for the specified address, sorted with newest first. Returns 25 transactions per page. More can be requested by specifying the last txid seen by the previous query.

Implementation

Future<List<Transaction>> getAddressTxsChain(String address,
    {String lastSeenTxid = ""}) async {
  var response = await http
      .get(Uri.parse("$url/api/address/$address/txs/chain/$lastSeenTxid"));
  List<dynamic> json = jsonDecode(response.body) as List<dynamic>;
  List<Transaction> result = [];
  for (var item in json) {
    result.add(Transaction.fromJson(item));
  }
  return result;
}