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

in #steemjs8 years ago (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!

Sort:  

Great sutff, thank you!

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

this is awesome, thanks!

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

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.

Sweet, nice job!

Great job you devs are the real heroes.

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

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

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