This commit is contained in:
fosse 2024-02-13 13:30:24 -05:00
parent f8c190b5e5
commit 9b7f1879f5
2 changed files with 40 additions and 5 deletions

View file

@ -1,7 +1,4 @@
import 'dart:io';
import 'package:breez_sdk/breez_sdk.dart';
import 'package:breez_sdk/bridge_generated.dart';
import 'package:cw_bitcoin/bitcoin_mnemonic.dart';
import 'package:cw_core/crypto_currency.dart';
import 'package:cw_core/unspent_coins_info.dart';
@ -15,8 +12,6 @@ import 'package:cw_core/wallet_info.dart';
import 'package:cw_bitcoin/bitcoin_address_record.dart';
import 'package:cw_bitcoin/electrum_balance.dart';
import 'package:cw_bitcoin/bitcoin_wallet_addresses.dart';
import 'package:path_provider/path_provider.dart';
import 'package:cw_bitcoin/.secrets.g.dart' as secrets;
part 'bitcoin_wallet.g.dart';

View file

@ -723,7 +723,47 @@ import 'package:cw_core/wallet_service.dart';
const lightningCwPart = "part 'cw_lightning.dart';";
const lightningContent = """
abstract class Lightning {
TransactionPriority getMediumTransactionPriority();
WalletCredentials createLightningRestoreWalletFromSeedCredentials(
{required String name, required String mnemonic, required String password});
WalletCredentials createLightningRestoreWalletFromWIFCredentials(
{required String name,
required String password,
required String wif,
WalletInfo? walletInfo});
WalletCredentials createLightningNewWalletCredentials(
{required String name, WalletInfo? walletInfo});
List<String> getWordList();
Map<String, String> getWalletKeys(Object wallet);
List<TransactionPriority> getTransactionPriorities();
List<TransactionPriority> getLitecoinTransactionPriorities();
TransactionPriority deserializeLightningTransactionPriority(int raw);
TransactionPriority deserializeLitecoinTransactionPriority(int raw);
int getFeeRate(Object wallet, TransactionPriority priority);
Future<void> generateNewAddress(Object wallet, String label);
Future<void> updateAddress(Object wallet, String address, String label);
Object createLightningTransactionCredentials(List<Output> outputs,
{required TransactionPriority priority, int? feeRate});
Object createLightningTransactionCredentialsRaw(List<OutputInfo> outputs,
{TransactionPriority? priority, required int feeRate});
List<String> getAddresses(Object wallet);
String getAddress(Object wallet);
List<ElectrumSubAddress> getSubAddresses(Object wallet);
String formatterLightningAmountToString({required int amount});
double formatterLightningAmountToDouble({required int amount});
int formatterStringDoubleToLightningAmount(String amount);
String lightningTransactionPriorityWithLabel(TransactionPriority priority, int rate);
List<Unspent> getUnspents(Object wallet);
Future<void> updateUnspents(Object wallet);
WalletService createLightningWalletService(
Box<WalletInfo> walletInfoSource, Box<UnspentCoinsInfo> unspentCoinSource);
TransactionPriority getLightningTransactionPriorityMedium();
TransactionPriority getLightningTransactionPrioritySlow();
}
""";