40 lines
1.1 KiB
Dart
40 lines
1.1 KiB
Dart
// ignore_for_file: depend_on_referenced_packages
|
|
|
|
import 'package:flutterchain/flutterchain_lib/constants/core/supported_blockchains.dart';
|
|
import 'package:flutterchain/flutterchain_lib/models/core/wallet.dart';
|
|
import 'package:json_annotation/json_annotation.dart';
|
|
part 'bitcoin_blockchain_data.g.dart';
|
|
|
|
@JsonSerializable()
|
|
class BitcoinBlockChainData extends BlockChainData {
|
|
String? accountId;
|
|
BitcoinBlockChainData({
|
|
// Standard bitcoin SegWit address
|
|
this.accountId,
|
|
//Standard bitcoin Base 58 encoded public key
|
|
required super.publicKey,
|
|
//Base 58 encoded
|
|
required super.privateKey,
|
|
required super.derivationPath,
|
|
required super.passphrase,
|
|
super.identifier = BlockChains.bitcoin,
|
|
});
|
|
|
|
factory BitcoinBlockChainData.fromJson(Map<String, dynamic> json) =>
|
|
_$BitcoinBlockChainDataFromJson(json);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() => _$BitcoinBlockChainDataToJson(this);
|
|
|
|
@override
|
|
String toString() {
|
|
return "{publicKey $publicKey , privateKey $privateKey }";
|
|
}
|
|
|
|
String get() {
|
|
return accountId!;
|
|
}
|
|
}
|
|
|
|
|