2023-10-12 22:50:16 +00:00
|
|
|
part of 'bitcoin_cash.dart';
|
|
|
|
|
|
|
|
class CWBitcoinCash extends BitcoinCash {
|
|
|
|
@override
|
|
|
|
String getMnemonic(int? strength) => Mnemonic.generate();
|
|
|
|
|
|
|
|
@override
|
|
|
|
Uint8List getSeedFromMnemonic(String seed) => Mnemonic.toSeed(seed);
|
|
|
|
|
|
|
|
@override
|
|
|
|
String getCashAddrFormat(String address) => AddressUtils.getCashAddrFormat(address);
|
|
|
|
|
|
|
|
@override
|
|
|
|
WalletService createBitcoinCashWalletService(
|
2023-10-13 16:02:01 +00:00
|
|
|
Box<WalletInfo> walletInfoSource, Box<UnspentCoinsInfo> unspentCoinSource, bool isDirect) {
|
|
|
|
return BitcoinCashWalletService(walletInfoSource, unspentCoinSource, isDirect);
|
2023-10-12 22:50:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
WalletCredentials createBitcoinCashNewWalletCredentials({
|
|
|
|
required String name,
|
|
|
|
WalletInfo? walletInfo,
|
2023-10-13 16:02:01 +00:00
|
|
|
String? password,
|
2023-10-12 22:50:16 +00:00
|
|
|
}) =>
|
2023-10-13 16:02:01 +00:00
|
|
|
BitcoinCashNewWalletCredentials(name: name, walletInfo: walletInfo, password: password);
|
2023-10-12 22:50:16 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
WalletCredentials createBitcoinCashRestoreWalletFromSeedCredentials(
|
|
|
|
{required String name, required String mnemonic, required String password}) =>
|
|
|
|
BitcoinCashRestoreWalletFromSeedCredentials(
|
|
|
|
name: name, mnemonic: mnemonic, password: password);
|
|
|
|
|
|
|
|
@override
|
|
|
|
TransactionPriority deserializeBitcoinCashTransactionPriority(int raw) =>
|
|
|
|
BitcoinCashTransactionPriority.deserialize(raw: raw);
|
|
|
|
|
|
|
|
@override
|
|
|
|
TransactionPriority getDefaultTransactionPriority() => BitcoinCashTransactionPriority.medium;
|
|
|
|
|
|
|
|
@override
|
|
|
|
List<TransactionPriority> getTransactionPriorities() => BitcoinCashTransactionPriority.all;
|
|
|
|
|
|
|
|
@override
|
|
|
|
TransactionPriority getBitcoinCashTransactionPrioritySlow() =>
|
|
|
|
BitcoinCashTransactionPriority.slow;
|
|
|
|
}
|