Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
84 changes: 78 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,18 +43,31 @@ jobs:
git checkout origin/0.1-bindings
cargo update -p syn --precise "2.0.106" --verbose
cargo update -p quote --precise "1.0.41" --verbose
cargo update -p libc --precise 0.2.183 --verbose
cargo update -p serde_json --precise "1.0.145" --verbose
cargo update -p proc-macro2 --precise "1.0.103" --verbose
cargo update -p itoa --precise 1.0.15
cargo update -p unicode-ident --precise 1.0.22
cargo update -p ryu --precise "1.0.20"
cd ..
git clone https://github.com/lightningdevkit/ldk-c-bindings
cd ldk-c-bindings
git checkout 0.1
cd lightning-c-bindings
cargo update -p syn --precise "2.0.106" --verbose
cargo update -p quote --precise "1.0.41" --verbose
cargo update -p libc --precise 0.2.183 --verbose
cargo update -p serde_json --precise "1.0.145" --verbose
cargo update -p proc-macro2 --precise "1.0.103" --verbose
cargo update -p itoa --precise 1.0.15
cargo update -p unicode-ident --precise 1.0.22
cargo update -p ryu --precise "1.0.20"
- name: Pin proc-macro and quote to meet MSRV
run: |
cd ldk-c-bindings/c-bindings-gen
cargo update -p quote --precise "1.0.30" --verbose
cargo update -p proc-macro2 --precise "1.0.65" --verbose
cargo update -p unicode-ident --precise 1.0.22
- name: Rebuild C bindings without STD
run: |
cd ldk-c-bindings
Expand Down Expand Up @@ -149,18 +162,31 @@ jobs:
git checkout origin/0.1-bindings
cargo update -p syn --precise "2.0.106" --verbose
cargo update -p quote --precise "1.0.41" --verbose
cargo update -p libc --precise 0.2.183 --verbose
cargo update -p serde_json --precise "1.0.145" --verbose
cargo update -p proc-macro2 --precise "1.0.103" --verbose
cargo update -p itoa --precise 1.0.15
cargo update -p unicode-ident --precise 1.0.22
cargo update -p ryu --precise "1.0.20"
cd ..
git clone https://github.com/lightningdevkit/ldk-c-bindings
cd ldk-c-bindings
git checkout 0.1
cd lightning-c-bindings
cargo update -p syn --precise "2.0.106" --verbose
cargo update -p quote --precise "1.0.41" --verbose
cargo update -p libc --precise 0.2.183 --verbose
cargo update -p serde_json --precise "1.0.145" --verbose
cargo update -p proc-macro2 --precise "1.0.103" --verbose
cargo update -p itoa --precise 1.0.15
cargo update -p unicode-ident --precise 1.0.22
cargo update -p ryu --precise "1.0.20"
- name: Pin proc-macro and quote to meet MSRV
run: |
cd ldk-c-bindings/c-bindings-gen
cargo update -p quote --precise "1.0.30" --verbose
cargo update -p proc-macro2 --precise "1.0.65" --verbose
cargo update -p unicode-ident --precise 1.0.22
- name: Rebuild C bindings with STD
run: |
cd ldk-c-bindings
Expand Down Expand Up @@ -206,15 +232,11 @@ jobs:
git clone https://github.com/lightningdevkit/rust-lightning
cd rust-lightning
git checkout origin/0.1-bindings
cargo update -p syn --precise "2.0.106" --verbose
cargo update -p quote --precise "1.0.41" --verbose
cd ..
git clone https://github.com/lightningdevkit/ldk-c-bindings
cd ldk-c-bindings
git checkout 0.1
cd lightning-c-bindings
cargo update -p syn --precise "2.0.106" --verbose
cargo update -p quote --precise "1.0.41" --verbose
- name: Fetch MacOS SDK
run: |
curl -o Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz https://bitcoincore.org/depends-sources/sdks/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz
Expand Down Expand Up @@ -263,8 +285,6 @@ jobs:
git clean -f -x -d
git reset --hard
cd lightning-c-bindings
cargo update -p syn --precise "2.0.106" --verbose
cargo update -p quote --precise "1.0.41" --verbose
cd ../..
export LDK_GARBAGECOLLECTED_GIT_OVERRIDE="$(git describe --tag HEAD)"
export ANDROID_TOOLCHAIN="$(pwd)/android-ndk-r27c/toolchains/llvm/prebuilt/linux-x86_64"
Expand Down Expand Up @@ -397,18 +417,31 @@ jobs:
git checkout origin/0.1-bindings
cargo update -p syn --precise "2.0.106" --verbose
cargo update -p quote --precise "1.0.41" --verbose
cargo update -p libc --precise 0.2.183 --verbose
cargo update -p serde_json --precise "1.0.145" --verbose
cargo update -p proc-macro2 --precise "1.0.103" --verbose
cargo update -p itoa --precise 1.0.15
cargo update -p unicode-ident --precise 1.0.22
cargo update -p ryu --precise "1.0.20"
cd ..
git clone https://github.com/lightningdevkit/ldk-c-bindings
cd ldk-c-bindings
git checkout 0.1
cd lightning-c-bindings
cargo update -p syn --precise "2.0.106" --verbose
cargo update -p quote --precise "1.0.41" --verbose
cargo update -p libc --precise 0.2.183 --verbose
cargo update -p serde_json --precise "1.0.145" --verbose
cargo update -p proc-macro2 --precise "1.0.103" --verbose
cargo update -p itoa --precise 1.0.15
cargo update -p unicode-ident --precise 1.0.22
cargo update -p ryu --precise "1.0.20"
- name: Pin proc-macro and quote to meet MSRV
run: |
cd ldk-c-bindings/c-bindings-gen
cargo update -p quote --precise "1.0.30" --verbose
cargo update -p proc-macro2 --precise "1.0.65" --verbose
cargo update -p unicode-ident --precise 1.0.22
- name: Rebuild C bindings, and check the sample app builds + links
run: |
cd ldk-c-bindings
Expand Down Expand Up @@ -463,18 +496,31 @@ jobs:
git checkout origin/0.1-bindings
cargo update -p syn --precise "2.0.106" --verbose
cargo update -p quote --precise "1.0.41" --verbose
cargo update -p libc --precise 0.2.183 --verbose
cargo update -p serde_json --precise "1.0.145" --verbose
cargo update -p proc-macro2 --precise "1.0.103" --verbose
cargo update -p itoa --precise 1.0.15
cargo update -p unicode-ident --precise 1.0.22
cargo update -p ryu --precise "1.0.20"
cd ..
git clone https://github.com/lightningdevkit/ldk-c-bindings
cd ldk-c-bindings
git checkout 0.1
cd lightning-c-bindings
cargo update -p syn --precise "2.0.106" --verbose
cargo update -p quote --precise "1.0.41" --verbose
cargo update -p libc --precise 0.2.183 --verbose
cargo update -p serde_json --precise "1.0.145" --verbose
cargo update -p proc-macro2 --precise "1.0.103" --verbose
cargo update -p itoa --precise 1.0.15
cargo update -p unicode-ident --precise 1.0.22
cargo update -p ryu --precise "1.0.20"
- name: Pin proc-macro and quote to meet MSRV
run: |
cd ldk-c-bindings/c-bindings-gen
cargo update -p quote --precise "1.0.30" --verbose
cargo update -p proc-macro2 --precise "1.0.65" --verbose
cargo update -p unicode-ident --precise 1.0.22
- name: Rebuild C bindings, and check the sample app builds + links
run: |
cd ldk-c-bindings
Expand Down Expand Up @@ -595,18 +641,31 @@ jobs:
git checkout origin/0.1-bindings
cargo update -p syn --precise "2.0.106" --verbose
cargo update -p quote --precise "1.0.41" --verbose
cargo update -p libc --precise 0.2.183 --verbose
cargo update -p serde_json --precise "1.0.145" --verbose
cargo update -p proc-macro2 --precise "1.0.103" --verbose
cargo update -p itoa --precise 1.0.15
cargo update -p unicode-ident --precise 1.0.22
cargo update -p ryu --precise "1.0.20"
cd ..
git clone https://github.com/lightningdevkit/ldk-c-bindings
cd ldk-c-bindings
git checkout 0.1
cd lightning-c-bindings
cargo update -p syn --precise "2.0.106" --verbose
cargo update -p quote --precise "1.0.41" --verbose
cargo update -p libc --precise 0.2.183 --verbose
cargo update -p serde_json --precise "1.0.145" --verbose
cargo update -p proc-macro2 --precise "1.0.103" --verbose
cargo update -p itoa --precise 1.0.15
cargo update -p unicode-ident --precise 1.0.22
cargo update -p ryu --precise "1.0.20"
- name: Pin proc-macro and quote to meet MSRV
run: |
cd ldk-c-bindings/c-bindings-gen
cargo update -p quote --precise "1.0.30" --verbose
cargo update -p proc-macro2 --precise "1.0.65" --verbose
cargo update -p unicode-ident --precise 1.0.22
- name: Fetch MacOS SDK
run: |
curl -o Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz https://bitcoincore.org/depends-sources/sdks/Xcode-12.2-12B45b-extracted-SDK-with-libcxx-headers.tar.gz
Expand Down Expand Up @@ -737,18 +796,31 @@ jobs:
git checkout origin/0.1-bindings
cargo update -p syn --precise "2.0.106" --verbose
cargo update -p quote --precise "1.0.41" --verbose
cargo update -p libc --precise 0.2.183 --verbose
cargo update -p serde_json --precise "1.0.145" --verbose
cargo update -p proc-macro2 --precise "1.0.103" --verbose
cargo update -p itoa --precise 1.0.15
cargo update -p unicode-ident --precise 1.0.22
cargo update -p ryu --precise "1.0.20"
cd ..
git clone https://github.com/lightningdevkit/ldk-c-bindings
cd ldk-c-bindings
git checkout 0.1
cd lightning-c-bindings
cargo update -p syn --precise "2.0.106" --verbose
cargo update -p quote --precise "1.0.41" --verbose
cargo update -p libc --precise 0.2.183 --verbose
cargo update -p serde_json --precise "1.0.145" --verbose
cargo update -p proc-macro2 --precise "1.0.103" --verbose
cargo update -p itoa --precise 1.0.15
cargo update -p unicode-ident --precise 1.0.22
cargo update -p ryu --precise "1.0.20"
- name: Pin proc-macro and quote to meet MSRV
run: |
cd ldk-c-bindings/c-bindings-gen
cargo update -p quote --precise "1.0.30" --verbose
cargo update -p proc-macro2 --precise "1.0.65" --verbose
cargo update -p unicode-ident --precise 1.0.22
- name: Checkout Android AAR binaries and artifacts
run: |
# Gitweb only allows snapshots of folders by providing the object hash, which we have to extract:
Expand Down
9 changes: 6 additions & 3 deletions c_sharp/src/org/ldk/structs/Bolt11Invoice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,10 @@ public org.ldk.structs.Bolt11InvoiceFeatures features() {
}

