diff --git a/ios/ldk_node.podspec b/ios/ldk_node.podspec index 20edbea..6685325 100644 --- a/ios/ldk_node.podspec +++ b/ios/ldk_node.podspec @@ -13,6 +13,6 @@ Pod::Spec.new do |s| s.swift_version = '5.0' s.public_header_files = 'Classes**/*.h' s.source_files = 'Classes/**/*' - s.static_framework = true - s.vendored_libraries = "libldknode.a" + s.preserve_paths = 'ldk_node.xcframework/**/*' + s.vendored_frameworks = 'ldk_node.xcframework' end diff --git a/lib/src/generated/bindings.dart b/lib/src/generated/bindings.dart index cd77bbd..c39b1c5 100644 --- a/lib/src/generated/bindings.dart +++ b/lib/src/generated/bindings.dart @@ -17,15 +17,15 @@ import 'package:uuid/uuid.dart'; import 'dart:ffi' as ffi; -class LdknodeImpl implements Ldknode { - final LdknodePlatform _platform; - factory LdknodeImpl(ExternalLibrary dylib) => - LdknodeImpl.raw(LdknodePlatform(dylib)); +class LdkNodeImpl implements LdkNode { + final LdkNodePlatform _platform; + factory LdkNodeImpl(ExternalLibrary dylib) => + LdkNodeImpl.raw(LdkNodePlatform(dylib)); /// Only valid on web/WASM platforms. - factory LdknodeImpl.wasm(FutureOr module) => - LdknodeImpl(module as ExternalLibrary); - LdknodeImpl.raw(this._platform); + factory LdkNodeImpl.wasm(FutureOr module) => + LdkNodeImpl(module as ExternalLibrary); + LdkNodeImpl.raw(this._platform); Future finalizeBuilder( {required Config config, ChainDataSourceConfig? chainDataSourceConfig, @@ -1383,8 +1383,8 @@ int api2wire_u8(int raw) { // Section: finalizer -class LdknodePlatform extends FlutterRustBridgeBase { - LdknodePlatform(ffi.DynamicLibrary dylib) : super(LdknodeWire(dylib)); +class LdkNodePlatform extends FlutterRustBridgeBase { + LdkNodePlatform(ffi.DynamicLibrary dylib) : super(LdkNodeWire(dylib)); // Section: api2wire @@ -1896,7 +1896,7 @@ class LdknodePlatform extends FlutterRustBridgeBase { // ignore_for_file: type=lint /// generated by flutter_rust_bridge -class LdknodeWire implements FlutterRustBridgeWireBase { +class LdkNodeWire implements FlutterRustBridgeWireBase { @internal late final dartApi = DartApiDl(init_frb_dart_api_dl); @@ -1905,11 +1905,11 @@ class LdknodeWire implements FlutterRustBridgeWireBase { _lookup; /// The symbols are looked up in [dynamicLibrary]. - LdknodeWire(ffi.DynamicLibrary dynamicLibrary) + LdkNodeWire(ffi.DynamicLibrary dynamicLibrary) : _lookup = dynamicLibrary.lookup; /// The symbols are looked up with [lookup]. - LdknodeWire.fromLookup( + LdkNodeWire.fromLookup( ffi.Pointer Function(String symbolName) lookup) : _lookup = lookup; diff --git a/lib/src/generated/bridge_definitions.dart b/lib/src/generated/bridge_definitions.dart index af3d4c6..5733e7d 100644 --- a/lib/src/generated/bridge_definitions.dart +++ b/lib/src/generated/bridge_definitions.dart @@ -12,7 +12,7 @@ import 'package:collection/collection.dart'; part 'bridge_definitions.freezed.dart'; -abstract class Ldknode { +abstract class LdkNode { Future finalizeBuilder( {required Config config, ChainDataSourceConfig? chainDataSourceConfig, @@ -360,7 +360,7 @@ abstract class Ldknode { @sealed class MutexNodeSqliteStore extends FrbOpaque { - final Ldknode bridge; + final LdkNode bridge; MutexNodeSqliteStore.fromRaw(int ptr, int size, this.bridge) : super.unsafe(ptr, size); @override @@ -819,7 +819,7 @@ sealed class MaxDustHTLCExposure with _$MaxDustHTLCExposure { /// Supported number of words are 12, 15, 18, 21, and 24. /// class Mnemonic { - final Ldknode bridge; + final LdkNode bridge; final String seedPhrase; const Mnemonic({ @@ -827,7 +827,7 @@ class Mnemonic { required this.seedPhrase, }); - static Future generate({required Ldknode bridge, dynamic hint}) => + static Future generate({required LdkNode bridge, dynamic hint}) => bridge.generateStaticMethodMnemonic(hint: hint); } @@ -942,7 +942,7 @@ enum NodeException { } class NodePointer { - final Ldknode bridge; + final LdkNode bridge; final MutexNodeSqliteStore field0; const NodePointer({ diff --git a/lib/src/utils/loader.dart b/lib/src/utils/loader.dart index 1b5fab8..6a431ff 100644 --- a/lib/src/utils/loader.dart +++ b/lib/src/utils/loader.dart @@ -7,5 +7,5 @@ final DynamicLibrary dylib = Platform.isIOS ? DynamicLibrary.process() : Platform.isMacOS ? DynamicLibrary.executable() - : DynamicLibrary.open('libldknode.so'); -LdknodeImpl loaderApi = LdknodeImpl(dylib); + : DynamicLibrary.open('libldk_node.so'); +LdkNodeImpl loaderApi = LdkNodeImpl(dylib);