Skip to content

Commit e761708

Browse files
committed
Fixing setMnemonic method
1 parent a2eb6d0 commit e761708

File tree

26 files changed

+1256
-1575
lines changed

26 files changed

+1256
-1575
lines changed

CHANGELOG.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
## [0.1.1]
2+
3+
### Fixed
4+
5+
- setEntropyBip39Mnemonic now correctly sets the entropy to the specified BIP 39 mnemonic.
6+
17
## [0.1.0]
28

3-
This is the first release of `ldk_node`. It features support for sourcing chain data via an `Esplora` server, filesystem persistence, gossip sourcing via the `Lightning` peer-to-peer network, and configurable entropy sources for the integrated LDK & BDK-based wallets.
9+
This is the first release of `ldk_node`. It features support for sourcing chain data via an `Esplora` server, filesystem persistence, gossip sourcing via the `Lightning` peer-to-peer network, and configurble entropy sources for the integrated LDK & BDK-based wallets.
410

511
### Functionality Added
612

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ To use the `ldk_node` package in your project, add it as a dependency in your pr
1515

1616
```dart
1717
dependencies:
18-
ldk_node: ^0.1.0
18+
ldk_node: ^0.1.1
1919
```
2020
or add from pub.dev using `pub add` command
2121

example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
PODS:
22
- Flutter (1.0.0)
3-
- ldk_node (0.0.1):
3+
- ldk_node (0.1.0):
44
- Flutter
55
- path_provider_foundation (0.0.1):
66
- Flutter
@@ -21,7 +21,7 @@ EXTERNAL SOURCES:
2121

2222
SPEC CHECKSUMS:
2323
Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854
24-
ldk_node: 92b971316adccb8455bf39224c740f1cad90d2c9
24+
ldk_node: 39dd0a338102b26f1c7700374f95a1cec2a5c259
2525
path_provider_foundation: c68054786f1b4f3343858c1e1d0caaded73f0be9
2626

2727
PODFILE CHECKSUM: ef19549a9bc3046e7bb7d2fab4d021637c0c58a3

example/ios/Runner.xcodeproj/project.pbxproj

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@
368368
"$(inherited)",
369369
"@executable_path/Frameworks",
370370
);
371-
PRODUCT_BUNDLE_IDENTIFIER = io.ldk.f.ldkMobileExample;
371+
PRODUCT_BUNDLE_IDENTIFIER = io.ldk.f.ldkNodeExample;
372372
PRODUCT_NAME = "$(TARGET_NAME)";
373373
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
374374
SWIFT_VERSION = 5.0;
@@ -497,7 +497,7 @@
497497
"$(inherited)",
498498
"@executable_path/Frameworks",
499499
);
500-
PRODUCT_BUNDLE_IDENTIFIER = io.ldk.f.ldkMobileExample;
500+
PRODUCT_BUNDLE_IDENTIFIER = io.ldk.f.ldkNodeExample;
501501
PRODUCT_NAME = "$(TARGET_NAME)";
502502
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
503503
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -520,7 +520,7 @@
520520
"$(inherited)",
521521
"@executable_path/Frameworks",
522522
);
523-
PRODUCT_BUNDLE_IDENTIFIER = io.ldk.f.ldkMobileExample;
523+
PRODUCT_BUNDLE_IDENTIFIER = io.ldk.f.ldkNodeExample;
524524
PRODUCT_NAME = "$(TARGET_NAME)";
525525
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
526526
SWIFT_VERSION = 5.0;
@@ -597,7 +597,7 @@
597597
"$(inherited)",
598598
"@executable_path/Frameworks",
599599
);
600-
PRODUCT_BUNDLE_IDENTIFIER = io.ldk.f.ldkMobileExample;
600+
PRODUCT_BUNDLE_IDENTIFIER = io.ldk.f.ldkNodeExample;
601601
PRODUCT_NAME = "$(TARGET_NAME)";
602602
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
603603
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
@@ -672,7 +672,7 @@
672672
"$(inherited)",
673673
"@executable_path/Frameworks",
674674
);
675-
PRODUCT_BUNDLE_IDENTIFIER = io.ldk.f.ldkMobileExample;
675+
PRODUCT_BUNDLE_IDENTIFIER = io.ldk.f.ldkNodeExample;
676676
PRODUCT_NAME = "$(TARGET_NAME)";
677677
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
678678
SWIFT_VERSION = 5.0;

example/ios/Runner/Info.plist

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
33
<plist version="1.0">
44
<dict>
5+
<key>CADisableMinimumFrameDurationOnPhone</key>
6+
<true/>
57
<key>CFBundleDevelopmentRegion</key>
68
<string>$(DEVELOPMENT_LANGUAGE)</string>
79
<key>CFBundleDisplayName</key>
@@ -24,6 +26,8 @@
2426
<string>$(FLUTTER_BUILD_NUMBER)</string>
2527
<key>LSRequiresIPhoneOS</key>
2628
<true/>
29+
<key>UIApplicationSupportsIndirectInputEvents</key>
30+
<true/>
2731
<key>UILaunchStoryboardName</key>
2832
<string>LaunchScreen</string>
2933
<key>UIMainStoryboardFile</key>
@@ -43,9 +47,5 @@
4347
</array>
4448
<key>UIViewControllerBasedStatusBarAppearance</key>
4549
<false/>
46-
<key>CADisableMinimumFrameDurationOnPhone</key>
47-
<true/>
48-
<key>UIApplicationSupportsIndirectInputEvents</key>
49-
<true/>
5050
</dict>
5151
</plist>

example/lib/main.dart

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import 'package:flutter/foundation.dart';
44
import 'package:flutter/material.dart';
55
import 'package:google_fonts/google_fonts.dart';
66
import 'package:ldk_node/ldk_node.dart' as ldk;
7-
// import 'package:path_provider/path_provider.dart';
7+
import 'package:path_provider/path_provider.dart';
88

99
void main() {
1010
runApp(const MyApp());
@@ -37,8 +37,8 @@ class _MyAppState extends State<MyApp> {
3737
Future<ldk.Config> initLdkConfig(String path, ldk.SocketAddr address) async {
3838
// Please replace this url with your Electrum RPC Api url
3939
// Please use 10.0.2.2, instead of 0.0.0.0
40-
//final directory = await getApplicationDocumentsDirectory();
41-
final nodePath = "{directory.path}/ldk_cache/$path";
40+
final directory = await getApplicationDocumentsDirectory();
41+
final nodePath = "${directory.path}/ldk_cache/$path";
4242
final esploraUrl =
4343
Platform.isAndroid ? "http://10.0.2.2:3002" : "http://0.0.0.0:3002";
4444
final config = ldk.Config(
@@ -58,8 +58,12 @@ class _MyAppState extends State<MyApp> {
5858
initAliceNode() async {
5959
final aliceConfig = await initLdkConfig(
6060
'alice', const ldk.SocketAddr(ip: "0.0.0.0", port: 3006));
61-
ldk.Builder aliceBuilder = ldk.Builder.fromConfig(config: aliceConfig);
61+
ldk.Builder aliceBuilder = ldk.Builder.fromConfig(config: aliceConfig)
62+
.setEntropyBip39Mnemonic(
63+
mnemonic:
64+
'puppy interest whip tonight dad never sudden response push zone pig patch');
6265
aliceNode = await aliceBuilder.build();
66+
6367
await aliceNode.start();
6468
final res = await aliceNode.nodeId();
6569
setState(() {
@@ -72,6 +76,7 @@ class _MyAppState extends State<MyApp> {
7276
final bobConfig = await initLdkConfig(
7377
"bob", const ldk.SocketAddr(ip: "0.0.0.0", port: 8077));
7478
ldk.Builder bobBuilder = ldk.Builder.fromConfig(config: bobConfig);
79+
7580
bobNode = await bobBuilder.build();
7681
await bobNode.start();
7782
final res = await bobNode.nodeId();

example/pubspec.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ packages:
265265
path: ".."
266266
relative: true
267267
source: path
268-
version: "0.1.0"
268+
version: "0.1.1"
269269
lints:
270270
dependency: transitive
271271
description:
@@ -331,7 +331,7 @@ packages:
331331
source: hosted
332332
version: "1.8.2"
333333
path_provider:
334-
dependency: transitive
334+
dependency: "direct main"
335335
description:
336336
name: path_provider
337337
sha256: c7edf82217d4b2952b2129a61d3ad60f1075b9299e629e149a8d2e39c2e6aad4

0 commit comments

Comments
 (0)