2021-12-24 12:52:08 +00:00
|
|
|
import 'package:cw_bitcoin/bitcoin_address_record.dart';
|
2023-08-25 19:16:15 +00:00
|
|
|
import 'package:cw_core/unspent_transaction_output.dart';
|
2021-12-24 12:52:08 +00:00
|
|
|
|
2023-08-25 19:16:15 +00:00
|
|
|
class BitcoinUnspent extends Unspent {
|
|
|
|
BitcoinUnspent(BitcoinAddressRecord addressRecord, String hash, int value, int vout)
|
|
|
|
: bitcoinAddressRecord = addressRecord,
|
|
|
|
super(addressRecord.address, hash, value, vout, null);
|
2021-12-24 12:52:08 +00:00
|
|
|
|
|
|
|
factory BitcoinUnspent.fromJSON(
|
2023-08-25 19:16:15 +00:00
|
|
|
BitcoinAddressRecord address, Map<String, dynamic> json) =>
|
2021-12-24 12:52:08 +00:00
|
|
|
BitcoinUnspent(address, json['tx_hash'] as String, json['value'] as int,
|
|
|
|
json['tx_pos'] as int);
|
|
|
|
|
2023-08-25 19:16:15 +00:00
|
|
|
final BitcoinAddressRecord bitcoinAddressRecord;
|
2021-12-24 12:52:08 +00:00
|
|
|
}
|