Skip to content

Commit

Permalink
This commit was created automatically by the lipa bot
Browse files Browse the repository at this point in the history
  • Loading branch information
lipa-github-bot committed Nov 25, 2024
1 parent 6a26d12 commit 6d7b262
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ let package = Package(
targets: [
.binaryTarget(
name: "lipalightninglibFFI",
url: "https://github.com/getlipa/lipa-lightning-lib-swift/releases/download/v0.70.0.beta.debug.1-mock/lipalightninglibFFI.xcframework.zip",
checksum: "545131c504790dd1bb30373e47ca16d0c591bf87fbda143b7bf9d0fd5fb284df"),
url: "https://github.com/getlipa/lipa-lightning-lib-swift/releases/download/v0.72.0-beta/lipalightninglibFFI.xcframework.zip",
checksum: "81a1611d466123679b2ae0cd376cc3836683904697559493f5b3d55a500f4f56"),
.target(
name: "LipaLightningLib",
dependencies: ["lipalightninglibFFI"]),
Expand Down
37 changes: 25 additions & 12 deletions Sources/LipaLightningLib/LipaLightningLib.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1110,7 +1110,7 @@ public protocol ChannelCloseProtocol : AnyObject {

func determineResolvingFees() throws -> OnchainResolvingFees?

func prepareSweep(address: String) throws -> SweepChannelCloseInfo
func prepareSweep(destination: BitcoinAddressData) throws -> SweepChannelCloseInfo

func swap(satsPerVbyte: UInt32, lspFeeParams: OpeningFeeParams?) throws -> String

Expand Down Expand Up @@ -1175,10 +1175,10 @@ open func determineResolvingFees()throws -> OnchainResolvingFees? {
})
}

