SteemJS
Install
$ npm install steem --save
Usage
var Steem = require('steem');
var steem = new Steem();
steem.getAccounts(['ned', 'dan'], function(result, err) {
console.log(result, err);
});
Subscriptions
Set Subscribe Callback
steem.setSubscribeCallback(cb, clearFilter, function(result, err) {
console.log(result, err);
});
Set Pending Transaction Callback
steem.setPendingTransactionCallback(cb, function(result, err) {
console.log(result, err);
});
Set Block Applied Callback
steem.setBlockAppliedCallback(cb, function(result, err) {
console.log(result, err);
});
Cancel All Subscriptions
steem.cancelAllSubscriptions(function(result, err) {
console.log(result, err);
});
Tags
Get Trending Tags
steem.getTrendingTags(afterTag, limit, function(result, err) {
console.log(result, err);
});
Get Discussions By Trending
steem.getDiscussionsByTrending(query, function(result, err) {
console.log(result, err);
});
Get Discussions By Created
steem.getDiscussionsByCreated(query, function(result, err) {
console.log(result, err);
});
Get Discussions By Active
steem.getDiscussionsByActive(query, function(result, err) {
console.log(result, err);
});
Get Discussions By Cashout
steem.getDiscussionsByCashout(query, function(result, err) {
console.log(result, err);
});
Get Discussions By Payout
steem.getDiscussionsByPayout(query, function(result, err) {
console.log(result, err);
});
Get Discussions By Votes
steem.getDiscussionsByVotes(query, function(result, err) {
console.log(result, err);
});
Get Discussions By Children
steem.getDiscussionsByChildren(query, function(result, err) {
console.log(result, err);
});
Get Discussions By Hot
steem.getDiscussionsByHot(query, function(result, err) {
console.log(result, err);
});
Blocks And Transactions
steem.getBlockHeader(blockNum, function(result, err) {
console.log(result, err);
});
Get Block
steem.getBlock(blockNum, function(result, err) {
console.log(result, err);
});
Get State
steem.getState(path, function(result, err) {
console.log(result, err);
});
Get Trending Categories
steem.getTrendingCategories(after, limit, function(result, err) {
console.log(result, err);
});
Get Best Categories
steem.getBestCategories(after, limit, function(result, err) {
console.log(result, err);
});
Get Active Categories
steem.getActiveCategories(after, limit, function(result, err) {
console.log(result, err);
});
Get Recent Categories
steem.getRecentCategories(after, limit, function(result, err) {
console.log(result, err);
});
Globals
Get Config
steem.getConfig(function(result, err) {
console.log(result, err);
});
Get Dynamic Global Properties
steem.getDynamicGlobalProperties(function(result, err) {
console.log(result, err);
});
Get Chain Properties
steem.getChainProperties(after, limit, function(result, err) {
console.log(result, err);
});
Get Feed History
steem.getFeedHistory(function(result, err) {
console.log(result, err);
});
Get Current Median History Price
steem.getCurrentMedianHistoryPrice(function(result, err) {
console.log(result, err);
});
Get Witness Schedule
steem.getWitnessSchedule(function(result, err) {
console.log(result, err);
});
Get Hardfork Version
steem.getHardforkVersion(function(result, err) {
console.log(result, err);
});
Get Next Scheduled Hardfork
steem.getNextScheduledHardfork(function(result, err) {
console.log(result, err);
});
Keys
Get Key References
steem.getKeyReferences(key, function(result, err) {
console.log(result, err);
});
Accounts
Get Accounts
steem.getAccounts(names, function(result, err) {
console.log(result, err);
});
Get Account References
steem.getAccountReferences(accountId, function(result, err) {
console.log(result, err);
});
Lookup Account Names
steem.lookupAccountNames(accountNames, function(result, err) {
console.log(result, err);
});
Lookup Accounts
steem.lookupAccounts(lowerBoundName, limit, function(result, err) {
console.log(result, err);
});
Get Account Count
steem.getAccountCount(function(result, err) {
console.log(result, err);
});
Get Conversion Requests
steem.getConversionRequests(accountName, function(result, err) {
console.log(result, err);
});
Get Account History
steem.getAccountHistory(account, from, limit, function(result, err) {
console.log(result, err);
});
Get Owner History
steem.getOwnerHistory(account, function(result, err) {
console.log(result, err);
});
Get Recovery Request
steem.getRecoveryRequest(account, function(result, err) {
console.log(result, err);
});
Market
Get Order Book
steem.getOrderBook(limit, function(result, err) {
console.log(result, err);
});
Get Open Orders
steem.getOpenOrders(owner, function(result, err) {
console.log(result, err);
});
Get Liquidity Queue
steem.getLiquidityQueue(startAccount, limit, function(result, err) {
console.log(result, err);
});
Authority / Validation
Get Transaction Hex
steem.getTransactionHex(trx, function(result, err) {
console.log(result, err);
});
Get Transaction
steem.getTransaction(trxId, function(result, err) {
console.log(result, err);
});
Get Required Signatures
steem.getRequiredSignatures(trx, availableKeys, function(result, err) {
console.log(result, err);
});
Get Potential Signatures
steem.getPotentialSignatures(trx, function(result, err) {
console.log(result, err);
});
Verify Authority
steem.verifyAuthority(trx, function(result, err) {
console.log(result, err);
});
Verify Account Authority
steem.verifyAccountAuthority(nameOrId, signers, function(result, err) {
console.log(result, err);
});
Votes
Get Active Votes
steem.getActiveVotes(author, permlink, function(result, err) {
console.log(result, err);
});
Get Account Votes
steem.getAccountVotes(voter, function(result, err) {
console.log(result, err);
});
Content
Get Content
steem.getContent(author, permlink, function(result, err) {
console.log(result, err);
});
Get Content Replies
steem.getContentReplies(parent, parentPermlink, function(result, err) {
console.log(result, err);
});
Get Discussion By Author Before Date
steem.getDiscussionsByAuthorBeforeDate(author, startPermlink, beforeDate, limit, function(result, err) {
console.log(result, err);
});
Get Replies By Last Update
steem.getRepliesByLastUpdate(startAuthor, startPermlink, limit, function(result, err) {
console.log(result, err);
});
Witnesses
Get Witnesses
steem.getWitnesses(witnessIds, function(result, err) {
console.log(result, err);
});
Get Witness By Account
steem.getWitnessByAccount(accountName, function(result, err) {
console.log(result, err);
});
Get Witnesses By Vote
steem.getWitnessesByVote(from, limit, function(result, err) {
console.log(result, err);
});
Lookup Witness Accounts
steem.lookupWitnessAccounts(lowerBoundName, limit, function(result, err) {
console.log(result, err);
});
Get Witness Count
steem.getWitnessCount(function(result, err) {
console.log(result, err);
});
Get Active Witnesses
steem.getActiveWitnesses(function(result, err) {
console.log(result, err);
});
Get Miner Queue
steem.getMinerQueue(function(result, err) {
console.log(result, err);
});
Stream
Stream Block Number
steem.streamBlockNumber(function(result) {
console.log(result);
});
Stream Block
steem.streamBlock(function(result) {
console.log(result);
});
Stream Transactions
steem.streamTransactions(function(result) {
console.log(result);
});
Stream Operations
steem.streamOperations(function(result) {
console.log(result);
});
To-Do
- Connect all the others API
You have some suggestions? Let me know on Slack https://steem.slack.com/ channel #steemjs
License
MIT