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
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:
enr.keypair
getV4Crypto
functioncreateKeypairFromPeerId
and vice versa withcreatePublicKeyFromPeerId
createKeypair