Vote
To cast votes, users send ‘vote’ messages

Arguments

  • unit string required Hash of unit where the poll was defined.
  • choice string required Indicate what the user want to vote for. The choice must be defined in the poll message.

Returns

Returns the unit hash.

Example

1
const params = {
2
unit: 'E0qMVlyvKUQ/H7QQjB1pEevprTUnl44cY/DPWyn3cF4=',
3
choice: 'stay'
4
};
5
6
client.post.vote(params, wif, function(err, result) {
7
if (err) return console.error(err);
8
console.log(result);
9
});
Copied!

Learn more

Last modified 7mo ago