1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-22 01:47:00 +01:00

Update eth-json-rpc-middleware from v9 to v10 (#17591)

This release only includes one breaking change, which is the renaming
of the package to be under the `@metamask` scope. It includes
improvements to the types that will unblock migrating our network
clients to TypeScript.
This commit is contained in:
Mark Stacey 2023-02-27 13:19:08 -03:30 committed by GitHub
parent ddbd158e79
commit e223348fb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 263 additions and 263 deletions

View File

@ -6,7 +6,7 @@ import {
createInflightCacheMiddleware, createInflightCacheMiddleware,
createBlockTrackerInspectorMiddleware, createBlockTrackerInspectorMiddleware,
providerFromMiddleware, providerFromMiddleware,
} from 'eth-json-rpc-middleware'; } from '@metamask/eth-json-rpc-middleware';
import { createInfuraMiddleware } from '@metamask/eth-json-rpc-infura'; import { createInfuraMiddleware } from '@metamask/eth-json-rpc-infura';
import { PollingBlockTracker } from 'eth-block-tracker'; import { PollingBlockTracker } from 'eth-block-tracker';

View File

@ -6,7 +6,7 @@ import {
createInflightCacheMiddleware, createInflightCacheMiddleware,
createBlockTrackerInspectorMiddleware, createBlockTrackerInspectorMiddleware,
providerFromMiddleware, providerFromMiddleware,
} from 'eth-json-rpc-middleware'; } from '@metamask/eth-json-rpc-middleware';
import { PollingBlockTracker } from 'eth-block-tracker'; import { PollingBlockTracker } from 'eth-block-tracker';
import { SECOND } from '../../../../shared/constants/time'; import { SECOND } from '../../../../shared/constants/time';

View File

