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
4 changes: 4 additions & 0 deletions .github/workflows/cln-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: CI Checks - CLN Integration Tests

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check-cln:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/kotlin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: CI Checks - Kotlin Tests

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check-kotlin:
runs-on: ubuntu-latest
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/lnd-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: CI Checks - LND Integration Tests

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check-lnd:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -49,4 +53,4 @@ jobs:
run: LND_CERT_PATH=$LND_DATA_DIR/tls.cert LND_MACAROON_PATH=$LND_DATA_DIR/data/chain/bitcoin/regtest/admin.macaroon
RUSTFLAGS="--cfg lnd_test" cargo test --test integration_tests_lnd -- --exact --show-output
env:
LND_DATA_DIR: ${{ env.LND_DATA_DIR }}
LND_DATA_DIR: ${{ env.LND_DATA_DIR }}
4 changes: 4 additions & 0 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: CI Checks - Python Tests

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check-python:
runs-on: ubuntu-latest
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: CI Checks - Swift Tests

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check-swift:
runs-on: macos-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set default Rust version to stable
run: rustup default stable

- name: Generate Swift bindings
run: ./scripts/uniffi_bindgen_generate_swift.sh
6 changes: 3 additions & 3 deletions bindings/ldk_node.udl
Original file line number Diff line number Diff line change
Expand Up @@ -771,7 +771,7 @@ interface Offer {
constructor([ByRef] string offer_str);
OfferId id();
boolean is_expired();
string? description();
string? offer_description();
Copy link
Contributor

@jkczyz jkczyz Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is failing. Looks like some tests need to be updated, e.g.

assert_eq!(ldk_desc.to_string(), wrapped_desc);

Same for the other structs.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, right. Force-pushed fixes.

string? issuer();
OfferAmount? amount();
boolean is_valid_quantity(u64 quantity);
Expand All @@ -787,7 +787,7 @@ interface Offer {
interface Refund {
[Throws=NodeError, Name=from_str]
constructor([ByRef] string refund_str);
string description();
string refund_description();
u64? absolute_expiry_seconds();
boolean is_expired();
string? issuer();
Expand All @@ -810,7 +810,7 @@ interface Bolt12Invoice {
u64? absolute_expiry_seconds();
u64 relative_expiry();
boolean is_expired();
string? description();
string? invoice_description();
string? issuer();
string? payer_note();
sequence<u8>? metadata();
Expand Down
12 changes: 6 additions & 6 deletions src/ffi/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ impl Offer {
/// A complete description of the purpose of the payment.
///
/// Intended to be displayed to the user but with the caveat that it has not been verified in any way.
pub fn description(&self) -> Option<String> {
pub fn offer_description(&self) -> Option<String> {
self.inner.description().map(|printable| printable.to_string())
}

Expand Down Expand Up @@ -288,7 +288,7 @@ impl Refund {
/// A complete description of the purpose of the refund.
///
/// Intended to be displayed to the user but with the caveat that it has not been verified in any way.
pub fn description(&self) -> String {
pub fn refund_description(&self) -> String {
self.inner.description().to_string()
}

Expand Down Expand Up @@ -466,7 +466,7 @@ impl Bolt12Invoice {
///
/// [`Offer::description`]: lightning::offers::offer::Offer::description
/// [`Refund::description`]: lightning::offers::refund::Refund::description
pub fn description(&self) -> Option<String> {
pub fn invoice_description(&self) -> Option<String> {
self.inner.description().map(|printable| printable.to_string())
}

Expand Down Expand Up @@ -1359,7 +1359,7 @@ mod tests {
#[test]
fn test_offer() {
let (ldk_offer, wrapped_offer) = create_test_offer();
match (ldk_offer.description(), wrapped_offer.description()) {
match (ldk_offer.description(), wrapped_offer.offer_description()) {
(Some(ldk_desc), Some(wrapped_desc)) => {
assert_eq!(ldk_desc.to_string(), wrapped_desc);
},
Expand Down Expand Up @@ -1481,7 +1481,7 @@ mod tests {
fn test_refund_properties() {
let (ldk_refund, wrapped_refund) = create_test_refund();

assert_eq!(ldk_refund.description().to_string(), wrapped_refund.description());
assert_eq!(ldk_refund.description().to_string(), wrapped_refund.refund_description());
assert_eq!(ldk_refund.amount_msats(), wrapped_refund.amount_msats());
assert_eq!(ldk_refund.is_expired(), wrapped_refund.is_expired());

Expand Down Expand Up @@ -1572,7 +1572,7 @@ mod tests {

assert_eq!(ldk_invoice.relative_expiry().as_secs(), wrapped_invoice.relative_expiry());

match (ldk_invoice.description(), wrapped_invoice.description()) {
match (ldk_invoice.description(), wrapped_invoice.invoice_description()) {
(Some(ldk_desc), Some(wrapped_desc)) => {
assert_eq!(ldk_desc.to_string(), wrapped_desc);
},
Expand Down
Loading