getUnspent method

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

Implementation

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