Skip to content

Instantly share code, notes, and snippets.

View calvadev's full-sized avatar
🎯
Focusing

calvadev⚡️ calvadev

🎯
Focusing
View GitHub Profile

A Proof of Liabilities Scheme for Ecash Mints

Abstract: In this document, I will outline a proof-of-liabilities (PoL) scheme for ecash systems and Cashu specifically, which is a Chaumian ecash system for Bitcoin. The PoL scheme consists of three parts. First, a publicly auditable list of all issued ecash tokens in the form of mint proofs, and second, a publicly auditable list of all redeemed ecash tokens in the form of burn proofs, which are both regularly published by the mint operator. Third, a mint publicly commits to rotate its keys regularly once each epoch and allows all ecash in circulation to recycle from old epochs to the newest one. If clients remain vigilant and mints agree on a certain set of rules of operation which are publicly verifiable, users of a mint can detect whether a cheating mint has printed unbacked ecash during a past epoch, and, in many cases, provide public proofs of the mint engaging in this adversary behavior. Users achieve this by regularly checking t

@callebtc
callebtc / cashu-redeem.md
Last active February 20, 2024 00:19
How to redeem a Cashu token to Lightning

Redeem Cashu tokens to Lightning

This gist very briefly describes how to redeem a Cashu token to a Lightning wallet. It uses no Cashu libraries as dependencies. JavaScript code is provided as an example.

Parsing

  1. Base64-urlsafe decode the part of the token after cashuA...
  2. You will get a JSON, let's call it cashu.
  3. Notice the proofs in cashu.token[0].proofs
  4. Get the Mint URL in cashu.token[0].mint