npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

scatterx

v0.6.7

Published

ScatterJS wrapper

Readme

📦 scatterx

A npm package wrapping scatter-js to use easily.

Dependency

Scatter and npm or yarn

📃 Usage

🔧 setup

npm

npm install [email protected] scatterjs-plugin-eosjs // use scatterEOSX
npm install [email protected] scatterjs-plugin-web3 // use scatterETHX
npm install scatterx

yarn

yarn add [email protected] scatterjs-plugin-eosjs // use scatterEOSX
yarn add [email protected] scatterjs-plugin-web3 // use scatterETHX
yarn add scatterx

ScatterEOSX

ScatterEOSX is a wrapper for ScatterJS with ScatterEOS plugin.

setup

import { ScatterEOSX } from "scatterx";

// get networklist
let networkList = ScatterEOSX.networkList;
let network = networkList.kylin.asia; // For example, select kylin asia node.

// generate instance
let scatter = new ScatterEOSX(network, "YOUR_APPNAME");

send EOS

(async () => {
    // connect with scatter client and get identity and set user account to this instance.
    // Since the processing that has been completed is skipped inside the method, repeated execution of the login method does not cause much load.
    await scatter.login();

    // send eos to recipient
    // this example is sending 1.0000 EOS to hello account.
    await scatter.send("hello", 1, "memo");
})();

action

example1

(async () => {
    // set user account to this instance.
    // If you are already logged in, most of the processing of this method is skipped internally.
    await scatter.login();

    // send action
    // this action make hello contract execute hi action.
    const actObj = {
        contractName : "hello",
        actionName : "hi",
        params: ["bob"]
    };
    await scatter.action(actObj);
})();

example2

(async () => {
    await scatter.login();

    const actObj = {
        contractName: "devicemanage",
        actionName: "insert",
        params: ["youraccount1", "devicelabel", 1]
    };
    await scatter.action(actObj);
})();

"devicemanage" is my dapp.

transaction

example1

(async () => {
    await scatter.login();

    // this transaction include 2 actions and has linearizability.
    const actObj1 = {
        contractName : "hello",
        actionName : "hi",
        params: ["bob"]
    };

    const actObj2 = {
        contractName: "devicemanage",
        actionName: "insert",
        params: ["youraccount1", "devicelabel", 1]
    };

    // send transaction
    // If any action fails, all other actions also fail.
    await scatter.transaction(actObj1, actObj2);
})();

fetchTable

This method is not from scatter-js, but this method is useful.

(async () => {
    const query = {
            "code": "eosio.token",
            "scope": "eosio.token",
            "table": "accounts"
        };
    const response = await scatter.fetchTable(query);
})();

fetchTableMore

This method is used to fetch more than 100 data from the table.

Basically, it has the same arguments as fetchTable, BUT it is necessary to specify an id of uint64 type as the primary key.

(async () => {
    // This is one example, this query matches 205 rows (id 0 - 204) in kylinnet.
    const query = {
        "code": "pcscoreprtcl",
        "scope": "XTST",
        "table": "token",
        "limit": 100,
        "lower_bound": 103
    };
    const response = await scatter.fetchTableMore(query);
    console.log(response); // => (102) [{…}, {…}, {…}, {…}, {…}, …] (id 103 - 204)
})();

logout

(async () => {
    await scatter.logout();
})();

call eosjs's methods

Also, You can call eosjs method.

(async () => {
    await scatter.eosJS.METHOD_NAME(args);
})();

get network list

let networkList = ScatterEOSX.networkList;

setNetwork

This method is used to change network.

let laomao = ScatterEOSX.networkList.kylin.laomao;
scatter.setNetwork(laomao);

ScatterETHX

ScatterETHX is a wrapper for ScatterJS with ScatterETH plugin.

Sorry, this module doesn't work, probably due to a Scatter-side error.

others

Error

This npm package defines its own error type, ScatterError.

import { ScatterEOSX, ScatterError } from "scatterx";

let scatter = new ScatterEOSX(ScatterEOSX.networkList.kylin.asia, "YOUR_APPNAME");

// this try-catch block is in async function
try {
    await scatter.login();
    await scatter.action(actObj);
} catch (error) {
    if (error instanceof ScatterError) {
        ...
    }
}

✒️ Authors

Akihiro Otomo

Twitter Account: @akatsuki_py