diff --git a/.github/workflows/precompile_binaries.yml b/.github/workflows/precompile_binaries.yml
index 4ef54fd..c2442a8 100644
--- a/.github/workflows/precompile_binaries.yml
+++ b/.github/workflows/precompile_binaries.yml
@@ -1,6 +1,6 @@
on:
push:
- branches: [main, v0.2.2-dev]
+ branches: [v0.2.2-dev, main]
name: Precompile Binaries
@@ -13,6 +13,7 @@ jobs:
os:
- ubuntu-20.04
- macOS-latest
+ - windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
@@ -32,8 +33,17 @@ jobs:
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
+ - name: Configure git with access token
+ run: |
+ git config --global url."https://x-access-token:${GITHUB_TOKEN}@github.com/".insteadOf "https://github.com/"
+ shell: bash
+ env:
+ GITHUB_TOKEN: ${{ secrets.CARGOKIT_PRIVATE_KEY }}
+ - name: Install GTK
+ if: (matrix.os == 'ubuntu-20.04')
+ run: sudo apt-get update && sudo apt-get install libgtk-3-dev
- name: Precompile (with iOS)
- if: (matrix.os == 'macOS-latest')
+ if: (matrix.os == 'macOS-latest') || (matrix.os == 'windows-latest')
run: dart run build_tool precompile-binaries -v --manifest-dir=../../rust --repository=LtbLightning/ldk-node-flutter
working-directory: cargokit/build_tool
env:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7c9a88d..16f6ba8 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,29 +1,25 @@
## [0.2.2-dev]
Updated Rust and Flutter dependencies.
#### APIs added
-- Expose `nextEventAsync()`, `config()`, `status()`, `receiveVariableAmountPaymentViaJitChannel` & `receivePaymentViaJitChannel` in `Node`
-#### API changed
-- Replaced `totalOnchainBalanceSats()` & `spendableOnchainBalanceSats()` with `listBalances()`.
-- `connectOpenChannel` returns a `UserChannelId` object.
-- `updateChannelConfig` & `closeChannel` accepts a `UserChannelId` object instead of `ChannelId`
-
-## [0.2.1]
-Updated Rust and Flutter dependencies.
+- Expose `isRunning()` in `Node` class.
#### API changed
- Renamed `waitUntilNextHandled()` to `waitNextHandled`.
-- Renamed `listeningAddress()` to `listeningAddresses`
-- Upgraded `BuilderException` to handle Invalid SocketAddress.
+- Renamed `listeningAddress()` to `listeningAddresses`.
+- Upgraded `BuilderException` to handle invalid `socketAddress` & `trustedPeers.
+- Upgraded `NodeException` to handle invalid `txid`.
#### Fixed
- Functions hang indefinitely on iOs devices
- Android support bug resolved
+- Thread `frb_workerpool` panic on `SocketAddress`, `PublicKey`, `Address` `Bolt11Invoice`, `Config` and `Txid`.
## [0.2.0]
Updated `Rust` and `Flutter` dependencies.
-Invalid `BuilderException` bug resolved
+## [0.1.3]
+Updated `Rust` and `Flutter` dependencies.
+Invalid `BuilderException` bug resolved
#### APIs added
- Expose `generate()` in `Mnemonic` class.
-
#### API changed
- Remove `generateEntropyMnemonic()`.
diff --git a/cargokit/build_tool/lib/src/options.dart b/cargokit/build_tool/lib/src/options.dart
index 7937dca..b2c0f7a 100644
--- a/cargokit/build_tool/lib/src/options.dart
+++ b/cargokit/build_tool/lib/src/options.dart
@@ -298,7 +298,10 @@ class CargokitUserOptions {
}
userProjectDir = userProjectDir.parent;
}
- return CargokitUserOptions._();
+ return CargokitUserOptions(
+ usePrecompiledBinaries: true,
+ verboseLogging: false,
+ );
}
final bool usePrecompiledBinaries;
diff --git a/cargokit_options.yaml b/example/cargokit_options.yaml
similarity index 100%
rename from cargokit_options.yaml
rename to example/cargokit_options.yaml
diff --git a/example/ios/Flutter/AppFrameworkInfo.plist b/example/ios/Flutter/AppFrameworkInfo.plist
index 9625e10..7c56964 100644
--- a/example/ios/Flutter/AppFrameworkInfo.plist
+++ b/example/ios/Flutter/AppFrameworkInfo.plist
@@ -21,6 +21,6 @@
CFBundleVersion
1.0
MinimumOSVersion
- 11.0
+ 12.0
diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock
index 8c02e83..0bbacec 100644
--- a/example/ios/Podfile.lock
+++ b/example/ios/Podfile.lock
@@ -20,7 +20,7 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/path_provider_foundation/darwin"
SPEC CHECKSUMS:
- Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
+ Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7
ldk_node: 5b3cacf9e7a5d5ae0d5c24e133af5c37c3da338b
path_provider_foundation: 3784922295ac71e43754bd15e0653ccfd36a147c
diff --git a/example/ios/Runner.xcodeproj/project.pbxproj b/example/ios/Runner.xcodeproj/project.pbxproj
index 1abeb51..9210016 100644
--- a/example/ios/Runner.xcodeproj/project.pbxproj
+++ b/example/ios/Runner.xcodeproj/project.pbxproj
@@ -159,7 +159,7 @@
97C146E61CF9000F007C117D /* Project object */ = {
isa = PBXProject;
attributes = {
- LastUpgradeCheck = 1430;
+ LastUpgradeCheck = 1510;
ORGANIZATIONNAME = "";
TargetAttributes = {
97C146ED1CF9000F007C117D = {
@@ -346,7 +346,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -424,7 +424,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -473,7 +473,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
@@ -576,7 +576,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
@@ -648,7 +648,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- IPHONEOS_DEPLOYMENT_TARGET = 11.0;
+ IPHONEOS_DEPLOYMENT_TARGET = 12.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SUPPORTED_PLATFORMS = iphoneos;
diff --git a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
index a6b826d..5e31d3d 100644
--- a/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
+++ b/example/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -1,6 +1,6 @@
{
String displayText = "";
ldk.SocketAddress? bobAddr;
ldk.Bolt11Invoice? invoice;
- ldk.UserChannelId? userChannelId;
+ ldk.ChannelId? channelId;
// Replace this with your local esplora url
String esploraUrl =
@@ -63,7 +63,7 @@ class _MyAppState extends State {
closeChannel() async {
await aliceNode.closeChannel(
- userChannelId: userChannelId!, counterpartyNodeId: bobNodeId!);
+ channelId: channelId!, counterpartyNodeId: bobNodeId!);
}
Future initAliceNode() async {
@@ -81,7 +81,7 @@ class _MyAppState extends State {
final res = await aliceNode.nodeId();
setState(() {
aliceNodeId = res;
- displayText = "${aliceNodeId?.hexCode} started successfully";
+ displayText = "${aliceNodeId?.hex} started successfully";
});
}
@@ -113,16 +113,18 @@ class _MyAppState extends State {
}
totalOnchainBalanceSats() async {
- final alice = await aliceNode.listBalances();
- final bob = await bobNode.listBalances();
+ final alice = await aliceNode.totalOnchainBalanceSats();
+ final bob = await bobNode.totalOnchainBalanceSats();
if (kDebugMode) {
- print("alice's balance: ${alice.totalOnchainBalanceSats}");
- print("alice's spendable balance: ${alice.spendableOnchainBalanceSats}");
- print("bob's balance: ${bob.totalOnchainBalanceSats}");
- print("bob's spendable balance: ${bob.spendableOnchainBalanceSats}");
+ print("alice's balance: $alice");
+ print(
+ "alice's spendable balance: ${await aliceNode.spendableOnchainBalanceSats()}");
+ print("bob's balance: $bob");
+ print(
+ "bob's spendable balance: ${await bobNode.spendableOnchainBalanceSats()}");
}
setState(() {
- aliceBalance = alice.spendableOnchainBalanceSats;
+ aliceBalance = alice;
});
}
@@ -140,8 +142,7 @@ class _MyAppState extends State {
if (res.isNotEmpty) {
print("======Channels========");
for (var e in res) {
- print("nodeId: ${aliceNodeId!.hexCode}");
- print("userChannelId: ${e.userChannelId.data}");
+ print("nodeId: ${aliceNodeId!.hex}");
print("channelId: ${e.channelId.data}");
print("isChannelReady: ${e.isChannelReady}");
print("isUsable: ${e.isUsable}");
@@ -211,10 +212,10 @@ class _MyAppState extends State {
connectOpenChannel() async {
final funding_amount_sat = 80000;
final push_msat = (funding_amount_sat / 2) * 1000;
- userChannelId = await aliceNode.connectOpenChannel(
+ await aliceNode.connectOpenChannel(
channelAmountSats: funding_amount_sat,
announceChannel: true,
- address: bobAddr!,
+ socketAddress: bobAddr!,
pushToCounterpartyMsat: push_msat.toInt(),
nodeId: bobNodeId!);
}
@@ -232,6 +233,24 @@ class _MyAppState extends State {
});
}
+ setChannelId() async {
+ final channelInfos = await aliceNode.listChannels();
+ if (channelInfos.isNotEmpty) {
+ channelId = channelInfos.first.channelId;
+ if (kDebugMode) {
+ print(channelId?.data);
+ }
+
+ setState(() {
+ displayText = channelId!.data.toString();
+ });
+ } else {
+ if (kDebugMode) {
+ print("No open channels available");
+ }
+ }
+ }
+
stop() async {
await bobNode.stop();
await aliceNode.stop();
@@ -443,6 +462,20 @@ class _MyAppState extends State {
fontSize: 12,
height: 1.5,
fontWeight: FontWeight.w800))),
+ TextButton(
+ onPressed: () async {
+ await setChannelId();
+ },
+ child: Text(
+ 'Set channelId',
+ overflow: TextOverflow.clip,
+ textAlign: TextAlign.center,
+ style: GoogleFonts.nunito(
+ color: Colors.indigoAccent,
+ fontSize: 12,
+ height: 1.5,
+ fontWeight: FontWeight.w800),
+ )),
TextButton(
onPressed: () async {
await receiveAndSendPayments();
@@ -512,7 +545,7 @@ class _MyAppState extends State {
Text(
aliceNodeId == null
? "Node not initialized"
- : "@Id_:${aliceNodeId!.hexCode}",
+ : "@Id_:${aliceNodeId!.hex}",
maxLines: 1,
overflow: TextOverflow.ellipsis,
textAlign: TextAlign.center,
diff --git a/example/pubspec.lock b/example/pubspec.lock
index 9d91f1f..46a111d 100644
--- a/example/pubspec.lock
+++ b/example/pubspec.lock
@@ -114,10 +114,10 @@ packages:
dependency: transitive
description:
name: flutter_rust_bridge
- sha256: c51fa002e57e64d13030269ed9cd43752173ee4c6f60ec1e9c41450d63c75bae
+ sha256: e9a8716b1ad2fc81c434f3e4bf84b86c578578678c57e568b44aea7acf210102
url: "https://pub.dev"
source: hosted
- version: "2.0.0-dev.28"
+ version: "2.0.0-dev.31"
flutter_test:
dependency: "direct dev"
description: flutter
@@ -178,6 +178,30 @@ packages:
relative: true
source: path
version: "0.2.2-dev"
+ leak_tracker:
+ dependency: transitive
+ description:
+ name: leak_tracker
+ sha256: "7f0df31977cb2c0b88585095d168e689669a2cc9b97c309665e3386f3e9d341a"
+ url: "https://pub.dev"
+ source: hosted
+ version: "10.0.4"
+ leak_tracker_flutter_testing:
+ dependency: transitive
+ description:
+ name: leak_tracker_flutter_testing
+ sha256: "06e98f569d004c1315b991ded39924b21af84cf14cc94791b8aea337d25b57f8"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.3"
+ leak_tracker_testing:
+ dependency: transitive
+ description:
+ name: leak_tracker_testing
+ sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.1"
lints:
dependency: transitive
description:
@@ -190,34 +214,34 @@ packages:
dependency: transitive
description:
name: matcher
- sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
+ sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb
url: "https://pub.dev"
source: hosted
- version: "0.12.16"
+ version: "0.12.16+1"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
- sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
+ sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a"
url: "https://pub.dev"
source: hosted
- version: "0.5.0"
+ version: "0.8.0"
meta:
dependency: transitive
description:
name: meta
- sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
+ sha256: "7687075e408b093f36e6bbf6c91878cc0d4cd10f409506f7bc996f68220b9136"
url: "https://pub.dev"
source: hosted
- version: "1.10.0"
+ version: "1.12.0"
path:
dependency: transitive
description:
name: path
- sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
+ sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af"
url: "https://pub.dev"
source: hosted
- version: "1.8.3"
+ version: "1.9.0"
path_provider:
dependency: "direct main"
description:
@@ -339,10 +363,10 @@ packages:
dependency: transitive
description:
name: test_api
- sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
+ sha256: "9955ae474176f7ac8ee4e989dadfb411a58c30415bcfb648fa04b2b8a03afa7f"
url: "https://pub.dev"
source: hosted
- version: "0.6.1"
+ version: "0.7.0"
typed_data:
dependency: transitive
description:
@@ -367,6 +391,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
+ vm_service:
+ dependency: transitive
+ description:
+ name: vm_service
+ sha256: "3923c89304b715fb1eb6423f017651664a03bf5f4b29983627c4da791f74a4ec"
+ url: "https://pub.dev"
+ source: hosted
+ version: "14.2.1"
web:
dependency: transitive
description:
@@ -392,5 +424,5 @@ packages:
source: hosted
version: "1.0.4"
sdks:
- dart: ">=3.2.0 <4.0.0"
- flutter: ">=3.10.0"
+ dart: ">=3.3.0 <4.0.0"
+ flutter: ">=3.18.0-18.0.pre.54"
diff --git a/ios/Classes/frb_generated.h b/ios/Classes/frb_generated.h
index db72404..a72914e 100644
--- a/ios/Classes/frb_generated.h
+++ b/ios/Classes/frb_generated.h
@@ -14,23 +14,11 @@ void store_dart_post_cobject(DartPostCObjectFnType ptr);
// EXTRA END
typedef struct _Dart_Handle* Dart_Handle;
-typedef struct wire_cst_node_base {
- uintptr_t ptr;
-} wire_cst_node_base;
-
typedef struct wire_cst_list_prim_u_8_strict {
uint8_t *ptr;
int32_t len;
} wire_cst_list_prim_u_8_strict;
-typedef struct wire_cst_user_channel_id {
- struct wire_cst_list_prim_u_8_strict *data;
-} wire_cst_user_channel_id;
-
-typedef struct wire_cst_public_key {
- struct wire_cst_list_prim_u_8_strict *hex_code;
-} wire_cst_public_key;
-
typedef struct wire_cst_SocketAddress_TcpIpV4 {
struct wire_cst_list_prim_u_8_strict *addr;
uint16_t port;
@@ -70,55 +58,15 @@ typedef struct wire_cst_socket_address {
union SocketAddressKind kind;
} wire_cst_socket_address;
-typedef struct wire_cst_MaxDustHTLCExposure_FixedLimitMsat {
- uint64_t field0;
-} wire_cst_MaxDustHTLCExposure_FixedLimitMsat;
-
-typedef struct wire_cst_MaxDustHTLCExposure_FeeRateMultiplier {
- uint64_t field0;
-} wire_cst_MaxDustHTLCExposure_FeeRateMultiplier;
-
-typedef union MaxDustHTLCExposureKind {
- struct wire_cst_MaxDustHTLCExposure_FixedLimitMsat FixedLimitMsat;
- struct wire_cst_MaxDustHTLCExposure_FeeRateMultiplier FeeRateMultiplier;
-} MaxDustHTLCExposureKind;
-
-typedef struct wire_cst_max_dust_htlc_exposure {
- int32_t tag;
- union MaxDustHTLCExposureKind kind;
-} wire_cst_max_dust_htlc_exposure;
-
-typedef struct wire_cst_channel_config {
- uint32_t forwarding_fee_proportional_millionths;
- uint32_t forwarding_fee_base_msat;
- uint16_t cltv_expiry_delta;
- struct wire_cst_max_dust_htlc_exposure *max_dust_htlc_exposure;
- uint64_t force_close_avoidance_max_fee_satoshis;
- bool accept_underpaying_htlcs;
-} wire_cst_channel_config;
-
-typedef struct wire_cst_payment_hash {
- struct wire_cst_list_prim_u_8_strict *data;
-} wire_cst_payment_hash;
-
-typedef struct wire_cst_address {
- struct wire_cst_list_prim_u_8_strict *s;
-} wire_cst_address;
-
-typedef struct wire_cst_bolt_11_invoice {
- struct wire_cst_list_prim_u_8_strict *signed_raw_invoice;
-} wire_cst_bolt_11_invoice;
-
-typedef struct wire_cst_list_prim_u_8_loose {
- uint8_t *ptr;
- int32_t len;
-} wire_cst_list_prim_u_8_loose;
-
typedef struct wire_cst_list_socket_address {
struct wire_cst_socket_address *ptr;
int32_t len;
} wire_cst_list_socket_address;
+typedef struct wire_cst_public_key {
+ struct wire_cst_list_prim_u_8_strict *hex;
+} wire_cst_public_key;
+
typedef struct wire_cst_list_public_key {
struct wire_cst_public_key *ptr;
int32_t len;
@@ -159,12 +107,12 @@ typedef struct wire_cst_EntropySourceConfig_SeedBytes {
struct wire_cst_list_prim_u_8_strict *field0;
} wire_cst_EntropySourceConfig_SeedBytes;
-typedef struct wire_cst_mnemonic_base {
+typedef struct wire_cst_ldk_mnemonic {
struct wire_cst_list_prim_u_8_strict *seed_phrase;
-} wire_cst_mnemonic_base;
+} wire_cst_ldk_mnemonic;
typedef struct wire_cst_EntropySourceConfig_Bip39Mnemonic {
- struct wire_cst_mnemonic_base *mnemonic;
+ struct wire_cst_ldk_mnemonic *mnemonic;
struct wire_cst_list_prim_u_8_strict *passphrase;
} wire_cst_EntropySourceConfig_Bip39Mnemonic;
@@ -192,46 +140,64 @@ typedef struct wire_cst_gossip_source_config {
union GossipSourceConfigKind kind;
} wire_cst_gossip_source_config;
-typedef struct wire_cst_record_socket_address_public_key_opt_string {
- struct wire_cst_socket_address field0;
- struct wire_cst_public_key field1;
- struct wire_cst_list_prim_u_8_strict *field2;
-} wire_cst_record_socket_address_public_key_opt_string;
-
-typedef struct wire_cst_liquidity_source_config {
- struct wire_cst_record_socket_address_public_key_opt_string lsps2_service;
-} wire_cst_liquidity_source_config;
+typedef struct wire_cst_ldk_node {
+ uintptr_t ptr;
+} wire_cst_ldk_node;
typedef struct wire_cst_channel_id {
struct wire_cst_list_prim_u_8_strict *data;
} wire_cst_channel_id;
-typedef struct wire_cst_ClosureReason_CounterpartyForceClosed {
- struct wire_cst_list_prim_u_8_strict *peer_msg;
-} wire_cst_ClosureReason_CounterpartyForceClosed;
+typedef struct wire_cst_MaxDustHTLCExposure_FixedLimitMsat {
+ uint64_t field0;
+} wire_cst_MaxDustHTLCExposure_FixedLimitMsat;
-typedef struct wire_cst_ClosureReason_ProcessingError {
- struct wire_cst_list_prim_u_8_strict *err;
-} wire_cst_ClosureReason_ProcessingError;
+typedef struct wire_cst_MaxDustHTLCExposure_FeeRateMultiplier {
+ uint64_t field0;
+} wire_cst_MaxDustHTLCExposure_FeeRateMultiplier;
-typedef union ClosureReasonKind {
- struct wire_cst_ClosureReason_CounterpartyForceClosed CounterpartyForceClosed;
- struct wire_cst_ClosureReason_ProcessingError ProcessingError;
-} ClosureReasonKind;
+typedef union MaxDustHTLCExposureKind {
+ struct wire_cst_MaxDustHTLCExposure_FixedLimitMsat FixedLimitMsat;
+ struct wire_cst_MaxDustHTLCExposure_FeeRateMultiplier FeeRateMultiplier;
+} MaxDustHTLCExposureKind;
-typedef struct wire_cst_closure_reason {
+typedef struct wire_cst_max_dust_htlc_exposure {
int32_t tag;
- union ClosureReasonKind kind;
-} wire_cst_closure_reason;
+ union MaxDustHTLCExposureKind kind;
+} wire_cst_max_dust_htlc_exposure;
+
+typedef struct wire_cst_channel_config {
+ uint32_t forwarding_fee_proportional_millionths;
+ uint32_t forwarding_fee_base_msat;
+ uint16_t cltv_expiry_delta;
+ struct wire_cst_max_dust_htlc_exposure max_dust_htlc_exposure;
+ uint64_t force_close_avoidance_max_fee_satoshis;
+ bool accept_underpaying_htlcs;
+} wire_cst_channel_config;
+
+typedef struct wire_cst_payment_hash {
+ struct wire_cst_list_prim_u_8_strict *data;
+} wire_cst_payment_hash;
+
+typedef struct wire_cst_address {
+ struct wire_cst_list_prim_u_8_strict *s;
+} wire_cst_address;
+
+typedef struct wire_cst_bolt_11_invoice {
+ struct wire_cst_list_prim_u_8_strict *signed_raw_invoice;
+} wire_cst_bolt_11_invoice;
+
+typedef struct wire_cst_list_prim_u_8_loose {
+ uint8_t *ptr;
+ int32_t len;
+} wire_cst_list_prim_u_8_loose;
typedef struct wire_cst_Event_PaymentSuccessful {
struct wire_cst_payment_hash *payment_hash;
- uint64_t *fee_paid_msat;
} wire_cst_Event_PaymentSuccessful;
typedef struct wire_cst_Event_PaymentFailed {
struct wire_cst_payment_hash *payment_hash;
- int32_t *reason;
} wire_cst_Event_PaymentFailed;
typedef struct wire_cst_Event_PaymentReceived {
@@ -239,6 +205,22 @@ typedef struct wire_cst_Event_PaymentReceived {
uint64_t amount_msat;
} wire_cst_Event_PaymentReceived;
+typedef struct wire_cst_user_channel_id {
+ uint64_t data;
+} wire_cst_user_channel_id;
+
+typedef struct wire_cst_Event_ChannelReady {
+ struct wire_cst_channel_id *channel_id;
+ struct wire_cst_user_channel_id *user_channel_id;
+ struct wire_cst_public_key *counterparty_node_id;
+} wire_cst_Event_ChannelReady;
+
+typedef struct wire_cst_Event_ChannelClosed {
+ struct wire_cst_channel_id *channel_id;
+ struct wire_cst_user_channel_id *user_channel_id;
+ struct wire_cst_public_key *counterparty_node_id;
+} wire_cst_Event_ChannelClosed;
+
typedef struct wire_cst_txid {
struct wire_cst_list_prim_u_8_strict *hash;
} wire_cst_txid;
@@ -256,26 +238,13 @@ typedef struct wire_cst_Event_ChannelPending {
struct wire_cst_out_point *funding_txo;
} wire_cst_Event_ChannelPending;
-typedef struct wire_cst_Event_ChannelReady {
- struct wire_cst_channel_id *channel_id;
- struct wire_cst_user_channel_id *user_channel_id;
- struct wire_cst_public_key *counterparty_node_id;
-} wire_cst_Event_ChannelReady;
-
-typedef struct wire_cst_Event_ChannelClosed {
- struct wire_cst_channel_id *channel_id;
- struct wire_cst_user_channel_id *user_channel_id;
- struct wire_cst_public_key *counterparty_node_id;
- struct wire_cst_closure_reason *reason;
-} wire_cst_Event_ChannelClosed;
-
typedef union EventKind {
struct wire_cst_Event_PaymentSuccessful PaymentSuccessful;
struct wire_cst_Event_PaymentFailed PaymentFailed;
struct wire_cst_Event_PaymentReceived PaymentReceived;
- struct wire_cst_Event_ChannelPending ChannelPending;
struct wire_cst_Event_ChannelReady ChannelReady;
struct wire_cst_Event_ChannelClosed ChannelClosed;
+ struct wire_cst_Event_ChannelPending ChannelPending;
} EventKind;
typedef struct wire_cst_event {
@@ -303,11 +272,12 @@ typedef struct wire_cst_payment_details {
typedef struct wire_cst_channel_details {
struct wire_cst_channel_id channel_id;
struct wire_cst_public_key counterparty_node_id;
- struct wire_cst_out_point *funding_txo;
+ struct wire_cst_list_prim_u_8_strict *funding_txo;
uint64_t channel_value_sats;
uint64_t *unspendable_punishment_reserve;
struct wire_cst_user_channel_id user_channel_id;
uint32_t feerate_sat_per_1000_weight;
+ uint64_t balance_msat;
uint64_t outbound_capacity_msat;
uint64_t inbound_capacity_msat;
uint32_t *confirmations_required;
@@ -316,19 +286,6 @@ typedef struct wire_cst_channel_details {
bool is_channel_ready;
bool is_usable;
bool is_public;
- uint16_t *cltv_expiry_delta;
- uint64_t counterparty_unspendable_punishment_reserve;
- uint64_t *counterparty_outbound_htlc_minimum_msat;
- uint64_t *counterparty_outbound_htlc_maximum_msat;
- uint32_t *counterparty_forwarding_info_fee_base_msat;
- uint32_t *counterparty_forwarding_info_fee_proportional_millionths;
- uint16_t *counterparty_forwarding_info_cltv_expiry_delta;
- uint64_t next_outbound_htlc_limit_msat;
- uint64_t next_outbound_htlc_minimum_msat;
- uint16_t *force_close_spend_delay;
- uint64_t inbound_htlc_minimum_msat;
- uint64_t *inbound_htlc_maximum_msat;
- struct wire_cst_channel_config config;
} wire_cst_channel_details;
typedef struct wire_cst_list_channel_details {
@@ -336,69 +293,6 @@ typedef struct wire_cst_list_channel_details {
int32_t len;
} wire_cst_list_channel_details;
-typedef struct wire_cst_LightningBalance_ClaimableOnChannelClose {
- struct wire_cst_channel_id *channel_id;
- struct wire_cst_public_key *counterparty_node_id;
- uint64_t amount_satoshis;
-} wire_cst_LightningBalance_ClaimableOnChannelClose;
-
-typedef struct wire_cst_LightningBalance_ClaimableAwaitingConfirmations {
- struct wire_cst_channel_id *channel_id;
- struct wire_cst_public_key *counterparty_node_id;
- uint64_t amount_satoshis;
- uint32_t confirmation_height;
-} wire_cst_LightningBalance_ClaimableAwaitingConfirmations;
-
-typedef struct wire_cst_LightningBalance_ContentiousClaimable {
- struct wire_cst_channel_id *channel_id;
- struct wire_cst_public_key *counterparty_node_id;
- uint64_t amount_satoshis;
- uint32_t timeout_height;
- struct wire_cst_payment_hash *payment_hash;
- struct wire_cst_payment_preimage *payment_preimage;
-} wire_cst_LightningBalance_ContentiousClaimable;
-
-typedef struct wire_cst_LightningBalance_MaybeTimeoutClaimableHTLC {
- struct wire_cst_channel_id *channel_id;
- struct wire_cst_public_key *counterparty_node_id;
- uint64_t amount_satoshis;
- uint32_t claimable_height;
- struct wire_cst_payment_hash *payment_hash;
-} wire_cst_LightningBalance_MaybeTimeoutClaimableHTLC;
-
-typedef struct wire_cst_LightningBalance_MaybePreimageClaimableHTLC {
- struct wire_cst_channel_id *channel_id;
- struct wire_cst_public_key *counterparty_node_id;
- uint64_t amount_satoshis;
- uint32_t expiry_height;
- struct wire_cst_payment_hash *payment_hash;
-} wire_cst_LightningBalance_MaybePreimageClaimableHTLC;
-
-typedef struct wire_cst_LightningBalance_CounterpartyRevokedOutputClaimable {
- struct wire_cst_channel_id *channel_id;
- struct wire_cst_public_key *counterparty_node_id;
- uint64_t amount_satoshis;
-} wire_cst_LightningBalance_CounterpartyRevokedOutputClaimable;
-
-typedef union LightningBalanceKind {
- struct wire_cst_LightningBalance_ClaimableOnChannelClose ClaimableOnChannelClose;
- struct wire_cst_LightningBalance_ClaimableAwaitingConfirmations ClaimableAwaitingConfirmations;
- struct wire_cst_LightningBalance_ContentiousClaimable ContentiousClaimable;
- struct wire_cst_LightningBalance_MaybeTimeoutClaimableHTLC MaybeTimeoutClaimableHTLC;
- struct wire_cst_LightningBalance_MaybePreimageClaimableHTLC MaybePreimageClaimableHTLC;
- struct wire_cst_LightningBalance_CounterpartyRevokedOutputClaimable CounterpartyRevokedOutputClaimable;
-} LightningBalanceKind;
-
-typedef struct wire_cst_lightning_balance {
- int32_t tag;
- union LightningBalanceKind kind;
-} wire_cst_lightning_balance;
-
-typedef struct wire_cst_list_lightning_balance {
- struct wire_cst_lightning_balance *ptr;
- int32_t len;
-} wire_cst_list_lightning_balance;
-
typedef struct wire_cst_list_payment_details {
struct wire_cst_payment_details *ptr;
int32_t len;
@@ -415,221 +309,153 @@ typedef struct wire_cst_list_peer_details {
int32_t len;
} wire_cst_list_peer_details;
-typedef struct wire_cst_PendingSweepBalance_PendingBroadcast {
- struct wire_cst_channel_id *channel_id;
- uint64_t amount_satoshis;
-} wire_cst_PendingSweepBalance_PendingBroadcast;
-
-typedef struct wire_cst_PendingSweepBalance_BroadcastAwaitingConfirmation {
- struct wire_cst_channel_id *channel_id;
- uint32_t latest_broadcast_height;
- struct wire_cst_txid *latest_spending_txid;
- uint64_t amount_satoshis;
-} wire_cst_PendingSweepBalance_BroadcastAwaitingConfirmation;
+void frbgen_ldk_node_wire_build_with_sqlite_store(int64_t port_,
+ struct wire_cst_config *config,
+ struct wire_cst_chain_data_source_config *chain_data_source_config,
+ struct wire_cst_entropy_source_config *entropy_source_config,
+ struct wire_cst_gossip_source_config *gossip_source_config);
-typedef struct wire_cst_PendingSweepBalance_AwaitingThresholdConfirmations {
- struct wire_cst_channel_id *channel_id;
- struct wire_cst_txid *latest_spending_txid;
- struct wire_cst_list_prim_u_8_strict *confirmation_hash;
- uint32_t confirmation_height;
- uint64_t amount_satoshis;
-} wire_cst_PendingSweepBalance_AwaitingThresholdConfirmations;
-
-typedef union PendingSweepBalanceKind {
- struct wire_cst_PendingSweepBalance_PendingBroadcast PendingBroadcast;
- struct wire_cst_PendingSweepBalance_BroadcastAwaitingConfirmation BroadcastAwaitingConfirmation;
- struct wire_cst_PendingSweepBalance_AwaitingThresholdConfirmations AwaitingThresholdConfirmations;
-} PendingSweepBalanceKind;
-
-typedef struct wire_cst_pending_sweep_balance {
- int32_t tag;
- union PendingSweepBalanceKind kind;
-} wire_cst_pending_sweep_balance;
+void frbgen_ldk_node_wire_ldk_mnemonic_generate(int64_t port_);
-typedef struct wire_cst_list_pending_sweep_balance {
- struct wire_cst_pending_sweep_balance *ptr;
- int32_t len;
-} wire_cst_list_pending_sweep_balance;
-
-typedef struct wire_cst_balance_details {
- uint64_t total_onchain_balance_sats;
- uint64_t spendable_onchain_balance_sats;
- uint64_t total_lightning_balance_sats;
- struct wire_cst_list_lightning_balance *lightning_balances;
- struct wire_cst_list_pending_sweep_balance *pending_balances_from_channel_closures;
-} wire_cst_balance_details;
-
-typedef struct wire_cst_best_block {
- struct wire_cst_list_prim_u_8_strict *block_hash;
- uint32_t height;
-} wire_cst_best_block;
-
-typedef struct wire_cst_node_status {
- bool is_running;
- bool is_listening;
- struct wire_cst_best_block current_best_block;
- uint64_t *latest_wallet_sync_timestamp;
- uint64_t *latest_onchain_wallet_sync_timestamp;
- uint64_t *latest_fee_rate_cache_update_timestamp;
- uint64_t *latest_rgs_snapshot_timestamp;
- uint64_t *latest_node_announcement_broadcast_timestamp;
-} wire_cst_node_status;
-
-void frbgen_ldk_node_wire_MnemonicBase_generate(int64_t port_);
-
-void frbgen_ldk_node_wire_NodeBase_close_channel(int64_t port_,
- struct wire_cst_node_base *that,
- struct wire_cst_user_channel_id *user_channel_id,
+void frbgen_ldk_node_wire_ldk_node_close_channel(int64_t port_,
+ struct wire_cst_ldk_node *that,
+ struct wire_cst_channel_id *channel_id,
struct wire_cst_public_key *counterparty_node_id);
-void frbgen_ldk_node_wire_NodeBase_config(int64_t port_, struct wire_cst_node_base *that);
-
-void frbgen_ldk_node_wire_NodeBase_connect(int64_t port_,
- struct wire_cst_node_base *that,
+void frbgen_ldk_node_wire_ldk_node_connect(int64_t port_,
+ struct wire_cst_ldk_node *that,
struct wire_cst_public_key *node_id,
struct wire_cst_socket_address *address,
bool persist);
-void frbgen_ldk_node_wire_NodeBase_connect_open_channel(int64_t port_,
- struct wire_cst_node_base *that,
- struct wire_cst_socket_address *address,
+void frbgen_ldk_node_wire_ldk_node_connect_open_channel(int64_t port_,
+ struct wire_cst_ldk_node *that,
+ struct wire_cst_socket_address *socket_address,
struct wire_cst_public_key *node_id,
uint64_t channel_amount_sats,
uint64_t *push_to_counterparty_msat,
bool announce_channel,
struct wire_cst_channel_config *channel_config);
-void frbgen_ldk_node_wire_NodeBase_disconnect(int64_t port_,
- struct wire_cst_node_base *that,
+void frbgen_ldk_node_wire_ldk_node_disconnect(int64_t port_,
+ struct wire_cst_ldk_node *that,
struct wire_cst_public_key *counterparty_node_id);
-void frbgen_ldk_node_wire_NodeBase_event_handled(int64_t port_, struct wire_cst_node_base *that);
+void frbgen_ldk_node_wire_ldk_node_event_handled(int64_t port_, struct wire_cst_ldk_node *that);
-void frbgen_ldk_node_wire_NodeBase_list_balances(int64_t port_, struct wire_cst_node_base *that);
+void frbgen_ldk_node_wire_ldk_node_is_running(int64_t port_, struct wire_cst_ldk_node *that);
-void frbgen_ldk_node_wire_NodeBase_list_channels(int64_t port_, struct wire_cst_node_base *that);
+void frbgen_ldk_node_wire_ldk_node_list_channels(int64_t port_, struct wire_cst_ldk_node *that);
-void frbgen_ldk_node_wire_NodeBase_list_payments(int64_t port_, struct wire_cst_node_base *that);
+void frbgen_ldk_node_wire_ldk_node_list_payments(int64_t port_, struct wire_cst_ldk_node *that);
-void frbgen_ldk_node_wire_NodeBase_list_payments_with_filter(int64_t port_,
- struct wire_cst_node_base *that,
+void frbgen_ldk_node_wire_ldk_node_list_payments_with_filter(int64_t port_,
+ struct wire_cst_ldk_node *that,
int32_t payment_direction);
-void frbgen_ldk_node_wire_NodeBase_list_peers(int64_t port_, struct wire_cst_node_base *that);
+void frbgen_ldk_node_wire_ldk_node_list_peers(int64_t port_, struct wire_cst_ldk_node *that);
-void frbgen_ldk_node_wire_NodeBase_listening_addresses(int64_t port_,
- struct wire_cst_node_base *that);
+void frbgen_ldk_node_wire_ldk_node_listening_addresses(int64_t port_,
+ struct wire_cst_ldk_node *that);
-void frbgen_ldk_node_wire_NodeBase_new_onchain_address(int64_t port_,
- struct wire_cst_node_base *that);
+void frbgen_ldk_node_wire_ldk_node_new_onchain_address(int64_t port_,
+ struct wire_cst_ldk_node *that);
-void frbgen_ldk_node_wire_NodeBase_next_event(int64_t port_, struct wire_cst_node_base *that);
+void frbgen_ldk_node_wire_ldk_node_next_event(int64_t port_, struct wire_cst_ldk_node *that);
-void frbgen_ldk_node_wire_NodeBase_next_event_async(int64_t port_, struct wire_cst_node_base *that);
+void frbgen_ldk_node_wire_ldk_node_node_id(int64_t port_, struct wire_cst_ldk_node *that);
-void frbgen_ldk_node_wire_NodeBase_node_id(int64_t port_, struct wire_cst_node_base *that);
-
-void frbgen_ldk_node_wire_NodeBase_payment(int64_t port_,
- struct wire_cst_node_base *that,
+void frbgen_ldk_node_wire_ldk_node_payment(int64_t port_,
+ struct wire_cst_ldk_node *that,
struct wire_cst_payment_hash *payment_hash);
-void frbgen_ldk_node_wire_NodeBase_receive_payment(int64_t port_,
- struct wire_cst_node_base *that,
+void frbgen_ldk_node_wire_ldk_node_receive_payment(int64_t port_,
+ struct wire_cst_ldk_node *that,
uint64_t amount_msat,
struct wire_cst_list_prim_u_8_strict *description,
uint32_t expiry_secs);
-void frbgen_ldk_node_wire_NodeBase_receive_payment_via_jit_channel(int64_t port_,
- struct wire_cst_node_base *that,
- uint64_t amount_msat,
- struct wire_cst_list_prim_u_8_strict *description,
- uint32_t expiry_secs,
- uint64_t *max_total_lsp_fee_limit_msat);
-
-void frbgen_ldk_node_wire_NodeBase_receive_variable_amount_payment(int64_t port_,
- struct wire_cst_node_base *that,
+void frbgen_ldk_node_wire_ldk_node_receive_variable_amount_payment(int64_t port_,
+ struct wire_cst_ldk_node *that,
struct wire_cst_list_prim_u_8_strict *description,
uint32_t expiry_secs);
-void frbgen_ldk_node_wire_NodeBase_receive_variable_amount_payment_via_jit_channel(int64_t port_,
- struct wire_cst_node_base *that,
- struct wire_cst_list_prim_u_8_strict *description,
- uint32_t expiry_secs,
- uint64_t *max_proportional_lsp_fee_limit_ppm_msat);
-
-void frbgen_ldk_node_wire_NodeBase_remove_payment(int64_t port_,
- struct wire_cst_node_base *that,
+void frbgen_ldk_node_wire_ldk_node_remove_payment(int64_t port_,
+ struct wire_cst_ldk_node *that,
struct wire_cst_payment_hash *payment_hash);
-void frbgen_ldk_node_wire_NodeBase_send_all_to_onchain_address(int64_t port_,
- struct wire_cst_node_base *that,
+void frbgen_ldk_node_wire_ldk_node_send_all_to_onchain_address(int64_t port_,
+ struct wire_cst_ldk_node *that,
struct wire_cst_address *address);
-void frbgen_ldk_node_wire_NodeBase_send_payment(int64_t port_,
- struct wire_cst_node_base *that,
+void frbgen_ldk_node_wire_ldk_node_send_payment(int64_t port_,
+ struct wire_cst_ldk_node *that,
struct wire_cst_bolt_11_invoice *invoice);
-void frbgen_ldk_node_wire_NodeBase_send_payment_probes(int64_t port_,
- struct wire_cst_node_base *that,
+void frbgen_ldk_node_wire_ldk_node_send_payment_probes(int64_t port_,
+ struct wire_cst_ldk_node *that,
struct wire_cst_bolt_11_invoice *invoice);
-void frbgen_ldk_node_wire_NodeBase_send_payment_probes_using_amount(int64_t port_,
- struct wire_cst_node_base *that,
+void frbgen_ldk_node_wire_ldk_node_send_payment_probes_using_amount(int64_t port_,
+ struct wire_cst_ldk_node *that,
struct wire_cst_bolt_11_invoice *invoice,
uint64_t amount_msat);
-void frbgen_ldk_node_wire_NodeBase_send_payment_using_amount(int64_t port_,
- struct wire_cst_node_base *that,
+void frbgen_ldk_node_wire_ldk_node_send_payment_using_amount(int64_t port_,
+ struct wire_cst_ldk_node *that,
struct wire_cst_bolt_11_invoice *invoice,
uint64_t amount_msat);
-void frbgen_ldk_node_wire_NodeBase_send_spontaneous_payment(int64_t port_,
- struct wire_cst_node_base *that,
+void frbgen_ldk_node_wire_ldk_node_send_spontaneous_payment(int64_t port_,
+ struct wire_cst_ldk_node *that,
uint64_t amount_msat,
struct wire_cst_public_key *node_id);
-void frbgen_ldk_node_wire_NodeBase_send_spontaneous_payment_probes(int64_t port_,
- struct wire_cst_node_base *that,
+void frbgen_ldk_node_wire_ldk_node_send_spontaneous_payment_probes(int64_t port_,
+ struct wire_cst_ldk_node *that,
uint64_t amount_msat,
struct wire_cst_public_key *node_id);
-void frbgen_ldk_node_wire_NodeBase_send_to_onchain_address(int64_t port_,
- struct wire_cst_node_base *that,
+void frbgen_ldk_node_wire_ldk_node_send_to_onchain_address(int64_t port_,
+ struct wire_cst_ldk_node *that,
struct wire_cst_address *address,
uint64_t amount_sats);
-void frbgen_ldk_node_wire_NodeBase_sign_message(int64_t port_,
- struct wire_cst_node_base *that,
+void frbgen_ldk_node_wire_ldk_node_sign_message(int64_t port_,
+ struct wire_cst_ldk_node *that,
struct wire_cst_list_prim_u_8_loose *msg);
-void frbgen_ldk_node_wire_NodeBase_start(int64_t port_, struct wire_cst_node_base *that);
+void frbgen_ldk_node_wire_ldk_node_spendable_onchain_balance_sats(int64_t port_,
+ struct wire_cst_ldk_node *that);
-void frbgen_ldk_node_wire_NodeBase_status(int64_t port_, struct wire_cst_node_base *that);
+void frbgen_ldk_node_wire_ldk_node_start(int64_t port_, struct wire_cst_ldk_node *that);
-void frbgen_ldk_node_wire_NodeBase_stop(int64_t port_, struct wire_cst_node_base *that);
+void frbgen_ldk_node_wire_ldk_node_stop(int64_t port_, struct wire_cst_ldk_node *that);
-void frbgen_ldk_node_wire_NodeBase_sync_wallets(int64_t port_, struct wire_cst_node_base *that);
+void frbgen_ldk_node_wire_ldk_node_sync_wallets(int64_t port_, struct wire_cst_ldk_node *that);
-void frbgen_ldk_node_wire_NodeBase_update_channel_config(int64_t port_,
- struct wire_cst_node_base *that,
- struct wire_cst_user_channel_id *user_channel_id,
+void frbgen_ldk_node_wire_ldk_node_total_onchain_balance_sats(int64_t port_,
+ struct wire_cst_ldk_node *that);
+
+void frbgen_ldk_node_wire_ldk_node_update_channel_config(int64_t port_,
+ struct wire_cst_ldk_node *that,
+ struct wire_cst_channel_id *channel_id,
struct wire_cst_public_key *counterparty_node_id,
struct wire_cst_channel_config *channel_config);
-void frbgen_ldk_node_wire_NodeBase_verify_signature(int64_t port_,
- struct wire_cst_node_base *that,
+void frbgen_ldk_node_wire_ldk_node_verify_signature(int64_t port_,
+ struct wire_cst_ldk_node *that,
struct wire_cst_list_prim_u_8_loose *msg,
struct wire_cst_list_prim_u_8_strict *sig,
struct wire_cst_public_key *pkey);
-void frbgen_ldk_node_wire_NodeBase_wait_next_event(int64_t port_, struct wire_cst_node_base *that);
+void frbgen_ldk_node_wire_ldk_node_wait_next_event(int64_t port_, struct wire_cst_ldk_node *that);
+
+void frbgen_ldk_node_wire_socket_address_as_string(int64_t port_,
+ struct wire_cst_socket_address *that);
-void frbgen_ldk_node_wire_finalize_builder(int64_t port_,
- struct wire_cst_config *config,
- struct wire_cst_chain_data_source_config *chain_data_source_config,
- struct wire_cst_entropy_source_config *entropy_source_config,
- struct wire_cst_gossip_source_config *gossip_source_config,
- struct wire_cst_liquidity_source_config *liquidity_source_config);
+void frbgen_ldk_node_wire_socket_address_from_str(int64_t port_,
+ struct wire_cst_list_prim_u_8_strict *address);
void frbgen_ldk_node_rust_arc_increment_strong_count_RustOpaque_NodeSqliteStore(const void *ptr);
@@ -645,8 +471,6 @@ struct wire_cst_channel_config *frbgen_ldk_node_cst_new_box_autoadd_channel_conf
struct wire_cst_channel_id *frbgen_ldk_node_cst_new_box_autoadd_channel_id(void);
-struct wire_cst_closure_reason *frbgen_ldk_node_cst_new_box_autoadd_closure_reason(void);
-
struct wire_cst_config *frbgen_ldk_node_cst_new_box_autoadd_config(void);
struct wire_cst_entropy_source_config *frbgen_ldk_node_cst_new_box_autoadd_entropy_source_config(void);
@@ -655,20 +479,14 @@ struct wire_cst_event *frbgen_ldk_node_cst_new_box_autoadd_event(void);
struct wire_cst_gossip_source_config *frbgen_ldk_node_cst_new_box_autoadd_gossip_source_config(void);
-struct wire_cst_liquidity_source_config *frbgen_ldk_node_cst_new_box_autoadd_liquidity_source_config(void);
-
-struct wire_cst_max_dust_htlc_exposure *frbgen_ldk_node_cst_new_box_autoadd_max_dust_htlc_exposure(void);
-
-struct wire_cst_mnemonic_base *frbgen_ldk_node_cst_new_box_autoadd_mnemonic_base(void);
+struct wire_cst_ldk_mnemonic *frbgen_ldk_node_cst_new_box_autoadd_ldk_mnemonic(void);
-struct wire_cst_node_base *frbgen_ldk_node_cst_new_box_autoadd_node_base(void);
+struct wire_cst_ldk_node *frbgen_ldk_node_cst_new_box_autoadd_ldk_node(void);
struct wire_cst_out_point *frbgen_ldk_node_cst_new_box_autoadd_out_point(void);
struct wire_cst_payment_details *frbgen_ldk_node_cst_new_box_autoadd_payment_details(void);
-int32_t *frbgen_ldk_node_cst_new_box_autoadd_payment_failure_reason(int32_t value);
-
struct wire_cst_payment_hash *frbgen_ldk_node_cst_new_box_autoadd_payment_hash(void);
struct wire_cst_payment_preimage *frbgen_ldk_node_cst_new_box_autoadd_payment_preimage(void);
@@ -679,10 +497,6 @@ struct wire_cst_public_key *frbgen_ldk_node_cst_new_box_autoadd_public_key(void)
struct wire_cst_socket_address *frbgen_ldk_node_cst_new_box_autoadd_socket_address(void);
-struct wire_cst_txid *frbgen_ldk_node_cst_new_box_autoadd_txid(void);
-
-uint16_t *frbgen_ldk_node_cst_new_box_autoadd_u_16(uint16_t value);
-
uint32_t *frbgen_ldk_node_cst_new_box_autoadd_u_32(uint32_t value);
uint64_t *frbgen_ldk_node_cst_new_box_autoadd_u_64(uint64_t value);
@@ -691,14 +505,10 @@ struct wire_cst_user_channel_id *frbgen_ldk_node_cst_new_box_autoadd_user_channe
struct wire_cst_list_channel_details *frbgen_ldk_node_cst_new_list_channel_details(int32_t len);
-struct wire_cst_list_lightning_balance *frbgen_ldk_node_cst_new_list_lightning_balance(int32_t len);
-
struct wire_cst_list_payment_details *frbgen_ldk_node_cst_new_list_payment_details(int32_t len);
struct wire_cst_list_peer_details *frbgen_ldk_node_cst_new_list_peer_details(int32_t len);
-struct wire_cst_list_pending_sweep_balance *frbgen_ldk_node_cst_new_list_pending_sweep_balance(int32_t len);
-
struct wire_cst_list_prim_u_8_loose *frbgen_ldk_node_cst_new_list_prim_u_8_loose(int32_t len);
struct wire_cst_list_prim_u_8_strict *frbgen_ldk_node_cst_new_list_prim_u_8_strict(int32_t len);
@@ -713,79 +523,70 @@ static int64_t dummy_method_to_enforce_bundling(void) {
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_chain_data_source_config);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_channel_config);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_channel_id);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_closure_reason);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_config);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_entropy_source_config);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_event);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_gossip_source_config);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_liquidity_source_config);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_max_dust_htlc_exposure);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_mnemonic_base);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_node_base);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_ldk_mnemonic);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_ldk_node);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_out_point);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_payment_details);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_payment_failure_reason);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_payment_hash);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_payment_preimage);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_payment_secret);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_public_key);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_socket_address);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_txid);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_u_16);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_u_32);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_u_64);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_box_autoadd_user_channel_id);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_list_channel_details);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_list_lightning_balance);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_list_payment_details);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_list_peer_details);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_list_pending_sweep_balance);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_list_prim_u_8_loose);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_list_prim_u_8_strict);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_list_public_key);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_cst_new_list_socket_address);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_rust_arc_decrement_strong_count_RustOpaque_NodeSqliteStore);
dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_rust_arc_increment_strong_count_RustOpaque_NodeSqliteStore);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_MnemonicBase_generate);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_close_channel);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_config);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_connect);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_connect_open_channel);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_disconnect);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_event_handled);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_list_balances);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_list_channels);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_list_payments);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_list_payments_with_filter);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_list_peers);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_listening_addresses);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_new_onchain_address);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_next_event);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_next_event_async);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_node_id);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_payment);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_receive_payment);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_receive_payment_via_jit_channel);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_receive_variable_amount_payment);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_receive_variable_amount_payment_via_jit_channel);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_remove_payment);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_send_all_to_onchain_address);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_send_payment);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_send_payment_probes);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_send_payment_probes_using_amount);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_send_payment_using_amount);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_send_spontaneous_payment);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_send_spontaneous_payment_probes);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_send_to_onchain_address);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_sign_message);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_start);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_status);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_stop);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_sync_wallets);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_update_channel_config);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_verify_signature);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_NodeBase_wait_next_event);
- dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_finalize_builder);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_build_with_sqlite_store);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_mnemonic_generate);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_close_channel);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_connect);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_connect_open_channel);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_disconnect);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_event_handled);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_is_running);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_list_channels);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_list_payments);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_list_payments_with_filter);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_list_peers);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_listening_addresses);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_new_onchain_address);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_next_event);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_node_id);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_payment);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_receive_payment);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_receive_variable_amount_payment);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_remove_payment);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_send_all_to_onchain_address);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_send_payment);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_send_payment_probes);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_send_payment_probes_using_amount);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_send_payment_using_amount);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_send_spontaneous_payment);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_send_spontaneous_payment_probes);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_send_to_onchain_address);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_sign_message);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_spendable_onchain_balance_sats);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_start);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_stop);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_sync_wallets);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_total_onchain_balance_sats);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_update_channel_config);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_verify_signature);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_ldk_node_wait_next_event);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_socket_address_as_string);
+ dummy_var ^= ((int64_t) (void*) frbgen_ldk_node_wire_socket_address_from_str);
dummy_var ^= ((int64_t) (void*) store_dart_post_cobject);
return dummy_var;
}
diff --git a/lib/ldk_node.dart b/lib/ldk_node.dart
index 1fa2c80..8bae749 100644
--- a/lib/ldk_node.dart
+++ b/lib/ldk_node.dart
@@ -25,4 +25,4 @@ export './src/generated/api/types.dart'
EntropySourceConfig_SeedFile;
export 'src/root.dart';
export 'src/utils/utils.dart'
- hide ExceptionBase, mapBuilderError, mapNodeBaseError, Frb;
+ hide LdkException, mapBuilderException, mapNodeException, Frb;
diff --git a/lib/src/generated/api/error.dart b/lib/src/generated/api/error.dart
index 1bd5ddc..f9b1e46 100644
--- a/lib/src/generated/api/error.dart
+++ b/lib/src/generated/api/error.dart
@@ -1,12 +1,12 @@
// This file is automatically generated, so please do not edit it.
-// Generated by `flutter_rust_bridge`@ 2.0.0-dev.28.
+// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31.
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
import '../frb_generated.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
-enum BuilderError {
+enum BuilderException {
socketAddressParseError,
/// The given seed bytes are invalid, e.g., have invalid length.
@@ -22,7 +22,7 @@ enum BuilderError {
invalidChannelMonitor,
/// The given listening addresses are invalid, e.g. too many were passed.
- invalidListeningAddresses,
+ invalidListeningAddress,
/// We failed to read data from the [`KVStore`].
readFailed,
@@ -41,9 +41,12 @@ enum BuilderError {
/// We failed to setup the logger.
loggerSetupFailed,
+ invalidTrustedPeer,
}
-enum NodeBaseError {
+enum NodeException {
+ invalidTxid,
+
/// Returned when trying to start [Node] while it is already running.
alreadyRunning,
@@ -131,7 +134,4 @@ enum NodeBaseError {
/// There are insufficient funds to complete the given operation.
insufficientFunds,
feerateEstimationUpdateFailed,
- liquidityRequestFailed,
- liquiditySourceUnavailable,
- liquidityFeeTooHigh,
}
diff --git a/lib/src/generated/api/node.dart b/lib/src/generated/api/node.dart
index aa6d743..20d548f 100644
--- a/lib/src/generated/api/node.dart
+++ b/lib/src/generated/api/node.dart
@@ -1,5 +1,5 @@
// This file is automatically generated, so please do not edit it.
-// Generated by `flutter_rust_bridge`@ 2.0.0-dev.28.
+// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31.
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
@@ -9,19 +9,17 @@ import 'package:collection/collection.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
import 'types.dart';
-Future finalizeBuilder(
+Future buildWithSqliteStore(
{required Config config,
ChainDataSourceConfig? chainDataSourceConfig,
EntropySourceConfig? entropySourceConfig,
GossipSourceConfig? gossipSourceConfig,
- LiquiditySourceConfig? liquiditySourceConfig,
dynamic hint}) =>
- LdkCore.instance.api.finalizeBuilder(
+ LdkCore.instance.api.buildWithSqliteStore(
config: config,
chainDataSourceConfig: chainDataSourceConfig,
entropySourceConfig: entropySourceConfig,
gossipSourceConfig: gossipSourceConfig,
- liquiditySourceConfig: liquiditySourceConfig,
hint: hint);
// Rust type: RustOpaqueNom>
@@ -43,15 +41,15 @@ class NodeSqliteStore extends RustOpaque {
);
}
-class MnemonicBase {
+class LdkMnemonic {
final String seedPhrase;
- const MnemonicBase({
+ const LdkMnemonic({
required this.seedPhrase,
});
- static Future generate({dynamic hint}) =>
- LdkCore.instance.api.mnemonicBaseGenerate(hint: hint);
+ static Future generate({dynamic hint}) =>
+ LdkCore.instance.api.ldkMnemonicGenerate(hint: hint);
@override
int get hashCode => seedPhrase.hashCode;
@@ -59,305 +57,213 @@ class MnemonicBase {
@override
bool operator ==(Object other) =>
identical(this, other) ||
- other is MnemonicBase &&
+ other is LdkMnemonic &&
runtimeType == other.runtimeType &&
seedPhrase == other.seedPhrase;
}
-class NodeBase {
+class LdkNode {
final NodeSqliteStore ptr;
- const NodeBase({
+ const LdkNode({
required this.ptr,
});
Future closeChannel(
- {required UserChannelId userChannelId,
+ {required ChannelId channelId,
required PublicKey counterpartyNodeId,
dynamic hint}) =>
- LdkCore.instance.api.nodeBaseCloseChannel(
- that: this,
- userChannelId: userChannelId,
- counterpartyNodeId: counterpartyNodeId,
- );
-
- Future config({dynamic hint}) => LdkCore.instance.api.nodeBaseConfig(
- that: this,
- );
+ LdkCore.instance.api.ldkNodeCloseChannel(
+ that: this,
+ channelId: channelId,
+ counterpartyNodeId: counterpartyNodeId,
+ hint: hint);
Future connect(
{required PublicKey nodeId,
required SocketAddress address,
required bool persist,
dynamic hint}) =>
- LdkCore.instance.api.nodeBaseConnect(
- that: this,
- nodeId: nodeId,
- address: address,
- persist: persist,
- );
-
- Future connectOpenChannel(
- {required SocketAddress address,
+ LdkCore.instance.api.ldkNodeConnect(
+ that: this,
+ nodeId: nodeId,
+ address: address,
+ persist: persist,
+ hint: hint);
+
+ Future connectOpenChannel(
+ {required SocketAddress socketAddress,
required PublicKey nodeId,
required int channelAmountSats,
int? pushToCounterpartyMsat,
required bool announceChannel,
ChannelConfig? channelConfig,
dynamic hint}) =>
- LdkCore.instance.api.nodeBaseConnectOpenChannel(
- that: this,
- address: address,
- nodeId: nodeId,
- channelAmountSats: channelAmountSats,
- pushToCounterpartyMsat: pushToCounterpartyMsat,
- announceChannel: announceChannel,
- channelConfig: channelConfig,
- );
+ LdkCore.instance.api.ldkNodeConnectOpenChannel(
+ that: this,
+ socketAddress: socketAddress,
+ nodeId: nodeId,
+ channelAmountSats: channelAmountSats,
+ pushToCounterpartyMsat: pushToCounterpartyMsat,
+ announceChannel: announceChannel,
+ channelConfig: channelConfig,
+ hint: hint);
Future disconnect(
{required PublicKey counterpartyNodeId, dynamic hint}) =>
- LdkCore.instance.api.nodeBaseDisconnect(
- that: this,
- counterpartyNodeId: counterpartyNodeId,
- );
+ LdkCore.instance.api.ldkNodeDisconnect(
+ that: this, counterpartyNodeId: counterpartyNodeId, hint: hint);
Future eventHandled({dynamic hint}) =>
- LdkCore.instance.api.nodeBaseEventHandled(
- that: this,
- );
+ LdkCore.instance.api.ldkNodeEventHandled(that: this, hint: hint);
- Future listBalances({dynamic hint}) =>
- LdkCore.instance.api.nodeBaseListBalances(
- that: this,
- );
+ Future isRunning({dynamic hint}) =>
+ LdkCore.instance.api.ldkNodeIsRunning(that: this, hint: hint);
Future> listChannels({dynamic hint}) =>
- LdkCore.instance.api.nodeBaseListChannels(
- that: this,
- );
+ LdkCore.instance.api.ldkNodeListChannels(that: this, hint: hint);
Future> listPayments({dynamic hint}) =>
- LdkCore.instance.api.nodeBaseListPayments(
- that: this,
- );
+ LdkCore.instance.api.ldkNodeListPayments(that: this, hint: hint);
Future> listPaymentsWithFilter(
{required PaymentDirection paymentDirection, dynamic hint}) =>
- LdkCore.instance.api.nodeBaseListPaymentsWithFilter(
- that: this,
- paymentDirection: paymentDirection,
- );
+ LdkCore.instance.api.ldkNodeListPaymentsWithFilter(
+ that: this, paymentDirection: paymentDirection, hint: hint);
Future> listPeers({dynamic hint}) =>
- LdkCore.instance.api.nodeBaseListPeers(
- that: this,
- );
+ LdkCore.instance.api.ldkNodeListPeers(that: this, hint: hint);
Future?> listeningAddresses({dynamic hint}) =>
- LdkCore.instance.api.nodeBaseListeningAddresses(
- that: this,
- );
+ LdkCore.instance.api.ldkNodeListeningAddresses(that: this, hint: hint);
Future newOnchainAddress({dynamic hint}) =>
- LdkCore.instance.api.nodeBaseNewOnchainAddress(
- that: this,
- );
+ LdkCore.instance.api.ldkNodeNewOnchainAddress(that: this, hint: hint);
Future nextEvent({dynamic hint}) =>
- LdkCore.instance.api.nodeBaseNextEvent(
- that: this,
- );
-
- Future nextEventAsync({dynamic hint}) =>
- LdkCore.instance.api.nodeBaseNextEventAsync(
- that: this,
- );
+ LdkCore.instance.api.ldkNodeNextEvent(that: this, hint: hint);
Future nodeId({dynamic hint}) =>
- LdkCore.instance.api.nodeBaseNodeId(
- that: this,
- );
+ LdkCore.instance.api.ldkNodeNodeId(that: this, hint: hint);
Future payment(
{required PaymentHash paymentHash, dynamic hint}) =>
- LdkCore.instance.api.nodeBasePayment(
- that: this,
- paymentHash: paymentHash,
- );
+ LdkCore.instance.api
+ .ldkNodePayment(that: this, paymentHash: paymentHash, hint: hint);
Future receivePayment(
{required int amountMsat,
required String description,
required int expirySecs,
dynamic hint}) =>
- LdkCore.instance.api.nodeBaseReceivePayment(
- that: this,
- amountMsat: amountMsat,
- description: description,
- expirySecs: expirySecs,
- );
-
- Future receivePaymentViaJitChannel(
- {required int amountMsat,
- required String description,
- required int expirySecs,
- int? maxTotalLspFeeLimitMsat,
- dynamic hint}) =>
- LdkCore.instance.api.nodeBaseReceivePaymentViaJitChannel(
- that: this,
- amountMsat: amountMsat,
- description: description,
- expirySecs: expirySecs,
- maxTotalLspFeeLimitMsat: maxTotalLspFeeLimitMsat,
- );
+ LdkCore.instance.api.ldkNodeReceivePayment(
+ that: this,
+ amountMsat: amountMsat,
+ description: description,
+ expirySecs: expirySecs,
+ hint: hint);
Future receiveVariableAmountPayment(
{required String description,
required int expirySecs,
dynamic hint}) =>
- LdkCore.instance.api.nodeBaseReceiveVariableAmountPayment(
- that: this,
- description: description,
- expirySecs: expirySecs,
- );
-
- Future receiveVariableAmountPaymentViaJitChannel(
- {required String description,
- required int expirySecs,
- int? maxProportionalLspFeeLimitPpmMsat,
- dynamic hint}) =>
- LdkCore.instance.api.nodeBaseReceiveVariableAmountPaymentViaJitChannel(
- that: this,
- description: description,
- expirySecs: expirySecs,
- maxProportionalLspFeeLimitPpmMsat: maxProportionalLspFeeLimitPpmMsat,
- );
+ LdkCore.instance.api.ldkNodeReceiveVariableAmountPayment(
+ that: this,
+ description: description,
+ expirySecs: expirySecs,
+ hint: hint);
Future removePayment(
{required PaymentHash paymentHash, dynamic hint}) =>
- LdkCore.instance.api.nodeBaseRemovePayment(
- that: this,
- paymentHash: paymentHash,
- );
+ LdkCore.instance.api.ldkNodeRemovePayment(
+ that: this, paymentHash: paymentHash, hint: hint);
Future sendAllToOnchainAddress(
{required Address address, dynamic hint}) =>
- LdkCore.instance.api.nodeBaseSendAllToOnchainAddress(
- that: this,
- address: address,
- );
+ LdkCore.instance.api.ldkNodeSendAllToOnchainAddress(
+ that: this, address: address, hint: hint);
Future sendPayment(
{required Bolt11Invoice invoice, dynamic hint}) =>
- LdkCore.instance.api.nodeBaseSendPayment(
- that: this,
- invoice: invoice,
- );
+ LdkCore.instance.api
+ .ldkNodeSendPayment(that: this, invoice: invoice, hint: hint);
Future sendPaymentProbes(
{required Bolt11Invoice invoice, dynamic hint}) =>
- LdkCore.instance.api.nodeBaseSendPaymentProbes(
- that: this,
- invoice: invoice,
- );
+ LdkCore.instance.api
+ .ldkNodeSendPaymentProbes(that: this, invoice: invoice, hint: hint);
Future sendPaymentProbesUsingAmount(
{required Bolt11Invoice invoice,
required int amountMsat,
dynamic hint}) =>
- LdkCore.instance.api.nodeBaseSendPaymentProbesUsingAmount(
- that: this,
- invoice: invoice,
- amountMsat: amountMsat,
- );
+ LdkCore.instance.api.ldkNodeSendPaymentProbesUsingAmount(
+ that: this, invoice: invoice, amountMsat: amountMsat, hint: hint);
Future sendPaymentUsingAmount(
{required Bolt11Invoice invoice,
required int amountMsat,
dynamic hint}) =>
- LdkCore.instance.api.nodeBaseSendPaymentUsingAmount(
- that: this,
- invoice: invoice,
- amountMsat: amountMsat,
- );
+ LdkCore.instance.api.ldkNodeSendPaymentUsingAmount(
+ that: this, invoice: invoice, amountMsat: amountMsat, hint: hint);
Future sendSpontaneousPayment(
{required int amountMsat, required PublicKey nodeId, dynamic hint}) =>
- LdkCore.instance.api.nodeBaseSendSpontaneousPayment(
- that: this,
- amountMsat: amountMsat,
- nodeId: nodeId,
- );
+ LdkCore.instance.api.ldkNodeSendSpontaneousPayment(
+ that: this, amountMsat: amountMsat, nodeId: nodeId, hint: hint);
+ ///Sends payment probes over all paths of a route that would be used to pay the given amount to the given node_id.
Future sendSpontaneousPaymentProbes(
{required int amountMsat, required PublicKey nodeId, dynamic hint}) =>
- LdkCore.instance.api.nodeBaseSendSpontaneousPaymentProbes(
- that: this,
- amountMsat: amountMsat,
- nodeId: nodeId,
- );
+ LdkCore.instance.api.ldkNodeSendSpontaneousPaymentProbes(
+ that: this, amountMsat: amountMsat, nodeId: nodeId, hint: hint);
Future sendToOnchainAddress(
{required Address address, required int amountSats, dynamic hint}) =>
- LdkCore.instance.api.nodeBaseSendToOnchainAddress(
- that: this,
- address: address,
- amountSats: amountSats,
- );
+ LdkCore.instance.api.ldkNodeSendToOnchainAddress(
+ that: this, address: address, amountSats: amountSats, hint: hint);
Future signMessage({required List msg, dynamic hint}) =>
- LdkCore.instance.api.nodeBaseSignMessage(
- that: this,
- msg: msg,
- );
+ LdkCore.instance.api.ldkNodeSignMessage(that: this, msg: msg, hint: hint);
- Future start({dynamic hint}) => LdkCore.instance.api.nodeBaseStart(
- that: this,
- );
+ Future spendableOnchainBalanceSats({dynamic hint}) =>
+ LdkCore.instance.api
+ .ldkNodeSpendableOnchainBalanceSats(that: this, hint: hint);
- Future status({dynamic hint}) =>
- LdkCore.instance.api.nodeBaseStatus(
- that: this,
- );
+ Future start({dynamic hint}) =>
+ LdkCore.instance.api.ldkNodeStart(that: this, hint: hint);
- Future stop({dynamic hint}) => LdkCore.instance.api.nodeBaseStop(
- that: this,
- );
+ Future stop({dynamic hint}) =>
+ LdkCore.instance.api.ldkNodeStop(that: this, hint: hint);
Future syncWallets({dynamic hint}) =>
- LdkCore.instance.api.nodeBaseSyncWallets(
- that: this,
- );
+ LdkCore.instance.api.ldkNodeSyncWallets(that: this, hint: hint);
+
+ Future totalOnchainBalanceSats({dynamic hint}) => LdkCore.instance.api
+ .ldkNodeTotalOnchainBalanceSats(that: this, hint: hint);
Future updateChannelConfig(
- {required UserChannelId userChannelId,
+ {required ChannelId channelId,
required PublicKey counterpartyNodeId,
required ChannelConfig channelConfig,
dynamic hint}) =>
- LdkCore.instance.api.nodeBaseUpdateChannelConfig(
- that: this,
- userChannelId: userChannelId,
- counterpartyNodeId: counterpartyNodeId,
- channelConfig: channelConfig,
- );
+ LdkCore.instance.api.ldkNodeUpdateChannelConfig(
+ that: this,
+ channelId: channelId,
+ counterpartyNodeId: counterpartyNodeId,
+ channelConfig: channelConfig,
+ hint: hint);
Future verifySignature(
{required List msg,
required String sig,
required PublicKey pkey,
dynamic hint}) =>
- LdkCore.instance.api.nodeBaseVerifySignature(
- that: this,
- msg: msg,
- sig: sig,
- pkey: pkey,
- );
+ LdkCore.instance.api.ldkNodeVerifySignature(
+ that: this, msg: msg, sig: sig, pkey: pkey, hint: hint);
Future waitNextEvent({dynamic hint}) =>
- LdkCore.instance.api.nodeBaseWaitNextEvent(
- that: this,
- );
+ LdkCore.instance.api.ldkNodeWaitNextEvent(that: this, hint: hint);
@override
int get hashCode => ptr.hashCode;
@@ -365,7 +271,7 @@ class NodeBase {
@override
bool operator ==(Object other) =>
identical(this, other) ||
- other is NodeBase && runtimeType == other.runtimeType && ptr == other.ptr;
+ other is LdkNode && runtimeType == other.runtimeType && ptr == other.ptr;
}
class U8Array12 extends NonGrowableListView {
diff --git a/lib/src/generated/api/types.dart b/lib/src/generated/api/types.dart
index c8a193f..412aae8 100644
--- a/lib/src/generated/api/types.dart
+++ b/lib/src/generated/api/types.dart
@@ -1,9 +1,10 @@
// This file is automatically generated, so please do not edit it.
-// Generated by `flutter_rust_bridge`@ 2.0.0-dev.28.
+// Generated by `flutter_rust_bridge`@ 2.0.0-dev.31.
// ignore_for_file: invalid_use_of_internal_member, unused_import, unnecessary_import
import '../frb_generated.dart';
+import 'error.dart';
import 'node.dart';
import 'package:flutter_rust_bridge/flutter_rust_bridge_for_generated.dart';
import 'package:freezed_annotation/freezed_annotation.dart' hide protected;
@@ -27,91 +28,6 @@ class Address {
other is Address && runtimeType == other.runtimeType && s == other.s;
}
-/// Details of the known available balances returned by [`Node::list_balances`].
-///
-/// [`Node::list_balances`]: crate::Node::list_balances
-class BalanceDetails {
- /// The total balance of our on-chain wallet.
- final int totalOnchainBalanceSats;
-
- /// The currently spendable balance of our on-chain wallet.
- final int spendableOnchainBalanceSats;
-
- /// The total balance that we would be able to claim across all our Lightning channels.
- ///
- /// Note this excludes balances that we are unsure if we are able to claim (e.g., as we are
- final int totalLightningBalanceSats;
-
- /// A detailed list of all known Lightning balances that would be claimable on channel closure.
- ///
- /// Note that less than the listed amounts are spendable over lightning as further reserve
- /// restrictions apply.
- final List lightningBalances;
-
- /// A detailed list of balances currently being swept from the Lightning to the on-chain
- /// wallet.
- ///
- /// These are balances resulting from channel closures that may have been encumbered by a
- /// delay, but are now being claimed and useable once sufficiently confirmed on-chain.
- ///
- /// Note that, depending on the sync status of the wallets, swept balances listed here might or
- /// might not already be accounted for in `totalOnchainBalanceSats`.
- final List pendingBalancesFromChannelClosures;
-
- const BalanceDetails({
- required this.totalOnchainBalanceSats,
- required this.spendableOnchainBalanceSats,
- required this.totalLightningBalanceSats,
- required this.lightningBalances,
- required this.pendingBalancesFromChannelClosures,
- });
-
- @override
- int get hashCode =>
- totalOnchainBalanceSats.hashCode ^
- spendableOnchainBalanceSats.hashCode ^
- totalLightningBalanceSats.hashCode ^
- lightningBalances.hashCode ^
- pendingBalancesFromChannelClosures.hashCode;
-
- @override
- bool operator ==(Object other) =>
- identical(this, other) ||
- other is BalanceDetails &&
- runtimeType == other.runtimeType &&
- totalOnchainBalanceSats == other.totalOnchainBalanceSats &&
- spendableOnchainBalanceSats == other.spendableOnchainBalanceSats &&
- totalLightningBalanceSats == other.totalLightningBalanceSats &&
- lightningBalances == other.lightningBalances &&
- pendingBalancesFromChannelClosures ==
- other.pendingBalancesFromChannelClosures;
-}
-
-/// The best known block as identified by its hash and height.
-class BestBlock {
- /// The block's hash
- final String blockHash;
-
- /// The height at which the block was confirmed.
- final int height;
-
- const BestBlock({
- required this.blockHash,
- required this.height,
- });
-
- @override
- int get hashCode => blockHash.hashCode ^ height.hashCode;
-
- @override
- bool operator ==(Object other) =>
- identical(this, other) ||
- other is BestBlock &&
- runtimeType == other.runtimeType &&
- blockHash == other.blockHash &&
- height == other.height;
-}
-
///Represents a syntactically and semantically correct lightning BOLT11 invoice.
///
class Bolt11Invoice {
@@ -134,6 +50,8 @@ class Bolt11Invoice {
@freezed
sealed class ChainDataSourceConfig with _$ChainDataSourceConfig {
+ const ChainDataSourceConfig._();
+
const factory ChainDataSourceConfig.esplora(
String field0,
) = ChainDataSourceConfig_Esplora;
@@ -161,7 +79,7 @@ class ChannelConfig {
final int cltvExpiryDelta;
/// Options for how to set the max dust HTLC exposure allowed on a channel.
- final MaxDustHTLCExposure? maxDustHtlcExposure;
+ final MaxDustHTLCExposure maxDustHtlcExposure;
///The additional fee we’re willing to pay to avoid waiting for the counterparty’s toSelfDelay to reclaim funds.
///
@@ -175,13 +93,15 @@ class ChannelConfig {
final int forceCloseAvoidanceMaxFeeSatoshis;
///If set, allows this channel's counterparty to skim an additional fee off this node's inbound HTLCs. Useful for liquidity providers to offload on-chain channel costs to end users.
+ /// Usage:
+ /// The payee will set this option and set its invoice route hints to use intercept scids generated by this channel's counterparty.
final bool acceptUnderpayingHtlcs;
const ChannelConfig({
required this.forwardingFeeProportionalMillionths,
required this.forwardingFeeBaseMsat,
required this.cltvExpiryDelta,
- this.maxDustHtlcExposure,
+ required this.maxDustHtlcExposure,
required this.forceCloseAvoidanceMaxFeeSatoshis,
required this.acceptUnderpayingHtlcs,
});
@@ -210,145 +130,117 @@ class ChannelConfig {
acceptUnderpayingHtlcs == other.acceptUnderpayingHtlcs;
}
+/// Details of a channel, as returned by node.listChannels()
+///
class ChannelDetails {
- /// The channel ID (prior to funding transaction generation, this is a random 32-byte
- /// identifier, afterwards this is the transaction ID of the funding transaction XOR the
- /// funding transaction output).
- ///
+ /// The channel's ID (prior to funding transaction generation, this is a random 32 bytes,
+ /// thereafter this is the txid of the funding transaction xor the funding transaction output).
/// Note that this means this value is *not* persistent - it can change once during the
/// lifetime of the channel.
+ ///
final ChannelId channelId;
- /// The node ID of our the channel's counterparty.
+ ///The node ID of our the channel’s counterparty.
final PublicKey counterpartyNodeId;
- /// The channel's funding transaction output, if we've negotiated the funding transaction with
+ /// The Channel's funding transaction output, if we've negotiated the funding transaction with
/// our counterparty already.
- final OutPoint? fundingTxo;
+ ///
+ final String? fundingTxo;
- /// The value, in satoshis, of this channel as it appears in the funding output.
+ ///The value, in satoshis, of this channel as it appears in the funding output.
final int channelValueSats;
- /// The value, in satoshis, that must always be held as a reserve in the channel for us. This
- /// value ensures that if we broadcast a revoked state, our counterparty can punish us by
- /// claiming at least this value on chain.
+ /// The value, in satoshis, that must always be held in the channel for us. This value ensures
+ /// that if we broadcast a revoked state, our counterparty can punish us by claiming at least
+ /// this value on chain.
///
- /// This value is not included in `outboundCapacityMsat` as it can never be spent.
+ /// This value is not included in `outbound_capacity_msat` as it can never be spent.
///
- /// This value will be `None` for outbound channels until the counterparty accepts the channel.
+ /// This value will be null for outbound channels until the counterparty accepts the channel.
///
final int? unspendablePunishmentReserve;
- /// The local `user_channel_id` of this channel.
+ /// The userChannelId passed in to create_channel, or a random value if the channel was
+ /// inbound. This may be zero for inbound channels serialized with LDK versions prior to
+ /// 0.0.113.
+ ///
final UserChannelId userChannelId;
/// The currently negotiated fee rate denominated in satoshi per 1000 weight units,
/// which is applied to commitment and HTLC transactions.
+ ///
+ /// This value will be null for objects serialized with LDK versions prior to 0.0.115.
+ ///
final int feerateSatPer1000Weight;
- /// The available outbound capacity for sending HTLCs to the remote peer.
+ /// Our total balance. This is the amount we would get if we close the channel.
+ /// This value is not exact. Due to various in-flight changes and feerate changes, exactly this
+ /// amount is not likely to be recoverable on close.
///
- /// The amount does not include any pending HTLCs which are not yet resolved (and, thus, whose
+ /// This does not include any pending HTLCs which are not yet fully resolved (and, thus, whose
/// balance is not available for inclusion in new outbound HTLCs). This further does not include
/// any pending outgoing HTLCs which are awaiting some other resolution to be sent.
+ /// This does not consider any on-chain fees.
+ ///
+ final int balanceMsat;
+
+ /// The available outbound capacity for sending HTLCs to the remote peer. This does not include
+ /// any pending HTLCs which are not yet fully resolved (and, thus, whose balance is not
+ /// available for inclusion in new outbound HTLCs). This further does not include any pending
+ /// outgoing HTLCs which are awaiting some other resolution to be sent.
+ ///
+ /// This value is not exact. Due to various in-flight changes, feerate changes, and our
+ /// conflict-avoidance policy, exactly this amount is not likely to be spendable. However, we
+ /// should be able to spend nearly this amount.
+ ///
final int outboundCapacityMsat;
- /// The available outbound capacity for sending HTLCs to the remote peer.
+ /// The available inbound capacity for the remote peer to send HTLCs to us. This does not
+ /// include any pending HTLCs which are not yet fully resolved (and, thus, whose balance is not
+ /// available for inclusion in new inbound HTLCs).
+ /// Note that there are some corner cases not fully handled here, so the actual available
+ /// inbound capacity may be slightly higher than this.
+ ///
+ /// This value is not exact. Due to various in-flight changes, feerate changes, and our
+ /// counterparty's conflict-avoidance policy, exactly this amount is not likely to be spendable.
+ /// However, our counterparty should be able to spend nearly this amount.
///
- /// The amount does not include any pending HTLCs which are not yet resolved
- /// (and, thus, whose balance is not available for inclusion in new inbound HTLCs). This further
- /// does not include any pending outgoing HTLCs which are awaiting some other resolution to be
- /// sent.
final int inboundCapacityMsat;
- /// The number of required confirmations on the funding transactions before the funding is
- /// considered "locked". The amount is selected by the channel fundee.
+ /// The number of required confirmations on the funding transaction before the funding will be
+ /// considered "locked". This number is selected by the channel fundee, and can be selected for inbound channels with
+ /// This value will be null for outbound channels until the counterparty accepts the channel.
///
- /// The value will be `None` for outbound channels until the counterparty accepts the channel.
final int? confirmationsRequired;
/// The current number of confirmations on the funding transaction.
+ ///
+ /// This value will be `None` for objects serialized with LDK versions prior to 0.0.113.
+ ///
final int? confirmations;
- /// Returns `true` if the channel was initiated (and therefore funded) by us.
+ /// True if the channel was initiated (and thus funded) by us.
+ ///
final bool isOutbound;
- /// Returns `true` if both parties have exchanged `channel_ready` messages, and the channel is
- /// not currently being shut down. Both parties exchange `channel_ready` messages upon
- /// independently verifying that the required confirmations count provided by
- /// `confirmations_required` has been reached.
- final bool isChannelReady;
-
- /// Returns `true` if the channel (a) `channel_ready` messages have been exchanged, (b) the
- /// peer is connected, and (c) the channel is not currently negotiating shutdown.
+ /// True if the channel is confirmed, channelReady messages have been exchanged, and the
+ /// channel is not currently being shut down. `channelReady` message exchange implies the
+ /// required confirmation count has been reached (and we were connected to the peer at some
+ /// point after the funding transaction received enough confirmations). The required
///
- /// This is a strict superset of `is_channel_ready`.
- final bool isUsable;
-
- /// Returns `true` if this channel is (or will be) publicly-announced
- final bool isPublic;
-
- /// The difference in the CLTV value between incoming HTLCs and an outbound HTLC forwarded over
- /// the channel.
- final int? cltvExpiryDelta;
+ final bool isChannelReady;
- /// The value, in satoshis, that must always be held in the channel for our counterparty. This
- /// value ensures that if our counterparty broadcasts a revoked state, we can punish them by
- /// claiming at least this value on chain.
+ /// True if the channel is (a) confirmed and channelReady messages have been exchanged, (b)
+ /// the peer is connected, and (c) the channel is not currently negotiating a shutdown.
///
- /// This value is not included in [`inbound_capacity_msat`] as it can never be spent.
+ /// This is a strict superset of `isChannelReady`.
///
- /// [`inbound_capacity_msat`]: ChannelDetails::inbound_capacity_msat
- final int counterpartyUnspendablePunishmentReserve;
+ final bool isUsable;
- /// The smallest value HTLC (in msat) the remote peer will accept, for this channel.
+ /// True if this channel is (or will be) publicly-announced.
///
- /// This field is only `None` before we have received either the `OpenChannel` or
- /// `AcceptChannel` message from the remote peer.
- final int? counterpartyOutboundHtlcMinimumMsat;
-
- /// The largest value HTLC (in msat) the remote peer currently will accept, for this channel.
- final int? counterpartyOutboundHtlcMaximumMsat;
-
- /// Base routing fee in millisatoshis.
- final int? counterpartyForwardingInfoFeeBaseMsat;
-
- /// Proportional fee, in millionths of a satoshi the channel will charge per transferred satoshi.
- final int? counterpartyForwardingInfoFeeProportionalMillionths;
-
- /// The minimum difference in CLTV expiry between an ingoing HTLC and its outgoing counterpart,
- /// such that the outgoing HTLC is forwardable to this counterparty.
- final int? counterpartyForwardingInfoCltvExpiryDelta;
-
- /// The available outbound capacity for sending a single HTLC to the remote peer. This is
- /// similar to `channelDetails.outboundCapacityMsat` but it may be further restricted by
- /// the current state and per-HTLC limit(s). This is intended for use when routing, allowing us
- /// to use a limit as close as possible to the HTLC limit we can currently send.
- final int nextOutboundHtlcLimitMsat;
-
- /// The minimum value for sending a single HTLC to the remote peer. This is the equivalent of
- /// `channelDetails.nextOutboundHtlcLimitMsat` but represents a lower-bound, rather than
- /// an upper-bound. This is intended for use when routing, allowing us to ensure we pick a
- /// route which is valid.
- final int nextOutboundHtlcMinimumMsat;
-
- /// The number of blocks (after our commitment transaction confirms) that we will need to wait
- /// until we can claim our funds after we force-close the channel. During this time our
- /// counterparty is allowed to punish us if we broadcasted a stale state. If our counterparty
- /// force-closes the channel and broadcasts a commitment transaction we do not have to wait any
- /// time to claim our non-HTLC-encumbered funds.
- ///
- /// This value will be `None` for outbound channels until the counterparty accepts the channel.
- final int? forceCloseSpendDelay;
-
- /// The smallest value HTLC (in msat) we will accept, for this channel.
- final int inboundHtlcMinimumMsat;
-
- /// The largest value HTLC (in msat) we currently will accept, for this channel.
- final int? inboundHtlcMaximumMsat;
-
- /// Set of configurable parameters that affect channel operation.
- final ChannelConfig config;
+ final bool isPublic;
const ChannelDetails({
required this.channelId,
@@ -358,6 +250,7 @@ class ChannelDetails {
this.unspendablePunishmentReserve,
required this.userChannelId,
required this.feerateSatPer1000Weight,
+ required this.balanceMsat,
required this.outboundCapacityMsat,
required this.inboundCapacityMsat,
this.confirmationsRequired,
@@ -366,19 +259,6 @@ class ChannelDetails {
required this.isChannelReady,
required this.isUsable,
required this.isPublic,
- this.cltvExpiryDelta,
- required this.counterpartyUnspendablePunishmentReserve,
- this.counterpartyOutboundHtlcMinimumMsat,
- this.counterpartyOutboundHtlcMaximumMsat,
- this.counterpartyForwardingInfoFeeBaseMsat,
- this.counterpartyForwardingInfoFeeProportionalMillionths,
- this.counterpartyForwardingInfoCltvExpiryDelta,
- required this.nextOutboundHtlcLimitMsat,
- required this.nextOutboundHtlcMinimumMsat,
- this.forceCloseSpendDelay,
- required this.inboundHtlcMinimumMsat,
- this.inboundHtlcMaximumMsat,
- required this.config,
});
@override
@@ -390,6 +270,7 @@ class ChannelDetails {
unspendablePunishmentReserve.hashCode ^
userChannelId.hashCode ^
feerateSatPer1000Weight.hashCode ^
+ balanceMsat.hashCode ^
outboundCapacityMsat.hashCode ^
inboundCapacityMsat.hashCode ^
confirmationsRequired.hashCode ^
@@ -397,20 +278,7 @@ class ChannelDetails {
isOutbound.hashCode ^
isChannelReady.hashCode ^
isUsable.hashCode ^
- isPublic.hashCode ^
- cltvExpiryDelta.hashCode ^
- counterpartyUnspendablePunishmentReserve.hashCode ^
- counterpartyOutboundHtlcMinimumMsat.hashCode ^
- counterpartyOutboundHtlcMaximumMsat.hashCode ^
- counterpartyForwardingInfoFeeBaseMsat.hashCode ^
- counterpartyForwardingInfoFeeProportionalMillionths.hashCode ^
- counterpartyForwardingInfoCltvExpiryDelta.hashCode ^
- nextOutboundHtlcLimitMsat.hashCode ^
- nextOutboundHtlcMinimumMsat.hashCode ^
- forceCloseSpendDelay.hashCode ^
- inboundHtlcMinimumMsat.hashCode ^
- inboundHtlcMaximumMsat.hashCode ^
- config.hashCode;
+ isPublic.hashCode;
@override
bool operator ==(Object other) =>
@@ -424,6 +292,7 @@ class ChannelDetails {
unspendablePunishmentReserve == other.unspendablePunishmentReserve &&
userChannelId == other.userChannelId &&
feerateSatPer1000Weight == other.feerateSatPer1000Weight &&
+ balanceMsat == other.balanceMsat &&
outboundCapacityMsat == other.outboundCapacityMsat &&
inboundCapacityMsat == other.inboundCapacityMsat &&
confirmationsRequired == other.confirmationsRequired &&
@@ -431,26 +300,7 @@ class ChannelDetails {
isOutbound == other.isOutbound &&
isChannelReady == other.isChannelReady &&
isUsable == other.isUsable &&
- isPublic == other.isPublic &&
- cltvExpiryDelta == other.cltvExpiryDelta &&
- counterpartyUnspendablePunishmentReserve ==
- other.counterpartyUnspendablePunishmentReserve &&
- counterpartyOutboundHtlcMinimumMsat ==
- other.counterpartyOutboundHtlcMinimumMsat &&
- counterpartyOutboundHtlcMaximumMsat ==
- other.counterpartyOutboundHtlcMaximumMsat &&
- counterpartyForwardingInfoFeeBaseMsat ==
- other.counterpartyForwardingInfoFeeBaseMsat &&
- counterpartyForwardingInfoFeeProportionalMillionths ==
- other.counterpartyForwardingInfoFeeProportionalMillionths &&
- counterpartyForwardingInfoCltvExpiryDelta ==
- other.counterpartyForwardingInfoCltvExpiryDelta &&
- nextOutboundHtlcLimitMsat == other.nextOutboundHtlcLimitMsat &&
- nextOutboundHtlcMinimumMsat == other.nextOutboundHtlcMinimumMsat &&
- forceCloseSpendDelay == other.forceCloseSpendDelay &&
- inboundHtlcMinimumMsat == other.inboundHtlcMinimumMsat &&
- inboundHtlcMaximumMsat == other.inboundHtlcMaximumMsat &&
- config == other.config;
+ isPublic == other.isPublic;
}
/// The global identifier of a channel.
@@ -477,77 +327,6 @@ class ChannelId {
data == other.data;
}
-@freezed
-sealed class ClosureReason with _$ClosureReason {
- /// Closure generated from receiving a peer error message.
- ///
- /// Our counterparty may have broadcasted their latest commitment state, and we have
- /// as well.
- const factory ClosureReason.counterpartyForceClosed({
- /// The error which the peer sent us.
- ///
- /// Be careful about printing the peer_msg, a well-crafted message could exploit
- /// a security vulnerability in the terminal emulator or the logging subsystem.
- /// To be safe, use `Display` on `UntrustedString`
- ///
- /// [`UntrustedString`]: crate::util::string::UntrustedString
- required String peerMsg,
- }) = ClosureReason_CounterpartyForceClosed;
-
- /// Closure generated from `ChannelManager.force_close_channel`, called by the user.
- ///
- const factory ClosureReason.holderForceClosed() =
- ClosureReason_HolderForceClosed;
-
- /// The channel was closed after negotiating a cooperative close and we've now broadcasted
- /// the cooperative close transaction. Note the shutdown may have been initiated by us.
- const factory ClosureReason.cooperativeClosure() =
- ClosureReason_CooperativeClosure;
-
- /// A commitment transaction was confirmed on chain, closing the channel. Most likely this
- /// commitment transaction came from our counterparty, but it may also have come from
- /// a copy of our own `ChannelMonitor`.
- const factory ClosureReason.commitmentTxConfirmed() =
- ClosureReason_CommitmentTxConfirmed;
-
- /// The funding transaction failed to confirm in a timely manner on an inbound channel.
- const factory ClosureReason.fundingTimedOut() = ClosureReason_FundingTimedOut;
-
- /// Closure generated from processing an event, likely a HTLC forward/relay/reception.
- const factory ClosureReason.processingError({
- /// A developer-readable error message which we generated.
- required String err,
- }) = ClosureReason_ProcessingError;
-
- /// The peer disconnected prior to funding completing. In this case the spec mandates that we
- /// forget the channel entirely - we can attempt again if the peer reconnects.
- ///
- /// This includes cases where we restarted prior to funding completion, including prior to the
- /// initial `ChannelMonitor` persistence completing.
- ///
- /// In LDK versions prior to 0.0.107 this could also occur if we were unable to connect to the
- /// peer because of mutual incompatibility between us and our channel counterparty.
- ///
- const factory ClosureReason.disconnectedPeer() =
- ClosureReason_DisconnectedPeer;
-
- /// Closure generated from `channelManager.read` if the `ChannelMonitor` is newer than
- /// the `ChannelManager` deserialized.
- ///
- const factory ClosureReason.outdatedChannelManager() =
- ClosureReason_OutdatedChannelManager;
-
- /// The counterparty requested a cooperative close of a channel that had not been funded yet.
- /// The channel has been immediately closed.
- const factory ClosureReason.counterpartyCoopClosedUnfundedChannel() =
- ClosureReason_CounterpartyCoopClosedUnfundedChannel;
-
- /// Another channel in the same funding batch closed before the funding transaction
- /// was ready to be broadcast.
- const factory ClosureReason.fundingBatchClosure() =
- ClosureReason_FundingBatchClosure;
-}
-
/// Represents the configuration of an [Node] instance.
///
class Config {
@@ -642,6 +421,8 @@ class Config {
@freezed
sealed class EntropySourceConfig with _$EntropySourceConfig {
+ const EntropySourceConfig._();
+
const factory EntropySourceConfig.seedFile(
String field0,
) = EntropySourceConfig_SeedFile;
@@ -649,31 +430,25 @@ sealed class EntropySourceConfig with _$EntropySourceConfig {
U8Array64 field0,
) = EntropySourceConfig_SeedBytes;
const factory EntropySourceConfig.bip39Mnemonic({
- required MnemonicBase mnemonic,
+ required LdkMnemonic mnemonic,
String? passphrase,
}) = EntropySourceConfig_Bip39Mnemonic;
}
@freezed
sealed class Event with _$Event {
+ const Event._();
+
/// A sent payment was successful.
const factory Event.paymentSuccessful({
/// The hash of the payment.
required PaymentHash paymentHash,
-
- /// The total fee which was spent at intermediate hops in this payment.
- int? feePaidMsat,
}) = Event_PaymentSuccessful;
/// A sent payment has failed.
const factory Event.paymentFailed({
/// The hash of the payment.
required PaymentHash paymentHash,
-
- /// The reason why the payment failed.
- ///
- /// This will be `None` for events serialized by LDK Node v0.2.1 and prior.
- PaymentFailureReason? reason,
}) = Event_PaymentFailed;
/// A payment has been received.
@@ -685,207 +460,53 @@ sealed class Event with _$Event {
required int amountMsat,
}) = Event_PaymentReceived;
- /// A channel has been created and is pending confirmation on-chain.
- const factory Event.channelPending({
- /// The `channel_id` of the channel.
- required ChannelId channelId,
-
- /// The `user_channel_id` of the channel.
- required UserChannelId userChannelId,
-
- /// The `temporary_channel_id` this channel used to be known by during channel establishment.
- required ChannelId formerTemporaryChannelId,
-
- /// The `node_id` of the channel counterparty.
- required PublicKey counterpartyNodeId,
-
- /// The outpoint of the channel's funding transaction.
- required OutPoint fundingTxo,
- }) = Event_ChannelPending;
-
/// A channel is ready to be used.
const factory Event.channelReady({
- /// The `channel_id` of the channel.
+ /// The channel_id of the channel.
required ChannelId channelId,
- /// The `user_channel_id` of the channel.
+ /// The user_channel_id of the channel.
required UserChannelId userChannelId,
-
- /// The `node_id` of the channel counterparty.
- ///
- /// This will be `None` for events serialized by LDK Node v0.1.0 and prior.
PublicKey? counterpartyNodeId,
}) = Event_ChannelReady;
/// A channel has been closed.
const factory Event.channelClosed({
- /// The `channel_id` of the channel.
+ /// The channel_id of the channel.
required ChannelId channelId,
- /// The `user_channel_id` of the channel.
+ /// The user_channel_id of the channel.
required UserChannelId userChannelId,
-
- /// The `node_id` of the channel counterparty.
- ///
- /// This will be `None` for events serialized by LDK Node v0.1.0 and prior.
PublicKey? counterpartyNodeId,
-
- /// This will be `None` for events serialized by LDK Node v0.2.1 and prior.
- ClosureReason? reason,
}) = Event_ChannelClosed;
-}
-
-@freezed
-sealed class GossipSourceConfig with _$GossipSourceConfig {
- const factory GossipSourceConfig.p2PNetwork() = GossipSourceConfig_P2PNetwork;
- const factory GossipSourceConfig.rapidGossipSync(
- String field0,
- ) = GossipSourceConfig_RapidGossipSync;
-}
-@freezed
-sealed class LightningBalance with _$LightningBalance {
- /// The channel is not yet closed (or the commitment or closing transaction has not yet
- /// appeared in a block). The given balance is claimable (less on-chain fees) if the channel is
- /// force-closed now.
- const factory LightningBalance.claimableOnChannelClose({
- /// The identifier of the channel this balance belongs to.
- required ChannelId channelId,
-
- /// The identifier of our channel counterparty.
- required PublicKey counterpartyNodeId,
-
- /// The amount available to claim, in satoshis, excluding the on-chain fees which will be
- /// required to do so.
- required int amountSatoshis,
- }) = LightningBalance_ClaimableOnChannelClose;
-
- /// The channel has been closed, and the given balance is ours but awaiting confirmations until
- /// we consider it spendable.
- const factory LightningBalance.claimableAwaitingConfirmations({
- /// The identifier of the channel this balance belongs to.
- required ChannelId channelId,
-
- /// The identifier of our channel counterparty.
- required PublicKey counterpartyNodeId,
-
- /// The amount available to claim, in satoshis, possibly excluding the on-chain fees which
- /// were spent in broadcasting the transaction.
- required int amountSatoshis,
-
- /// The height at which an [`Event::SpendableOutputs`] event will be generated for this
- /// amount.
- ///
- /// [`Event::SpendableOutputs`]: lightning::events::Event::SpendableOutputs
- required int confirmationHeight,
- }) = LightningBalance_ClaimableAwaitingConfirmations;
-
- /// The channel has been closed, and the given balance should be ours but awaiting spending
- /// transaction confirmation. If the spending transaction does not confirm in time, it is
- /// possible our counterparty can take the funds by broadcasting an HTLC timeout on-chain.
- ///
- /// Once the spending transaction confirms, before it has reached enough confirmations to be
- /// considered safe from chain reorganizations, the balance will instead be provided via
- /// `lightningBalance.claimableAwaitingConfirmations`.
- const factory LightningBalance.contentiousClaimable({
- /// The identifier of the channel this balance belongs to.
- required ChannelId channelId,
-
- /// The identifier of our channel counterparty.
- required PublicKey counterpartyNodeId,
-
- /// The amount available to claim, in satoshis, excluding the on-chain fees which will be
- /// required to do so.
- required int amountSatoshis,
-
- /// The height at which the counterparty may be able to claim the balance if we have not
- /// done so.
- required int timeoutHeight,
-
- /// The payment hash that locks this HTLC.
- required PaymentHash paymentHash,
-
- /// The preimage that can be used to claim this HTLC.
- required PaymentPreimage paymentPreimage,
- }) = LightningBalance_ContentiousClaimable;
-
- /// HTLCs which we sent to our counterparty which are claimable after a timeout (less on-chain
- /// fees) if the counterparty does not know the preimage for the HTLCs. These are somewhat
- /// likely to be claimed by our counterparty before we do.
- const factory LightningBalance.maybeTimeoutClaimableHtlc({
- /// The identifier of the channel this balance belongs to.
- required ChannelId channelId,
-
- /// The identifier of our channel counterparty.
- required PublicKey counterpartyNodeId,
-
- /// The amount potentially available to claim, in satoshis, excluding the on-chain fees
- /// which will be required to do so.
- required int amountSatoshis,
-
- /// The height at which we will be able to claim the balance if our counterparty has not
- /// done so.
- required int claimableHeight,
-
- /// The payment hash whose preimage our counterparty needs to claim this HTLC.
- required PaymentHash paymentHash,
- }) = LightningBalance_MaybeTimeoutClaimableHTLC;
-
- /// HTLCs which we received from our counterparty which are claimable with a preimage which we
- /// do not currently have. This will only be claimable if we receive the preimage from the node
- /// to which we forwarded this HTLC before the timeout.
- const factory LightningBalance.maybePreimageClaimableHtlc({
- /// The identifier of the channel this balance belongs to.
+ /// A channel has been created and is pending confirmation on-chain.
+ const factory Event.channelPending({
+ /// The channel_id of the channel.
required ChannelId channelId,
- /// The identifier of our channel counterparty.
- required PublicKey counterpartyNodeId,
-
- /// The amount potentially available to claim, in satoshis, excluding the on-chain fees
- /// which will be required to do so.
- required int amountSatoshis,
-
- /// The height at which our counterparty will be able to claim the balance if we have not
- /// yet received the preimage and claimed it ourselves.
- required int expiryHeight,
-
- /// The payment hash whose preimage we need to claim this HTLC.
- required PaymentHash paymentHash,
- }) = LightningBalance_MaybePreimageClaimableHTLC;
+ /// The user_channel_id of the channel.
+ required UserChannelId userChannelId,
- /// The channel has been closed, and our counterparty broadcasted a revoked commitment
- /// transaction.
- ///
- /// Thus, we're able to claim all outputs in the commitment transaction, one of which has the
- /// following amount.
- const factory LightningBalance.counterpartyRevokedOutputClaimable({
- /// The identifier of the channel this balance belongs to.
- required ChannelId channelId,
+ /// The temporary_channel_id this channel used to be known by during channel establishment.
+ required ChannelId formerTemporaryChannelId,
- /// The identifier of our channel counterparty.
+ /// The node_id of the channel counterparty.
required PublicKey counterpartyNodeId,
- /// The amount, in satoshis, of the output which we can claim.
- required int amountSatoshis,
- }) = LightningBalance_CounterpartyRevokedOutputClaimable;
+ /// The outpoint of the channel's funding transaction.
+ required OutPoint fundingTxo,
+ }) = Event_ChannelPending;
}
-class LiquiditySourceConfig {
- final (SocketAddress, PublicKey, String?) lsps2Service;
-
- const LiquiditySourceConfig({
- required this.lsps2Service,
- });
-
- @override
- int get hashCode => lsps2Service.hashCode;
+@freezed
+sealed class GossipSourceConfig with _$GossipSourceConfig {
+ const GossipSourceConfig._();
- @override
- bool operator ==(Object other) =>
- identical(this, other) ||
- other is LiquiditySourceConfig &&
- runtimeType == other.runtimeType &&
- lsps2Service == other.lsps2Service;
+ const factory GossipSourceConfig.p2PNetwork() = GossipSourceConfig_P2PNetwork;
+ const factory GossipSourceConfig.rapidGossipSync(
+ String field0,
+ ) = GossipSourceConfig_RapidGossipSync;
}
/// An enum representing the available verbosity levels of the logger.
@@ -918,6 +539,8 @@ enum LogLevel {
@freezed
sealed class MaxDustHTLCExposure with _$MaxDustHTLCExposure {
+ const MaxDustHTLCExposure._();
+
///This sets a fixed limit on the total dust exposure in millisatoshis. Setting this too low may prevent the sending or receipt of low-value HTLCs on high-traffic nodes, however this limit is very important to prevent stealing of large amounts of dust HTLCs by miners through fee griefing attacks.
const factory MaxDustHTLCExposure.fixedLimitMsat(
int field0,
@@ -949,88 +572,6 @@ enum Network {
regtest,
}
-/// Represents the status of the [Node].
-class NodeStatus {
- /// Indicates whether the [Node] is running.
- final bool isRunning;
-
- /// Indicates whether the [Node] is listening for incoming connections on the addresses
- /// configured via `config.listeningAddresses`.
- final bool isListening;
-
- /// The best block to which our Lightning wallet is currently synced.
- final BestBlock currentBestBlock;
-
- /// The timestamp, in seconds since start of the UNIX epoch, when we last successfully synced
- /// our Lightning wallet to the chain tip.
- ///
- /// Will be `None` if the wallet hasn't been synced since the [Node] was initialized.
- final int? latestWalletSyncTimestamp;
-
- /// The timestamp, in seconds since start of the UNIX epoch, when we last successfully synced
- /// our on-chain wallet to the chain tip.
- ///
- /// Will be `None` if the wallet hasn't been synced since the [Node] was initialized.
- final int? latestOnchainWalletSyncTimestamp;
-
- /// The timestamp, in seconds since start of the UNIX epoch, when we last successfully update
- /// our fee rate cache.
- ///
- /// Will be `None` if the cache hasn't been updated since the [Node] was initialized.
- final int? latestFeeRateCacheUpdateTimestamp;
-
- /// The timestamp, in seconds since start of the UNIX epoch, when the last rapid gossip sync
- /// (RGS) snapshot we successfully applied was generated.
- ///
- /// Will be `None` if RGS isn't configured or the snapshot hasn't been updated since the [Node] was initialized.
- final int? latestRgsSnapshotTimestamp;
-
- /// The timestamp, in seconds since start of the UNIX epoch, when we last broadcasted a node
- /// announcement.
- ///
- /// Will be `None` if we have no public channels or we haven't broadcasted since the [Node] was initialized.
- final int? latestNodeAnnouncementBroadcastTimestamp;
-
- const NodeStatus({
- required this.isRunning,
- required this.isListening,
- required this.currentBestBlock,
- this.latestWalletSyncTimestamp,
- this.latestOnchainWalletSyncTimestamp,
- this.latestFeeRateCacheUpdateTimestamp,
- this.latestRgsSnapshotTimestamp,
- this.latestNodeAnnouncementBroadcastTimestamp,
- });
-
- @override
- int get hashCode =>
- isRunning.hashCode ^
- isListening.hashCode ^
- currentBestBlock.hashCode ^
- latestWalletSyncTimestamp.hashCode ^
- latestOnchainWalletSyncTimestamp.hashCode ^
- latestFeeRateCacheUpdateTimestamp.hashCode ^
- latestRgsSnapshotTimestamp.hashCode ^
- latestNodeAnnouncementBroadcastTimestamp.hashCode;
-
- @override
- bool operator ==(Object other) =>
- identical(this, other) ||
- other is NodeStatus &&
- runtimeType == other.runtimeType &&
- isRunning == other.isRunning &&
- isListening == other.isListening &&
- currentBestBlock == other.currentBestBlock &&
- latestWalletSyncTimestamp == other.latestWalletSyncTimestamp &&
- latestOnchainWalletSyncTimestamp ==
- other.latestOnchainWalletSyncTimestamp &&
- latestFeeRateCacheUpdateTimestamp ==
- other.latestFeeRateCacheUpdateTimestamp &&
- latestRgsSnapshotTimestamp == other.latestRgsSnapshotTimestamp &&
- latestNodeAnnouncementBroadcastTimestamp ==
- other.latestNodeAnnouncementBroadcastTimestamp;
-}
-
///A reference to a transaction output.
///
class OutPoint {
@@ -1116,33 +657,6 @@ enum PaymentDirection {
outbound,
}
-/// The reason the payment failed. Used in `Event.PaymentFailed`.
-enum PaymentFailureReason {
- /// The intended recipient rejected our payment.
- recipientRejected,
-
- /// The user chose to abandon this payment by calling `channelManager.abandon_payment`.
- ///
- userAbandoned,
-
- /// We exhausted all of our retry attempts while trying to send the payment, or we
- /// exhausted the `Retry.Timeout` if the user set one. If at any point a retry
- /// attempt failed while being forwarded along the path, an `Event::PaymentPathFailed` will
- /// have come before this.
- ///
- retriesExhausted,
-
- /// The payment expired while retrying, based on the provided
- paymentExpired,
-
- /// We failed to find a route while retrying the payment.
- routeNotFound,
-
- /// This error should generally never happen. This likely means that there is a problem with
- /// your router.
- unexpectedError,
-}
-
/// paymentHash type, use to cross-lock hop
///
class PaymentHash {
@@ -1250,79 +764,30 @@ class PeerDetails {
isConnected == other.isConnected;
}
-@freezed
-sealed class PendingSweepBalance with _$PendingSweepBalance {
- /// The spendable output is about to be swept, but a spending transaction has yet to be generated and
- /// broadcast.
- const factory PendingSweepBalance.pendingBroadcast({
- /// The identifier of the channel this balance belongs to.
- ChannelId? channelId,
-
- /// The amount, in satoshis, of the output being swept.
- required int amountSatoshis,
- }) = PendingSweepBalance_PendingBroadcast;
-
- /// A spending transaction has been generated and broadcast and is awaiting confirmation
- /// on-chain.
- const factory PendingSweepBalance.broadcastAwaitingConfirmation({
- /// The identifier of the channel this balance belongs to.
- ChannelId? channelId,
-
- /// The best height when we last broadcast a transaction spending the output being swept.
- required int latestBroadcastHeight,
-
- /// The identifier of the transaction spending the swept output we last broadcast.
- required Txid latestSpendingTxid,
-
- /// The amount, in satoshis, of the output being swept.
- required int amountSatoshis,
- }) = PendingSweepBalance_BroadcastAwaitingConfirmation;
-
- /// A spending transaction has been confirmed on-chain and is awaiting threshold confirmations.
- ///
- /// It will be considered irrevocably confirmed after reaching [`ANTI_REORG_DELAY`].
- ///
- /// [`ANTI_REORG_DELAY`]: lightning::chain::channelmonitor::ANTI_REORG_DELAY
- const factory PendingSweepBalance.awaitingThresholdConfirmations({
- /// The identifier of the channel this balance belongs to.
- ChannelId? channelId,
-
- /// The identifier of the confirmed transaction spending the swept output.
- required Txid latestSpendingTxid,
-
- /// The hash of the block in which the spending transaction was confirmed.
- required String confirmationHash,
-
- /// The height at which the spending transaction was confirmed.
- required int confirmationHeight,
-
- /// The amount, in satoshis, of the output being swept.
- required int amountSatoshis,
- }) = PendingSweepBalance_AwaitingThresholdConfirmations;
-}
-
///A Secp256k1 public key, used for verification of signatures.
///
class PublicKey {
- final String hexCode;
+ final String hex;
const PublicKey({
- required this.hexCode,
+ required this.hex,
});
@override
- int get hashCode => hexCode.hashCode;
+ int get hashCode => hex.hashCode;
@override
bool operator ==(Object other) =>
identical(this, other) ||
other is PublicKey &&
runtimeType == other.runtimeType &&
- hexCode == other.hexCode;
+ hex == other.hex;
}
@freezed
sealed class SocketAddress with _$SocketAddress {
+ const SocketAddress._();
+
const factory SocketAddress.tcpIpV4({
required U8Array4 addr,
required int port,
@@ -1344,6 +809,13 @@ sealed class SocketAddress with _$SocketAddress {
required String addr,
required int port,
}) = SocketAddress_Hostname;
+
+ Future asString({dynamic hint}) =>
+ LdkCore.instance.api.socketAddressAsString(that: this, hint: hint);
+
+ static Future fromStr(
+ {required String address, dynamic hint}) =>
+ LdkCore.instance.api.socketAddressFromStr(address: address, hint: hint);
}
///A bitcoin transaction hash/transaction ID.
@@ -1369,7 +841,7 @@ class Txid {
/// By default, this will be randomly generated for the user to ensure local uniqueness.
///
class UserChannelId {
- final Uint8List data;
+ final int data;
const UserChannelId({
required this.data,
diff --git a/lib/src/generated/api/types.freezed.dart b/lib/src/generated/api/types.freezed.dart
index fb0db9d..1a466c2 100644
--- a/lib/src/generated/api/types.freezed.dart
+++ b/lib/src/generated/api/types.freezed.dart
@@ -128,8 +128,8 @@ class __$$ChainDataSourceConfig_EsploraImplCopyWithImpl<$Res>
/// @nodoc
class _$ChainDataSourceConfig_EsploraImpl
- implements ChainDataSourceConfig_Esplora {
- const _$ChainDataSourceConfig_EsploraImpl(this.field0);
+ extends ChainDataSourceConfig_Esplora {
+ const _$ChainDataSourceConfig_EsploraImpl(this.field0) : super._();
@override
final String field0;
@@ -215,9 +215,10 @@ class _$ChainDataSourceConfig_EsploraImpl
}
}
-abstract class ChainDataSourceConfig_Esplora implements ChainDataSourceConfig {
+abstract class ChainDataSourceConfig_Esplora extends ChainDataSourceConfig {
const factory ChainDataSourceConfig_Esplora(final String field0) =
_$ChainDataSourceConfig_EsploraImpl;
+ const ChainDataSourceConfig_Esplora._() : super._();
@override
String get field0;
@@ -229,130 +230,66 @@ abstract class ChainDataSourceConfig_Esplora implements ChainDataSourceConfig {
}
/// @nodoc
-mixin _$ClosureReason {
+mixin _$EntropySourceConfig {
@optionalTypeArgs
TResult when({
- required TResult Function(String peerMsg) counterpartyForceClosed,
- required TResult Function() holderForceClosed,
- required TResult Function() cooperativeClosure,
- required TResult Function() commitmentTxConfirmed,
- required TResult Function() fundingTimedOut,
- required TResult Function(String err) processingError,
- required TResult Function() disconnectedPeer,
- required TResult Function() outdatedChannelManager,
- required TResult Function() counterpartyCoopClosedUnfundedChannel,
- required TResult Function() fundingBatchClosure,
+ required TResult Function(String field0) seedFile,
+ required TResult Function(U8Array64 field0) seedBytes,
+ required TResult Function(LdkMnemonic mnemonic, String? passphrase)
+ bip39Mnemonic,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull({
- TResult? Function(String peerMsg)? counterpartyForceClosed,
- TResult? Function()? holderForceClosed,
- TResult? Function()? cooperativeClosure,
- TResult? Function()? commitmentTxConfirmed,
- TResult? Function()? fundingTimedOut,
- TResult? Function(String err)? processingError,
- TResult? Function()? disconnectedPeer,
- TResult? Function()? outdatedChannelManager,
- TResult? Function()? counterpartyCoopClosedUnfundedChannel,
- TResult? Function()? fundingBatchClosure,
+ TResult? Function(String field0)? seedFile,
+ TResult? Function(U8Array64 field0)? seedBytes,
+ TResult? Function(LdkMnemonic mnemonic, String? passphrase)? bip39Mnemonic,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult maybeWhen({
- TResult Function(String peerMsg)? counterpartyForceClosed,
- TResult Function()? holderForceClosed,
- TResult Function()? cooperativeClosure,
- TResult Function()? commitmentTxConfirmed,
- TResult Function()? fundingTimedOut,
- TResult Function(String err)? processingError,
- TResult Function()? disconnectedPeer,
- TResult Function()? outdatedChannelManager,
- TResult Function()? counterpartyCoopClosedUnfundedChannel,
- TResult Function()? fundingBatchClosure,
+ TResult Function(String field0)? seedFile,
+ TResult Function(U8Array64 field0)? seedBytes,
+ TResult Function(LdkMnemonic mnemonic, String? passphrase)? bip39Mnemonic,
required TResult orElse(),
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult map({
- required TResult Function(ClosureReason_CounterpartyForceClosed value)
- counterpartyForceClosed,
- required TResult Function(ClosureReason_HolderForceClosed value)
- holderForceClosed,
- required TResult Function(ClosureReason_CooperativeClosure value)
- cooperativeClosure,
- required TResult Function(ClosureReason_CommitmentTxConfirmed value)
- commitmentTxConfirmed,
- required TResult Function(ClosureReason_FundingTimedOut value)
- fundingTimedOut,
- required TResult Function(ClosureReason_ProcessingError value)
- processingError,
- required TResult Function(ClosureReason_DisconnectedPeer value)
- disconnectedPeer,
- required TResult Function(ClosureReason_OutdatedChannelManager value)
- outdatedChannelManager,
- required TResult Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)
- counterpartyCoopClosedUnfundedChannel,
- required TResult Function(ClosureReason_FundingBatchClosure value)
- fundingBatchClosure,
+ required TResult Function(EntropySourceConfig_SeedFile value) seedFile,
+ required TResult Function(EntropySourceConfig_SeedBytes value) seedBytes,
+ required TResult Function(EntropySourceConfig_Bip39Mnemonic value)
+ bip39Mnemonic,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? mapOrNull({
- TResult? Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult? Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult? Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult? Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult? Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult? Function(ClosureReason_ProcessingError value)? processingError,
- TResult? Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult? Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult? Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult? Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
+ TResult? Function(EntropySourceConfig_SeedFile value)? seedFile,
+ TResult? Function(EntropySourceConfig_SeedBytes value)? seedBytes,
+ TResult? Function(EntropySourceConfig_Bip39Mnemonic value)? bip39Mnemonic,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult maybeMap({
- TResult Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult Function(ClosureReason_ProcessingError value)? processingError,
- TResult Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult Function(ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
+ TResult Function(EntropySourceConfig_SeedFile value)? seedFile,
+ TResult Function(EntropySourceConfig_SeedBytes value)? seedBytes,
+ TResult Function(EntropySourceConfig_Bip39Mnemonic value)? bip39Mnemonic,
required TResult orElse(),
}) =>
throw _privateConstructorUsedError;
}
/// @nodoc
-abstract class $ClosureReasonCopyWith<$Res> {
- factory $ClosureReasonCopyWith(
- ClosureReason value, $Res Function(ClosureReason) then) =
- _$ClosureReasonCopyWithImpl<$Res, ClosureReason>;
+abstract class $EntropySourceConfigCopyWith<$Res> {
+ factory $EntropySourceConfigCopyWith(
+ EntropySourceConfig value, $Res Function(EntropySourceConfig) then) =
+ _$EntropySourceConfigCopyWithImpl<$Res, EntropySourceConfig>;
}
/// @nodoc
-class _$ClosureReasonCopyWithImpl<$Res, $Val extends ClosureReason>
- implements $ClosureReasonCopyWith<$Res> {
- _$ClosureReasonCopyWithImpl(this._value, this._then);
+class _$EntropySourceConfigCopyWithImpl<$Res, $Val extends EntropySourceConfig>
+ implements $EntropySourceConfigCopyWith<$Res> {
+ _$EntropySourceConfigCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
@@ -361,34 +298,34 @@ class _$ClosureReasonCopyWithImpl<$Res, $Val extends ClosureReason>
}
/// @nodoc
-abstract class _$$ClosureReason_CounterpartyForceClosedImplCopyWith<$Res> {
- factory _$$ClosureReason_CounterpartyForceClosedImplCopyWith(
- _$ClosureReason_CounterpartyForceClosedImpl value,
- $Res Function(_$ClosureReason_CounterpartyForceClosedImpl) then) =
- __$$ClosureReason_CounterpartyForceClosedImplCopyWithImpl<$Res>;
+abstract class _$$EntropySourceConfig_SeedFileImplCopyWith<$Res> {
+ factory _$$EntropySourceConfig_SeedFileImplCopyWith(
+ _$EntropySourceConfig_SeedFileImpl value,
+ $Res Function(_$EntropySourceConfig_SeedFileImpl) then) =
+ __$$EntropySourceConfig_SeedFileImplCopyWithImpl<$Res>;
@useResult
- $Res call({String peerMsg});
+ $Res call({String field0});
}
/// @nodoc
-class __$$ClosureReason_CounterpartyForceClosedImplCopyWithImpl<$Res>
- extends _$ClosureReasonCopyWithImpl<$Res,
- _$ClosureReason_CounterpartyForceClosedImpl>
- implements _$$ClosureReason_CounterpartyForceClosedImplCopyWith<$Res> {
- __$$ClosureReason_CounterpartyForceClosedImplCopyWithImpl(
- _$ClosureReason_CounterpartyForceClosedImpl _value,
- $Res Function(_$ClosureReason_CounterpartyForceClosedImpl) _then)
+class __$$EntropySourceConfig_SeedFileImplCopyWithImpl<$Res>
+ extends _$EntropySourceConfigCopyWithImpl<$Res,
+ _$EntropySourceConfig_SeedFileImpl>
+ implements _$$EntropySourceConfig_SeedFileImplCopyWith<$Res> {
+ __$$EntropySourceConfig_SeedFileImplCopyWithImpl(
+ _$EntropySourceConfig_SeedFileImpl _value,
+ $Res Function(_$EntropySourceConfig_SeedFileImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
- Object? peerMsg = null,
+ Object? field0 = null,
}) {
- return _then(_$ClosureReason_CounterpartyForceClosedImpl(
- peerMsg: null == peerMsg
- ? _value.peerMsg
- : peerMsg // ignore: cast_nullable_to_non_nullable
+ return _then(_$EntropySourceConfig_SeedFileImpl(
+ null == field0
+ ? _value.field0
+ : field0 // ignore: cast_nullable_to_non_nullable
as String,
));
}
@@ -396,95 +333,67 @@ class __$$ClosureReason_CounterpartyForceClosedImplCopyWithImpl<$Res>
/// @nodoc
-class _$ClosureReason_CounterpartyForceClosedImpl
- implements ClosureReason_CounterpartyForceClosed {
- const _$ClosureReason_CounterpartyForceClosedImpl({required this.peerMsg});
+class _$EntropySourceConfig_SeedFileImpl extends EntropySourceConfig_SeedFile {
+ const _$EntropySourceConfig_SeedFileImpl(this.field0) : super._();
- /// The error which the peer sent us.
- ///
- /// Be careful about printing the peer_msg, a well-crafted message could exploit
- /// a security vulnerability in the terminal emulator or the logging subsystem.
- /// To be safe, use `Display` on `UntrustedString`
- ///
- /// [`UntrustedString`]: crate::util::string::UntrustedString
@override
- final String peerMsg;
+ final String field0;
@override
String toString() {
- return 'ClosureReason.counterpartyForceClosed(peerMsg: $peerMsg)';
+ return 'EntropySourceConfig.seedFile(field0: $field0)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
- other is _$ClosureReason_CounterpartyForceClosedImpl &&
- (identical(other.peerMsg, peerMsg) || other.peerMsg == peerMsg));
+ other is _$EntropySourceConfig_SeedFileImpl &&
+ (identical(other.field0, field0) || other.field0 == field0));
}
@override
- int get hashCode => Object.hash(runtimeType, peerMsg);
+ int get hashCode => Object.hash(runtimeType, field0);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
- _$$ClosureReason_CounterpartyForceClosedImplCopyWith<
- _$ClosureReason_CounterpartyForceClosedImpl>
- get copyWith => __$$ClosureReason_CounterpartyForceClosedImplCopyWithImpl<
- _$ClosureReason_CounterpartyForceClosedImpl>(this, _$identity);
+ _$$EntropySourceConfig_SeedFileImplCopyWith<
+ _$EntropySourceConfig_SeedFileImpl>
+ get copyWith => __$$EntropySourceConfig_SeedFileImplCopyWithImpl<
+ _$EntropySourceConfig_SeedFileImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when({
- required TResult Function(String peerMsg) counterpartyForceClosed,
- required TResult Function() holderForceClosed,
- required TResult Function() cooperativeClosure,
- required TResult Function() commitmentTxConfirmed,
- required TResult Function() fundingTimedOut,
- required TResult Function(String err) processingError,
- required TResult Function() disconnectedPeer,
- required TResult Function() outdatedChannelManager,
- required TResult Function() counterpartyCoopClosedUnfundedChannel,
- required TResult Function() fundingBatchClosure,
+ required TResult Function(String field0) seedFile,
+ required TResult Function(U8Array64 field0) seedBytes,
+ required TResult Function(LdkMnemonic mnemonic, String? passphrase)
+ bip39Mnemonic,
}) {
- return counterpartyForceClosed(peerMsg);
+ return seedFile(field0);
}
@override
@optionalTypeArgs
TResult? whenOrNull({
- TResult? Function(String peerMsg)? counterpartyForceClosed,
- TResult? Function()? holderForceClosed,
- TResult? Function()? cooperativeClosure,
- TResult? Function()? commitmentTxConfirmed,
- TResult? Function()? fundingTimedOut,
- TResult? Function(String err)? processingError,
- TResult? Function()? disconnectedPeer,
- TResult? Function()? outdatedChannelManager,
- TResult? Function()? counterpartyCoopClosedUnfundedChannel,
- TResult? Function()? fundingBatchClosure,
+ TResult? Function(String field0)? seedFile,
+ TResult? Function(U8Array64 field0)? seedBytes,
+ TResult? Function(LdkMnemonic mnemonic, String? passphrase)? bip39Mnemonic,
}) {
- return counterpartyForceClosed?.call(peerMsg);
+ return seedFile?.call(field0);
}
@override
@optionalTypeArgs
TResult maybeWhen({
- TResult Function(String peerMsg)? counterpartyForceClosed,
- TResult Function()? holderForceClosed,
- TResult Function()? cooperativeClosure,
- TResult Function()? commitmentTxConfirmed,
- TResult Function()? fundingTimedOut,
- TResult Function(String err)? processingError,
- TResult Function()? disconnectedPeer,
- TResult Function()? outdatedChannelManager,
- TResult Function()? counterpartyCoopClosedUnfundedChannel,
- TResult Function()? fundingBatchClosure,
+ TResult Function(String field0)? seedFile,
+ TResult Function(U8Array64 field0)? seedBytes,
+ TResult Function(LdkMnemonic mnemonic, String? passphrase)? bip39Mnemonic,
required TResult orElse(),
}) {
- if (counterpartyForceClosed != null) {
- return counterpartyForceClosed(peerMsg);
+ if (seedFile != null) {
+ return seedFile(field0);
}
return orElse();
}
@@ -492,193 +401,150 @@ class _$ClosureReason_CounterpartyForceClosedImpl
@override
@optionalTypeArgs
TResult map({
- required TResult Function(ClosureReason_CounterpartyForceClosed value)
- counterpartyForceClosed,
- required TResult Function(ClosureReason_HolderForceClosed value)
- holderForceClosed,
- required TResult Function(ClosureReason_CooperativeClosure value)
- cooperativeClosure,
- required TResult Function(ClosureReason_CommitmentTxConfirmed value)
- commitmentTxConfirmed,
- required TResult Function(ClosureReason_FundingTimedOut value)
- fundingTimedOut,
- required TResult Function(ClosureReason_ProcessingError value)
- processingError,
- required TResult Function(ClosureReason_DisconnectedPeer value)
- disconnectedPeer,
- required TResult Function(ClosureReason_OutdatedChannelManager value)
- outdatedChannelManager,
- required TResult Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)
- counterpartyCoopClosedUnfundedChannel,
- required TResult Function(ClosureReason_FundingBatchClosure value)
- fundingBatchClosure,
+ required TResult Function(EntropySourceConfig_SeedFile value) seedFile,
+ required TResult Function(EntropySourceConfig_SeedBytes value) seedBytes,
+ required TResult Function(EntropySourceConfig_Bip39Mnemonic value)
+ bip39Mnemonic,
}) {
- return counterpartyForceClosed(this);
+ return seedFile(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull({
- TResult? Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult? Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult? Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult? Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult? Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult? Function(ClosureReason_ProcessingError value)? processingError,
- TResult? Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult? Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult? Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult? Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
+ TResult? Function(EntropySourceConfig_SeedFile value)? seedFile,
+ TResult? Function(EntropySourceConfig_SeedBytes value)? seedBytes,
+ TResult? Function(EntropySourceConfig_Bip39Mnemonic value)? bip39Mnemonic,
}) {
- return counterpartyForceClosed?.call(this);
+ return seedFile?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap({
- TResult Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult Function(ClosureReason_ProcessingError value)? processingError,
- TResult Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult Function(ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
+ TResult Function(EntropySourceConfig_SeedFile value)? seedFile,
+ TResult Function(EntropySourceConfig_SeedBytes value)? seedBytes,
+ TResult Function(EntropySourceConfig_Bip39Mnemonic value)? bip39Mnemonic,
required TResult orElse(),
}) {
- if (counterpartyForceClosed != null) {
- return counterpartyForceClosed(this);
+ if (seedFile != null) {
+ return seedFile(this);
}
return orElse();
}
}
-abstract class ClosureReason_CounterpartyForceClosed implements ClosureReason {
- const factory ClosureReason_CounterpartyForceClosed(
- {required final String peerMsg}) =
- _$ClosureReason_CounterpartyForceClosedImpl;
-
- /// The error which the peer sent us.
- ///
- /// Be careful about printing the peer_msg, a well-crafted message could exploit
- /// a security vulnerability in the terminal emulator or the logging subsystem.
- /// To be safe, use `Display` on `UntrustedString`
- ///
- /// [`UntrustedString`]: crate::util::string::UntrustedString
- String get peerMsg;
+abstract class EntropySourceConfig_SeedFile extends EntropySourceConfig {
+ const factory EntropySourceConfig_SeedFile(final String field0) =
+ _$EntropySourceConfig_SeedFileImpl;
+ const EntropySourceConfig_SeedFile._() : super._();
+
+ String get field0;
@JsonKey(ignore: true)
- _$$ClosureReason_CounterpartyForceClosedImplCopyWith<
- _$ClosureReason_CounterpartyForceClosedImpl>
+ _$$EntropySourceConfig_SeedFileImplCopyWith<
+ _$EntropySourceConfig_SeedFileImpl>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
-abstract class _$$ClosureReason_HolderForceClosedImplCopyWith<$Res> {
- factory _$$ClosureReason_HolderForceClosedImplCopyWith(
- _$ClosureReason_HolderForceClosedImpl value,
- $Res Function(_$ClosureReason_HolderForceClosedImpl) then) =
- __$$ClosureReason_HolderForceClosedImplCopyWithImpl<$Res>;
+abstract class _$$EntropySourceConfig_SeedBytesImplCopyWith<$Res> {
+ factory _$$EntropySourceConfig_SeedBytesImplCopyWith(
+ _$EntropySourceConfig_SeedBytesImpl value,
+ $Res Function(_$EntropySourceConfig_SeedBytesImpl) then) =
+ __$$EntropySourceConfig_SeedBytesImplCopyWithImpl<$Res>;
+ @useResult
+ $Res call({U8Array64 field0});
}
/// @nodoc
-class __$$ClosureReason_HolderForceClosedImplCopyWithImpl<$Res>
- extends _$ClosureReasonCopyWithImpl<$Res,
- _$ClosureReason_HolderForceClosedImpl>
- implements _$$ClosureReason_HolderForceClosedImplCopyWith<$Res> {
- __$$ClosureReason_HolderForceClosedImplCopyWithImpl(
- _$ClosureReason_HolderForceClosedImpl _value,
- $Res Function(_$ClosureReason_HolderForceClosedImpl) _then)
+class __$$EntropySourceConfig_SeedBytesImplCopyWithImpl<$Res>
+ extends _$EntropySourceConfigCopyWithImpl<$Res,
+ _$EntropySourceConfig_SeedBytesImpl>
+ implements _$$EntropySourceConfig_SeedBytesImplCopyWith<$Res> {
+ __$$EntropySourceConfig_SeedBytesImplCopyWithImpl(
+ _$EntropySourceConfig_SeedBytesImpl _value,
+ $Res Function(_$EntropySourceConfig_SeedBytesImpl) _then)
: super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? field0 = null,
+ }) {
+ return _then(_$EntropySourceConfig_SeedBytesImpl(
+ null == field0
+ ? _value.field0
+ : field0 // ignore: cast_nullable_to_non_nullable
+ as U8Array64,
+ ));
+ }
}
/// @nodoc
-class _$ClosureReason_HolderForceClosedImpl
- implements ClosureReason_HolderForceClosed {
- const _$ClosureReason_HolderForceClosedImpl();
+class _$EntropySourceConfig_SeedBytesImpl
+ extends EntropySourceConfig_SeedBytes {
+ const _$EntropySourceConfig_SeedBytesImpl(this.field0) : super._();
+
+ @override
+ final U8Array64 field0;
@override
String toString() {
- return 'ClosureReason.holderForceClosed()';
+ return 'EntropySourceConfig.seedBytes(field0: $field0)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
- other is _$ClosureReason_HolderForceClosedImpl);
+ other is _$EntropySourceConfig_SeedBytesImpl &&
+ const DeepCollectionEquality().equals(other.field0, field0));
}
@override
- int get hashCode => runtimeType.hashCode;
+ int get hashCode =>
+ Object.hash(runtimeType, const DeepCollectionEquality().hash(field0));
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$EntropySourceConfig_SeedBytesImplCopyWith<
+ _$EntropySourceConfig_SeedBytesImpl>
+ get copyWith => __$$EntropySourceConfig_SeedBytesImplCopyWithImpl<
+ _$EntropySourceConfig_SeedBytesImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when({
- required TResult Function(String peerMsg) counterpartyForceClosed,
- required TResult Function() holderForceClosed,
- required TResult Function() cooperativeClosure,
- required TResult Function() commitmentTxConfirmed,
- required TResult Function() fundingTimedOut,
- required TResult Function(String err) processingError,
- required TResult Function() disconnectedPeer,
- required TResult Function() outdatedChannelManager,
- required TResult Function() counterpartyCoopClosedUnfundedChannel,
- required TResult Function() fundingBatchClosure,
+ required TResult Function(String field0) seedFile,
+ required TResult Function(U8Array64 field0) seedBytes,
+ required TResult Function(LdkMnemonic mnemonic, String? passphrase)
+ bip39Mnemonic,
}) {
- return holderForceClosed();
+ return seedBytes(field0);
}
@override
@optionalTypeArgs
TResult? whenOrNull({
- TResult? Function(String peerMsg)? counterpartyForceClosed,
- TResult? Function()? holderForceClosed,
- TResult? Function()? cooperativeClosure,
- TResult? Function()? commitmentTxConfirmed,
- TResult? Function()? fundingTimedOut,
- TResult? Function(String err)? processingError,
- TResult? Function()? disconnectedPeer,
- TResult? Function()? outdatedChannelManager,
- TResult? Function()? counterpartyCoopClosedUnfundedChannel,
- TResult? Function()? fundingBatchClosure,
+ TResult? Function(String field0)? seedFile,
+ TResult? Function(U8Array64 field0)? seedBytes,
+ TResult? Function(LdkMnemonic mnemonic, String? passphrase)? bip39Mnemonic,
}) {
- return holderForceClosed?.call();
+ return seedBytes?.call(field0);
}
@override
@optionalTypeArgs
TResult maybeWhen({
- TResult Function(String peerMsg)? counterpartyForceClosed,
- TResult Function()? holderForceClosed,
- TResult Function()? cooperativeClosure,
- TResult Function()? commitmentTxConfirmed,
- TResult Function()? fundingTimedOut,
- TResult Function(String err)? processingError,
- TResult Function()? disconnectedPeer,
- TResult Function()? outdatedChannelManager,
- TResult Function()? counterpartyCoopClosedUnfundedChannel,
- TResult Function()? fundingBatchClosure,
+ TResult Function(String field0)? seedFile,
+ TResult Function(U8Array64 field0)? seedBytes,
+ TResult Function(LdkMnemonic mnemonic, String? passphrase)? bip39Mnemonic,
required TResult orElse(),
}) {
- if (holderForceClosed != null) {
- return holderForceClosed();
+ if (seedBytes != null) {
+ return seedBytes(field0);
}
return orElse();
}
@@ -686,179 +552,161 @@ class _$ClosureReason_HolderForceClosedImpl
@override
@optionalTypeArgs
TResult map({
- required TResult Function(ClosureReason_CounterpartyForceClosed value)
- counterpartyForceClosed,
- required TResult Function(ClosureReason_HolderForceClosed value)
- holderForceClosed,
- required TResult Function(ClosureReason_CooperativeClosure value)
- cooperativeClosure,
- required TResult Function(ClosureReason_CommitmentTxConfirmed value)
- commitmentTxConfirmed,
- required TResult Function(ClosureReason_FundingTimedOut value)
- fundingTimedOut,
- required TResult Function(ClosureReason_ProcessingError value)
- processingError,
- required TResult Function(ClosureReason_DisconnectedPeer value)
- disconnectedPeer,
- required TResult Function(ClosureReason_OutdatedChannelManager value)
- outdatedChannelManager,
- required TResult Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)
- counterpartyCoopClosedUnfundedChannel,
- required TResult Function(ClosureReason_FundingBatchClosure value)
- fundingBatchClosure,
+ required TResult Function(EntropySourceConfig_SeedFile value) seedFile,
+ required TResult Function(EntropySourceConfig_SeedBytes value) seedBytes,
+ required TResult Function(EntropySourceConfig_Bip39Mnemonic value)
+ bip39Mnemonic,
}) {
- return holderForceClosed(this);
+ return seedBytes(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull({
- TResult? Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult? Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult? Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult? Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult? Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult? Function(ClosureReason_ProcessingError value)? processingError,
- TResult? Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult? Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult? Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult? Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
+ TResult? Function(EntropySourceConfig_SeedFile value)? seedFile,
+ TResult? Function(EntropySourceConfig_SeedBytes value)? seedBytes,
+ TResult? Function(EntropySourceConfig_Bip39Mnemonic value)? bip39Mnemonic,
}) {
- return holderForceClosed?.call(this);
+ return seedBytes?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap({
- TResult Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult Function(ClosureReason_ProcessingError value)? processingError,
- TResult Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult Function(ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
+ TResult Function(EntropySourceConfig_SeedFile value)? seedFile,
+ TResult Function(EntropySourceConfig_SeedBytes value)? seedBytes,
+ TResult Function(EntropySourceConfig_Bip39Mnemonic value)? bip39Mnemonic,
required TResult orElse(),
}) {
- if (holderForceClosed != null) {
- return holderForceClosed(this);
+ if (seedBytes != null) {
+ return seedBytes(this);
}
return orElse();
}
}
-abstract class ClosureReason_HolderForceClosed implements ClosureReason {
- const factory ClosureReason_HolderForceClosed() =
- _$ClosureReason_HolderForceClosedImpl;
+abstract class EntropySourceConfig_SeedBytes extends EntropySourceConfig {
+ const factory EntropySourceConfig_SeedBytes(final U8Array64 field0) =
+ _$EntropySourceConfig_SeedBytesImpl;
+ const EntropySourceConfig_SeedBytes._() : super._();
+
+ U8Array64 get field0;
+ @JsonKey(ignore: true)
+ _$$EntropySourceConfig_SeedBytesImplCopyWith<
+ _$EntropySourceConfig_SeedBytesImpl>
+ get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
-abstract class _$$ClosureReason_CooperativeClosureImplCopyWith<$Res> {
- factory _$$ClosureReason_CooperativeClosureImplCopyWith(
- _$ClosureReason_CooperativeClosureImpl value,
- $Res Function(_$ClosureReason_CooperativeClosureImpl) then) =
- __$$ClosureReason_CooperativeClosureImplCopyWithImpl<$Res>;
+abstract class _$$EntropySourceConfig_Bip39MnemonicImplCopyWith<$Res> {
+ factory _$$EntropySourceConfig_Bip39MnemonicImplCopyWith(
+ _$EntropySourceConfig_Bip39MnemonicImpl value,
+ $Res Function(_$EntropySourceConfig_Bip39MnemonicImpl) then) =
+ __$$EntropySourceConfig_Bip39MnemonicImplCopyWithImpl<$Res>;
+ @useResult
+ $Res call({LdkMnemonic mnemonic, String? passphrase});
}
/// @nodoc
-class __$$ClosureReason_CooperativeClosureImplCopyWithImpl<$Res>
- extends _$ClosureReasonCopyWithImpl<$Res,
- _$ClosureReason_CooperativeClosureImpl>
- implements _$$ClosureReason_CooperativeClosureImplCopyWith<$Res> {
- __$$ClosureReason_CooperativeClosureImplCopyWithImpl(
- _$ClosureReason_CooperativeClosureImpl _value,
- $Res Function(_$ClosureReason_CooperativeClosureImpl) _then)
+class __$$EntropySourceConfig_Bip39MnemonicImplCopyWithImpl<$Res>
+ extends _$EntropySourceConfigCopyWithImpl<$Res,
+ _$EntropySourceConfig_Bip39MnemonicImpl>
+ implements _$$EntropySourceConfig_Bip39MnemonicImplCopyWith<$Res> {
+ __$$EntropySourceConfig_Bip39MnemonicImplCopyWithImpl(
+ _$EntropySourceConfig_Bip39MnemonicImpl _value,
+ $Res Function(_$EntropySourceConfig_Bip39MnemonicImpl) _then)
: super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? mnemonic = null,
+ Object? passphrase = freezed,
+ }) {
+ return _then(_$EntropySourceConfig_Bip39MnemonicImpl(
+ mnemonic: null == mnemonic
+ ? _value.mnemonic
+ : mnemonic // ignore: cast_nullable_to_non_nullable
+ as LdkMnemonic,
+ passphrase: freezed == passphrase
+ ? _value.passphrase
+ : passphrase // ignore: cast_nullable_to_non_nullable
+ as String?,
+ ));
+ }
}
/// @nodoc
-class _$ClosureReason_CooperativeClosureImpl
- implements ClosureReason_CooperativeClosure {
- const _$ClosureReason_CooperativeClosureImpl();
+class _$EntropySourceConfig_Bip39MnemonicImpl
+ extends EntropySourceConfig_Bip39Mnemonic {
+ const _$EntropySourceConfig_Bip39MnemonicImpl(
+ {required this.mnemonic, this.passphrase})
+ : super._();
+
+ @override
+ final LdkMnemonic mnemonic;
+ @override
+ final String? passphrase;
@override
String toString() {
- return 'ClosureReason.cooperativeClosure()';
+ return 'EntropySourceConfig.bip39Mnemonic(mnemonic: $mnemonic, passphrase: $passphrase)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
- other is _$ClosureReason_CooperativeClosureImpl);
+ other is _$EntropySourceConfig_Bip39MnemonicImpl &&
+ (identical(other.mnemonic, mnemonic) ||
+ other.mnemonic == mnemonic) &&
+ (identical(other.passphrase, passphrase) ||
+ other.passphrase == passphrase));
}
@override
- int get hashCode => runtimeType.hashCode;
+ int get hashCode => Object.hash(runtimeType, mnemonic, passphrase);
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$EntropySourceConfig_Bip39MnemonicImplCopyWith<
+ _$EntropySourceConfig_Bip39MnemonicImpl>
+ get copyWith => __$$EntropySourceConfig_Bip39MnemonicImplCopyWithImpl<
+ _$EntropySourceConfig_Bip39MnemonicImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when({
- required TResult Function(String peerMsg) counterpartyForceClosed,
- required TResult Function() holderForceClosed,
- required TResult Function() cooperativeClosure,
- required TResult Function() commitmentTxConfirmed,
- required TResult Function() fundingTimedOut,
- required TResult Function(String err) processingError,
- required TResult Function() disconnectedPeer,
- required TResult Function() outdatedChannelManager,
- required TResult Function() counterpartyCoopClosedUnfundedChannel,
- required TResult Function() fundingBatchClosure,
+ required TResult Function(String field0) seedFile,
+ required TResult Function(U8Array64 field0) seedBytes,
+ required TResult Function(LdkMnemonic mnemonic, String? passphrase)
+ bip39Mnemonic,
}) {
- return cooperativeClosure();
+ return bip39Mnemonic(mnemonic, passphrase);
}
@override
@optionalTypeArgs
TResult? whenOrNull({
- TResult? Function(String peerMsg)? counterpartyForceClosed,
- TResult? Function()? holderForceClosed,
- TResult? Function()? cooperativeClosure,
- TResult? Function()? commitmentTxConfirmed,
- TResult? Function()? fundingTimedOut,
- TResult? Function(String err)? processingError,
- TResult? Function()? disconnectedPeer,
- TResult? Function()? outdatedChannelManager,
- TResult? Function()? counterpartyCoopClosedUnfundedChannel,
- TResult? Function()? fundingBatchClosure,
+ TResult? Function(String field0)? seedFile,
+ TResult? Function(U8Array64 field0)? seedBytes,
+ TResult? Function(LdkMnemonic mnemonic, String? passphrase)? bip39Mnemonic,
}) {
- return cooperativeClosure?.call();
+ return bip39Mnemonic?.call(mnemonic, passphrase);
}
@override
@optionalTypeArgs
TResult maybeWhen({
- TResult Function(String peerMsg)? counterpartyForceClosed,
- TResult Function()? holderForceClosed,
- TResult Function()? cooperativeClosure,
- TResult Function()? commitmentTxConfirmed,
- TResult Function()? fundingTimedOut,
- TResult Function(String err)? processingError,
- TResult Function()? disconnectedPeer,
- TResult Function()? outdatedChannelManager,
- TResult Function()? counterpartyCoopClosedUnfundedChannel,
- TResult Function()? fundingBatchClosure,
+ TResult Function(String field0)? seedFile,
+ TResult Function(U8Array64 field0)? seedBytes,
+ TResult Function(LdkMnemonic mnemonic, String? passphrase)? bip39Mnemonic,
required TResult orElse(),
}) {
- if (cooperativeClosure != null) {
- return cooperativeClosure();
+ if (bip39Mnemonic != null) {
+ return bip39Mnemonic(mnemonic, passphrase);
}
return orElse();
}
@@ -866,4190 +714,303 @@ class _$ClosureReason_CooperativeClosureImpl
@override
@optionalTypeArgs
TResult map({
- required TResult Function(ClosureReason_CounterpartyForceClosed value)
- counterpartyForceClosed,
- required TResult Function(ClosureReason_HolderForceClosed value)
- holderForceClosed,
- required TResult Function(ClosureReason_CooperativeClosure value)
- cooperativeClosure,
- required TResult Function(ClosureReason_CommitmentTxConfirmed value)
- commitmentTxConfirmed,
- required TResult Function(ClosureReason_FundingTimedOut value)
- fundingTimedOut,
- required TResult Function(ClosureReason_ProcessingError value)
- processingError,
- required TResult Function(ClosureReason_DisconnectedPeer value)
- disconnectedPeer,
- required TResult Function(ClosureReason_OutdatedChannelManager value)
- outdatedChannelManager,
- required TResult Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)
- counterpartyCoopClosedUnfundedChannel,
- required TResult Function(ClosureReason_FundingBatchClosure value)
- fundingBatchClosure,
+ required TResult Function(EntropySourceConfig_SeedFile value) seedFile,
+ required TResult Function(EntropySourceConfig_SeedBytes value) seedBytes,
+ required TResult Function(EntropySourceConfig_Bip39Mnemonic value)
+ bip39Mnemonic,
}) {
- return cooperativeClosure(this);
+ return bip39Mnemonic(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull({
- TResult? Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult? Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult? Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult? Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult? Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult? Function(ClosureReason_ProcessingError value)? processingError,
- TResult? Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult? Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult? Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult? Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
+ TResult? Function(EntropySourceConfig_SeedFile value)? seedFile,
+ TResult? Function(EntropySourceConfig_SeedBytes value)? seedBytes,
+ TResult? Function(EntropySourceConfig_Bip39Mnemonic value)? bip39Mnemonic,
}) {
- return cooperativeClosure?.call(this);
+ return bip39Mnemonic?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap({
- TResult Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult Function(ClosureReason_ProcessingError value)? processingError,
- TResult Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult Function(ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
+ TResult Function(EntropySourceConfig_SeedFile value)? seedFile,
+ TResult Function(EntropySourceConfig_SeedBytes value)? seedBytes,
+ TResult Function(EntropySourceConfig_Bip39Mnemonic value)? bip39Mnemonic,
required TResult orElse(),
}) {
- if (cooperativeClosure != null) {
- return cooperativeClosure(this);
+ if (bip39Mnemonic != null) {
+ return bip39Mnemonic(this);
}
return orElse();
}
}
-abstract class ClosureReason_CooperativeClosure implements ClosureReason {
- const factory ClosureReason_CooperativeClosure() =
- _$ClosureReason_CooperativeClosureImpl;
-}
+abstract class EntropySourceConfig_Bip39Mnemonic extends EntropySourceConfig {
+ const factory EntropySourceConfig_Bip39Mnemonic(
+ {required final LdkMnemonic mnemonic,
+ final String? passphrase}) = _$EntropySourceConfig_Bip39MnemonicImpl;
+ const EntropySourceConfig_Bip39Mnemonic._() : super._();
-/// @nodoc
-abstract class _$$ClosureReason_CommitmentTxConfirmedImplCopyWith<$Res> {
- factory _$$ClosureReason_CommitmentTxConfirmedImplCopyWith(
- _$ClosureReason_CommitmentTxConfirmedImpl value,
- $Res Function(_$ClosureReason_CommitmentTxConfirmedImpl) then) =
- __$$ClosureReason_CommitmentTxConfirmedImplCopyWithImpl<$Res>;
+ LdkMnemonic get mnemonic;
+ String? get passphrase;
+ @JsonKey(ignore: true)
+ _$$EntropySourceConfig_Bip39MnemonicImplCopyWith<
+ _$EntropySourceConfig_Bip39MnemonicImpl>
+ get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
-class __$$ClosureReason_CommitmentTxConfirmedImplCopyWithImpl<$Res>
- extends _$ClosureReasonCopyWithImpl<$Res,
- _$ClosureReason_CommitmentTxConfirmedImpl>
- implements _$$ClosureReason_CommitmentTxConfirmedImplCopyWith<$Res> {
- __$$ClosureReason_CommitmentTxConfirmedImplCopyWithImpl(
- _$ClosureReason_CommitmentTxConfirmedImpl _value,
- $Res Function(_$ClosureReason_CommitmentTxConfirmedImpl) _then)
- : super(_value, _then);
-}
-
-/// @nodoc
-
-class _$ClosureReason_CommitmentTxConfirmedImpl
- implements ClosureReason_CommitmentTxConfirmed {
- const _$ClosureReason_CommitmentTxConfirmedImpl();
-
- @override
- String toString() {
- return 'ClosureReason.commitmentTxConfirmed()';
- }
-
- @override
- bool operator ==(Object other) {
- return identical(this, other) ||
- (other.runtimeType == runtimeType &&
- other is _$ClosureReason_CommitmentTxConfirmedImpl);
- }
-
- @override
- int get hashCode => runtimeType.hashCode;
-
- @override
- @optionalTypeArgs
- TResult when({
- required TResult Function(String peerMsg) counterpartyForceClosed,
- required TResult Function() holderForceClosed,
- required TResult Function() cooperativeClosure,
- required TResult Function() commitmentTxConfirmed,
- required TResult Function() fundingTimedOut,
- required TResult Function(String err) processingError,
- required TResult Function() disconnectedPeer,
- required TResult Function() outdatedChannelManager,
- required TResult Function() counterpartyCoopClosedUnfundedChannel,
- required TResult Function() fundingBatchClosure,
- }) {
- return commitmentTxConfirmed();
- }
-
- @override
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function(String peerMsg)? counterpartyForceClosed,
- TResult? Function()? holderForceClosed,
- TResult? Function()? cooperativeClosure,
- TResult? Function()? commitmentTxConfirmed,
- TResult? Function()? fundingTimedOut,
- TResult? Function(String err)? processingError,
- TResult? Function()? disconnectedPeer,
- TResult? Function()? outdatedChannelManager,
- TResult? Function()? counterpartyCoopClosedUnfundedChannel,
- TResult? Function()? fundingBatchClosure,
- }) {
- return commitmentTxConfirmed?.call();
- }
-
- @override
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function(String peerMsg)? counterpartyForceClosed,
- TResult Function()? holderForceClosed,
- TResult Function()? cooperativeClosure,
- TResult Function()? commitmentTxConfirmed,
- TResult Function()? fundingTimedOut,
- TResult Function(String err)? processingError,
- TResult Function()? disconnectedPeer,
- TResult Function()? outdatedChannelManager,
- TResult Function()? counterpartyCoopClosedUnfundedChannel,
- TResult Function()? fundingBatchClosure,
- required TResult orElse(),
- }) {
- if (commitmentTxConfirmed != null) {
- return commitmentTxConfirmed();
- }
- return orElse();
- }
-
- @override
- @optionalTypeArgs
- TResult map({
- required TResult Function(ClosureReason_CounterpartyForceClosed value)
- counterpartyForceClosed,
- required TResult Function(ClosureReason_HolderForceClosed value)
- holderForceClosed,
- required TResult Function(ClosureReason_CooperativeClosure value)
- cooperativeClosure,
- required TResult Function(ClosureReason_CommitmentTxConfirmed value)
- commitmentTxConfirmed,
- required TResult Function(ClosureReason_FundingTimedOut value)
- fundingTimedOut,
- required TResult Function(ClosureReason_ProcessingError value)
- processingError,
- required TResult Function(ClosureReason_DisconnectedPeer value)
- disconnectedPeer,
- required TResult Function(ClosureReason_OutdatedChannelManager value)
- outdatedChannelManager,
- required TResult Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)
- counterpartyCoopClosedUnfundedChannel,
- required TResult Function(ClosureReason_FundingBatchClosure value)
- fundingBatchClosure,
- }) {
- return commitmentTxConfirmed(this);
- }
-
- @override
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult? Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult? Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult? Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult? Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult? Function(ClosureReason_ProcessingError value)? processingError,
- TResult? Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult? Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult? Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult? Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
- }) {
- return commitmentTxConfirmed?.call(this);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult Function(ClosureReason_ProcessingError value)? processingError,
- TResult Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult Function(ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
- required TResult orElse(),
- }) {
- if (commitmentTxConfirmed != null) {
- return commitmentTxConfirmed(this);
- }
- return orElse();
- }
-}
-
-abstract class ClosureReason_CommitmentTxConfirmed implements ClosureReason {
- const factory ClosureReason_CommitmentTxConfirmed() =
- _$ClosureReason_CommitmentTxConfirmedImpl;
-}
-
-/// @nodoc
-abstract class _$$ClosureReason_FundingTimedOutImplCopyWith<$Res> {
- factory _$$ClosureReason_FundingTimedOutImplCopyWith(
- _$ClosureReason_FundingTimedOutImpl value,
- $Res Function(_$ClosureReason_FundingTimedOutImpl) then) =
- __$$ClosureReason_FundingTimedOutImplCopyWithImpl<$Res>;
-}
-
-/// @nodoc
-class __$$ClosureReason_FundingTimedOutImplCopyWithImpl<$Res>
- extends _$ClosureReasonCopyWithImpl<$Res,
- _$ClosureReason_FundingTimedOutImpl>
- implements _$$ClosureReason_FundingTimedOutImplCopyWith<$Res> {
- __$$ClosureReason_FundingTimedOutImplCopyWithImpl(
- _$ClosureReason_FundingTimedOutImpl _value,
- $Res Function(_$ClosureReason_FundingTimedOutImpl) _then)
- : super(_value, _then);
-}
-
-/// @nodoc
-
-class _$ClosureReason_FundingTimedOutImpl
- implements ClosureReason_FundingTimedOut {
- const _$ClosureReason_FundingTimedOutImpl();
-
- @override
- String toString() {
- return 'ClosureReason.fundingTimedOut()';
- }
-
- @override
- bool operator ==(Object other) {
- return identical(this, other) ||
- (other.runtimeType == runtimeType &&
- other is _$ClosureReason_FundingTimedOutImpl);
- }
-
- @override
- int get hashCode => runtimeType.hashCode;
-
- @override
- @optionalTypeArgs
- TResult when({
- required TResult Function(String peerMsg) counterpartyForceClosed,
- required TResult Function() holderForceClosed,
- required TResult Function() cooperativeClosure,
- required TResult Function() commitmentTxConfirmed,
- required TResult Function() fundingTimedOut,
- required TResult Function(String err) processingError,
- required TResult Function() disconnectedPeer,
- required TResult Function() outdatedChannelManager,
- required TResult Function() counterpartyCoopClosedUnfundedChannel,
- required TResult Function() fundingBatchClosure,
- }) {
- return fundingTimedOut();
- }
-
- @override
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function(String peerMsg)? counterpartyForceClosed,
- TResult? Function()? holderForceClosed,
- TResult? Function()? cooperativeClosure,
- TResult? Function()? commitmentTxConfirmed,
- TResult? Function()? fundingTimedOut,
- TResult? Function(String err)? processingError,
- TResult? Function()? disconnectedPeer,
- TResult? Function()? outdatedChannelManager,
- TResult? Function()? counterpartyCoopClosedUnfundedChannel,
- TResult? Function()? fundingBatchClosure,
- }) {
- return fundingTimedOut?.call();
- }
-
- @override
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function(String peerMsg)? counterpartyForceClosed,
- TResult Function()? holderForceClosed,
- TResult Function()? cooperativeClosure,
- TResult Function()? commitmentTxConfirmed,
- TResult Function()? fundingTimedOut,
- TResult Function(String err)? processingError,
- TResult Function()? disconnectedPeer,
- TResult Function()? outdatedChannelManager,
- TResult Function()? counterpartyCoopClosedUnfundedChannel,
- TResult Function()? fundingBatchClosure,
- required TResult orElse(),
- }) {
- if (fundingTimedOut != null) {
- return fundingTimedOut();
- }
- return orElse();
- }
-
- @override
- @optionalTypeArgs
- TResult map({
- required TResult Function(ClosureReason_CounterpartyForceClosed value)
- counterpartyForceClosed,
- required TResult Function(ClosureReason_HolderForceClosed value)
- holderForceClosed,
- required TResult Function(ClosureReason_CooperativeClosure value)
- cooperativeClosure,
- required TResult Function(ClosureReason_CommitmentTxConfirmed value)
- commitmentTxConfirmed,
- required TResult Function(ClosureReason_FundingTimedOut value)
- fundingTimedOut,
- required TResult Function(ClosureReason_ProcessingError value)
- processingError,
- required TResult Function(ClosureReason_DisconnectedPeer value)
- disconnectedPeer,
- required TResult Function(ClosureReason_OutdatedChannelManager value)
- outdatedChannelManager,
- required TResult Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)
- counterpartyCoopClosedUnfundedChannel,
- required TResult Function(ClosureReason_FundingBatchClosure value)
- fundingBatchClosure,
- }) {
- return fundingTimedOut(this);
- }
-
- @override
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult? Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult? Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult? Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult? Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult? Function(ClosureReason_ProcessingError value)? processingError,
- TResult? Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult? Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult? Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult? Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
- }) {
- return fundingTimedOut?.call(this);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult Function(ClosureReason_ProcessingError value)? processingError,
- TResult Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult Function(ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
- required TResult orElse(),
- }) {
- if (fundingTimedOut != null) {
- return fundingTimedOut(this);
- }
- return orElse();
- }
-}
-
-abstract class ClosureReason_FundingTimedOut implements ClosureReason {
- const factory ClosureReason_FundingTimedOut() =
- _$ClosureReason_FundingTimedOutImpl;
-}
-
-/// @nodoc
-abstract class _$$ClosureReason_ProcessingErrorImplCopyWith<$Res> {
- factory _$$ClosureReason_ProcessingErrorImplCopyWith(
- _$ClosureReason_ProcessingErrorImpl value,
- $Res Function(_$ClosureReason_ProcessingErrorImpl) then) =
- __$$ClosureReason_ProcessingErrorImplCopyWithImpl<$Res>;
- @useResult
- $Res call({String err});
-}
-
-/// @nodoc
-class __$$ClosureReason_ProcessingErrorImplCopyWithImpl<$Res>
- extends _$ClosureReasonCopyWithImpl<$Res,
- _$ClosureReason_ProcessingErrorImpl>
- implements _$$ClosureReason_ProcessingErrorImplCopyWith<$Res> {
- __$$ClosureReason_ProcessingErrorImplCopyWithImpl(
- _$ClosureReason_ProcessingErrorImpl _value,
- $Res Function(_$ClosureReason_ProcessingErrorImpl) _then)
- : super(_value, _then);
-
- @pragma('vm:prefer-inline')
- @override
- $Res call({
- Object? err = null,
- }) {
- return _then(_$ClosureReason_ProcessingErrorImpl(
- err: null == err
- ? _value.err
- : err // ignore: cast_nullable_to_non_nullable
- as String,
- ));
- }
-}
-
-/// @nodoc
-
-class _$ClosureReason_ProcessingErrorImpl
- implements ClosureReason_ProcessingError {
- const _$ClosureReason_ProcessingErrorImpl({required this.err});
-
- /// A developer-readable error message which we generated.
- @override
- final String err;
-
- @override
- String toString() {
- return 'ClosureReason.processingError(err: $err)';
- }
-
- @override
- bool operator ==(Object other) {
- return identical(this, other) ||
- (other.runtimeType == runtimeType &&
- other is _$ClosureReason_ProcessingErrorImpl &&
- (identical(other.err, err) || other.err == err));
- }
-
- @override
- int get hashCode => Object.hash(runtimeType, err);
-
- @JsonKey(ignore: true)
- @override
- @pragma('vm:prefer-inline')
- _$$ClosureReason_ProcessingErrorImplCopyWith<
- _$ClosureReason_ProcessingErrorImpl>
- get copyWith => __$$ClosureReason_ProcessingErrorImplCopyWithImpl<
- _$ClosureReason_ProcessingErrorImpl>(this, _$identity);
-
- @override
- @optionalTypeArgs
- TResult when({
- required TResult Function(String peerMsg) counterpartyForceClosed,
- required TResult Function() holderForceClosed,
- required TResult Function() cooperativeClosure,
- required TResult Function() commitmentTxConfirmed,
- required TResult Function() fundingTimedOut,
- required TResult Function(String err) processingError,
- required TResult Function() disconnectedPeer,
- required TResult Function() outdatedChannelManager,
- required TResult Function() counterpartyCoopClosedUnfundedChannel,
- required TResult Function() fundingBatchClosure,
- }) {
- return processingError(err);
- }
-
- @override
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function(String peerMsg)? counterpartyForceClosed,
- TResult? Function()? holderForceClosed,
- TResult? Function()? cooperativeClosure,
- TResult? Function()? commitmentTxConfirmed,
- TResult? Function()? fundingTimedOut,
- TResult? Function(String err)? processingError,
- TResult? Function()? disconnectedPeer,
- TResult? Function()? outdatedChannelManager,
- TResult? Function()? counterpartyCoopClosedUnfundedChannel,
- TResult? Function()? fundingBatchClosure,
- }) {
- return processingError?.call(err);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function(String peerMsg)? counterpartyForceClosed,
- TResult Function()? holderForceClosed,
- TResult Function()? cooperativeClosure,
- TResult Function()? commitmentTxConfirmed,
- TResult Function()? fundingTimedOut,
- TResult Function(String err)? processingError,
- TResult Function()? disconnectedPeer,
- TResult Function()? outdatedChannelManager,
- TResult Function()? counterpartyCoopClosedUnfundedChannel,
- TResult Function()? fundingBatchClosure,
- required TResult orElse(),
- }) {
- if (processingError != null) {
- return processingError(err);
- }
- return orElse();
- }
-
- @override
- @optionalTypeArgs
- TResult map({
- required TResult Function(ClosureReason_CounterpartyForceClosed value)
- counterpartyForceClosed,
- required TResult Function(ClosureReason_HolderForceClosed value)
- holderForceClosed,
- required TResult Function(ClosureReason_CooperativeClosure value)
- cooperativeClosure,
- required TResult Function(ClosureReason_CommitmentTxConfirmed value)
- commitmentTxConfirmed,
- required TResult Function(ClosureReason_FundingTimedOut value)
- fundingTimedOut,
- required TResult Function(ClosureReason_ProcessingError value)
- processingError,
- required TResult Function(ClosureReason_DisconnectedPeer value)
- disconnectedPeer,
- required TResult Function(ClosureReason_OutdatedChannelManager value)
- outdatedChannelManager,
- required TResult Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)
- counterpartyCoopClosedUnfundedChannel,
- required TResult Function(ClosureReason_FundingBatchClosure value)
- fundingBatchClosure,
- }) {
- return processingError(this);
- }
-
- @override
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult? Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult? Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult? Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult? Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult? Function(ClosureReason_ProcessingError value)? processingError,
- TResult? Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult? Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult? Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult? Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
- }) {
- return processingError?.call(this);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult Function(ClosureReason_ProcessingError value)? processingError,
- TResult Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult Function(ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
- required TResult orElse(),
- }) {
- if (processingError != null) {
- return processingError(this);
- }
- return orElse();
- }
-}
-
-abstract class ClosureReason_ProcessingError implements ClosureReason {
- const factory ClosureReason_ProcessingError({required final String err}) =
- _$ClosureReason_ProcessingErrorImpl;
-
- /// A developer-readable error message which we generated.
- String get err;
- @JsonKey(ignore: true)
- _$$ClosureReason_ProcessingErrorImplCopyWith<
- _$ClosureReason_ProcessingErrorImpl>
- get copyWith => throw _privateConstructorUsedError;
-}
-
-/// @nodoc
-abstract class _$$ClosureReason_DisconnectedPeerImplCopyWith<$Res> {
- factory _$$ClosureReason_DisconnectedPeerImplCopyWith(
- _$ClosureReason_DisconnectedPeerImpl value,
- $Res Function(_$ClosureReason_DisconnectedPeerImpl) then) =
- __$$ClosureReason_DisconnectedPeerImplCopyWithImpl<$Res>;
-}
-
-/// @nodoc
-class __$$ClosureReason_DisconnectedPeerImplCopyWithImpl<$Res>
- extends _$ClosureReasonCopyWithImpl<$Res,
- _$ClosureReason_DisconnectedPeerImpl>
- implements _$$ClosureReason_DisconnectedPeerImplCopyWith<$Res> {
- __$$ClosureReason_DisconnectedPeerImplCopyWithImpl(
- _$ClosureReason_DisconnectedPeerImpl _value,
- $Res Function(_$ClosureReason_DisconnectedPeerImpl) _then)
- : super(_value, _then);
-}
-
-/// @nodoc
-
-class _$ClosureReason_DisconnectedPeerImpl
- implements ClosureReason_DisconnectedPeer {
- const _$ClosureReason_DisconnectedPeerImpl();
-
- @override
- String toString() {
- return 'ClosureReason.disconnectedPeer()';
- }
-
- @override
- bool operator ==(Object other) {
- return identical(this, other) ||
- (other.runtimeType == runtimeType &&
- other is _$ClosureReason_DisconnectedPeerImpl);
- }
-
- @override
- int get hashCode => runtimeType.hashCode;
-
- @override
- @optionalTypeArgs
- TResult when({
- required TResult Function(String peerMsg) counterpartyForceClosed,
- required TResult Function() holderForceClosed,
- required TResult Function() cooperativeClosure,
- required TResult Function() commitmentTxConfirmed,
- required TResult Function() fundingTimedOut,
- required TResult Function(String err) processingError,
- required TResult Function() disconnectedPeer,
- required TResult Function() outdatedChannelManager,
- required TResult Function() counterpartyCoopClosedUnfundedChannel,
- required TResult Function() fundingBatchClosure,
- }) {
- return disconnectedPeer();
- }
-
- @override
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function(String peerMsg)? counterpartyForceClosed,
- TResult? Function()? holderForceClosed,
- TResult? Function()? cooperativeClosure,
- TResult? Function()? commitmentTxConfirmed,
- TResult? Function()? fundingTimedOut,
- TResult? Function(String err)? processingError,
- TResult? Function()? disconnectedPeer,
- TResult? Function()? outdatedChannelManager,
- TResult? Function()? counterpartyCoopClosedUnfundedChannel,
- TResult? Function()? fundingBatchClosure,
- }) {
- return disconnectedPeer?.call();
- }
-
- @override
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function(String peerMsg)? counterpartyForceClosed,
- TResult Function()? holderForceClosed,
- TResult Function()? cooperativeClosure,
- TResult Function()? commitmentTxConfirmed,
- TResult Function()? fundingTimedOut,
- TResult Function(String err)? processingError,
- TResult Function()? disconnectedPeer,
- TResult Function()? outdatedChannelManager,
- TResult Function()? counterpartyCoopClosedUnfundedChannel,
- TResult Function()? fundingBatchClosure,
- required TResult orElse(),
- }) {
- if (disconnectedPeer != null) {
- return disconnectedPeer();
- }
- return orElse();
- }
-
- @override
- @optionalTypeArgs
- TResult map({
- required TResult Function(ClosureReason_CounterpartyForceClosed value)
- counterpartyForceClosed,
- required TResult Function(ClosureReason_HolderForceClosed value)
- holderForceClosed,
- required TResult Function(ClosureReason_CooperativeClosure value)
- cooperativeClosure,
- required TResult Function(ClosureReason_CommitmentTxConfirmed value)
- commitmentTxConfirmed,
- required TResult Function(ClosureReason_FundingTimedOut value)
- fundingTimedOut,
- required TResult Function(ClosureReason_ProcessingError value)
- processingError,
- required TResult Function(ClosureReason_DisconnectedPeer value)
- disconnectedPeer,
- required TResult Function(ClosureReason_OutdatedChannelManager value)
- outdatedChannelManager,
- required TResult Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)
- counterpartyCoopClosedUnfundedChannel,
- required TResult Function(ClosureReason_FundingBatchClosure value)
- fundingBatchClosure,
- }) {
- return disconnectedPeer(this);
- }
-
- @override
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult? Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult? Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult? Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult? Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult? Function(ClosureReason_ProcessingError value)? processingError,
- TResult? Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult? Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult? Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult? Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
- }) {
- return disconnectedPeer?.call(this);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult Function(ClosureReason_ProcessingError value)? processingError,
- TResult Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult Function(ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
- required TResult orElse(),
- }) {
- if (disconnectedPeer != null) {
- return disconnectedPeer(this);
- }
- return orElse();
- }
-}
-
-abstract class ClosureReason_DisconnectedPeer implements ClosureReason {
- const factory ClosureReason_DisconnectedPeer() =
- _$ClosureReason_DisconnectedPeerImpl;
-}
-
-/// @nodoc
-abstract class _$$ClosureReason_OutdatedChannelManagerImplCopyWith<$Res> {
- factory _$$ClosureReason_OutdatedChannelManagerImplCopyWith(
- _$ClosureReason_OutdatedChannelManagerImpl value,
- $Res Function(_$ClosureReason_OutdatedChannelManagerImpl) then) =
- __$$ClosureReason_OutdatedChannelManagerImplCopyWithImpl<$Res>;
-}
-
-/// @nodoc
-class __$$ClosureReason_OutdatedChannelManagerImplCopyWithImpl<$Res>
- extends _$ClosureReasonCopyWithImpl<$Res,
- _$ClosureReason_OutdatedChannelManagerImpl>
- implements _$$ClosureReason_OutdatedChannelManagerImplCopyWith<$Res> {
- __$$ClosureReason_OutdatedChannelManagerImplCopyWithImpl(
- _$ClosureReason_OutdatedChannelManagerImpl _value,
- $Res Function(_$ClosureReason_OutdatedChannelManagerImpl) _then)
- : super(_value, _then);
-}
-
-/// @nodoc
-
-class _$ClosureReason_OutdatedChannelManagerImpl
- implements ClosureReason_OutdatedChannelManager {
- const _$ClosureReason_OutdatedChannelManagerImpl();
-
- @override
- String toString() {
- return 'ClosureReason.outdatedChannelManager()';
- }
-
- @override
- bool operator ==(Object other) {
- return identical(this, other) ||
- (other.runtimeType == runtimeType &&
- other is _$ClosureReason_OutdatedChannelManagerImpl);
- }
-
- @override
- int get hashCode => runtimeType.hashCode;
-
- @override
- @optionalTypeArgs
- TResult when({
- required TResult Function(String peerMsg) counterpartyForceClosed,
- required TResult Function() holderForceClosed,
- required TResult Function() cooperativeClosure,
- required TResult Function() commitmentTxConfirmed,
- required TResult Function() fundingTimedOut,
- required TResult Function(String err) processingError,
- required TResult Function() disconnectedPeer,
- required TResult Function() outdatedChannelManager,
- required TResult Function() counterpartyCoopClosedUnfundedChannel,
- required TResult Function() fundingBatchClosure,
- }) {
- return outdatedChannelManager();
- }
-
- @override
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function(String peerMsg)? counterpartyForceClosed,
- TResult? Function()? holderForceClosed,
- TResult? Function()? cooperativeClosure,
- TResult? Function()? commitmentTxConfirmed,
- TResult? Function()? fundingTimedOut,
- TResult? Function(String err)? processingError,
- TResult? Function()? disconnectedPeer,
- TResult? Function()? outdatedChannelManager,
- TResult? Function()? counterpartyCoopClosedUnfundedChannel,
- TResult? Function()? fundingBatchClosure,
- }) {
- return outdatedChannelManager?.call();
- }
-
- @override
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function(String peerMsg)? counterpartyForceClosed,
- TResult Function()? holderForceClosed,
- TResult Function()? cooperativeClosure,
- TResult Function()? commitmentTxConfirmed,
- TResult Function()? fundingTimedOut,
- TResult Function(String err)? processingError,
- TResult Function()? disconnectedPeer,
- TResult Function()? outdatedChannelManager,
- TResult Function()? counterpartyCoopClosedUnfundedChannel,
- TResult Function()? fundingBatchClosure,
- required TResult orElse(),
- }) {
- if (outdatedChannelManager != null) {
- return outdatedChannelManager();
- }
- return orElse();
- }
-
- @override
- @optionalTypeArgs
- TResult map({
- required TResult Function(ClosureReason_CounterpartyForceClosed value)
- counterpartyForceClosed,
- required TResult Function(ClosureReason_HolderForceClosed value)
- holderForceClosed,
- required TResult Function(ClosureReason_CooperativeClosure value)
- cooperativeClosure,
- required TResult Function(ClosureReason_CommitmentTxConfirmed value)
- commitmentTxConfirmed,
- required TResult Function(ClosureReason_FundingTimedOut value)
- fundingTimedOut,
- required TResult Function(ClosureReason_ProcessingError value)
- processingError,
- required TResult Function(ClosureReason_DisconnectedPeer value)
- disconnectedPeer,
- required TResult Function(ClosureReason_OutdatedChannelManager value)
- outdatedChannelManager,
- required TResult Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)
- counterpartyCoopClosedUnfundedChannel,
- required TResult Function(ClosureReason_FundingBatchClosure value)
- fundingBatchClosure,
- }) {
- return outdatedChannelManager(this);
- }
-
- @override
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult? Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult? Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult? Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult? Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult? Function(ClosureReason_ProcessingError value)? processingError,
- TResult? Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult? Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult? Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult? Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
- }) {
- return outdatedChannelManager?.call(this);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult Function(ClosureReason_ProcessingError value)? processingError,
- TResult Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult Function(ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
- required TResult orElse(),
- }) {
- if (outdatedChannelManager != null) {
- return outdatedChannelManager(this);
- }
- return orElse();
- }
-}
-
-abstract class ClosureReason_OutdatedChannelManager implements ClosureReason {
- const factory ClosureReason_OutdatedChannelManager() =
- _$ClosureReason_OutdatedChannelManagerImpl;
-}
-
-/// @nodoc
-abstract class _$$ClosureReason_CounterpartyCoopClosedUnfundedChannelImplCopyWith<
- $Res> {
- factory _$$ClosureReason_CounterpartyCoopClosedUnfundedChannelImplCopyWith(
- _$ClosureReason_CounterpartyCoopClosedUnfundedChannelImpl value,
- $Res Function(
- _$ClosureReason_CounterpartyCoopClosedUnfundedChannelImpl)
- then) =
- __$$ClosureReason_CounterpartyCoopClosedUnfundedChannelImplCopyWithImpl<
- $Res>;
-}
-
-/// @nodoc
-class __$$ClosureReason_CounterpartyCoopClosedUnfundedChannelImplCopyWithImpl<
- $Res>
- extends _$ClosureReasonCopyWithImpl<$Res,
- _$ClosureReason_CounterpartyCoopClosedUnfundedChannelImpl>
- implements
- _$$ClosureReason_CounterpartyCoopClosedUnfundedChannelImplCopyWith<
- $Res> {
- __$$ClosureReason_CounterpartyCoopClosedUnfundedChannelImplCopyWithImpl(
- _$ClosureReason_CounterpartyCoopClosedUnfundedChannelImpl _value,
- $Res Function(_$ClosureReason_CounterpartyCoopClosedUnfundedChannelImpl)
- _then)
- : super(_value, _then);
-}
-
-/// @nodoc
-
-class _$ClosureReason_CounterpartyCoopClosedUnfundedChannelImpl
- implements ClosureReason_CounterpartyCoopClosedUnfundedChannel {
- const _$ClosureReason_CounterpartyCoopClosedUnfundedChannelImpl();
-
- @override
- String toString() {
- return 'ClosureReason.counterpartyCoopClosedUnfundedChannel()';
- }
-
- @override
- bool operator ==(Object other) {
- return identical(this, other) ||
- (other.runtimeType == runtimeType &&
- other is _$ClosureReason_CounterpartyCoopClosedUnfundedChannelImpl);
- }
-
- @override
- int get hashCode => runtimeType.hashCode;
-
- @override
- @optionalTypeArgs
- TResult when({
- required TResult Function(String peerMsg) counterpartyForceClosed,
- required TResult Function() holderForceClosed,
- required TResult Function() cooperativeClosure,
- required TResult Function() commitmentTxConfirmed,
- required TResult Function() fundingTimedOut,
- required TResult Function(String err) processingError,
- required TResult Function() disconnectedPeer,
- required TResult Function() outdatedChannelManager,
- required TResult Function() counterpartyCoopClosedUnfundedChannel,
- required TResult Function() fundingBatchClosure,
- }) {
- return counterpartyCoopClosedUnfundedChannel();
- }
-
- @override
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function(String peerMsg)? counterpartyForceClosed,
- TResult? Function()? holderForceClosed,
- TResult? Function()? cooperativeClosure,
- TResult? Function()? commitmentTxConfirmed,
- TResult? Function()? fundingTimedOut,
- TResult? Function(String err)? processingError,
- TResult? Function()? disconnectedPeer,
- TResult? Function()? outdatedChannelManager,
- TResult? Function()? counterpartyCoopClosedUnfundedChannel,
- TResult? Function()? fundingBatchClosure,
- }) {
- return counterpartyCoopClosedUnfundedChannel?.call();
- }
-
- @override
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function(String peerMsg)? counterpartyForceClosed,
- TResult Function()? holderForceClosed,
- TResult Function()? cooperativeClosure,
- TResult Function()? commitmentTxConfirmed,
- TResult Function()? fundingTimedOut,
- TResult Function(String err)? processingError,
- TResult Function()? disconnectedPeer,
- TResult Function()? outdatedChannelManager,
- TResult Function()? counterpartyCoopClosedUnfundedChannel,
- TResult Function()? fundingBatchClosure,
- required TResult orElse(),
- }) {
- if (counterpartyCoopClosedUnfundedChannel != null) {
- return counterpartyCoopClosedUnfundedChannel();
- }
- return orElse();
- }
-
- @override
- @optionalTypeArgs
- TResult map({
- required TResult Function(ClosureReason_CounterpartyForceClosed value)
- counterpartyForceClosed,
- required TResult Function(ClosureReason_HolderForceClosed value)
- holderForceClosed,
- required TResult Function(ClosureReason_CooperativeClosure value)
- cooperativeClosure,
- required TResult Function(ClosureReason_CommitmentTxConfirmed value)
- commitmentTxConfirmed,
- required TResult Function(ClosureReason_FundingTimedOut value)
- fundingTimedOut,
- required TResult Function(ClosureReason_ProcessingError value)
- processingError,
- required TResult Function(ClosureReason_DisconnectedPeer value)
- disconnectedPeer,
- required TResult Function(ClosureReason_OutdatedChannelManager value)
- outdatedChannelManager,
- required TResult Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)
- counterpartyCoopClosedUnfundedChannel,
- required TResult Function(ClosureReason_FundingBatchClosure value)
- fundingBatchClosure,
- }) {
- return counterpartyCoopClosedUnfundedChannel(this);
- }
-
- @override
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult? Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult? Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult? Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult? Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult? Function(ClosureReason_ProcessingError value)? processingError,
- TResult? Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult? Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult? Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult? Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
- }) {
- return counterpartyCoopClosedUnfundedChannel?.call(this);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult Function(ClosureReason_ProcessingError value)? processingError,
- TResult Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult Function(ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
- required TResult orElse(),
- }) {
- if (counterpartyCoopClosedUnfundedChannel != null) {
- return counterpartyCoopClosedUnfundedChannel(this);
- }
- return orElse();
- }
-}
-
-abstract class ClosureReason_CounterpartyCoopClosedUnfundedChannel
- implements ClosureReason {
- const factory ClosureReason_CounterpartyCoopClosedUnfundedChannel() =
- _$ClosureReason_CounterpartyCoopClosedUnfundedChannelImpl;
-}
-
-/// @nodoc
-abstract class _$$ClosureReason_FundingBatchClosureImplCopyWith<$Res> {
- factory _$$ClosureReason_FundingBatchClosureImplCopyWith(
- _$ClosureReason_FundingBatchClosureImpl value,
- $Res Function(_$ClosureReason_FundingBatchClosureImpl) then) =
- __$$ClosureReason_FundingBatchClosureImplCopyWithImpl<$Res>;
-}
-
-/// @nodoc
-class __$$ClosureReason_FundingBatchClosureImplCopyWithImpl<$Res>
- extends _$ClosureReasonCopyWithImpl<$Res,
- _$ClosureReason_FundingBatchClosureImpl>
- implements _$$ClosureReason_FundingBatchClosureImplCopyWith<$Res> {
- __$$ClosureReason_FundingBatchClosureImplCopyWithImpl(
- _$ClosureReason_FundingBatchClosureImpl _value,
- $Res Function(_$ClosureReason_FundingBatchClosureImpl) _then)
- : super(_value, _then);
-}
-
-/// @nodoc
-
-class _$ClosureReason_FundingBatchClosureImpl
- implements ClosureReason_FundingBatchClosure {
- const _$ClosureReason_FundingBatchClosureImpl();
-
- @override
- String toString() {
- return 'ClosureReason.fundingBatchClosure()';
- }
-
- @override
- bool operator ==(Object other) {
- return identical(this, other) ||
- (other.runtimeType == runtimeType &&
- other is _$ClosureReason_FundingBatchClosureImpl);
- }
-
- @override
- int get hashCode => runtimeType.hashCode;
-
- @override
- @optionalTypeArgs
- TResult when({
- required TResult Function(String peerMsg) counterpartyForceClosed,
- required TResult Function() holderForceClosed,
- required TResult Function() cooperativeClosure,
- required TResult Function() commitmentTxConfirmed,
- required TResult Function() fundingTimedOut,
- required TResult Function(String err) processingError,
- required TResult Function() disconnectedPeer,
- required TResult Function() outdatedChannelManager,
- required TResult Function() counterpartyCoopClosedUnfundedChannel,
- required TResult Function() fundingBatchClosure,
- }) {
- return fundingBatchClosure();
- }
-
- @override
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function(String peerMsg)? counterpartyForceClosed,
- TResult? Function()? holderForceClosed,
- TResult? Function()? cooperativeClosure,
- TResult? Function()? commitmentTxConfirmed,
- TResult? Function()? fundingTimedOut,
- TResult? Function(String err)? processingError,
- TResult? Function()? disconnectedPeer,
- TResult? Function()? outdatedChannelManager,
- TResult? Function()? counterpartyCoopClosedUnfundedChannel,
- TResult? Function()? fundingBatchClosure,
- }) {
- return fundingBatchClosure?.call();
- }
-
- @override
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function(String peerMsg)? counterpartyForceClosed,
- TResult Function()? holderForceClosed,
- TResult Function()? cooperativeClosure,
- TResult Function()? commitmentTxConfirmed,
- TResult Function()? fundingTimedOut,
- TResult Function(String err)? processingError,
- TResult Function()? disconnectedPeer,
- TResult Function()? outdatedChannelManager,
- TResult Function()? counterpartyCoopClosedUnfundedChannel,
- TResult Function()? fundingBatchClosure,
- required TResult orElse(),
- }) {
- if (fundingBatchClosure != null) {
- return fundingBatchClosure();
- }
- return orElse();
- }
-
- @override
- @optionalTypeArgs
- TResult map({
- required TResult Function(ClosureReason_CounterpartyForceClosed value)
- counterpartyForceClosed,
- required TResult Function(ClosureReason_HolderForceClosed value)
- holderForceClosed,
- required TResult Function(ClosureReason_CooperativeClosure value)
- cooperativeClosure,
- required TResult Function(ClosureReason_CommitmentTxConfirmed value)
- commitmentTxConfirmed,
- required TResult Function(ClosureReason_FundingTimedOut value)
- fundingTimedOut,
- required TResult Function(ClosureReason_ProcessingError value)
- processingError,
- required TResult Function(ClosureReason_DisconnectedPeer value)
- disconnectedPeer,
- required TResult Function(ClosureReason_OutdatedChannelManager value)
- outdatedChannelManager,
- required TResult Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)
- counterpartyCoopClosedUnfundedChannel,
- required TResult Function(ClosureReason_FundingBatchClosure value)
- fundingBatchClosure,
- }) {
- return fundingBatchClosure(this);
- }
-
- @override
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult? Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult? Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult? Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult? Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult? Function(ClosureReason_ProcessingError value)? processingError,
- TResult? Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult? Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult? Function(
- ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult? Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
- }) {
- return fundingBatchClosure?.call(this);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(ClosureReason_CounterpartyForceClosed value)?
- counterpartyForceClosed,
- TResult Function(ClosureReason_HolderForceClosed value)? holderForceClosed,
- TResult Function(ClosureReason_CooperativeClosure value)?
- cooperativeClosure,
- TResult Function(ClosureReason_CommitmentTxConfirmed value)?
- commitmentTxConfirmed,
- TResult Function(ClosureReason_FundingTimedOut value)? fundingTimedOut,
- TResult Function(ClosureReason_ProcessingError value)? processingError,
- TResult Function(ClosureReason_DisconnectedPeer value)? disconnectedPeer,
- TResult Function(ClosureReason_OutdatedChannelManager value)?
- outdatedChannelManager,
- TResult Function(ClosureReason_CounterpartyCoopClosedUnfundedChannel value)?
- counterpartyCoopClosedUnfundedChannel,
- TResult Function(ClosureReason_FundingBatchClosure value)?
- fundingBatchClosure,
- required TResult orElse(),
- }) {
- if (fundingBatchClosure != null) {
- return fundingBatchClosure(this);
- }
- return orElse();
- }
-}
-
-abstract class ClosureReason_FundingBatchClosure implements ClosureReason {
- const factory ClosureReason_FundingBatchClosure() =
- _$ClosureReason_FundingBatchClosureImpl;
-}
-
-/// @nodoc
-mixin _$EntropySourceConfig {
- @optionalTypeArgs
- TResult when({
- required TResult Function(String field0) seedFile,
- required TResult Function(U8Array64 field0) seedBytes,
- required TResult Function(MnemonicBase mnemonic, String? passphrase)
- bip39Mnemonic,
- }) =>
- throw _privateConstructorUsedError;
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function(String field0)? seedFile,
- TResult? Function(U8Array64 field0)? seedBytes,
- TResult? Function(MnemonicBase mnemonic, String? passphrase)? bip39Mnemonic,
- }) =>
- throw _privateConstructorUsedError;
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function(String field0)? seedFile,
- TResult Function(U8Array64 field0)? seedBytes,
- TResult Function(MnemonicBase mnemonic, String? passphrase)? bip39Mnemonic,
- required TResult orElse(),
- }) =>
- throw _privateConstructorUsedError;
- @optionalTypeArgs
- TResult map({
- required TResult Function(EntropySourceConfig_SeedFile value) seedFile,
- required TResult Function(EntropySourceConfig_SeedBytes value) seedBytes,
- required TResult Function(EntropySourceConfig_Bip39Mnemonic value)
- bip39Mnemonic,
- }) =>
- throw _privateConstructorUsedError;
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(EntropySourceConfig_SeedFile value)? seedFile,
- TResult? Function(EntropySourceConfig_SeedBytes value)? seedBytes,
- TResult? Function(EntropySourceConfig_Bip39Mnemonic value)? bip39Mnemonic,
- }) =>
- throw _privateConstructorUsedError;
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(EntropySourceConfig_SeedFile value)? seedFile,
- TResult Function(EntropySourceConfig_SeedBytes value)? seedBytes,
- TResult Function(EntropySourceConfig_Bip39Mnemonic value)? bip39Mnemonic,
- required TResult orElse(),
- }) =>
- throw _privateConstructorUsedError;
-}
-
-/// @nodoc
-abstract class $EntropySourceConfigCopyWith<$Res> {
- factory $EntropySourceConfigCopyWith(
- EntropySourceConfig value, $Res Function(EntropySourceConfig) then) =
- _$EntropySourceConfigCopyWithImpl<$Res, EntropySourceConfig>;
-}
-
-/// @nodoc
-class _$EntropySourceConfigCopyWithImpl<$Res, $Val extends EntropySourceConfig>
- implements $EntropySourceConfigCopyWith<$Res> {
- _$EntropySourceConfigCopyWithImpl(this._value, this._then);
-
- // ignore: unused_field
- final $Val _value;
- // ignore: unused_field
- final $Res Function($Val) _then;
-}
-
-/// @nodoc
-abstract class _$$EntropySourceConfig_SeedFileImplCopyWith<$Res> {
- factory _$$EntropySourceConfig_SeedFileImplCopyWith(
- _$EntropySourceConfig_SeedFileImpl value,
- $Res Function(_$EntropySourceConfig_SeedFileImpl) then) =
- __$$EntropySourceConfig_SeedFileImplCopyWithImpl<$Res>;
- @useResult
- $Res call({String field0});
-}
-
-/// @nodoc
-class __$$EntropySourceConfig_SeedFileImplCopyWithImpl<$Res>
- extends _$EntropySourceConfigCopyWithImpl<$Res,
- _$EntropySourceConfig_SeedFileImpl>
- implements _$$EntropySourceConfig_SeedFileImplCopyWith<$Res> {
- __$$EntropySourceConfig_SeedFileImplCopyWithImpl(
- _$EntropySourceConfig_SeedFileImpl _value,
- $Res Function(_$EntropySourceConfig_SeedFileImpl) _then)
- : super(_value, _then);
-
- @pragma('vm:prefer-inline')
- @override
- $Res call({
- Object? field0 = null,
- }) {
- return _then(_$EntropySourceConfig_SeedFileImpl(
- null == field0
- ? _value.field0
- : field0 // ignore: cast_nullable_to_non_nullable
- as String,
- ));
- }
-}
-
-/// @nodoc
-
-class _$EntropySourceConfig_SeedFileImpl
- implements EntropySourceConfig_SeedFile {
- const _$EntropySourceConfig_SeedFileImpl(this.field0);
-
- @override
- final String field0;
-
- @override
- String toString() {
- return 'EntropySourceConfig.seedFile(field0: $field0)';
- }
-
- @override
- bool operator ==(Object other) {
- return identical(this, other) ||
- (other.runtimeType == runtimeType &&
- other is _$EntropySourceConfig_SeedFileImpl &&
- (identical(other.field0, field0) || other.field0 == field0));
- }
-
- @override
- int get hashCode => Object.hash(runtimeType, field0);
-
- @JsonKey(ignore: true)
- @override
- @pragma('vm:prefer-inline')
- _$$EntropySourceConfig_SeedFileImplCopyWith<
- _$EntropySourceConfig_SeedFileImpl>
- get copyWith => __$$EntropySourceConfig_SeedFileImplCopyWithImpl<
- _$EntropySourceConfig_SeedFileImpl>(this, _$identity);
-
- @override
- @optionalTypeArgs
- TResult when({
- required TResult Function(String field0) seedFile,
- required TResult Function(U8Array64 field0) seedBytes,
- required TResult Function(MnemonicBase mnemonic, String? passphrase)
- bip39Mnemonic,
- }) {
- return seedFile(field0);
- }
-
- @override
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function(String field0)? seedFile,
- TResult? Function(U8Array64 field0)? seedBytes,
- TResult? Function(MnemonicBase mnemonic, String? passphrase)? bip39Mnemonic,
- }) {
- return seedFile?.call(field0);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function(String field0)? seedFile,
- TResult Function(U8Array64 field0)? seedBytes,
- TResult Function(MnemonicBase mnemonic, String? passphrase)? bip39Mnemonic,
- required TResult orElse(),
- }) {
- if (seedFile != null) {
- return seedFile(field0);
- }
- return orElse();
- }
-
- @override
- @optionalTypeArgs
- TResult map({
- required TResult Function(EntropySourceConfig_SeedFile value) seedFile,
- required TResult Function(EntropySourceConfig_SeedBytes value) seedBytes,
- required TResult Function(EntropySourceConfig_Bip39Mnemonic value)
- bip39Mnemonic,
- }) {
- return seedFile(this);
- }
-
- @override
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(EntropySourceConfig_SeedFile value)? seedFile,
- TResult? Function(EntropySourceConfig_SeedBytes value)? seedBytes,
- TResult? Function(EntropySourceConfig_Bip39Mnemonic value)? bip39Mnemonic,
- }) {
- return seedFile?.call(this);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(EntropySourceConfig_SeedFile value)? seedFile,
- TResult Function(EntropySourceConfig_SeedBytes value)? seedBytes,
- TResult Function(EntropySourceConfig_Bip39Mnemonic value)? bip39Mnemonic,
- required TResult orElse(),
- }) {
- if (seedFile != null) {
- return seedFile(this);
- }
- return orElse();
- }
-}
-
-abstract class EntropySourceConfig_SeedFile implements EntropySourceConfig {
- const factory EntropySourceConfig_SeedFile(final String field0) =
- _$EntropySourceConfig_SeedFileImpl;
-
- String get field0;
- @JsonKey(ignore: true)
- _$$EntropySourceConfig_SeedFileImplCopyWith<
- _$EntropySourceConfig_SeedFileImpl>
- get copyWith => throw _privateConstructorUsedError;
-}
-
-/// @nodoc
-abstract class _$$EntropySourceConfig_SeedBytesImplCopyWith<$Res> {
- factory _$$EntropySourceConfig_SeedBytesImplCopyWith(
- _$EntropySourceConfig_SeedBytesImpl value,
- $Res Function(_$EntropySourceConfig_SeedBytesImpl) then) =
- __$$EntropySourceConfig_SeedBytesImplCopyWithImpl<$Res>;
- @useResult
- $Res call({U8Array64 field0});
-}
-
-/// @nodoc
-class __$$EntropySourceConfig_SeedBytesImplCopyWithImpl<$Res>
- extends _$EntropySourceConfigCopyWithImpl<$Res,
- _$EntropySourceConfig_SeedBytesImpl>
- implements _$$EntropySourceConfig_SeedBytesImplCopyWith<$Res> {
- __$$EntropySourceConfig_SeedBytesImplCopyWithImpl(
- _$EntropySourceConfig_SeedBytesImpl _value,
- $Res Function(_$EntropySourceConfig_SeedBytesImpl) _then)
- : super(_value, _then);
-
- @pragma('vm:prefer-inline')
- @override
- $Res call({
- Object? field0 = null,
- }) {
- return _then(_$EntropySourceConfig_SeedBytesImpl(
- null == field0
- ? _value.field0
- : field0 // ignore: cast_nullable_to_non_nullable
- as U8Array64,
- ));
- }
-}
-
-/// @nodoc
-
-class _$EntropySourceConfig_SeedBytesImpl
- implements EntropySourceConfig_SeedBytes {
- const _$EntropySourceConfig_SeedBytesImpl(this.field0);
-
- @override
- final U8Array64 field0;
-
- @override
- String toString() {
- return 'EntropySourceConfig.seedBytes(field0: $field0)';
- }
-
- @override
- bool operator ==(Object other) {
- return identical(this, other) ||
- (other.runtimeType == runtimeType &&
- other is _$EntropySourceConfig_SeedBytesImpl &&
- const DeepCollectionEquality().equals(other.field0, field0));
- }
-
- @override
- int get hashCode =>
- Object.hash(runtimeType, const DeepCollectionEquality().hash(field0));
-
- @JsonKey(ignore: true)
- @override
- @pragma('vm:prefer-inline')
- _$$EntropySourceConfig_SeedBytesImplCopyWith<
- _$EntropySourceConfig_SeedBytesImpl>
- get copyWith => __$$EntropySourceConfig_SeedBytesImplCopyWithImpl<
- _$EntropySourceConfig_SeedBytesImpl>(this, _$identity);
-
- @override
- @optionalTypeArgs
- TResult when({
- required TResult Function(String field0) seedFile,
- required TResult Function(U8Array64 field0) seedBytes,
- required TResult Function(MnemonicBase mnemonic, String? passphrase)
- bip39Mnemonic,
- }) {
- return seedBytes(field0);
- }
-
- @override
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function(String field0)? seedFile,
- TResult? Function(U8Array64 field0)? seedBytes,
- TResult? Function(MnemonicBase mnemonic, String? passphrase)? bip39Mnemonic,
- }) {
- return seedBytes?.call(field0);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function(String field0)? seedFile,
- TResult Function(U8Array64 field0)? seedBytes,
- TResult Function(MnemonicBase mnemonic, String? passphrase)? bip39Mnemonic,
- required TResult orElse(),
- }) {
- if (seedBytes != null) {
- return seedBytes(field0);
- }
- return orElse();
- }
-
- @override
- @optionalTypeArgs
- TResult map({
- required TResult Function(EntropySourceConfig_SeedFile value) seedFile,
- required TResult Function(EntropySourceConfig_SeedBytes value) seedBytes,
- required TResult Function(EntropySourceConfig_Bip39Mnemonic value)
- bip39Mnemonic,
- }) {
- return seedBytes(this);
- }
-
- @override
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(EntropySourceConfig_SeedFile value)? seedFile,
- TResult? Function(EntropySourceConfig_SeedBytes value)? seedBytes,
- TResult? Function(EntropySourceConfig_Bip39Mnemonic value)? bip39Mnemonic,
- }) {
- return seedBytes?.call(this);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(EntropySourceConfig_SeedFile value)? seedFile,
- TResult Function(EntropySourceConfig_SeedBytes value)? seedBytes,
- TResult Function(EntropySourceConfig_Bip39Mnemonic value)? bip39Mnemonic,
- required TResult orElse(),
- }) {
- if (seedBytes != null) {
- return seedBytes(this);
- }
- return orElse();
- }
-}
-
-abstract class EntropySourceConfig_SeedBytes implements EntropySourceConfig {
- const factory EntropySourceConfig_SeedBytes(final U8Array64 field0) =
- _$EntropySourceConfig_SeedBytesImpl;
-
- U8Array64 get field0;
- @JsonKey(ignore: true)
- _$$EntropySourceConfig_SeedBytesImplCopyWith<
- _$EntropySourceConfig_SeedBytesImpl>
- get copyWith => throw _privateConstructorUsedError;
-}
-
-/// @nodoc
-abstract class _$$EntropySourceConfig_Bip39MnemonicImplCopyWith<$Res> {
- factory _$$EntropySourceConfig_Bip39MnemonicImplCopyWith(
- _$EntropySourceConfig_Bip39MnemonicImpl value,
- $Res Function(_$EntropySourceConfig_Bip39MnemonicImpl) then) =
- __$$EntropySourceConfig_Bip39MnemonicImplCopyWithImpl<$Res>;
- @useResult
- $Res call({MnemonicBase mnemonic, String? passphrase});
-}
-
-/// @nodoc
-class __$$EntropySourceConfig_Bip39MnemonicImplCopyWithImpl<$Res>
- extends _$EntropySourceConfigCopyWithImpl<$Res,
- _$EntropySourceConfig_Bip39MnemonicImpl>
- implements _$$EntropySourceConfig_Bip39MnemonicImplCopyWith<$Res> {
- __$$EntropySourceConfig_Bip39MnemonicImplCopyWithImpl(
- _$EntropySourceConfig_Bip39MnemonicImpl _value,
- $Res Function(_$EntropySourceConfig_Bip39MnemonicImpl) _then)
- : super(_value, _then);
-
- @pragma('vm:prefer-inline')
- @override
- $Res call({
- Object? mnemonic = null,
- Object? passphrase = freezed,
- }) {
- return _then(_$EntropySourceConfig_Bip39MnemonicImpl(
- mnemonic: null == mnemonic
- ? _value.mnemonic
- : mnemonic // ignore: cast_nullable_to_non_nullable
- as MnemonicBase,
- passphrase: freezed == passphrase
- ? _value.passphrase
- : passphrase // ignore: cast_nullable_to_non_nullable
- as String?,
- ));
- }
-}
-
-/// @nodoc
-
-class _$EntropySourceConfig_Bip39MnemonicImpl
- implements EntropySourceConfig_Bip39Mnemonic {
- const _$EntropySourceConfig_Bip39MnemonicImpl(
- {required this.mnemonic, this.passphrase});
-
- @override
- final MnemonicBase mnemonic;
- @override
- final String? passphrase;
-
- @override
- String toString() {
- return 'EntropySourceConfig.bip39Mnemonic(mnemonic: $mnemonic, passphrase: $passphrase)';
- }
-
- @override
- bool operator ==(Object other) {
- return identical(this, other) ||
- (other.runtimeType == runtimeType &&
- other is _$EntropySourceConfig_Bip39MnemonicImpl &&
- (identical(other.mnemonic, mnemonic) ||
- other.mnemonic == mnemonic) &&
- (identical(other.passphrase, passphrase) ||
- other.passphrase == passphrase));
- }
-
- @override
- int get hashCode => Object.hash(runtimeType, mnemonic, passphrase);
-
- @JsonKey(ignore: true)
- @override
- @pragma('vm:prefer-inline')
- _$$EntropySourceConfig_Bip39MnemonicImplCopyWith<
- _$EntropySourceConfig_Bip39MnemonicImpl>
- get copyWith => __$$EntropySourceConfig_Bip39MnemonicImplCopyWithImpl<
- _$EntropySourceConfig_Bip39MnemonicImpl>(this, _$identity);
-
- @override
- @optionalTypeArgs
- TResult when({
- required TResult Function(String field0) seedFile,
- required TResult Function(U8Array64 field0) seedBytes,
- required TResult Function(MnemonicBase mnemonic, String? passphrase)
- bip39Mnemonic,
- }) {
- return bip39Mnemonic(mnemonic, passphrase);
- }
-
- @override
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function(String field0)? seedFile,
- TResult? Function(U8Array64 field0)? seedBytes,
- TResult? Function(MnemonicBase mnemonic, String? passphrase)? bip39Mnemonic,
- }) {
- return bip39Mnemonic?.call(mnemonic, passphrase);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function(String field0)? seedFile,
- TResult Function(U8Array64 field0)? seedBytes,
- TResult Function(MnemonicBase mnemonic, String? passphrase)? bip39Mnemonic,
- required TResult orElse(),
- }) {
- if (bip39Mnemonic != null) {
- return bip39Mnemonic(mnemonic, passphrase);
- }
- return orElse();
- }
-
- @override
- @optionalTypeArgs
- TResult map({
- required TResult Function(EntropySourceConfig_SeedFile value) seedFile,
- required TResult Function(EntropySourceConfig_SeedBytes value) seedBytes,
- required TResult Function(EntropySourceConfig_Bip39Mnemonic value)
- bip39Mnemonic,
- }) {
- return bip39Mnemonic(this);
- }
-
- @override
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(EntropySourceConfig_SeedFile value)? seedFile,
- TResult? Function(EntropySourceConfig_SeedBytes value)? seedBytes,
- TResult? Function(EntropySourceConfig_Bip39Mnemonic value)? bip39Mnemonic,
- }) {
- return bip39Mnemonic?.call(this);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(EntropySourceConfig_SeedFile value)? seedFile,
- TResult Function(EntropySourceConfig_SeedBytes value)? seedBytes,
- TResult Function(EntropySourceConfig_Bip39Mnemonic value)? bip39Mnemonic,
- required TResult orElse(),
- }) {
- if (bip39Mnemonic != null) {
- return bip39Mnemonic(this);
- }
- return orElse();
- }
-}
-
-abstract class EntropySourceConfig_Bip39Mnemonic
- implements EntropySourceConfig {
- const factory EntropySourceConfig_Bip39Mnemonic(
- {required final MnemonicBase mnemonic,
- final String? passphrase}) = _$EntropySourceConfig_Bip39MnemonicImpl;
-
- MnemonicBase get mnemonic;
- String? get passphrase;
- @JsonKey(ignore: true)
- _$$EntropySourceConfig_Bip39MnemonicImplCopyWith<
- _$EntropySourceConfig_Bip39MnemonicImpl>
- get copyWith => throw _privateConstructorUsedError;
-}
-
-/// @nodoc
-mixin _$Event {
- @optionalTypeArgs
- TResult when({
- required TResult Function(PaymentHash paymentHash, int? feePaidMsat)
- paymentSuccessful,
- required TResult Function(
- PaymentHash paymentHash, PaymentFailureReason? reason)
- paymentFailed,
- required TResult Function(PaymentHash paymentHash, int amountMsat)
- paymentReceived,
- required TResult Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)
- channelPending,
- required TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)
- channelReady,
- required TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)
- channelClosed,
- }) =>
- throw _privateConstructorUsedError;
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function(PaymentHash paymentHash, int? feePaidMsat)?
- paymentSuccessful,
- TResult? Function(PaymentHash paymentHash, PaymentFailureReason? reason)?
- paymentFailed,
- TResult? Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
- TResult? Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)?
- channelPending,
- TResult? Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)?
- channelReady,
- TResult? Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)?
- channelClosed,
- }) =>
- throw _privateConstructorUsedError;
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function(PaymentHash paymentHash, int? feePaidMsat)?
- paymentSuccessful,
- TResult Function(PaymentHash paymentHash, PaymentFailureReason? reason)?
- paymentFailed,
- TResult Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
- TResult Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)?
- channelPending,
- TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)?
- channelReady,
- TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)?
- channelClosed,
- required TResult orElse(),
- }) =>
- throw _privateConstructorUsedError;
- @optionalTypeArgs
- TResult map({
- required TResult Function(Event_PaymentSuccessful value) paymentSuccessful,
- required TResult Function(Event_PaymentFailed value) paymentFailed,
- required TResult Function(Event_PaymentReceived value) paymentReceived,
- required TResult Function(Event_ChannelPending value) channelPending,
- required TResult Function(Event_ChannelReady value) channelReady,
- required TResult Function(Event_ChannelClosed value) channelClosed,
- }) =>
- throw _privateConstructorUsedError;
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(Event_PaymentSuccessful value)? paymentSuccessful,
- TResult? Function(Event_PaymentFailed value)? paymentFailed,
- TResult? Function(Event_PaymentReceived value)? paymentReceived,
- TResult? Function(Event_ChannelPending value)? channelPending,
- TResult? Function(Event_ChannelReady value)? channelReady,
- TResult? Function(Event_ChannelClosed value)? channelClosed,
- }) =>
- throw _privateConstructorUsedError;
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(Event_PaymentSuccessful value)? paymentSuccessful,
- TResult Function(Event_PaymentFailed value)? paymentFailed,
- TResult Function(Event_PaymentReceived value)? paymentReceived,
- TResult Function(Event_ChannelPending value)? channelPending,
- TResult Function(Event_ChannelReady value)? channelReady,
- TResult Function(Event_ChannelClosed value)? channelClosed,
- required TResult orElse(),
- }) =>
- throw _privateConstructorUsedError;
-}
-
-/// @nodoc
-abstract class $EventCopyWith<$Res> {
- factory $EventCopyWith(Event value, $Res Function(Event) then) =
- _$EventCopyWithImpl<$Res, Event>;
-}
-
-/// @nodoc
-class _$EventCopyWithImpl<$Res, $Val extends Event>
- implements $EventCopyWith<$Res> {
- _$EventCopyWithImpl(this._value, this._then);
-
- // ignore: unused_field
- final $Val _value;
- // ignore: unused_field
- final $Res Function($Val) _then;
-}
-
-/// @nodoc
-abstract class _$$Event_PaymentSuccessfulImplCopyWith<$Res> {
- factory _$$Event_PaymentSuccessfulImplCopyWith(
- _$Event_PaymentSuccessfulImpl value,
- $Res Function(_$Event_PaymentSuccessfulImpl) then) =
- __$$Event_PaymentSuccessfulImplCopyWithImpl<$Res>;
- @useResult
- $Res call({PaymentHash paymentHash, int? feePaidMsat});
-}
-
-/// @nodoc
-class __$$Event_PaymentSuccessfulImplCopyWithImpl<$Res>
- extends _$EventCopyWithImpl<$Res, _$Event_PaymentSuccessfulImpl>
- implements _$$Event_PaymentSuccessfulImplCopyWith<$Res> {
- __$$Event_PaymentSuccessfulImplCopyWithImpl(
- _$Event_PaymentSuccessfulImpl _value,
- $Res Function(_$Event_PaymentSuccessfulImpl) _then)
- : super(_value, _then);
-
- @pragma('vm:prefer-inline')
- @override
- $Res call({
- Object? paymentHash = null,
- Object? feePaidMsat = freezed,
- }) {
- return _then(_$Event_PaymentSuccessfulImpl(
- paymentHash: null == paymentHash
- ? _value.paymentHash
- : paymentHash // ignore: cast_nullable_to_non_nullable
- as PaymentHash,
- feePaidMsat: freezed == feePaidMsat
- ? _value.feePaidMsat
- : feePaidMsat // ignore: cast_nullable_to_non_nullable
- as int?,
- ));
- }
-}
-
-/// @nodoc
-
-class _$Event_PaymentSuccessfulImpl implements Event_PaymentSuccessful {
- const _$Event_PaymentSuccessfulImpl(
- {required this.paymentHash, this.feePaidMsat});
-
- /// The hash of the payment.
- @override
- final PaymentHash paymentHash;
-
- /// The total fee which was spent at intermediate hops in this payment.
- @override
- final int? feePaidMsat;
-
- @override
- String toString() {
- return 'Event.paymentSuccessful(paymentHash: $paymentHash, feePaidMsat: $feePaidMsat)';
- }
-
- @override
- bool operator ==(Object other) {
- return identical(this, other) ||
- (other.runtimeType == runtimeType &&
- other is _$Event_PaymentSuccessfulImpl &&
- (identical(other.paymentHash, paymentHash) ||
- other.paymentHash == paymentHash) &&
- (identical(other.feePaidMsat, feePaidMsat) ||
- other.feePaidMsat == feePaidMsat));
- }
-
- @override
- int get hashCode => Object.hash(runtimeType, paymentHash, feePaidMsat);
-
- @JsonKey(ignore: true)
- @override
- @pragma('vm:prefer-inline')
- _$$Event_PaymentSuccessfulImplCopyWith<_$Event_PaymentSuccessfulImpl>
- get copyWith => __$$Event_PaymentSuccessfulImplCopyWithImpl<
- _$Event_PaymentSuccessfulImpl>(this, _$identity);
-
- @override
- @optionalTypeArgs
- TResult when({
- required TResult Function(PaymentHash paymentHash, int? feePaidMsat)
- paymentSuccessful,
- required TResult Function(
- PaymentHash paymentHash, PaymentFailureReason? reason)
- paymentFailed,
- required TResult Function(PaymentHash paymentHash, int amountMsat)
- paymentReceived,
- required TResult Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)
- channelPending,
- required TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)
- channelReady,
- required TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)
- channelClosed,
- }) {
- return paymentSuccessful(paymentHash, feePaidMsat);
- }
-
- @override
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function(PaymentHash paymentHash, int? feePaidMsat)?
- paymentSuccessful,
- TResult? Function(PaymentHash paymentHash, PaymentFailureReason? reason)?
- paymentFailed,
- TResult? Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
- TResult? Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)?
- channelPending,
- TResult? Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)?
- channelReady,
- TResult? Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)?
- channelClosed,
- }) {
- return paymentSuccessful?.call(paymentHash, feePaidMsat);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function(PaymentHash paymentHash, int? feePaidMsat)?
- paymentSuccessful,
- TResult Function(PaymentHash paymentHash, PaymentFailureReason? reason)?
- paymentFailed,
- TResult Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
- TResult Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)?
- channelPending,
- TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)?
- channelReady,
- TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)?
- channelClosed,
- required TResult orElse(),
- }) {
- if (paymentSuccessful != null) {
- return paymentSuccessful(paymentHash, feePaidMsat);
- }
- return orElse();
- }
-
- @override
- @optionalTypeArgs
- TResult map({
- required TResult Function(Event_PaymentSuccessful value) paymentSuccessful,
- required TResult Function(Event_PaymentFailed value) paymentFailed,
- required TResult Function(Event_PaymentReceived value) paymentReceived,
- required TResult Function(Event_ChannelPending value) channelPending,
- required TResult Function(Event_ChannelReady value) channelReady,
- required TResult Function(Event_ChannelClosed value) channelClosed,
- }) {
- return paymentSuccessful(this);
- }
-
- @override
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(Event_PaymentSuccessful value)? paymentSuccessful,
- TResult? Function(Event_PaymentFailed value)? paymentFailed,
- TResult? Function(Event_PaymentReceived value)? paymentReceived,
- TResult? Function(Event_ChannelPending value)? channelPending,
- TResult? Function(Event_ChannelReady value)? channelReady,
- TResult? Function(Event_ChannelClosed value)? channelClosed,
- }) {
- return paymentSuccessful?.call(this);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(Event_PaymentSuccessful value)? paymentSuccessful,
- TResult Function(Event_PaymentFailed value)? paymentFailed,
- TResult Function(Event_PaymentReceived value)? paymentReceived,
- TResult Function(Event_ChannelPending value)? channelPending,
- TResult Function(Event_ChannelReady value)? channelReady,
- TResult Function(Event_ChannelClosed value)? channelClosed,
- required TResult orElse(),
- }) {
- if (paymentSuccessful != null) {
- return paymentSuccessful(this);
- }
- return orElse();
- }
-}
-
-abstract class Event_PaymentSuccessful implements Event {
- const factory Event_PaymentSuccessful(
- {required final PaymentHash paymentHash,
- final int? feePaidMsat}) = _$Event_PaymentSuccessfulImpl;
-
- /// The hash of the payment.
- PaymentHash get paymentHash;
-
- /// The total fee which was spent at intermediate hops in this payment.
- int? get feePaidMsat;
- @JsonKey(ignore: true)
- _$$Event_PaymentSuccessfulImplCopyWith<_$Event_PaymentSuccessfulImpl>
- get copyWith => throw _privateConstructorUsedError;
-}
-
-/// @nodoc
-abstract class _$$Event_PaymentFailedImplCopyWith<$Res> {
- factory _$$Event_PaymentFailedImplCopyWith(_$Event_PaymentFailedImpl value,
- $Res Function(_$Event_PaymentFailedImpl) then) =
- __$$Event_PaymentFailedImplCopyWithImpl<$Res>;
- @useResult
- $Res call({PaymentHash paymentHash, PaymentFailureReason? reason});
-}
-
-/// @nodoc
-class __$$Event_PaymentFailedImplCopyWithImpl<$Res>
- extends _$EventCopyWithImpl<$Res, _$Event_PaymentFailedImpl>
- implements _$$Event_PaymentFailedImplCopyWith<$Res> {
- __$$Event_PaymentFailedImplCopyWithImpl(_$Event_PaymentFailedImpl _value,
- $Res Function(_$Event_PaymentFailedImpl) _then)
- : super(_value, _then);
-
- @pragma('vm:prefer-inline')
- @override
- $Res call({
- Object? paymentHash = null,
- Object? reason = freezed,
- }) {
- return _then(_$Event_PaymentFailedImpl(
- paymentHash: null == paymentHash
- ? _value.paymentHash
- : paymentHash // ignore: cast_nullable_to_non_nullable
- as PaymentHash,
- reason: freezed == reason
- ? _value.reason
- : reason // ignore: cast_nullable_to_non_nullable
- as PaymentFailureReason?,
- ));
- }
-}
-
-/// @nodoc
-
-class _$Event_PaymentFailedImpl implements Event_PaymentFailed {
- const _$Event_PaymentFailedImpl({required this.paymentHash, this.reason});
-
- /// The hash of the payment.
- @override
- final PaymentHash paymentHash;
-
- /// The reason why the payment failed.
- ///
- /// This will be `None` for events serialized by LDK Node v0.2.1 and prior.
- @override
- final PaymentFailureReason? reason;
-
- @override
- String toString() {
- return 'Event.paymentFailed(paymentHash: $paymentHash, reason: $reason)';
- }
-
- @override
- bool operator ==(Object other) {
- return identical(this, other) ||
- (other.runtimeType == runtimeType &&
- other is _$Event_PaymentFailedImpl &&
- (identical(other.paymentHash, paymentHash) ||
- other.paymentHash == paymentHash) &&
- (identical(other.reason, reason) || other.reason == reason));
- }
-
- @override
- int get hashCode => Object.hash(runtimeType, paymentHash, reason);
-
- @JsonKey(ignore: true)
- @override
- @pragma('vm:prefer-inline')
- _$$Event_PaymentFailedImplCopyWith<_$Event_PaymentFailedImpl> get copyWith =>
- __$$Event_PaymentFailedImplCopyWithImpl<_$Event_PaymentFailedImpl>(
- this, _$identity);
-
- @override
- @optionalTypeArgs
- TResult when({
- required TResult Function(PaymentHash paymentHash, int? feePaidMsat)
- paymentSuccessful,
- required TResult Function(
- PaymentHash paymentHash, PaymentFailureReason? reason)
- paymentFailed,
- required TResult Function(PaymentHash paymentHash, int amountMsat)
- paymentReceived,
- required TResult Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)
- channelPending,
- required TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)
- channelReady,
- required TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)
- channelClosed,
- }) {
- return paymentFailed(paymentHash, reason);
- }
-
- @override
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function(PaymentHash paymentHash, int? feePaidMsat)?
- paymentSuccessful,
- TResult? Function(PaymentHash paymentHash, PaymentFailureReason? reason)?
- paymentFailed,
- TResult? Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
- TResult? Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)?
- channelPending,
- TResult? Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)?
- channelReady,
- TResult? Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)?
- channelClosed,
- }) {
- return paymentFailed?.call(paymentHash, reason);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function(PaymentHash paymentHash, int? feePaidMsat)?
- paymentSuccessful,
- TResult Function(PaymentHash paymentHash, PaymentFailureReason? reason)?
- paymentFailed,
- TResult Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
- TResult Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)?
- channelPending,
- TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)?
- channelReady,
- TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)?
- channelClosed,
- required TResult orElse(),
- }) {
- if (paymentFailed != null) {
- return paymentFailed(paymentHash, reason);
- }
- return orElse();
- }
-
- @override
- @optionalTypeArgs
- TResult map({
- required TResult Function(Event_PaymentSuccessful value) paymentSuccessful,
- required TResult Function(Event_PaymentFailed value) paymentFailed,
- required TResult Function(Event_PaymentReceived value) paymentReceived,
- required TResult Function(Event_ChannelPending value) channelPending,
- required TResult Function(Event_ChannelReady value) channelReady,
- required TResult Function(Event_ChannelClosed value) channelClosed,
- }) {
- return paymentFailed(this);
- }
-
- @override
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(Event_PaymentSuccessful value)? paymentSuccessful,
- TResult? Function(Event_PaymentFailed value)? paymentFailed,
- TResult? Function(Event_PaymentReceived value)? paymentReceived,
- TResult? Function(Event_ChannelPending value)? channelPending,
- TResult? Function(Event_ChannelReady value)? channelReady,
- TResult? Function(Event_ChannelClosed value)? channelClosed,
- }) {
- return paymentFailed?.call(this);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(Event_PaymentSuccessful value)? paymentSuccessful,
- TResult Function(Event_PaymentFailed value)? paymentFailed,
- TResult Function(Event_PaymentReceived value)? paymentReceived,
- TResult Function(Event_ChannelPending value)? channelPending,
- TResult Function(Event_ChannelReady value)? channelReady,
- TResult Function(Event_ChannelClosed value)? channelClosed,
- required TResult orElse(),
- }) {
- if (paymentFailed != null) {
- return paymentFailed(this);
- }
- return orElse();
- }
-}
-
-abstract class Event_PaymentFailed implements Event {
- const factory Event_PaymentFailed(
- {required final PaymentHash paymentHash,
- final PaymentFailureReason? reason}) = _$Event_PaymentFailedImpl;
-
- /// The hash of the payment.
- PaymentHash get paymentHash;
-
- /// The reason why the payment failed.
- ///
- /// This will be `None` for events serialized by LDK Node v0.2.1 and prior.
- PaymentFailureReason? get reason;
- @JsonKey(ignore: true)
- _$$Event_PaymentFailedImplCopyWith<_$Event_PaymentFailedImpl> get copyWith =>
- throw _privateConstructorUsedError;
-}
-
-/// @nodoc
-abstract class _$$Event_PaymentReceivedImplCopyWith<$Res> {
- factory _$$Event_PaymentReceivedImplCopyWith(
- _$Event_PaymentReceivedImpl value,
- $Res Function(_$Event_PaymentReceivedImpl) then) =
- __$$Event_PaymentReceivedImplCopyWithImpl<$Res>;
- @useResult
- $Res call({PaymentHash paymentHash, int amountMsat});
-}
-
-/// @nodoc
-class __$$Event_PaymentReceivedImplCopyWithImpl<$Res>
- extends _$EventCopyWithImpl<$Res, _$Event_PaymentReceivedImpl>
- implements _$$Event_PaymentReceivedImplCopyWith<$Res> {
- __$$Event_PaymentReceivedImplCopyWithImpl(_$Event_PaymentReceivedImpl _value,
- $Res Function(_$Event_PaymentReceivedImpl) _then)
- : super(_value, _then);
-
- @pragma('vm:prefer-inline')
- @override
- $Res call({
- Object? paymentHash = null,
- Object? amountMsat = null,
- }) {
- return _then(_$Event_PaymentReceivedImpl(
- paymentHash: null == paymentHash
- ? _value.paymentHash
- : paymentHash // ignore: cast_nullable_to_non_nullable
- as PaymentHash,
- amountMsat: null == amountMsat
- ? _value.amountMsat
- : amountMsat // ignore: cast_nullable_to_non_nullable
- as int,
- ));
- }
-}
-
-/// @nodoc
-
-class _$Event_PaymentReceivedImpl implements Event_PaymentReceived {
- const _$Event_PaymentReceivedImpl(
- {required this.paymentHash, required this.amountMsat});
-
- /// The hash of the payment.
- @override
- final PaymentHash paymentHash;
-
- /// The value, in thousandths of a satoshi, that has been received.
- @override
- final int amountMsat;
-
- @override
- String toString() {
- return 'Event.paymentReceived(paymentHash: $paymentHash, amountMsat: $amountMsat)';
- }
-
- @override
- bool operator ==(Object other) {
- return identical(this, other) ||
- (other.runtimeType == runtimeType &&
- other is _$Event_PaymentReceivedImpl &&
- (identical(other.paymentHash, paymentHash) ||
- other.paymentHash == paymentHash) &&
- (identical(other.amountMsat, amountMsat) ||
- other.amountMsat == amountMsat));
- }
-
- @override
- int get hashCode => Object.hash(runtimeType, paymentHash, amountMsat);
-
- @JsonKey(ignore: true)
- @override
- @pragma('vm:prefer-inline')
- _$$Event_PaymentReceivedImplCopyWith<_$Event_PaymentReceivedImpl>
- get copyWith => __$$Event_PaymentReceivedImplCopyWithImpl<
- _$Event_PaymentReceivedImpl>(this, _$identity);
-
- @override
- @optionalTypeArgs
- TResult when({
- required TResult Function(PaymentHash paymentHash, int? feePaidMsat)
- paymentSuccessful,
- required TResult Function(
- PaymentHash paymentHash, PaymentFailureReason? reason)
- paymentFailed,
- required TResult Function(PaymentHash paymentHash, int amountMsat)
- paymentReceived,
- required TResult Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)
- channelPending,
- required TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)
- channelReady,
- required TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)
- channelClosed,
- }) {
- return paymentReceived(paymentHash, amountMsat);
- }
-
- @override
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function(PaymentHash paymentHash, int? feePaidMsat)?
- paymentSuccessful,
- TResult? Function(PaymentHash paymentHash, PaymentFailureReason? reason)?
- paymentFailed,
- TResult? Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
- TResult? Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)?
- channelPending,
- TResult? Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)?
- channelReady,
- TResult? Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)?
- channelClosed,
- }) {
- return paymentReceived?.call(paymentHash, amountMsat);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function(PaymentHash paymentHash, int? feePaidMsat)?
- paymentSuccessful,
- TResult Function(PaymentHash paymentHash, PaymentFailureReason? reason)?
- paymentFailed,
- TResult Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
- TResult Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)?
- channelPending,
- TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)?
- channelReady,
- TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)?
- channelClosed,
- required TResult orElse(),
- }) {
- if (paymentReceived != null) {
- return paymentReceived(paymentHash, amountMsat);
- }
- return orElse();
- }
-
- @override
- @optionalTypeArgs
- TResult map({
- required TResult Function(Event_PaymentSuccessful value) paymentSuccessful,
- required TResult Function(Event_PaymentFailed value) paymentFailed,
- required TResult Function(Event_PaymentReceived value) paymentReceived,
- required TResult Function(Event_ChannelPending value) channelPending,
- required TResult Function(Event_ChannelReady value) channelReady,
- required TResult Function(Event_ChannelClosed value) channelClosed,
- }) {
- return paymentReceived(this);
- }
-
- @override
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(Event_PaymentSuccessful value)? paymentSuccessful,
- TResult? Function(Event_PaymentFailed value)? paymentFailed,
- TResult? Function(Event_PaymentReceived value)? paymentReceived,
- TResult? Function(Event_ChannelPending value)? channelPending,
- TResult? Function(Event_ChannelReady value)? channelReady,
- TResult? Function(Event_ChannelClosed value)? channelClosed,
- }) {
- return paymentReceived?.call(this);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(Event_PaymentSuccessful value)? paymentSuccessful,
- TResult Function(Event_PaymentFailed value)? paymentFailed,
- TResult Function(Event_PaymentReceived value)? paymentReceived,
- TResult Function(Event_ChannelPending value)? channelPending,
- TResult Function(Event_ChannelReady value)? channelReady,
- TResult Function(Event_ChannelClosed value)? channelClosed,
- required TResult orElse(),
- }) {
- if (paymentReceived != null) {
- return paymentReceived(this);
- }
- return orElse();
- }
-}
-
-abstract class Event_PaymentReceived implements Event {
- const factory Event_PaymentReceived(
- {required final PaymentHash paymentHash,
- required final int amountMsat}) = _$Event_PaymentReceivedImpl;
-
- /// The hash of the payment.
- PaymentHash get paymentHash;
-
- /// The value, in thousandths of a satoshi, that has been received.
- int get amountMsat;
- @JsonKey(ignore: true)
- _$$Event_PaymentReceivedImplCopyWith<_$Event_PaymentReceivedImpl>
- get copyWith => throw _privateConstructorUsedError;
-}
-
-/// @nodoc
-abstract class _$$Event_ChannelPendingImplCopyWith<$Res> {
- factory _$$Event_ChannelPendingImplCopyWith(_$Event_ChannelPendingImpl value,
- $Res Function(_$Event_ChannelPendingImpl) then) =
- __$$Event_ChannelPendingImplCopyWithImpl<$Res>;
- @useResult
- $Res call(
- {ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo});
-}
-
-/// @nodoc
-class __$$Event_ChannelPendingImplCopyWithImpl<$Res>
- extends _$EventCopyWithImpl<$Res, _$Event_ChannelPendingImpl>
- implements _$$Event_ChannelPendingImplCopyWith<$Res> {
- __$$Event_ChannelPendingImplCopyWithImpl(_$Event_ChannelPendingImpl _value,
- $Res Function(_$Event_ChannelPendingImpl) _then)
- : super(_value, _then);
-
- @pragma('vm:prefer-inline')
- @override
- $Res call({
- Object? channelId = null,
- Object? userChannelId = null,
- Object? formerTemporaryChannelId = null,
- Object? counterpartyNodeId = null,
- Object? fundingTxo = null,
- }) {
- return _then(_$Event_ChannelPendingImpl(
- channelId: null == channelId
- ? _value.channelId
- : channelId // ignore: cast_nullable_to_non_nullable
- as ChannelId,
- userChannelId: null == userChannelId
- ? _value.userChannelId
- : userChannelId // ignore: cast_nullable_to_non_nullable
- as UserChannelId,
- formerTemporaryChannelId: null == formerTemporaryChannelId
- ? _value.formerTemporaryChannelId
- : formerTemporaryChannelId // ignore: cast_nullable_to_non_nullable
- as ChannelId,
- counterpartyNodeId: null == counterpartyNodeId
- ? _value.counterpartyNodeId
- : counterpartyNodeId // ignore: cast_nullable_to_non_nullable
- as PublicKey,
- fundingTxo: null == fundingTxo
- ? _value.fundingTxo
- : fundingTxo // ignore: cast_nullable_to_non_nullable
- as OutPoint,
- ));
- }
-}
-
-/// @nodoc
-
-class _$Event_ChannelPendingImpl implements Event_ChannelPending {
- const _$Event_ChannelPendingImpl(
- {required this.channelId,
- required this.userChannelId,
- required this.formerTemporaryChannelId,
- required this.counterpartyNodeId,
- required this.fundingTxo});
-
- /// The `channel_id` of the channel.
- @override
- final ChannelId channelId;
-
- /// The `user_channel_id` of the channel.
- @override
- final UserChannelId userChannelId;
-
- /// The `temporary_channel_id` this channel used to be known by during channel establishment.
- @override
- final ChannelId formerTemporaryChannelId;
-
- /// The `node_id` of the channel counterparty.
- @override
- final PublicKey counterpartyNodeId;
-
- /// The outpoint of the channel's funding transaction.
- @override
- final OutPoint fundingTxo;
-
- @override
- String toString() {
- return 'Event.channelPending(channelId: $channelId, userChannelId: $userChannelId, formerTemporaryChannelId: $formerTemporaryChannelId, counterpartyNodeId: $counterpartyNodeId, fundingTxo: $fundingTxo)';
- }
-
- @override
- bool operator ==(Object other) {
- return identical(this, other) ||
- (other.runtimeType == runtimeType &&
- other is _$Event_ChannelPendingImpl &&
- (identical(other.channelId, channelId) ||
- other.channelId == channelId) &&
- (identical(other.userChannelId, userChannelId) ||
- other.userChannelId == userChannelId) &&
- (identical(
- other.formerTemporaryChannelId, formerTemporaryChannelId) ||
- other.formerTemporaryChannelId == formerTemporaryChannelId) &&
- (identical(other.counterpartyNodeId, counterpartyNodeId) ||
- other.counterpartyNodeId == counterpartyNodeId) &&
- (identical(other.fundingTxo, fundingTxo) ||
- other.fundingTxo == fundingTxo));
- }
-
- @override
- int get hashCode => Object.hash(runtimeType, channelId, userChannelId,
- formerTemporaryChannelId, counterpartyNodeId, fundingTxo);
-
- @JsonKey(ignore: true)
- @override
- @pragma('vm:prefer-inline')
- _$$Event_ChannelPendingImplCopyWith<_$Event_ChannelPendingImpl>
- get copyWith =>
- __$$Event_ChannelPendingImplCopyWithImpl<_$Event_ChannelPendingImpl>(
- this, _$identity);
-
- @override
- @optionalTypeArgs
- TResult when({
- required TResult Function(PaymentHash paymentHash, int? feePaidMsat)
- paymentSuccessful,
- required TResult Function(
- PaymentHash paymentHash, PaymentFailureReason? reason)
- paymentFailed,
- required TResult Function(PaymentHash paymentHash, int amountMsat)
- paymentReceived,
- required TResult Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)
- channelPending,
- required TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)
- channelReady,
- required TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)
- channelClosed,
- }) {
- return channelPending(channelId, userChannelId, formerTemporaryChannelId,
- counterpartyNodeId, fundingTxo);
- }
-
- @override
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function(PaymentHash paymentHash, int? feePaidMsat)?
- paymentSuccessful,
- TResult? Function(PaymentHash paymentHash, PaymentFailureReason? reason)?
- paymentFailed,
- TResult? Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
- TResult? Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)?
- channelPending,
- TResult? Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)?
- channelReady,
- TResult? Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)?
- channelClosed,
- }) {
- return channelPending?.call(channelId, userChannelId,
- formerTemporaryChannelId, counterpartyNodeId, fundingTxo);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function(PaymentHash paymentHash, int? feePaidMsat)?
- paymentSuccessful,
- TResult Function(PaymentHash paymentHash, PaymentFailureReason? reason)?
- paymentFailed,
- TResult Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
- TResult Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)?
- channelPending,
- TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)?
- channelReady,
- TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)?
- channelClosed,
- required TResult orElse(),
- }) {
- if (channelPending != null) {
- return channelPending(channelId, userChannelId, formerTemporaryChannelId,
- counterpartyNodeId, fundingTxo);
- }
- return orElse();
- }
-
- @override
- @optionalTypeArgs
- TResult map({
- required TResult Function(Event_PaymentSuccessful value) paymentSuccessful,
- required TResult Function(Event_PaymentFailed value) paymentFailed,
- required TResult Function(Event_PaymentReceived value) paymentReceived,
- required TResult Function(Event_ChannelPending value) channelPending,
- required TResult Function(Event_ChannelReady value) channelReady,
- required TResult Function(Event_ChannelClosed value) channelClosed,
- }) {
- return channelPending(this);
- }
-
- @override
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(Event_PaymentSuccessful value)? paymentSuccessful,
- TResult? Function(Event_PaymentFailed value)? paymentFailed,
- TResult? Function(Event_PaymentReceived value)? paymentReceived,
- TResult? Function(Event_ChannelPending value)? channelPending,
- TResult? Function(Event_ChannelReady value)? channelReady,
- TResult? Function(Event_ChannelClosed value)? channelClosed,
- }) {
- return channelPending?.call(this);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(Event_PaymentSuccessful value)? paymentSuccessful,
- TResult Function(Event_PaymentFailed value)? paymentFailed,
- TResult Function(Event_PaymentReceived value)? paymentReceived,
- TResult Function(Event_ChannelPending value)? channelPending,
- TResult Function(Event_ChannelReady value)? channelReady,
- TResult Function(Event_ChannelClosed value)? channelClosed,
- required TResult orElse(),
- }) {
- if (channelPending != null) {
- return channelPending(this);
- }
- return orElse();
- }
-}
-
-abstract class Event_ChannelPending implements Event {
- const factory Event_ChannelPending(
- {required final ChannelId channelId,
- required final UserChannelId userChannelId,
- required final ChannelId formerTemporaryChannelId,
- required final PublicKey counterpartyNodeId,
- required final OutPoint fundingTxo}) = _$Event_ChannelPendingImpl;
-
- /// The `channel_id` of the channel.
- ChannelId get channelId;
-
- /// The `user_channel_id` of the channel.
- UserChannelId get userChannelId;
-
- /// The `temporary_channel_id` this channel used to be known by during channel establishment.
- ChannelId get formerTemporaryChannelId;
-
- /// The `node_id` of the channel counterparty.
- PublicKey get counterpartyNodeId;
-
- /// The outpoint of the channel's funding transaction.
- OutPoint get fundingTxo;
- @JsonKey(ignore: true)
- _$$Event_ChannelPendingImplCopyWith<_$Event_ChannelPendingImpl>
- get copyWith => throw _privateConstructorUsedError;
-}
-
-/// @nodoc
-abstract class _$$Event_ChannelReadyImplCopyWith<$Res> {
- factory _$$Event_ChannelReadyImplCopyWith(_$Event_ChannelReadyImpl value,
- $Res Function(_$Event_ChannelReadyImpl) then) =
- __$$Event_ChannelReadyImplCopyWithImpl<$Res>;
- @useResult
- $Res call(
- {ChannelId channelId,
- UserChannelId userChannelId,
- PublicKey? counterpartyNodeId});
-}
-
-/// @nodoc
-class __$$Event_ChannelReadyImplCopyWithImpl<$Res>
- extends _$EventCopyWithImpl<$Res, _$Event_ChannelReadyImpl>
- implements _$$Event_ChannelReadyImplCopyWith<$Res> {
- __$$Event_ChannelReadyImplCopyWithImpl(_$Event_ChannelReadyImpl _value,
- $Res Function(_$Event_ChannelReadyImpl) _then)
- : super(_value, _then);
-
- @pragma('vm:prefer-inline')
- @override
- $Res call({
- Object? channelId = null,
- Object? userChannelId = null,
- Object? counterpartyNodeId = freezed,
- }) {
- return _then(_$Event_ChannelReadyImpl(
- channelId: null == channelId
- ? _value.channelId
- : channelId // ignore: cast_nullable_to_non_nullable
- as ChannelId,
- userChannelId: null == userChannelId
- ? _value.userChannelId
- : userChannelId // ignore: cast_nullable_to_non_nullable
- as UserChannelId,
- counterpartyNodeId: freezed == counterpartyNodeId
- ? _value.counterpartyNodeId
- : counterpartyNodeId // ignore: cast_nullable_to_non_nullable
- as PublicKey?,
- ));
- }
-}
-
-/// @nodoc
-
-class _$Event_ChannelReadyImpl implements Event_ChannelReady {
- const _$Event_ChannelReadyImpl(
- {required this.channelId,
- required this.userChannelId,
- this.counterpartyNodeId});
-
- /// The `channel_id` of the channel.
- @override
- final ChannelId channelId;
-
- /// The `user_channel_id` of the channel.
- @override
- final UserChannelId userChannelId;
-
- /// The `node_id` of the channel counterparty.
- ///
- /// This will be `None` for events serialized by LDK Node v0.1.0 and prior.
- @override
- final PublicKey? counterpartyNodeId;
-
- @override
- String toString() {
- return 'Event.channelReady(channelId: $channelId, userChannelId: $userChannelId, counterpartyNodeId: $counterpartyNodeId)';
- }
-
- @override
- bool operator ==(Object other) {
- return identical(this, other) ||
- (other.runtimeType == runtimeType &&
- other is _$Event_ChannelReadyImpl &&
- (identical(other.channelId, channelId) ||
- other.channelId == channelId) &&
- (identical(other.userChannelId, userChannelId) ||
- other.userChannelId == userChannelId) &&
- (identical(other.counterpartyNodeId, counterpartyNodeId) ||
- other.counterpartyNodeId == counterpartyNodeId));
- }
-
- @override
- int get hashCode =>
- Object.hash(runtimeType, channelId, userChannelId, counterpartyNodeId);
-
- @JsonKey(ignore: true)
- @override
- @pragma('vm:prefer-inline')
- _$$Event_ChannelReadyImplCopyWith<_$Event_ChannelReadyImpl> get copyWith =>
- __$$Event_ChannelReadyImplCopyWithImpl<_$Event_ChannelReadyImpl>(
- this, _$identity);
-
- @override
- @optionalTypeArgs
- TResult when({
- required TResult Function(PaymentHash paymentHash, int? feePaidMsat)
- paymentSuccessful,
- required TResult Function(
- PaymentHash paymentHash, PaymentFailureReason? reason)
- paymentFailed,
- required TResult Function(PaymentHash paymentHash, int amountMsat)
- paymentReceived,
- required TResult Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)
- channelPending,
- required TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)
- channelReady,
- required TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)
- channelClosed,
- }) {
- return channelReady(channelId, userChannelId, counterpartyNodeId);
- }
-
- @override
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function(PaymentHash paymentHash, int? feePaidMsat)?
- paymentSuccessful,
- TResult? Function(PaymentHash paymentHash, PaymentFailureReason? reason)?
- paymentFailed,
- TResult? Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
- TResult? Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)?
- channelPending,
- TResult? Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)?
- channelReady,
- TResult? Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)?
- channelClosed,
- }) {
- return channelReady?.call(channelId, userChannelId, counterpartyNodeId);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function(PaymentHash paymentHash, int? feePaidMsat)?
- paymentSuccessful,
- TResult Function(PaymentHash paymentHash, PaymentFailureReason? reason)?
- paymentFailed,
- TResult Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
- TResult Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)?
- channelPending,
- TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)?
- channelReady,
- TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)?
- channelClosed,
- required TResult orElse(),
- }) {
- if (channelReady != null) {
- return channelReady(channelId, userChannelId, counterpartyNodeId);
- }
- return orElse();
- }
-
- @override
- @optionalTypeArgs
- TResult map({
- required TResult Function(Event_PaymentSuccessful value) paymentSuccessful,
- required TResult Function(Event_PaymentFailed value) paymentFailed,
- required TResult Function(Event_PaymentReceived value) paymentReceived,
- required TResult Function(Event_ChannelPending value) channelPending,
- required TResult Function(Event_ChannelReady value) channelReady,
- required TResult Function(Event_ChannelClosed value) channelClosed,
- }) {
- return channelReady(this);
- }
-
- @override
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(Event_PaymentSuccessful value)? paymentSuccessful,
- TResult? Function(Event_PaymentFailed value)? paymentFailed,
- TResult? Function(Event_PaymentReceived value)? paymentReceived,
- TResult? Function(Event_ChannelPending value)? channelPending,
- TResult? Function(Event_ChannelReady value)? channelReady,
- TResult? Function(Event_ChannelClosed value)? channelClosed,
- }) {
- return channelReady?.call(this);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(Event_PaymentSuccessful value)? paymentSuccessful,
- TResult Function(Event_PaymentFailed value)? paymentFailed,
- TResult Function(Event_PaymentReceived value)? paymentReceived,
- TResult Function(Event_ChannelPending value)? channelPending,
- TResult Function(Event_ChannelReady value)? channelReady,
- TResult Function(Event_ChannelClosed value)? channelClosed,
- required TResult orElse(),
- }) {
- if (channelReady != null) {
- return channelReady(this);
- }
- return orElse();
- }
-}
-
-abstract class Event_ChannelReady implements Event {
- const factory Event_ChannelReady(
- {required final ChannelId channelId,
- required final UserChannelId userChannelId,
- final PublicKey? counterpartyNodeId}) = _$Event_ChannelReadyImpl;
-
- /// The `channel_id` of the channel.
- ChannelId get channelId;
-
- /// The `user_channel_id` of the channel.
- UserChannelId get userChannelId;
-
- /// The `node_id` of the channel counterparty.
- ///
- /// This will be `None` for events serialized by LDK Node v0.1.0 and prior.
- PublicKey? get counterpartyNodeId;
- @JsonKey(ignore: true)
- _$$Event_ChannelReadyImplCopyWith<_$Event_ChannelReadyImpl> get copyWith =>
- throw _privateConstructorUsedError;
-}
-
-/// @nodoc
-abstract class _$$Event_ChannelClosedImplCopyWith<$Res> {
- factory _$$Event_ChannelClosedImplCopyWith(_$Event_ChannelClosedImpl value,
- $Res Function(_$Event_ChannelClosedImpl) then) =
- __$$Event_ChannelClosedImplCopyWithImpl<$Res>;
- @useResult
- $Res call(
- {ChannelId channelId,
- UserChannelId userChannelId,
- PublicKey? counterpartyNodeId,
- ClosureReason? reason});
-
- $ClosureReasonCopyWith<$Res>? get reason;
-}
-
-/// @nodoc
-class __$$Event_ChannelClosedImplCopyWithImpl<$Res>
- extends _$EventCopyWithImpl<$Res, _$Event_ChannelClosedImpl>
- implements _$$Event_ChannelClosedImplCopyWith<$Res> {
- __$$Event_ChannelClosedImplCopyWithImpl(_$Event_ChannelClosedImpl _value,
- $Res Function(_$Event_ChannelClosedImpl) _then)
- : super(_value, _then);
-
- @pragma('vm:prefer-inline')
- @override
- $Res call({
- Object? channelId = null,
- Object? userChannelId = null,
- Object? counterpartyNodeId = freezed,
- Object? reason = freezed,
- }) {
- return _then(_$Event_ChannelClosedImpl(
- channelId: null == channelId
- ? _value.channelId
- : channelId // ignore: cast_nullable_to_non_nullable
- as ChannelId,
- userChannelId: null == userChannelId
- ? _value.userChannelId
- : userChannelId // ignore: cast_nullable_to_non_nullable
- as UserChannelId,
- counterpartyNodeId: freezed == counterpartyNodeId
- ? _value.counterpartyNodeId
- : counterpartyNodeId // ignore: cast_nullable_to_non_nullable
- as PublicKey?,
- reason: freezed == reason
- ? _value.reason
- : reason // ignore: cast_nullable_to_non_nullable
- as ClosureReason?,
- ));
- }
-
- @override
- @pragma('vm:prefer-inline')
- $ClosureReasonCopyWith<$Res>? get reason {
- if (_value.reason == null) {
- return null;
- }
-
- return $ClosureReasonCopyWith<$Res>(_value.reason!, (value) {
- return _then(_value.copyWith(reason: value));
- });
- }
-}
-
-/// @nodoc
-
-class _$Event_ChannelClosedImpl implements Event_ChannelClosed {
- const _$Event_ChannelClosedImpl(
- {required this.channelId,
- required this.userChannelId,
- this.counterpartyNodeId,
- this.reason});
-
- /// The `channel_id` of the channel.
- @override
- final ChannelId channelId;
-
- /// The `user_channel_id` of the channel.
- @override
- final UserChannelId userChannelId;
-
- /// The `node_id` of the channel counterparty.
- ///
- /// This will be `None` for events serialized by LDK Node v0.1.0 and prior.
- @override
- final PublicKey? counterpartyNodeId;
-
- /// This will be `None` for events serialized by LDK Node v0.2.1 and prior.
- @override
- final ClosureReason? reason;
-
- @override
- String toString() {
- return 'Event.channelClosed(channelId: $channelId, userChannelId: $userChannelId, counterpartyNodeId: $counterpartyNodeId, reason: $reason)';
- }
-
- @override
- bool operator ==(Object other) {
- return identical(this, other) ||
- (other.runtimeType == runtimeType &&
- other is _$Event_ChannelClosedImpl &&
- (identical(other.channelId, channelId) ||
- other.channelId == channelId) &&
- (identical(other.userChannelId, userChannelId) ||
- other.userChannelId == userChannelId) &&
- (identical(other.counterpartyNodeId, counterpartyNodeId) ||
- other.counterpartyNodeId == counterpartyNodeId) &&
- (identical(other.reason, reason) || other.reason == reason));
- }
-
- @override
- int get hashCode => Object.hash(
- runtimeType, channelId, userChannelId, counterpartyNodeId, reason);
-
- @JsonKey(ignore: true)
- @override
- @pragma('vm:prefer-inline')
- _$$Event_ChannelClosedImplCopyWith<_$Event_ChannelClosedImpl> get copyWith =>
- __$$Event_ChannelClosedImplCopyWithImpl<_$Event_ChannelClosedImpl>(
- this, _$identity);
-
- @override
- @optionalTypeArgs
- TResult when({
- required TResult Function(PaymentHash paymentHash, int? feePaidMsat)
- paymentSuccessful,
- required TResult Function(
- PaymentHash paymentHash, PaymentFailureReason? reason)
- paymentFailed,
- required TResult Function(PaymentHash paymentHash, int amountMsat)
- paymentReceived,
- required TResult Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)
- channelPending,
- required TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)
- channelReady,
- required TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)
- channelClosed,
- }) {
- return channelClosed(channelId, userChannelId, counterpartyNodeId, reason);
- }
-
- @override
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function(PaymentHash paymentHash, int? feePaidMsat)?
- paymentSuccessful,
- TResult? Function(PaymentHash paymentHash, PaymentFailureReason? reason)?
- paymentFailed,
- TResult? Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
- TResult? Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)?
- channelPending,
- TResult? Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)?
- channelReady,
- TResult? Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)?
- channelClosed,
- }) {
- return channelClosed?.call(
- channelId, userChannelId, counterpartyNodeId, reason);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function(PaymentHash paymentHash, int? feePaidMsat)?
- paymentSuccessful,
- TResult Function(PaymentHash paymentHash, PaymentFailureReason? reason)?
- paymentFailed,
- TResult Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
- TResult Function(
- ChannelId channelId,
- UserChannelId userChannelId,
- ChannelId formerTemporaryChannelId,
- PublicKey counterpartyNodeId,
- OutPoint fundingTxo)?
- channelPending,
- TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId)?
- channelReady,
- TResult Function(ChannelId channelId, UserChannelId userChannelId,
- PublicKey? counterpartyNodeId, ClosureReason? reason)?
- channelClosed,
- required TResult orElse(),
- }) {
- if (channelClosed != null) {
- return channelClosed(
- channelId, userChannelId, counterpartyNodeId, reason);
- }
- return orElse();
- }
-
- @override
- @optionalTypeArgs
- TResult map({
- required TResult Function(Event_PaymentSuccessful value) paymentSuccessful,
- required TResult Function(Event_PaymentFailed value) paymentFailed,
- required TResult Function(Event_PaymentReceived value) paymentReceived,
- required TResult Function(Event_ChannelPending value) channelPending,
- required TResult Function(Event_ChannelReady value) channelReady,
- required TResult Function(Event_ChannelClosed value) channelClosed,
- }) {
- return channelClosed(this);
- }
-
- @override
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(Event_PaymentSuccessful value)? paymentSuccessful,
- TResult? Function(Event_PaymentFailed value)? paymentFailed,
- TResult? Function(Event_PaymentReceived value)? paymentReceived,
- TResult? Function(Event_ChannelPending value)? channelPending,
- TResult? Function(Event_ChannelReady value)? channelReady,
- TResult? Function(Event_ChannelClosed value)? channelClosed,
- }) {
- return channelClosed?.call(this);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(Event_PaymentSuccessful value)? paymentSuccessful,
- TResult Function(Event_PaymentFailed value)? paymentFailed,
- TResult Function(Event_PaymentReceived value)? paymentReceived,
- TResult Function(Event_ChannelPending value)? channelPending,
- TResult Function(Event_ChannelReady value)? channelReady,
- TResult Function(Event_ChannelClosed value)? channelClosed,
- required TResult orElse(),
- }) {
- if (channelClosed != null) {
- return channelClosed(this);
- }
- return orElse();
- }
-}
-
-abstract class Event_ChannelClosed implements Event {
- const factory Event_ChannelClosed(
- {required final ChannelId channelId,
- required final UserChannelId userChannelId,
- final PublicKey? counterpartyNodeId,
- final ClosureReason? reason}) = _$Event_ChannelClosedImpl;
-
- /// The `channel_id` of the channel.
- ChannelId get channelId;
-
- /// The `user_channel_id` of the channel.
- UserChannelId get userChannelId;
-
- /// The `node_id` of the channel counterparty.
- ///
- /// This will be `None` for events serialized by LDK Node v0.1.0 and prior.
- PublicKey? get counterpartyNodeId;
-
- /// This will be `None` for events serialized by LDK Node v0.2.1 and prior.
- ClosureReason? get reason;
- @JsonKey(ignore: true)
- _$$Event_ChannelClosedImplCopyWith<_$Event_ChannelClosedImpl> get copyWith =>
- throw _privateConstructorUsedError;
-}
-
-/// @nodoc
-mixin _$GossipSourceConfig {
- @optionalTypeArgs
- TResult when({
- required TResult Function() p2PNetwork,
- required TResult Function(String field0) rapidGossipSync,
- }) =>
- throw _privateConstructorUsedError;
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function()? p2PNetwork,
- TResult? Function(String field0)? rapidGossipSync,
- }) =>
- throw _privateConstructorUsedError;
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function()? p2PNetwork,
- TResult Function(String field0)? rapidGossipSync,
- required TResult orElse(),
- }) =>
- throw _privateConstructorUsedError;
- @optionalTypeArgs
- TResult map({
- required TResult Function(GossipSourceConfig_P2PNetwork value) p2PNetwork,
- required TResult Function(GossipSourceConfig_RapidGossipSync value)
- rapidGossipSync,
- }) =>
- throw _privateConstructorUsedError;
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(GossipSourceConfig_P2PNetwork value)? p2PNetwork,
- TResult? Function(GossipSourceConfig_RapidGossipSync value)?
- rapidGossipSync,
- }) =>
- throw _privateConstructorUsedError;
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(GossipSourceConfig_P2PNetwork value)? p2PNetwork,
- TResult Function(GossipSourceConfig_RapidGossipSync value)? rapidGossipSync,
- required TResult orElse(),
- }) =>
- throw _privateConstructorUsedError;
-}
-
-/// @nodoc
-abstract class $GossipSourceConfigCopyWith<$Res> {
- factory $GossipSourceConfigCopyWith(
- GossipSourceConfig value, $Res Function(GossipSourceConfig) then) =
- _$GossipSourceConfigCopyWithImpl<$Res, GossipSourceConfig>;
-}
-
-/// @nodoc
-class _$GossipSourceConfigCopyWithImpl<$Res, $Val extends GossipSourceConfig>
- implements $GossipSourceConfigCopyWith<$Res> {
- _$GossipSourceConfigCopyWithImpl(this._value, this._then);
-
- // ignore: unused_field
- final $Val _value;
- // ignore: unused_field
- final $Res Function($Val) _then;
-}
-
-/// @nodoc
-abstract class _$$GossipSourceConfig_P2PNetworkImplCopyWith<$Res> {
- factory _$$GossipSourceConfig_P2PNetworkImplCopyWith(
- _$GossipSourceConfig_P2PNetworkImpl value,
- $Res Function(_$GossipSourceConfig_P2PNetworkImpl) then) =
- __$$GossipSourceConfig_P2PNetworkImplCopyWithImpl<$Res>;
-}
-
-/// @nodoc
-class __$$GossipSourceConfig_P2PNetworkImplCopyWithImpl<$Res>
- extends _$GossipSourceConfigCopyWithImpl<$Res,
- _$GossipSourceConfig_P2PNetworkImpl>
- implements _$$GossipSourceConfig_P2PNetworkImplCopyWith<$Res> {
- __$$GossipSourceConfig_P2PNetworkImplCopyWithImpl(
- _$GossipSourceConfig_P2PNetworkImpl _value,
- $Res Function(_$GossipSourceConfig_P2PNetworkImpl) _then)
- : super(_value, _then);
-}
-
-/// @nodoc
-
-class _$GossipSourceConfig_P2PNetworkImpl
- implements GossipSourceConfig_P2PNetwork {
- const _$GossipSourceConfig_P2PNetworkImpl();
-
- @override
- String toString() {
- return 'GossipSourceConfig.p2PNetwork()';
- }
-
- @override
- bool operator ==(Object other) {
- return identical(this, other) ||
- (other.runtimeType == runtimeType &&
- other is _$GossipSourceConfig_P2PNetworkImpl);
- }
-
- @override
- int get hashCode => runtimeType.hashCode;
-
- @override
- @optionalTypeArgs
- TResult when({
- required TResult Function() p2PNetwork,
- required TResult Function(String field0) rapidGossipSync,
- }) {
- return p2PNetwork();
- }
-
- @override
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function()? p2PNetwork,
- TResult? Function(String field0)? rapidGossipSync,
- }) {
- return p2PNetwork?.call();
- }
-
- @override
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function()? p2PNetwork,
- TResult Function(String field0)? rapidGossipSync,
- required TResult orElse(),
- }) {
- if (p2PNetwork != null) {
- return p2PNetwork();
- }
- return orElse();
- }
-
- @override
- @optionalTypeArgs
- TResult map({
- required TResult Function(GossipSourceConfig_P2PNetwork value) p2PNetwork,
- required TResult Function(GossipSourceConfig_RapidGossipSync value)
- rapidGossipSync,
- }) {
- return p2PNetwork(this);
- }
-
- @override
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(GossipSourceConfig_P2PNetwork value)? p2PNetwork,
- TResult? Function(GossipSourceConfig_RapidGossipSync value)?
- rapidGossipSync,
- }) {
- return p2PNetwork?.call(this);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(GossipSourceConfig_P2PNetwork value)? p2PNetwork,
- TResult Function(GossipSourceConfig_RapidGossipSync value)? rapidGossipSync,
- required TResult orElse(),
- }) {
- if (p2PNetwork != null) {
- return p2PNetwork(this);
- }
- return orElse();
- }
-}
-
-abstract class GossipSourceConfig_P2PNetwork implements GossipSourceConfig {
- const factory GossipSourceConfig_P2PNetwork() =
- _$GossipSourceConfig_P2PNetworkImpl;
-}
-
-/// @nodoc
-abstract class _$$GossipSourceConfig_RapidGossipSyncImplCopyWith<$Res> {
- factory _$$GossipSourceConfig_RapidGossipSyncImplCopyWith(
- _$GossipSourceConfig_RapidGossipSyncImpl value,
- $Res Function(_$GossipSourceConfig_RapidGossipSyncImpl) then) =
- __$$GossipSourceConfig_RapidGossipSyncImplCopyWithImpl<$Res>;
- @useResult
- $Res call({String field0});
-}
-
-/// @nodoc
-class __$$GossipSourceConfig_RapidGossipSyncImplCopyWithImpl<$Res>
- extends _$GossipSourceConfigCopyWithImpl<$Res,
- _$GossipSourceConfig_RapidGossipSyncImpl>
- implements _$$GossipSourceConfig_RapidGossipSyncImplCopyWith<$Res> {
- __$$GossipSourceConfig_RapidGossipSyncImplCopyWithImpl(
- _$GossipSourceConfig_RapidGossipSyncImpl _value,
- $Res Function(_$GossipSourceConfig_RapidGossipSyncImpl) _then)
- : super(_value, _then);
-
- @pragma('vm:prefer-inline')
- @override
- $Res call({
- Object? field0 = null,
- }) {
- return _then(_$GossipSourceConfig_RapidGossipSyncImpl(
- null == field0
- ? _value.field0
- : field0 // ignore: cast_nullable_to_non_nullable
- as String,
- ));
- }
-}
-
-/// @nodoc
-
-class _$GossipSourceConfig_RapidGossipSyncImpl
- implements GossipSourceConfig_RapidGossipSync {
- const _$GossipSourceConfig_RapidGossipSyncImpl(this.field0);
-
- @override
- final String field0;
-
- @override
- String toString() {
- return 'GossipSourceConfig.rapidGossipSync(field0: $field0)';
- }
-
- @override
- bool operator ==(Object other) {
- return identical(this, other) ||
- (other.runtimeType == runtimeType &&
- other is _$GossipSourceConfig_RapidGossipSyncImpl &&
- (identical(other.field0, field0) || other.field0 == field0));
- }
-
- @override
- int get hashCode => Object.hash(runtimeType, field0);
-
- @JsonKey(ignore: true)
- @override
- @pragma('vm:prefer-inline')
- _$$GossipSourceConfig_RapidGossipSyncImplCopyWith<
- _$GossipSourceConfig_RapidGossipSyncImpl>
- get copyWith => __$$GossipSourceConfig_RapidGossipSyncImplCopyWithImpl<
- _$GossipSourceConfig_RapidGossipSyncImpl>(this, _$identity);
-
- @override
- @optionalTypeArgs
- TResult when({
- required TResult Function() p2PNetwork,
- required TResult Function(String field0) rapidGossipSync,
- }) {
- return rapidGossipSync(field0);
- }
-
- @override
- @optionalTypeArgs
- TResult? whenOrNull({
- TResult? Function()? p2PNetwork,
- TResult? Function(String field0)? rapidGossipSync,
- }) {
- return rapidGossipSync?.call(field0);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeWhen({
- TResult Function()? p2PNetwork,
- TResult Function(String field0)? rapidGossipSync,
- required TResult orElse(),
- }) {
- if (rapidGossipSync != null) {
- return rapidGossipSync(field0);
- }
- return orElse();
- }
-
- @override
- @optionalTypeArgs
- TResult map({
- required TResult Function(GossipSourceConfig_P2PNetwork value) p2PNetwork,
- required TResult Function(GossipSourceConfig_RapidGossipSync value)
- rapidGossipSync,
- }) {
- return rapidGossipSync(this);
- }
-
- @override
- @optionalTypeArgs
- TResult? mapOrNull({
- TResult? Function(GossipSourceConfig_P2PNetwork value)? p2PNetwork,
- TResult? Function(GossipSourceConfig_RapidGossipSync value)?
- rapidGossipSync,
- }) {
- return rapidGossipSync?.call(this);
- }
-
- @override
- @optionalTypeArgs
- TResult maybeMap({
- TResult Function(GossipSourceConfig_P2PNetwork value)? p2PNetwork,
- TResult Function(GossipSourceConfig_RapidGossipSync value)? rapidGossipSync,
- required TResult orElse(),
- }) {
- if (rapidGossipSync != null) {
- return rapidGossipSync(this);
- }
- return orElse();
- }
-}
-
-abstract class GossipSourceConfig_RapidGossipSync
- implements GossipSourceConfig {
- const factory GossipSourceConfig_RapidGossipSync(final String field0) =
- _$GossipSourceConfig_RapidGossipSyncImpl;
-
- String get field0;
- @JsonKey(ignore: true)
- _$$GossipSourceConfig_RapidGossipSyncImplCopyWith<
- _$GossipSourceConfig_RapidGossipSyncImpl>
- get copyWith => throw _privateConstructorUsedError;
-}
-
-/// @nodoc
-mixin _$LightningBalance {
- /// The identifier of the channel this balance belongs to.
- ChannelId get channelId => throw _privateConstructorUsedError;
-
- /// The identifier of our channel counterparty.
- PublicKey get counterpartyNodeId => throw _privateConstructorUsedError;
-
- /// The amount available to claim, in satoshis, excluding the on-chain fees which will be
- /// required to do so.
- int get amountSatoshis => throw _privateConstructorUsedError;
+mixin _$Event {
@optionalTypeArgs
TResult when({
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)
- claimableOnChannelClose,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int confirmationHeight)
- claimableAwaitingConfirmations,
+ required TResult Function(PaymentHash paymentHash) paymentSuccessful,
+ required TResult Function(PaymentHash paymentHash) paymentFailed,
+ required TResult Function(PaymentHash paymentHash, int amountMsat)
+ paymentReceived,
+ required TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)
+ channelReady,
+ required TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)
+ channelClosed,
required TResult Function(
ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage)
- contentiousClaimable,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int claimableHeight, PaymentHash paymentHash)
- maybeTimeoutClaimableHtlc,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int expiryHeight, PaymentHash paymentHash)
- maybePreimageClaimableHtlc,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)
- counterpartyRevokedOutputClaimable,
+ OutPoint fundingTxo)
+ channelPending,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? whenOrNull({
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- claimableOnChannelClose,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int confirmationHeight)?
- claimableAwaitingConfirmations,
+ TResult? Function(PaymentHash paymentHash)? paymentSuccessful,
+ TResult? Function(PaymentHash paymentHash)? paymentFailed,
+ TResult? Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
+ TResult? Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelReady,
+ TResult? Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelClosed,
TResult? Function(
ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage)?
- contentiousClaimable,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int claimableHeight, PaymentHash paymentHash)?
- maybeTimeoutClaimableHtlc,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int expiryHeight, PaymentHash paymentHash)?
- maybePreimageClaimableHtlc,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- counterpartyRevokedOutputClaimable,
+ OutPoint fundingTxo)?
+ channelPending,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult maybeWhen({
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- claimableOnChannelClose,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int confirmationHeight)?
- claimableAwaitingConfirmations,
+ TResult Function(PaymentHash paymentHash)? paymentSuccessful,
+ TResult Function(PaymentHash paymentHash)? paymentFailed,
+ TResult Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
+ TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelReady,
+ TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelClosed,
TResult Function(
ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage)?
- contentiousClaimable,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int claimableHeight, PaymentHash paymentHash)?
- maybeTimeoutClaimableHtlc,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int expiryHeight, PaymentHash paymentHash)?
- maybePreimageClaimableHtlc,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- counterpartyRevokedOutputClaimable,
+ OutPoint fundingTxo)?
+ channelPending,
required TResult orElse(),
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult map({
- required TResult Function(LightningBalance_ClaimableOnChannelClose value)
- claimableOnChannelClose,
- required TResult Function(
- LightningBalance_ClaimableAwaitingConfirmations value)
- claimableAwaitingConfirmations,
- required TResult Function(LightningBalance_ContentiousClaimable value)
- contentiousClaimable,
- required TResult Function(LightningBalance_MaybeTimeoutClaimableHTLC value)
- maybeTimeoutClaimableHtlc,
- required TResult Function(LightningBalance_MaybePreimageClaimableHTLC value)
- maybePreimageClaimableHtlc,
- required TResult Function(
- LightningBalance_CounterpartyRevokedOutputClaimable value)
- counterpartyRevokedOutputClaimable,
+ required TResult Function(Event_PaymentSuccessful value) paymentSuccessful,
+ required TResult Function(Event_PaymentFailed value) paymentFailed,
+ required TResult Function(Event_PaymentReceived value) paymentReceived,
+ required TResult Function(Event_ChannelReady value) channelReady,
+ required TResult Function(Event_ChannelClosed value) channelClosed,
+ required TResult Function(Event_ChannelPending value) channelPending,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult? mapOrNull({
- TResult? Function(LightningBalance_ClaimableOnChannelClose value)?
- claimableOnChannelClose,
- TResult? Function(LightningBalance_ClaimableAwaitingConfirmations value)?
- claimableAwaitingConfirmations,
- TResult? Function(LightningBalance_ContentiousClaimable value)?
- contentiousClaimable,
- TResult? Function(LightningBalance_MaybeTimeoutClaimableHTLC value)?
- maybeTimeoutClaimableHtlc,
- TResult? Function(LightningBalance_MaybePreimageClaimableHTLC value)?
- maybePreimageClaimableHtlc,
- TResult? Function(
- LightningBalance_CounterpartyRevokedOutputClaimable value)?
- counterpartyRevokedOutputClaimable,
+ TResult? Function(Event_PaymentSuccessful value)? paymentSuccessful,
+ TResult? Function(Event_PaymentFailed value)? paymentFailed,
+ TResult? Function(Event_PaymentReceived value)? paymentReceived,
+ TResult? Function(Event_ChannelReady value)? channelReady,
+ TResult? Function(Event_ChannelClosed value)? channelClosed,
+ TResult? Function(Event_ChannelPending value)? channelPending,
}) =>
throw _privateConstructorUsedError;
@optionalTypeArgs
TResult maybeMap({
- TResult Function(LightningBalance_ClaimableOnChannelClose value)?
- claimableOnChannelClose,
- TResult Function(LightningBalance_ClaimableAwaitingConfirmations value)?
- claimableAwaitingConfirmations,
- TResult Function(LightningBalance_ContentiousClaimable value)?
- contentiousClaimable,
- TResult Function(LightningBalance_MaybeTimeoutClaimableHTLC value)?
- maybeTimeoutClaimableHtlc,
- TResult Function(LightningBalance_MaybePreimageClaimableHTLC value)?
- maybePreimageClaimableHtlc,
- TResult Function(LightningBalance_CounterpartyRevokedOutputClaimable value)?
- counterpartyRevokedOutputClaimable,
+ TResult Function(Event_PaymentSuccessful value)? paymentSuccessful,
+ TResult Function(Event_PaymentFailed value)? paymentFailed,
+ TResult Function(Event_PaymentReceived value)? paymentReceived,
+ TResult Function(Event_ChannelReady value)? channelReady,
+ TResult Function(Event_ChannelClosed value)? channelClosed,
+ TResult Function(Event_ChannelPending value)? channelPending,
required TResult orElse(),
}) =>
throw _privateConstructorUsedError;
-
- @JsonKey(ignore: true)
- $LightningBalanceCopyWith get copyWith =>
- throw _privateConstructorUsedError;
}
/// @nodoc
-abstract class $LightningBalanceCopyWith<$Res> {
- factory $LightningBalanceCopyWith(
- LightningBalance value, $Res Function(LightningBalance) then) =
- _$LightningBalanceCopyWithImpl<$Res, LightningBalance>;
- @useResult
- $Res call(
- {ChannelId channelId, PublicKey counterpartyNodeId, int amountSatoshis});
+abstract class $EventCopyWith<$Res> {
+ factory $EventCopyWith(Event value, $Res Function(Event) then) =
+ _$EventCopyWithImpl<$Res, Event>;
}
/// @nodoc
-class _$LightningBalanceCopyWithImpl<$Res, $Val extends LightningBalance>
- implements $LightningBalanceCopyWith<$Res> {
- _$LightningBalanceCopyWithImpl(this._value, this._then);
+class _$EventCopyWithImpl<$Res, $Val extends Event>
+ implements $EventCopyWith<$Res> {
+ _$EventCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
-
- @pragma('vm:prefer-inline')
- @override
- $Res call({
- Object? channelId = null,
- Object? counterpartyNodeId = null,
- Object? amountSatoshis = null,
- }) {
- return _then(_value.copyWith(
- channelId: null == channelId
- ? _value.channelId
- : channelId // ignore: cast_nullable_to_non_nullable
- as ChannelId,
- counterpartyNodeId: null == counterpartyNodeId
- ? _value.counterpartyNodeId
- : counterpartyNodeId // ignore: cast_nullable_to_non_nullable
- as PublicKey,
- amountSatoshis: null == amountSatoshis
- ? _value.amountSatoshis
- : amountSatoshis // ignore: cast_nullable_to_non_nullable
- as int,
- ) as $Val);
- }
}
/// @nodoc
-abstract class _$$LightningBalance_ClaimableOnChannelCloseImplCopyWith<$Res>
- implements $LightningBalanceCopyWith<$Res> {
- factory _$$LightningBalance_ClaimableOnChannelCloseImplCopyWith(
- _$LightningBalance_ClaimableOnChannelCloseImpl value,
- $Res Function(_$LightningBalance_ClaimableOnChannelCloseImpl) then) =
- __$$LightningBalance_ClaimableOnChannelCloseImplCopyWithImpl<$Res>;
- @override
+abstract class _$$Event_PaymentSuccessfulImplCopyWith<$Res> {
+ factory _$$Event_PaymentSuccessfulImplCopyWith(
+ _$Event_PaymentSuccessfulImpl value,
+ $Res Function(_$Event_PaymentSuccessfulImpl) then) =
+ __$$Event_PaymentSuccessfulImplCopyWithImpl<$Res>;
@useResult
- $Res call(
- {ChannelId channelId, PublicKey counterpartyNodeId, int amountSatoshis});
+ $Res call({PaymentHash paymentHash});
}
/// @nodoc
-class __$$LightningBalance_ClaimableOnChannelCloseImplCopyWithImpl<$Res>
- extends _$LightningBalanceCopyWithImpl<$Res,
- _$LightningBalance_ClaimableOnChannelCloseImpl>
- implements _$$LightningBalance_ClaimableOnChannelCloseImplCopyWith<$Res> {
- __$$LightningBalance_ClaimableOnChannelCloseImplCopyWithImpl(
- _$LightningBalance_ClaimableOnChannelCloseImpl _value,
- $Res Function(_$LightningBalance_ClaimableOnChannelCloseImpl) _then)
+class __$$Event_PaymentSuccessfulImplCopyWithImpl<$Res>
+ extends _$EventCopyWithImpl<$Res, _$Event_PaymentSuccessfulImpl>
+ implements _$$Event_PaymentSuccessfulImplCopyWith<$Res> {
+ __$$Event_PaymentSuccessfulImplCopyWithImpl(
+ _$Event_PaymentSuccessfulImpl _value,
+ $Res Function(_$Event_PaymentSuccessfulImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
- Object? channelId = null,
- Object? counterpartyNodeId = null,
- Object? amountSatoshis = null,
+ Object? paymentHash = null,
}) {
- return _then(_$LightningBalance_ClaimableOnChannelCloseImpl(
- channelId: null == channelId
- ? _value.channelId
- : channelId // ignore: cast_nullable_to_non_nullable
- as ChannelId,
- counterpartyNodeId: null == counterpartyNodeId
- ? _value.counterpartyNodeId
- : counterpartyNodeId // ignore: cast_nullable_to_non_nullable
- as PublicKey,
- amountSatoshis: null == amountSatoshis
- ? _value.amountSatoshis
- : amountSatoshis // ignore: cast_nullable_to_non_nullable
- as int,
+ return _then(_$Event_PaymentSuccessfulImpl(
+ paymentHash: null == paymentHash
+ ? _value.paymentHash
+ : paymentHash // ignore: cast_nullable_to_non_nullable
+ as PaymentHash,
));
}
}
/// @nodoc
-class _$LightningBalance_ClaimableOnChannelCloseImpl
- implements LightningBalance_ClaimableOnChannelClose {
- const _$LightningBalance_ClaimableOnChannelCloseImpl(
- {required this.channelId,
- required this.counterpartyNodeId,
- required this.amountSatoshis});
-
- /// The identifier of the channel this balance belongs to.
- @override
- final ChannelId channelId;
-
- /// The identifier of our channel counterparty.
- @override
- final PublicKey counterpartyNodeId;
+class _$Event_PaymentSuccessfulImpl extends Event_PaymentSuccessful {
+ const _$Event_PaymentSuccessfulImpl({required this.paymentHash}) : super._();
- /// The amount available to claim, in satoshis, excluding the on-chain fees which will be
- /// required to do so.
+ /// The hash of the payment.
@override
- final int amountSatoshis;
+ final PaymentHash paymentHash;
@override
String toString() {
- return 'LightningBalance.claimableOnChannelClose(channelId: $channelId, counterpartyNodeId: $counterpartyNodeId, amountSatoshis: $amountSatoshis)';
+ return 'Event.paymentSuccessful(paymentHash: $paymentHash)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
- other is _$LightningBalance_ClaimableOnChannelCloseImpl &&
- (identical(other.channelId, channelId) ||
- other.channelId == channelId) &&
- (identical(other.counterpartyNodeId, counterpartyNodeId) ||
- other.counterpartyNodeId == counterpartyNodeId) &&
- (identical(other.amountSatoshis, amountSatoshis) ||
- other.amountSatoshis == amountSatoshis));
+ other is _$Event_PaymentSuccessfulImpl &&
+ (identical(other.paymentHash, paymentHash) ||
+ other.paymentHash == paymentHash));
}
@override
- int get hashCode =>
- Object.hash(runtimeType, channelId, counterpartyNodeId, amountSatoshis);
+ int get hashCode => Object.hash(runtimeType, paymentHash);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
- _$$LightningBalance_ClaimableOnChannelCloseImplCopyWith<
- _$LightningBalance_ClaimableOnChannelCloseImpl>
- get copyWith =>
- __$$LightningBalance_ClaimableOnChannelCloseImplCopyWithImpl<
- _$LightningBalance_ClaimableOnChannelCloseImpl>(this, _$identity);
+ _$$Event_PaymentSuccessfulImplCopyWith<_$Event_PaymentSuccessfulImpl>
+ get copyWith => __$$Event_PaymentSuccessfulImplCopyWithImpl<
+ _$Event_PaymentSuccessfulImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when({
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)
- claimableOnChannelClose,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int confirmationHeight)
- claimableAwaitingConfirmations,
+ required TResult Function(PaymentHash paymentHash) paymentSuccessful,
+ required TResult Function(PaymentHash paymentHash) paymentFailed,
+ required TResult Function(PaymentHash paymentHash, int amountMsat)
+ paymentReceived,
+ required TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)
+ channelReady,
+ required TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)
+ channelClosed,
required TResult Function(
ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage)
- contentiousClaimable,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int claimableHeight, PaymentHash paymentHash)
- maybeTimeoutClaimableHtlc,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int expiryHeight, PaymentHash paymentHash)
- maybePreimageClaimableHtlc,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)
- counterpartyRevokedOutputClaimable,
+ OutPoint fundingTxo)
+ channelPending,
}) {
- return claimableOnChannelClose(
- channelId, counterpartyNodeId, amountSatoshis);
+ return paymentSuccessful(paymentHash);
}
@override
@optionalTypeArgs
TResult? whenOrNull({
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- claimableOnChannelClose,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int confirmationHeight)?
- claimableAwaitingConfirmations,
+ TResult? Function(PaymentHash paymentHash)? paymentSuccessful,
+ TResult? Function(PaymentHash paymentHash)? paymentFailed,
+ TResult? Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
+ TResult? Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelReady,
+ TResult? Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelClosed,
TResult? Function(
ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage)?
- contentiousClaimable,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int claimableHeight, PaymentHash paymentHash)?
- maybeTimeoutClaimableHtlc,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int expiryHeight, PaymentHash paymentHash)?
- maybePreimageClaimableHtlc,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- counterpartyRevokedOutputClaimable,
+ OutPoint fundingTxo)?
+ channelPending,
}) {
- return claimableOnChannelClose?.call(
- channelId, counterpartyNodeId, amountSatoshis);
+ return paymentSuccessful?.call(paymentHash);
}
@override
@optionalTypeArgs
TResult maybeWhen({
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- claimableOnChannelClose,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int confirmationHeight)?
- claimableAwaitingConfirmations,
+ TResult Function(PaymentHash paymentHash)? paymentSuccessful,
+ TResult Function(PaymentHash paymentHash)? paymentFailed,
+ TResult Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
+ TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelReady,
+ TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelClosed,
TResult Function(
ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage)?
- contentiousClaimable,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int claimableHeight, PaymentHash paymentHash)?
- maybeTimeoutClaimableHtlc,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int expiryHeight, PaymentHash paymentHash)?
- maybePreimageClaimableHtlc,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- counterpartyRevokedOutputClaimable,
+ OutPoint fundingTxo)?
+ channelPending,
required TResult orElse(),
}) {
- if (claimableOnChannelClose != null) {
- return claimableOnChannelClose(
- channelId, counterpartyNodeId, amountSatoshis);
+ if (paymentSuccessful != null) {
+ return paymentSuccessful(paymentHash);
}
return orElse();
}
@@ -5057,311 +1018,193 @@ class _$LightningBalance_ClaimableOnChannelCloseImpl
@override
@optionalTypeArgs
TResult map({
- required TResult Function(LightningBalance_ClaimableOnChannelClose value)
- claimableOnChannelClose,
- required TResult Function(
- LightningBalance_ClaimableAwaitingConfirmations value)
- claimableAwaitingConfirmations,
- required TResult Function(LightningBalance_ContentiousClaimable value)
- contentiousClaimable,
- required TResult Function(LightningBalance_MaybeTimeoutClaimableHTLC value)
- maybeTimeoutClaimableHtlc,
- required TResult Function(LightningBalance_MaybePreimageClaimableHTLC value)
- maybePreimageClaimableHtlc,
- required TResult Function(
- LightningBalance_CounterpartyRevokedOutputClaimable value)
- counterpartyRevokedOutputClaimable,
+ required TResult Function(Event_PaymentSuccessful value) paymentSuccessful,
+ required TResult Function(Event_PaymentFailed value) paymentFailed,
+ required TResult Function(Event_PaymentReceived value) paymentReceived,
+ required TResult Function(Event_ChannelReady value) channelReady,
+ required TResult Function(Event_ChannelClosed value) channelClosed,
+ required TResult Function(Event_ChannelPending value) channelPending,
}) {
- return claimableOnChannelClose(this);
+ return paymentSuccessful(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull({
- TResult? Function(LightningBalance_ClaimableOnChannelClose value)?
- claimableOnChannelClose,
- TResult? Function(LightningBalance_ClaimableAwaitingConfirmations value)?
- claimableAwaitingConfirmations,
- TResult? Function(LightningBalance_ContentiousClaimable value)?
- contentiousClaimable,
- TResult? Function(LightningBalance_MaybeTimeoutClaimableHTLC value)?
- maybeTimeoutClaimableHtlc,
- TResult? Function(LightningBalance_MaybePreimageClaimableHTLC value)?
- maybePreimageClaimableHtlc,
- TResult? Function(
- LightningBalance_CounterpartyRevokedOutputClaimable value)?
- counterpartyRevokedOutputClaimable,
+ TResult? Function(Event_PaymentSuccessful value)? paymentSuccessful,
+ TResult? Function(Event_PaymentFailed value)? paymentFailed,
+ TResult? Function(Event_PaymentReceived value)? paymentReceived,
+ TResult? Function(Event_ChannelReady value)? channelReady,
+ TResult? Function(Event_ChannelClosed value)? channelClosed,
+ TResult? Function(Event_ChannelPending value)? channelPending,
}) {
- return claimableOnChannelClose?.call(this);
+ return paymentSuccessful?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap({
- TResult Function(LightningBalance_ClaimableOnChannelClose value)?
- claimableOnChannelClose,
- TResult Function(LightningBalance_ClaimableAwaitingConfirmations value)?
- claimableAwaitingConfirmations,
- TResult Function(LightningBalance_ContentiousClaimable value)?
- contentiousClaimable,
- TResult Function(LightningBalance_MaybeTimeoutClaimableHTLC value)?
- maybeTimeoutClaimableHtlc,
- TResult Function(LightningBalance_MaybePreimageClaimableHTLC value)?
- maybePreimageClaimableHtlc,
- TResult Function(LightningBalance_CounterpartyRevokedOutputClaimable value)?
- counterpartyRevokedOutputClaimable,
+ TResult Function(Event_PaymentSuccessful value)? paymentSuccessful,
+ TResult Function(Event_PaymentFailed value)? paymentFailed,
+ TResult Function(Event_PaymentReceived value)? paymentReceived,
+ TResult Function(Event_ChannelReady value)? channelReady,
+ TResult Function(Event_ChannelClosed value)? channelClosed,
+ TResult Function(Event_ChannelPending value)? channelPending,
required TResult orElse(),
}) {
- if (claimableOnChannelClose != null) {
- return claimableOnChannelClose(this);
+ if (paymentSuccessful != null) {
+ return paymentSuccessful(this);
}
return orElse();
}
}
-abstract class LightningBalance_ClaimableOnChannelClose
- implements LightningBalance {
- const factory LightningBalance_ClaimableOnChannelClose(
- {required final ChannelId channelId,
- required final PublicKey counterpartyNodeId,
- required final int amountSatoshis}) =
- _$LightningBalance_ClaimableOnChannelCloseImpl;
-
- @override
-
- /// The identifier of the channel this balance belongs to.
- ChannelId get channelId;
- @override
-
- /// The identifier of our channel counterparty.
- PublicKey get counterpartyNodeId;
- @override
+abstract class Event_PaymentSuccessful extends Event {
+ const factory Event_PaymentSuccessful(
+ {required final PaymentHash paymentHash}) = _$Event_PaymentSuccessfulImpl;
+ const Event_PaymentSuccessful._() : super._();
- /// The amount available to claim, in satoshis, excluding the on-chain fees which will be
- /// required to do so.
- int get amountSatoshis;
- @override
+ /// The hash of the payment.
+ PaymentHash get paymentHash;
@JsonKey(ignore: true)
- _$$LightningBalance_ClaimableOnChannelCloseImplCopyWith<
- _$LightningBalance_ClaimableOnChannelCloseImpl>
+ _$$Event_PaymentSuccessfulImplCopyWith<_$Event_PaymentSuccessfulImpl>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
-abstract class _$$LightningBalance_ClaimableAwaitingConfirmationsImplCopyWith<
- $Res> implements $LightningBalanceCopyWith<$Res> {
- factory _$$LightningBalance_ClaimableAwaitingConfirmationsImplCopyWith(
- _$LightningBalance_ClaimableAwaitingConfirmationsImpl value,
- $Res Function(_$LightningBalance_ClaimableAwaitingConfirmationsImpl)
- then) =
- __$$LightningBalance_ClaimableAwaitingConfirmationsImplCopyWithImpl<$Res>;
- @override
+abstract class _$$Event_PaymentFailedImplCopyWith<$Res> {
+ factory _$$Event_PaymentFailedImplCopyWith(_$Event_PaymentFailedImpl value,
+ $Res Function(_$Event_PaymentFailedImpl) then) =
+ __$$Event_PaymentFailedImplCopyWithImpl<$Res>;
@useResult
- $Res call(
- {ChannelId channelId,
- PublicKey counterpartyNodeId,
- int amountSatoshis,
- int confirmationHeight});
+ $Res call({PaymentHash paymentHash});
}
/// @nodoc
-class __$$LightningBalance_ClaimableAwaitingConfirmationsImplCopyWithImpl<$Res>
- extends _$LightningBalanceCopyWithImpl<$Res,
- _$LightningBalance_ClaimableAwaitingConfirmationsImpl>
- implements
- _$$LightningBalance_ClaimableAwaitingConfirmationsImplCopyWith<$Res> {
- __$$LightningBalance_ClaimableAwaitingConfirmationsImplCopyWithImpl(
- _$LightningBalance_ClaimableAwaitingConfirmationsImpl _value,
- $Res Function(_$LightningBalance_ClaimableAwaitingConfirmationsImpl)
- _then)
+class __$$Event_PaymentFailedImplCopyWithImpl<$Res>
+ extends _$EventCopyWithImpl<$Res, _$Event_PaymentFailedImpl>
+ implements _$$Event_PaymentFailedImplCopyWith<$Res> {
+ __$$Event_PaymentFailedImplCopyWithImpl(_$Event_PaymentFailedImpl _value,
+ $Res Function(_$Event_PaymentFailedImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
- Object? channelId = null,
- Object? counterpartyNodeId = null,
- Object? amountSatoshis = null,
- Object? confirmationHeight = null,
+ Object? paymentHash = null,
}) {
- return _then(_$LightningBalance_ClaimableAwaitingConfirmationsImpl(
- channelId: null == channelId
- ? _value.channelId
- : channelId // ignore: cast_nullable_to_non_nullable
- as ChannelId,
- counterpartyNodeId: null == counterpartyNodeId
- ? _value.counterpartyNodeId
- : counterpartyNodeId // ignore: cast_nullable_to_non_nullable
- as PublicKey,
- amountSatoshis: null == amountSatoshis
- ? _value.amountSatoshis
- : amountSatoshis // ignore: cast_nullable_to_non_nullable
- as int,
- confirmationHeight: null == confirmationHeight
- ? _value.confirmationHeight
- : confirmationHeight // ignore: cast_nullable_to_non_nullable
- as int,
+ return _then(_$Event_PaymentFailedImpl(
+ paymentHash: null == paymentHash
+ ? _value.paymentHash
+ : paymentHash // ignore: cast_nullable_to_non_nullable
+ as PaymentHash,
));
}
}
/// @nodoc
-class _$LightningBalance_ClaimableAwaitingConfirmationsImpl
- implements LightningBalance_ClaimableAwaitingConfirmations {
- const _$LightningBalance_ClaimableAwaitingConfirmationsImpl(
- {required this.channelId,
- required this.counterpartyNodeId,
- required this.amountSatoshis,
- required this.confirmationHeight});
-
- /// The identifier of the channel this balance belongs to.
- @override
- final ChannelId channelId;
-
- /// The identifier of our channel counterparty.
- @override
- final PublicKey counterpartyNodeId;
-
- /// The amount available to claim, in satoshis, possibly excluding the on-chain fees which
- /// were spent in broadcasting the transaction.
- @override
- final int amountSatoshis;
+class _$Event_PaymentFailedImpl extends Event_PaymentFailed {
+ const _$Event_PaymentFailedImpl({required this.paymentHash}) : super._();
- /// The height at which an [`Event::SpendableOutputs`] event will be generated for this
- /// amount.
- ///
- /// [`Event::SpendableOutputs`]: lightning::events::Event::SpendableOutputs
+ /// The hash of the payment.
@override
- final int confirmationHeight;
+ final PaymentHash paymentHash;
@override
String toString() {
- return 'LightningBalance.claimableAwaitingConfirmations(channelId: $channelId, counterpartyNodeId: $counterpartyNodeId, amountSatoshis: $amountSatoshis, confirmationHeight: $confirmationHeight)';
+ return 'Event.paymentFailed(paymentHash: $paymentHash)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
- other is _$LightningBalance_ClaimableAwaitingConfirmationsImpl &&
- (identical(other.channelId, channelId) ||
- other.channelId == channelId) &&
- (identical(other.counterpartyNodeId, counterpartyNodeId) ||
- other.counterpartyNodeId == counterpartyNodeId) &&
- (identical(other.amountSatoshis, amountSatoshis) ||
- other.amountSatoshis == amountSatoshis) &&
- (identical(other.confirmationHeight, confirmationHeight) ||
- other.confirmationHeight == confirmationHeight));
+ other is _$Event_PaymentFailedImpl &&
+ (identical(other.paymentHash, paymentHash) ||
+ other.paymentHash == paymentHash));
}
@override
- int get hashCode => Object.hash(runtimeType, channelId, counterpartyNodeId,
- amountSatoshis, confirmationHeight);
+ int get hashCode => Object.hash(runtimeType, paymentHash);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
- _$$LightningBalance_ClaimableAwaitingConfirmationsImplCopyWith<
- _$LightningBalance_ClaimableAwaitingConfirmationsImpl>
- get copyWith =>
- __$$LightningBalance_ClaimableAwaitingConfirmationsImplCopyWithImpl<
- _$LightningBalance_ClaimableAwaitingConfirmationsImpl>(
- this, _$identity);
+ _$$Event_PaymentFailedImplCopyWith<_$Event_PaymentFailedImpl> get copyWith =>
+ __$$Event_PaymentFailedImplCopyWithImpl<_$Event_PaymentFailedImpl>(
+ this, _$identity);
@override
@optionalTypeArgs
TResult when({
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)
- claimableOnChannelClose,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int confirmationHeight)
- claimableAwaitingConfirmations,
+ required TResult Function(PaymentHash paymentHash) paymentSuccessful,
+ required TResult Function(PaymentHash paymentHash) paymentFailed,
+ required TResult Function(PaymentHash paymentHash, int amountMsat)
+ paymentReceived,
+ required TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)
+ channelReady,
+ required TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)
+ channelClosed,
required TResult Function(
ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage)
- contentiousClaimable,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int claimableHeight, PaymentHash paymentHash)
- maybeTimeoutClaimableHtlc,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int expiryHeight, PaymentHash paymentHash)
- maybePreimageClaimableHtlc,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)
- counterpartyRevokedOutputClaimable,
+ OutPoint fundingTxo)
+ channelPending,
}) {
- return claimableAwaitingConfirmations(
- channelId, counterpartyNodeId, amountSatoshis, confirmationHeight);
+ return paymentFailed(paymentHash);
}
@override
@optionalTypeArgs
TResult? whenOrNull({
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- claimableOnChannelClose,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int confirmationHeight)?
- claimableAwaitingConfirmations,
+ TResult? Function(PaymentHash paymentHash)? paymentSuccessful,
+ TResult? Function(PaymentHash paymentHash)? paymentFailed,
+ TResult? Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
+ TResult? Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelReady,
+ TResult? Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelClosed,
TResult? Function(
ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage)?
- contentiousClaimable,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int claimableHeight, PaymentHash paymentHash)?
- maybeTimeoutClaimableHtlc,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int expiryHeight, PaymentHash paymentHash)?
- maybePreimageClaimableHtlc,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- counterpartyRevokedOutputClaimable,
+ OutPoint fundingTxo)?
+ channelPending,
}) {
- return claimableAwaitingConfirmations?.call(
- channelId, counterpartyNodeId, amountSatoshis, confirmationHeight);
+ return paymentFailed?.call(paymentHash);
}
@override
@optionalTypeArgs
TResult maybeWhen({
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- claimableOnChannelClose,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int confirmationHeight)?
- claimableAwaitingConfirmations,
+ TResult Function(PaymentHash paymentHash)? paymentSuccessful,
+ TResult Function(PaymentHash paymentHash)? paymentFailed,
+ TResult Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
+ TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelReady,
+ TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelClosed,
TResult Function(
ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage)?
- contentiousClaimable,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int claimableHeight, PaymentHash paymentHash)?
- maybeTimeoutClaimableHtlc,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int expiryHeight, PaymentHash paymentHash)?
- maybePreimageClaimableHtlc,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- counterpartyRevokedOutputClaimable,
+ OutPoint fundingTxo)?
+ channelPending,
required TResult orElse(),
}) {
- if (claimableAwaitingConfirmations != null) {
- return claimableAwaitingConfirmations(
- channelId, counterpartyNodeId, amountSatoshis, confirmationHeight);
+ if (paymentFailed != null) {
+ return paymentFailed(paymentHash);
}
return orElse();
}
@@ -5369,337 +1212,207 @@ class _$LightningBalance_ClaimableAwaitingConfirmationsImpl
@override
@optionalTypeArgs
TResult map({
- required TResult Function(LightningBalance_ClaimableOnChannelClose value)
- claimableOnChannelClose,
- required TResult Function(
- LightningBalance_ClaimableAwaitingConfirmations value)
- claimableAwaitingConfirmations,
- required TResult Function(LightningBalance_ContentiousClaimable value)
- contentiousClaimable,
- required TResult Function(LightningBalance_MaybeTimeoutClaimableHTLC value)
- maybeTimeoutClaimableHtlc,
- required TResult Function(LightningBalance_MaybePreimageClaimableHTLC value)
- maybePreimageClaimableHtlc,
- required TResult Function(
- LightningBalance_CounterpartyRevokedOutputClaimable value)
- counterpartyRevokedOutputClaimable,
+ required TResult Function(Event_PaymentSuccessful value) paymentSuccessful,
+ required TResult Function(Event_PaymentFailed value) paymentFailed,
+ required TResult Function(Event_PaymentReceived value) paymentReceived,
+ required TResult Function(Event_ChannelReady value) channelReady,
+ required TResult Function(Event_ChannelClosed value) channelClosed,
+ required TResult Function(Event_ChannelPending value) channelPending,
}) {
- return claimableAwaitingConfirmations(this);
+ return paymentFailed(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull({
- TResult? Function(LightningBalance_ClaimableOnChannelClose value)?
- claimableOnChannelClose,
- TResult? Function(LightningBalance_ClaimableAwaitingConfirmations value)?
- claimableAwaitingConfirmations,
- TResult? Function(LightningBalance_ContentiousClaimable value)?
- contentiousClaimable,
- TResult? Function(LightningBalance_MaybeTimeoutClaimableHTLC value)?
- maybeTimeoutClaimableHtlc,
- TResult? Function(LightningBalance_MaybePreimageClaimableHTLC value)?
- maybePreimageClaimableHtlc,
- TResult? Function(
- LightningBalance_CounterpartyRevokedOutputClaimable value)?
- counterpartyRevokedOutputClaimable,
+ TResult? Function(Event_PaymentSuccessful value)? paymentSuccessful,
+ TResult? Function(Event_PaymentFailed value)? paymentFailed,
+ TResult? Function(Event_PaymentReceived value)? paymentReceived,
+ TResult? Function(Event_ChannelReady value)? channelReady,
+ TResult? Function(Event_ChannelClosed value)? channelClosed,
+ TResult? Function(Event_ChannelPending value)? channelPending,
}) {
- return claimableAwaitingConfirmations?.call(this);
+ return paymentFailed?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap({
- TResult Function(LightningBalance_ClaimableOnChannelClose value)?
- claimableOnChannelClose,
- TResult Function(LightningBalance_ClaimableAwaitingConfirmations value)?
- claimableAwaitingConfirmations,
- TResult Function(LightningBalance_ContentiousClaimable value)?
- contentiousClaimable,
- TResult Function(LightningBalance_MaybeTimeoutClaimableHTLC value)?
- maybeTimeoutClaimableHtlc,
- TResult Function(LightningBalance_MaybePreimageClaimableHTLC value)?
- maybePreimageClaimableHtlc,
- TResult Function(LightningBalance_CounterpartyRevokedOutputClaimable value)?
- counterpartyRevokedOutputClaimable,
+ TResult Function(Event_PaymentSuccessful value)? paymentSuccessful,
+ TResult Function(Event_PaymentFailed value)? paymentFailed,
+ TResult Function(Event_PaymentReceived value)? paymentReceived,
+ TResult Function(Event_ChannelReady value)? channelReady,
+ TResult Function(Event_ChannelClosed value)? channelClosed,
+ TResult Function(Event_ChannelPending value)? channelPending,
required TResult orElse(),
}) {
- if (claimableAwaitingConfirmations != null) {
- return claimableAwaitingConfirmations(this);
+ if (paymentFailed != null) {
+ return paymentFailed(this);
}
return orElse();
}
}
-abstract class LightningBalance_ClaimableAwaitingConfirmations
- implements LightningBalance {
- const factory LightningBalance_ClaimableAwaitingConfirmations(
- {required final ChannelId channelId,
- required final PublicKey counterpartyNodeId,
- required final int amountSatoshis,
- required final int confirmationHeight}) =
- _$LightningBalance_ClaimableAwaitingConfirmationsImpl;
-
- @override
-
- /// The identifier of the channel this balance belongs to.
- ChannelId get channelId;
- @override
-
- /// The identifier of our channel counterparty.
- PublicKey get counterpartyNodeId;
- @override
+abstract class Event_PaymentFailed extends Event {
+ const factory Event_PaymentFailed({required final PaymentHash paymentHash}) =
+ _$Event_PaymentFailedImpl;
+ const Event_PaymentFailed._() : super._();
- /// The amount available to claim, in satoshis, possibly excluding the on-chain fees which
- /// were spent in broadcasting the transaction.
- int get amountSatoshis;
-
- /// The height at which an [`Event::SpendableOutputs`] event will be generated for this
- /// amount.
- ///
- /// [`Event::SpendableOutputs`]: lightning::events::Event::SpendableOutputs
- int get confirmationHeight;
- @override
+ /// The hash of the payment.
+ PaymentHash get paymentHash;
@JsonKey(ignore: true)
- _$$LightningBalance_ClaimableAwaitingConfirmationsImplCopyWith<
- _$LightningBalance_ClaimableAwaitingConfirmationsImpl>
- get copyWith => throw _privateConstructorUsedError;
+ _$$Event_PaymentFailedImplCopyWith<_$Event_PaymentFailedImpl> get copyWith =>
+ throw _privateConstructorUsedError;
}
/// @nodoc
-abstract class _$$LightningBalance_ContentiousClaimableImplCopyWith<$Res>
- implements $LightningBalanceCopyWith<$Res> {
- factory _$$LightningBalance_ContentiousClaimableImplCopyWith(
- _$LightningBalance_ContentiousClaimableImpl value,
- $Res Function(_$LightningBalance_ContentiousClaimableImpl) then) =
- __$$LightningBalance_ContentiousClaimableImplCopyWithImpl<$Res>;
- @override
+abstract class _$$Event_PaymentReceivedImplCopyWith<$Res> {
+ factory _$$Event_PaymentReceivedImplCopyWith(
+ _$Event_PaymentReceivedImpl value,
+ $Res Function(_$Event_PaymentReceivedImpl) then) =
+ __$$Event_PaymentReceivedImplCopyWithImpl<$Res>;
@useResult
- $Res call(
- {ChannelId channelId,
- PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage});
+ $Res call({PaymentHash paymentHash, int amountMsat});
}
/// @nodoc
-class __$$LightningBalance_ContentiousClaimableImplCopyWithImpl<$Res>
- extends _$LightningBalanceCopyWithImpl<$Res,
- _$LightningBalance_ContentiousClaimableImpl>
- implements _$$LightningBalance_ContentiousClaimableImplCopyWith<$Res> {
- __$$LightningBalance_ContentiousClaimableImplCopyWithImpl(
- _$LightningBalance_ContentiousClaimableImpl _value,
- $Res Function(_$LightningBalance_ContentiousClaimableImpl) _then)
+class __$$Event_PaymentReceivedImplCopyWithImpl<$Res>
+ extends _$EventCopyWithImpl<$Res, _$Event_PaymentReceivedImpl>
+ implements _$$Event_PaymentReceivedImplCopyWith<$Res> {
+ __$$Event_PaymentReceivedImplCopyWithImpl(_$Event_PaymentReceivedImpl _value,
+ $Res Function(_$Event_PaymentReceivedImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
- Object? channelId = null,
- Object? counterpartyNodeId = null,
- Object? amountSatoshis = null,
- Object? timeoutHeight = null,
Object? paymentHash = null,
- Object? paymentPreimage = null,
+ Object? amountMsat = null,
}) {
- return _then(_$LightningBalance_ContentiousClaimableImpl(
- channelId: null == channelId
- ? _value.channelId
- : channelId // ignore: cast_nullable_to_non_nullable
- as ChannelId,
- counterpartyNodeId: null == counterpartyNodeId
- ? _value.counterpartyNodeId
- : counterpartyNodeId // ignore: cast_nullable_to_non_nullable
- as PublicKey,
- amountSatoshis: null == amountSatoshis
- ? _value.amountSatoshis
- : amountSatoshis // ignore: cast_nullable_to_non_nullable
- as int,
- timeoutHeight: null == timeoutHeight
- ? _value.timeoutHeight
- : timeoutHeight // ignore: cast_nullable_to_non_nullable
- as int,
+ return _then(_$Event_PaymentReceivedImpl(
paymentHash: null == paymentHash
? _value.paymentHash
: paymentHash // ignore: cast_nullable_to_non_nullable
as PaymentHash,
- paymentPreimage: null == paymentPreimage
- ? _value.paymentPreimage
- : paymentPreimage // ignore: cast_nullable_to_non_nullable
- as PaymentPreimage,
+ amountMsat: null == amountMsat
+ ? _value.amountMsat
+ : amountMsat // ignore: cast_nullable_to_non_nullable
+ as int,
));
}
}
/// @nodoc
-class _$LightningBalance_ContentiousClaimableImpl
- implements LightningBalance_ContentiousClaimable {
- const _$LightningBalance_ContentiousClaimableImpl(
- {required this.channelId,
- required this.counterpartyNodeId,
- required this.amountSatoshis,
- required this.timeoutHeight,
- required this.paymentHash,
- required this.paymentPreimage});
-
- /// The identifier of the channel this balance belongs to.
- @override
- final ChannelId channelId;
-
- /// The identifier of our channel counterparty.
- @override
- final PublicKey counterpartyNodeId;
-
- /// The amount available to claim, in satoshis, excluding the on-chain fees which will be
- /// required to do so.
- @override
- final int amountSatoshis;
-
- /// The height at which the counterparty may be able to claim the balance if we have not
- /// done so.
- @override
- final int timeoutHeight;
+class _$Event_PaymentReceivedImpl extends Event_PaymentReceived {
+ const _$Event_PaymentReceivedImpl(
+ {required this.paymentHash, required this.amountMsat})
+ : super._();
- /// The payment hash that locks this HTLC.
+ /// The hash of the payment.
@override
final PaymentHash paymentHash;
- /// The preimage that can be used to claim this HTLC.
+ /// The value, in thousandths of a satoshi, that has been received.
@override
- final PaymentPreimage paymentPreimage;
+ final int amountMsat;
@override
String toString() {
- return 'LightningBalance.contentiousClaimable(channelId: $channelId, counterpartyNodeId: $counterpartyNodeId, amountSatoshis: $amountSatoshis, timeoutHeight: $timeoutHeight, paymentHash: $paymentHash, paymentPreimage: $paymentPreimage)';
+ return 'Event.paymentReceived(paymentHash: $paymentHash, amountMsat: $amountMsat)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
- other is _$LightningBalance_ContentiousClaimableImpl &&
- (identical(other.channelId, channelId) ||
- other.channelId == channelId) &&
- (identical(other.counterpartyNodeId, counterpartyNodeId) ||
- other.counterpartyNodeId == counterpartyNodeId) &&
- (identical(other.amountSatoshis, amountSatoshis) ||
- other.amountSatoshis == amountSatoshis) &&
- (identical(other.timeoutHeight, timeoutHeight) ||
- other.timeoutHeight == timeoutHeight) &&
+ other is _$Event_PaymentReceivedImpl &&
(identical(other.paymentHash, paymentHash) ||
other.paymentHash == paymentHash) &&
- (identical(other.paymentPreimage, paymentPreimage) ||
- other.paymentPreimage == paymentPreimage));
+ (identical(other.amountMsat, amountMsat) ||
+ other.amountMsat == amountMsat));
}
@override
- int get hashCode => Object.hash(runtimeType, channelId, counterpartyNodeId,
- amountSatoshis, timeoutHeight, paymentHash, paymentPreimage);
+ int get hashCode => Object.hash(runtimeType, paymentHash, amountMsat);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
- _$$LightningBalance_ContentiousClaimableImplCopyWith<
- _$LightningBalance_ContentiousClaimableImpl>
- get copyWith => __$$LightningBalance_ContentiousClaimableImplCopyWithImpl<
- _$LightningBalance_ContentiousClaimableImpl>(this, _$identity);
+ _$$Event_PaymentReceivedImplCopyWith<_$Event_PaymentReceivedImpl>
+ get copyWith => __$$Event_PaymentReceivedImplCopyWithImpl<
+ _$Event_PaymentReceivedImpl>(this, _$identity);
@override
@optionalTypeArgs
TResult when({
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)
- claimableOnChannelClose,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int confirmationHeight)
- claimableAwaitingConfirmations,
+ required TResult Function(PaymentHash paymentHash) paymentSuccessful,
+ required TResult Function(PaymentHash paymentHash) paymentFailed,
+ required TResult Function(PaymentHash paymentHash, int amountMsat)
+ paymentReceived,
+ required TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)
+ channelReady,
+ required TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)
+ channelClosed,
required TResult Function(
ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage)
- contentiousClaimable,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int claimableHeight, PaymentHash paymentHash)
- maybeTimeoutClaimableHtlc,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int expiryHeight, PaymentHash paymentHash)
- maybePreimageClaimableHtlc,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)
- counterpartyRevokedOutputClaimable,
+ OutPoint fundingTxo)
+ channelPending,
}) {
- return contentiousClaimable(channelId, counterpartyNodeId, amountSatoshis,
- timeoutHeight, paymentHash, paymentPreimage);
+ return paymentReceived(paymentHash, amountMsat);
}
@override
@optionalTypeArgs
TResult? whenOrNull({
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- claimableOnChannelClose,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int confirmationHeight)?
- claimableAwaitingConfirmations,
+ TResult? Function(PaymentHash paymentHash)? paymentSuccessful,
+ TResult? Function(PaymentHash paymentHash)? paymentFailed,
+ TResult? Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
+ TResult? Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelReady,
+ TResult? Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelClosed,
TResult? Function(
ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage)?
- contentiousClaimable,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int claimableHeight, PaymentHash paymentHash)?
- maybeTimeoutClaimableHtlc,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int expiryHeight, PaymentHash paymentHash)?
- maybePreimageClaimableHtlc,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- counterpartyRevokedOutputClaimable,
+ OutPoint fundingTxo)?
+ channelPending,
}) {
- return contentiousClaimable?.call(channelId, counterpartyNodeId,
- amountSatoshis, timeoutHeight, paymentHash, paymentPreimage);
+ return paymentReceived?.call(paymentHash, amountMsat);
}
@override
@optionalTypeArgs
TResult maybeWhen({
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- claimableOnChannelClose,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int confirmationHeight)?
- claimableAwaitingConfirmations,
+ TResult Function(PaymentHash paymentHash)? paymentSuccessful,
+ TResult Function(PaymentHash paymentHash)? paymentFailed,
+ TResult Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
+ TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelReady,
+ TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelClosed,
TResult Function(
ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage)?
- contentiousClaimable,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int claimableHeight, PaymentHash paymentHash)?
- maybeTimeoutClaimableHtlc,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int expiryHeight, PaymentHash paymentHash)?
- maybePreimageClaimableHtlc,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- counterpartyRevokedOutputClaimable,
+ OutPoint fundingTxo)?
+ channelPending,
required TResult orElse(),
}) {
- if (contentiousClaimable != null) {
- return contentiousClaimable(channelId, counterpartyNodeId, amountSatoshis,
- timeoutHeight, paymentHash, paymentPreimage);
+ if (paymentReceived != null) {
+ return paymentReceived(paymentHash, amountMsat);
}
return orElse();
}
@@ -5707,333 +1420,225 @@ class _$LightningBalance_ContentiousClaimableImpl
@override
@optionalTypeArgs
TResult map({
- required TResult Function(LightningBalance_ClaimableOnChannelClose value)
- claimableOnChannelClose,
- required TResult Function(
- LightningBalance_ClaimableAwaitingConfirmations value)
- claimableAwaitingConfirmations,
- required TResult Function(LightningBalance_ContentiousClaimable value)
- contentiousClaimable,
- required TResult Function(LightningBalance_MaybeTimeoutClaimableHTLC value)
- maybeTimeoutClaimableHtlc,
- required TResult Function(LightningBalance_MaybePreimageClaimableHTLC value)
- maybePreimageClaimableHtlc,
- required TResult Function(
- LightningBalance_CounterpartyRevokedOutputClaimable value)
- counterpartyRevokedOutputClaimable,
+ required TResult Function(Event_PaymentSuccessful value) paymentSuccessful,
+ required TResult Function(Event_PaymentFailed value) paymentFailed,
+ required TResult Function(Event_PaymentReceived value) paymentReceived,
+ required TResult Function(Event_ChannelReady value) channelReady,
+ required TResult Function(Event_ChannelClosed value) channelClosed,
+ required TResult Function(Event_ChannelPending value) channelPending,
}) {
- return contentiousClaimable(this);
+ return paymentReceived(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull({
- TResult? Function(LightningBalance_ClaimableOnChannelClose value)?
- claimableOnChannelClose,
- TResult? Function(LightningBalance_ClaimableAwaitingConfirmations value)?
- claimableAwaitingConfirmations,
- TResult? Function(LightningBalance_ContentiousClaimable value)?
- contentiousClaimable,
- TResult? Function(LightningBalance_MaybeTimeoutClaimableHTLC value)?
- maybeTimeoutClaimableHtlc,
- TResult? Function(LightningBalance_MaybePreimageClaimableHTLC value)?
- maybePreimageClaimableHtlc,
- TResult? Function(
- LightningBalance_CounterpartyRevokedOutputClaimable value)?
- counterpartyRevokedOutputClaimable,
+ TResult? Function(Event_PaymentSuccessful value)? paymentSuccessful,
+ TResult? Function(Event_PaymentFailed value)? paymentFailed,
+ TResult? Function(Event_PaymentReceived value)? paymentReceived,
+ TResult? Function(Event_ChannelReady value)? channelReady,
+ TResult? Function(Event_ChannelClosed value)? channelClosed,
+ TResult? Function(Event_ChannelPending value)? channelPending,
}) {
- return contentiousClaimable?.call(this);
+ return paymentReceived?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap({
- TResult Function(LightningBalance_ClaimableOnChannelClose value)?
- claimableOnChannelClose,
- TResult Function(LightningBalance_ClaimableAwaitingConfirmations value)?
- claimableAwaitingConfirmations,
- TResult Function(LightningBalance_ContentiousClaimable value)?
- contentiousClaimable,
- TResult Function(LightningBalance_MaybeTimeoutClaimableHTLC value)?
- maybeTimeoutClaimableHtlc,
- TResult Function(LightningBalance_MaybePreimageClaimableHTLC value)?
- maybePreimageClaimableHtlc,
- TResult Function(LightningBalance_CounterpartyRevokedOutputClaimable value)?
- counterpartyRevokedOutputClaimable,
+ TResult Function(Event_PaymentSuccessful value)? paymentSuccessful,
+ TResult Function(Event_PaymentFailed value)? paymentFailed,
+ TResult Function(Event_PaymentReceived value)? paymentReceived,
+ TResult Function(Event_ChannelReady value)? channelReady,
+ TResult Function(Event_ChannelClosed value)? channelClosed,
+ TResult Function(Event_ChannelPending value)? channelPending,
required TResult orElse(),
}) {
- if (contentiousClaimable != null) {
- return contentiousClaimable(this);
+ if (paymentReceived != null) {
+ return paymentReceived(this);
}
return orElse();
}
}
-abstract class LightningBalance_ContentiousClaimable
- implements LightningBalance {
- const factory LightningBalance_ContentiousClaimable(
- {required final ChannelId channelId,
- required final PublicKey counterpartyNodeId,
- required final int amountSatoshis,
- required final int timeoutHeight,
- required final PaymentHash paymentHash,
- required final PaymentPreimage paymentPreimage}) =
- _$LightningBalance_ContentiousClaimableImpl;
-
- @override
-
- /// The identifier of the channel this balance belongs to.
- ChannelId get channelId;
- @override
-
- /// The identifier of our channel counterparty.
- PublicKey get counterpartyNodeId;
- @override
-
- /// The amount available to claim, in satoshis, excluding the on-chain fees which will be
- /// required to do so.
- int get amountSatoshis;
-
- /// The height at which the counterparty may be able to claim the balance if we have not
- /// done so.
- int get timeoutHeight;
+abstract class Event_PaymentReceived extends Event {
+ const factory Event_PaymentReceived(
+ {required final PaymentHash paymentHash,
+ required final int amountMsat}) = _$Event_PaymentReceivedImpl;
+ const Event_PaymentReceived._() : super._();
- /// The payment hash that locks this HTLC.
+ /// The hash of the payment.
PaymentHash get paymentHash;
- /// The preimage that can be used to claim this HTLC.
- PaymentPreimage get paymentPreimage;
- @override
+ /// The value, in thousandths of a satoshi, that has been received.
+ int get amountMsat;
@JsonKey(ignore: true)
- _$$LightningBalance_ContentiousClaimableImplCopyWith<
- _$LightningBalance_ContentiousClaimableImpl>
+ _$$Event_PaymentReceivedImplCopyWith<_$Event_PaymentReceivedImpl>
get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
-abstract class _$$LightningBalance_MaybeTimeoutClaimableHTLCImplCopyWith<$Res>
- implements $LightningBalanceCopyWith<$Res> {
- factory _$$LightningBalance_MaybeTimeoutClaimableHTLCImplCopyWith(
- _$LightningBalance_MaybeTimeoutClaimableHTLCImpl value,
- $Res Function(_$LightningBalance_MaybeTimeoutClaimableHTLCImpl)
- then) =
- __$$LightningBalance_MaybeTimeoutClaimableHTLCImplCopyWithImpl<$Res>;
- @override
+abstract class _$$Event_ChannelReadyImplCopyWith<$Res> {
+ factory _$$Event_ChannelReadyImplCopyWith(_$Event_ChannelReadyImpl value,
+ $Res Function(_$Event_ChannelReadyImpl) then) =
+ __$$Event_ChannelReadyImplCopyWithImpl<$Res>;
@useResult
$Res call(
{ChannelId channelId,
- PublicKey counterpartyNodeId,
- int amountSatoshis,
- int claimableHeight,
- PaymentHash paymentHash});
+ UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId});
}
/// @nodoc
-class __$$LightningBalance_MaybeTimeoutClaimableHTLCImplCopyWithImpl<$Res>
- extends _$LightningBalanceCopyWithImpl<$Res,
- _$LightningBalance_MaybeTimeoutClaimableHTLCImpl>
- implements _$$LightningBalance_MaybeTimeoutClaimableHTLCImplCopyWith<$Res> {
- __$$LightningBalance_MaybeTimeoutClaimableHTLCImplCopyWithImpl(
- _$LightningBalance_MaybeTimeoutClaimableHTLCImpl _value,
- $Res Function(_$LightningBalance_MaybeTimeoutClaimableHTLCImpl) _then)
+class __$$Event_ChannelReadyImplCopyWithImpl<$Res>
+ extends _$EventCopyWithImpl<$Res, _$Event_ChannelReadyImpl>
+ implements _$$Event_ChannelReadyImplCopyWith<$Res> {
+ __$$Event_ChannelReadyImplCopyWithImpl(_$Event_ChannelReadyImpl _value,
+ $Res Function(_$Event_ChannelReadyImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? channelId = null,
- Object? counterpartyNodeId = null,
- Object? amountSatoshis = null,
- Object? claimableHeight = null,
- Object? paymentHash = null,
+ Object? userChannelId = null,
+ Object? counterpartyNodeId = freezed,
}) {
- return _then(_$LightningBalance_MaybeTimeoutClaimableHTLCImpl(
+ return _then(_$Event_ChannelReadyImpl(
channelId: null == channelId
? _value.channelId
: channelId // ignore: cast_nullable_to_non_nullable
as ChannelId,
- counterpartyNodeId: null == counterpartyNodeId
+ userChannelId: null == userChannelId
+ ? _value.userChannelId
+ : userChannelId // ignore: cast_nullable_to_non_nullable
+ as UserChannelId,
+ counterpartyNodeId: freezed == counterpartyNodeId
? _value.counterpartyNodeId
: counterpartyNodeId // ignore: cast_nullable_to_non_nullable
- as PublicKey,
- amountSatoshis: null == amountSatoshis
- ? _value.amountSatoshis
- : amountSatoshis // ignore: cast_nullable_to_non_nullable
- as int,
- claimableHeight: null == claimableHeight
- ? _value.claimableHeight
- : claimableHeight // ignore: cast_nullable_to_non_nullable
- as int,
- paymentHash: null == paymentHash
- ? _value.paymentHash
- : paymentHash // ignore: cast_nullable_to_non_nullable
- as PaymentHash,
+ as PublicKey?,
));
}
}
/// @nodoc
-class _$LightningBalance_MaybeTimeoutClaimableHTLCImpl
- implements LightningBalance_MaybeTimeoutClaimableHTLC {
- const _$LightningBalance_MaybeTimeoutClaimableHTLCImpl(
+class _$Event_ChannelReadyImpl extends Event_ChannelReady {
+ const _$Event_ChannelReadyImpl(
{required this.channelId,
- required this.counterpartyNodeId,
- required this.amountSatoshis,
- required this.claimableHeight,
- required this.paymentHash});
+ required this.userChannelId,
+ this.counterpartyNodeId})
+ : super._();
- /// The identifier of the channel this balance belongs to.
+ /// The channel_id of the channel.
@override
final ChannelId channelId;
- /// The identifier of our channel counterparty.
- @override
- final PublicKey counterpartyNodeId;
-
- /// The amount potentially available to claim, in satoshis, excluding the on-chain fees
- /// which will be required to do so.
- @override
- final int amountSatoshis;
-
- /// The height at which we will be able to claim the balance if our counterparty has not
- /// done so.
+ /// The user_channel_id of the channel.
@override
- final int claimableHeight;
-
- /// The payment hash whose preimage our counterparty needs to claim this HTLC.
+ final UserChannelId userChannelId;
@override
- final PaymentHash paymentHash;
+ final PublicKey? counterpartyNodeId;
@override
String toString() {
- return 'LightningBalance.maybeTimeoutClaimableHtlc(channelId: $channelId, counterpartyNodeId: $counterpartyNodeId, amountSatoshis: $amountSatoshis, claimableHeight: $claimableHeight, paymentHash: $paymentHash)';
+ return 'Event.channelReady(channelId: $channelId, userChannelId: $userChannelId, counterpartyNodeId: $counterpartyNodeId)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
- other is _$LightningBalance_MaybeTimeoutClaimableHTLCImpl &&
+ other is _$Event_ChannelReadyImpl &&
(identical(other.channelId, channelId) ||
other.channelId == channelId) &&
+ (identical(other.userChannelId, userChannelId) ||
+ other.userChannelId == userChannelId) &&
(identical(other.counterpartyNodeId, counterpartyNodeId) ||
- other.counterpartyNodeId == counterpartyNodeId) &&
- (identical(other.amountSatoshis, amountSatoshis) ||
- other.amountSatoshis == amountSatoshis) &&
- (identical(other.claimableHeight, claimableHeight) ||
- other.claimableHeight == claimableHeight) &&
- (identical(other.paymentHash, paymentHash) ||
- other.paymentHash == paymentHash));
+ other.counterpartyNodeId == counterpartyNodeId));
}
@override
- int get hashCode => Object.hash(runtimeType, channelId, counterpartyNodeId,
- amountSatoshis, claimableHeight, paymentHash);
+ int get hashCode =>
+ Object.hash(runtimeType, channelId, userChannelId, counterpartyNodeId);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
- _$$LightningBalance_MaybeTimeoutClaimableHTLCImplCopyWith<
- _$LightningBalance_MaybeTimeoutClaimableHTLCImpl>
- get copyWith =>
- __$$LightningBalance_MaybeTimeoutClaimableHTLCImplCopyWithImpl<
- _$LightningBalance_MaybeTimeoutClaimableHTLCImpl>(
- this, _$identity);
+ _$$Event_ChannelReadyImplCopyWith<_$Event_ChannelReadyImpl> get copyWith =>
+ __$$Event_ChannelReadyImplCopyWithImpl<_$Event_ChannelReadyImpl>(
+ this, _$identity);
@override
@optionalTypeArgs
TResult when({
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)
- claimableOnChannelClose,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int confirmationHeight)
- claimableAwaitingConfirmations,
+ required TResult Function(PaymentHash paymentHash) paymentSuccessful,
+ required TResult Function(PaymentHash paymentHash) paymentFailed,
+ required TResult Function(PaymentHash paymentHash, int amountMsat)
+ paymentReceived,
+ required TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)
+ channelReady,
+ required TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)
+ channelClosed,
required TResult Function(
ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage)
- contentiousClaimable,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int claimableHeight, PaymentHash paymentHash)
- maybeTimeoutClaimableHtlc,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int expiryHeight, PaymentHash paymentHash)
- maybePreimageClaimableHtlc,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)
- counterpartyRevokedOutputClaimable,
+ OutPoint fundingTxo)
+ channelPending,
}) {
- return maybeTimeoutClaimableHtlc(channelId, counterpartyNodeId,
- amountSatoshis, claimableHeight, paymentHash);
+ return channelReady(channelId, userChannelId, counterpartyNodeId);
}
@override
@optionalTypeArgs
TResult? whenOrNull({
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- claimableOnChannelClose,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int confirmationHeight)?
- claimableAwaitingConfirmations,
+ TResult? Function(PaymentHash paymentHash)? paymentSuccessful,
+ TResult? Function(PaymentHash paymentHash)? paymentFailed,
+ TResult? Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
+ TResult? Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelReady,
+ TResult? Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelClosed,
TResult? Function(
ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage)?
- contentiousClaimable,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int claimableHeight, PaymentHash paymentHash)?
- maybeTimeoutClaimableHtlc,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int expiryHeight, PaymentHash paymentHash)?
- maybePreimageClaimableHtlc,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- counterpartyRevokedOutputClaimable,
+ OutPoint fundingTxo)?
+ channelPending,
}) {
- return maybeTimeoutClaimableHtlc?.call(channelId, counterpartyNodeId,
- amountSatoshis, claimableHeight, paymentHash);
+ return channelReady?.call(channelId, userChannelId, counterpartyNodeId);
}
@override
@optionalTypeArgs
TResult maybeWhen({
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- claimableOnChannelClose,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int confirmationHeight)?
- claimableAwaitingConfirmations,
+ TResult Function(PaymentHash paymentHash)? paymentSuccessful,
+ TResult Function(PaymentHash paymentHash)? paymentFailed,
+ TResult Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
+ TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelReady,
+ TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelClosed,
TResult Function(
ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage)?
- contentiousClaimable,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int claimableHeight, PaymentHash paymentHash)?
- maybeTimeoutClaimableHtlc,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int expiryHeight, PaymentHash paymentHash)?
- maybePreimageClaimableHtlc,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- counterpartyRevokedOutputClaimable,
+ OutPoint fundingTxo)?
+ channelPending,
required TResult orElse(),
}) {
- if (maybeTimeoutClaimableHtlc != null) {
- return maybeTimeoutClaimableHtlc(channelId, counterpartyNodeId,
- amountSatoshis, claimableHeight, paymentHash);
+ if (channelReady != null) {
+ return channelReady(channelId, userChannelId, counterpartyNodeId);
}
return orElse();
}
@@ -6041,330 +1646,227 @@ class _$LightningBalance_MaybeTimeoutClaimableHTLCImpl
@override
@optionalTypeArgs
TResult map({
- required TResult Function(LightningBalance_ClaimableOnChannelClose value)
- claimableOnChannelClose,
- required TResult Function(
- LightningBalance_ClaimableAwaitingConfirmations value)
- claimableAwaitingConfirmations,
- required TResult Function(LightningBalance_ContentiousClaimable value)
- contentiousClaimable,
- required TResult Function(LightningBalance_MaybeTimeoutClaimableHTLC value)
- maybeTimeoutClaimableHtlc,
- required TResult Function(LightningBalance_MaybePreimageClaimableHTLC value)
- maybePreimageClaimableHtlc,
- required TResult Function(
- LightningBalance_CounterpartyRevokedOutputClaimable value)
- counterpartyRevokedOutputClaimable,
+ required TResult Function(Event_PaymentSuccessful value) paymentSuccessful,
+ required TResult Function(Event_PaymentFailed value) paymentFailed,
+ required TResult Function(Event_PaymentReceived value) paymentReceived,
+ required TResult Function(Event_ChannelReady value) channelReady,
+ required TResult Function(Event_ChannelClosed value) channelClosed,
+ required TResult Function(Event_ChannelPending value) channelPending,
}) {
- return maybeTimeoutClaimableHtlc(this);
+ return channelReady(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull({
- TResult? Function(LightningBalance_ClaimableOnChannelClose value)?
- claimableOnChannelClose,
- TResult? Function(LightningBalance_ClaimableAwaitingConfirmations value)?
- claimableAwaitingConfirmations,
- TResult? Function(LightningBalance_ContentiousClaimable value)?
- contentiousClaimable,
- TResult? Function(LightningBalance_MaybeTimeoutClaimableHTLC value)?
- maybeTimeoutClaimableHtlc,
- TResult? Function(LightningBalance_MaybePreimageClaimableHTLC value)?
- maybePreimageClaimableHtlc,
- TResult? Function(
- LightningBalance_CounterpartyRevokedOutputClaimable value)?
- counterpartyRevokedOutputClaimable,
+ TResult? Function(Event_PaymentSuccessful value)? paymentSuccessful,
+ TResult? Function(Event_PaymentFailed value)? paymentFailed,
+ TResult? Function(Event_PaymentReceived value)? paymentReceived,
+ TResult? Function(Event_ChannelReady value)? channelReady,
+ TResult? Function(Event_ChannelClosed value)? channelClosed,
+ TResult? Function(Event_ChannelPending value)? channelPending,
}) {
- return maybeTimeoutClaimableHtlc?.call(this);
+ return channelReady?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap({
- TResult Function(LightningBalance_ClaimableOnChannelClose value)?
- claimableOnChannelClose,
- TResult Function(LightningBalance_ClaimableAwaitingConfirmations value)?
- claimableAwaitingConfirmations,
- TResult Function(LightningBalance_ContentiousClaimable value)?
- contentiousClaimable,
- TResult Function(LightningBalance_MaybeTimeoutClaimableHTLC value)?
- maybeTimeoutClaimableHtlc,
- TResult Function(LightningBalance_MaybePreimageClaimableHTLC value)?
- maybePreimageClaimableHtlc,
- TResult Function(LightningBalance_CounterpartyRevokedOutputClaimable value)?
- counterpartyRevokedOutputClaimable,
+ TResult Function(Event_PaymentSuccessful value)? paymentSuccessful,
+ TResult Function(Event_PaymentFailed value)? paymentFailed,
+ TResult Function(Event_PaymentReceived value)? paymentReceived,
+ TResult Function(Event_ChannelReady value)? channelReady,
+ TResult Function(Event_ChannelClosed value)? channelClosed,
+ TResult Function(Event_ChannelPending value)? channelPending,
required TResult orElse(),
}) {
- if (maybeTimeoutClaimableHtlc != null) {
- return maybeTimeoutClaimableHtlc(this);
+ if (channelReady != null) {
+ return channelReady(this);
}
return orElse();
}
}
-abstract class LightningBalance_MaybeTimeoutClaimableHTLC
- implements LightningBalance {
- const factory LightningBalance_MaybeTimeoutClaimableHTLC(
- {required final ChannelId channelId,
- required final PublicKey counterpartyNodeId,
- required final int amountSatoshis,
- required final int claimableHeight,
- required final PaymentHash paymentHash}) =
- _$LightningBalance_MaybeTimeoutClaimableHTLCImpl;
-
- @override
+abstract class Event_ChannelReady extends Event {
+ const factory Event_ChannelReady(
+ {required final ChannelId channelId,
+ required final UserChannelId userChannelId,
+ final PublicKey? counterpartyNodeId}) = _$Event_ChannelReadyImpl;
+ const Event_ChannelReady._() : super._();
- /// The identifier of the channel this balance belongs to.
+ /// The channel_id of the channel.
ChannelId get channelId;
- @override
-
- /// The identifier of our channel counterparty.
- PublicKey get counterpartyNodeId;
- @override
-
- /// The amount potentially available to claim, in satoshis, excluding the on-chain fees
- /// which will be required to do so.
- int get amountSatoshis;
- /// The height at which we will be able to claim the balance if our counterparty has not
- /// done so.
- int get claimableHeight;
-
- /// The payment hash whose preimage our counterparty needs to claim this HTLC.
- PaymentHash get paymentHash;
- @override
+ /// The user_channel_id of the channel.
+ UserChannelId get userChannelId;
+ PublicKey? get counterpartyNodeId;
@JsonKey(ignore: true)
- _$$LightningBalance_MaybeTimeoutClaimableHTLCImplCopyWith<
- _$LightningBalance_MaybeTimeoutClaimableHTLCImpl>
- get copyWith => throw _privateConstructorUsedError;
+ _$$Event_ChannelReadyImplCopyWith<_$Event_ChannelReadyImpl> get copyWith =>
+ throw _privateConstructorUsedError;
}
/// @nodoc
-abstract class _$$LightningBalance_MaybePreimageClaimableHTLCImplCopyWith<$Res>
- implements $LightningBalanceCopyWith<$Res> {
- factory _$$LightningBalance_MaybePreimageClaimableHTLCImplCopyWith(
- _$LightningBalance_MaybePreimageClaimableHTLCImpl value,
- $Res Function(_$LightningBalance_MaybePreimageClaimableHTLCImpl)
- then) =
- __$$LightningBalance_MaybePreimageClaimableHTLCImplCopyWithImpl<$Res>;
- @override
+abstract class _$$Event_ChannelClosedImplCopyWith<$Res> {
+ factory _$$Event_ChannelClosedImplCopyWith(_$Event_ChannelClosedImpl value,
+ $Res Function(_$Event_ChannelClosedImpl) then) =
+ __$$Event_ChannelClosedImplCopyWithImpl<$Res>;
@useResult
$Res call(
{ChannelId channelId,
- PublicKey counterpartyNodeId,
- int amountSatoshis,
- int expiryHeight,
- PaymentHash paymentHash});
+ UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId});
}
/// @nodoc
-class __$$LightningBalance_MaybePreimageClaimableHTLCImplCopyWithImpl<$Res>
- extends _$LightningBalanceCopyWithImpl<$Res,
- _$LightningBalance_MaybePreimageClaimableHTLCImpl>
- implements
- _$$LightningBalance_MaybePreimageClaimableHTLCImplCopyWith<$Res> {
- __$$LightningBalance_MaybePreimageClaimableHTLCImplCopyWithImpl(
- _$LightningBalance_MaybePreimageClaimableHTLCImpl _value,
- $Res Function(_$LightningBalance_MaybePreimageClaimableHTLCImpl) _then)
+class __$$Event_ChannelClosedImplCopyWithImpl<$Res>
+ extends _$EventCopyWithImpl<$Res, _$Event_ChannelClosedImpl>
+ implements _$$Event_ChannelClosedImplCopyWith<$Res> {
+ __$$Event_ChannelClosedImplCopyWithImpl(_$Event_ChannelClosedImpl _value,
+ $Res Function(_$Event_ChannelClosedImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? channelId = null,
- Object? counterpartyNodeId = null,
- Object? amountSatoshis = null,
- Object? expiryHeight = null,
- Object? paymentHash = null,
+ Object? userChannelId = null,
+ Object? counterpartyNodeId = freezed,
}) {
- return _then(_$LightningBalance_MaybePreimageClaimableHTLCImpl(
+ return _then(_$Event_ChannelClosedImpl(
channelId: null == channelId
? _value.channelId
: channelId // ignore: cast_nullable_to_non_nullable
as ChannelId,
- counterpartyNodeId: null == counterpartyNodeId
+ userChannelId: null == userChannelId
+ ? _value.userChannelId
+ : userChannelId // ignore: cast_nullable_to_non_nullable
+ as UserChannelId,
+ counterpartyNodeId: freezed == counterpartyNodeId
? _value.counterpartyNodeId
: counterpartyNodeId // ignore: cast_nullable_to_non_nullable
- as PublicKey,
- amountSatoshis: null == amountSatoshis
- ? _value.amountSatoshis
- : amountSatoshis // ignore: cast_nullable_to_non_nullable
- as int,
- expiryHeight: null == expiryHeight
- ? _value.expiryHeight
- : expiryHeight // ignore: cast_nullable_to_non_nullable
- as int,
- paymentHash: null == paymentHash
- ? _value.paymentHash
- : paymentHash // ignore: cast_nullable_to_non_nullable
- as PaymentHash,
+ as PublicKey?,
));
}
}
/// @nodoc
-class _$LightningBalance_MaybePreimageClaimableHTLCImpl
- implements LightningBalance_MaybePreimageClaimableHTLC {
- const _$LightningBalance_MaybePreimageClaimableHTLCImpl(
+class _$Event_ChannelClosedImpl extends Event_ChannelClosed {
+ const _$Event_ChannelClosedImpl(
{required this.channelId,
- required this.counterpartyNodeId,
- required this.amountSatoshis,
- required this.expiryHeight,
- required this.paymentHash});
+ required this.userChannelId,
+ this.counterpartyNodeId})
+ : super._();
- /// The identifier of the channel this balance belongs to.
+ /// The channel_id of the channel.
@override
final ChannelId channelId;
- /// The identifier of our channel counterparty.
- @override
- final PublicKey counterpartyNodeId;
-
- /// The amount potentially available to claim, in satoshis, excluding the on-chain fees
- /// which will be required to do so.
- @override
- final int amountSatoshis;
-
- /// The height at which our counterparty will be able to claim the balance if we have not
- /// yet received the preimage and claimed it ourselves.
+ /// The user_channel_id of the channel.
@override
- final int expiryHeight;
-
- /// The payment hash whose preimage we need to claim this HTLC.
+ final UserChannelId userChannelId;
@override
- final PaymentHash paymentHash;
+ final PublicKey? counterpartyNodeId;
@override
String toString() {
- return 'LightningBalance.maybePreimageClaimableHtlc(channelId: $channelId, counterpartyNodeId: $counterpartyNodeId, amountSatoshis: $amountSatoshis, expiryHeight: $expiryHeight, paymentHash: $paymentHash)';
+ return 'Event.channelClosed(channelId: $channelId, userChannelId: $userChannelId, counterpartyNodeId: $counterpartyNodeId)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
- other is _$LightningBalance_MaybePreimageClaimableHTLCImpl &&
+ other is _$Event_ChannelClosedImpl &&
(identical(other.channelId, channelId) ||
other.channelId == channelId) &&
+ (identical(other.userChannelId, userChannelId) ||
+ other.userChannelId == userChannelId) &&
(identical(other.counterpartyNodeId, counterpartyNodeId) ||
- other.counterpartyNodeId == counterpartyNodeId) &&
- (identical(other.amountSatoshis, amountSatoshis) ||
- other.amountSatoshis == amountSatoshis) &&
- (identical(other.expiryHeight, expiryHeight) ||
- other.expiryHeight == expiryHeight) &&
- (identical(other.paymentHash, paymentHash) ||
- other.paymentHash == paymentHash));
+ other.counterpartyNodeId == counterpartyNodeId));
}
@override
- int get hashCode => Object.hash(runtimeType, channelId, counterpartyNodeId,
- amountSatoshis, expiryHeight, paymentHash);
+ int get hashCode =>
+ Object.hash(runtimeType, channelId, userChannelId, counterpartyNodeId);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
- _$$LightningBalance_MaybePreimageClaimableHTLCImplCopyWith<
- _$LightningBalance_MaybePreimageClaimableHTLCImpl>
- get copyWith =>
- __$$LightningBalance_MaybePreimageClaimableHTLCImplCopyWithImpl<
- _$LightningBalance_MaybePreimageClaimableHTLCImpl>(
- this, _$identity);
+ _$$Event_ChannelClosedImplCopyWith<_$Event_ChannelClosedImpl> get copyWith =>
+ __$$Event_ChannelClosedImplCopyWithImpl<_$Event_ChannelClosedImpl>(
+ this, _$identity);
@override
@optionalTypeArgs
TResult when({
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)
- claimableOnChannelClose,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int confirmationHeight)
- claimableAwaitingConfirmations,
+ required TResult Function(PaymentHash paymentHash) paymentSuccessful,
+ required TResult Function(PaymentHash paymentHash) paymentFailed,
+ required TResult Function(PaymentHash paymentHash, int amountMsat)
+ paymentReceived,
+ required TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)
+ channelReady,
+ required TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)
+ channelClosed,
required TResult Function(
ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage)
- contentiousClaimable,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int claimableHeight, PaymentHash paymentHash)
- maybeTimeoutClaimableHtlc,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int expiryHeight, PaymentHash paymentHash)
- maybePreimageClaimableHtlc,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)
- counterpartyRevokedOutputClaimable,
+ OutPoint fundingTxo)
+ channelPending,
}) {
- return maybePreimageClaimableHtlc(channelId, counterpartyNodeId,
- amountSatoshis, expiryHeight, paymentHash);
+ return channelClosed(channelId, userChannelId, counterpartyNodeId);
}
@override
@optionalTypeArgs
TResult? whenOrNull({
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- claimableOnChannelClose,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int confirmationHeight)?
- claimableAwaitingConfirmations,
+ TResult? Function(PaymentHash paymentHash)? paymentSuccessful,
+ TResult? Function(PaymentHash paymentHash)? paymentFailed,
+ TResult? Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
+ TResult? Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelReady,
+ TResult? Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelClosed,
TResult? Function(
ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage)?
- contentiousClaimable,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int claimableHeight, PaymentHash paymentHash)?
- maybeTimeoutClaimableHtlc,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int expiryHeight, PaymentHash paymentHash)?
- maybePreimageClaimableHtlc,
- TResult? Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- counterpartyRevokedOutputClaimable,
+ OutPoint fundingTxo)?
+ channelPending,
}) {
- return maybePreimageClaimableHtlc?.call(channelId, counterpartyNodeId,
- amountSatoshis, expiryHeight, paymentHash);
+ return channelClosed?.call(channelId, userChannelId, counterpartyNodeId);
}
@override
@optionalTypeArgs
TResult maybeWhen({
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- claimableOnChannelClose,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int confirmationHeight)?
- claimableAwaitingConfirmations,
+ TResult Function(PaymentHash paymentHash)? paymentSuccessful,
+ TResult Function(PaymentHash paymentHash)? paymentFailed,
+ TResult Function(PaymentHash paymentHash, int amountMsat)? paymentReceived,
+ TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelReady,
+ TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)?
+ channelClosed,
TResult Function(
ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage)?
- contentiousClaimable,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int claimableHeight, PaymentHash paymentHash)?
- maybeTimeoutClaimableHtlc,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int expiryHeight, PaymentHash paymentHash)?
- maybePreimageClaimableHtlc,
- TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)?
- counterpartyRevokedOutputClaimable,
+ OutPoint fundingTxo)?
+ channelPending,
required TResult orElse(),
}) {
- if (maybePreimageClaimableHtlc != null) {
- return maybePreimageClaimableHtlc(channelId, counterpartyNodeId,
- amountSatoshis, expiryHeight, paymentHash);
+ if (channelClosed != null) {
+ return channelClosed(channelId, userChannelId, counterpartyNodeId);
}
return orElse();
}
@@ -6372,306 +1874,260 @@ class _$LightningBalance_MaybePreimageClaimableHTLCImpl
@override
@optionalTypeArgs
TResult map({
- required TResult Function(LightningBalance_ClaimableOnChannelClose value)
- claimableOnChannelClose,
- required TResult Function(
- LightningBalance_ClaimableAwaitingConfirmations value)
- claimableAwaitingConfirmations,
- required TResult Function(LightningBalance_ContentiousClaimable value)
- contentiousClaimable,
- required TResult Function(LightningBalance_MaybeTimeoutClaimableHTLC value)
- maybeTimeoutClaimableHtlc,
- required TResult Function(LightningBalance_MaybePreimageClaimableHTLC value)
- maybePreimageClaimableHtlc,
- required TResult Function(
- LightningBalance_CounterpartyRevokedOutputClaimable value)
- counterpartyRevokedOutputClaimable,
+ required TResult Function(Event_PaymentSuccessful value) paymentSuccessful,
+ required TResult Function(Event_PaymentFailed value) paymentFailed,
+ required TResult Function(Event_PaymentReceived value) paymentReceived,
+ required TResult Function(Event_ChannelReady value) channelReady,
+ required TResult Function(Event_ChannelClosed value) channelClosed,
+ required TResult Function(Event_ChannelPending value) channelPending,
}) {
- return maybePreimageClaimableHtlc(this);
+ return channelClosed(this);
}
@override
@optionalTypeArgs
TResult? mapOrNull({
- TResult? Function(LightningBalance_ClaimableOnChannelClose value)?
- claimableOnChannelClose,
- TResult? Function(LightningBalance_ClaimableAwaitingConfirmations value)?
- claimableAwaitingConfirmations,
- TResult? Function(LightningBalance_ContentiousClaimable value)?
- contentiousClaimable,
- TResult? Function(LightningBalance_MaybeTimeoutClaimableHTLC value)?
- maybeTimeoutClaimableHtlc,
- TResult? Function(LightningBalance_MaybePreimageClaimableHTLC value)?
- maybePreimageClaimableHtlc,
- TResult? Function(
- LightningBalance_CounterpartyRevokedOutputClaimable value)?
- counterpartyRevokedOutputClaimable,
+ TResult? Function(Event_PaymentSuccessful value)? paymentSuccessful,
+ TResult? Function(Event_PaymentFailed value)? paymentFailed,
+ TResult? Function(Event_PaymentReceived value)? paymentReceived,
+ TResult? Function(Event_ChannelReady value)? channelReady,
+ TResult? Function(Event_ChannelClosed value)? channelClosed,
+ TResult? Function(Event_ChannelPending value)? channelPending,
}) {
- return maybePreimageClaimableHtlc?.call(this);
+ return channelClosed?.call(this);
}
@override
@optionalTypeArgs
TResult maybeMap({
- TResult Function(LightningBalance_ClaimableOnChannelClose value)?
- claimableOnChannelClose,
- TResult Function(LightningBalance_ClaimableAwaitingConfirmations value)?
- claimableAwaitingConfirmations,
- TResult Function(LightningBalance_ContentiousClaimable value)?
- contentiousClaimable,
- TResult Function(LightningBalance_MaybeTimeoutClaimableHTLC value)?
- maybeTimeoutClaimableHtlc,
- TResult Function(LightningBalance_MaybePreimageClaimableHTLC value)?
- maybePreimageClaimableHtlc,
- TResult Function(LightningBalance_CounterpartyRevokedOutputClaimable value)?
- counterpartyRevokedOutputClaimable,
+ TResult Function(Event_PaymentSuccessful value)? paymentSuccessful,
+ TResult Function(Event_PaymentFailed value)? paymentFailed,
+ TResult Function(Event_PaymentReceived value)? paymentReceived,
+ TResult Function(Event_ChannelReady value)? channelReady,
+ TResult Function(Event_ChannelClosed value)? channelClosed,
+ TResult Function(Event_ChannelPending value)? channelPending,
required TResult orElse(),
}) {
- if (maybePreimageClaimableHtlc != null) {
- return maybePreimageClaimableHtlc(this);
+ if (channelClosed != null) {
+ return channelClosed(this);
}
return orElse();
}
}
-abstract class LightningBalance_MaybePreimageClaimableHTLC
- implements LightningBalance {
- const factory LightningBalance_MaybePreimageClaimableHTLC(
- {required final ChannelId channelId,
- required final PublicKey counterpartyNodeId,
- required final int amountSatoshis,
- required final int expiryHeight,
- required final PaymentHash paymentHash}) =
- _$LightningBalance_MaybePreimageClaimableHTLCImpl;
-
- @override
+abstract class Event_ChannelClosed extends Event {
+ const factory Event_ChannelClosed(
+ {required final ChannelId channelId,
+ required final UserChannelId userChannelId,
+ final PublicKey? counterpartyNodeId}) = _$Event_ChannelClosedImpl;
+ const Event_ChannelClosed._() : super._();
- /// The identifier of the channel this balance belongs to.
+ /// The channel_id of the channel.
ChannelId get channelId;
- @override
-
- /// The identifier of our channel counterparty.
- PublicKey get counterpartyNodeId;
- @override
-
- /// The amount potentially available to claim, in satoshis, excluding the on-chain fees
- /// which will be required to do so.
- int get amountSatoshis;
- /// The height at which our counterparty will be able to claim the balance if we have not
- /// yet received the preimage and claimed it ourselves.
- int get expiryHeight;
-
- /// The payment hash whose preimage we need to claim this HTLC.
- PaymentHash get paymentHash;
- @override
+ /// The user_channel_id of the channel.
+ UserChannelId get userChannelId;
+ PublicKey? get counterpartyNodeId;
@JsonKey(ignore: true)
- _$$LightningBalance_MaybePreimageClaimableHTLCImplCopyWith<
- _$LightningBalance_MaybePreimageClaimableHTLCImpl>
- get copyWith => throw _privateConstructorUsedError;
+ _$$Event_ChannelClosedImplCopyWith<_$Event_ChannelClosedImpl> get copyWith =>
+ throw _privateConstructorUsedError;
}
/// @nodoc
-abstract class _$$LightningBalance_CounterpartyRevokedOutputClaimableImplCopyWith<
- $Res> implements $LightningBalanceCopyWith<$Res> {
- factory _$$LightningBalance_CounterpartyRevokedOutputClaimableImplCopyWith(
- _$LightningBalance_CounterpartyRevokedOutputClaimableImpl value,
- $Res Function(
- _$LightningBalance_CounterpartyRevokedOutputClaimableImpl)
- then) =
- __$$LightningBalance_CounterpartyRevokedOutputClaimableImplCopyWithImpl<
- $Res>;
- @override
+abstract class _$$Event_ChannelPendingImplCopyWith<$Res> {
+ factory _$$Event_ChannelPendingImplCopyWith(_$Event_ChannelPendingImpl value,
+ $Res Function(_$Event_ChannelPendingImpl) then) =
+ __$$Event_ChannelPendingImplCopyWithImpl<$Res>;
@useResult
$Res call(
- {ChannelId channelId, PublicKey counterpartyNodeId, int amountSatoshis});
+ {ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
+ PublicKey counterpartyNodeId,
+ OutPoint fundingTxo});
}
/// @nodoc
-class __$$LightningBalance_CounterpartyRevokedOutputClaimableImplCopyWithImpl<
- $Res>
- extends _$LightningBalanceCopyWithImpl<$Res,
- _$LightningBalance_CounterpartyRevokedOutputClaimableImpl>
- implements
- _$$LightningBalance_CounterpartyRevokedOutputClaimableImplCopyWith<
- $Res> {
- __$$LightningBalance_CounterpartyRevokedOutputClaimableImplCopyWithImpl(
- _$LightningBalance_CounterpartyRevokedOutputClaimableImpl _value,
- $Res Function(_$LightningBalance_CounterpartyRevokedOutputClaimableImpl)
- _then)
+class __$$Event_ChannelPendingImplCopyWithImpl<$Res>
+ extends _$EventCopyWithImpl<$Res, _$Event_ChannelPendingImpl>
+ implements _$$Event_ChannelPendingImplCopyWith<$Res> {
+ __$$Event_ChannelPendingImplCopyWithImpl(_$Event_ChannelPendingImpl _value,
+ $Res Function(_$Event_ChannelPendingImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? channelId = null,
+ Object? userChannelId = null,
+ Object? formerTemporaryChannelId = null,
Object? counterpartyNodeId = null,
- Object? amountSatoshis = null,
+ Object? fundingTxo = null,
}) {
- return _then(_$LightningBalance_CounterpartyRevokedOutputClaimableImpl(
+ return _then(_$Event_ChannelPendingImpl(
channelId: null == channelId
? _value.channelId
: channelId // ignore: cast_nullable_to_non_nullable
as ChannelId,
+ userChannelId: null == userChannelId
+ ? _value.userChannelId
+ : userChannelId // ignore: cast_nullable_to_non_nullable
+ as UserChannelId,
+ formerTemporaryChannelId: null == formerTemporaryChannelId
+ ? _value.formerTemporaryChannelId
+ : formerTemporaryChannelId // ignore: cast_nullable_to_non_nullable
+ as ChannelId,
counterpartyNodeId: null == counterpartyNodeId
? _value.counterpartyNodeId
: counterpartyNodeId // ignore: cast_nullable_to_non_nullable
as PublicKey,
- amountSatoshis: null == amountSatoshis
- ? _value.amountSatoshis
- : amountSatoshis // ignore: cast_nullable_to_non_nullable
- as int,
+ fundingTxo: null == fundingTxo
+ ? _value.fundingTxo
+ : fundingTxo // ignore: cast_nullable_to_non_nullable
+ as OutPoint,
));
}
}
/// @nodoc
-class _$LightningBalance_CounterpartyRevokedOutputClaimableImpl
- implements LightningBalance_CounterpartyRevokedOutputClaimable {
- const _$LightningBalance_CounterpartyRevokedOutputClaimableImpl(
+class _$Event_ChannelPendingImpl extends Event_ChannelPending {
+ const _$Event_ChannelPendingImpl(
{required this.channelId,
+ required this.userChannelId,
+ required this.formerTemporaryChannelId,
required this.counterpartyNodeId,
- required this.amountSatoshis});
+ required this.fundingTxo})
+ : super._();
- /// The identifier of the channel this balance belongs to.
+ /// The channel_id of the channel.
@override
final ChannelId channelId;
- /// The identifier of our channel counterparty.
+ /// The user_channel_id of the channel.
+ @override
+ final UserChannelId userChannelId;
+
+ /// The temporary_channel_id this channel used to be known by during channel establishment.
+ @override
+ final ChannelId formerTemporaryChannelId;
+
+ /// The node_id of the channel counterparty.
@override
final PublicKey counterpartyNodeId;
- /// The amount, in satoshis, of the output which we can claim.
+ /// The outpoint of the channel's funding transaction.
@override
- final int amountSatoshis;
+ final OutPoint fundingTxo;
@override
String toString() {
- return 'LightningBalance.counterpartyRevokedOutputClaimable(channelId: $channelId, counterpartyNodeId: $counterpartyNodeId, amountSatoshis: $amountSatoshis)';
+ return 'Event.channelPending(channelId: $channelId, userChannelId: $userChannelId, formerTemporaryChannelId: $formerTemporaryChannelId, counterpartyNodeId: $counterpartyNodeId, fundingTxo: $fundingTxo)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
- other
- is _$LightningBalance_CounterpartyRevokedOutputClaimableImpl &&
+ other is _$Event_ChannelPendingImpl &&
(identical(other.channelId, channelId) ||
other.channelId == channelId) &&
+ (identical(other.userChannelId, userChannelId) ||
+ other.userChannelId == userChannelId) &&
+ (identical(
+ other.formerTemporaryChannelId, formerTemporaryChannelId) ||
+ other.formerTemporaryChannelId == formerTemporaryChannelId) &&
(identical(other.counterpartyNodeId, counterpartyNodeId) ||
other.counterpartyNodeId == counterpartyNodeId) &&
- (identical(other.amountSatoshis, amountSatoshis) ||
- other.amountSatoshis == amountSatoshis));
+ (identical(other.fundingTxo, fundingTxo) ||
+ other.fundingTxo == fundingTxo));
}
@override
- int get hashCode =>
- Object.hash(runtimeType, channelId, counterpartyNodeId, amountSatoshis);
+ int get hashCode => Object.hash(runtimeType, channelId, userChannelId,
+ formerTemporaryChannelId, counterpartyNodeId, fundingTxo);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
- _$$LightningBalance_CounterpartyRevokedOutputClaimableImplCopyWith<
- _$LightningBalance_CounterpartyRevokedOutputClaimableImpl>
+ _$$Event_ChannelPendingImplCopyWith<_$Event_ChannelPendingImpl>
get copyWith =>
- __$$LightningBalance_CounterpartyRevokedOutputClaimableImplCopyWithImpl<
- _$LightningBalance_CounterpartyRevokedOutputClaimableImpl>(
+ __$$Event_ChannelPendingImplCopyWithImpl<_$Event_ChannelPendingImpl>(
this, _$identity);
@override
@optionalTypeArgs
TResult when({
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)
- claimableOnChannelClose,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int confirmationHeight)
- claimableAwaitingConfirmations,
+ required TResult Function(PaymentHash paymentHash) paymentSuccessful,
+ required TResult Function(PaymentHash paymentHash) paymentFailed,
+ required TResult Function(PaymentHash paymentHash, int amountMsat)
+ paymentReceived,
+ required TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)
+ channelReady,
+ required TResult Function(ChannelId channelId, UserChannelId userChannelId,
+ PublicKey? counterpartyNodeId)
+ channelClosed,
required TResult Function(
ChannelId channelId,
+ UserChannelId userChannelId,
+ ChannelId formerTemporaryChannelId,
PublicKey counterpartyNodeId,
- int amountSatoshis,
- int timeoutHeight,
- PaymentHash paymentHash,
- PaymentPreimage paymentPreimage)
- contentiousClaimable,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int claimableHeight, PaymentHash paymentHash)
- maybeTimeoutClaimableHtlc,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis, int expiryHeight, PaymentHash paymentHash)
- maybePreimageClaimableHtlc,
- required TResult Function(ChannelId channelId, PublicKey counterpartyNodeId,
- int amountSatoshis)
- counterpartyRevokedOutputClaimable,
+ OutPoint fundingTxo)
+ channelPending,
}) {
- return counterpartyRevokedOutputClaimable(
- channelId, counterpartyNodeId, amountSatoshis);
+ return channelPending(channelId, userChannelId, formerTemporaryChannelId,
+ counterpartyNodeId, fundingTxo);
}
@override
@optionalTypeArgs
TResult? whenOrNull