Major features
- Support for GNS (Gwei Name Service), and one resolver for both GNS + ENS
- net/quoter.js: price quoter, supporting different providers chainlink, uniswap-v2, uniswap-v3.
Automatically fetches prices from the largest uniswap pool. - 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. - 10x RLP speed-up, with -81% smaller size
- 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 totruewhen signed.
Address.
addr.fromSecretKeyremoved — useaddr.fromPrivateKey.addr.REremoved.- The
allowEmptyparameter is gone fromaddr.parse,addr.addChecksumandaddr.isValid.
Typed data. recoverPublicKeyTyped → recoverAddressTyped, 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.