Skip to content

Commit 7e01d74

Browse files
Update NLightning to version 4.0.0 and .NET SDK to version 9.0
- Upgraded NLightning to version 4.0.0, which introduces mandatory item validation in invoices to ensure convergence with other protocol implementations. - Updated .NET SDK to version 9.0 to maintain compatibility, as NLightning development now targets this version.
1 parent ad6f82a commit 7e01d74

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

modules/nlightning/src/Bolts/BOLT11/InvoiceBridge.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
namespace NLightning.CppBridge.Bolts.BOLT11;
44

55
using System.Text;
6-
using NLightning.Bolts.BOLT11;
6+
using NLightning.Bolt11.Models;
7+
78
public static class InvoiceBridge
89
{
910
[UnmanagedCallersOnly(EntryPoint = "DecodeInvoice")]
@@ -22,7 +23,7 @@ public static IntPtr DecodeInvoice(IntPtr invoiceStringPtr)
2223
StringBuilder resultBuilder = new();
2324

2425
resultBuilder.Append("HASH=").Append(invoice.PaymentHash);
25-
resultBuilder.Append(";AMOUNT=").Append(invoice.AmountMilliSats);
26+
resultBuilder.Append(";AMOUNT=").Append(invoice.Amount.MilliSatoshi);
2627
resultBuilder.Append(";DESCRIPTION=").Append(invoice.Description);
2728
resultBuilder.Append(";RECIPIENT=").Append(invoice.PayeePubKey);
2829
resultBuilder.Append(";EXPIRY=").Append((int)(invoice.ExpiryDate - DateTimeOffset.FromUnixTimeSeconds(invoice.Timestamp)).TotalSeconds);

modules/nlightning/src/NLightning.CppBridge.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22

33
<PropertyGroup>
4-
<TargetFramework>net8.0</TargetFramework>
4+
<TargetFramework>net9.0</TargetFramework>
55
<RootNamespace>NLightning.CppBridge</RootNamespace>
66
<ImplicitUsings>enable</ImplicitUsings>
77
<Nullable>enable</Nullable>
@@ -19,7 +19,7 @@
1919
</PropertyGroup>
2020

2121
<ItemGroup>
22-
<PackageReference Include="NLightning.Bolt11" Version="0.2.4" />
22+
<PackageReference Include="NLightning.Bolt11" Version="4.0.0" />
2323
</ItemGroup>
2424

2525
</Project>

0 commit comments

Comments
 (0)