Expand description
Zap message handlers for Avestruz.
Zapping a note opens a view of its own: how much, and a word to go with it. The author’s Lightning address is then asked for an invoice, which shows as a QR code for a wallet to scan; this client holds no money and pays nothing itself.
While the invoice is on show the relays are listened to for the receipt the author’s wallet service publishes once it is paid. When it comes the view says so, and the note’s count has it. The listening stops when the view is left.
Anyone can zap. With a secret key the zap is the account’s; without one the request is signed with a key made for it, and the zap is anonymous.
Constants§
- DEFAULT_
ZAP_ 🔒SATS - What the amount field starts at, in sats.
- MAX_
AMOUNT_ 🔒DIGITS - How long an amount may be typed, in digits, and a comment, in characters.
- MAX_
COMMENT_ 🔒CHARS
Functions§
- wallet_
address 🔒 - What a wallet scans to pay
bolt11: the invoice as alightning:address, in capitals, which a QR code holds in fewer modules. - zap_
error_ 🔒text - Why there is no invoice, in the user’s language.