This repository was archived by the owner on Feb 21, 2024. It is now read-only.
Open
Conversation
e22fee9 to
e902519
Compare
fae6c7b to
d2a8def
Compare
d2a8def to
8905cd7
Compare
8905cd7 to
ac12121
Compare
ac12121 to
00b3329
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^6.2.0->7.0.7^6.2.0->^7.0.0Release Notes
ethereumjs/ethereumjs-util
v7.0.7Compare Source
stateRootcheck forAccount.isEmpty()to make emptiness checkEIP-161compliant, PR #279AddressLikeand helperbnToHex(), PR #279account.raw()which returns a Buffer Array of the raw Buffers for the account in order, PR #279v7.0.6Compare Source
New
AccountclassThis release adds a new
Accountclass intended as a modern replacement forethereumjs-account. It has a shape ofAccount(nonce?: BN, balance?: BN, stateRoot?: Buffer, codeHash?: Buffer).Instantiation
The static factory methods assist in creating an
Accountobject from varying data types:Object: fromAccountData,RLP: fromRlpSerializedAccount, andArray: fromValuesArray.Methods:
isEmpty(): boolean,isContract(): boolean,serialize(): BufferExample usage:
For more info see the documentation, examples of usage in
test/account.spec.tsorPR #275.
New export: TypeScript types
A new file with helpful TypeScript types has been added to the exports of this project,
see PR #275.
In this release it contains
BNLike,BufferLike, andTransformableToBuffer.Address.toBuffer()
The Address class has as a new method
address.toBuffer()that will give you a copy of the underlyingaddress.buf(PR #277).
toBuffer()now converts TransformableToBufferThe
toBuffer()exported function now additionally converts any object with atoBuffer()method(PR #277).
v7.0.5Compare Source
This release adds a new module
address- see README -with a new
Addressclass and type which can be used for creating and representing Ethereum addresses.Example usage:
In
TypeScriptthe associatedAddresstype can be used to more strictly enforce type checks(e.g. on the length of an address) on function parameters expecting an address input.
So you can declare a function like the following:
myAddressRelatedFunction(Address: address)to get more assurance that the address input is correct.
See PR #186
v7.0.4Compare Source
BN.jsandRLPre-export failures from TypeScript,PR #270
within the
assertIs*helper functions, issue affects most methods of thelibrary,
PR #269
v7.0.3Compare Source
This release replaces the
keccakandsecp256k1dependencies(PR #257)
and instead uses the
ethereum-cryptography
package that uses native JS implementations for cryptographic primitives
and makes use of modern and forward-compatible N-API implementations in Node
wherever possible.
This is part of a larger initiative led by Nomic Labs to improve the developer
experience within the Ethereum developer ecosystem,
see ethereum/js-organization#18 for context.
Other Changes:
TypeScriptdefinitions forethjs-utilmethods,PR #248 and
PR #260
v7.0.2Compare Source
This patch release re-establishes the state of
v7.0.0release and upgradesthe
BN.jsre-export version back tov5since quick patches for boththe
v5(v5.1.2) andthe
v4branch (v4.11.9)have been released to fix interoperability issues between the
BN.jsversions.This now makes it possible to move to the latest
BN.jsv5version and profitfrom future upgrades and patches.
An upgrade is highly recommended, the
v7.0.1release will be marked asdeprecated along this release.
See: Issue #250
v7.0.1Compare Source
[DEPRECATED in favour of v7.0.2]
This patch release downgrades the re-exported
BN.jsversion fromv5tov4(so a continuation of what has being used within thev6.xversions).This is due to some unexpected interoperability problems in libraries using
the older
v4BN.jsbranch in their some of their respective dependencies.An upgrade is highly recommended, the
v7.0.0release will be marked asdeprecated along this release.
See: Issue #250
v7.0.0Compare Source
[DEPRECATED in favour of v7.0.1]
This release comes with significant changes to the API, updated versions of
the core crypto libraries and substantial developer improvements in the form
of a refactored test suite and API documentation.
API Changes
Changes to the API have been discussed in Issue
#172 and are
guided by the principles of:
While the implemented changes come with some additional need for manual type
conversions depending on the usage context, they should finally lead to
cleaner usage patterns on the cosuming side and a more predictable, robust and
less error-prone control flow.
Some note: for methods where
Bufferusage is now enforced you can use theBytes.toBuffer()method for conversion.Account Module
Enforced Hex Prefixing for Address Strings
PR: #241
Hex prefixing is now enforced for all address string inputs and functions
will throw if a non-hex string is provided:
Account.isValidAddress()Account.isZeroAddress()Account.toChecksumAddress()Account.isValidChecksumAddress()The
Account.isPrecompile()method was removed from the code base,PR #242
Enforce Buffer Inputs for Account Methods
PR: #245
Implicit
Bufferconversions for the following methods have been removedand
Bufferinputs are now enforced:Account.generateAddress()Account.generateAddress2()Account.pubToAddress()AccountprivateToPublic()AccountimportPublic()Bytes Module
Typestrict Methods and Type-Explicit Method Split-Up
PR: #244
Bufferinput forBytes.setLengthLeft(),Bytes.setLengthRight()Bytes.setLength()has been removed (alias forBytes.setLengthLeft())Bytes.stripZeros()has been removed (alias forBytes.unPad())Bytes.unpadhas been split up into:Bytes.unpadBuffer()Bytes.unpadHexString()Bytes.unpadArray()Hash Module
Typestrict Methods and Type-Explicit Method Split-Up
PR #247
The following methods are now
Buffer-only:Hash.keccak()Hash.keccak256()Hash.sha256()Hash.ripemd160()Hash.keccak()gets the following additional convenience methods:Hash.keccakFromString()Hash.keccakFromHexString()(hex string enforced)Hash.keccakFromArray()Hash.sha256()gets the following additional convenience methods:Hash.sha256FromString()Hash.sha256FromArray()Hash.ripemd160()gets the following additional convenience methods:Hash.ripemd160FromString()Hash.ripemd160FromArray()Other Breaking Changes
PR #249
8alongPR #228
BN.jslibrary re-export from4.xto5.x,PR [#249], #249
secp2561re-export (use methods provided or import directly),PR #228
Cryto Library Updates: Keccak, secp2561
Keccakdependency has been updated from2.1.0to3.0.0. This versioncomes with prebuilds for Linux, MacOS and Windows so most users won't need
to have
node-gyprun on installation.The version update also brings in feature compatibility with newer Node.js
versions.
The
secp2561ECDSA dependency has been updated from3.0.1to4.0.1.Developer Improvements
PR #231
PR #231
TypeDocAPI documentation,PR #232 and
PR #236
PR #235
v6.2.1Compare Source
This release replaces the native
secp256k1andkeccakdependencies with ethereum-cryptopgraphy which doesn't need native compilation.Renovate configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻️ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about these updates again.
This PR has been generated by WhiteSource Renovate. View repository job log here.