This repository was archived by the owner on Jun 17, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed
Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change 9494 "create-hash" : " ^1.1.2" ,
9595 "ethereum-cryptography" : " ^0.1.3" ,
9696 "ethjs-util" : " 0.1.6" ,
97- "rlp" : " ^2.2.4" ,
98- "secp256k1" : " ^4.0.1"
97+ "rlp" : " ^2.2.4"
9998 },
10099 "devDependencies" : {
101100 "@ethereumjs/config-prettier" : " ^1.1.0" ,
Original file line number Diff line number Diff line change 1- const { recover , sign, publicKeyConvert } = require ( 'ethereum-cryptography/shims/hdkey-secp256k1v3' )
2- import * as secp256k1 from ' secp256k1'
1+ const { sign, publicKeyConvert } = require ( 'ethereum-cryptography/shims/hdkey-secp256k1v3' )
2+ const { ecdsaRecover } = require ( 'ethereum-cryptography/ secp256k1')
33import * as BN from 'bn.js'
44import { toBuffer , setLengthLeft , bufferToHex } from './bytes'
55import { keccak } from './hash'
@@ -47,7 +47,7 @@ export const ecrecover = function(
4747 if ( ! isValidSigRecovery ( recovery ) ) {
4848 throw new Error ( 'Invalid signature v value' )
4949 }
50- const senderPubKey = secp256k1 . ecdsaRecover ( signature , recovery , msgHash )
50+ const senderPubKey = ecdsaRecover ( signature , recovery , msgHash )
5151 return toBuffer ( publicKeyConvert ( senderPubKey , false ) . slice ( 1 ) )
5252}
5353
You can’t perform that action at this time.
0 commit comments