eth-json-rpc-middleware
Ethereum-related middleware for json-rpc-engine
.
See tests for usage details.
Running Tests
yarn test
Ethereum-related json-rpc-engine middleware.
Ethereum-related middleware for json-rpc-engine
.
See tests for usage details.
yarn test
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.
@metamask/eth-block-tracker
to 12.0.0 (#372)getLatestBlock
will no longer hang, but reject, if an error is thrown while making the request.2.0.0
of EIP-5792 (#370)atomicRequired
property to SendCallsStruct
.from
optional in SendCallsStruct
.atomic
property to GetCallsStatusResult
.address
in GetCapabilitiesParams
is added to wallet.-32602
code for all EIP-5792 schema errors.fetch
middleware so that non-standard JSON-RPC error responses are no longer treated as successful responses (#367)error
field but where there are more properties in the error object than expectedid
to SendCallsParams
.capabilities
to each call in SendCallsParams
.optional
property to both top-level and call-level capabilities.SendCallsResult
type.id
, version
, and optional capabilities
to GetCallsStatusResult
.GetCallsStatusCode
enum.GetCallsStatusHook
type.chainIds
argument to GetCapabilitiesParams
.SendCallsResult
from wallet_sendCalls
instead of string
.GetCallsStatusParams
to contain Hex
instead of string
. status
in GetCallsStatusResult
to number
instead of string
.GetTransactionReceiptsByBatchIdHook
with GetCallsStatusHook
.GetCallsStatusReceipt
type.GetTransactionReceiptsByBatchIdHook
type.wallet_sendCalls
wallet_getCallsStatus
wallet_getCapabilities
WalletMiddlewareOptions
:getCapabilities
getTransactionReceiptsByBatchId
processSendCalls
GetCallsStatusParams
GetCallsStatusReceipt
GetCallsStatusResult
GetCapabilitiesHook
GetCapabilitiesParams
GetCapabilitiesResult
GetTransactionReceiptsByBatchIdHook
ProcessSendCallsHook
SendCalls
SendCallsParams
createFetchMiddleware
(#357)createFetchMiddleware({ rpcService: AbstractRpcService; options?: { originHttpHeaderKey?: string; } })
, where AbstractRpcService
matches the same interface from @metamask/network-controller
@metamask/utils
to ^11.1.0
(#358)createFetchMiddleware
(#357)createFetchMiddleware({ btoa: typeof btoa; fetch: typeof fetch; rpcUrl: string; originHttpHeaderKey?: string; })
will be removed in a future major versionPayloadWithOrigin
type (#357)undefined
input@metamask/eth-block-tracker
from ^11.0.3
to ^11.0.4
(#351)@metamask/eth-json-rpc-provider
from ^4.1.5
to ^4.1.7
(#351)@metamask/eth-sig-util
from ^7.0.3
to ^8.1.2
(#351)@metamask/json-rpc-engine
from ^10.0.0
to ^10.0.2
(#351)@metamask/rpc-errors
from ^7.0.0
to ^7.0.2
(#351)@metamask/utils
from ^9.1.0
to ^11.0.1
(#351)@metamask/eth-block-tracker
from ^11.0.1
to ^11.0.3
(#347)@metamask/rpc-errors
from ^6.3.1
to ^7.0.0
(#342)@metamask/json-rpc-engine
from ^9.0.2
to ^10.0.0
(#342)@metamask/eth-json-rpc-provider
from ^4.1.1
to ^4.1.5
(#342)eth_sign
support (#320)ethSign
and processEthSignMessage
have been removedsendAsync
method with the request
method (#317)providerAsMiddleware
and middleware functions retryOnEmpty
, block-ref
to use the request
method.@metamask/eth-block-tracker
from ^10.0.0
to ^11.0.1
(#323)@metamask/eth-json-rpc-provider
from ^4.0.0
to ^4.1.1
(#323, #317)@metamask/eth-sig-util
from ^7.0.0
to ^7.0.3
(#323)@metamask/json-rpc-engine
from ^9.0.0
to ^9.0.2
(#323)@metamask/rpc-errors
from ^6.0.0
to ^6.3.1
(#323)@metamask/utils
from ^8.1.0
to ^9.1.0
(#323)0X
prefix with 0x
, and contract address normalization is removed for decimal and octal values (#318)eth_signTypedData_v4
fields to cause failures in blockaid's detectors.@metamask/eth-json-rpc-provider
from ^3.0.2
to ^4.0.0
(#313)@metamask/eth-block-tracker
from ^9.0.3
to ^10.0.0
(#313)@metamask/json-rpc-engine
from ^8.0.2
to ^9.0.0
(#313)@metamask/eth-block-tracker
from ^9.0.2
to ^9.0.3
(#306)@metamask/eth-json-rpc-engine
and @metamask/eth-json-rpc-provider
@metamask/eth-json-rpc-provider
from ^2.1.0
to ^3.0.2
(#306)@metamask/eth-json-rpc-engine
@metamask/json-rpc-engine
from ^7.1.1
to ^8.0.2
(#306)eth-block-tracker@^8.0.0
to @metamask/eth-block-tracker@^9.0.2
(#303)signatureMethod
property to MessageParams
(#273)version
property to eth_signTypedData
message params (#282)retryOnEmpty
middleware to not retry "execution reverted" errors (#254)signTransaction
and sendTransaction
so it preserves transaction data instead of overwriting it (#263)@metamask/utils
from ^5.0.2
to ^8.1.0
(#241)@metamask/eth-json-rpc-provider
from ^1.0.0
to ^2.1.0
(#245)^4.0.3
to @metamask/rpc-errors
^6.0.0
(#245)^6.1.0
to @metamask/json-rpc-engine
^7.1.1
(#245)@metamask/eth-sig-util
from ^6.0.0
to ^7.0.0
(#248)@metamask/eth-block-tracker
from ^7.0.1
to ^8.0.0
(#245)clone
with klona/full
(#250)eth-block-tracker
to v7 (#196, #188)blockTracker
parameter for the following functions:createBlockCacheMiddleware
createBlockRefMiddleware
createBlockRefRewriteMiddleware
createBlockTrackerInspectorMiddleware
createRetryOnEmptyMiddleware
fetch
middleware (#192, #190)fetch
and btoa
. Previously we would either use the global by that name (if one existed), or a polyfill. Those polyfills have been removed.json-stable-stringify
with safe-stable-stringify
(#104)providerFromEngine
and providerFromMiddleware
(#194)@metamask/eth-json-rpc-provider
insteadsuppressUnauthorized
option (#193)createWalletMiddleware
(#111)eth-json-rpc-middleware
to @metamask/eth-json-rpc-middleware
(#180)unknown
(#183)skipCache
request property (#178)block-ref
middleware, and prevent it from making a duplicate request (#151)retryOnEmpty
middleware and prevent it from making duplicate requests (#147)DEBUG
environment variable to metamask:eth-json-rpc-middleware:*
or metamask:*
.SafeEventEmitterProvider
type (#127)eth-block-tracker
from devDependencies
to dependencies
(#125)suppressUnauthorized
param to getAccounts
(#116)node-fetch
to resolve vulnerability (#115)v7.0.0
, query strings were silently dropped from RPC URLs passed in. Now they are preserved, as was the case in v6.0.0
.eth_signTransaction
support (#96)send
method to provider and ethersProviderAsMiddleware
(#97)blockTrackerInspectorMiddleware
(#88)/src
folder (#60)url
dependency with native URL global (#67)eth-json-rpc-middleware/wallet-parity.js
json-rpc-engine
.retryOnEmpty
middleware error messages (#58)providerFromEngine
callback parameter validation (#76)eth-json-rpc-middleware/vm.js