All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Adds
signAuthorizationmethod for EIP-7702 (#407)
- Bump
@metamask/abi-utilsfrom^2.0.4to^3.0.0(#405) - Bump
@metamask/utilsfrom^9.0.0to^11.0.1(#405)
- Revert "fix: Add Permit type schema" (#401)
- Add
Permittype tosignTypedDataschema (#399)
- BREAKING: Values of type
numberare not accepted as address parameter anymore. Valid values arestringandUint8Array. (#391) - BREAKING: Drop support for Node.js versions 16, 21. (#390)
- Replace dependency
tweetnacl-utilwith@scure/base(#358)
- Remove dependency
ethjs-util(#349)
- BREAKING: fix: interpret 0x as hex in bytes encodeField (#354)
- This fixes a regression introduced in
6.0.1which caused inconsistent signatures when data was supplied as literal0x.
- This fixes a regression introduced in
- fix: Exclude test files from published release (#350)
- fix: Bump @babel/traverse from 7.21.5 to 7.23.2 (#341)
- BREAKING: Increase minimum Node.js version to v16 (#332)
- BREAKING: Bump
@metamask/abi-utilsfrom^1.0.2to^2.0.2(#326) - Bump
@metamask/utilsfrom^5.0.2to^8.1.0(#333)
- Swap out legacy
ethereumjs-abifor@metamask/abi-utils(#319)
- Bump
ethereum-cryptographyfrom^2.0.0to^2.1.2(#302) - Bump
ethereumjs/utilfrom^8.0.6to^8.1.0(#302) - Remove unused dependency
bn.js(#334) (#302)
- BREAKING: Fix
normalizefor empty strings and0(#315)- This is breaking as it changes the behavior of the function with an empty string or
0as input: it will now return0xfor an empty string and0x00for0, instead ofundefined
- This is breaking as it changes the behavior of the function with an empty string or
- rawEncode: fix broken BigNumber negativity check (#307)
- Specify type interface for multiple functions (#307)
- Improve
typeparameter input validation (#307) - deps: bn.js@4.11.8->4.12.0 (#309)
- devDeps: Support TypeScript version ~4.8.4 (#307)
- Bump ethereum-cryptography, @ethereumjs/util (#302)
- allow
bn.jsto resolve any minor/patch version above 4.11.8 (#280)
- Fix issue introduced in
v5.0.0where the methodencodeFieldencoded fields typed asbytesand passed as hexstrings were encoded differently than previous versions (#271, #274)
5.0.0 [DEPRECATED]
- BREAKING: Removed support for Node v12 in favor of v14 (#137)
- Replace heavy crypto packages for lighter noble implementations via upgrading
ethereumjs-utilto latest (now called@ethereumjs/util) (#260) - Migrate to Yarn 3 (#264)
- Fix mistake in TYPED_MESSAGE_SCHEMA (#243)
- The schema changed in v4 in a way that accidentally disallowed "reference types" (i.e. custom types) apart from the primary type. Reference types are now once again allowed.
- BREAKING: Add subpath exports (#214, #211)
- This is breaking because it prevents the import of modules that are not exposed as subpath exports.
- Add
saltto the EIP-712domaintype (#176) - Add additional unit tests (#146, #164, #167, #169, #172, #177, #180, #170, #171, #178, #173, #182, #184, #185, #187)
- Improve documentation (#157, #177, #174, #180, #178, #181, #186, #212, #207, #213)
- BREAKING: Consolidate
signTypedDataandrecoverTypedSignaturefunctions (#156)- The functions
signTypedDataLegacy,signTypedData, andsignTypedData_v4have been replaced with a singlesignTypedDatafunction with aversionparameter. Theversionparameter determines which type of signature you get.- If you used
signTypedDataLegacy, switch tosignTypedDatawith the versionV1. - If you used
signTypedData, switch tosignTypedDatawith the versionV3. - If you used
signTypedData_v4, switch tosignTypedDatawith the versionV4.
- If you used
- The functions
recoverTypedSignatureLegacy,recoverTypedSignature, andrecoverTypedSignature_v4have been replaced with a singlerecoverTypedSignaturefunction.- If you used
recoverTypedSignatureLegacy, switch torecoverTypedMessagewith the versionV1. - If you used
recoverTypedMessage, switch torecoverTypedMessagewith the versionV3. - If you used
recoverTypedSignature_v4, switch torecoverTypedMessagewith the versionV4.
- If you used
- The functions
- BREAKING: Rename
TypedDataUtils.signtoTypedDataUtils.eip712Hash(#104)- This function never actually signed anything. It just created a hash that was later signed. The new name better reflects what the function does.
- BREAKING: Move package under
@metamasknpm organization (#162)- Update your
requireandimportstatements to import@metamask/eth-sig-utilrather thaneth-sig-util.
- Update your
- BREAKING: Simplify function type signatures (#198)
- This is only a breaking change for TypeScript projects that were importing types used by the function signatures. The types should be far simpler now.
- The
TypedDatahas been updated to be more restrictive (it only allows valid typed data now), and it was renamed toTypedDataV1
- BREAKING: Replace
MsgParamsparameters with "options" parameters (#204)- This affects the following functions:
personalSignrecoverPersonalSignatureextractPublicKeyencryptencryptSafelydecryptdecryptSafelysignTypedDatarecoverTypedSignature
- All parameters are passed in as a single "options" object now, instead of the
MsgParamstype that was used for most of these functions previously. Read each function signature carefully to ensure you are correctly passing in parameters. personalSignexample:- Previously it was called like this:
personalSign(privateKey, { data }) - Now it is called like this:
personalSign({ privateKey, data })
- Previously it was called like this:
- This affects the following functions:
- BREAKING: Rename
Versiontype toSignTypedDataVersion(#218) - BREAKING: Rename
EIP712TypedDatatype toTypedDataV1Field(#218) - Add
signTypedDataversion validation (#201) - Add validation to check that parameters aren't nullish (#205)
- Enable inline sourcemaps (#159)
- Update
ethereumjs-utilto v6 (#138, #195) - Allow
TypedDataUtilsfunctions to be called unbound (#152) - Update minimum
tweetnacl-utilversion (#155) - Add Solidity types to JSON schema for
signTypedData(#189) - Replace README API docs with generated docs (#213)
3.0.1 - 2021-02-04
- Update
ethereumjs-abi(#96) - Remove unused dependencies (#117)
- Update minimum
tweetnaclto latest version (#123)
3.0.0 - 2020-11-09
- [BREAKING] Migrate to TypeScript (#74)
- Fix package metadata (#81
- Switch from Node.js v8 to Node.js v10 (#76 and #80)
2.5.4 - 2021-02-04
- Update
ethereumjs-abi(#121) - Remove unused dependencies (#120)
- Update minimum
tweetnaclto latest version (#124)