
Security News
The Hidden Blast Radius of the Axios Compromise
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.
@deserialize/providers
Advanced tools
A JavaScript Ethereum provider that connects to the wallet over a stream
The Ethereum provider object injected by MetaMask into various environments. Contains a lot of implementation details specific to MetaMask, and is probably not suitable for out-of-the-box use with other wallets.
The BaseProvider implements the Ethereum JavaScript provider specification (EIP-1193), but must be modified by a sub-class in order to function.
StreamProvider is such a sub-class, which synchronizes its state and marshals JSON-RPC messages via a duplex stream.
MetamaskInpageProvider further extends StreamProvider to support legacy provider interfaces in addition to EIP-1193, and is used to instantiate the object injected by MetaMask into web pages as window.ethereum.
import { initializeProvider } from '@metamask/providers';
// Create a stream to a remote provider:
const metamaskStream = new LocalMessageDuplexStream({
name: 'inpage',
target: 'contentscript',
});
// this will initialize the provider and set it as window.ethereum
initializeProvider({
connectionStream: metamaskStream,
});
const { ethereum } = window;
Types are exposed at index.d.ts.
They require Node.js EventEmitter and Duplex stream types, which you can grab from e.g. @types/node.
The Provider object should not be mutated by consumers under any circumstances. The maintainers of this package will neither fix nor take responsbility for bugs caused by third parties mutating the provider object.
nvm use will automatically choose the right node version for you.yarn setup to install dependencies and run any requried post-install scripts
yarn / yarn install command directly. Use yarn setup instead. The normal install command will skip required post-install scripts, leaving your development environment in an invalid state.Run yarn test to run the tests once. To run tests on file changes, run yarn test:watch.
Run yarn lint to run the linter, or run yarn lint:fix to run the linter and fix any automatically fixable issues.
The project follows the same release process as the other libraries in the MetaMask organization:
main1.x)yarn version --minor --no-git-tag-version)main or 1.x)FAQs
A JavaScript Ethereum provider that connects to the wallet over a stream
We found that @deserialize/providers demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.