How to use the eosjs.Localnet function in eosjs

To help you get started, we’ve selected a few eosjs examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kesar / twitbot / app / twitter.js View on Github external
winston.error("Configuration file doesn't exist! Please read the README.md file first.");
    process.exit(1);
}

var settings = yaml.load(fs.readFileSync("./twitter.yml", "utf-8"));

winston.cli();

if (settings.log.file) {
    winston.add(winston.transports.File, {
        filename: settings.log.file,
        level: settings.log.level
    });
}

node = Eos.Localnet({
    httpEndpoint: 'http://' + settings.rpc.host + ':' + settings.rpc.port,
    keyProvider: settings.rpc.private_key
});

account = settings.rpc.account;

winston.info("Connecting to " + settings.rpc.host + ":" + settings.rpc.port);

node.getAccount(settings.rpc.account).then(function (result) {
    winston.info(result);
});

var client = new Twitter({
    consumer_key: settings.twitter.consumer_key,
    consumer_secret: settings.twitter.consumer_secret,
    access_token: settings.twitter.access_token,