You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The `OfferIssuerId` was previously named `OfferNodeId`, but its usage
changed when it was renamed: it doesn't necessarily match a lightning
`node_id` and can instead be a completely unrelated public key.
It can now be included in combination with blinded paths: when that
happens, the blinded paths must be used in priority to reach the node
as the `issuer_id` may not match a network `node_id` at all (or may
even match an unrelated node).
Copy file name to clipboardExpand all lines: src/commonMain/kotlin/fr/acinq/lightning/wire/OfferTypes.kt
+15-15Lines changed: 15 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -262,21 +262,21 @@ object OfferTypes {
262
262
}
263
263
264
264
/**
265
-
* Public key of the offer creator.
265
+
* Public key of the offer issuer.
266
266
* If `OfferPaths` is present, they must be used to retrieve an invoice even if this public key corresponds to a node id in the public network.
267
267
* If `OfferPaths` is not present, this public key must correspond to a node id in the public network that needs to be contacted to retrieve an invoice.
268
268
*/
269
-
data classOfferNodeId(valpublicKey:PublicKey) : OfferTlv() {
270
-
overrideval tag:Long get() =OfferNodeId.tag
269
+
data classOfferIssuerId(valpublicKey:PublicKey) : OfferTlv() {
val encodedOffer ="lno1qgsyxjtl6luzd9t3pr62xr7eemp6awnejusgf6gw45q75vcfqqqqqqqgqvqcdgq2zdhkven9wgs8w6t5dqs8zatpde6xjarezggkzmrfvdj5qcnfvaeksmms9e3k7mg5qgp7s93pqvn6l4vemgezdarq3wt2kpp0u4vt74vzz8futen7ej97n93jypp57"
val encoded ="lno1qgsyxjtl6luzd9t3pr62xr7eemp6awnejusgf6gw45q75vcfqqqqqqqgqyeq5ym0venx2u3qwa5hg6pqw96kzmn5d968jys3v9kxjcm9gp3xjemndphhqtnrdak3gqqkyypsmuhrtwfzm85mht4a3vcp0yrlgua3u3m5uqpc6kf7nqjz6v70qwg"
82
82
assertEquals(offer, Offer.decode(encoded).get())
83
83
assertEquals(50.msat, offer.amount)
84
84
assertEquals("offer with quantity", offer.description)
@@ -171,7 +171,7 @@ class OfferTypesTestsCommon : LightningTestSuite() {
171
171
fun`check that invoice request matches offer - with chains`() {
172
172
val chain1 =BlockHash(randomBytes32())
173
173
val chain2 =BlockHash(randomBytes32())
174
-
val offer =Offer(TlvStream(OfferChains(listOf(chain1, chain2)), OfferAmount(100.msat), OfferDescription("offer with chains"), OfferNodeId(randomKey().publicKey())))
174
+
val offer =Offer(TlvStream(OfferChains(listOf(chain1, chain2)), OfferAmount(100.msat), OfferDescription("offer with chains"), OfferIssuerId(randomKey().publicKey())))
175
175
val payerKey = randomKey()
176
176
val request1 =InvoiceRequest(offer, 100.msat, 1, Features.empty, payerKey, null, chain1)
177
177
assertTrue(request1.isValid())
@@ -196,7 +196,7 @@ class OfferTypesTestsCommon : LightningTestSuite() {
196
196
TlvStream(
197
197
OfferAmount(500.msat),
198
198
OfferDescription("offer for multiple items"),
199
-
OfferNodeId(randomKey().publicKey()),
199
+
OfferIssuerId(randomKey().publicKey()),
200
200
OfferQuantityMax(10),
201
201
)
202
202
)
@@ -216,7 +216,7 @@ class OfferTypesTestsCommon : LightningTestSuite() {
216
216
val payerKey =PrivateKey.fromHex("527d410ec920b626ece685e8af9abc976a48dbf2fe698c1b35d90a1c5fa2fbca")
0 commit comments