Scatter JS
This is an importable javascript library that allows web applications to directly interface with Scatter Desktop.
Installation
import scatter from 'scatter-js'
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 = ``;
function getter(){
return new Promise(resolve => resolve(KEY));
}
function setter(x){
return new Promise(resolve => resolve(KEY = x));
}
scatter.connect("TestPage", getter, setter).then(connected => {
})
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.