This is the fourth update for steemsnippets an open source collection of code snippets on steem-related libraries. You can find more info in it here.
I've added two new snippets for steemjs :
Work done :
Added snippets :
Transfer (steemjs)
https://github.com/drov0/steemsnippets/blob/master/steemjs/transfer/transfer.js
Function header :
function transfer(wif, from, to, amount, memo)
It's pretty straightforward, the only thing you need to be carefull about is the amount, it must be written like this : x.xxx unit eg : '1.265 STEEM' or '44.000 SBD'
get voting power
https://github.com/drov0/steemsnippets/blob/master/steemjs/voting_power/voting_power.js
This one is very easy to use, just input the username and you're done. It's very usefull for your voting bots out here.
function header :
function getvotingpower(account, callback)
Next time we'll see some other functions like delegating, and some more "get" functions like how to calculate the payouts in steem/sbd etc.
commits :
github repos : https://github.com/drov0/steemsnippets
Proof of work can be found in the readme.
Posted on Utopian.io - Rewarding Open Source Contributors