Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: nullama on February 04, 2022, 04:49:19 AM



Title: Is keysend the best way to transfer custom data between peers with lightning?
Post by: nullama on February 04, 2022, 04:49:19 AM
I'm looking at what would be the best way to send custom data between peers using lightning.

So far, I think keysend (https://docs.lightning.engineering/lightning-network-tools/lnd/send-messages-with-keysend) is the best way to do it, but the lightning server needs to be configured to explicitly accept these messages. It's not on by default.

It seems that projects like juggernaut (https://www.getjuggernaut.com/) use this approach, since they explain how to enable keysend in their github (https://github.com/LN-Juggernaut/juggernaut-desktop).

Is there any other way?. I'm thinking that maybe lnurl (https://github.com/fiatjaf/lnurl-rfc) can be used to transfer custom data somehow, but haven't explored that path yet.


Title: Re: Is keysend the best way to transfer custom data between peers with lightning?
Post by: ABCbits on February 04, 2022, 11:16:43 AM
Is there any other way?. I'm thinking that maybe lnurl (https://github.com/fiatjaf/lnurl-rfc) can be used to transfer custom data somehow, but haven't explored that path yet.

You could abuse comment field in payRequest to send small amount of data. But both peer must explicitly enable comment field and it's limited by 2000 character on the URL (which also contain payment information), so it's more practical to use comment field to send notes/download link instead.