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

feat!: add pluggable enr crypto interface #266

Merged
merged 2 commits into from
Nov 16, 2023

Conversation

wemeetagain
Copy link
Member

This is a prerequisite towards pulling the enr code into a separate package.
The core change here is de-tangling the enr code from the rest of the discv5 code.

One consideration there is allowing the cryptography to be swapped out by consumers. Generally, the fastest crypto implementations aren't browser compatible, or are overkill when installing a package (requiring lengthy compilation step when npm intsalling).
A future PR will remove bcrypto as the default crypto impl.

BREAKING CHANGE:

  • remove enr.keypair
  • export enr v4 crypto from getV4Crypto function
  • replace createKeypairFromPeerId and vice versa with createPublicKeyFromPeerId
  • refactor createKeypair

@wemeetagain wemeetagain requested a review from a team as a code owner November 15, 2023 15:36
@wemeetagain wemeetagain changed the title fix!: add pluggable enr crypto interface feat!: add pluggable enr crypto interface Nov 15, 2023
@wemeetagain wemeetagain merged commit 3475758 into master Nov 16, 2023
7 checks passed
@wemeetagain wemeetagain deleted the cayman/simplify-keypair branch November 16, 2023 14:18
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.

1 participant