⚡BOLT12
Information about swaps with the new BOLT12 standard and some accompanying tips & tricks for how to handle BOLT12 offers.
Swapping to BOLT12 invoices
We allow swaps to BOLT12 invoices in Submarine Swaps. The flow is the same as with BOLT11 invoices. BOLT12 for Reverse Swaps is currently not supported, but will be in future.
Offers
To make it as easy as possible for clients to fetch BOLT12 invoices for offers, we provide this API endpoint.
To verify the returned invoice belongs to the provided offer, the signing key of the invoice has to be checked. That singing key has to be either:
the signing key of the offer, if that is defined, or
the public key of the last hop of one of the message paths
Reference implementations for checking the signing key:
BIP-353
A common way to share BOLT12 offers is via BIP-353. After resolving the BIP-353, read the URL query parameters. BOLT12 offers are in the lno
parameter, so if it's set, a swap can be created by fetching an invoice and creating a Submarine Swap with it.
Last updated