Skip to content

0.20.0

Latest

Choose a tag to compare

@paulmillr paulmillr released this 09 Aug 06:53
· 2 commits to main since this release
Immutable release. Only release title and notes can be modified.
0.20.0
18be7aa

Major features

  1. Support for GNS (Gwei Name Service), and one resolver for both GNS + ENS
  2. net/quoter.js: price quoter, supporting different providers chainlink, uniswap-v2, uniswap-v3.
    Automatically fetches prices from the largest uniswap pool.
  3. net/history.js, net/enrich.js: new APIs for block explorer-like functionality.
    We've built a block explorer demo with it, in the repo.
  4. 10x RLP speed-up, with -81% smaller size
  5. Faster KZG and SSZ

Breaking

Removed advanced: all modules were moved to the top-level.

Network layer. Web3Provider is now RpcClient, and net.js no longer re-exports the
protocol wrappers:

0.19.0 (net.js) HEAD
Web3Provider RpcClient (net.js)
ENS NameResolver (net/resolver.js)
UniswapV2, UniswapV3 same names, net/uniswap.js
Chainlink folded into Quoter (net/quoter.js) as the 'chainlink' provider
calcTransfersDiff net/history.js

Transaction.

  • Transaction.fromRawBytes()Transaction.fromBytes().
  • Constructor takes an options object: new Transaction(type, raw, { strict, allowSignatureFields })
    instead of positional (type, raw, strict, allowSignatureFields).
  • setWholeAmount(balance, burnRemaining)setWholeAmount(balance, { burnRemaining }).
  • toBytes() / toHex() take { includeSignature }, defaulting to true when signed.

Address.

  • addr.fromSecretKey removed — use addr.fromPrivateKey.
  • addr.RE removed.
  • The allowEmpty parameter is gone from addr.parse, addr.addChecksum and addr.isValid.

Typed data. recoverPublicKeyTypedrecoverAddressTyped, which returns a checksummed
address instead of secp256k1 public key bytes. Internally core/typed-data.ts split into
core/message.ts and core/authorization.ts.

RLP. The exported InternalRLP type (the old tagged intermediate tree) is removed; it was
reachable through the ./core/rlp.js subpath. RLP.encode(3.5) now throws
invalid integer as argument instead of misbehaving during byte conversion. The
CoderType<RLPInput> public API is otherwise unchanged.