Skip to content

Instantly share code, notes, and snippets.

@semasping
Last active November 8, 2017 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save semasping/e8a41fd6fabe2c9e5be9564ae20406ac to your computer and use it in GitHub Desktop.
Save semasping/e8a41fd6fabe2c9e5be9564ae20406ac to your computer and use it in GitHub Desktop.
//мучаю nodejs
//просто проголосовать:
const golos = require('golos-js');
/*
golos.config.set('websocket', 'wss://api.golos.cf');
golos.config.set('address_prefix', 'GLS');
golos.config.set('chain_id', '782a3039b478c839e4cb0c941ff4eaeb7df40bdd68bd441afd444b9da763de12');
*/
var percent = 10000;
var account = "semasping";
var key = "5Jklfnref........";
var parentAuthorAns = '...';
var parentPermlinkAns = '...';
var wif = golos.auth.toWif(account, key, 'posting');
/*
console.log('wif=' + wif + golos.auth.isWif(wif)); // true
pub = golos.auth.wifToPublic(wif);
console.log(golos.auth.wifIsValid(wif, pub)); //true
console.log(pub);
*/
golos.broadcast.vote(wif, account, parentAuthorAns, parentPermlinkAns, percent, function (err, result) {
console.log(err, result);
});
----------------------------
в ответ получаю
error:
{ code: 1,
message: 3030000 tx_missing_posting_
@Vik-BC
Copy link

Vik-BC commented Nov 8, 2017

по состоянию на ноябрь 2017

npm i golos-js@0.5.21 - для текущей версии чейна
npm i golos-js@0.5.29 - для тестнета

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment