BIP353 registration
Unlike LNURL-Pay, BOLT12 offers do not require a web service that serves requests. Instead when someone wants to pay a BOLT12 offer, they use the Lightning network to request a BOLT12 invoice. That BOLT12 offer can also be made available via a DNS TXT lookup using BIP353. You can do this in the workflow below by registering both a username
and an offer
.
The following workflow is application specific and the steps detailed below refer to the Misty Breez implementation which requires running an LNURL service to register the BOLT12 offer as a BIP353 address.
Registering with the service
Use a POST request to the service endpoint https://app.domain/bolt12offer/[pubkey]
with the following payload to register:
{
"time": 1231006505, // Current UNIX timestamp
"username": "[username]",
"offer": "[BOLT12 offer]",
"signature": "[signed message]"
}
The signature
refers to the result of a message signed by the private key of the pubkey
, where the message is comprised of the following text:
[time]-[username]-[offer]
where time
, username
and offer
are the payload fields.
The service responds with following payload:
{
"bip353_address": "username@app.domain"
}
Developer note
When a user changes their already registered username, this previous username becomes freely available to be registered by another user.
Reference implementation
For a complete reference implementation, see: