|
|
|
@ -51,6 +51,7 @@ Future<void> main(List<String> args) async {
|
|
|
|
|
Future<void> generateBitcoin(bool hasImplementation) async {
|
|
|
|
|
final outputFile = File(bitcoinOutputPath);
|
|
|
|
|
const bitcoinCommonHeaders = """
|
|
|
|
|
import 'package:cw_core/unspent_transaction_output.dart';
|
|
|
|
|
import 'package:cw_core/wallet_credentials.dart';
|
|
|
|
|
import 'package:cw_core/wallet_info.dart';
|
|
|
|
|
import 'package:cw_core/transaction_priority.dart';
|
|
|
|
@ -98,7 +99,7 @@ abstract class Bitcoin {
|
|
|
|
|
int formatterStringDoubleToBitcoinAmount(String amount);
|
|
|
|
|
String bitcoinTransactionPriorityWithLabel(TransactionPriority priority, int rate);
|
|
|
|
|
|
|
|
|
|
List<BitcoinUnspent> getUnspents(Object wallet);
|
|
|
|
|
List<Unspent> getUnspents(Object wallet);
|
|
|
|
|
void updateUnspents(Object wallet);
|
|
|
|
|
WalletService createBitcoinWalletService(Box<WalletInfo> walletInfoSource, Box<UnspentCoinsInfo> unspentCoinSource);
|
|
|
|
|
WalletService createLitecoinWalletService(Box<WalletInfo> walletInfoSource, Box<UnspentCoinsInfo> unspentCoinSource);
|
|
|
|
@ -577,7 +578,7 @@ Future<void> generateBitcoinCash(bool hasImplementation) async {
|
|
|
|
|
const bitcoinCashCommonHeaders = """
|
|
|
|
|
import 'dart:typed_data';
|
|
|
|
|
|
|
|
|
|
import 'package:cw_bitcoin/bitcoin_transaction_priority.dart';
|
|
|
|
|
import 'package:cw_core/unspent_transaction_output.dart';
|
|
|
|
|
import 'package:cw_core/transaction_priority.dart';
|
|
|
|
|
import 'package:cw_core/unspent_coins_info.dart';
|
|
|
|
|
import 'package:cw_core/wallet_credentials.dart';
|
|
|
|
@ -587,6 +588,7 @@ import 'package:hive/hive.dart';
|
|
|
|
|
""";
|
|
|
|
|
const bitcoinCashCWHeaders = """
|
|
|
|
|
import 'package:cw_bitcoin_cash/cw_bitcoin_cash.dart';
|
|
|
|
|
import 'package:cw_bitcoin/bitcoin_transaction_priority.dart';
|
|
|
|
|
""";
|
|
|
|
|
const bitcoinCashCwPart = "part 'cw_bitcoin_cash.dart';";
|
|
|
|
|
const bitcoinCashContent = """
|
|
|
|
|