@metamask/eth-sig-util
Advanced tools
Changelog
[4.0.0]
salt
to the EIP-712 domain
type (#176)signTypedData
and recoverTypedSignature
functions (#156)
signTypedDataLegacy
, signTypedData
, and signTypedData_v4
have been replaced with a single signTypedData
function with a version
parameter. The version
parameter determines which type of signature you get.
signTypedDataLegacy
, switch to signTypedData
with the version V1
.signTypedData
, switch to signTypedData
with the version V3
.signTypedData_v4
, switch to signTypedData
with the version V4
.recoverTypedSignatureLegacy
, recoverTypedSignature
, and recoverTypedSignature_v4
have been replaced with a single recoverTypedSignature
function.
recoverTypedSignatureLegacy
, switch to recoverTypedMessage
with the version V1
.recoverTypedMessage
, switch to recoverTypedMessage
with the version V3
.recoverTypedSignature_v4
, switch to recoverTypedMessage
with the version V4
.TypedDataUtils.sign
to TypedDataUtils.eip712Hash
(#104)
@metamask
npm organization (#162)
require
and import
statements to import @metamask/eth-sig-util
rather than eth-sig-util
.TypedData
has been updated to be more restrictive (it only allows valid typed data now), and it was renamed to TypedDataV1
MsgParams
parameters with "options" parameters (#204)
personalSign
recoverPersonalSignature
extractPublicKey
encrypt
encryptSafely
decrypt
decryptSafely
signTypedData
recoverTypedSignature
MsgParams
type that was used for most of these functions previously. Read each function signature carefully to ensure you are correctly passing in parameters.personalSign
example:
personalSign(privateKey, { data })
personalSign({ privateKey, data })
Version
type to SignTypedDataVersion
(#218)EIP712TypedData
type to TypedDataV1Field
(#218)signTypedData
version validation (#201)ethereumjs-util
to v6 (#138, #195)TypedDataUtils
functions to be called unbound (#152)tweetnacl-util
version (#155)signTypedData
(#189)