Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

scatter-js

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

scatter-js

This is an importable javascript library that allows web applications to directly interface with Scatter Desktop.

  • 1.0.0
  • npm
  • Socket score

Version published
Weekly downloads
11
increased by37.5%
Maintainers
1
Weekly downloads
 
Created
Source

Scatter JS

This is an importable javascript library that allows web applications to directly interface with Scatter Desktop.

Installation

import scatter from 'scatter-js'
 
//or
 
const scatter = require('scatter-js');

You can also just drop the scatter.min.js bundle from the dist/ directory here right into your html file use it from there.

<script src="path/to/scatter.min.js"></script>
CDN:

Coming soon.

Usage

Setting this up is easy.

        let KEY = ``;
 
        // This should be some getter for a private pairing key.
        // You'll probably want to store this in a cookie or localstorage
        // or perhaps something more secure as it validates that requests 
        // are coming from your application
        function getter(){
            return new Promise(resolve => resolve(KEY));
        }
 
        // This should be some setter if you are not pre-generating a 
        // RSA key used for the local socket's encryption. 
        // If you provide a `null` key from the getter initially this 
        // library will generate an RSA key for you.
        function setter(x){
            return new Promise(resolve => resolve(KEY = x));
        }
 
        // Creates a connection to Scatter Desktop and will prompt the user 
        // to authorize your application from within their Scatter.
        scatter.connect("TestPage", getter, setter).then(connected => {
            // Use `scatter` normally now.
        })

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

Package last updated on 01 Aug 2018

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc