Skip to content

Commit

Permalink
code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
BitcoinZavior committed Mar 1, 2024
1 parent 88dc57a commit cc43e59
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions ios/ldk_node.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -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
24 changes: 12 additions & 12 deletions lib/src/generated/bindings.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<WasmModule> module) =>
LdknodeImpl(module as ExternalLibrary);
LdknodeImpl.raw(this._platform);
factory LdkNodeImpl.wasm(FutureOr<WasmModule> module) =>
LdkNodeImpl(module as ExternalLibrary);
LdkNodeImpl.raw(this._platform);
Future<NodePointer> finalizeBuilder(
{required Config config,
ChainDataSourceConfig? chainDataSourceConfig,
Expand Down Expand Up @@ -1383,8 +1383,8 @@ int api2wire_u8(int raw) {

// Section: finalizer

class LdknodePlatform extends FlutterRustBridgeBase<LdknodeWire> {
LdknodePlatform(ffi.DynamicLibrary dylib) : super(LdknodeWire(dylib));
class LdkNodePlatform extends FlutterRustBridgeBase<LdkNodeWire> {
LdkNodePlatform(ffi.DynamicLibrary dylib) : super(LdkNodeWire(dylib));

// Section: api2wire

Expand Down Expand Up @@ -1896,7 +1896,7 @@ class LdknodePlatform extends FlutterRustBridgeBase<LdknodeWire> {
// 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);

Expand All @@ -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<T> Function<T extends ffi.NativeType>(String symbolName)
lookup)
: _lookup = lookup;
Expand Down
10 changes: 5 additions & 5 deletions lib/src/generated/bridge_definitions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import 'package:collection/collection.dart';

part 'bridge_definitions.freezed.dart';

abstract class Ldknode {
abstract class LdkNode {
Future<NodePointer> finalizeBuilder(
{required Config config,
ChainDataSourceConfig? chainDataSourceConfig,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -819,15 +819,15 @@ 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({
required this.bridge,
required this.seedPhrase,
});

static Future<Mnemonic> generate({required Ldknode bridge, dynamic hint}) =>
static Future<Mnemonic> generate({required LdkNode bridge, dynamic hint}) =>
bridge.generateStaticMethodMnemonic(hint: hint);
}

Expand Down Expand Up @@ -942,7 +942,7 @@ enum NodeException {
}

class NodePointer {
final Ldknode bridge;
final LdkNode bridge;
final MutexNodeSqliteStore field0;

const NodePointer({
Expand Down
4 changes: 2 additions & 2 deletions lib/src/utils/loader.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);

0 comments on commit cc43e59

Please sign in to comment.