mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-11-01 18:07:44 +00:00
17 lines
440 B
Dart
17 lines
440 B
Dart
import 'dart:convert';
|
|
|
|
class BitcoinAddressRecord {
|
|
BitcoinAddressRecord(this.address, {this.index});
|
|
|
|
factory BitcoinAddressRecord.fromJSON(String jsonSource) {
|
|
final decoded = json.decode(jsonSource) as Map;
|
|
|
|
return BitcoinAddressRecord(decoded['address'] as String,
|
|
index: decoded['index'] as int);
|
|
}
|
|
|
|
final String address;
|
|
int index;
|
|
|
|
String toJSON() => json.encode({'address': address, 'index': index});
|
|
}
|