SteemJS : the library for JavaScript lovers. Now release!

Edit: Check out the new version on my new post here with 59 added methods : @fabien/steemjs

SteemJS the JavaScript API for Steem blockchain

I've created a new npm package for Steem blockchain. There is already few methods, I will keep it updated daily with more features. Let me know if you have some suggestions in comments or on Slack https://steem.slack.com/ channel #steemjs. The project is Open Source feel free to contribute on GitHub. Hope you guys will like it!

https://www.npmjs.com/package/steem
https://github.com/adcpm/steem

Here is the documentation :

Install

$ npm install steem --save

Usage

var steem = require('steem');
var Steem = new steem();

Steem.getAccount('steemit', function(result, err) {
    console.log(result, err);
});

Send

var data = {
    'id': 1,
    'method': 'get_accounts',
    'params': [['steemit']]
};

Steem.send(data, function(result, err) {
    console.log(result, err);
});

http://piston.readthedocs.io/en/develop/lib.html#piston-api

Get Accounts

Steem.getAccounts(['ned', 'dan'], function(result, err) {
    console.log(result, err);
});

Get Account

Steem.getAccount('steemit', function(result, err) {
    console.log(result, err);
});

Get Block

Steem.getBlock(3000000, function(result, err) {
    console.log(result, err);
});

Streaming Block Number

Steem.streamBlockNumber(function(result) {
    console.log(result);
});

Streaming Block

Steem.streamBlock(function(result) {
    console.log(result);
});

Streaming Transactions

Steem.streamTransactions(function(result) {
    console.log(result);
});

Streaming Operations

Steem.streamOperations(function(result) {
    console.log(result);
});

TO-DO

  • Cancel All Subscriptions method
  • Connect Account method
  • Create Account method
  • What do you suggest?

License

MIT

H2
H3
H4
3 columns
2 columns
1 column
16 Comments