steemit
steem-js
JavaScript

Steem.js the official JavaScript library for Steem blockchain

Last updated Jun 23, 2026
468
Stars
231
Forks
105
Issues
0
Stars/day
Attention Score
95
Language breakdown
JavaScript 99.2%
Dockerfile 0.3%
Batchfile 0.2%
Shell 0.2%
HTML 0.1%
Files click to expand
README

GitHub license Steem.js channel on steemit.chat

Steem.js

Steem.js the JavaScript API for Steem blockchain

Documentation

- Subscriptions - Tags - Blocks and transactions - Globals - Keys - Accounts - Market - Authority / validation - Votes - Content - Witnesses

Here is full documentation: https://github.com/steemit/steem-js/tree/master/doc

Browser

CDN

https://cdn.jsdelivr.net/npm/steem/dist/steem.min.js

Webpack

Please have a look at the webpack usage example.

Server

Install

$ npm install steem --save

RPC Servers

https://api.steemit.com By Default

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); });

Broadcast Vote with Promises

var steem = require('steem');

var wif = steem.auth.toWif(username, password, 'posting'); // Using Promises steem.broadcast.vote(wif, voter, author, permlink, weight) .then(result => console.log(result)) .catch(error => console.error(error));

// Or using async/await async function castVote() { try { const result = await steem.broadcast.vote(wif, voter, author, permlink, weight); console.log(result); } catch (error) { console.error(error); } }

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);

Steem Testnet

Steem-js requires some configuration to work on the public Steem testnet.

You need to set two Steem API options, addressprefix and chainid.

steem.api.setOptions({   address_prefix: 'TST',   chain_id: '46d82ab7d8db682eb1959aed0ada039a6d49afa1602491f93dde9cac3e8e6c32',   useTestNet: true, });

The Chain ID could change. If it does, it may not be reflected here, but will be documented on any testnet launch announcements.

Contributions

Patches are welcome! Contributors are listed in the package.json file. Please run the tests before opening a pull request and make sure that you are passing all of them. If you would like to contribute, but don't know what to work on, check the issues list.

Issues

When you find issues, please report them!

License

MIT

© 2026 GitRepoTrend · steemit/steem-js · Updated daily from GitHub