SteemJS: Explore Steem blockchain! New update with full database API methods coverage

avatar
(Edited)

I've just finish the version 2 and I'm proud to announce you that SteemJS is now covering all the available method of the Steem blockchain database API. JavaScript lovers plug it on your site and make it rocks!

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

Here is the new shorten documentation :

Install

$ npm install steem --save

Usage

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

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

Login

steem.login(username, password, callback);

Subscriptions

steem.setSubscribeCallback(cb, clearFilter, callback);
steem.setPendingTransactionCallback(cb, callback);
steem.setBlockAppliedCallback(cb, callback);
steem.cancelAllSubscriptions(callback);

Tags

steem.getTrendingTags(afterTag, limit, callback);
steem.getDiscussionsByTrending(query, callback);
steem.getDiscussionsByCreated(query, callback);
steem.getDiscussionsByActive(query, callback);
steem.getDiscussionsByCashout(query, callback);
steem.getDiscussionsByPayout(query, callback);
steem.getDiscussionsByVotes(query, callback);
steem.getDiscussionsByChildren(query, callback);
steem.getDiscussionsByHot(query, callback);

Blocks And Transactions

steem.getBlockHeader(blockNum, callback);
steem.getBlock(blockNum, callback);
steem.getState(path, callback);
steem.getTrendingCategories(after, limit, callback);
steem.getBestCategories(after, limit, callback);
steem.getActiveCategories(after, limit, callback);
steem.getRecentCategories(after, limit, callback);

Globals

steem.getConfig(callback);
steem.getDynamicGlobalProperties(callback);
steem.getChainProperties(after, limit, callback);
steem.getFeedHistory(callback);
steem.getCurrentMedianHistoryPrice(callback);
steem.getWitnessSchedule(callback);
steem.getHardforkVersion(callback);
steem.getNextScheduledHardfork(callback);

Keys

steem.getKeyReferences(key, callback)

Accounts

steem.getAccounts(names, callback);
steem.getAccountReferences(accountId, callback);
steem.lookupAccountNames(accountNames, callback);
steem.lookupAccounts(lowerBoundName, limit, callback);
steem.getAccountCount(callback);
steem.getConversionRequests(accountName, callback);
steem.getAccountHistory(account, from, limit, callback);
steem.getOwnerHistory(account, callback);
steem.getRecoveryRequest(account, callback);

Market

steem.getOrderBook(limit, callback);
steem.getOpenOrders(owner, callback);
steem.getLiquidityQueue(startAccount, limit, callback);

Authority / Validation

steem.getTransactionHex(trx, callback);
steem.getTransaction(trxId, callback);
steem.getRequiredSignatures(trx, availableKeys, callback);
steem.getPotentialSignatures(trx, callback);
steem.verifyAuthority(trx, callback);
steem.verifyAccountAuthority(nameOrId, signers, callback);

Votes

steem.getActiveVotes(author, permlink, callback);
steem.getAccountVotes(voter, callback);

Content

steem.getContent(author, permlink, callback);
steem.getContentReplies(parent, parentPermlink, callback);
steem.getDiscussionsByAuthorBeforeDate(author, startPermlink, beforeDate, limit, callback);
steem.getRepliesByLastUpdate(startAuthor, startPermlink, limit, callback);

Witnesses

steem.getWitnesses(witnessIds, callback);
steem.getWitnessByAccount(accountName, callback);
steem.getWitnessesByVote(from, limit, callback);
steem.lookupWitnessAccounts(lowerBoundName, limit, callback);
steem.getWitnessCount(callback);
steem.getActiveWitnesses(callback);
steem.getMinerQueue(callback);

Stream

steem.streamBlockNumber(callback);
steem.streamBlock(callback);
steem.streamTransactions(callback);
steem.streamOperations(callback);

To-Do

  • Connect all the others API

Get full documentation on https://www.npmjs.com/package/steem

You have some suggestions? Let me know on Slack https://steem.slack.com/ channel #steemjs

Also I will have a good news soon for all non-JavaScript dev so be prepared!



0
0
0.000
14 comments
avatar

Hells yes man good stuff! Glad we have so many awesome devs around!

0
0
0.000
avatar

Awesome, thanks for fixing all the crap! Hope this runs better..

0
0
0.000
avatar
(Edited)

Actually both version run very well without an issue as i know, i was trying to make a catch phrase but i changed it because it was poorly worded. The only change that happen was that on version 1 there was only 8 methods available but now there is 64 methods.

0
0
0.000
avatar

Great, thanks for making this! Have question, I wonder if you know how to create transactions locally and sign?

0
0
0.000
avatar

Wish you success with Steemjs ! very nice job and will be much helpful for Steemit community

0
0
0.000
avatar

Can't get on steem.slack.com, can you provide invites ? Thank you, and thank to provide such a fantastic tool.

0
0
0.000
avatar

great stuff! but i am confused with:
steem.getTrendingCategories(after, limit, callback);
steem.getBestCategories(after, limit, callback);
steem.getActiveCategories(after, limit, callback);
steem.getRecentCategories(after, limit, callback);

i have been trying to figure out what "after" stands for.
the documentation has rather little information on what those parameters stand for.

my first tought that it might be a date so i have tried several formats.
my second tought that it might be a tag, but didn't work either..

i also had a look into the official api documentation without any luck solving this.

0
0
0.000