-
Notifications
You must be signed in to change notification settings - Fork 272
Removing native js dependency #257
Removing native js dependency #257
Conversation
src/account.ts
Outdated
publicKeyCreate, | ||
publicKeyVerify, | ||
publicKeyConvert, | ||
} = require('ethereum-cryptography/shims/hdkey-secp256k1v3') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return keccak512(a) | ||
} | ||
default: { | ||
throw new Error(`Invald algorithm: keccak${bits}`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/signature.ts
Outdated
@@ -1,4 +1,5 @@ | |||
import * as secp256k1 from 'secp256k1' | |||
const { sign, publicKeyConvert } = require('ethereum-cryptography/shims/hdkey-secp256k1v3') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This pull request introduces 1 alert when merging eda4d21 into 58c2476 - view on LGTM.com new alerts:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good now.
For the rest of the team, this is the first PR for implementing ethereum-cryprography
here. The other PRs are for older versions, and are a bit more complex, but will also have a bigger impact in the ecosystem, as those versions are used more frequently.
@nebojsa94 oh sorry, I merged in another PR #248, didn't expect this to conflict with this one. 😕 Could you give this a final update, I will directly merge this in afterwards. @alcuadrado thanks for the review and the additional context. Should we directly publish this as |
# Conflicts: # src/account.ts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good now, thanks @nebojsa94
Yep, this is the v7 version of these changes, so |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, this looks good, will merge this in now. Thanks @nebojsa94 and @alcuadrado for the continued effort on this! 😄
This PR removes keccak and secp256k1 dependencies and instead uses ethereum-cryptography package that doesn't require native dependency compiling