create account

SteemJS : the library for JavaScript lovers. Now release! by fabien

View this thread on: hive.blogpeakd.comecency.com
· @fabien · (edited)
$563.79
SteemJS : the library for JavaScript lovers. Now release!
https://dl.dropboxusercontent.com/u/552542683/SteemJS-intro.png

## Edit: Check out the new version on my new post here with 59 added methods : https://steemit.com/steemjs/@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

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

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

## Send
```js
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
```js
Steem.getAccounts(['ned', 'dan'], function(result, err) {
	console.log(result, err);
});
```

## Get Account
```js
Steem.getAccount('steemit', function(result, err) {
	console.log(result, err);
});
```

## Get Block
```js
Steem.getBlock(3000000, function(result, err) {
	console.log(result, err);
});
```

## Streaming Block Number
```js
Steem.streamBlockNumber(function(result) {
	console.log(result);
});
```

## Streaming Block
```js
Steem.streamBlock(function(result) {
	console.log(result);
});
```

## Streaming Transactions
```js
Steem.streamTransactions(function(result) {
	console.log(result);
});
```

## Streaming Operations
```js
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
๐Ÿ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 64 others
๐Ÿ‘Ž  
properties (23)
authorfabien
permlinksteemjs-new-npm-package-for-javascript-lovers
categorysteemjs
json_metadata{"tags":["github","js","nodejs","npm","steem","javascript","dev","steemjs","steemit"],"image":["https://dl.dropboxusercontent.com/u/552542683/SteemJS-intro.png"]}
created2016-07-21 21:45:30
last_update2016-07-23 08:47:06
depth0
children16
last_payout2016-08-22 10:04:27
cashout_time1969-12-31 23:59:59
total_payout_value487.539 HBD
curator_payout_value76.248 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,975
author_reputation16,649,367,183,999
root_title"SteemJS : the library for JavaScript lovers. Now release!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id259,124
net_rshares41,118,125,898,568
author_curate_reward""
vote details (129)
@bhokor ·
fabien you deserve 100000000 of steempower for it, really infinete thanks you
๐Ÿ‘  
properties (23)
authorbhokor
permlinkre-fabien-steemjs-new-npm-package-for-javascript-lovers-20160721t224422299z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-07-21 22:44:24
last_update2016-07-21 22:44:24
depth1
children0
last_payout2016-08-22 10:04:27
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_length77
author_reputation1,535,566,094,086
root_title"SteemJS : the library for JavaScript lovers. Now release!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id260,551
net_rshares13,503,063,721
author_curate_reward""
vote details (1)
@bolnavioru ·
Already, good job!!!!
๐Ÿ‘  
properties (23)
authorbolnavioru
permlinkre-fabien-steemjs-new-npm-package-for-javascript-lovers-20160721t214638323z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-07-21 21:46:39
last_update2016-07-21 21:46:39
depth1
children0
last_payout2016-08-22 10:04:27
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_length21
author_reputation650,904,154
root_title"SteemJS : the library for JavaScript lovers. Now release!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id259,148
net_rshares116,298,718
author_curate_reward""
vote details (1)
@cryptotony ·
Tnx, will most likely use your lib in future projects.

Guys, check out my new service here: https://steemit.com/steemit/@cryptotony/steem-link-first-steemit-short-url-service-with-bunch-of-features
http://i.imgsafe.org/15587103d5.png
๐Ÿ‘  ,
properties (23)
authorcryptotony
permlinkre-fabien-steemjs-new-npm-package-for-javascript-lovers-20160722t015141940z
categorysteemjs
json_metadata{"tags":["steemjs"],"links":["https://steemit.com/steemit/@cryptotony/steem-link-first-steemit-short-url-service-with-bunch-of-features"]}
created2016-07-22 01:51:45
last_update2016-07-22 01:51:45
depth1
children0
last_payout2016-08-22 10:04:27
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_length234
author_reputation152,988,007,943
root_title"SteemJS : the library for JavaScript lovers. Now release!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id263,836
net_rshares1,185,485,405
author_curate_reward""
vote details (2)
@fyrstikken ·
$0.19
Wow - Very nice work there @fabien - Upvoted & Followed you!

Since you are already on it - may I suggest writing a WordPress plugin that can publish WordPress content to Steemit using the post-key?

