-
Notifications
You must be signed in to change notification settings - Fork 9
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
Persist and expose BIP353 addresses #718
base: main
Are you sure you want to change the base?
Conversation
a78c267
to
52e23f5
Compare
52e23f5
to
f8a2807
Compare
@@ -67,12 +67,19 @@ interface InputType { | |||
Bolt12Offer(LNOffer offer); | |||
NodeId(string node_id); | |||
Url(string url); | |||
Bip353Address(ResolvedBip353 resolved_bip353); |
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.
Do we want to expose the Bip353Address to the user? It looks like the user will need to add extra logic to handle this (matching the internal structure). Just curious if there is an advantage vs resolving the internal structure automatically.
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.
@roeierez After the integration, I didn't see much benefit to having the wrapper Bip353Address
as an InputType
. In fact, it made things a bit more complicated. It's better to add an optional bip353_address
field to Bolt12Offer
& LnUrlPay
as such:
Bolt12Offer(LNOffer offer, string? bip353_address);
LnUrlPay(LnUrlPayRequestData request_data, string? bip353_address);
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.
I applied @erdemyerebasmaz's suggestion. I didn't pursue it initially because it felt weird, but indeed it's simpler.
f02fe47
to
1dc140a
Compare
1dc140a
to
deb1e23
Compare
Resolves #714.
Depends on sdk-common PR: breez/breez-sdk-greenlight#1164
This PR adds the bip353 address to
PaymentTxDetails
, persisting it locally and syncing it to other devices. The address is then exposed as an additional field ofPaymentDetails::Lightning
. Technically, bip353 can also be used to fetch onchain addresses, but that isn't currently supported. We can add it toPaymentDetails::Bitcoin
once it is.Test notes
Paying to a BIP353 address that resolves to a BOLT12 or an LNURL Pay results in a payment entry that shows the bip353 that was used. Note that this will only be testable once Misty exposes the new field.