The sender must first swap with the mint for an ecash token locked to the receiver's pubkey. The mint will not allow this token to be swapped again without a valid signature from the private key that corresponds to the receiver's pubkey. This guarantees that no one else can spend that ecash token, not even the person who created it.

Cashu can't quite do offline sending, only half offline.

Reply to this note

Please Login to reply.

Discussion

Oh I see, that makes more sense. Thanks!

"How does the recipient verify the spending conditions?"

The recipient needs to know the pubkeys of the mint (and ideally, establish a trust relationship) before they go offline.

"What if the receiver doesn't claim it?"

The spending conditions include a timeout clause so the sender can claim the token back if the receiver never claims it.

"What if the recipient is online but the sender is offline?"

No problem. The sender does not need to be online to send ecash. The recipient can swap it immediately with the mint.

"What if they are both offline?"

If the sender knows the recipient's pubkey before they go offline they can lock some ecash to the recipient's pubkey when they are online and transfer some or all of those tokens to the recipient while both parties are offline. Any unspent ecash can be reclaimed by the sender (err, the would be sender) when the timelock runs out.