From 5d412537c3afdffcae8d97178b69ceb17e7d3740 Mon Sep 17 00:00:00 2001 From: StaxoLotl Date: Mon, 8 Jul 2024 12:53:00 -0400 Subject: [PATCH] Update changelog --- .../integration_test/bolt11_and_12_test.dart | 75 ------------------- example/ios/Podfile.lock | 2 +- example/lib/main.dart | 2 +- example/pubspec.lock | 2 +- rust/cargokit.yaml | 5 +- 5 files changed, 4 insertions(+), 82 deletions(-) delete mode 100644 example/integration_test/bolt11_and_12_test.dart diff --git a/example/integration_test/bolt11_and_12_test.dart b/example/integration_test/bolt11_and_12_test.dart deleted file mode 100644 index 463bae8..0000000 --- a/example/integration_test/bolt11_and_12_test.dart +++ /dev/null @@ -1,75 +0,0 @@ -import 'package:flutter/cupertino.dart'; -import 'package:flutter_test/flutter_test.dart'; -import 'package:integration_test/integration_test.dart'; -import 'package:ldk_node/ldk_node.dart' as ldk; -import 'package:path_provider/path_provider.dart'; - -void main() { - BigInt satsToMsats(int sats) => BigInt.from(sats * 1000); - String mSatsToSats(BigInt mSats) => '${mSats.toInt() ~/ 1000}sats'; - IntegrationTestWidgetsFlutterBinding.ensureInitialized(); - - group('bolt11_&_bolt12', () { - setUp(() async {}); - testWidgets('bolt11_full_cycle', (WidgetTester tester) async { - final directory = await getApplicationDocumentsDirectory(); - final ldkCache = "${directory.path}/ldk_cache"; - final aliceStoragePath = "$ldkCache/integration/alice"; - debugPrint('Alice Storage Path: $aliceStoragePath'); - final alice_builder = ldk.Builder.mutinynet() - .setEntropyBip39Mnemonic( - mnemonic: ldk.Mnemonic( - seedPhrase: - "replace force spring cruise nothing select glass erupt medal raise consider pull")) - .setStorageDirPath(aliceStoragePath); - final aliceNode = await alice_builder.build(); - await aliceNode.start(); - final bobStoragePath = "$ldkCache/integration/bob"; - final bob_builder = ldk.Builder.mutinynet() - .setEntropyBip39Mnemonic( - mnemonic: ldk.Mnemonic( - seedPhrase: - "skin hospital fee risk health theory actor kiwi solution desert unhappy hello")) - .setStorageDirPath(bobStoragePath); - debugPrint('Bob Storage Path: $bobStoragePath'); - final bobNode = await bob_builder.build(); - await bobNode.start(); - debugPrint("Manually syncing Alice's node"); - await aliceNode.syncWallets(); - debugPrint("Manually syncing Bob's node"); - final aliceBalance = - (await aliceNode.listBalances()).spendableOnchainBalanceSats; - await bobNode.syncWallets(); - expect(aliceBalance, 0); - debugPrint("Alice's onChain balance ${aliceBalance.toString()}"); - final bobBalance = - (await bobNode.listBalances()).spendableOnchainBalanceSats; - debugPrint("Bob's onChain balance ${bobBalance.toString()}"); - - final bobBolt11PaymentHandler = await bobNode.bolt11Payment(); - final bobJitInvoice = await bobBolt11PaymentHandler.receiveViaJitChannel( - amountMsat: satsToMsats(10000), - description: 'test', - expirySecs: 9000, - ); - debugPrint("Bob's onChain balance ${bobBalance.toString()}"); - final aliceBolt11PaymentHandler = await aliceNode.bolt11Payment(); - final aliceJitInvoice = - await aliceBolt11PaymentHandler.receiveViaJitChannel( - amountMsat: satsToMsats(10000), - description: 'test', - expirySecs: 9000, - ); - final aliceLBalance = - (await aliceNode.listBalances()).totalLightningBalanceSats; - debugPrint("Alice's Lightning balance ${aliceLBalance.toString()}"); - final bobInvoice = await bobBolt11PaymentHandler.receive( - amountMsat: satsToMsats(10000), - description: 'test', - expirySecs: 9000); - final paymentId = - await aliceBolt11PaymentHandler.send(invoice: bobInvoice); - debugPrint("Alice's payment id ${paymentId.field0}"); - }); - }); -} diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 31e197f..f5e3f3f 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -32,4 +32,4 @@ SPEC CHECKSUMS: PODFILE CHECKSUM: 4e8f8b2be68aeea4c0d5beb6ff1e79fface1d048 -COCOAPODS: 1.14.3 \ No newline at end of file +COCOAPODS: 1.14.3 diff --git a/example/lib/main.dart b/example/lib/main.dart index 595a4e3..18b2b6d 100644 --- a/example/lib/main.dart +++ b/example/lib/main.dart @@ -547,4 +547,4 @@ class _MyAppState extends State { ), )); } -} \ No newline at end of file +} diff --git a/example/pubspec.lock b/example/pubspec.lock index c5441fb..61d8efa 100644 --- a/example/pubspec.lock +++ b/example/pubspec.lock @@ -480,4 +480,4 @@ packages: version: "1.0.4" sdks: dart: ">=3.4.0 <4.0.0" - flutter: ">=3.22.0" \ No newline at end of file + flutter: ">=3.22.0" diff --git a/rust/cargokit.yaml b/rust/cargokit.yaml index fc12e2c..c57f2dd 100644 --- a/rust/cargokit.yaml +++ b/rust/cargokit.yaml @@ -1,9 +1,6 @@ cargo: release: - toolchain: nightly - extra_flags: - - -Z - - build-std=panic_abort,std + toolchain: stable precompiled_binaries: url_prefix: https://github.com/LtbLightning/ldk-node-flutter/releases/download/precompiled_