mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-05-11 22:02:20 +00:00
save
This commit is contained in:
parent
2f34cbe4cb
commit
1a32c91217
12 changed files with 53 additions and 2511 deletions
5
.github/workflows/pr_test_build.yml
vendored
5
.github/workflows/pr_test_build.yml
vendored
|
@ -111,6 +111,7 @@ jobs:
|
|||
cd cw_haven && flutter pub get && flutter packages pub run build_runner build --delete-conflicting-outputs && cd ..
|
||||
cd cw_bitcoin_cash && flutter pub get && flutter packages pub run build_runner build --delete-conflicting-outputs && cd ..
|
||||
cd cw_nano && flutter pub get && flutter packages pub run build_runner build --delete-conflicting-outputs && cd ..
|
||||
cd cw_lightning && flutter pub get && flutter packages pub run build_runner build --delete-conflicting-outputs && cd ..
|
||||
flutter packages pub run build_runner build --delete-conflicting-outputs
|
||||
|
||||
- name: Add secrets
|
||||
|
@ -152,8 +153,8 @@ jobs:
|
|||
echo "const walletConnectProjectId = '${{ secrets.WALLET_CONNECT_PROJECT_ID }}';" >> lib/.secrets.g.dart
|
||||
echo "const moralisApiKey = '${{ secrets.MORALIS_API_KEY }}';" >> lib/.secrets.g.dart
|
||||
echo "const polygonScanApiKey = '${{ secrets.POLYGON_SCAN_API_KEY }}';" >> cw_evm/lib/.secrets.g.dart
|
||||
echo "const breezApiKey = '${{ secrets.BREEZ_API_KEY }}';" >> cw_bitcoin/lib/.secrets.g.dart
|
||||
echo "const breezInviteCode = '${{ secrets.BREEZ_INVITE_CODE }}';" >> cw_bitcoin/lib/.secrets.g.dart
|
||||
echo "const breezApiKey = '${{ secrets.BREEZ_API_KEY }}';" >> cw_lightning/lib/.secrets.g.dart
|
||||
echo "const breezInviteCode = '${{ secrets.BREEZ_INVITE_CODE }}';" >> cw_lightning/lib/.secrets.g.dart
|
||||
|
||||
- name: Rename app
|
||||
run: echo -e "id=com.cakewallet.test\nname=${{ env.BRANCH_NAME }}" > /opt/android/cake_wallet/android/app.properties
|
||||
|
|
|
@ -52,9 +52,6 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store {
|
|||
sideHd: bitcoin.HDWallet.fromSeed(seedBytes, network: networkType).derivePath("m/0'/1"),
|
||||
networkType: networkType);
|
||||
|
||||
// initialize breeze:
|
||||
setupBreeze(seedBytes);
|
||||
|
||||
autorun((_) {
|
||||
this.walletAddresses.isEnabledAutoGenerateSubaddress = this.isEnabledAutoGenerateSubaddress;
|
||||
});
|
||||
|
@ -99,51 +96,4 @@ abstract class BitcoinWalletBase extends ElectrumWallet with Store {
|
|||
initialRegularAddressIndex: snp.regularAddressIndex,
|
||||
initialChangeAddressIndex: snp.changeAddressIndex);
|
||||
}
|
||||
|
||||
void printDirectoryTree(Directory directory, {String prefix = ''}) {
|
||||
try {
|
||||
final files = directory.listSync();
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
final isLast = i == files.length - 1;
|
||||
if (files[i] is File) {
|
||||
print(
|
||||
'${prefix}${isLast ? '└─' : '├─'} ${files[i].path.split(Platform.pathSeparator).last}');
|
||||
} else if (files[i] is Directory) {
|
||||
print(
|
||||
'${prefix}${isLast ? '└─' : '├─'} ${files[i].path.split(Platform.pathSeparator).last}');
|
||||
printDirectoryTree(files[i] as Directory, prefix: '${prefix}${isLast ? ' ' : '│ '}');
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
print('Error: $e');
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> setupBreeze(Uint8List seedBytes) async {
|
||||
// Initialize SDK logs listener
|
||||
final sdk = BreezSDK();
|
||||
sdk.initialize();
|
||||
|
||||
NodeConfig breezNodeConfig = NodeConfig.greenlight(
|
||||
config: GreenlightNodeConfig(
|
||||
partnerCredentials: null,
|
||||
inviteCode: secrets.breezInviteCode,
|
||||
),
|
||||
);
|
||||
Config breezConfig = await sdk.defaultConfig(
|
||||
envType: EnvironmentType.Production,
|
||||
apiKey: secrets.breezApiKey,
|
||||
nodeConfig: breezNodeConfig,
|
||||
);
|
||||
|
||||
printDirectoryTree(Directory((await getApplicationDocumentsDirectory()).path));
|
||||
// Customize the config object according to your needs
|
||||
String workingDir = (await getApplicationDocumentsDirectory()).path;
|
||||
workingDir = "$workingDir/wallets/bitcoin/${walletInfo.name}/breez/";
|
||||
new Directory(workingDir).createSync(recursive: true);
|
||||
breezConfig = breezConfig.copyWith(workingDir: workingDir);
|
||||
await sdk.connect(config: breezConfig, seed: seedBytes);
|
||||
|
||||
print("initialized: ${(await sdk.isInitialized())}");
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,5 +0,0 @@
|
|||
class BitcoinMnemonicIsIncorrectException implements Exception {
|
||||
@override
|
||||
String toString() =>
|
||||
'Bitcoin mnemonic has incorrect format. Mnemonic should contain 12 or 24 words separated by space.';
|
||||
}
|
|
@ -1,23 +0,0 @@
|
|||
import 'package:cw_core/wallet_credentials.dart';
|
||||
import 'package:cw_core/wallet_info.dart';
|
||||
|
||||
class BitcoinNewWalletCredentials extends WalletCredentials {
|
||||
BitcoinNewWalletCredentials({required String name, WalletInfo? walletInfo})
|
||||
: super(name: name, walletInfo: walletInfo);
|
||||
}
|
||||
|
||||
class BitcoinRestoreWalletFromSeedCredentials extends WalletCredentials {
|
||||
BitcoinRestoreWalletFromSeedCredentials(
|
||||
{required String name, required String password, required this.mnemonic, WalletInfo? walletInfo})
|
||||
: super(name: name, password: password, walletInfo: walletInfo);
|
||||
|
||||
final String mnemonic;
|
||||
}
|
||||
|
||||
class BitcoinRestoreWalletFromWIFCredentials extends WalletCredentials {
|
||||
BitcoinRestoreWalletFromWIFCredentials(
|
||||
{required String name, required String password, required this.wif, WalletInfo? walletInfo})
|
||||
: super(name: name, password: password, walletInfo: walletInfo);
|
||||
|
||||
final String wif;
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
library cw_bitcoin;
|
||||
library cw_lightning;
|
||||
|
||||
/// A Calculator.
|
||||
class Calculator {
|
||||
|
|
|
@ -10,15 +10,15 @@ import 'package:mobx/mobx.dart';
|
|||
import 'package:flutter/foundation.dart';
|
||||
import 'package:bitcoin_flutter/bitcoin_flutter.dart' as bitcoin;
|
||||
import 'package:cw_bitcoin/electrum_wallet_snapshot.dart';
|
||||
import 'package:cw_lightning/electrum_wallet.dart';
|
||||
import 'package:cw_bitcoin/electrum_wallet.dart';
|
||||
import 'package:cw_core/wallet_info.dart';
|
||||
import 'package:cw_lightning/bitcoin_address_record.dart';
|
||||
import 'package:cw_lightning/electrum_balance.dart';
|
||||
import 'package:cw_lightning/bitcoin_wallet_addresses.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_lightning/.secrets.g.dart' as secrets;
|
||||
|
||||
part 'bitcoin_wallet.g.dart';
|
||||
part 'lightning_wallet.g.dart';
|
||||
|
||||
class LightningWallet = LightningWalletBase with _$LightningWallet;
|
||||
|
||||
|
@ -60,7 +60,7 @@ abstract class LightningWalletBase extends ElectrumWallet with Store {
|
|||
});
|
||||
}
|
||||
|
||||
static Future<BitcoinWallet> create(
|
||||
static Future<LightningWallet> create(
|
||||
{required String mnemonic,
|
||||
required String password,
|
||||
required WalletInfo walletInfo,
|
||||
|
@ -69,7 +69,7 @@ abstract class LightningWalletBase extends ElectrumWallet with Store {
|
|||
ElectrumBalance? initialBalance,
|
||||
int initialRegularAddressIndex = 0,
|
||||
int initialChangeAddressIndex = 0}) async {
|
||||
return BitcoinWallet(
|
||||
return LightningWallet(
|
||||
mnemonic: mnemonic,
|
||||
password: password,
|
||||
walletInfo: walletInfo,
|
||||
|
@ -81,14 +81,14 @@ abstract class LightningWalletBase extends ElectrumWallet with Store {
|
|||
initialChangeAddressIndex: initialChangeAddressIndex);
|
||||
}
|
||||
|
||||
static Future<BitcoinWallet> open({
|
||||
static Future<LightningWallet> open({
|
||||
required String name,
|
||||
required WalletInfo walletInfo,
|
||||
required Box<UnspentCoinsInfo> unspentCoinsInfo,
|
||||
required String password,
|
||||
}) async {
|
||||
final snp = await ElectrumWallletSnapshot.load(name, walletInfo.type, password);
|
||||
return BitcoinWallet(
|
||||
return LightningWallet(
|
||||
mnemonic: snp.mnemonic,
|
||||
password: password,
|
||||
walletInfo: walletInfo,
|
||||
|
@ -100,25 +100,6 @@ abstract class LightningWalletBase extends ElectrumWallet with Store {
|
|||
initialChangeAddressIndex: snp.changeAddressIndex);
|
||||
}
|
||||
|
||||
void printDirectoryTree(Directory directory, {String prefix = ''}) {
|
||||
try {
|
||||
final files = directory.listSync();
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
final isLast = i == files.length - 1;
|
||||
if (files[i] is File) {
|
||||
print(
|
||||
'${prefix}${isLast ? '└─' : '├─'} ${files[i].path.split(Platform.pathSeparator).last}');
|
||||
} else if (files[i] is Directory) {
|
||||
print(
|
||||
'${prefix}${isLast ? '└─' : '├─'} ${files[i].path.split(Platform.pathSeparator).last}');
|
||||
printDirectoryTree(files[i] as Directory, prefix: '${prefix}${isLast ? ' ' : '│ '}');
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
print('Error: $e');
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> setupBreeze(Uint8List seedBytes) async {
|
||||
// Initialize SDK logs listener
|
||||
final sdk = BreezSDK();
|
||||
|
@ -135,8 +116,7 @@ abstract class LightningWalletBase extends ElectrumWallet with Store {
|
|||
apiKey: secrets.breezApiKey,
|
||||
nodeConfig: breezNodeConfig,
|
||||
);
|
||||
|
||||
printDirectoryTree(Directory((await getApplicationDocumentsDirectory()).path));
|
||||
|
||||
// Customize the config object according to your needs
|
||||
String workingDir = (await getApplicationDocumentsDirectory()).path;
|
||||
workingDir = "$workingDir/wallets/bitcoin/${walletInfo.name}/breez/";
|
||||
|
|
|
@ -1,29 +1,28 @@
|
|||
import 'dart:io';
|
||||
import 'package:cw_lightning/bitcoin_mnemonic.dart';
|
||||
import 'package:cw_lightning/bitcoin_mnemonic_is_incorrect_exception.dart';
|
||||
import 'package:cw_lightning/bitcoin_wallet_creation_credentials.dart';
|
||||
import 'package:cw_bitcoin/bitcoin_mnemonic.dart';
|
||||
import 'package:cw_bitcoin/bitcoin_mnemonic_is_incorrect_exception.dart';
|
||||
import 'package:cw_bitcoin/bitcoin_wallet_creation_credentials.dart';
|
||||
import 'package:cw_core/unspent_coins_info.dart';
|
||||
import 'package:cw_core/wallet_base.dart';
|
||||
import 'package:cw_core/wallet_service.dart';
|
||||
import 'package:cw_bitcoin/lightning_wallet.dart';
|
||||
import 'package:cw_core/pathForWallet.dart';
|
||||
import 'package:cw_core/wallet_info.dart';
|
||||
import 'package:cw_core/wallet_type.dart';
|
||||
import 'package:cw_lightning/lightning_wallet.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:breez_sdk/breez_sdk.dart';
|
||||
|
||||
class LightningWalletService extends WalletService<
|
||||
BitcoinNewWalletCredentials,
|
||||
BitcoinRestoreWalletFromSeedCredentials,
|
||||
BitcoinRestoreWalletFromWIFCredentials> {
|
||||
BitcoinWalletService(this.walletInfoSource, this.unspentCoinsInfoSource);
|
||||
LightningWalletService(this.walletInfoSource, this.unspentCoinsInfoSource);
|
||||
|
||||
final Box<WalletInfo> walletInfoSource;
|
||||
final Box<UnspentCoinsInfo> unspentCoinsInfoSource;
|
||||
|
||||
@override
|
||||
WalletType getType() => WalletType.bitcoin;
|
||||
WalletType getType() => WalletType.lightning;
|
||||
|
||||
@override
|
||||
Future<LightningWallet> create(BitcoinNewWalletCredentials credentials) async {
|
||||
|
@ -42,11 +41,11 @@ class LightningWalletService extends WalletService<
|
|||
File(await pathForWallet(name: name, type: getType())).existsSync();
|
||||
|
||||
@override
|
||||
Future<BitcoinWallet> openWallet(String name, String password) async {
|
||||
Future<LightningWallet> openWallet(String name, String password) async {
|
||||
final walletInfo = walletInfoSource.values.firstWhereOrNull(
|
||||
(info) => info.id == WalletBase.idFor(name, getType()))!;
|
||||
|
||||
final wallet = await BitcoinWalletBase.open(
|
||||
final wallet = await LightningWalletBase.open(
|
||||
password: password, name: name, walletInfo: walletInfo,
|
||||
unspentCoinsInfo: unspentCoinsInfoSource);
|
||||
await wallet.init();
|
||||
|
@ -66,7 +65,7 @@ class LightningWalletService extends WalletService<
|
|||
Future<void> rename(String currentName, String password, String newName) async {
|
||||
final currentWalletInfo = walletInfoSource.values.firstWhereOrNull(
|
||||
(info) => info.id == WalletBase.idFor(currentName, getType()))!;
|
||||
final currentWallet = await BitcoinWalletBase.open(
|
||||
final currentWallet = await LightningWalletBase.open(
|
||||
password: password,
|
||||
name: currentName,
|
||||
walletInfo: currentWalletInfo,
|
||||
|
@ -82,18 +81,18 @@ class LightningWalletService extends WalletService<
|
|||
}
|
||||
|
||||
@override
|
||||
Future<BitcoinWallet> restoreFromKeys(
|
||||
Future<LightningWallet> restoreFromKeys(
|
||||
BitcoinRestoreWalletFromWIFCredentials credentials) async =>
|
||||
throw UnimplementedError();
|
||||
|
||||
@override
|
||||
Future<BitcoinWallet> restoreFromSeed(
|
||||
Future<LightningWallet> restoreFromSeed(
|
||||
BitcoinRestoreWalletFromSeedCredentials credentials) async {
|
||||
if (!validateMnemonic(credentials.mnemonic)) {
|
||||
throw BitcoinMnemonicIsIncorrectException();
|
||||
}
|
||||
|
||||
final wallet = await BitcoinWalletBase.create(
|
||||
final wallet = await LightningWalletBase.create(
|
||||
password: credentials.password!,
|
||||
mnemonic: credentials.mnemonic,
|
||||
walletInfo: credentials.walletInfo!,
|
||||
|
|
|
@ -1,62 +0,0 @@
|
|||
import 'package:cw_bitcoin/bitcoin_commit_transaction_exception.dart';
|
||||
import 'package:bitcoin_flutter/bitcoin_flutter.dart' as bitcoin;
|
||||
import 'package:cw_core/pending_transaction.dart';
|
||||
import 'package:cw_bitcoin/electrum.dart';
|
||||
import 'package:cw_bitcoin/bitcoin_amount_format.dart';
|
||||
import 'package:cw_bitcoin/electrum_transaction_info.dart';
|
||||
import 'package:cw_core/transaction_direction.dart';
|
||||
import 'package:cw_core/wallet_type.dart';
|
||||
|
||||
class PendingBitcoinTransaction with PendingTransaction {
|
||||
PendingBitcoinTransaction(this._tx, this.type,
|
||||
{required this.electrumClient,
|
||||
required this.amount,
|
||||
required this.fee})
|
||||
: _listeners = <void Function(ElectrumTransactionInfo transaction)>[];
|
||||
|
||||
final WalletType type;
|
||||
final bitcoin.Transaction _tx;
|
||||
final ElectrumClient electrumClient;
|
||||
final int amount;
|
||||
final int fee;
|
||||
|
||||
@override
|
||||
String get id => _tx.getId();
|
||||
|
||||
@override
|
||||
String get hex => _tx.toHex();
|
||||
|
||||
@override
|
||||
String get amountFormatted => bitcoinAmountToString(amount: amount);
|
||||
|
||||
@override
|
||||
String get feeFormatted => bitcoinAmountToString(amount: fee);
|
||||
|
||||
final List<void Function(ElectrumTransactionInfo transaction)> _listeners;
|
||||
|
||||
@override
|
||||
Future<void> commit() async {
|
||||
final result =
|
||||
await electrumClient.broadcastTransaction(transactionRaw: _tx.toHex());
|
||||
|
||||
if (result.isEmpty) {
|
||||
throw BitcoinCommitTransactionException();
|
||||
}
|
||||
|
||||
_listeners?.forEach((listener) => listener(transactionInfo()));
|
||||
}
|
||||
|
||||
void addListener(
|
||||
void Function(ElectrumTransactionInfo transaction) listener) =>
|
||||
_listeners.add(listener);
|
||||
|
||||
ElectrumTransactionInfo transactionInfo() => ElectrumTransactionInfo(type,
|
||||
id: id,
|
||||
height: 0,
|
||||
amount: amount,
|
||||
direction: TransactionDirection.outgoing,
|
||||
date: DateTime.now(),
|
||||
isPending: true,
|
||||
confirmations: 0,
|
||||
fee: fee);
|
||||
}
|
|
@ -15,6 +15,7 @@ import 'package:cake_wallet/entities/exchange_api_mode.dart';
|
|||
import 'package:cake_wallet/entities/parse_address_from_domain.dart';
|
||||
import 'package:cake_wallet/entities/receive_page_option.dart';
|
||||
import 'package:cake_wallet/ethereum/ethereum.dart';
|
||||
import 'package:cake_wallet/lightning/lightning.dart';
|
||||
import 'package:cake_wallet/nano/nano.dart';
|
||||
import 'package:cake_wallet/ionia/ionia_anypay.dart';
|
||||
import 'package:cake_wallet/ionia/ionia_gift_card.dart';
|
||||
|
@ -864,7 +865,7 @@ Future<void> setup({
|
|||
case WalletType.polygon:
|
||||
return polygon!.createPolygonWalletService(_walletInfoSource);
|
||||
case WalletType.lightning:
|
||||
return lightning!.createLightningWalletService(_walletInfoSource);
|
||||
return lightning!.createLightningWalletService(_walletInfoSource, _unspentCoinsInfoSource);
|
||||
default:
|
||||
throw Exception('Unexpected token: ${param1.toString()} for generating of WalletService');
|
||||
}
|
||||
|
|
|
@ -158,10 +158,6 @@ class CWLightning extends Lightning {
|
|||
WalletService createLightningWalletService(Box<WalletInfo> walletInfoSource, Box<UnspentCoinsInfo> unspentCoinSource) {
|
||||
return LightningWalletService(walletInfoSource, unspentCoinSource);
|
||||
}
|
||||
|
||||
WalletService createLitecoinWalletService(Box<WalletInfo> walletInfoSource, Box<UnspentCoinsInfo> unspentCoinSource) {
|
||||
return LitecoinWalletService(walletInfoSource, unspentCoinSource);
|
||||
}
|
||||
|
||||
@override
|
||||
TransactionPriority getLightningTransactionPriorityMedium()
|
||||
|
|
|
@ -6,33 +6,30 @@ import 'package:cw_core/output_info.dart';
|
|||
import 'package:cw_core/unspent_coins_info.dart';
|
||||
import 'package:cw_core/wallet_service.dart';
|
||||
import 'package:cake_wallet/view_model/send/output.dart';
|
||||
import 'package:cw_core/wallet_type.dart';
|
||||
import 'package:hive/hive.dart';
|
||||
import 'package:cw_bitcoin/electrum_wallet.dart';
|
||||
import 'package:cw_bitcoin/bitcoin_unspent.dart';
|
||||
import 'package:cw_bitcoin/bitcoin_mnemonic.dart';
|
||||
import 'package:cw_bitcoin/bitcoin_transaction_priority.dart';
|
||||
import 'package:cw_bitcoin/bitcoin_wallet_service.dart';
|
||||
import 'package:cw_bitcoin/bitcoin_wallet_creation_credentials.dart';
|
||||
import 'package:cw_bitcoin/bitcoin_amount_format.dart';
|
||||
import 'package:cw_bitcoin/bitcoin_address_record.dart';
|
||||
import 'package:cw_bitcoin/bitcoin_transaction_credentials.dart';
|
||||
import 'package:cw_lightning/lightning_wallet_service.dart';
|
||||
import 'package:mobx/mobx.dart';
|
||||
import 'package:cw_lightning/lightning_wallet_service.dart';
|
||||
|
||||
part 'cw_lightning.dart';
|
||||
|
||||
Lightning? lightning = CWLightning();
|
||||
|
||||
|
||||
class ElectrumSubAddress {
|
||||
ElectrumSubAddress({
|
||||
required this.id,
|
||||
required this.name,
|
||||
required this.address,
|
||||
required this.txCount,
|
||||
required this.balance,
|
||||
required this.isChange});
|
||||
class ElectrumSubAddress {
|
||||
ElectrumSubAddress(
|
||||
{required this.id,
|
||||
required this.name,
|
||||
required this.address,
|
||||
required this.txCount,
|
||||
required this.balance,
|
||||
required this.isChange});
|
||||
final int id;
|
||||
final String name;
|
||||
final String address;
|
||||
|
@ -44,9 +41,15 @@ Lightning? lightning = CWLightning();
|
|||
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});
|
||||
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();
|
||||
|
@ -55,9 +58,11 @@ abstract class Lightning {
|
|||
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});
|
||||
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);
|
||||
|
@ -71,8 +76,8 @@ abstract class Lightning {
|
|||
|
||||
List<Unspent> getUnspents(Object wallet);
|
||||
Future<void> updateUnspents(Object wallet);
|
||||
WalletService createLightningWalletService(Box<WalletInfo> walletInfoSource, Box<UnspentCoinsInfo> unspentCoinSource);
|
||||
WalletService createLightningWalletService(
|
||||
Box<WalletInfo> walletInfoSource, Box<UnspentCoinsInfo> unspentCoinSource);
|
||||
TransactionPriority getLightningTransactionPriorityMedium();
|
||||
TransactionPriority getLightningTransactionPrioritySlow();
|
||||
}
|
||||
|
Loading…
Reference in a new issue