-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
26 changed files
with
11,506 additions
and
1,679 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
bindings/LDK/results/Result_DelayedPaymentOutputDescriptorDecodeErrorZ.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
public class Result_DelayedPaymentOutputDescriptorDecodeErrorZ { | ||
|
||
public internal(set) var cOpaqueStruct: LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ?; | ||
|
||
/* DEFAULT_CONSTRUCTOR_START */ | ||
|
||
public init() { | ||
self.cOpaqueStruct = LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ(contents: LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZPtr(), result_ok: true) | ||
} | ||
|
||
/* DEFAULT_CONSTRUCTOR_END */ | ||
|
||
public init(pointer: LDKCResult_DelayedPaymentOutputDescriptorDecodeErrorZ){ | ||
self.cOpaqueStruct = pointer | ||
} | ||
|
||
public func isOk() -> Bool { | ||
return self.cOpaqueStruct?.result_ok == true | ||
} | ||
|
||
/* RESULT_METHODS_START */ | ||
|
||
public func getError() -> DecodeError? { | ||
if self.cOpaqueStruct?.result_ok == false { | ||
return DecodeError(pointer: self.cOpaqueStruct!.contents.err.pointee) | ||
} | ||
return nil | ||
} | ||
|
||
public func getValue() -> DelayedPaymentOutputDescriptor? { | ||
if self.cOpaqueStruct?.result_ok == true { | ||
return DelayedPaymentOutputDescriptor(pointer: self.cOpaqueStruct!.contents.result.pointee) | ||
} | ||
return nil | ||
} | ||
|
||
/* RESULT_METHODS_END */ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
public class Result_NetAddressDecodeErrorZ { | ||
|
||
public internal(set) var cOpaqueStruct: LDKCResult_NetAddressDecodeErrorZ?; | ||
|
||
/* DEFAULT_CONSTRUCTOR_START */ | ||
|
||
public init() { | ||
self.cOpaqueStruct = LDKCResult_NetAddressDecodeErrorZ(contents: LDKCResult_NetAddressDecodeErrorZPtr(), result_ok: true) | ||
} | ||
|
||
/* DEFAULT_CONSTRUCTOR_END */ | ||
|
||
public init(pointer: LDKCResult_NetAddressDecodeErrorZ){ | ||
self.cOpaqueStruct = pointer | ||
} | ||
|
||
public func isOk() -> Bool { | ||
return self.cOpaqueStruct?.result_ok == true | ||
} | ||
|
||
/* RESULT_METHODS_START */ | ||
|
||
public func getError() -> DecodeError? { | ||
if self.cOpaqueStruct?.result_ok == false { | ||
return DecodeError(pointer: self.cOpaqueStruct!.contents.err.pointee) | ||
} | ||
return nil | ||
} | ||
|
||
public func getValue() -> NetAddress? { | ||
if self.cOpaqueStruct?.result_ok == true { | ||
return NetAddress(pointer: self.cOpaqueStruct!.contents.result.pointee) | ||
} | ||
return nil | ||
} | ||
|
||
/* RESULT_METHODS_END */ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
public class Result_RouteHopDecodeErrorZ { | ||
|
||
public internal(set) var cOpaqueStruct: LDKCResult_RouteHopDecodeErrorZ?; | ||
|
||
/* DEFAULT_CONSTRUCTOR_START */ | ||
|
||
public init() { | ||
self.cOpaqueStruct = LDKCResult_RouteHopDecodeErrorZ(contents: LDKCResult_RouteHopDecodeErrorZPtr(), result_ok: true) | ||
} | ||
|
||
/* DEFAULT_CONSTRUCTOR_END */ | ||
|
||
public init(pointer: LDKCResult_RouteHopDecodeErrorZ){ | ||
self.cOpaqueStruct = pointer | ||
} | ||
|
||
public func isOk() -> Bool { | ||
return self.cOpaqueStruct?.result_ok == true | ||
} | ||
|
||
/* RESULT_METHODS_START */ | ||
|
||
public func getError() -> DecodeError? { | ||
if self.cOpaqueStruct?.result_ok == false { | ||
return DecodeError(pointer: self.cOpaqueStruct!.contents.err.pointee) | ||
} | ||
return nil | ||
} | ||
|
||
public func getValue() -> RouteHop? { | ||
if self.cOpaqueStruct?.result_ok == true { | ||
return RouteHop(pointer: self.cOpaqueStruct!.contents.result.pointee) | ||
} | ||
return nil | ||
} | ||
|
||
/* RESULT_METHODS_END */ | ||
|
||
} |
39 changes: 39 additions & 0 deletions
39
bindings/LDK/results/Result_StaticPaymentOutputDescriptorDecodeErrorZ.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
public class Result_StaticPaymentOutputDescriptorDecodeErrorZ { | ||
|
||
public internal(set) var cOpaqueStruct: LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ?; | ||
|
||
/* DEFAULT_CONSTRUCTOR_START */ | ||
|
||
public init() { | ||
self.cOpaqueStruct = LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ(contents: LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZPtr(), result_ok: true) | ||
} | ||
|
||
/* DEFAULT_CONSTRUCTOR_END */ | ||
|
||
public init(pointer: LDKCResult_StaticPaymentOutputDescriptorDecodeErrorZ){ | ||
self.cOpaqueStruct = pointer | ||
} | ||
|
||
public func isOk() -> Bool { | ||
return self.cOpaqueStruct?.result_ok == true | ||
} | ||
|
||
/* RESULT_METHODS_START */ | ||
|
||
public func getError() -> DecodeError? { | ||
if self.cOpaqueStruct?.result_ok == false { | ||
return DecodeError(pointer: self.cOpaqueStruct!.contents.err.pointee) | ||
} | ||
return nil | ||
} | ||
|
||
public func getValue() -> StaticPaymentOutputDescriptor? { | ||
if self.cOpaqueStruct?.result_ok == true { | ||
return StaticPaymentOutputDescriptor(pointer: self.cOpaqueStruct!.contents.result.pointee) | ||
} | ||
return nil | ||
} | ||
|
||
/* RESULT_METHODS_END */ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
public class BackgroundProcessor { | ||
|
||
public internal(set) var cOpaqueStruct: LDKBackgroundProcessor?; | ||
|
||
/* DEFAULT_CONSTRUCTOR_START */ | ||
public init(persister: ChannelManagerPersister, event_handler: EventHandler, chain_monitor: ChainMonitor, channel_manager: ChannelManager, peer_manager: PeerManager, logger: Logger) { | ||
|
||
self.cOpaqueStruct = withUnsafePointer(to: chain_monitor.cOpaqueStruct!) { (chain_monitorPointer: UnsafePointer<LDKChainMonitor>) in | ||
withUnsafePointer(to: channel_manager.cOpaqueStruct!) { (channel_managerPointer: UnsafePointer<LDKChannelManager>) in | ||
withUnsafePointer(to: peer_manager.cOpaqueStruct!) { (peer_managerPointer: UnsafePointer<LDKPeerManager>) in | ||
BackgroundProcessor_start(persister.cOpaqueStruct!, event_handler.cOpaqueStruct!, chain_monitorPointer, channel_managerPointer, peer_managerPointer, logger.cOpaqueStruct!) | ||
} | ||
} | ||
} | ||
} | ||
/* DEFAULT_CONSTRUCTOR_END */ | ||
|
||
public init(pointer: LDKBackgroundProcessor){ | ||
self.cOpaqueStruct = pointer | ||
} | ||
|
||
/* STRUCT_METHODS_START */ | ||
|
||
public func stop() -> Result_NoneErrorZ { | ||
|
||
return Result_NoneErrorZ(pointer: BackgroundProcessor_stop(self.cOpaqueStruct!)); | ||
} | ||
|
||
|
||
deinit { | ||
if self.cOpaqueStruct?.is_owned == false { | ||
|
||
|
||
|
||
BackgroundProcessor_free(self.cOpaqueStruct!) | ||
|
||
} | ||
|
||
} | ||
|
||
/* STRUCT_METHODS_END */ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
public class PrivateRoute { | ||
|
||
public internal(set) var cOpaqueStruct: LDKPrivateRoute?; | ||
|
||
|
||
|
||
public init(pointer: LDKPrivateRoute){ | ||
self.cOpaqueStruct = pointer | ||
} | ||
|
||
/* STRUCT_METHODS_START */ | ||
|
||
public func eq(a: PrivateRoute, b: PrivateRoute) -> Bool { | ||
|
||
return withUnsafePointer(to: a.cOpaqueStruct!) { (aPointer: UnsafePointer<LDKPrivateRoute>) in | ||
withUnsafePointer(to: b.cOpaqueStruct!) { (bPointer: UnsafePointer<LDKPrivateRoute>) in | ||
PrivateRoute_eq(aPointer, bPointer) | ||
} | ||
}; | ||
} | ||
|
||
public func clone(orig: PrivateRoute) -> PrivateRoute { | ||
|
||
return withUnsafePointer(to: orig.cOpaqueStruct!) { (origPointer: UnsafePointer<LDKPrivateRoute>) in | ||
PrivateRoute(pointer: PrivateRoute_clone(origPointer)) | ||
}; | ||
} | ||
|
||
public func new(hops: RouteHint) -> Result_PrivateRouteCreationErrorZ { | ||
|
||
return Result_PrivateRouteCreationErrorZ(pointer: PrivateRoute_new(hops.cOpaqueStruct!)); | ||
} | ||
|
||
public func into_inner() -> RouteHint { | ||
|
||
return RouteHint(pointer: PrivateRoute_into_inner(self.cOpaqueStruct!)); | ||
} | ||
|
||
|
||
deinit { | ||
if self.cOpaqueStruct?.is_owned == false { | ||
|
||
|
||
|
||
PrivateRoute_free(self.cOpaqueStruct!) | ||
|
||
} | ||
|
||
} | ||
|
||
/* STRUCT_METHODS_END */ | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.