@ -5,7 +5,7 @@ import { JsonRpcEngine } from 'json-rpc-engine';
import { import {
providerFromEngine, providerFromEngine,
providerFromMiddleware, providerFromMiddleware,
} from 'eth-json-rpc-middleware'; } from '@metamask/eth-json-rpc-middleware';
import log from 'loglevel'; import log from 'loglevel';
import { import {
createSwappableProxy, createSwappableProxy,

View File

@ -2,13 +2,13 @@ import { inspect, isDeepStrictEqual, promisify } from 'util';
import { isMatch } from 'lodash'; import { isMatch } from 'lodash';
import nock from 'nock'; import nock from 'nock';
import sinon from 'sinon'; import sinon from 'sinon';
import * as ethJsonRpcMiddlewareModule from 'eth-json-rpc-middleware'; import * as ethJsonRpcMiddlewareModule from '@metamask/eth-json-rpc-middleware';
import NetworkController from './network-controller'; import NetworkController from './network-controller';
jest.mock('eth-json-rpc-middleware', () => { jest.mock('@metamask/eth-json-rpc-middleware', () => {
return { return {
__esModule: true, __esModule: true,
...jest.requireActual('eth-json-rpc-middleware'), ...jest.requireActual('@metamask/eth-json-rpc-middleware'),
}; };
}); });

View File

@ -1,7 +1,7 @@
import nock from 'nock'; import nock from 'nock';
import sinon from 'sinon'; import sinon from 'sinon';
import { JsonRpcEngine } from 'json-rpc-engine'; import { JsonRpcEngine } from 'json-rpc-engine';
import { providerFromEngine } from 'eth-json-rpc-middleware'; import { providerFromEngine } from '@metamask/eth-json-rpc-middleware';
import EthQuery from 'eth-query'; import EthQuery from 'eth-query';
import createInfuraClient from '../createInfuraClient'; import createInfuraClient from '../createInfuraClient';
import createJsonRpcClient from '../createJsonRpcClient'; import createJsonRpcClient from '../createJsonRpcClient';

View File

@ -1,5 +1,5 @@
import { createScaffoldMiddleware, mergeMiddleware } from 'json-rpc-engine'; import { createScaffoldMiddleware, mergeMiddleware } from 'json-rpc-engine';
import { createWalletMiddleware } from 'eth-json-rpc-middleware'; import { createWalletMiddleware } from '@metamask/eth-json-rpc-middleware';
import { import {
createPendingNonceMiddleware, createPendingNonceMiddleware,
createPendingTxMiddleware, createPendingTxMiddleware,

View File

@ -5,7 +5,7 @@ import { storeAsStream } from '@metamask/obs-store/dist/asStream';
import { JsonRpcEngine } from 'json-rpc-engine'; import { JsonRpcEngine } from 'json-rpc-engine';
import { debounce } from 'lodash'; import { debounce } from 'lodash';
import { createEngineStream } from 'json-rpc-middleware-stream'; import { createEngineStream } from 'json-rpc-middleware-stream';
import { providerAsMiddleware } from 'eth-json-rpc-middleware'; import { providerAsMiddleware } from '@metamask/eth-json-rpc-middleware';
import { import {
KeyringController, KeyringController,
keyringBuilderFactory, keyringBuilderFactory,

View File

@ -871,14 +871,34 @@
"ethjs>ethjs-util>strip-hex-prefix": true "ethjs>ethjs-util>strip-hex-prefix": true
} }
}, },
"@metamask/eth-json-rpc-middleware": {
"globals": {
"URL": true,
"btoa": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/eth-json-rpc-middleware>pify": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"@metamask/utils": true,
"browserify>browser-resolve": true,
"eth-rpc-errors": true,
"json-rpc-engine": true,
"json-rpc-engine>@metamask/safe-event-emitter": true,
"lavamoat>json-stable-stringify": true,
"vinyl>clone": true
}
},
"@metamask/eth-keyring-controller": { "@metamask/eth-keyring-controller": {
"packages": { "packages": {
"@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": true, "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": true, "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": true,
"@metamask/eth-keyring-controller>obs-store": true, "@metamask/eth-keyring-controller>obs-store": true,
"@metamask/rpc-methods>@metamask/browser-passworder": true, "@metamask/rpc-methods>@metamask/browser-passworder": true,
"browserify>events": true, "browserify>events": true
"eth-json-rpc-middleware>@metamask/eth-sig-util": true
} }
}, },
"@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": { "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": {
@ -887,9 +907,9 @@
}, },
"packages": { "packages": {
"@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": true, "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"@metamask/scure-bip39": true, "@metamask/scure-bip39": true,
"browserify>buffer": true, "browserify>buffer": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util": true,
"eth-lattice-keyring>@ethereumjs/util": true "eth-lattice-keyring>@ethereumjs/util": true
} }
}, },
@ -909,12 +929,45 @@
"crypto": true "crypto": true
} }
}, },
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": {
"packages": {
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethjs-util": true,
"bn.js": true,
"browserify>buffer": true,
"eth-lattice-keyring>@ethereumjs/util": true,
"eth-sig-util>tweetnacl": true,
"eth-sig-util>tweetnacl-util": true
}
},
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": {
"globals": {
"TextDecoder": true,
"crypto": true
},
"packages": {
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
}
},
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethjs-util": {
"packages": {
"browserify>buffer": true,
"ethjs>ethjs-util>is-hex-prefixed": true,
"ethjs>ethjs-util>strip-hex-prefix": true
}
},
"@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": { "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": {
"packages": { "packages": {
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": true, "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": true,
"browserify>buffer": true, "browserify>buffer": true,
"browserify>events": true, "browserify>events": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util": true,
"eth-lattice-keyring>@ethereumjs/util": true, "eth-lattice-keyring>@ethereumjs/util": true,
"ethereumjs-wallet>randombytes": true "ethereumjs-wallet>randombytes": true
} }
@ -2575,59 +2628,6 @@
"wait-on>rxjs>tslib": true "wait-on>rxjs>tslib": true
} }
}, },
"eth-json-rpc-middleware": {
"globals": {
"URL": true,
"btoa": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/utils": true,
"browserify>browser-resolve": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util": true,
"eth-json-rpc-middleware>pify": true,
"eth-rpc-errors": true,
"json-rpc-engine": true,
"json-rpc-engine>@metamask/safe-event-emitter": true,
"lavamoat>json-stable-stringify": true,
"vinyl>clone": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util": {
"packages": {
"bn.js": true,
"browserify>buffer": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethjs-util": true,
"eth-lattice-keyring>@ethereumjs/util": true,
"eth-sig-util>tweetnacl": true,
"eth-sig-util>tweetnacl-util": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": {
"globals": {
"TextDecoder": true,
"crypto": true
},
"packages": {
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethjs-util": {
"packages": {
"browserify>buffer": true,
"ethjs>ethjs-util>is-hex-prefixed": true,
"ethjs>ethjs-util>strip-hex-prefix": true
}
},
"eth-keyring-controller>@metamask/browser-passworder": { "eth-keyring-controller>@metamask/browser-passworder": {
"globals": { "globals": {
"crypto": true "crypto": true
@ -3022,8 +3022,8 @@
}, },
"packages": { "packages": {
"@babel/runtime": true, "@babel/runtime": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"browserify>events": true, "browserify>events": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util": true,
"eth-trezor-keyring>trezor-connect>cross-fetch": true "eth-trezor-keyring>trezor-connect>cross-fetch": true
} }
}, },

View File

@ -923,14 +923,34 @@
"ethjs>ethjs-util>strip-hex-prefix": true "ethjs>ethjs-util>strip-hex-prefix": true
} }
}, },
"@metamask/eth-json-rpc-middleware": {
"globals": {
"URL": true,
"btoa": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/eth-json-rpc-middleware>pify": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"@metamask/utils": true,
"browserify>browser-resolve": true,
"eth-rpc-errors": true,
"json-rpc-engine": true,
"json-rpc-engine>@metamask/safe-event-emitter": true,
"lavamoat>json-stable-stringify": true,
"vinyl>clone": true
}
},
"@metamask/eth-keyring-controller": { "@metamask/eth-keyring-controller": {
"packages": { "packages": {
"@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": true, "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": true, "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": true,
"@metamask/eth-keyring-controller>obs-store": true, "@metamask/eth-keyring-controller>obs-store": true,
"@metamask/rpc-methods>@metamask/browser-passworder": true, "@metamask/rpc-methods>@metamask/browser-passworder": true,
"browserify>events": true, "browserify>events": true
"eth-json-rpc-middleware>@metamask/eth-sig-util": true
} }
}, },
"@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": { "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": {
@ -939,9 +959,9 @@
}, },
"packages": { "packages": {
"@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": true, "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"@metamask/scure-bip39": true, "@metamask/scure-bip39": true,
"browserify>buffer": true, "browserify>buffer": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util": true,
"eth-lattice-keyring>@ethereumjs/util": true "eth-lattice-keyring>@ethereumjs/util": true
} }
}, },
@ -961,12 +981,45 @@
"crypto": true "crypto": true
} }
}, },
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": {
"packages": {
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethjs-util": true,
"bn.js": true,
"browserify>buffer": true,
"eth-lattice-keyring>@ethereumjs/util": true,
"eth-sig-util>tweetnacl": true,
"eth-sig-util>tweetnacl-util": true
}
},
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": {
"globals": {
"TextDecoder": true,
"crypto": true
},
"packages": {
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
}
},
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethjs-util": {
"packages": {
"browserify>buffer": true,
"ethjs>ethjs-util>is-hex-prefixed": true,
"ethjs>ethjs-util>strip-hex-prefix": true
}
},
"@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": { "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": {
"packages": { "packages": {
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": true, "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": true,
"browserify>buffer": true, "browserify>buffer": true,
"browserify>events": true, "browserify>events": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util": true,
"eth-lattice-keyring>@ethereumjs/util": true, "eth-lattice-keyring>@ethereumjs/util": true,
"ethereumjs-wallet>randombytes": true "ethereumjs-wallet>randombytes": true
} }
@ -2941,59 +2994,6 @@
"wait-on>rxjs>tslib": true "wait-on>rxjs>tslib": true
} }
}, },
"eth-json-rpc-middleware": {
"globals": {
"URL": true,
"btoa": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/utils": true,
"browserify>browser-resolve": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util": true,
"eth-json-rpc-middleware>pify": true,
"eth-rpc-errors": true,
"json-rpc-engine": true,
"json-rpc-engine>@metamask/safe-event-emitter": true,
"lavamoat>json-stable-stringify": true,
"vinyl>clone": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util": {
"packages": {
"bn.js": true,
"browserify>buffer": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethjs-util": true,
"eth-lattice-keyring>@ethereumjs/util": true,
"eth-sig-util>tweetnacl": true,
"eth-sig-util>tweetnacl-util": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": {
"globals": {
"TextDecoder": true,
"crypto": true
},
"packages": {
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethjs-util": {
"packages": {
"browserify>buffer": true,
"ethjs>ethjs-util>is-hex-prefixed": true,
"ethjs>ethjs-util>strip-hex-prefix": true
}
},
"eth-keyring-controller>@metamask/browser-passworder": { "eth-keyring-controller>@metamask/browser-passworder": {
"globals": { "globals": {
"crypto": true "crypto": true
@ -3388,8 +3388,8 @@
}, },
"packages": { "packages": {
"@babel/runtime": true, "@babel/runtime": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"browserify>events": true, "browserify>events": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util": true,
"eth-trezor-keyring>trezor-connect>cross-fetch": true "eth-trezor-keyring>trezor-connect>cross-fetch": true
} }
}, },

View File

@ -871,14 +871,34 @@
"ethjs>ethjs-util>strip-hex-prefix": true "ethjs>ethjs-util>strip-hex-prefix": true
} }
}, },
"@metamask/eth-json-rpc-middleware": {
"globals": {
"URL": true,
"btoa": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/eth-json-rpc-middleware>pify": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"@metamask/utils": true,
"browserify>browser-resolve": true,
"eth-rpc-errors": true,
"json-rpc-engine": true,
"json-rpc-engine>@metamask/safe-event-emitter": true,
"lavamoat>json-stable-stringify": true,
"vinyl>clone": true
}
},
"@metamask/eth-keyring-controller": { "@metamask/eth-keyring-controller": {
"packages": { "packages": {
"@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": true, "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": true, "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": true,
"@metamask/eth-keyring-controller>obs-store": true, "@metamask/eth-keyring-controller>obs-store": true,
"@metamask/rpc-methods>@metamask/browser-passworder": true, "@metamask/rpc-methods>@metamask/browser-passworder": true,
"browserify>events": true, "browserify>events": true
"eth-json-rpc-middleware>@metamask/eth-sig-util": true
} }
}, },
"@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": { "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": {
@ -887,9 +907,9 @@
}, },
"packages": { "packages": {
"@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": true, "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"@metamask/scure-bip39": true, "@metamask/scure-bip39": true,
"browserify>buffer": true, "browserify>buffer": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util": true,
"eth-lattice-keyring>@ethereumjs/util": true "eth-lattice-keyring>@ethereumjs/util": true
} }
}, },
@ -909,12 +929,45 @@
"crypto": true "crypto": true
} }
}, },
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": {
"packages": {
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethjs-util": true,
"bn.js": true,
"browserify>buffer": true,
"eth-lattice-keyring>@ethereumjs/util": true,
"eth-sig-util>tweetnacl": true,
"eth-sig-util>tweetnacl-util": true
}
},
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": {
"globals": {
"TextDecoder": true,
"crypto": true
},
"packages": {
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
}
},
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethjs-util": {
"packages": {
"browserify>buffer": true,
"ethjs>ethjs-util>is-hex-prefixed": true,
"ethjs>ethjs-util>strip-hex-prefix": true
}
},
"@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": { "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": {
"packages": { "packages": {
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": true, "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": true,
"browserify>buffer": true, "browserify>buffer": true,
"browserify>events": true, "browserify>events": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util": true,
"eth-lattice-keyring>@ethereumjs/util": true, "eth-lattice-keyring>@ethereumjs/util": true,
"ethereumjs-wallet>randombytes": true "ethereumjs-wallet>randombytes": true
} }
@ -2889,59 +2942,6 @@
"wait-on>rxjs>tslib": true "wait-on>rxjs>tslib": true
} }
}, },
"eth-json-rpc-middleware": {
"globals": {
"URL": true,
"btoa": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/utils": true,
"browserify>browser-resolve": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util": true,
"eth-json-rpc-middleware>pify": true,
"eth-rpc-errors": true,
"json-rpc-engine": true,
"json-rpc-engine>@metamask/safe-event-emitter": true,
"lavamoat>json-stable-stringify": true,
"vinyl>clone": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util": {
"packages": {
"bn.js": true,
"browserify>buffer": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethjs-util": true,
"eth-lattice-keyring>@ethereumjs/util": true,
"eth-sig-util>tweetnacl": true,
"eth-sig-util>tweetnacl-util": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": {
"globals": {
"TextDecoder": true,
"crypto": true
},
"packages": {
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethjs-util": {
"packages": {
"browserify>buffer": true,
"ethjs>ethjs-util>is-hex-prefixed": true,
"ethjs>ethjs-util>strip-hex-prefix": true
}
},
"eth-keyring-controller>@metamask/browser-passworder": { "eth-keyring-controller>@metamask/browser-passworder": {
"globals": { "globals": {
"crypto": true "crypto": true
@ -3336,8 +3336,8 @@
}, },
"packages": { "packages": {
"@babel/runtime": true, "@babel/runtime": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"browserify>events": true, "browserify>events": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util": true,
"eth-trezor-keyring>trezor-connect>cross-fetch": true "eth-trezor-keyring>trezor-connect>cross-fetch": true
} }
}, },

View File

@ -871,14 +871,34 @@
"ethjs>ethjs-util>strip-hex-prefix": true "ethjs>ethjs-util>strip-hex-prefix": true
} }
}, },
"@metamask/eth-json-rpc-middleware": {
"globals": {
"URL": true,
"btoa": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/eth-json-rpc-middleware>pify": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"@metamask/utils": true,
"browserify>browser-resolve": true,
"eth-rpc-errors": true,
"json-rpc-engine": true,
"json-rpc-engine>@metamask/safe-event-emitter": true,
"lavamoat>json-stable-stringify": true,
"vinyl>clone": true
}
},
"@metamask/eth-keyring-controller": { "@metamask/eth-keyring-controller": {
"packages": { "packages": {
"@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": true, "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": true, "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": true,
"@metamask/eth-keyring-controller>obs-store": true, "@metamask/eth-keyring-controller>obs-store": true,
"@metamask/rpc-methods>@metamask/browser-passworder": true, "@metamask/rpc-methods>@metamask/browser-passworder": true,
"browserify>events": true, "browserify>events": true
"eth-json-rpc-middleware>@metamask/eth-sig-util": true
} }
}, },
"@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": { "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring": {
@ -887,9 +907,9 @@
}, },
"packages": { "packages": {
"@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": true, "@metamask/eth-keyring-controller>@metamask/eth-hd-keyring>ethereum-cryptography": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"@metamask/scure-bip39": true, "@metamask/scure-bip39": true,
"browserify>buffer": true, "browserify>buffer": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util": true,
"eth-lattice-keyring>@ethereumjs/util": true "eth-lattice-keyring>@ethereumjs/util": true
} }
}, },
@ -909,12 +929,45 @@
"crypto": true "crypto": true
} }
}, },
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": {
"packages": {
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethjs-util": true,
"bn.js": true,
"browserify>buffer": true,
"eth-lattice-keyring>@ethereumjs/util": true,
"eth-sig-util>tweetnacl": true,
"eth-sig-util>tweetnacl-util": true
}
},
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography": {
"globals": {
"TextDecoder": true,
"crypto": true
},
"packages": {
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
}
},
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"@metamask/eth-keyring-controller>@metamask/eth-sig-util>ethjs-util": {
"packages": {
"browserify>buffer": true,
"ethjs>ethjs-util>is-hex-prefixed": true,
"ethjs>ethjs-util>strip-hex-prefix": true
}
},
"@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": { "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring": {
"packages": { "packages": {
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": true, "@metamask/eth-keyring-controller>@metamask/eth-simple-keyring>ethereum-cryptography": true,
"browserify>buffer": true, "browserify>buffer": true,
"browserify>events": true, "browserify>events": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util": true,
"eth-lattice-keyring>@ethereumjs/util": true, "eth-lattice-keyring>@ethereumjs/util": true,
"ethereumjs-wallet>randombytes": true "ethereumjs-wallet>randombytes": true
} }
@ -2575,59 +2628,6 @@
"wait-on>rxjs>tslib": true "wait-on>rxjs>tslib": true
} }
}, },
"eth-json-rpc-middleware": {
"globals": {
"URL": true,
"btoa": true,
"console.error": true,
"fetch": true,
"setTimeout": true
},
"packages": {
"@metamask/utils": true,
"browserify>browser-resolve": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util": true,
"eth-json-rpc-middleware>pify": true,
"eth-rpc-errors": true,
"json-rpc-engine": true,
"json-rpc-engine>@metamask/safe-event-emitter": true,
"lavamoat>json-stable-stringify": true,
"vinyl>clone": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util": {
"packages": {
"bn.js": true,
"browserify>buffer": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethjs-util": true,
"eth-lattice-keyring>@ethereumjs/util": true,
"eth-sig-util>tweetnacl": true,
"eth-sig-util>tweetnacl-util": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography": {
"globals": {
"TextDecoder": true,
"crypto": true
},
"packages": {
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethereum-cryptography>@noble/hashes": {
"globals": {
"TextEncoder": true,
"crypto": true
}
},
"eth-json-rpc-middleware>@metamask/eth-sig-util>ethjs-util": {
"packages": {
"browserify>buffer": true,
"ethjs>ethjs-util>is-hex-prefixed": true,
"ethjs>ethjs-util>strip-hex-prefix": true
}
},
"eth-keyring-controller>@metamask/browser-passworder": { "eth-keyring-controller>@metamask/browser-passworder": {
"globals": { "globals": {
"crypto": true "crypto": true
@ -3022,8 +3022,8 @@
}, },
"packages": { "packages": {
"@babel/runtime": true, "@babel/runtime": true,
"@metamask/eth-keyring-controller>@metamask/eth-sig-util": true,
"browserify>events": true, "browserify>events": true,
"eth-json-rpc-middleware>@metamask/eth-sig-util": true,
"eth-trezor-keyring>trezor-connect>cross-fetch": true "eth-trezor-keyring>trezor-connect>cross-fetch": true
} }
}, },

View File

@ -233,6 +233,7 @@
"@metamask/design-tokens": "^1.9.0", "@metamask/design-tokens": "^1.9.0",
"@metamask/desktop": "^0.2.0", "@metamask/desktop": "^0.2.0",
"@metamask/eth-json-rpc-infura": "^7.0.0", "@metamask/eth-json-rpc-infura": "^7.0.0",
"@metamask/eth-json-rpc-middleware": "^10.0.0",
"@metamask/eth-keyring-controller": "^10.0.0", "@metamask/eth-keyring-controller": "^10.0.0",
"@metamask/eth-ledger-bridge-keyring": "^0.13.0", "@metamask/eth-ledger-bridge-keyring": "^0.13.0",
"@metamask/eth-token-tracker": "^4.0.0", "@metamask/eth-token-tracker": "^4.0.0",
@ -286,7 +287,6 @@
"eth-block-tracker": "^6.0.0", "eth-block-tracker": "^6.0.0",
"eth-ens-namehash": "^2.0.8", "eth-ens-namehash": "^2.0.8",
"eth-json-rpc-filters": "^6.0.0", "eth-json-rpc-filters": "^6.0.0",
"eth-json-rpc-middleware": "^9.0.1",
"eth-lattice-keyring": "^0.12.3", "eth-lattice-keyring": "^0.12.3",
"eth-method-registry": "^2.0.0", "eth-method-registry": "^2.0.0",
"eth-query": "^2.1.2", "eth-query": "^2.1.2",

View File

@ -1,5 +1,5 @@
import { JsonRpcEngine, createScaffoldMiddleware } from 'json-rpc-engine'; import { JsonRpcEngine, createScaffoldMiddleware } from 'json-rpc-engine';
import { providerAsMiddleware } from 'eth-json-rpc-middleware'; import { providerAsMiddleware } from '@metamask/eth-json-rpc-middleware';
import Ganache from 'ganache'; import Ganache from 'ganache';
export function getTestSeed() { export function getTestSeed() {

View File

@ -3769,6 +3769,25 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"@metamask/eth-json-rpc-middleware@npm:^10.0.0":
version: 10.0.0
resolution: "@metamask/eth-json-rpc-middleware@npm:10.0.0"
dependencies:
"@metamask/eth-sig-util": ^5.0.0
"@metamask/safe-event-emitter": ^2.0.0
"@metamask/utils": ^3.0.3
btoa: ^1.2.1
clone: ^2.1.1
eth-block-tracker: ^5.0.1
eth-rpc-errors: ^4.0.3
json-rpc-engine: ^6.1.0
json-stable-stringify: ^1.0.1
node-fetch: ^2.6.7
pify: ^3.0.0
checksum: c754b3a39f175698070b4d07076e692d3080738bd25157c3b93114d286c975ee6895d5793b4188ca3d0abbcdef04bfde9e2d4835251a6b725b002d3750bf98de
languageName: node
linkType: hard
"@metamask/eth-keyring-controller@npm:^10.0.0": "@metamask/eth-keyring-controller@npm:^10.0.0":
version: 10.0.0 version: 10.0.0
resolution: "@metamask/eth-keyring-controller@npm:10.0.0" resolution: "@metamask/eth-keyring-controller@npm:10.0.0"
@ -15426,25 +15445,6 @@ __metadata:
languageName: node languageName: node
linkType: hard linkType: hard
"eth-json-rpc-middleware@npm:^9.0.1":
version: 9.0.1
resolution: "eth-json-rpc-middleware@npm:9.0.1"
dependencies:
"@metamask/eth-sig-util": ^5.0.0
"@metamask/safe-event-emitter": ^2.0.0
"@metamask/utils": ^3.0.3
btoa: ^1.2.1
clone: ^2.1.1
eth-block-tracker: ^5.0.1
eth-rpc-errors: ^4.0.3
json-rpc-engine: ^6.1.0
json-stable-stringify: ^1.0.1
node-fetch: ^2.6.7
pify: ^3.0.0
checksum: 9512829a6958df6ef739b891a0c0804b51a140407fd2e3ddaaa6b18d975796646cfcf7f7305a18beb7903db09e0c7a91b06dc5434b6bd2d6cdb85d992d9fd3ab
languageName: node
linkType: hard
"eth-lattice-keyring@npm:^0.12.3": "eth-lattice-keyring@npm:^0.12.3":
version: 0.12.3 version: 0.12.3
resolution: "eth-lattice-keyring@npm:0.12.3" resolution: "eth-lattice-keyring@npm:0.12.3"
@ -24034,6 +24034,7 @@ __metadata:
"@metamask/eslint-config-nodejs": ^9.0.0 "@metamask/eslint-config-nodejs": ^9.0.0
"@metamask/eslint-config-typescript": ^9.0.1 "@metamask/eslint-config-typescript": ^9.0.1
"@metamask/eth-json-rpc-infura": ^7.0.0 "@metamask/eth-json-rpc-infura": ^7.0.0
"@metamask/eth-json-rpc-middleware": ^10.0.0
"@metamask/eth-keyring-controller": ^10.0.0 "@metamask/eth-keyring-controller": ^10.0.0
"@metamask/eth-ledger-bridge-keyring": ^0.13.0 "@metamask/eth-ledger-bridge-keyring": ^0.13.0
"@metamask/eth-token-tracker": ^4.0.0 "@metamask/eth-token-tracker": ^4.0.0
@ -24166,7 +24167,6 @@ __metadata:
eth-block-tracker: ^6.0.0 eth-block-tracker: ^6.0.0
eth-ens-namehash: ^2.0.8 eth-ens-namehash: ^2.0.8
eth-json-rpc-filters: ^6.0.0 eth-json-rpc-filters: ^6.0.0
eth-json-rpc-middleware: ^9.0.1
eth-lattice-keyring: ^0.12.3 eth-lattice-keyring: ^0.12.3
eth-method-registry: ^2.0.0 eth-method-registry: ^2.0.0
eth-query: ^2.1.2 eth-query: ^2.1.2