Iยดm sure there will be a LOT of money in it for you if you do, and there is a growing demand for it. (hint hint)
๐Ÿ‘  
properties (23)
authorfyrstikken
permlinkre-fabien-steemjs-new-npm-package-for-javascript-lovers-20160721t220754594z
categorysteemjs
json_metadata{"tags":["steemjs"],"users":["fabien"]}
created2016-07-21 22:07:54
last_update2016-07-21 22:07:54
depth1
children0
last_payout2016-08-22 10:04:27
cashout_time1969-12-31 23:59:59
total_payout_value0.186 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length312
author_reputation377,187,606,449,589
root_title"SteemJS : the library for JavaScript lovers. Now release!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id259,636
net_rshares149,774,568,971
author_curate_reward""
vote details (1)
@jesta ·
Looks great! Excited to see where it goes.
properties (22)
authorjesta
permlinkre-fabien-steemjs-new-npm-package-for-javascript-lovers-20160721t215809383z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-07-21 21:58:09
last_update2016-07-21 21:58:09
depth1
children0
last_payout2016-08-22 10:04:27
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_length42
author_reputation140,605,453,893,072
root_title"SteemJS : the library for JavaScript lovers. Now release!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id259,420
net_rshares0
@moch-yusuf ·
Great post!
But I dont understand with JavaScript, i need to learn JavaScript  for future
๐Ÿ‘  
properties (23)
authormoch-yusuf
permlinkre-fabien-steemjs-new-npm-package-for-javascript-lovers-20160721t223845853z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-07-21 22:38:48
last_update2016-07-21 22:38:48
depth1
children1
last_payout2016-08-22 10:04:27
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_length89
author_reputation1,033,311,583,847
root_title"SteemJS : the library for JavaScript lovers. Now release!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id260,407
net_rshares6,777,013,002
author_curate_reward""
vote details (1)
@cqf ·
$1.78
I benefit a lot from Steem JS
๐Ÿ‘  ,
properties (23)
authorcqf
permlinkre-moch-yusuf-re-fabien-steemjs-new-npm-package-for-javascript-lovers-20171114t011535835z
categorysteemjs
json_metadata{"tags":["steemjs"],"app":"steemit/0.1"}
created2017-11-14 01:15:36
last_update2017-11-14 01:15:36
depth2
children0
last_payout2017-11-21 01:15:36
cashout_time1969-12-31 23:59:59
total_payout_value1.765 HBD
curator_payout_value0.013 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length29
author_reputation997,529,241,600
root_title"SteemJS : the library for JavaScript lovers. Now release!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id20,307,262
net_rshares860,976,233,377
author_curate_reward""
vote details (2)
@noisy ·
$0.24
Great job @fabien:

Guys, if you like it, give it also a star on github:

http://i.imgur.com/mVgJFdQ.png

This wil help him find more contributors in the future :)
๐Ÿ‘  , ,
properties (23)
authornoisy
permlinkre-fabien-steemjs-new-npm-package-for-javascript-lovers-20160721t232636905z
categorysteemjs
json_metadata{"tags":["steemjs"],"users":["fabien"],"image":["http://i.imgur.com/mVgJFdQ.png"]}
created2016-07-21 23:26:36
last_update2016-07-21 23:26:36
depth1
children0
last_payout2016-08-22 10:04:27
cashout_time1969-12-31 23:59:59
total_payout_value0.186 HBD
curator_payout_value0.055 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length163
author_reputation59,974,373,499,600
root_title"SteemJS : the library for JavaScript lovers. Now release!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id261,383
net_rshares191,316,032,910
author_curate_reward""
vote details (3)
@originate · (edited)
$0.04
@fabien Awesome man, I can't wait to use this on my projects.  Having a library like this is a great addition.  We need more wrappers.  I also shortened your post here with steemurl, so you can track the clicks.  
http://steemurl.com/D49xrN6A

Release for steemurl:  http://steemurl.com/5ct_irFs
๐Ÿ‘  , , , ,
properties (23)
authororiginate
permlinkre-fabien-steemjs-new-npm-package-for-javascript-lovers-20160722t000144533z
categorysteemjs
json_metadata{"tags":["steemjs"],"users":["fabien"],"links":["http://steemurl.com/D49xrN6A"]}
created2016-07-22 00:01:45
last_update2016-07-22 00:04:42
depth1
children0
last_payout2016-08-22 10:04:27
cashout_time1969-12-31 23:59:59
total_payout_value0.040 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length295
author_reputation175,421,925,272,702
root_title"SteemJS : the library for JavaScript lovers. Now release!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id261,956
net_rshares35,878,318,388
author_curate_reward""
vote details (5)
@raphma ·
Thank you ma friend, that was exactly what i was looking for!

