-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core Lightning: Add support for custom TLV records #111
Core Lightning: Add support for custom TLV records #111
Conversation
var tlvData = new Dictionary<ulong,string> | ||
var val696969 = Encoding.Default.GetBytes("123456"); | ||
var val112111100 = Encoding.Default.GetBytes("wal_hrDHs0RBEM576"); | ||
var tlvData = new Dictionary<ulong, byte[]> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pass in the values as byte[]
and also get them back as byte[]
, so that we can support it across implementations.
var amount = LightMoney.Satoshis(21); | ||
var preimage = new byte[32]; | ||
new Random().NextBytes(preimage); | ||
var paymentHash = new uint256(Hashes.SHA256(preimage)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is only required for LND, moved it to the LND PayAsync
method. The other implementations don't even allow to defined a payment hash for keysend payments.
@@ -8,6 +8,7 @@ namespace BTCPayServer.Lightning | |||
public interface ILightningClient | |||
{ | |||
Task<LightningInvoice> GetInvoice(string invoiceId, CancellationToken cancellation = default); | |||
Task<LightningInvoice> GetInvoice(uint256 paymentHash, CancellationToken cancellation = default); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added this to be able to test the invoice that was generated by a keysend payemnt.
src/BTCPayServer.Lightning.Eclair/Models/GetSentInfoResponse.cs
Outdated
Show resolved
Hide resolved
f5b7130
to
d9efec3
Compare
Extracted these from btcpayserver#111: - Incorporate payment timeout pattern from btcpayserver#106 - Improve failure response - Fix missing payment info (some [`getsentinfo` properties](https://acinq.github.io/eclair/#getsentinfo) weren't correct) - Upgrade containers to 0.8.0
Extracted these from #111: - Incorporate payment timeout pattern from #106 - Improve failure response - Fix missing payment info (some [`getsentinfo` properties](https://acinq.github.io/eclair/#getsentinfo) weren't correct) - Upgrade containers to 0.8.0
d9efec3
to
e4f0d24
Compare
1d37a9c
to
edb9ce3
Compare
e4f0d24
to
1c70fe4
Compare
3648402
to
67c6d97
Compare
0c2ff22
to
fa47c90
Compare
fa47c90
to
0171a5a
Compare
0171a5a
to
931a167
Compare
931a167
to
64ada8b
Compare
- Add GetInvoice by payment hash - PayResponse: Add payment hash, preimage and status to payment details - Core Lightning: Add support for custom TLV records
64ada8b
to
e59859c
Compare
Didn't receive any feedbackl for my questions on the CLN issue. Closing this because Core Lightning doesn't seem to wanna support this soon. |
Waiting for input for this comment to continue. Looks like it's not doable with CLN 22.11