Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a133f84336 | ||
|
|
2900738a1c | ||
|
|
dcc2429ff6 | ||
|
|
fe4445c980 | ||
|
|
e67ce32602 | ||
|
|
6866ef613c | ||
|
|
e0f9e23950 | ||
|
|
e2edc84bc3 |
@ -2,3 +2,4 @@ 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.
@ -6,6 +6,7 @@ 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
|
||||
@ -15,6 +16,7 @@ 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
|
||||
@ -50,6 +52,7 @@ 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 = "";
|
||||
@ -87,7 +90,7 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
|
||||
|
||||
// INITIALIZE THE LOGGER #######################################################################
|
||||
// What it's used for: LDK logging
|
||||
val logger = Logger.new_impl { arg: Record ->
|
||||
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;
|
||||
@ -109,24 +112,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): Result_NoneChannelMonitorUpdateErrZ {
|
||||
override fun persist_new_channel(id: OutPoint, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus {
|
||||
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 Result_NoneChannelMonitorUpdateErrZ.ok();
|
||||
return ChannelMonitorUpdateStatus.LDKChannelMonitorUpdateStatus_Completed;
|
||||
}
|
||||
|
||||
override fun update_persisted_channel(id: OutPoint, update: ChannelMonitorUpdate?, data: ChannelMonitor, update_id: MonitorUpdateId): Result_NoneChannelMonitorUpdateErrZ {
|
||||
override fun update_persisted_channel(id: OutPoint, update: ChannelMonitorUpdate?, data: ChannelMonitor, update_id: MonitorUpdateId): ChannelMonitorUpdateStatus {
|
||||
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 Result_NoneChannelMonitorUpdateErrZ.ok();
|
||||
return ChannelMonitorUpdateStatus.LDKChannelMonitorUpdateStatus_Completed;
|
||||
}
|
||||
})
|
||||
|
||||
@ -175,7 +178,7 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
|
||||
that.sendEvent(MARKER_REGISTER_TX, params);
|
||||
}
|
||||
|
||||
override fun register_output(output: WatchedOutput): Option_C2Tuple_usizeTransactionZZ {
|
||||
override fun register_output(output: WatchedOutput) {
|
||||
println("ReactNativeLDK: register_output");
|
||||
val params = Arguments.createMap()
|
||||
val blockHash = output._block_hash;
|
||||
@ -185,7 +188,6 @@ 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();
|
||||
}
|
||||
})
|
||||
|
||||
@ -234,12 +236,12 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
|
||||
}
|
||||
// error, creating from scratch
|
||||
println("ReactNativeLDK: network graph error, creating from scratch")
|
||||
router = NetworkGraph.of(hexStringToByteArray("000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f").reversedArray(), logger)
|
||||
router = NetworkGraph.of(Network.LDKNetwork_Bitcoin, logger)
|
||||
}
|
||||
} else {
|
||||
// first run, creating from scratch
|
||||
println("ReactNativeLDK: network graph first run, creating from scratch")
|
||||
router = NetworkGraph.of(hexStringToByteArray("000000000019d6689c085ae165831e934ff763ae46a2a6c172b3f1b60a8ce26f").reversedArray(), logger)
|
||||
router = NetworkGraph.of(Network.LDKNetwork_Bitcoin, logger)
|
||||
}
|
||||
|
||||
|
||||
@ -291,17 +293,20 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
|
||||
hexStringToByteArray(serializedChannelManagerHex),
|
||||
channelMonitors,
|
||||
uc,
|
||||
keys_manager?.as_KeysInterface(),
|
||||
keys_manager,
|
||||
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);
|
||||
channel_manager_constructor!!.chain_sync_completed(channel_manager_persister, scorer !== null);
|
||||
peer_manager = channel_manager_constructor!!.peer_manager;
|
||||
nio_peer_handler = channel_manager_constructor!!.nio_peer_handler;
|
||||
} else {
|
||||
@ -311,16 +316,18 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
|
||||
uc,
|
||||
hexStringToByteArray(blockchainTipHashHex),
|
||||
blockchainTipHeight,
|
||||
keys_manager?.as_KeysInterface(),
|
||||
keys_manager,
|
||||
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);
|
||||
channel_manager_constructor!!.chain_sync_completed(channel_manager_persister, scorer !== null);
|
||||
peer_manager = channel_manager_constructor!!.peer_manager;
|
||||
nio_peer_handler = channel_manager_constructor!!.nio_peer_handler;
|
||||
}
|
||||
@ -367,12 +374,12 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
|
||||
channel_manager?.as_Confirm()?._relevant_txids?.iterator()?.forEach {
|
||||
if (!first) json += ",";
|
||||
first = false;
|
||||
json += "\"" + byteArrayToHex(it.reversedArray()) + "\"";
|
||||
json += "\"" + byteArrayToHex(it._a.reversedArray()) + "\"";
|
||||
}
|
||||
chain_monitor?.as_Confirm()?._relevant_txids?.iterator()?.forEach {
|
||||
if (!first) json += ",";
|
||||
first = false;
|
||||
json += "\"" + byteArrayToHex(it.reversedArray()) + "\"";
|
||||
json += "\"" + byteArrayToHex(it._a.reversedArray()) + "\"";
|
||||
}
|
||||
json += "]";
|
||||
promise.resolve(json);
|
||||
@ -400,7 +407,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), false);
|
||||
peer_manager?.disconnect_by_node_id(hexStringToByteArray(pubkeyHex));
|
||||
promise.resolve(true);
|
||||
} catch (e: IOException) {
|
||||
promise.reject("disconnect_by_node_id exception: " + e.message);
|
||||
@ -422,9 +429,9 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
|
||||
var path = arrayOf(
|
||||
RouteHop.of(
|
||||
hexStringToByteArray(destPubkeyHex),
|
||||
NodeFeatures.known(),
|
||||
NodeFeatures.empty(),
|
||||
shortChannelId.toLong(),
|
||||
ChannelFeatures.known(),
|
||||
ChannelFeatures.empty(),
|
||||
paymentValueMsat.toLong(),
|
||||
finalCltvValue
|
||||
)
|
||||
@ -440,9 +447,9 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
|
||||
path = path.plusElement(
|
||||
RouteHop.of(
|
||||
hexStringToByteArray(hopJson.getString("pubkey")),
|
||||
NodeFeatures.known(),
|
||||
NodeFeatures.empty(),
|
||||
hopJson.getString("short_channel_id").toLong(),
|
||||
ChannelFeatures.known(),
|
||||
ChannelFeatures.empty(),
|
||||
hopJson.getString("fee_msat").toLong(),
|
||||
hopJson.getString("cltv_expiry_delta").toInt()
|
||||
)
|
||||
@ -451,7 +458,7 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
|
||||
}
|
||||
|
||||
|
||||
val payee = PaymentParameters.from_node_id(hexStringToByteArray(destPubkeyHex));
|
||||
val payee = PaymentParameters.from_node_id(hexStringToByteArray(destPubkeyHex), finalCltvValue);
|
||||
val route = Route.of(
|
||||
arrayOf(
|
||||
path
|
||||
@ -461,8 +468,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);
|
||||
if (payment_res is Result_PaymentIdPaymentSendFailureZ.Result_PaymentIdPaymentSendFailureZ_OK) {
|
||||
val payment_res = channel_manager?.send_payment(route, payment_hash, payment_secret, payment_hash);
|
||||
if (payment_res is Result_NonePaymentSendFailureZ.Result_NonePaymentSendFailureZ_OK) {
|
||||
promise.resolve(true);
|
||||
} else {
|
||||
promise.reject("sendPayment failed");
|
||||
@ -471,8 +478,6 @@ 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)
|
||||
@ -482,9 +487,9 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
|
||||
}
|
||||
|
||||
val sendRes = if (amtSat != 0) {
|
||||
channel_manager_constructor!!.payer!!.pay_zero_value_invoice(parsedInvoice.res, amtSat.toLong() * 1000)
|
||||
UtilMethods.pay_zero_value_invoice(parsedInvoice.res, amtSat.toLong() * 1000, Retry.timeout(6), channel_manager)
|
||||
} else {
|
||||
channel_manager_constructor!!.payer!!.pay_invoice(parsedInvoice.res)
|
||||
UtilMethods.pay_invoice(parsedInvoice.res, org.ldk.structs.Retry.timeout(6), channel_manager);
|
||||
}
|
||||
|
||||
if (sendRes !is Result_PaymentIdPaymentErrorZ.Result_PaymentIdPaymentErrorZ_OK) {
|
||||
@ -503,11 +508,13 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
|
||||
|
||||
val invoice = UtilMethods.create_invoice_from_channelmanager(
|
||||
channel_manager,
|
||||
keys_manager?.as_KeysInterface(),
|
||||
keys_manager?.as_NodeSigner(),
|
||||
logger,
|
||||
Currency.LDKCurrency_Bitcoin,
|
||||
amountStruct,
|
||||
description,
|
||||
24 * 3600
|
||||
24 * 3600,
|
||||
org.ldk.structs.Option_u16Z.none()
|
||||
);
|
||||
|
||||
if (invoice is Result_InvoiceSignOrCreationErrorZ.Result_InvoiceSignOrCreationErrorZ_OK) {
|
||||
@ -524,7 +531,13 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
|
||||
promise.reject("no peer manager inited");
|
||||
return;
|
||||
}
|
||||
val peer_node_ids: Array<ByteArray> = peer_manager!!.get_peer_node_ids()
|
||||
|
||||
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
|
||||
var json: String = "[";
|
||||
var first = true;
|
||||
peer_node_ids.iterator().forEach {
|
||||
@ -563,7 +576,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 (channel_manager_constructor?.payer == null) {
|
||||
if (router === 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
|
||||
@ -571,7 +584,7 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
|
||||
}
|
||||
val params = Arguments.createMap();
|
||||
params.putString("payment_hash", byteArrayToHex(event.payment_hash));
|
||||
params.putString("rejected_by_dest", event.rejected_by_dest.toString());
|
||||
params.putString("payment_failed_permanently", event.payment_failed_permanently.toString());
|
||||
this.sendEvent(MARKER_PAYMENT_PATH_FAILED, params);
|
||||
}
|
||||
|
||||
@ -583,8 +596,8 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
|
||||
this.sendEvent(MARKER_PAYMENT_FAILED, params);
|
||||
}
|
||||
|
||||
if (event is Event.PaymentReceived) {
|
||||
println("ReactNativeLDK: " + "payment received, payment_hash: " + byteArrayToHex(event.payment_hash));
|
||||
if (event is Event.PaymentClaimable) {
|
||||
println("ReactNativeLDK: " + "payment claimable, payment_hash: " + byteArrayToHex(event.payment_hash));
|
||||
var paymentPreimage: ByteArray? = null;
|
||||
|
||||
if (event.purpose is PaymentPurpose.InvoicePayment) {
|
||||
@ -621,6 +634,7 @@ 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;
|
||||
|
||||
@ -717,7 +731,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, 42, null
|
||||
peer_node_pubkey, channelValue.toLong(), 0, UInt128(42), null
|
||||
);
|
||||
|
||||
if (create_channel_result !is Result__u832APIErrorZ.Result__u832APIErrorZ_OK) {
|
||||
@ -828,6 +842,7 @@ 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) {
|
||||
@ -893,8 +908,16 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
|
||||
println("ReactNativeLDK: ContentiousClaimable = " + it.claimable_amount_satoshis + " " + it.timeout_height);
|
||||
}
|
||||
|
||||
if (it is Balance.MaybeClaimableHTLCAwaitingTimeout) {
|
||||
println("ReactNativeLDK: MaybeClaimableHTLCAwaitingTimeout = " + it.claimable_amount_satoshis + " " + it.claimable_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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -926,8 +949,8 @@ class RnLdkModule(private val reactContext: ReactApplicationContext) : ReactCont
|
||||
}
|
||||
}
|
||||
|
||||
if (it is Balance.MaybeClaimableHTLCAwaitingTimeout) {
|
||||
println("ReactNativeLDK: MaybeClaimableHTLCAwaitingTimeout = " + it.claimable_amount_satoshis + " " + it.claimable_height);
|
||||
if (it is Balance.MaybeTimeoutClaimableHTLC) {
|
||||
println("ReactNativeLDK: MaybeTimeoutClaimableHTLC = " + it.claimable_amount_satoshis + " " + it.claimable_height);
|
||||
maxHeight = when (it.claimable_height > maxHeight) {
|
||||
true -> it.claimable_height
|
||||
false -> maxHeight
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
android:label="@string/app_name"
|
||||
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|uiMode"
|
||||
android:launchMode="singleTask"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
android:windowSoftInputMode="adjustResize" android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
||||
@ -4,7 +4,7 @@ buildscript {
|
||||
ext {
|
||||
buildToolsVersion = "30.0.2"
|
||||
minSdkVersion = 24
|
||||
compileSdkVersion = 30
|
||||
compileSdkVersion = 31
|
||||
targetSdkVersion = 30
|
||||
}
|
||||
repositories {
|
||||
@ -13,7 +13,6 @@ 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
|
||||
}
|
||||
@ -21,6 +20,21 @@ 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
|
||||
|
||||
@ -20,3 +20,4 @@
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
||||
FLIPPER_VERSION=0.54.0
|
||||
org.gradle.jvmargs=-Xmx4096M
|
||||
|
||||
@ -5,19 +5,8 @@
|
||||
<key>AvailableLibraries</key>
|
||||
<array>
|
||||
<dict>
|
||||
<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</string>
|
||||
<key>LibraryPath</key>
|
||||
@ -30,6 +19,8 @@
|
||||
<string>ios</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>DebugSymbolsPath</key>
|
||||
<string>dSYMs</string>
|
||||
<key>LibraryIdentifier</key>
|
||||
<string>ios-arm64_x86_64-simulator</string>
|
||||
<key>LibraryPath</key>
|
||||
@ -45,6 +36,23 @@
|
||||
<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>
|
||||
|
||||
@ -40,8 +40,18 @@ 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;
|
||||
@ -60,6 +70,8 @@ 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;
|
||||
@ -76,6 +88,10 @@ 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;
|
||||
@ -139,10 +155,32 @@ 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;
|
||||
@ -167,28 +205,8 @@ 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;
|
||||
@ -217,6 +235,8 @@ 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;
|
||||
@ -261,10 +281,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;
|
||||
|
||||
@ -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.110-12-g6343277cddee74ed"
|
||||
#define _LDK_C_BINDINGS_HEADER_VER "v0.0.110.1"
|
||||
#define _LDK_HEADER_VER "v0.0.113-16-gea4020c655cd8978"
|
||||
#define _LDK_C_BINDINGS_HEADER_VER "v0.0.113.0"
|
||||
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) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,20 @@
|
||||
<?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>
|
||||
Binary file not shown.
@ -40,8 +40,18 @@ 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;
|
||||
@ -60,6 +70,8 @@ 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;
|
||||
@ -76,6 +88,10 @@ 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;
|
||||
@ -139,10 +155,32 @@ 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;
|
||||
@ -167,28 +205,8 @@ 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;
|
||||
@ -217,6 +235,8 @@ 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;
|
||||
@ -261,10 +281,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;
|
||||
|
||||
@ -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.110-12-g6343277cddee74ed"
|
||||
#define _LDK_C_BINDINGS_HEADER_VER "v0.0.110.1"
|
||||
#define _LDK_HEADER_VER "v0.0.113-16-gea4020c655cd8978"
|
||||
#define _LDK_C_BINDINGS_HEADER_VER "v0.0.113.0"
|
||||
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) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>21G72</string>
|
||||
<string>21G320</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
<?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>
|
||||
Binary file not shown.
@ -40,8 +40,18 @@ 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;
|
||||
@ -60,6 +70,8 @@ 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;
|
||||
@ -76,6 +88,10 @@ 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;
|
||||
@ -139,10 +155,32 @@ 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;
|
||||
@ -167,28 +205,8 @@ 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;
|
||||
@ -217,6 +235,8 @@ 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;
|
||||
@ -261,10 +281,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;
|
||||
|
||||
@ -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.110-12-g6343277cddee74ed"
|
||||
#define _LDK_C_BINDINGS_HEADER_VER "v0.0.110.1"
|
||||
#define _LDK_HEADER_VER "v0.0.113-16-gea4020c655cd8978"
|
||||
#define _LDK_C_BINDINGS_HEADER_VER "v0.0.113.0"
|
||||
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) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -18,67 +18,67 @@
|
||||
</data>
|
||||
<key>Headers/ldk_rust_types.h</key>
|
||||
<data>
|
||||
DdJqlv1turyDNasVeYdzNWdK8YM=
|
||||
PNEYjI76XLBjOEdzeviUkTwl1pU=
|
||||
</data>
|
||||
<key>Headers/ldk_ver.h</key>
|
||||
<data>
|
||||
VDtMA5Amt/kJ1UHgW/0OFj0Drb0=
|
||||
PZKcLDtykPP6ReuSXEeU2tE1lQ0=
|
||||
</data>
|
||||
<key>Headers/lightning.h</key>
|
||||
<data>
|
||||
ZBQAyAc/D49YeUjBqE3JqyIMNj4=
|
||||
4okv264Z4MMqSWFmiUMcu4VTY40=
|
||||
</data>
|
||||
<key>Info.plist</key>
|
||||
<data>
|
||||
5y189aeoLe7WAJlGZY1M/isoJ4Y=
|
||||
TAAWpx/bTMcKJ08BqGFerwm4mPk=
|
||||
</data>
|
||||
<key>Modules/LightningDevKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
||||
<data>
|
||||
ndayoHwMQFpgYerp1/FeGJlj2M8=
|
||||
++jRtyu+dQ+WfZjn2qqjHBPQHus=
|
||||
</data>
|
||||
<key>Modules/LightningDevKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
||||
<data>
|
||||
v6t66DDgkdimzf7IpvvM9Giy9yw=
|
||||
mynn9KzF+OILq8IcWcAMbtFnP3o=
|
||||
</data>
|
||||
<key>Modules/LightningDevKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
||||
<data>
|
||||
UOfNj6JjDof5k/9ui5hvoxwMv9g=
|
||||
V9xW5D2Br4+CSWe5HqoomMtrdzo=
|
||||
</data>
|
||||
<key>Modules/LightningDevKit.swiftmodule/arm64.swiftdoc</key>
|
||||
<data>
|
||||
ndayoHwMQFpgYerp1/FeGJlj2M8=
|
||||
++jRtyu+dQ+WfZjn2qqjHBPQHus=
|
||||
</data>
|
||||
<key>Modules/LightningDevKit.swiftmodule/arm64.swiftinterface</key>
|
||||
<data>
|
||||
v6t66DDgkdimzf7IpvvM9Giy9yw=
|
||||
mynn9KzF+OILq8IcWcAMbtFnP3o=
|
||||
</data>
|
||||
<key>Modules/LightningDevKit.swiftmodule/arm64.swiftmodule</key>
|
||||
<data>
|
||||
UOfNj6JjDof5k/9ui5hvoxwMv9g=
|
||||
V9xW5D2Br4+CSWe5HqoomMtrdzo=
|
||||
</data>
|
||||
<key>Modules/LightningDevKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
||||
<data>
|
||||
+H9em8cBZSpWSyXomrmAdiZC3P0=
|
||||
iVE/cS5x/+LS8OPqNqclu7Y42sI=
|
||||
</data>
|
||||
<key>Modules/LightningDevKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
||||
<data>
|
||||
cNt2cTkyZCu37jh8tVR8AzAtdZU=
|
||||
bPgQoHjqh6+9UjbXXjQfL6sIy2E=
|
||||
</data>
|
||||
<key>Modules/LightningDevKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
||||
<data>
|
||||
FxMTTaEQnoHAdZ1FbVy9WLsQZAk=
|
||||
YvabZtm6QG19YGP9tXBjiTy3pGY=
|
||||
</data>
|
||||
<key>Modules/LightningDevKit.swiftmodule/x86_64.swiftdoc</key>
|
||||
<data>
|
||||
+H9em8cBZSpWSyXomrmAdiZC3P0=
|
||||
iVE/cS5x/+LS8OPqNqclu7Y42sI=
|
||||
</data>
|
||||
<key>Modules/LightningDevKit.swiftmodule/x86_64.swiftinterface</key>
|
||||
<data>
|
||||
cNt2cTkyZCu37jh8tVR8AzAtdZU=
|
||||
bPgQoHjqh6+9UjbXXjQfL6sIy2E=
|
||||
</data>
|
||||
<key>Modules/LightningDevKit.swiftmodule/x86_64.swiftmodule</key>
|
||||
<data>
|
||||
FxMTTaEQnoHAdZ1FbVy9WLsQZAk=
|
||||
YvabZtm6QG19YGP9tXBjiTy3pGY=
|
||||
</data>
|
||||
<key>Modules/module.modulemap</key>
|
||||
<data>
|
||||
@ -112,105 +112,105 @@
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
1ohc/at68l4DpZdz+I+qRP3g/iccDRW/Tuis1HH4J+k=
|
||||
5JIef1C/aH8I3ElK7tNjiyx9aPOggdASNQ9vc4NuJA8=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/ldk_ver.h</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
+xArDSjD8/9y7MRscOHSmhmMnWaZCVAvq4ONiqZ2w68=
|
||||
NpesGpwRvUnhkXmoPcFII9reYLOBL7eTdYVGH4ElVG8=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/lightning.h</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
7upflvcaaRFVMatTdzoC4ggQW4iGl7wlEaQkFbhFI58=
|
||||
yDlZN9O3rMPOPwDIq/O6aNgdEd1HLwPDKqjR2hMOUPE=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/arm64-apple-ios-simulator.swiftdoc</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
udXzrWBlIiAzxaL+Z4NW9X3Ih8vZdnmbCgduhKm3cfQ=
|
||||
DBeQm3WjAfMBcIS8hX4WZWpKqhdkGY+dH0DPu0zf9zk=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/arm64-apple-ios-simulator.swiftinterface</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
3bQZszL6sZ27IziIOOWmp0zrJHfDRWmKPZh3KFzlPMw=
|
||||
MsjDTT1CDmuBiXd3DJOOnebESJEwW60QbWYzkKiqhuY=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/arm64-apple-ios-simulator.swiftmodule</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
Qaj0ArKT/074D/lUlZPnvx7i5fou6ehP/a4J/l/O1DM=
|
||||
MgEFvQqHZFuE5Ua1z5To/zUQQKoHCpagyjx53SZBNWg=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/arm64.swiftdoc</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
udXzrWBlIiAzxaL+Z4NW9X3Ih8vZdnmbCgduhKm3cfQ=
|
||||
DBeQm3WjAfMBcIS8hX4WZWpKqhdkGY+dH0DPu0zf9zk=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/arm64.swiftinterface</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
3bQZszL6sZ27IziIOOWmp0zrJHfDRWmKPZh3KFzlPMw=
|
||||
MsjDTT1CDmuBiXd3DJOOnebESJEwW60QbWYzkKiqhuY=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/arm64.swiftmodule</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
Qaj0ArKT/074D/lUlZPnvx7i5fou6ehP/a4J/l/O1DM=
|
||||
MgEFvQqHZFuE5Ua1z5To/zUQQKoHCpagyjx53SZBNWg=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/x86_64-apple-ios-simulator.swiftdoc</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
t1vhDbsQUTYQ7I598S8u9F7l/S8JhxR3R2TXPiXhGxM=
|
||||
nng3gpIh/w5zux3rQKgB7YXayDHYle/TYLE8BOef38w=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/x86_64-apple-ios-simulator.swiftinterface</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
UqMw4ZcB5Vi766FBw3DEhO2zuabWMXQ010rU8+6Vrjk=
|
||||
jHtpPPnQoyoyhxvMsm6Cb0kQ4/lRJjA39iPSfpI83mc=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/x86_64-apple-ios-simulator.swiftmodule</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
u7uY01j6hnoWbHDALYoPxLXlUsi7OWK66swokYchUXU=
|
||||
ENX8q80JiQP/tnoyr+k0DtfmiAt98t06BgJo2oTVWrQ=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/x86_64.swiftdoc</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
t1vhDbsQUTYQ7I598S8u9F7l/S8JhxR3R2TXPiXhGxM=
|
||||
nng3gpIh/w5zux3rQKgB7YXayDHYle/TYLE8BOef38w=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/x86_64.swiftinterface</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
UqMw4ZcB5Vi766FBw3DEhO2zuabWMXQ010rU8+6Vrjk=
|
||||
jHtpPPnQoyoyhxvMsm6Cb0kQ4/lRJjA39iPSfpI83mc=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/x86_64.swiftmodule</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
u7uY01j6hnoWbHDALYoPxLXlUsi7OWK66swokYchUXU=
|
||||
ENX8q80JiQP/tnoyr+k0DtfmiAt98t06BgJo2oTVWrQ=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/module.modulemap</key>
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
<?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>
|
||||
Binary file not shown.
@ -40,8 +40,18 @@ 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;
|
||||
@ -60,6 +70,8 @@ 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;
|
||||
@ -76,6 +88,10 @@ 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;
|
||||
@ -139,10 +155,32 @@ 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;
|
||||
@ -167,28 +205,8 @@ 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;
|
||||
@ -217,6 +235,8 @@ 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;
|
||||
@ -261,10 +281,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;
|
||||
|
||||
@ -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.110-12-g6343277cddee74ed"
|
||||
#define _LDK_C_BINDINGS_HEADER_VER "v0.0.110.1"
|
||||
#define _LDK_HEADER_VER "v0.0.113-16-gea4020c655cd8978"
|
||||
#define _LDK_C_BINDINGS_HEADER_VER "v0.0.113.0"
|
||||
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) {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>BuildMachineOSBuild</key>
|
||||
<string>21G72</string>
|
||||
<string>21G320</string>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
|
||||
@ -6,7 +6,7 @@
|
||||
<dict>
|
||||
<key>Resources/Info.plist</key>
|
||||
<data>
|
||||
NxzDPlxEc6MmaK2IoYOheuXNJU4=
|
||||
u5vlTasgk30uWol0Mu/xKD9n32I=
|
||||
</data>
|
||||
</dict>
|
||||
<key>files2</key>
|
||||
@ -36,105 +36,105 @@
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
1ohc/at68l4DpZdz+I+qRP3g/iccDRW/Tuis1HH4J+k=
|
||||
5JIef1C/aH8I3ElK7tNjiyx9aPOggdASNQ9vc4NuJA8=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/ldk_ver.h</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
+xArDSjD8/9y7MRscOHSmhmMnWaZCVAvq4ONiqZ2w68=
|
||||
NpesGpwRvUnhkXmoPcFII9reYLOBL7eTdYVGH4ElVG8=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Headers/lightning.h</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
7upflvcaaRFVMatTdzoC4ggQW4iGl7wlEaQkFbhFI58=
|
||||
yDlZN9O3rMPOPwDIq/O6aNgdEd1HLwPDKqjR2hMOUPE=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/arm64-apple-macos.swiftdoc</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
0CghYts/M2zhZktvRj2XDJMwkOuCC21TmyZxopPca+g=
|
||||
PGPdAPnu/lYdnHAzFJ6SXslav0xGLL3sDnnrgoRFkPg=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/arm64-apple-macos.swiftinterface</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
nv1ogFh/SPxunCs7CLY7h8mWUSg4eEYH30QvDDfxed0=
|
||||
GYJkzUExwhf9ZPbhLIlBReDEKmtOgyZ4KOmG9903rH0=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/arm64-apple-macos.swiftmodule</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
zv1Tg+NcM3zqVxE538z1BdxEmMKDz2S8yXR04Ka2jpM=
|
||||
eiyrHgiDS/Xn388SWkSjWAjWF1RhWL5h7EsbmlYbj+M=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/arm64.swiftdoc</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
0CghYts/M2zhZktvRj2XDJMwkOuCC21TmyZxopPca+g=
|
||||
PGPdAPnu/lYdnHAzFJ6SXslav0xGLL3sDnnrgoRFkPg=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/arm64.swiftinterface</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
nv1ogFh/SPxunCs7CLY7h8mWUSg4eEYH30QvDDfxed0=
|
||||
GYJkzUExwhf9ZPbhLIlBReDEKmtOgyZ4KOmG9903rH0=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/arm64.swiftmodule</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
zv1Tg+NcM3zqVxE538z1BdxEmMKDz2S8yXR04Ka2jpM=
|
||||
eiyrHgiDS/Xn388SWkSjWAjWF1RhWL5h7EsbmlYbj+M=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/x86_64-apple-macos.swiftdoc</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
VwDy+8iFtc/uzMYNhOBo2WsEQCSp1d7hPRDC1wtziOM=
|
||||
50fxs0Y4irmnextxDzP5aI6h0vJRWrSZUhc5+MqHsHk=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/x86_64-apple-macos.swiftinterface</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
C3bLvYayOrOplJIC7JmdiCa/o6KxSfAw3Edurk1KTlA=
|
||||
WznLrc5X4ZixL1ht84vvSnpAYywkQWLxniJiAHSCqJQ=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/x86_64-apple-macos.swiftmodule</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
IeKJJ2bRHxUW1h837DgcS+Tok9OepSJNRRSINl6D72Q=
|
||||
YUqrx9QqsZpRBcSAFSDx4ddfIpFALZwZQHC0i7rTZjg=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/x86_64.swiftdoc</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
VwDy+8iFtc/uzMYNhOBo2WsEQCSp1d7hPRDC1wtziOM=
|
||||
50fxs0Y4irmnextxDzP5aI6h0vJRWrSZUhc5+MqHsHk=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/x86_64.swiftinterface</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
C3bLvYayOrOplJIC7JmdiCa/o6KxSfAw3Edurk1KTlA=
|
||||
WznLrc5X4ZixL1ht84vvSnpAYywkQWLxniJiAHSCqJQ=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/LightningDevKit.swiftmodule/x86_64.swiftmodule</key>
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
IeKJJ2bRHxUW1h837DgcS+Tok9OepSJNRRSINl6D72Q=
|
||||
YUqrx9QqsZpRBcSAFSDx4ddfIpFALZwZQHC0i7rTZjg=
|
||||
</data>
|
||||
</dict>
|
||||
<key>Modules/module.modulemap</key>
|
||||
@ -148,7 +148,7 @@
|
||||
<dict>
|
||||
<key>hash2</key>
|
||||
<data>
|
||||
KnINQ0fOPB3LRJjbhVqWtI9qHQLomSN9UdNlk1fHgQg=
|
||||
1KOp+eyXp/gHxvh8Q/OvIQnC08iTkDr9hjUjVcdU2uc=
|
||||
</data>
|
||||
</dict>
|
||||
</dict>
|
||||
|
||||
@ -0,0 +1,20 @@
|
||||
<?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>
|
||||
Binary file not shown.
@ -747,6 +747,7 @@ 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:
|
||||
|
||||
@ -40,13 +40,13 @@ interface PaymentSentMsg {
|
||||
|
||||
const MARKER_PAYMENT_FAILED = 'payment_failed';
|
||||
interface PaymentFailedMsg {
|
||||
rejected_by_dest: boolean;
|
||||
payment_failed_permanently: boolean;
|
||||
payment_hash: string;
|
||||
}
|
||||
|
||||
const MARKER_PAYMENT_PATH_FAILED = 'payment_path_failed';
|
||||
interface PaymentPathFailedMsg {
|
||||
rejected_by_dest: boolean;
|
||||
payment_failed_permanently: boolean;
|
||||
payment_hash: string;
|
||||
}
|
||||
|
||||
@ -81,6 +81,27 @@ 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_';
|
||||
@ -441,8 +462,6 @@ 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');
|
||||
@ -475,7 +494,7 @@ class RnLdkImplementation {
|
||||
/**
|
||||
* @returns Array<{}>
|
||||
*/
|
||||
async listUsableChannels() {
|
||||
async listUsableChannels(): Promise<ChannelDetails[]> {
|
||||
if (!this.started) throw new Error('LDK not yet started');
|
||||
this.logToGeneralLog('listing usable channels');
|
||||
const str = await RnLdkNative.listUsableChannels();
|
||||
@ -485,18 +504,18 @@ class RnLdkImplementation {
|
||||
/**
|
||||
* @returns Array<{}>
|
||||
*/
|
||||
async listChannels() {
|
||||
async listChannels(): Promise<ChannelDetails[]> {
|
||||
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() {
|
||||
async getMaturingBalance(): Promise<number> {
|
||||
return RnLdkNative.getMaturingBalance();
|
||||
}
|
||||
|
||||
async getMaturingHeight() {
|
||||
async getMaturingHeight(): Promise<number> {
|
||||
return RnLdkNative.getMaturingHeight();
|
||||
}
|
||||
|
||||
@ -718,12 +737,12 @@ class RnLdkImplementation {
|
||||
*
|
||||
* @returns string[]
|
||||
*/
|
||||
async getAllKeys() {
|
||||
async getAllKeys(): Promise<string[]> {
|
||||
if (!this.storage) throw new Error('No storage');
|
||||
return this.storage.getAllKeys();
|
||||
}
|
||||
|
||||
async addInvoice(amtMsat: number, description: string = '') {
|
||||
async addInvoice(amtMsat: number, description: string = ''): Promise<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);
|
||||
@ -779,7 +798,7 @@ class RnLdkImplementation {
|
||||
if (!payment_secret) throw new Error('No payment_secret');
|
||||
|
||||
for (const channel of usableChannels) {
|
||||
if (parseInt(channel.outbound_capacity_msat, 10) >= parseInt(decoded.millisatoshis, 10)) {
|
||||
if (channel.outbound_capacity_msat >= 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, '');
|
||||
@ -880,7 +899,7 @@ class RnLdkImplementation {
|
||||
return true;
|
||||
}
|
||||
|
||||
getLogs() {
|
||||
getLogs(): LogMsg[] {
|
||||
return this.logs;
|
||||
}
|
||||
|
||||
|
||||
66
src/util.tsx
66
src/util.tsx
@ -1,51 +1,65 @@
|
||||
function sum(arr: number[]): number {
|
||||
// Function to calculate the sum of an array of numbers
|
||||
return arr.reduce((acc, val) => acc + val, 0);
|
||||
function sum(arr: number[]) {
|
||||
let ret = 0;
|
||||
for (const num of arr) ret += num;
|
||||
return ret;
|
||||
}
|
||||
|
||||
class Util {
|
||||
static lndRoutetoLdkRoute(
|
||||
lndRoute: any,
|
||||
hopFees: any,
|
||||
firstChanId: string,
|
||||
minFinalCLTVExpiryFromTheInvoice: number
|
||||
): any[] { // Adjust the return type accordingly
|
||||
const craftedRoute: any[] = [];
|
||||
const fees: number[] = [];
|
||||
static lndRoutetoLdkRoute(lndRoute: any, hopFees: any, firstChanId: string, minFinalCLTVExpiryFromTheInvoice: number) {
|
||||
const ret = [];
|
||||
let firstIteration = true;
|
||||
let fees: number[] = []; // aggregating fees of LND hops
|
||||
|
||||
// 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 = {};
|
||||
|
||||
// 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);
|
||||
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);
|
||||
} else {
|
||||
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.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.short_channel_id = lndHop.chan_id;
|
||||
hop.pubkey = lndHop.pub_key;
|
||||
|
||||
fees.push(hop.fee_msat);
|
||||
craftedRoute.push(hop);
|
||||
firstIteration = false;
|
||||
ret.push(hop);
|
||||
}
|
||||
|
||||
// Crafting the very first hop
|
||||
// now, crafting the very first hop out of provided chaninfo
|
||||
const firstCraftedHop: any = {};
|
||||
const nodePolicy = lndRoute.routes[0].hops[0].pub_key === hopFees.node2_pub ? hopFees.node1_policy : hopFees.node2_policy;
|
||||
|
||||
firstCraftedHop.pubkey = lndRoute.routes[0].hops[0].pub_key === hopFees.node2_pub ? hopFees.node1_pub : hopFees.node2_pub;
|
||||
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.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;
|
||||
|
||||
craftedRoute.push(firstCraftedHop);
|
||||
|
||||
return craftedRoute.reverse();
|
||||
ret.push(firstCraftedHop);
|
||||
return ret.reverse();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user