/**
* Recover the payee's public key (only to be used if none was included in the invoice)
* Get the invoice's payee public key.
*
* This uses the explicitly included payee public key, if present, otherwise it recovers the
* payee public key from the signature. Prefer [`Self::get_payee_pub_key`] for clarity.
*/
public byte[] recover_payee_pub_key() {
long ret = bindings.Bolt11Invoice_recover_payee_pub_key(this.ptr);
Expand All @@ -225,8 +228,8 @@ public byte[] recover_payee_pub_key() {
}

/**
* Recover the payee's public key if one was included in the invoice, otherwise return the
* recovered public key from the signature
* Get the invoice's payee public key, preferring an explicitly included payee public key and
* falling back to recovering the key from the signature.
*/
public byte[] get_payee_pub_key() {
long ret = bindings.Bolt11Invoice_get_payee_pub_key(this.ptr);
Expand Down
3 changes: 2 additions & 1 deletion c_sharp/src/org/ldk/structs/Event.cs
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,8 @@ public class Event_PaymentSent : Event {
* If the recipient or an intermediate node misbehaves and gives us free money, this may
* overstate the amount paid, though this is unlikely.
*
* This is only `None` for payments initiated on LDK versions prior to 0.0.103.
* This is only `None` for payments abandoned but ultimately claimed when using LDK versions
* prior to 0.3, 0.2.3, or 0.1.10.
*
* [`Route::get_total_fees`]: crate::routing::router::Route::get_total_fees
*/
Expand Down
12 changes: 12 additions & 0 deletions c_sharp/src/org/ldk/structs/RapidGossipSync.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ public static org.ldk.structs.RapidGossipSync of(org.ldk.structs.NetworkGraph ne
* Sync gossip data from a file.
* Returns the last sync timestamp to be used the next time rapid sync data is queried.
*
* You should consider the gossip data source as semi-trusted. It is generally the case that it
* can DoS the client either by omitting data which leads to pathfinding failure or by bloating
* the graph such that it leads to eventual OOM on the client.
*
* `network_graph`: The network graph to apply the updates to
*
* `sync_path`: Path to the file where the gossip update data is located
Expand All @@ -55,6 +59,10 @@ public org.ldk.structs.Result_u32GraphSyncErrorZ sync_network_graph_with_file_pa
* Update network graph from binary data.
* Returns the last sync timestamp to be used the next time rapid sync data is queried.
*
* You should consider the gossip data source as semi-trusted. It is generally the case that it
* can DoS the client either by omitting data which leads to pathfinding failure or by bloating
* the graph such that it leads to eventual OOM on the client.
*
* `update_data`: `&[u8]` binary stream that comprises the update data
*/
public org.ldk.structs.Result_u32GraphSyncErrorZ update_network_graph(byte[] update_data) {
Expand All @@ -70,6 +78,10 @@ public org.ldk.structs.Result_u32GraphSyncErrorZ update_network_graph(byte[] upd
* Update network graph from binary data.
* Returns the last sync timestamp to be used the next time rapid sync data is queried.
*
* You should consider the gossip data source as semi-trusted. It is generally the case that it
* can DoS the client either by omitting data which leads to pathfinding failure or by bloating
* the graph such that it leads to eventual OOM on the client.
*
* `update_data`: `&[u8]` binary stream that comprises the update data
* `current_time_unix`: `Option<u64>` optional current timestamp to verify data age
*/
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/org/ldk/structs/Bolt11Invoice.java
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,10 @@ public Bolt11InvoiceFeatures features() {
}

/**
* Recover the payee's public key (only to be used if none was included in the invoice)
* Get the invoice's payee public key.
*
* This uses the explicitly included payee public key, if present, otherwise it recovers the
* payee public key from the signature. Prefer [`Self::get_payee_pub_key`] for clarity.
*/
public byte[] recover_payee_pub_key() {
byte[] ret = bindings.Bolt11Invoice_recover_payee_pub_key(this.ptr);
Expand All @@ -222,8 +225,8 @@ public byte[] recover_payee_pub_key() {
}

/**
* Recover the payee's public key if one was included in the invoice, otherwise return the
* recovered public key from the signature
* Get the invoice's payee public key, preferring an explicitly included payee public key and
* falling back to recovering the key from the signature.
*/
public byte[] get_payee_pub_key() {
byte[] ret = bindings.Bolt11Invoice_get_payee_pub_key(this.ptr);
Expand Down
3 changes: 2 additions & 1 deletion src/main/java/org/ldk/structs/Event.java
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,8 @@ public final static class PaymentSent extends Event {
* If the recipient or an intermediate node misbehaves and gives us free money, this may
* overstate the amount paid, though this is unlikely.
*
* This is only `None` for payments initiated on LDK versions prior to 0.0.103.
* This is only `None` for payments abandoned but ultimately claimed when using LDK versions
* prior to 0.3, 0.2.3, or 0.1.10.
*
* [`Route::get_total_fees`]: crate::routing::router::Route::get_total_fees
*/
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/org/ldk/structs/RapidGossipSync.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ public static RapidGossipSync of(org.ldk.structs.NetworkGraph network_graph, org
* Sync gossip data from a file.
* Returns the last sync timestamp to be used the next time rapid sync data is queried.
*
* You should consider the gossip data source as semi-trusted. It is generally the case that it
* can DoS the client either by omitting data which leads to pathfinding failure or by bloating
* the graph such that it leads to eventual OOM on the client.
*
* `network_graph`: The network graph to apply the updates to
*
* `sync_path`: Path to the file where the gossip update data is located
Expand All @@ -60,6 +64,10 @@ public Result_u32GraphSyncErrorZ sync_network_graph_with_file_path(java.lang.Str
* Update network graph from binary data.
* Returns the last sync timestamp to be used the next time rapid sync data is queried.
*
* You should consider the gossip data source as semi-trusted. It is generally the case that it
* can DoS the client either by omitting data which leads to pathfinding failure or by bloating
* the graph such that it leads to eventual OOM on the client.
*
* `update_data`: `&[u8]` binary stream that comprises the update data
*/
public Result_u32GraphSyncErrorZ update_network_graph(byte[] update_data) {
Expand All @@ -75,6 +83,10 @@ public Result_u32GraphSyncErrorZ update_network_graph(byte[] update_data) {
* Update network graph from binary data.
* Returns the last sync timestamp to be used the next time rapid sync data is queried.
*
* You should consider the gossip data source as semi-trusted. It is generally the case that it
* can DoS the client either by omitting data which leads to pathfinding failure or by bloating
* the graph such that it leads to eventual OOM on the client.
*
* `update_data`: `&[u8]` binary stream that comprises the update data
* `current_time_unix`: `Option<u64>` optional current timestamp to verify data age
*/
Expand Down
9 changes: 6 additions & 3 deletions ts/structs/Bolt11Invoice.mts
Original file line number Diff line number Diff line change
Expand Up @@ -965,7 +965,10 @@ export class Bolt11Invoice extends CommonBase {
}

/**
* Recover the payee's public key (only to be used if none was included in the invoice)
* Get the invoice's payee public key.
*
* This uses the explicitly included payee public key, if present, otherwise it recovers the
* payee public key from the signature. Prefer [`Self::get_payee_pub_key`] for clarity.
*/
public recover_payee_pub_key(): Uint8Array {
const ret: number = bindings.Bolt11Invoice_recover_payee_pub_key(this.ptr);
Expand All @@ -974,8 +977,8 @@ export class Bolt11Invoice extends CommonBase {
}

/**
* Recover the payee's public key if one was included in the invoice, otherwise return the
* recovered public key from the signature
* Get the invoice's payee public key, preferring an explicitly included payee public key and
* falling back to recovering the key from the signature.
*/
public get_payee_pub_key(): Uint8Array {
const ret: number = bindings.Bolt11Invoice_get_payee_pub_key(this.ptr);
Expand Down
3 changes: 2 additions & 1 deletion ts/structs/Event.mts
Original file line number Diff line number Diff line change
Expand Up @@ -1549,7 +1549,8 @@ export class Event_PaymentSent extends Event {
* If the recipient or an intermediate node misbehaves and gives us free money, this may
* overstate the amount paid, though this is unlikely.
*
* This is only `None` for payments initiated on LDK versions prior to 0.0.103.
* This is only `None` for payments abandoned but ultimately claimed when using LDK versions
* prior to 0.3, 0.2.3, or 0.1.10.
*
* [`Route::get_total_fees`]: crate::routing::router::Route::get_total_fees
*/
Expand Down
4 changes: 4 additions & 0 deletions ts/structs/RapidGossipSync.mts
Original file line number Diff line number Diff line change
Expand Up @@ -828,6 +828,10 @@ export class RapidGossipSync extends CommonBase {
* Update network graph from binary data.
* Returns the last sync timestamp to be used the next time rapid sync data is queried.
*
* You should consider the gossip data source as semi-trusted. It is generally the case that it
* can DoS the client either by omitting data which leads to pathfinding failure or by bloating
* the graph such that it leads to eventual OOM on the client.
*
* `update_data`: `&[u8]` binary stream that comprises the update data
* `current_time_unix`: `Option<u64>` optional current timestamp to verify data age
*/
Expand Down
Loading