Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use cashu crypto library functions, remove dhke and secrets module #134

Merged
merged 6 commits into from
May 21, 2024

Conversation

capitalist42
Copy link
Contributor

Description

All functions related to BDHKE and restoring signatures (from secrets) were copied to the "@cashu/crypto" library.
This pull request aims to refactor code to use functions from the library.
...

Changes

  • remove 'dhke' module and related test cases
  • remove 'secrets' module and related test cases
  • replace functions with "@cashu/crypto"

PR Tasks

  • Open PR
  • run npm run test --> no failing unit tests
  • run npm run format

@capitalist42 capitalist42 force-pushed the use-cashu-crypto-library branch from c30fe27 to 32dbd12 Compare May 20, 2024 04:37
@capitalist42 capitalist42 force-pushed the use-cashu-crypto-library branch from 32dbd12 to 00c2b08 Compare May 20, 2024 06:45
@capitalist42 capitalist42 marked this pull request as ready for review May 20, 2024 07:29
Copy link
Collaborator

@gandlafbtc gandlafbtc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice Work!

I added a comment on the constructProofs function, but we can do it later. We can merge this as is 🥳

@@ -682,6 +690,31 @@ class CashuWallet {
const { blindedMessages, rs, secrets } = this.createBlindedMessages(amounts, keysetId, counter);
return { blindedMessages, secrets, rs };
}

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would probably make sense to move this to the cashu-crypto lib too. We can do it in a later PR though

@gandlafbtc gandlafbtc merged commit 3e20f45 into cashubtc:staging May 21, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants