
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
@metamask/inpage-provider
Advanced tools
A JavaScript Ethereum provider that connects to the wallet over a stream.
The inpage Ethereum provider object injected by MetaMask into web pages. Contains a lot of implementation details specific to MetaMask, and is probably not suitable for out-of-the-box use with other wallets.
Implements the Ethereum JavaScript provider specification, EIP-1193.
yarn add @metamask/inpage-provider
import { initializeProvider } from '@metamask/inpage-provider'
// 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.
FAQs
A JavaScript Ethereum provider that connects to the wallet over a stream.
The npm package @metamask/inpage-provider receives a total of 116 weekly downloads. As such, @metamask/inpage-provider popularity was classified as not popular.
We found that @metamask/inpage-provider demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 7 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
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.