Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
scatter-js
Advanced tools
This is an importable javascript library that allows web applications to directly interface with Scatter Desktop.
This is an importable javascript library that allows web applications to directly interface with Scatter Desktop.
// ES Module style
import ScatterJS from 'scatter-js/dist/scatter.esm';
// CommonJS style
import ScatterJS from 'scatter-js/dist/scatter.cjs';
//or
const ScatterJS = require('scatter-js/dist/scatter.<SUFFIX>');
You can also just drop the scatter.min.js
bundle from the dist/
directory here right into
your html file and use it as a fully packed browser-ready package.
<script src="path/to/scatter.min.js"></script>
Coming soon.
This library catches both Scatter Desktop and Scatter Classic ( old extension ) depending on the existence of either.
ScatterJS.scatter.connect("Put_Your_App_Name_Here").then(connected => {
if(!connected) {
// User does not have Scatter Desktop or Classic installed.
return false;
}
// Use `scatter` normally now.
ScatterJS.scatter.getIdentity(...);
});
{
// You may specify a maximum timeout for checking if a user has Scatter installed
initTimeout:10000,
}
scatter-js binds to the window
reference if it notices that an application has a window
on global scope.
This is useful for <script src="...">
imports for sites without nodejs/npm, but is also semi-dangerous.
If you don't null out the window reference then extensions will be able to catch it on the window's scope and pretend to send requests from your authorized application.
The best practice is to offload the scatter reference to your own global/state variable and nullify the window ref.
setStateVariable(window.scatter);
window.scatter = null;
A lot of projects already integrated with Scatter expect scatter
to be it's own object.
You can easily mimic that by offloading the ScatterJS.scatter
object to your previously saved state variables.
( The reason this ScatterJS wrapper/holder exists is because if the extension is found it needs to overwrite the .scatter
object
without losing the reference passed down the tree to your app. )
const scatter = ScatterJS.scatter;
// or state savers ( store ) such as redux or vuex
setStateVariable(ScatterJS.scatter);
See the Developer Documentation to find out how to interact with Scatter and various blockchains.
Scatter sits on top of eosjs or web3, so learn to use those depending on which blockchain you are interfacing with.
FAQs
This is an importable javascript library that allows web applications to directly interface with Scatter Desktop.
The npm package scatter-js receives a total of 7 weekly downloads. As such, scatter-js popularity was classified as not popular.
We found that scatter-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
Security News
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.