mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
42 lines
969 B
Text
42 lines
969 B
Text
|
class OutputResponse {
|
||
|
final OutputLinks links;
|
||
|
final String address;
|
||
|
final String scriptPubkey;
|
||
|
final String transaction;
|
||
|
final int value;
|
||
|
|
||
|
OutputResponse({
|
||
|
required this.links,
|
||
|
required this.address,
|
||
|
required this.scriptPubkey,
|
||
|
required this.transaction,
|
||
|
required this.value,
|
||
|
});
|
||
|
|
||
|
factory OutputResponse.fromJson(Map<String, dynamic> json) {
|
||
|
return OutputResponse(
|
||
|
links: OutputLinks.fromJson(json['_links']),
|
||
|
address: json['address'],
|
||
|
scriptPubkey: json['script_pubkey'],
|
||
|
transaction: json['transaction'],
|
||
|
value: json['value'],
|
||
|
);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
class OutputLinks {
|
||
|
final OutputLink? self;
|
||
|
final TransactionLink? transaction;
|
||
|
|
||
|
OutputLinks({
|
||
|
this.self,
|
||
|
this.transaction,
|
||
|
});
|
||
|
|
||
|
factory OutputLinks.fromJson(Map<String, dynamic> json) {
|
||
|
return OutputLinks(
|
||
|
self: OutputLink.fromJson(json['self']),
|
||
|
transaction: TransactionLink.fromJson(json['transaction']),
|
||
|
);
|
||
|
}
|
||
|
}
|