ChainSafe / discv5

A Typescript implementation of the Discv5 protocol
Apache License 2.0
28 stars 15 forks source link

feat!: add pluggable enr crypto interface #266

Closed wemeetagain closed 10 months ago

wemeetagain commented 10 months ago

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: