-
Notifications
You must be signed in to change notification settings - Fork 111
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
Add optional memo to TAP addresses #757
base: main
Are you sure you want to change the base?
Conversation
This commit adds memo fields to the addrs table. The memo fields are used to store the memo for the address.
This commit adds the memo field to the NewAddrRequest and Addr messages.
This commit adds the memo field to the TAP address constructors.
This commit adds address encoding and decoding to the TAP address.
This commit adds the ability to add a memo to the address related cli commands.
Thanks for the PR! I think having a memo is definitely useful on the receiving end to know what purpose an address was created for. I would personally have expected the memo on a TAP address to follow the second pattern, where the memo is only for the creator of the address, not also the recipient. |
That was how I initially started building it out. But after some thought addresses being already tied with amounts and assests make them feel a lot like lightning invoices already. Plus with address reuse being generally discouraged (Is this the case for TAP addresses as well?) to me giving the memo to the sender of funds also made sense. I guess as the future of taproot-asset payments is probably tied to lightning channels, we will have invoices with memos and using addresses for payments seems unlikely. So happy to change it to the local memo only. |
This PR adds optional memos to TAP addresses. Memos are encoded in the address similiar to BOLT 11 Descriptions.
I've tested it locally with a 0.3 Tap client. The implementation seems to be both backward and forward compatible.
Things I'm unsure about:
Creation of address:
Decoding on old version:
Decoding of TAP addr without memo(addr created on tap version 0.3)
Fixes #751