Difference between revisions of "Steem.js"
From Steem Center
m (new link to new page - Steem.js (es) - Spanish june 21 2018) |
|||
Line 58: | Line 58: | ||
* [[Hrvatski]] (croatian) : [[Steem.js (hr)]] | * [[Hrvatski]] (croatian) : [[Steem.js (hr)]] | ||
* [[Bangla]] (bangla) : [[Steem.js (bd)]] | * [[Bangla]] (bangla) : [[Steem.js (bd)]] | ||
+ | * [[Español]] (spanish) : [[Steem.js (es)]] | ||
<br> | <br> |
Latest revision as of 19:13, 21 June 2018
Steem.js is a javascript library that allows developers to communicate and transact on the STEEM blockchain easily. A lot of applications use SteemJS, and the steemit.chat channel #steemjs is pretty active if you are looking for help.
Contents
[hide]Browser
<script src="./steem.min.js"></script> <script> steem.api.getAccounts(['ned', 'dan'], function(err, response){ console.log(err, response); }); </script>
CDN
https://cdn.steemjs.com/lib/latest/steem.min.js
<script src="//cdn.steemjs.com/lib/latest/steem.min.js"></script>
Webpack
Please have a look at the webpack usage example.
Server
Install
$ npm install steem --save
WebSockets
wss://steemd.steemit.com By Default
wss://node.steem.ws
wss://this.piston.rocks
Examples
Broadcast Vote
var steem = require('steem'); var wif = steem.auth.toWif(username, password, 'posting'); steem.broadcast.vote(wif, voter, author, permlink, weight, function(err, result) { console.log(err, result); });
Get Accounts
steem.api.getAccounts(['ned', 'dan'], function(err, result) { console.log(err, result); });
Get State
steem.api.getState('/trends/funny', function(err, result) { console.log(err, result); });
Reputation Formatter
var reputation = steem.formatter.reputation(user.reputation); console.log(reputation);
In other languages
- Hrvatski (croatian) : Steem.js (hr)
- Bangla (bangla) : Steem.js (bd)
- Español (spanish) : Steem.js (es)
Help keep this wiki page updated. Register, click in edit, add or modify the text and save. If you're already a steemian you can be rewarded with steem, see how in @steemcenterwiki. |