
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@ethersphere/swarm-extension
Advanced tools
JavaScript library for interaction with the Swarm browser extension
Library for interaction with the Swarm Browser Extension, from dApps or other browser extensions.
The library can be installed via npm:
npm install --save @ethersphere/swarm-extension
All interaction with the Swarm browser extension is established through the Swarm class:
import { Swarm } from '@fairdatasociety/swarm-extension'
By default the class will connect to the Swarm browser extension using its ID from the Google store. If you are running your version of the extension the class can be configured with a different extension ID.
const swarm = new Swarm() // Using the default Swarm ID from the Google store
const swarm = new Swarm('Swarm Extension ID...') // Using custom Swarm ID
To test if connection with the Swarm extension is established, call the echo
method:
const text = await swarm.echo<string>('test')
console.log(text) // 'test'
Before interacting with the library, Dapp should register new session by calling:
await swarm.register()
or new session will be implicitly created when calling any method for the first time.
After registering a new session, session ID will be available as:
swarm.sessionId
There are four different objects available in the Swarm calass:
Once when the instance of the Swarm class is not needed anymore, connection with the extension can be terminated.
swarm.closeConnection()
To enable Swarm HTML features, include the swarm-html.js
script into HTML page. For more details check Swarm HTML in the main readme
To watch for changes in the source code and recompile the library on change:
npm start
To build the library:
npm run build
FAQs
JavaScript library for interaction with the Swarm browser extension
The npm package @ethersphere/swarm-extension receives a total of 0 weekly downloads. As such, @ethersphere/swarm-extension popularity was classified as not popular.
We found that @ethersphere/swarm-extension demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.