getUnspent method

Future<List<ScripthashUnspent>> getUnspent(
  1. dynamic scripthash
)

Implementation

Future<List<ScripthashUnspent>> getUnspent(scripthash) async {
  var proc = 'blockchain.scripthash.listunspent';
  List<dynamic> unspent = await request(proc, [scripthash]);
  return (unspent.map((res) => ScripthashUnspent(
      scripthash: scripthash,
      height: res['height'],
      txHash: res['tx_hash'],
      txPos: res['tx_pos'],
      value: res['value']))).toList();
}