---
Have a look in this, it's great too!
https://steemit.com/writing/@steemitdude/when-you-need-an-idea-to-a-new-post
๐Ÿ‘  ,
properties (23)
authorraphma
permlinkre-fabien-steemjs-new-npm-package-for-javascript-lovers-20160721t221914754z
categorysteemjs
json_metadata{"tags":["steemjs"],"links":["https://steemit.com/writing/@steemitdude/when-you-need-an-idea-to-a-new-post"]}
created2016-07-21 22:19:36
last_update2016-07-21 22:19:36
depth1
children0
last_payout2016-08-22 10:04:27
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_length180
author_reputation103,997,978,070
root_title"SteemJS : the library for JavaScript lovers. Now release!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id259,913
net_rshares13,630,766,093
author_curate_reward""
vote details (2)
@recursive · (edited)
$0.22
Cool project, but name could be more original. There are already two other (different) SteemJS libraries out there: [SteemJS](https://github.com/svk31/steemjs-lib) and .... [SteemJS](https://github.com/pharesim/steemjs). Maybe you should discuss with other authors to see how to avoid future confusion.
๐Ÿ‘  , , ,
properties (23)
authorrecursive
permlinkre-fabien-steemjs-new-npm-package-for-javascript-lovers-20160721t220834484z
categorysteemjs
json_metadata{"tags":["steemjs"],"links":["https://github.com/svk31/steemjs-lib"]}
created2016-07-21 22:07:30
last_update2016-07-21 22:13:24
depth1
children2
last_payout2016-08-22 10:04:27
cashout_time1969-12-31 23:59:59
total_payout_value0.172 HBD
curator_payout_value0.048 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length302
author_reputation14,577,151,751,433
root_title"SteemJS : the library for JavaScript lovers. Now release!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id259,626
net_rshares175,090,979,865
author_curate_reward""
vote details (4)
@fabien · (edited)
$0.20
Alright I will probably change the name to something more original. In meantime I've just edited the name and change it to Steem.JS (<- See the dot?).
๐Ÿ‘  ,
properties (23)
authorfabien
permlinkre-recursive-re-fabien-steemjs-new-npm-package-for-javascript-lovers-20160721t222024901z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-07-21 22:20:30
last_update2016-07-21 22:21:03
depth2
children1
last_payout2016-08-22 10:04:27
cashout_time1969-12-31 23:59:59
total_payout_value0.152 HBD
curator_payout_value0.048 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length150
author_reputation16,649,367,183,999
root_title"SteemJS : the library for JavaScript lovers. Now release!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id259,937
net_rshares159,396,303,088
author_curate_reward""
vote details (2)
@recursive ·
That's so much more clear ;)
๐Ÿ‘  
properties (23)
authorrecursive
permlinkre-fabien-re-recursive-re-fabien-steemjs-new-npm-package-for-javascript-lovers-20160721t225745387z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-07-21 22:56:42
last_update2016-07-21 22:56:42
depth3
children0
last_payout2016-08-22 10:04:27
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_length28
author_reputation14,577,151,751,433
root_title"SteemJS : the library for JavaScript lovers. Now release!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id260,817
net_rshares13,503,063,721
author_curate_reward""
vote details (1)
@saulius ·
@fabien Awesome project, buddy! Is there any way to get user's blog posts?
properties (22)
authorsaulius
permlinkre-fabien-steemjs-new-npm-package-for-javascript-lovers-20160722t185421488z
categorysteemjs
json_metadata{"tags":["steemjs"],"users":["fabien"]}
created2016-07-22 18:54:21
last_update2016-07-22 18:54:21
depth1
children0
last_payout2016-08-22 10:04:27
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_length74
author_reputation2,493,815,076,539
root_title"SteemJS : the library for JavaScript lovers. Now release!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id279,443
net_rshares0
@stranger27 ·
Is it possible to make a miner with help of this library for Windows (x86)?
properties (22)
authorstranger27
permlinkre-fabien-steemjs-new-npm-package-for-javascript-lovers-20160722t152242478z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-07-22 15:23:00
last_update2016-07-22 15:23:00
depth1
children0
last_payout2016-08-22 10:04:27
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_length75
author_reputation49,275,349,388,874
root_title"SteemJS : the library for JavaScript lovers. Now release!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id275,524
net_rshares0
@suicidemime ·
Very good news! Thx ;)
properties (22)
authorsuicidemime
permlinkre-fabien-steemjs-new-npm-package-for-javascript-lovers-20160721t214757071z
categorysteemjs
json_metadata{"tags":["steemjs"]}
created2016-07-21 21:47:51
last_update2016-07-21 21:47:51
depth1
children0
last_payout2016-08-22 10:04:27
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_length22
author_reputation-34,752,377,613
root_title"SteemJS : the library for JavaScript lovers. Now release!"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id259,177
net_rshares0