open func prepareSweep(address: String)throws -> SweepChannelCloseInfo {
open func prepareSweep(destination: BitcoinAddressData)throws -> SweepChannelCloseInfo {
return try FfiConverterTypeSweepChannelCloseInfo.lift(try rustCallWithError(FfiConverterTypeSweepError.lift) {
uniffi_uniffi_lipalightninglib_fn_method_channelclose_prepare_sweep(self.uniffiClonePointer(),
FfiConverterString.lower(address),$0
FfiConverterTypeBitcoinAddressData.lower(destination),$0
)
})
}
Expand Down Expand Up @@ -3197,7 +3197,7 @@ public func FfiConverterTypePhoneNumber_lower(_ value: PhoneNumber) -> UnsafeMut

public protocol ReverseSwapProtocol : AnyObject {

func clearWallet(clearWalletInfo: ClearWalletInfo, destinationOnchainAddressData: BitcoinAddressData) throws
func clearWallet(clearWalletInfo: ClearWalletInfo, destination: BitcoinAddressData) throws

func determineClearWalletFeasibility() throws -> RangeHit

Expand Down Expand Up @@ -3255,10 +3255,10 @@ open class ReverseSwap:



open func clearWallet(clearWalletInfo: ClearWalletInfo, destinationOnchainAddressData: BitcoinAddressData)throws {try rustCallWithError(FfiConverterTypeLnError.lift) {
open func clearWallet(clearWalletInfo: ClearWalletInfo, destination: BitcoinAddressData)throws {try rustCallWithError(FfiConverterTypeLnError.lift) {
uniffi_uniffi_lipalightninglib_fn_method_reverseswap_clear_wallet(self.uniffiClonePointer(),
FfiConverterTypeClearWalletInfo.lower(clearWalletInfo),
FfiConverterTypeBitcoinAddressData.lower(destinationOnchainAddressData),$0
FfiConverterTypeBitcoinAddressData.lower(destination),$0
)
}
}
Expand Down Expand Up @@ -3336,11 +3336,13 @@ public func FfiConverterTypeReverseSwap_lower(_ value: ReverseSwap) -> UnsafeMut

public protocol SwapProtocol : AnyObject {

func calculateLspFeeForAmount(amountSat: UInt64) throws -> CalculateLspFeeResponse

func create(lspFeeParams: OpeningFeeParams?) throws -> SwapAddressInfo

func determineResolvingFees(failedSwapInfo: FailedSwapInfo) throws -> OnchainResolvingFees?

func prepareSweep(failedSwapInfo: FailedSwapInfo, toAddress: String) throws -> SweepFailedSwapInfo
func prepareSweep(failedSwapInfo: FailedSwapInfo, destination: BitcoinAddressData) throws -> SweepFailedSwapInfo

func swap(failedSwapInfo: FailedSwapInfo, satsPerVbyte: UInt32, lspFeeParam: OpeningFeeParams?) throws -> String

Expand Down Expand Up @@ -3398,6 +3400,14 @@ open class Swap:



open func calculateLspFeeForAmount(amountSat: UInt64)throws -> CalculateLspFeeResponse {
return try FfiConverterTypeCalculateLspFeeResponse.lift(try rustCallWithError(FfiConverterTypeLnError.lift) {
uniffi_uniffi_lipalightninglib_fn_method_swap_calculate_lsp_fee_for_amount(self.uniffiClonePointer(),
FfiConverterUInt64.lower(amountSat),$0
)
})
}

open func create(lspFeeParams: OpeningFeeParams?)throws -> SwapAddressInfo {
return try FfiConverterTypeSwapAddressInfo.lift(try rustCallWithError(FfiConverterTypeSwapError.lift) {
uniffi_uniffi_lipalightninglib_fn_method_swap_create(self.uniffiClonePointer(),
Expand All @@ -3414,11 +3424,11 @@ open func determineResolvingFees(failedSwapInfo: FailedSwapInfo)throws -> Oncha
})
}

open func prepareSweep(failedSwapInfo: FailedSwapInfo, toAddress: String)throws -> SweepFailedSwapInfo {
open func prepareSweep(failedSwapInfo: FailedSwapInfo, destination: BitcoinAddressData)throws -> SweepFailedSwapInfo {
return try FfiConverterTypeSweepFailedSwapInfo.lift(try rustCallWithError(FfiConverterTypeLnError.lift) {
uniffi_uniffi_lipalightninglib_fn_method_swap_prepare_sweep(self.uniffiClonePointer(),
FfiConverterTypeFailedSwapInfo.lower(failedSwapInfo),
FfiConverterString.lower(toAddress),$0
FfiConverterTypeBitcoinAddressData.lower(destination),$0
)
})
}
Expand Down Expand Up @@ -12085,7 +12095,7 @@ private var initializationResult: InitializationResult = {
if (uniffi_uniffi_lipalightninglib_checksum_method_channelclose_determine_resolving_fees() != 21525) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_uniffi_lipalightninglib_checksum_method_channelclose_prepare_sweep() != 21435) {
if (uniffi_uniffi_lipalightninglib_checksum_method_channelclose_prepare_sweep() != 44583) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_uniffi_lipalightninglib_checksum_method_channelclose_swap() != 13343) {
Expand Down Expand Up @@ -12421,7 +12431,7 @@ private var initializationResult: InitializationResult = {
if (uniffi_uniffi_lipalightninglib_checksum_method_phonenumber_verify() != 24882) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_uniffi_lipalightninglib_checksum_method_reverseswap_clear_wallet() != 5945) {
if (uniffi_uniffi_lipalightninglib_checksum_method_reverseswap_clear_wallet() != 36987) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_uniffi_lipalightninglib_checksum_method_reverseswap_determine_clear_wallet_feasibility() != 40903) {
Expand All @@ -12430,13 +12440,16 @@ private var initializationResult: InitializationResult = {
if (uniffi_uniffi_lipalightninglib_checksum_method_reverseswap_prepare_clear_wallet() != 16256) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_uniffi_lipalightninglib_checksum_method_swap_calculate_lsp_fee_for_amount() != 29142) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_uniffi_lipalightninglib_checksum_method_swap_create() != 19186) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_uniffi_lipalightninglib_checksum_method_swap_determine_resolving_fees() != 43015) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_uniffi_lipalightninglib_checksum_method_swap_prepare_sweep() != 47233) {
if (uniffi_uniffi_lipalightninglib_checksum_method_swap_prepare_sweep() != 7973) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_uniffi_lipalightninglib_checksum_method_swap_swap() != 22862) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<key>CFBundleName</key>
<string>lipalightninglibFFI</string>
<key>CFBundleVersion</key>
<string>0.70.0...1</string>
<string>0.72.0</string>
<key>CFBundleShortVersionString</key>
<string>0.70.0...1</string>
<string>0.72.0</string>
<key>CFBundleExecutable</key>
<string>lipalightninglibFFI</string>
<key>MinimumOSVersion</key>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
<key>CFBundleName</key>
<string>lipalightninglibFFI</string>
<key>CFBundleVersion</key>
<string>0.70.0...1</string>
<string>0.72.0</string>
<key>CFBundleShortVersionString</key>
<string>0.70.0...1</string>
<string>0.72.0</string>
<key>CFBundleExecutable</key>
<string>lipalightninglibFFI</string>
<key>MinimumOSVersion</key>
Expand Down

0 comments on commit 6d7b262

Please sign in to comment.