Skip to content

Commit

Permalink
enfore valid DLEQ on minting auth proofs
Browse files Browse the repository at this point in the history
  • Loading branch information
Egge21M committed Feb 6, 2025
1 parent 601ca25 commit 798093e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/auth/CashuAuthWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,11 @@ class CashuAuthWallet {
outputs: outputData.map((d) => d.blindedMessage)
};
const { signatures } = await this.mint.mint(mintPayload, clearAuthToken);
return outputData.map((d, i) => d.toProof(signatures[i], keyset));
const authProofs = outputData.map((d, i) => d.toProof(signatures[i], keyset));
if (authProofs.some((p) => !p.dleqValid)) {
throw new Error('Mint returned auth proofs with invalid DLEQ');
}
return authProofs;
}
}

Expand Down

0 comments on commit 798093e

Please sign in to comment.