web3-utilsFunctionsecsignecsign Callableecsign(msgHash: Buffer, privateKey: Buffer, chainId?: bigint): ECDSASignatureReturns the ECDSA signature of a message hash.If chainId is provided assume an EIP-155-style signature and calculate the v value accordingly, otherwise return a “static” v just derived from the recovery bitParametersmsgHash: BufferprivateKey: BufferoptionalchainId: bigintReturns ECDSASignature
Returns the ECDSA signature of a message hash.
If
chainId
is provided assume an EIP-155-style signature and calculate thev
value accordingly, otherwise return a “static”v
just derived from therecovery
bit