create account

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

View this thread on: hive.blogpeakd.comecency.com
· @fabien · (edited)
$26.93
SteemJS: Explore Steem blockchain! New update with full database API methods coverage
https://dl.dropboxusercontent.com/u/552542683/SteemJS-intro2.png

### 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

```js
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!
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 16 others
👎  
properties (23)
authorfabien
permlinksteemjs
categorysteemjs
json_metadata{"tags":["","github","js","nodejs","npm","steem","javascript","dev","steemjs","steemit"],"image":["https://dl.dropboxusercontent.com/u/552542683/SteemJS-intro2.png"]}
created2016-07-22 20:51:27
last_update2016-07-23 21:36:00
depth0
children14
last_payout2016-08-25 01:00:45
cashout_time1969-12-31 23:59:59
total_payout_value21.253 HBD
curator_payout_value5.681 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length4,026
author_reputation16,649,367,183,999
root_title"SteemJS: Explore Steem blockchain! New update with full database API methods coverage"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id281,857
net_rshares7,795,549,186,870
author_curate_reward""
vote details (81)
@artakan ·
Can't get on steem.slack.com, can you provide invites ? Thank you, and thank to provide such a fantastic tool.
properties (22)
authorartakan
permlinkre-fabien-steemjs-20160801t194137492z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-08-01 19:41:33
last_update2016-08-01 19:41:33
depth1
children0
last_payout2016-08-25 01:00:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length110
author_reputation2,351,335,125,519
root_title"SteemJS: Explore Steem blockchain! New update with full database API methods coverage"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id542,897
net_rshares0
@averagejoe ·
this is awesome, thanks!
properties (22)
authoraveragejoe
permlinkre-fabien-steemjs-20160722t205749188z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-07-22 20:57:48
last_update2016-07-22 20:57:48
depth1
children0
last_payout2016-08-25 01:00:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length24
author_reputation50,558,354,201
root_title"SteemJS: Explore Steem blockchain! New update with full database API methods coverage"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id282,016
net_rshares0
@bago ·
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. 
![](https://steemitimages.com/DQmVtAUmyn4vExTTVEh2gbYBZmRbPvGBWTSkNvY76qusHqR/image.png)
👍  ,
properties (23)
authorbago
permlinkre-fabien-steemjs-20170727t212535560z
categorysteemjs
json_metadata{"tags":["steemjs"],"image":["https://steemitimages.com/DQmVtAUmyn4vExTTVEh2gbYBZmRbPvGBWTSkNvY76qusHqR/image.png"],"app":"steemit/0.1"}
created2017-07-27 21:25:36
last_update2017-07-27 21:25:36
depth1
children0
last_payout2017-08-03 21:25:36
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length699
author_reputation-557,502,373,680
root_title"SteemJS: Explore Steem blockchain! New update with full database API methods coverage"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id9,953,890
net_rshares0
author_curate_reward""
vote details (2)
@calaber24p ·
Great job you devs are the real heroes.
properties (22)
authorcalaber24p
permlinkre-fabien-steemjs-20160722t230436575z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-07-22 23:04:42
last_update2016-07-22 23:04:42
depth1
children0
last_payout2016-08-25 01:00:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length39
author_reputation313,033,964,963,339
root_title"SteemJS: Explore Steem blockchain! New update with full database API methods coverage"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id284,756
net_rshares0
@discombobulated ·
Sweet, nice job!
properties (22)
authordiscombobulated
permlinkre-fabien-steemjs-20160722t220803102z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-07-22 22:08:00
last_update2016-07-22 22:08:00
depth1
children0
last_payout2016-08-25 01:00:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length16
author_reputation13,090,894,039,053
root_title"SteemJS: Explore Steem blockchain! New update with full database API methods coverage"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id283,634
net_rshares0
@ekitcho ·
Wish you success with Steemjs ! very nice job and will be much helpful for Steemit community
properties (22)
authorekitcho
permlinkre-fabien-steemjs-20160725t000506590z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-07-25 00:05:03
last_update2016-07-25 00:05:03
depth1
children0
last_payout2016-08-25 01:00:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length92
author_reputation9,913,026,260,616
root_title"SteemJS: Explore Steem blockchain! New update with full database API methods coverage"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id334,721
net_rshares0
@good-karma ·
Great, thanks for making this! Have question, I wonder if you know how to create transactions locally and sign?
properties (22)
authorgood-karma
permlinkre-fabien-steemjs-20160724t171311970z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-07-24 17:13:12
last_update2016-07-24 17:13:12
depth1
children0
last_payout2016-08-25 01:00:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length111
author_reputation656,210,817,936,836
root_title"SteemJS: Explore Steem blockchain! New update with full database API methods coverage"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id325,730
net_rshares0
@madhatting ·
Awesome, thanks for fixing all the crap! Hope this runs better..
properties (22)
authormadhatting
permlinkre-fabien-steemjs-20160722t211439257z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-07-22 21:14:39
last_update2016-07-22 21:14:39
depth1
children1
last_payout2016-08-25 01:00:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length64
author_reputation1,210,922,323,731
root_title"SteemJS: Explore Steem blockchain! New update with full database API methods coverage"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id282,404
net_rshares0
@fabien · (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.
properties (22)
authorfabien
permlinkre-madhatting-re-fabien-steemjs-20160722t221030284z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-07-22 22:10:36
last_update2016-07-22 22:40:45
depth2
children0
last_payout2016-08-25 01:00:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length260
author_reputation16,649,367,183,999
root_title"SteemJS: Explore Steem blockchain! New update with full database API methods coverage"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id283,690
net_rshares0
@masteryoda ·
$0.84
Great sutff, thank you!
👍  
properties (23)
authormasteryoda
permlinkre-fabien-steemjs-20160722t222845287z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-07-22 22:28:51
last_update2016-07-22 22:28:51
depth1
children0
last_payout2016-08-25 01:00:45
cashout_time1969-12-31 23:59:59
total_payout_value0.822 HBD
curator_payout_value0.014 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length23
author_reputation130,752,413,451,298
root_title"SteemJS: Explore Steem blockchain! New update with full database API methods coverage"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id284,066
net_rshares594,523,358,966
author_curate_reward""
vote details (1)
@mianeri ·
good job
👍  
properties (23)
authormianeri
permlinkre-fabien-steemjs-20160722t205412899z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-07-22 20:54:18
last_update2016-07-22 20:54:18
depth1
children0
last_payout2016-08-25 01:00:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length8
author_reputation171,634,303,504
root_title"SteemJS: Explore Steem blockchain! New update with full database API methods coverage"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id281,931
net_rshares151,728,514
author_curate_reward""
vote details (1)
@najoh ·
Very nice !
👍  
properties (23)
authornajoh
permlinkre-fabien-steemjs-20160722t211159242z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-07-22 21:12:00
last_update2016-07-22 21:12:00
depth1
children0
last_payout2016-08-25 01:00:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length11
author_reputation112,368,677,403,644
root_title"SteemJS: Explore Steem blockchain! New update with full database API methods coverage"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id282,338
net_rshares1,279,561
author_curate_reward""
vote details (1)
@oneyesoneno ·
<p><a href="https://steemit.com/steemit/@oneyesoneno/steemit-breaks-records"><strong>Steemit Breaks Records</strong></a></p>
<p><a href="https://steemit.com/steemit/@oneyesoneno/steemit-breaks-records">&nbsp;</a><img src="https://1.bp.blogspot.com/--WAAb4fi1J0/V5RH0mHtJAI/AAAAAAAALKA/TrG5acRBM-wGkEQ5GjJyIfSIK1qWrEWDQCLcB/s1600/oneyesoneno-steemit-viral-time-1.gif&quot;" width="311" height="162"/>&nbsp;</p>
Nice one... i see Steemit is growing.
👍  , , , , , , , , ,
properties (23)
authoroneyesoneno
permlinkre-fabien-steemjs-20160724t172323382z
categorysteemjs
json_metadata{"tags":["steemjs"],"image":["https://1.bp.blogspot.com/--WAAb4fi1J0/V5RH0mHtJAI/AAAAAAAALKA/TrG5acRBM-wGkEQ5GjJyIfSIK1qWrEWDQCLcB/s1600/oneyesoneno-steemit-viral-time-1.gif\""],"links":["https://steemit.com/steemit/@oneyesoneno/steemit-breaks-records"]}
created2016-07-24 17:23:27
last_update2016-07-24 17:23:27
depth1
children0
last_payout2016-08-25 01:00:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length447
author_reputation48,929,003,883
root_title"SteemJS: Explore Steem blockchain! New update with full database API methods coverage"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id326,035
net_rshares454,115,303
author_curate_reward""
vote details (10)
@thedashguy ·
Hells yes man good stuff! Glad we have so many awesome devs around!
properties (22)
authorthedashguy
permlinkre-fabien-steemjs-20160722t205708442z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-07-22 20:57:06
last_update2016-07-22 20:57:06
depth1
children0
last_payout2016-08-25 01:00:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length67
author_reputation27,279,921,688,159
root_title"SteemJS: Explore Steem blockchain! New update with full database API methods coverage"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id282,000
net_rshares0