Closed Sparke2 closed 5 years ago
You can declare scatter.eos like this:
const network = {
blockchain:'eos',
chainId:'aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906',
host:'fn.eossweden.se',
port:443,
protocol:'https'
}
ScatterJS.scatter.connect('eosio').then(function(connect) {
const rpc = new eosjs_jsonrpc.JsonRpc('https://fn.eossweden.se:443');
const eos = scatter.eos(network, eosjs_api.Api, { rpc });
});
I'm trying to run the following code:
I'm getting this error which is related to the initialization of
eos = scatter.eos(network, Api, { rpc });
I need a minimal viable example of sending a transaction with Scatter in plain JS without any requirejs, angular, react, vue or any extra dependencies.
I'm trying to use this example https://gist.github.com/miguelmota/c2a12cb4ed938d2d6f93146903390065 but I don't know what to do with the Eos arg because I'm not using
require
oreosjs
library.Whenever I'm replacing it with any declarations using
api
andrpc
args as it is shown in this examplethen it throws a similar error: