Compare commits

..

2 Commits

Author SHA1 Message Date
Chidiebere Chukwuma
d5e48772f5 Add refactored Util class for improved readability 2024-03-23 18:17:16 +00:00
Overtorment
27a0868255
Update gradle.properties 2023-02-24 11:45:30 +00:00
69 changed files with 105457 additions and 100708 deletions

View File

@ -2,4 +2,3 @@ RnLdk_kotlinVersion=1.6.0
RnLdk_compileSdkVersion=29
RnLdk_buildToolsVersion=29.0.2
RnLdk_targetSdkVersion=29
org.gradle.jvmargs=-Xmx4096M

Binary file not shown.

Binary file not shown.

View File

@ -6,7 +6,6 @@ import org.json.JSONArray
import org.ldk.batteries.ChannelManagerConstructor
import org.ldk.batteries.ChannelManagerConstructor.EventHandler
import org.ldk.batteries.NioPeerHandler
import org.ldk.enums.ChannelMonitorUpdateStatus
import org.ldk.enums.ConfirmationTarget
import org.ldk.enums.Currency
import org.ldk.enums.Network
@ -16,7 +15,6 @@ import org.ldk.structs.Filter.FilterInterface
import org.ldk.structs.Persist
import org.ldk.structs.Persist.PersistInterface
import org.ldk.structs.Result_NoneAPIErrorZ.Result_NoneAPIErrorZ_OK
import org.ldk.util.UInt128
import java.io.File
import java.io.IOException
import java.net.InetSocketAddress
@ -52,7 +50,6 @@ var keys_manager: KeysManager? = null;
var channel_manager_constructor: ChannelManagerConstructor? = null;
var router: NetworkGraph? = null; // optional, used only in graph sync; if null - no sync
var scorer: MultiThreadedLockableScore? = null; // optional, used only in graph sync; if null - no sync
var logger: Logger? = null;
var networkGraphPath = "";
var scorerPath = "";
@ -90,7 +87,7 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
// INITIALIZE THE LOGGER #######################################################################
// What it's used for: LDK logging
logger = Logger.new_impl { arg: Record ->
val logger = Logger.new_impl { arg: Record ->
if (arg._level == org.ldk.enums.Level.LDKLevel_Gossip) return@new_impl;
println("ReactNativeLDK: " + arg._args)
if (arg._level == org.ldk.enums.Level.LDKLevel_Trace) return@new_impl;
@ -112,24 +109,24 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
// INITIALIZE PERSIST ##########################################################################
// What it's used for: persisting crucial channel data in a timely manner
val persister = Persist.new_impl(object : PersistInterface {
override fun persist_new_channel(id: OutPoint, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus {
override fun persist_new_channel(id: OutPoint, data: ChannelMonitor, update_id: MonitorUpdateId): Result_NoneChannelMonitorUpdateErrZ {
val channel_monitor_bytes = data.write()
println("ReactNativeLDK: persist_new_channel")
val params = Arguments.createMap()
params.putString("id", byteArrayToHex(id.write()))
params.putString("data", byteArrayToHex(channel_monitor_bytes))
that.sendEvent(MARKER_PERSIST, params);
return ChannelMonitorUpdateStatus.LDKChannelMonitorUpdateStatus_Completed;
return Result_NoneChannelMonitorUpdateErrZ.ok();
}
override fun update_persisted_channel(id: OutPoint, update: ChannelMonitorUpdate?, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus {
override fun update_persisted_channel(id: OutPoint, update: ChannelMonitorUpdate?, data: ChannelMonitor, update_id: MonitorUpdateId): Result_NoneChannelMonitorUpdateErrZ {
val channel_monitor_bytes = data.write()
println("ReactNativeLDK: update_persisted_channel");
val params = Arguments.createMap()
params.putString("id", byteArrayToHex(id.write()))
params.putString("data", byteArrayToHex(channel_monitor_bytes))
that.sendEvent(MARKER_PERSIST, params);
return ChannelMonitorUpdateStatus.LDKChannelMonitorUpdateStatus_Completed;
return Result_NoneChannelMonitorUpdateErrZ.ok();
}
})
@ -178,7 +175,7 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
that.sendEvent(MARKER_REGISTER_TX, params);
}
override fun register_output(output: WatchedOutput) {
override fun register_output(output: WatchedOutput): Option_C2Tuple_usizeTransactionZZ {
println("ReactNativeLDK: register_output");
val params = Arguments.createMap()
val blockHash = output._block_hash;
@ -188,6 +185,7 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
params.putString("index", output._outpoint._index.toString())
params.putString("script_pubkey", byteArrayToHex(output._script_pubkey))
that.sendEvent(MARKER_REGISTER_OUTPUT, params);
return Option_C2Tuple_usizeTransactionZZ.none();
}
})
@ -236,12 +234,12 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
}
// error, creating from scratch
println("ReactNativeLDK: network graph error, creating from scratch")
router = NetworkGraph.of(Network.LDKNetwork_Bitcoin, logger)
router = NetworkGraph.of(hexStringToByteArray("000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f").reversedArray(), logger)
}
} else {
// first run, creating from scratch
println("ReactNativeLDK: network graph first run, creating from scratch")
router = NetworkGraph.of(Network.LDKNetwork_Bitcoin, logger)
router = NetworkGraph.of(hexStringToByteArray("000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f").reversedArray(), logger)
}
@ -293,20 +291,17 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
hexStringToByteArray(serializedChannelManagerHex),
channelMonitors,
uc,
keys_manager,
keys_manager?.as_KeysInterface(),
fee_estimator,
chain_monitor,
tx_filter,
router!!.write(),
org.ldk.structs.ProbabilisticScoringParameters.with_default(),
scorer?.write(),
null,
tx_broadcaster,
logger
);
channel_manager = channel_manager_constructor!!.channel_manager;
router = channel_manager_constructor!!.net_graph;
channel_manager_constructor!!.chain_sync_completed(channel_manager_persister, scorer !== null);
channel_manager_constructor!!.chain_sync_completed(channel_manager_persister, scorer);
peer_manager = channel_manager_constructor!!.peer_manager;
nio_peer_handler = channel_manager_constructor!!.nio_peer_handler;
} else {
@ -316,18 +311,16 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
uc,
hexStringToByteArray(blockchainTipHashHex),
blockchainTipHeight,
keys_manager,
keys_manager?.as_KeysInterface(),
fee_estimator,
chain_monitor,
router,
org.ldk.structs.ProbabilisticScoringParameters.with_default(),
null,
tx_broadcaster,
logger
);
channel_manager = channel_manager_constructor!!.channel_manager;
router = channel_manager_constructor!!.net_graph;
channel_manager_constructor!!.chain_sync_completed(channel_manager_persister, scorer !== null);
channel_manager_constructor!!.chain_sync_completed(channel_manager_persister, scorer);
peer_manager = channel_manager_constructor!!.peer_manager;
nio_peer_handler = channel_manager_constructor!!.nio_peer_handler;
}
@ -374,12 +367,12 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
channel_manager?.as_Confirm()?._relevant_txids?.iterator()?.forEach {
if (!first) json += ",";
first = false;
json += "\"" + byteArrayToHex(it._a.reversedArray()) + "\"";
json += "\"" + byteArrayToHex(it.reversedArray()) + "\"";
}
chain_monitor?.as_Confirm()?._relevant_txids?.iterator()?.forEach {
if (!first) json += ",";
first = false;
json += "\"" + byteArrayToHex(it._a.reversedArray()) + "\"";
json += "\"" + byteArrayToHex(it.reversedArray()) + "\"";
}
json += "]";
promise.resolve(json);
@ -407,7 +400,7 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
fun disconnectByNodeId(pubkeyHex: String, promise: Promise) {
println("ReactNativeLDK: disconnecting peer " + pubkeyHex);
try {
peer_manager?.disconnect_by_node_id(hexStringToByteArray(pubkeyHex));
peer_manager?.disconnect_by_node_id(hexStringToByteArray(pubkeyHex), false);
promise.resolve(true);
} catch (e: IOException) {
promise.reject("disconnect_by_node_id exception: " + e.message);
@ -429,9 +422,9 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
var path = arrayOf(
RouteHop.of(
hexStringToByteArray(destPubkeyHex),
NodeFeatures.empty(),
NodeFeatures.known(),
shortChannelId.toLong(),
ChannelFeatures.empty(),
ChannelFeatures.known(),
paymentValueMsat.toLong(),
finalCltvValue
)
@ -447,9 +440,9 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
path = path.plusElement(
RouteHop.of(
hexStringToByteArray(hopJson.getString("pubkey")),
NodeFeatures.empty(),
NodeFeatures.known(),
hopJson.getString("short_channel_id").toLong(),
ChannelFeatures.empty(),
ChannelFeatures.known(),
hopJson.getString("fee_msat").toLong(),
hopJson.getString("cltv_expiry_delta").toInt()
)
@ -458,7 +451,7 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
}
val payee = PaymentParameters.from_node_id(hexStringToByteArray(destPubkeyHex), finalCltvValue);
val payee = PaymentParameters.from_node_id(hexStringToByteArray(destPubkeyHex));
val route = Route.of(
arrayOf(
path
@ -468,8 +461,8 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
val payment_hash = hexStringToByteArray(paymentHashHex);
val payment_secret = hexStringToByteArray(paymentSecretHex);
val payment_res = channel_manager?.send_payment(route, payment_hash, payment_secret, payment_hash);
if (payment_res is Result_NonePaymentSendFailureZ.Result_NonePaymentSendFailureZ_OK) {
val payment_res = channel_manager?.send_payment(route, payment_hash, payment_secret);
if (payment_res is Result_PaymentIdPaymentSendFailureZ.Result_PaymentIdPaymentSendFailureZ_OK) {
promise.resolve(true);
} else {
promise.reject("sendPayment failed");
@ -478,6 +471,8 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
@ReactMethod
fun payInvoice(bolt11: String, amtSat: Int, promise: Promise) {
if (channel_manager_constructor?.payer == null) return promise.reject("payer is null, probably trying to pay invoice without having graph sync enabled");
println("paying $bolt11 for $amtSat sat");
val parsedInvoice = Invoice.from_str(bolt11)
@ -487,9 +482,9 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
}
val sendRes = if (amtSat != 0) {
UtilMethods.pay_zero_value_invoice(parsedInvoice.res, amtSat.toLong() * 1000, Retry.timeout(6), channel_manager)
channel_manager_constructor!!.payer!!.pay_zero_value_invoice(parsedInvoice.res, amtSat.toLong() * 1000)
} else {
UtilMethods.pay_invoice(parsedInvoice.res, org.ldk.structs.Retry.timeout(6), channel_manager);
channel_manager_constructor!!.payer!!.pay_invoice(parsedInvoice.res)
}
if (sendRes !is Result_PaymentIdPaymentErrorZ.Result_PaymentIdPaymentErrorZ_OK) {
@ -508,13 +503,11 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
val invoice = UtilMethods.create_invoice_from_channelmanager(
channel_manager,
keys_manager?.as_NodeSigner(),
logger,
keys_manager?.as_KeysInterface(),
Currency.LDKCurrency_Bitcoin,
amountStruct,
description,
24 * 3600,
org.ldk.structs.Option_u16Z.none()
24 * 3600
);
if (invoice is Result_InvoiceSignOrCreationErrorZ.Result_InvoiceSignOrCreationErrorZ_OK) {
@ -531,13 +524,7 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
promise.reject("no peer manager inited");
return;
}
var tempByteArr : Array<ByteArray> = emptyArray();
peer_manager!!.get_peer_node_ids().iterator().forEach {
tempByteArr = tempByteArr.plus(it.get_a());
}
val peer_node_ids: Array<ByteArray> = tempByteArr
val peer_node_ids: Array<ByteArray> = peer_manager!!.get_peer_node_ids()
var json: String = "[";
var first = true;
peer_node_ids.iterator().forEach {
@ -576,7 +563,7 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
if (event is Event.PaymentPathFailed) {
println("ReactNativeLDK: " + "payment path failed, payment_hash: " + byteArrayToHex(event.payment_hash));
if (router === null) {
if (channel_manager_constructor?.payer == null) {
println("ReactNativeLDK: " + "abandoning payment");
// since we aparently dont sync graph, payment was probably initiated via trying to pay a specific route - and that route failed!
// so no reason to wait for a timeout, we abandon payment immediately
@ -584,7 +571,7 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
}
val params = Arguments.createMap();
params.putString("payment_hash", byteArrayToHex(event.payment_hash));
params.putString("payment_failed_permanently", event.payment_failed_permanently.toString());
params.putString("rejected_by_dest", event.rejected_by_dest.toString());
this.sendEvent(MARKER_PAYMENT_PATH_FAILED, params);
}
@ -596,8 +583,8 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
this.sendEvent(MARKER_PAYMENT_FAILED, params);
}
if (event is Event.PaymentClaimable) {
println("ReactNativeLDK: " + "payment claimable, payment_hash: " + byteArrayToHex(event.payment_hash));
if (event is Event.PaymentReceived) {
println("ReactNativeLDK: " + "payment received, payment_hash: " + byteArrayToHex(event.payment_hash));
var paymentPreimage: ByteArray? = null;
if (event.purpose is PaymentPurpose.InvoicePayment) {
@ -634,7 +621,6 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
}
if (event is Event.PaymentClaimed) {
println("ReactNativeLDK: " + "payment claimed, payment_hash: " + byteArrayToHex(event.payment_hash));
var paymentPreimage: ByteArray? = null;
var paymentSecret: ByteArray? = null;
@ -731,7 +717,7 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
temporary_channel_id = null;
val peer_node_pubkey = hexStringToByteArray(pubkey);
val create_channel_result = channel_manager?.create_channel(
peer_node_pubkey, channelValue.toLong(), 0, UInt128(42), null
peer_node_pubkey, channelValue.toLong(), 0, 42, null
);
if (create_channel_result !is Result__u832APIErrorZ.Result__u832APIErrorZ_OK) {
@ -842,7 +828,6 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
channelObject += "\"is_usable\":" + it._is_usable + ",";
channelObject += "\"is_outbound\":" + it._is_outbound + ",";
channelObject += "\"is_public\":" + it._is_public + ",";
channelObject += "\"is_channel_ready\":" + it._is_channel_ready + ",";
channelObject += "\"remote_node_id\":" + "\"" + byteArrayToHex(it._counterparty._node_id) + "\","; // @deprecated fixme
val fundingTxoTxid = it._funding_txo?._txid;
if (fundingTxoTxid is ByteArray) {
@ -908,16 +893,8 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
println("ReactNativeLDK: ContentiousClaimable = " + it.claimable_amount_satoshis + " " + it.timeout_height);
}
if (it is Balance.MaybeTimeoutClaimableHTLC) {
println("ReactNativeLDK: MaybeTimeoutClaimableHTLC = " + it.claimable_amount_satoshis + " " + it.claimable_height);
}
if (it is Balance.MaybePreimageClaimableHTLC) {
println("ReactNativeLDK: MaybePreimageClaimableHTLC = " + it.claimable_amount_satoshis + " " + it.expiry_height);
}
if (it is Balance.CounterpartyRevokedOutputClaimable) {
println("ReactNativeLDK: CounterpartyRevokedOutputClaimable = " + it.claimable_amount_satoshis);
if (it is Balance.MaybeClaimableHTLCAwaitingTimeout) {
println("ReactNativeLDK: MaybeClaimableHTLCAwaitingTimeout = " + it.claimable_amount_satoshis + " " + it.claimable_height);
}
}
@ -949,8 +926,8 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
}
}
if (it is Balance.MaybeTimeoutClaimableHTLC) {
println("ReactNativeLDK: MaybeTimeoutClaimableHTLC = " + it.claimable_amount_satoshis + " " + it.claimable_height);
if (it is Balance.MaybeClaimableHTLCAwaitingTimeout) {
println("ReactNativeLDK: MaybeClaimableHTLCAwaitingTimeout = " + it.claimable_amount_satoshis + " " + it.claimable_height);
maxHeight = when (it.claimable_height > maxHeight) {
true -> it.claimable_height
false -> maxHeight

View File

@ -15,7 +15,7 @@
android:label="@string/app_name"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustResize" android:exported="true">
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />

View File

@ -4,7 +4,7 @@ buildscript {
ext {
buildToolsVersion = "30.0.2"
minSdkVersion = 24
compileSdkVersion = 31
compileSdkVersion = 30
targetSdkVersion = 30
}
repositories {
@ -13,6 +13,7 @@ buildscript {
}
dependencies {
classpath("com.android.tools.build:gradle:4.2.2")
17
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
@ -20,21 +21,6 @@ buildscript {
allprojects {
repositories {
exclusiveContent {
// We get React Native's Android binaries exclusively through npm,
// from a local Maven repo inside node_modules/react-native/.
// (The use of exclusiveContent prevents looking elsewhere like Maven Central
// and potentially getting a wrong version.)
filter {
includeGroup "com.facebook.react"
}
forRepository {
maven {
url "$rootDir/../node_modules/react-native/android"
}
}
}
mavenLocal()
maven {
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm

View File

@ -20,4 +20,3 @@
android.useAndroidX=true
android.enableJetifier=true
FLIPPER_VERSION=0.54.0
org.gradle.jvmargs=-Xmx4096M

View File

@ -5,8 +5,19 @@
<key>AvailableLibraries</key>
<array>
<dict>
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
<key>LibraryIdentifier</key>
<string>macos-arm64_x86_64</string>
<key>LibraryPath</key>
<string>LightningDevKit.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>macos</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<key>LibraryPath</key>
@ -19,8 +30,6 @@
<string>ios</string>
</dict>
<dict>
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
@ -36,23 +45,6 @@
<string>simulator</string>
</dict>
<dict>
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
<key>LibraryIdentifier</key>
<string>macos-arm64_x86_64</string>
<key>LibraryPath</key>
<string>LightningDevKit.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>macos</string>
</dict>
<dict>
<key>DebugSymbolsPath</key>
<string>dSYMs</string>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-maccatalyst</string>
<key>LibraryPath</key>

View File

@ -40,18 +40,8 @@ struct nativeShutdownScriptOpaque;
typedef struct nativeShutdownScriptOpaque LDKnativeShutdownScript;
struct nativeInvalidShutdownScriptOpaque;
typedef struct nativeInvalidShutdownScriptOpaque LDKnativeInvalidShutdownScript;
struct nativeBlindedPathOpaque;
typedef struct nativeBlindedPathOpaque LDKnativeBlindedPath;
struct nativeBlindedHopOpaque;
typedef struct nativeBlindedHopOpaque LDKnativeBlindedHop;
struct nativeBackgroundProcessorOpaque;
typedef struct nativeBackgroundProcessorOpaque LDKnativeBackgroundProcessor;
struct nativeDefaultRouterOpaque;
typedef struct nativeDefaultRouterOpaque LDKnativeDefaultRouter;
struct nativeScorerAccountingForInFlightHtlcsOpaque;
typedef struct nativeScorerAccountingForInFlightHtlcsOpaque LDKnativeScorerAccountingForInFlightHtlcs;
struct nativeInFlightHtlcsOpaque;
typedef struct nativeInFlightHtlcsOpaque LDKnativeInFlightHtlcs;
struct nativeRouteHopOpaque;
typedef struct nativeRouteHopOpaque LDKnativeRouteHop;
struct nativeRouteOpaque;
@ -70,8 +60,6 @@ struct nativeWatchedOutputOpaque;
typedef struct nativeWatchedOutputOpaque LDKnativeWatchedOutput;
struct nativeMultiThreadedLockableScoreOpaque;
typedef struct nativeMultiThreadedLockableScoreOpaque LDKnativeMultiThreadedLockableScore;
struct nativeMultiThreadedScoreLockOpaque;
typedef struct nativeMultiThreadedScoreLockOpaque LDKnativeMultiThreadedScoreLock;
struct nativeChannelUsageOpaque;
typedef struct nativeChannelUsageOpaque LDKnativeChannelUsage;
struct nativeFixedPenaltyScorerOpaque;
@ -88,10 +76,6 @@ struct nativeChannelFeaturesOpaque;
typedef struct nativeChannelFeaturesOpaque LDKnativeChannelFeatures;
struct nativeInvoiceFeaturesOpaque;
typedef struct nativeInvoiceFeaturesOpaque LDKnativeInvoiceFeatures;
struct nativeOfferFeaturesOpaque;
typedef struct nativeOfferFeaturesOpaque LDKnativeOfferFeatures;
struct nativeInvoiceRequestFeaturesOpaque;
typedef struct nativeInvoiceRequestFeaturesOpaque LDKnativeInvoiceRequestFeatures;
struct nativeChannelTypeFeaturesOpaque;
typedef struct nativeChannelTypeFeaturesOpaque LDKnativeChannelTypeFeatures;
struct nativeNodeIdOpaque;
@ -155,32 +139,10 @@ struct nativeBigSizeOpaque;
typedef struct nativeBigSizeOpaque LDKnativeBigSize;
struct nativeHostnameOpaque;
typedef struct nativeHostnameOpaque LDKnativeHostname;
struct nativePrintableStringOpaque;
typedef struct nativePrintableStringOpaque LDKnativePrintableString;
struct nativeOutPointOpaque;
typedef struct nativeOutPointOpaque LDKnativeOutPoint;
struct nativeInvoicePayerOpaque;
typedef struct nativeInvoicePayerOpaque LDKnativeInvoicePayer;
struct nativeChannelMonitorUpdateOpaque;
typedef struct nativeChannelMonitorUpdateOpaque LDKnativeChannelMonitorUpdate;
struct nativeHTLCUpdateOpaque;
typedef struct nativeHTLCUpdateOpaque LDKnativeHTLCUpdate;
struct nativeChannelMonitorOpaque;
typedef struct nativeChannelMonitorOpaque LDKnativeChannelMonitor;
struct nativeExpandedKeyOpaque;
typedef struct nativeExpandedKeyOpaque LDKnativeExpandedKey;
struct nativeIgnoringMessageHandlerOpaque;
typedef struct nativeIgnoringMessageHandlerOpaque LDKnativeIgnoringMessageHandler;
struct nativeErroringMessageHandlerOpaque;
typedef struct nativeErroringMessageHandlerOpaque LDKnativeErroringMessageHandler;
struct nativeMessageHandlerOpaque;
typedef struct nativeMessageHandlerOpaque LDKnativeMessageHandler;
struct nativePeerHandleErrorOpaque;
typedef struct nativePeerHandleErrorOpaque LDKnativePeerHandleError;
struct nativePeerManagerOpaque;
typedef struct nativePeerManagerOpaque LDKnativePeerManager;
struct nativeOnionMessengerOpaque;
typedef struct nativeOnionMessengerOpaque LDKnativeOnionMessenger;
struct nativeInvoiceOpaque;
typedef struct nativeInvoiceOpaque LDKnativeInvoice;
struct nativeSignedRawInvoiceOpaque;
@ -205,8 +167,28 @@ struct nativeInvoiceSignatureOpaque;
typedef struct nativeInvoiceSignatureOpaque LDKnativeInvoiceSignature;
struct nativePrivateRouteOpaque;
typedef struct nativePrivateRouteOpaque LDKnativePrivateRoute;
struct nativeChannelMonitorUpdateOpaque;
typedef struct nativeChannelMonitorUpdateOpaque LDKnativeChannelMonitorUpdate;
struct nativeHTLCUpdateOpaque;
typedef struct nativeHTLCUpdateOpaque LDKnativeHTLCUpdate;
struct nativeChannelMonitorOpaque;
typedef struct nativeChannelMonitorOpaque LDKnativeChannelMonitor;
struct nativeExpandedKeyOpaque;
typedef struct nativeExpandedKeyOpaque LDKnativeExpandedKey;
struct nativeIgnoringMessageHandlerOpaque;
typedef struct nativeIgnoringMessageHandlerOpaque LDKnativeIgnoringMessageHandler;
struct nativeErroringMessageHandlerOpaque;
typedef struct nativeErroringMessageHandlerOpaque LDKnativeErroringMessageHandler;
struct nativeMessageHandlerOpaque;
typedef struct nativeMessageHandlerOpaque LDKnativeMessageHandler;
struct nativePeerHandleErrorOpaque;
typedef struct nativePeerHandleErrorOpaque LDKnativePeerHandleError;
struct nativePeerManagerOpaque;
typedef struct nativePeerManagerOpaque LDKnativePeerManager;
struct nativeRapidGossipSyncOpaque;
typedef struct nativeRapidGossipSyncOpaque LDKnativeRapidGossipSync;
struct nativeDecodeErrorOpaque;
typedef struct nativeDecodeErrorOpaque LDKnativeDecodeError;
struct nativeInitOpaque;
typedef struct nativeInitOpaque LDKnativeInit;
struct nativeErrorMessageOpaque;
@ -235,8 +217,6 @@ struct nativeClosingSignedOpaque;
typedef struct nativeClosingSignedOpaque LDKnativeClosingSigned;
struct nativeUpdateAddHTLCOpaque;
typedef struct nativeUpdateAddHTLCOpaque LDKnativeUpdateAddHTLC;
struct nativeOnionMessageOpaque;
typedef struct nativeOnionMessageOpaque LDKnativeOnionMessage;
struct nativeUpdateFulfillHTLCOpaque;
typedef struct nativeUpdateFulfillHTLCOpaque LDKnativeUpdateFulfillHTLC;
struct nativeUpdateFailHTLCOpaque;
@ -281,10 +261,10 @@ struct nativeLightningErrorOpaque;
typedef struct nativeLightningErrorOpaque LDKnativeLightningError;
struct nativeCommitmentUpdateOpaque;
typedef struct nativeCommitmentUpdateOpaque LDKnativeCommitmentUpdate;
struct nativeDefaultRouterOpaque;
typedef struct nativeDefaultRouterOpaque LDKnativeDefaultRouter;
struct nativeRecordOpaque;
typedef struct nativeRecordOpaque LDKnativeRecord;
struct nativeFutureOpaque;
typedef struct nativeFutureOpaque LDKnativeFuture;
struct nativeMonitorUpdateIdOpaque;
typedef struct nativeMonitorUpdateIdOpaque LDKnativeMonitorUpdateId;
struct nativeLockedChannelMonitorOpaque;

View File

@ -8,8 +8,8 @@ static inline int _ldk_strncmp(const char *s1, const char *s2, uint64_t n) {
return 0;
}
#define _LDK_HEADER_VER "v0.0.113-16-gea4020c655cd8978"
#define _LDK_C_BINDINGS_HEADER_VER "v0.0.113.0"
#define _LDK_HEADER_VER "v0.0.110-12-g6343277cddee74ed"
#define _LDK_C_BINDINGS_HEADER_VER "v0.0.110.1"
static inline const char* check_get_ldk_version() {
LDKStr bin_ver = _ldk_get_compiled_version();
if (_ldk_strncmp(_LDK_HEADER_VER, (const char*)bin_ver.chars, bin_ver.len) != 0) {

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.org.ldk.LDKFramework</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View File

@ -40,18 +40,8 @@ struct nativeShutdownScriptOpaque;
typedef struct nativeShutdownScriptOpaque LDKnativeShutdownScript;
struct nativeInvalidShutdownScriptOpaque;
typedef struct nativeInvalidShutdownScriptOpaque LDKnativeInvalidShutdownScript;
struct nativeBlindedPathOpaque;
typedef struct nativeBlindedPathOpaque LDKnativeBlindedPath;
struct nativeBlindedHopOpaque;
typedef struct nativeBlindedHopOpaque LDKnativeBlindedHop;
struct nativeBackgroundProcessorOpaque;
typedef struct nativeBackgroundProcessorOpaque LDKnativeBackgroundProcessor;
struct nativeDefaultRouterOpaque;
typedef struct nativeDefaultRouterOpaque LDKnativeDefaultRouter;
struct nativeScorerAccountingForInFlightHtlcsOpaque;
typedef struct nativeScorerAccountingForInFlightHtlcsOpaque LDKnativeScorerAccountingForInFlightHtlcs;
struct nativeInFlightHtlcsOpaque;
typedef struct nativeInFlightHtlcsOpaque LDKnativeInFlightHtlcs;
struct nativeRouteHopOpaque;
typedef struct nativeRouteHopOpaque LDKnativeRouteHop;
struct nativeRouteOpaque;
@ -70,8 +60,6 @@ struct nativeWatchedOutputOpaque;
typedef struct nativeWatchedOutputOpaque LDKnativeWatchedOutput;
struct nativeMultiThreadedLockableScoreOpaque;
typedef struct nativeMultiThreadedLockableScoreOpaque LDKnativeMultiThreadedLockableScore;
struct nativeMultiThreadedScoreLockOpaque;
typedef struct nativeMultiThreadedScoreLockOpaque LDKnativeMultiThreadedScoreLock;
struct nativeChannelUsageOpaque;
typedef struct nativeChannelUsageOpaque LDKnativeChannelUsage;
struct nativeFixedPenaltyScorerOpaque;
@ -88,10 +76,6 @@ struct nativeChannelFeaturesOpaque;
typedef struct nativeChannelFeaturesOpaque LDKnativeChannelFeatures;
struct nativeInvoiceFeaturesOpaque;
typedef struct nativeInvoiceFeaturesOpaque LDKnativeInvoiceFeatures;
struct nativeOfferFeaturesOpaque;
typedef struct nativeOfferFeaturesOpaque LDKnativeOfferFeatures;
struct nativeInvoiceRequestFeaturesOpaque;
typedef struct nativeInvoiceRequestFeaturesOpaque LDKnativeInvoiceRequestFeatures;
struct nativeChannelTypeFeaturesOpaque;
typedef struct nativeChannelTypeFeaturesOpaque LDKnativeChannelTypeFeatures;
struct nativeNodeIdOpaque;
@ -155,32 +139,10 @@ struct nativeBigSizeOpaque;
typedef struct nativeBigSizeOpaque LDKnativeBigSize;
struct nativeHostnameOpaque;
typedef struct nativeHostnameOpaque LDKnativeHostname;
struct nativePrintableStringOpaque;
typedef struct nativePrintableStringOpaque LDKnativePrintableString;
struct nativeOutPointOpaque;
typedef struct nativeOutPointOpaque LDKnativeOutPoint;
struct nativeInvoicePayerOpaque;
typedef struct nativeInvoicePayerOpaque LDKnativeInvoicePayer;
struct nativeChannelMonitorUpdateOpaque;
typedef struct nativeChannelMonitorUpdateOpaque LDKnativeChannelMonitorUpdate;
struct nativeHTLCUpdateOpaque;
typedef struct nativeHTLCUpdateOpaque LDKnativeHTLCUpdate;
struct nativeChannelMonitorOpaque;
typedef struct nativeChannelMonitorOpaque LDKnativeChannelMonitor;
struct nativeExpandedKeyOpaque;
typedef struct nativeExpandedKeyOpaque LDKnativeExpandedKey;
struct nativeIgnoringMessageHandlerOpaque;
typedef struct nativeIgnoringMessageHandlerOpaque LDKnativeIgnoringMessageHandler;
struct nativeErroringMessageHandlerOpaque;
typedef struct nativeErroringMessageHandlerOpaque LDKnativeErroringMessageHandler;
struct nativeMessageHandlerOpaque;
typedef struct nativeMessageHandlerOpaque LDKnativeMessageHandler;
struct nativePeerHandleErrorOpaque;
typedef struct nativePeerHandleErrorOpaque LDKnativePeerHandleError;
struct nativePeerManagerOpaque;
typedef struct nativePeerManagerOpaque LDKnativePeerManager;
struct nativeOnionMessengerOpaque;
typedef struct nativeOnionMessengerOpaque LDKnativeOnionMessenger;
struct nativeInvoiceOpaque;
typedef struct nativeInvoiceOpaque LDKnativeInvoice;
struct nativeSignedRawInvoiceOpaque;
@ -205,8 +167,28 @@ struct nativeInvoiceSignatureOpaque;
typedef struct nativeInvoiceSignatureOpaque LDKnativeInvoiceSignature;
struct nativePrivateRouteOpaque;
typedef struct nativePrivateRouteOpaque LDKnativePrivateRoute;
struct nativeChannelMonitorUpdateOpaque;
typedef struct nativeChannelMonitorUpdateOpaque LDKnativeChannelMonitorUpdate;
struct nativeHTLCUpdateOpaque;
typedef struct nativeHTLCUpdateOpaque LDKnativeHTLCUpdate;
struct nativeChannelMonitorOpaque;
typedef struct nativeChannelMonitorOpaque LDKnativeChannelMonitor;
struct nativeExpandedKeyOpaque;
typedef struct nativeExpandedKeyOpaque LDKnativeExpandedKey;
struct nativeIgnoringMessageHandlerOpaque;
typedef struct nativeIgnoringMessageHandlerOpaque LDKnativeIgnoringMessageHandler;
struct nativeErroringMessageHandlerOpaque;
typedef struct nativeErroringMessageHandlerOpaque LDKnativeErroringMessageHandler;
struct nativeMessageHandlerOpaque;
typedef struct nativeMessageHandlerOpaque LDKnativeMessageHandler;
struct nativePeerHandleErrorOpaque;
typedef struct nativePeerHandleErrorOpaque LDKnativePeerHandleError;
struct nativePeerManagerOpaque;
typedef struct nativePeerManagerOpaque LDKnativePeerManager;
struct nativeRapidGossipSyncOpaque;
typedef struct nativeRapidGossipSyncOpaque LDKnativeRapidGossipSync;
struct nativeDecodeErrorOpaque;
typedef struct nativeDecodeErrorOpaque LDKnativeDecodeError;
struct nativeInitOpaque;
typedef struct nativeInitOpaque LDKnativeInit;
struct nativeErrorMessageOpaque;
@ -235,8 +217,6 @@ struct nativeClosingSignedOpaque;
typedef struct nativeClosingSignedOpaque LDKnativeClosingSigned;
struct nativeUpdateAddHTLCOpaque;
typedef struct nativeUpdateAddHTLCOpaque LDKnativeUpdateAddHTLC;
struct nativeOnionMessageOpaque;
typedef struct nativeOnionMessageOpaque LDKnativeOnionMessage;
struct nativeUpdateFulfillHTLCOpaque;
typedef struct nativeUpdateFulfillHTLCOpaque LDKnativeUpdateFulfillHTLC;
struct nativeUpdateFailHTLCOpaque;
@ -281,10 +261,10 @@ struct nativeLightningErrorOpaque;
typedef struct nativeLightningErrorOpaque LDKnativeLightningError;
struct nativeCommitmentUpdateOpaque;
typedef struct nativeCommitmentUpdateOpaque LDKnativeCommitmentUpdate;
struct nativeDefaultRouterOpaque;
typedef struct nativeDefaultRouterOpaque LDKnativeDefaultRouter;
struct nativeRecordOpaque;
typedef struct nativeRecordOpaque LDKnativeRecord;
struct nativeFutureOpaque;
typedef struct nativeFutureOpaque LDKnativeFuture;
struct nativeMonitorUpdateIdOpaque;
typedef struct nativeMonitorUpdateIdOpaque LDKnativeMonitorUpdateId;
struct nativeLockedChannelMonitorOpaque;

View File

@ -8,8 +8,8 @@ static inline int _ldk_strncmp(const char *s1, const char *s2, uint64_t n) {
return 0;
}
#define _LDK_HEADER_VER "v0.0.113-16-gea4020c655cd8978"
#define _LDK_C_BINDINGS_HEADER_VER "v0.0.113.0"
#define _LDK_HEADER_VER "v0.0.110-12-g6343277cddee74ed"
#define _LDK_C_BINDINGS_HEADER_VER "v0.0.110.1"
static inline const char* check_get_ldk_version() {
LDKStr bin_ver = _ldk_get_compiled_version();
if (_ldk_strncmp(_LDK_HEADER_VER, (const char*)bin_ver.chars, bin_ver.len) != 0) {

View File

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>21G320</string>
<string>21G72</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.org.ldk.LDKFramework</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View File

@ -40,18 +40,8 @@ struct nativeShutdownScriptOpaque;
typedef struct nativeShutdownScriptOpaque LDKnativeShutdownScript;
struct nativeInvalidShutdownScriptOpaque;
typedef struct nativeInvalidShutdownScriptOpaque LDKnativeInvalidShutdownScript;
struct nativeBlindedPathOpaque;
typedef struct nativeBlindedPathOpaque LDKnativeBlindedPath;
struct nativeBlindedHopOpaque;
typedef struct nativeBlindedHopOpaque LDKnativeBlindedHop;
struct nativeBackgroundProcessorOpaque;
typedef struct nativeBackgroundProcessorOpaque LDKnativeBackgroundProcessor;
struct nativeDefaultRouterOpaque;
typedef struct nativeDefaultRouterOpaque LDKnativeDefaultRouter;
struct nativeScorerAccountingForInFlightHtlcsOpaque;
typedef struct nativeScorerAccountingForInFlightHtlcsOpaque LDKnativeScorerAccountingForInFlightHtlcs;
struct nativeInFlightHtlcsOpaque;
typedef struct nativeInFlightHtlcsOpaque LDKnativeInFlightHtlcs;
struct nativeRouteHopOpaque;
typedef struct nativeRouteHopOpaque LDKnativeRouteHop;
struct nativeRouteOpaque;
@ -70,8 +60,6 @@ struct nativeWatchedOutputOpaque;
typedef struct nativeWatchedOutputOpaque LDKnativeWatchedOutput;
struct nativeMultiThreadedLockableScoreOpaque;
typedef struct nativeMultiThreadedLockableScoreOpaque LDKnativeMultiThreadedLockableScore;
struct nativeMultiThreadedScoreLockOpaque;
typedef struct nativeMultiThreadedScoreLockOpaque LDKnativeMultiThreadedScoreLock;
struct nativeChannelUsageOpaque;
typedef struct nativeChannelUsageOpaque LDKnativeChannelUsage;
struct nativeFixedPenaltyScorerOpaque;
@ -88,10 +76,6 @@ struct nativeChannelFeaturesOpaque;
typedef struct nativeChannelFeaturesOpaque LDKnativeChannelFeatures;
struct nativeInvoiceFeaturesOpaque;
typedef struct nativeInvoiceFeaturesOpaque LDKnativeInvoiceFeatures;
struct nativeOfferFeaturesOpaque;
typedef struct nativeOfferFeaturesOpaque LDKnativeOfferFeatures;
struct nativeInvoiceRequestFeaturesOpaque;
typedef struct nativeInvoiceRequestFeaturesOpaque LDKnativeInvoiceRequestFeatures;
struct nativeChannelTypeFeaturesOpaque;
typedef struct nativeChannelTypeFeaturesOpaque LDKnativeChannelTypeFeatures;
struct nativeNodeIdOpaque;
@ -155,32 +139,10 @@ struct nativeBigSizeOpaque;
typedef struct nativeBigSizeOpaque LDKnativeBigSize;
struct nativeHostnameOpaque;
typedef struct nativeHostnameOpaque LDKnativeHostname;
struct nativePrintableStringOpaque;
typedef struct nativePrintableStringOpaque LDKnativePrintableString;
struct nativeOutPointOpaque;
typedef struct nativeOutPointOpaque LDKnativeOutPoint;
struct nativeInvoicePayerOpaque;
typedef struct nativeInvoicePayerOpaque LDKnativeInvoicePayer;
struct nativeChannelMonitorUpdateOpaque;
typedef struct nativeChannelMonitorUpdateOpaque LDKnativeChannelMonitorUpdate;
struct nativeHTLCUpdateOpaque;
typedef struct nativeHTLCUpdateOpaque LDKnativeHTLCUpdate;
struct nativeChannelMonitorOpaque;
typedef struct nativeChannelMonitorOpaque LDKnativeChannelMonitor;
struct nativeExpandedKeyOpaque;
typedef struct nativeExpandedKeyOpaque LDKnativeExpandedKey;
struct nativeIgnoringMessageHandlerOpaque;
typedef struct nativeIgnoringMessageHandlerOpaque LDKnativeIgnoringMessageHandler;
struct nativeErroringMessageHandlerOpaque;
typedef struct nativeErroringMessageHandlerOpaque LDKnativeErroringMessageHandler;
struct nativeMessageHandlerOpaque;
typedef struct nativeMessageHandlerOpaque LDKnativeMessageHandler;
struct nativePeerHandleErrorOpaque;
typedef struct nativePeerHandleErrorOpaque LDKnativePeerHandleError;
struct nativePeerManagerOpaque;
typedef struct nativePeerManagerOpaque LDKnativePeerManager;
struct nativeOnionMessengerOpaque;
typedef struct nativeOnionMessengerOpaque LDKnativeOnionMessenger;
struct nativeInvoiceOpaque;
typedef struct nativeInvoiceOpaque LDKnativeInvoice;
struct nativeSignedRawInvoiceOpaque;
@ -205,8 +167,28 @@ struct nativeInvoiceSignatureOpaque;
typedef struct nativeInvoiceSignatureOpaque LDKnativeInvoiceSignature;
struct nativePrivateRouteOpaque;
typedef struct nativePrivateRouteOpaque LDKnativePrivateRoute;
struct nativeChannelMonitorUpdateOpaque;
typedef struct nativeChannelMonitorUpdateOpaque LDKnativeChannelMonitorUpdate;
struct nativeHTLCUpdateOpaque;
typedef struct nativeHTLCUpdateOpaque LDKnativeHTLCUpdate;
struct nativeChannelMonitorOpaque;
typedef struct nativeChannelMonitorOpaque LDKnativeChannelMonitor;
struct nativeExpandedKeyOpaque;
typedef struct nativeExpandedKeyOpaque LDKnativeExpandedKey;
struct nativeIgnoringMessageHandlerOpaque;
typedef struct nativeIgnoringMessageHandlerOpaque LDKnativeIgnoringMessageHandler;
struct nativeErroringMessageHandlerOpaque;
typedef struct nativeErroringMessageHandlerOpaque LDKnativeErroringMessageHandler;
struct nativeMessageHandlerOpaque;
typedef struct nativeMessageHandlerOpaque LDKnativeMessageHandler;
struct nativePeerHandleErrorOpaque;
typedef struct nativePeerHandleErrorOpaque LDKnativePeerHandleError;
struct nativePeerManagerOpaque;
typedef struct nativePeerManagerOpaque LDKnativePeerManager;
struct nativeRapidGossipSyncOpaque;
typedef struct nativeRapidGossipSyncOpaque LDKnativeRapidGossipSync;
struct nativeDecodeErrorOpaque;
typedef struct nativeDecodeErrorOpaque LDKnativeDecodeError;
struct nativeInitOpaque;
typedef struct nativeInitOpaque LDKnativeInit;
struct nativeErrorMessageOpaque;
@ -235,8 +217,6 @@ struct nativeClosingSignedOpaque;
typedef struct nativeClosingSignedOpaque LDKnativeClosingSigned;
struct nativeUpdateAddHTLCOpaque;
typedef struct nativeUpdateAddHTLCOpaque LDKnativeUpdateAddHTLC;
struct nativeOnionMessageOpaque;
typedef struct nativeOnionMessageOpaque LDKnativeOnionMessage;
struct nativeUpdateFulfillHTLCOpaque;
typedef struct nativeUpdateFulfillHTLCOpaque LDKnativeUpdateFulfillHTLC;
struct nativeUpdateFailHTLCOpaque;
@ -281,10 +261,10 @@ struct nativeLightningErrorOpaque;
typedef struct nativeLightningErrorOpaque LDKnativeLightningError;
struct nativeCommitmentUpdateOpaque;
typedef struct nativeCommitmentUpdateOpaque LDKnativeCommitmentUpdate;
struct nativeDefaultRouterOpaque;
typedef struct nativeDefaultRouterOpaque LDKnativeDefaultRouter;
struct nativeRecordOpaque;
typedef struct nativeRecordOpaque LDKnativeRecord;
struct nativeFutureOpaque;
typedef struct nativeFutureOpaque LDKnativeFuture;
struct nativeMonitorUpdateIdOpaque;
typedef struct nativeMonitorUpdateIdOpaque LDKnativeMonitorUpdateId;
struct nativeLockedChannelMonitorOpaque;

View File

@ -8,8 +8,8 @@ static inline int _ldk_strncmp(const char *s1, const char *s2, uint64_t n) {
return 0;
}
#define _LDK_HEADER_VER "v0.0.113-16-gea4020c655cd8978"
#define _LDK_C_BINDINGS_HEADER_VER "v0.0.113.0"
#define _LDK_HEADER_VER "v0.0.110-12-g6343277cddee74ed"
#define _LDK_C_BINDINGS_HEADER_VER "v0.0.110.1"
static inline const char* check_get_ldk_version() {
LDKStr bin_ver = _ldk_get_compiled_version();
if (_ldk_strncmp(_LDK_HEADER_VER, (const char*)bin_ver.chars, bin_ver.len) != 0) {

View File

@ -18,67 +18,67 @@
</data>
<key>Headers/ldk_rust_types.h</key>
<data>
PNEYjI76XLBjOEdzeviUkTwl1pU=
DdJqlv1turyDNasVeYdzNWdK8YM=
</data>
<key>Headers/ldk_ver.h</key>
<data>
PZKcLDtykPP6ReuSXEeU2tE1lQ0=
VDtMA5Amt/kJ1UHgW/0OFj0Drb0=
</data>
<key>Headers/lightning.h</key>
<data>
4okv264Z4MMqSWFmiUMcu4VTY40=
ZBQAyAc/D49YeUjBqE3JqyIMNj4=
</data>
<key>Info.plist</key>
<data>
TAAWpx/bTMcKJ08BqGFerwm4mPk=
5y189aeoLe7WAJlGZY1M/isoJ4Y=
</data>
<key>Modules/LightningDevKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
<data>
++jRtyu+dQ+WfZjn2qqjHBPQHus=
ndayoHwMQFpgYerp1/FeGJlj2M8=
</data>
<key>Modules/LightningDevKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
<data>
mynn9KzF+OILq8IcWcAMbtFnP3o=
v6t66DDgkdimzf7IpvvM9Giy9yw=
</data>
<key>Modules/LightningDevKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
<data>
V9xW5D2Br4+CSWe5HqoomMtrdzo=
UOfNj6JjDof5k/9ui5hvoxwMv9g=
</data>
<key>Modules/LightningDevKit.swiftmodule/arm64.swiftdoc</key>
<data>
++jRtyu+dQ+WfZjn2qqjHBPQHus=
ndayoHwMQFpgYerp1/FeGJlj2M8=
</data>
<key>Modules/LightningDevKit.swiftmodule/arm64.swiftinterface</key>
<data>
mynn9KzF+OILq8IcWcAMbtFnP3o=
v6t66DDgkdimzf7IpvvM9Giy9yw=
</data>
<key>Modules/LightningDevKit.swiftmodule/arm64.swiftmodule</key>
<data>
V9xW5D2Br4+CSWe5HqoomMtrdzo=
UOfNj6JjDof5k/9ui5hvoxwMv9g=
</data>
<key>Modules/LightningDevKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
<data>
iVE/cS5x/+LS8OPqNqclu7Y42sI=
+H9em8cBZSpWSyXomrmAdiZC3P0=
</data>
<key>Modules/LightningDevKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
<data>
bPgQoHjqh6+9UjbXXjQfL6sIy2E=
cNt2cTkyZCu37jh8tVR8AzAtdZU=
</data>
<key>Modules/LightningDevKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
<data>
YvabZtm6QG19YGP9tXBjiTy3pGY=
FxMTTaEQnoHAdZ1FbVy9WLsQZAk=
</data>
<key>Modules/LightningDevKit.swiftmodule/x86_64.swiftdoc</key>
<data>
iVE/cS5x/+LS8OPqNqclu7Y42sI=
+H9em8cBZSpWSyXomrmAdiZC3P0=
</data>
<key>Modules/LightningDevKit.swiftmodule/x86_64.swiftinterface</key>
<data>
bPgQoHjqh6+9UjbXXjQfL6sIy2E=
cNt2cTkyZCu37jh8tVR8AzAtdZU=
</data>
<key>Modules/LightningDevKit.swiftmodule/x86_64.swiftmodule</key>
<data>
YvabZtm6QG19YGP9tXBjiTy3pGY=
FxMTTaEQnoHAdZ1FbVy9WLsQZAk=
</data>
<key>Modules/module.modulemap</key>
<data>
@ -112,105 +112,105 @@
<dict>
<key>hash2</key>
<data>
5JIef1C/aH8I3ElK7tNjiyx9aPOggdASNQ9vc4NuJA8=
1ohc/at68l4DpZdz+I+qRP3g/iccDRW/Tuis1HH4J+k=
</data>
</dict>
<key>Headers/ldk_ver.h</key>
<dict>
<key>hash2</key>
<data>
NpesGpwRvUnhkXmoPcFII9reYLOBL7eTdYVGH4ElVG8=
+xArDSjD8/9y7MRscOHSmhmMnWaZCVAvq4ONiqZ2w68=
</data>
</dict>
<key>Headers/lightning.h</key>
<dict>
<key>hash2</key>
<data>
yDlZN9O3rMPOPwDIq/O6aNgdEd1HLwPDKqjR2hMOUPE=
7upflvcaaRFVMatTdzoC4ggQW4iGl7wlEaQkFbhFI58=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
<dict>
<key>hash2</key>
<data>
DBeQm3WjAfMBcIS8hX4WZWpKqhdkGY+dH0DPu0zf9zk=
udXzrWBlIiAzxaL+Z4NW9X3Ih8vZdnmbCgduhKm3cfQ=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
<dict>
<key>hash2</key>
<data>
MsjDTT1CDmuBiXd3DJOOnebESJEwW60QbWYzkKiqhuY=
3bQZszL6sZ27IziIOOWmp0zrJHfDRWmKPZh3KFzlPMw=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
<dict>
<key>hash2</key>
<data>
MgEFvQqHZFuE5Ua1z5To/zUQQKoHCpagyjx53SZBNWg=
Qaj0ArKT/074D/lUlZPnvx7i5fou6ehP/a4J/l/O1DM=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/arm64.swiftdoc</key>
<dict>
<key>hash2</key>
<data>
DBeQm3WjAfMBcIS8hX4WZWpKqhdkGY+dH0DPu0zf9zk=
udXzrWBlIiAzxaL+Z4NW9X3Ih8vZdnmbCgduhKm3cfQ=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/arm64.swiftinterface</key>
<dict>
<key>hash2</key>
<data>
MsjDTT1CDmuBiXd3DJOOnebESJEwW60QbWYzkKiqhuY=
3bQZszL6sZ27IziIOOWmp0zrJHfDRWmKPZh3KFzlPMw=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/arm64.swiftmodule</key>
<dict>
<key>hash2</key>
<data>
MgEFvQqHZFuE5Ua1z5To/zUQQKoHCpagyjx53SZBNWg=
Qaj0ArKT/074D/lUlZPnvx7i5fou6ehP/a4J/l/O1DM=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
<dict>
<key>hash2</key>
<data>
nng3gpIh/w5zux3rQKgB7YXayDHYle/TYLE8BOef38w=
t1vhDbsQUTYQ7I598S8u9F7l/S8JhxR3R2TXPiXhGxM=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
<dict>
<key>hash2</key>
<data>
jHtpPPnQoyoyhxvMsm6Cb0kQ4/lRJjA39iPSfpI83mc=
UqMw4ZcB5Vi766FBw3DEhO2zuabWMXQ010rU8+6Vrjk=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
<dict>
<key>hash2</key>
<data>
ENX8q80JiQP/tnoyr+k0DtfmiAt98t06BgJo2oTVWrQ=
u7uY01j6hnoWbHDALYoPxLXlUsi7OWK66swokYchUXU=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/x86_64.swiftdoc</key>
<dict>
<key>hash2</key>
<data>
nng3gpIh/w5zux3rQKgB7YXayDHYle/TYLE8BOef38w=
t1vhDbsQUTYQ7I598S8u9F7l/S8JhxR3R2TXPiXhGxM=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/x86_64.swiftinterface</key>
<dict>
<key>hash2</key>
<data>
jHtpPPnQoyoyhxvMsm6Cb0kQ4/lRJjA39iPSfpI83mc=
UqMw4ZcB5Vi766FBw3DEhO2zuabWMXQ010rU8+6Vrjk=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/x86_64.swiftmodule</key>
<dict>
<key>hash2</key>
<data>
ENX8q80JiQP/tnoyr+k0DtfmiAt98t06BgJo2oTVWrQ=
u7uY01j6hnoWbHDALYoPxLXlUsi7OWK66swokYchUXU=
</data>
</dict>
<key>Modules/module.modulemap</key>

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.org.ldk.LDKFramework</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View File

@ -40,18 +40,8 @@ struct nativeShutdownScriptOpaque;
typedef struct nativeShutdownScriptOpaque LDKnativeShutdownScript;
struct nativeInvalidShutdownScriptOpaque;
typedef struct nativeInvalidShutdownScriptOpaque LDKnativeInvalidShutdownScript;
struct nativeBlindedPathOpaque;
typedef struct nativeBlindedPathOpaque LDKnativeBlindedPath;
struct nativeBlindedHopOpaque;
typedef struct nativeBlindedHopOpaque LDKnativeBlindedHop;
struct nativeBackgroundProcessorOpaque;
typedef struct nativeBackgroundProcessorOpaque LDKnativeBackgroundProcessor;
struct nativeDefaultRouterOpaque;
typedef struct nativeDefaultRouterOpaque LDKnativeDefaultRouter;
struct nativeScorerAccountingForInFlightHtlcsOpaque;
typedef struct nativeScorerAccountingForInFlightHtlcsOpaque LDKnativeScorerAccountingForInFlightHtlcs;
struct nativeInFlightHtlcsOpaque;
typedef struct nativeInFlightHtlcsOpaque LDKnativeInFlightHtlcs;
struct nativeRouteHopOpaque;
typedef struct nativeRouteHopOpaque LDKnativeRouteHop;
struct nativeRouteOpaque;
@ -70,8 +60,6 @@ struct nativeWatchedOutputOpaque;
typedef struct nativeWatchedOutputOpaque LDKnativeWatchedOutput;
struct nativeMultiThreadedLockableScoreOpaque;
typedef struct nativeMultiThreadedLockableScoreOpaque LDKnativeMultiThreadedLockableScore;
struct nativeMultiThreadedScoreLockOpaque;
typedef struct nativeMultiThreadedScoreLockOpaque LDKnativeMultiThreadedScoreLock;
struct nativeChannelUsageOpaque;
typedef struct nativeChannelUsageOpaque LDKnativeChannelUsage;
struct nativeFixedPenaltyScorerOpaque;
@ -88,10 +76,6 @@ struct nativeChannelFeaturesOpaque;
typedef struct nativeChannelFeaturesOpaque LDKnativeChannelFeatures;
struct nativeInvoiceFeaturesOpaque;
typedef struct nativeInvoiceFeaturesOpaque LDKnativeInvoiceFeatures;
struct nativeOfferFeaturesOpaque;
typedef struct nativeOfferFeaturesOpaque LDKnativeOfferFeatures;
struct nativeInvoiceRequestFeaturesOpaque;
typedef struct nativeInvoiceRequestFeaturesOpaque LDKnativeInvoiceRequestFeatures;
struct nativeChannelTypeFeaturesOpaque;
typedef struct nativeChannelTypeFeaturesOpaque LDKnativeChannelTypeFeatures;
struct nativeNodeIdOpaque;
@ -155,32 +139,10 @@ struct nativeBigSizeOpaque;
typedef struct nativeBigSizeOpaque LDKnativeBigSize;
struct nativeHostnameOpaque;
typedef struct nativeHostnameOpaque LDKnativeHostname;
struct nativePrintableStringOpaque;
typedef struct nativePrintableStringOpaque LDKnativePrintableString;
struct nativeOutPointOpaque;
typedef struct nativeOutPointOpaque LDKnativeOutPoint;
struct nativeInvoicePayerOpaque;
typedef struct nativeInvoicePayerOpaque LDKnativeInvoicePayer;
struct nativeChannelMonitorUpdateOpaque;
typedef struct nativeChannelMonitorUpdateOpaque LDKnativeChannelMonitorUpdate;
struct nativeHTLCUpdateOpaque;
typedef struct nativeHTLCUpdateOpaque LDKnativeHTLCUpdate;
struct nativeChannelMonitorOpaque;
typedef struct nativeChannelMonitorOpaque LDKnativeChannelMonitor;
struct nativeExpandedKeyOpaque;
typedef struct nativeExpandedKeyOpaque LDKnativeExpandedKey;
struct nativeIgnoringMessageHandlerOpaque;
typedef struct nativeIgnoringMessageHandlerOpaque LDKnativeIgnoringMessageHandler;
struct nativeErroringMessageHandlerOpaque;
typedef struct nativeErroringMessageHandlerOpaque LDKnativeErroringMessageHandler;
struct nativeMessageHandlerOpaque;
typedef struct nativeMessageHandlerOpaque LDKnativeMessageHandler;
struct nativePeerHandleErrorOpaque;
typedef struct nativePeerHandleErrorOpaque LDKnativePeerHandleError;
struct nativePeerManagerOpaque;
typedef struct nativePeerManagerOpaque LDKnativePeerManager;
struct nativeOnionMessengerOpaque;
typedef struct nativeOnionMessengerOpaque LDKnativeOnionMessenger;
struct nativeInvoiceOpaque;
typedef struct nativeInvoiceOpaque LDKnativeInvoice;
struct nativeSignedRawInvoiceOpaque;
@ -205,8 +167,28 @@ struct nativeInvoiceSignatureOpaque;
typedef struct nativeInvoiceSignatureOpaque LDKnativeInvoiceSignature;
struct nativePrivateRouteOpaque;
typedef struct nativePrivateRouteOpaque LDKnativePrivateRoute;
struct nativeChannelMonitorUpdateOpaque;
typedef struct nativeChannelMonitorUpdateOpaque LDKnativeChannelMonitorUpdate;
struct nativeHTLCUpdateOpaque;
typedef struct nativeHTLCUpdateOpaque LDKnativeHTLCUpdate;
struct nativeChannelMonitorOpaque;
typedef struct nativeChannelMonitorOpaque LDKnativeChannelMonitor;
struct nativeExpandedKeyOpaque;
typedef struct nativeExpandedKeyOpaque LDKnativeExpandedKey;
struct nativeIgnoringMessageHandlerOpaque;
typedef struct nativeIgnoringMessageHandlerOpaque LDKnativeIgnoringMessageHandler;
struct nativeErroringMessageHandlerOpaque;
typedef struct nativeErroringMessageHandlerOpaque LDKnativeErroringMessageHandler;
struct nativeMessageHandlerOpaque;
typedef struct nativeMessageHandlerOpaque LDKnativeMessageHandler;
struct nativePeerHandleErrorOpaque;
typedef struct nativePeerHandleErrorOpaque LDKnativePeerHandleError;
struct nativePeerManagerOpaque;
typedef struct nativePeerManagerOpaque LDKnativePeerManager;
struct nativeRapidGossipSyncOpaque;
typedef struct nativeRapidGossipSyncOpaque LDKnativeRapidGossipSync;
struct nativeDecodeErrorOpaque;
typedef struct nativeDecodeErrorOpaque LDKnativeDecodeError;
struct nativeInitOpaque;
typedef struct nativeInitOpaque LDKnativeInit;
struct nativeErrorMessageOpaque;
@ -235,8 +217,6 @@ struct nativeClosingSignedOpaque;
typedef struct nativeClosingSignedOpaque LDKnativeClosingSigned;
struct nativeUpdateAddHTLCOpaque;
typedef struct nativeUpdateAddHTLCOpaque LDKnativeUpdateAddHTLC;
struct nativeOnionMessageOpaque;
typedef struct nativeOnionMessageOpaque LDKnativeOnionMessage;
struct nativeUpdateFulfillHTLCOpaque;
typedef struct nativeUpdateFulfillHTLCOpaque LDKnativeUpdateFulfillHTLC;
struct nativeUpdateFailHTLCOpaque;
@ -281,10 +261,10 @@ struct nativeLightningErrorOpaque;
typedef struct nativeLightningErrorOpaque LDKnativeLightningError;
struct nativeCommitmentUpdateOpaque;
typedef struct nativeCommitmentUpdateOpaque LDKnativeCommitmentUpdate;
struct nativeDefaultRouterOpaque;
typedef struct nativeDefaultRouterOpaque LDKnativeDefaultRouter;
struct nativeRecordOpaque;
typedef struct nativeRecordOpaque LDKnativeRecord;
struct nativeFutureOpaque;
typedef struct nativeFutureOpaque LDKnativeFuture;
struct nativeMonitorUpdateIdOpaque;
typedef struct nativeMonitorUpdateIdOpaque LDKnativeMonitorUpdateId;
struct nativeLockedChannelMonitorOpaque;

View File

@ -8,8 +8,8 @@ static inline int _ldk_strncmp(const char *s1, const char *s2, uint64_t n) {
return 0;
}
#define _LDK_HEADER_VER "v0.0.113-16-gea4020c655cd8978"
#define _LDK_C_BINDINGS_HEADER_VER "v0.0.113.0"
#define _LDK_HEADER_VER "v0.0.110-12-g6343277cddee74ed"
#define _LDK_C_BINDINGS_HEADER_VER "v0.0.110.1"
static inline const char* check_get_ldk_version() {
LDKStr bin_ver = _ldk_get_compiled_version();
if (_ldk_strncmp(_LDK_HEADER_VER, (const char*)bin_ver.chars, bin_ver.len) != 0) {

View File

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>21G320</string>
<string>21G72</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>

View File

@ -6,7 +6,7 @@
<dict>
<key>Resources/Info.plist</key>
<data>
u5vlTasgk30uWol0Mu/xKD9n32I=
NxzDPlxEc6MmaK2IoYOheuXNJU4=
</data>
</dict>
<key>files2</key>
@ -36,105 +36,105 @@
<dict>
<key>hash2</key>
<data>
5JIef1C/aH8I3ElK7tNjiyx9aPOggdASNQ9vc4NuJA8=
1ohc/at68l4DpZdz+I+qRP3g/iccDRW/Tuis1HH4J+k=
</data>
</dict>
<key>Headers/ldk_ver.h</key>
<dict>
<key>hash2</key>
<data>
NpesGpwRvUnhkXmoPcFII9reYLOBL7eTdYVGH4ElVG8=
+xArDSjD8/9y7MRscOHSmhmMnWaZCVAvq4ONiqZ2w68=
</data>
</dict>
<key>Headers/lightning.h</key>
<dict>
<key>hash2</key>
<data>
yDlZN9O3rMPOPwDIq/O6aNgdEd1HLwPDKqjR2hMOUPE=
7upflvcaaRFVMatTdzoC4ggQW4iGl7wlEaQkFbhFI58=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/arm64-apple-macos.swiftdoc</key>
<dict>
<key>hash2</key>
<data>
PGPdAPnu/lYdnHAzFJ6SXslav0xGLL3sDnnrgoRFkPg=
0CghYts/M2zhZktvRj2XDJMwkOuCC21TmyZxopPca+g=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/arm64-apple-macos.swiftinterface</key>
<dict>
<key>hash2</key>
<data>
GYJkzUExwhf9ZPbhLIlBReDEKmtOgyZ4KOmG9903rH0=
nv1ogFh/SPxunCs7CLY7h8mWUSg4eEYH30QvDDfxed0=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/arm64-apple-macos.swiftmodule</key>
<dict>
<key>hash2</key>
<data>
eiyrHgiDS/Xn388SWkSjWAjWF1RhWL5h7EsbmlYbj+M=
zv1Tg+NcM3zqVxE538z1BdxEmMKDz2S8yXR04Ka2jpM=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/arm64.swiftdoc</key>
<dict>
<key>hash2</key>
<data>
PGPdAPnu/lYdnHAzFJ6SXslav0xGLL3sDnnrgoRFkPg=
0CghYts/M2zhZktvRj2XDJMwkOuCC21TmyZxopPca+g=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/arm64.swiftinterface</key>
<dict>
<key>hash2</key>
<data>
GYJkzUExwhf9ZPbhLIlBReDEKmtOgyZ4KOmG9903rH0=
nv1ogFh/SPxunCs7CLY7h8mWUSg4eEYH30QvDDfxed0=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/arm64.swiftmodule</key>
<dict>
<key>hash2</key>
<data>
eiyrHgiDS/Xn388SWkSjWAjWF1RhWL5h7EsbmlYbj+M=
zv1Tg+NcM3zqVxE538z1BdxEmMKDz2S8yXR04Ka2jpM=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/x86_64-apple-macos.swiftdoc</key>
<dict>
<key>hash2</key>
<data>
50fxs0Y4irmnextxDzP5aI6h0vJRWrSZUhc5+MqHsHk=
VwDy+8iFtc/uzMYNhOBo2WsEQCSp1d7hPRDC1wtziOM=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/x86_64-apple-macos.swiftinterface</key>
<dict>
<key>hash2</key>
<data>
WznLrc5X4ZixL1ht84vvSnpAYywkQWLxniJiAHSCqJQ=
C3bLvYayOrOplJIC7JmdiCa/o6KxSfAw3Edurk1KTlA=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/x86_64-apple-macos.swiftmodule</key>
<dict>
<key>hash2</key>
<data>
YUqrx9QqsZpRBcSAFSDx4ddfIpFALZwZQHC0i7rTZjg=
IeKJJ2bRHxUW1h837DgcS+Tok9OepSJNRRSINl6D72Q=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/x86_64.swiftdoc</key>
<dict>
<key>hash2</key>
<data>
50fxs0Y4irmnextxDzP5aI6h0vJRWrSZUhc5+MqHsHk=
VwDy+8iFtc/uzMYNhOBo2WsEQCSp1d7hPRDC1wtziOM=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/x86_64.swiftinterface</key>
<dict>
<key>hash2</key>
<data>
WznLrc5X4ZixL1ht84vvSnpAYywkQWLxniJiAHSCqJQ=
C3bLvYayOrOplJIC7JmdiCa/o6KxSfAw3Edurk1KTlA=
</data>
</dict>
<key>Modules/LightningDevKit.swiftmodule/x86_64.swiftmodule</key>
<dict>
<key>hash2</key>
<data>
YUqrx9QqsZpRBcSAFSDx4ddfIpFALZwZQHC0i7rTZjg=
IeKJJ2bRHxUW1h837DgcS+Tok9OepSJNRRSINl6D72Q=
</data>
</dict>
<key>Modules/module.modulemap</key>
@ -148,7 +148,7 @@
<dict>
<key>hash2</key>
<data>
1KOp+eyXp/gHxvh8Q/OvIQnC08iTkDr9hjUjVcdU2uc=
KnINQ0fOPB3LRJjbhVqWtI9qHQLomSN9UdNlk1fHgQg=
</data>
</dict>
</dict>

View File

@ -1,20 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleIdentifier</key>
<string>com.apple.xcode.dsym.org.ldk.LDKFramework</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>dSYM</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<key>CFBundleVersion</key>
<string>1</string>
</dict>
</plist>

View File

@ -747,7 +747,6 @@ class RnLdk: NSObject {
channelObject += "\"is_usable\":" + (it.get_is_usable() ? "true" : "false") + ","
channelObject += "\"is_outbound\":" + (it.get_is_outbound() ? "true" : "false") + ","
channelObject += "\"is_public\":" + (it.get_is_public() ? "true" : "false") + ","
channelObject += "\"is_channel_ready\":" + (it.get_is_channel_ready() ? "true" : "false") + ","
channelObject += "\"remote_node_id\":" + "\"" + bytesToHex(bytes: it.get_counterparty().get_node_id()) + "\"," // @deprecated fixme
// fixme:

View File

@ -40,13 +40,13 @@ interface PaymentSentMsg {
const MARKER_PAYMENT_FAILED = 'payment_failed';
interface PaymentFailedMsg {
payment_failed_permanently: boolean;
rejected_by_dest: boolean;
payment_hash: string;
}
const MARKER_PAYMENT_PATH_FAILED = 'payment_path_failed';
interface PaymentPathFailedMsg {
payment_failed_permanently: boolean;
rejected_by_dest: boolean;
payment_hash: string;
}
@ -81,27 +81,6 @@ interface ChannelClosedMsg {
text?: string;
}
export interface ChannelDetails {
channel_id: string;
channel_value_satoshis: number;
inbound_capacity_msat: number;
outbound_capacity_msat: number;
short_channel_id: string;
is_usable: boolean;
is_outbound: boolean;
is_public: boolean;
is_channel_ready: boolean;
remote_node_id: string;
funding_txo_txid?: string;
funding_txo_index?: number;
counterparty_unspendable_punishment_reserve: number;
counterparty_node_id: string;
unspendable_punishment_reserve: number;
confirmations_required: number;
force_close_spend_delay: number;
user_id: number;
}
class RnLdkImplementation {
static CHANNEL_MANAGER_PREFIX = 'channel_manager';
static CHANNEL_PREFIX = 'channel_monitor_';
@ -462,6 +441,8 @@ class RnLdkImplementation {
*
* @param txhex
* @param counterpartyNodeIdHex
*
* @returns boolean Success or not
*/
async openChannelStep2(txhex: string, counterpartyNodeIdHex: string) {
if (!this.started) throw new Error('LDK not yet started');
@ -494,7 +475,7 @@ class RnLdkImplementation {
/**
* @returns Array<{}>
*/
async listUsableChannels(): Promise<ChannelDetails[]> {
async listUsableChannels() {
if (!this.started) throw new Error('LDK not yet started');
this.logToGeneralLog('listing usable channels');
const str = await RnLdkNative.listUsableChannels();
@ -504,18 +485,18 @@ class RnLdkImplementation {
/**
* @returns Array<{}>
*/
async listChannels(): Promise<ChannelDetails[]> {
async listChannels() {
if (!this.started) throw new Error('LDK not yet started');
this.logToGeneralLog('listing channels');
const str = await RnLdkNative.listChannels();
return JSON.parse(str);
}
async getMaturingBalance(): Promise<number> {
async getMaturingBalance() {
return RnLdkNative.getMaturingBalance();
}
async getMaturingHeight(): Promise<number> {
async getMaturingHeight() {
return RnLdkNative.getMaturingHeight();
}
@ -737,12 +718,12 @@ class RnLdkImplementation {
*
* @returns string[]
*/
async getAllKeys(): Promise<string[]> {
async getAllKeys() {
if (!this.storage) throw new Error('No storage');
return this.storage.getAllKeys();
}
async addInvoice(amtMsat: number, description: string = ''): Promise<string> {
async addInvoice(amtMsat: number, description: string = '') {
if (!this.started) throw new Error('LDK not yet started');
this.logToGeneralLog(`adding invoice for ${amtMsat} msat, decription=${description}`);
return RnLdkNative.addInvoice(amtMsat, description);
@ -798,7 +779,7 @@ class RnLdkImplementation {
if (!payment_secret) throw new Error('No payment_secret');
for (const channel of usableChannels) {
if (channel.outbound_capacity_msat >= parseInt(decoded.millisatoshis, 10)) {
if (parseInt(channel.outbound_capacity_msat, 10) >= parseInt(decoded.millisatoshis, 10)) {
if (channel.remote_node_id === decoded.payeeNodeKey) {
// we are paying to our direct neighbor
return RnLdkNative.sendPayment(decoded.payeeNodeKey, payment_hash, payment_secret, channel.short_channel_id, parseInt(decoded.millisatoshis, 10), min_final_cltv_expiry, '');
@ -899,7 +880,7 @@ class RnLdkImplementation {
return true;
}
getLogs(): LogMsg[] {
getLogs() {
return this.logs;
}

View File

@ -1,65 +1,51 @@
function sum(arr: number[]) {
let ret = 0;
for (const num of arr) ret += num;
return ret;
function sum(arr: number[]): number {
// Function to calculate the sum of an array of numbers
return arr.reduce((acc, val) => acc + val, 0);
}
class Util {
static lndRoutetoLdkRoute(lndRoute: any, hopFees: any, firstChanId: string, minFinalCLTVExpiryFromTheInvoice: number) {
const ret = [];
let firstIteration = true;
let fees: number[] = []; // aggregating fees of LND hops
static lndRoutetoLdkRoute(
lndRoute: any,
hopFees: any,
firstChanId: string,
minFinalCLTVExpiryFromTheInvoice: number
): any[] { // Adjust the return type accordingly
const craftedRoute: any[] = [];
const fees: number[] = [];
// iterating hops provided by LND's queryroutes
for (let c = lndRoute.routes[0].hops.length - 1; c >= 0; c--) {
let hop: any = {};
const lndHop = lndRoute.routes[0].hops[c];
const hop: any = {};
if (firstIteration) {
// last hop is a bit special
hop.cltv_expiry_delta = minFinalCLTVExpiryFromTheInvoice; //lndRoute.routes[0].total_time_lock - currentblockHeight;
hop.fee_msat = parseInt(lndRoute.routes[0].hops[c].amt_to_forward_msat, 10);
// Setting up cltv_expiry_delta and fee_msat based on the hop
if (c === lndRoute.routes[0].hops.length - 1) {
hop.cltv_expiry_delta = minFinalCLTVExpiryFromTheInvoice;
hop.fee_msat = parseInt(lndHop.amt_to_forward_msat, 10);
} else {
hop.fee_msat = parseInt(lndRoute.routes[0].hops[c].fee_msat, 10);
if (c > 0 && c < lndRoute.routes[0].hops.length - 1) {
// intermediate hops have expiry as a difference between neighbor hops
hop.cltv_expiry_delta = lndRoute.routes[0].hops[c - 1].expiry - lndRoute.routes[0].hops[c].expiry;
} else {
hop.cltv_expiry_delta = 666; // lndRoute.routes[0].total_time_lock - lndHop.expiry;
}
if (c === 0) {
hop.cltv_expiry_delta = lndRoute.routes[0].total_time_lock - lndRoute.routes[0].hops[0].expiry;
}
hop.fee_msat = parseInt(lndHop.fee_msat, 10);
hop.cltv_expiry_delta = c > 0 ? lndRoute.routes[0].hops[c - 1].expiry - lndHop.expiry : 666;
if (c === 0) hop.cltv_expiry_delta = lndRoute.routes[0].total_time_lock - lndHop.expiry;
}
hop.short_channel_id = lndHop.chan_id;
hop.pubkey = lndHop.pub_key;
fees.push(hop.fee_msat);
firstIteration = false;
ret.push(hop);
craftedRoute.push(hop);
}
// now, crafting the very first hop out of provided chaninfo
// Crafting the very first hop
const firstCraftedHop: any = {};
const nodePolicy = lndRoute.routes[0].hops[0].pub_key === hopFees.node2_pub ? hopFees.node1_policy : hopFees.node2_policy;
let nodePolicy;
let nodePubkey;
if (lndRoute.routes[0].hops[0].pub_key === hopFees.node2_pub) {
nodePolicy = hopFees.node1_policy;
nodePubkey = hopFees.node1_pub;
} else {
nodePolicy = hopFees.node2_policy;
nodePubkey = hopFees.node2_pub;
}
firstCraftedHop.pubkey = nodePubkey;
firstCraftedHop.pubkey = lndRoute.routes[0].hops[0].pub_key === hopFees.node2_pub ? hopFees.node1_pub : hopFees.node2_pub;
firstCraftedHop.short_channel_id = firstChanId;
firstCraftedHop.fee_msat = Math.floor((sum(fees) * parseInt(nodePolicy.fee_rate_milli_msat, 10)) / 1000000) + parseInt(nodePolicy.fee_base_msat, 10);
firstCraftedHop.cltv_expiry_delta = nodePolicy.time_lock_delta;
ret.push(firstCraftedHop);
return ret.reverse();
craftedRoute.push(firstCraftedHop);
return craftedRoute.reverse();
}
}