The server acts on behalf of the client though right? The wallet has to make a request to the server to claim the tokens once the invoice is fulfilled? I’m trying to do something similar to what you did with npub.cash and make it so users can sign up for a [username]@westernbtc.com by also submitting this p2pk. What I’m hearing from you is that I’d need to implement something in the wallet to claim these tokens when the wallet wakes up?
Discussion
Correct! What's easier to do is to not mint the tokens on the server though but to create a mint quote that the user can then mint when they come online. That way the server wouldn't have to store any proofs.
You can use NUT-20 to lock a mint quote to a user key so the server can't rug it: https://cashubtc.github.io/nuts/20/
npub.cash is transitioning to this model
> lock a mint quote to a user key so the server can't rug it
That was something I felt uneasy about when I was following this process. Glad to hear this is changing.
Another question. If they want to use LUD16 with https://westernbtc.com, I would still need a static public key from them. Would they just update this whenever they don't want mints to be linked together? And as far as not being able to rug them with the quote id for the mint, is there information in the memo of the lightning invoice the payer would need to verify? Or am I supposed to send back more information for that purpose?