Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Http socket support #209

Merged
merged 60 commits into from
Jul 13, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
8f722a0
Add isomorphic-fetch and remove ws
bonustrack Feb 14, 2017
ae0ee78
Replace websocket param to uri on config.json
bonustrack Feb 14, 2017
7f1f7ad
Replace ws with fetch remove WebSocket logic
bonustrack Feb 14, 2017
eebf1dc
Update API tests
bonustrack Feb 14, 2017
0f71c41
Add mode no-cors
bonustrack Feb 14, 2017
4216ee6
Integrating broadcastTransactionSynchronous.
Feb 14, 2017
7ce6d49
Refactor broadcastTransactionSync wrapper and add error from json res…
bonustrack Feb 15, 2017
e47e14b
Fix api name
bonustrack Feb 15, 2017
0d529ce
Using dev url in unit tests.
Feb 15, 2017
141dcec
Updates api test code for more consistancy with the README.
Feb 15, 2017
575c56e
Remove one dep on lodash/noop
Feb 15, 2017
7cfccbe
Set default url to production.
Feb 15, 2017
72630d9
Move "broadcast" test into "broadcast.test.js" with the name "wrong"
bonustrack Feb 17, 2017
9f9417e
Add steemd http urls to config
Feb 17, 2017
d27ac01
Catch error on api send and merge diggest and transaction info on the…
bonustrack Feb 17, 2017
8cc8609
Update test to see error
bonustrack Feb 17, 2017
0d21e5b
Documented transaction error format in writeOperations unit test
Feb 17, 2017
efd6a4d
use cors mode
nil1511 Mar 2, 2017
0127e81
Remove transaction broadcast login API call (not used in synchronous …
Mar 13, 2017
f0e45a2
Add market API. close #99
Mar 13, 2017
67b33eb
Add auth.isPubkey(string) === true if the string is a valid public ke…
Mar 14, 2017
b60b739
Export the ecc package. close #103
Mar 14, 2017
d16c55e
Export the serilizer package. #103
Mar 14, 2017
8578167
Fixed import need for isPubkey #101
Mar 14, 2017
73e00ab
Add encrypted memo api. close #105
Mar 15, 2017
8425c62
Revert extra packages, these can be imported via a lib path. #103
Mar 15, 2017
c759543
Support string key types in memo api. #105
Mar 15, 2017
0622f0e
Add lib folder for test
bonustrack Mar 24, 2017
3493a92
Merge branch master
bonustrack Mar 24, 2017
a92c086
Update lib/
bonustrack Mar 24, 2017
0b06da3
Merge branch 'master' into 72-http-socket-support
yamadapc Jun 18, 2017
8e1664f
Initial working protocol switch
yamadapc Jun 18, 2017
bb08d57
Clean-up separation of concerns
yamadapc Jun 18, 2017
a584d0a
Split transports into different files
yamadapc Jun 18, 2017
913c985
Fix default steem/api/transports/ws export
yamadapc Jun 18, 2017
10e65b3
Make config.js behave like a normal JS object
yamadapc Jun 18, 2017
f241dda
Merge remote-tracking branch 'origin/master' into 72-http-socket-support
yamadapc Jun 19, 2017
1c79baf
Support raw config objects
yamadapc Jun 19, 2017
0fe0c72
Fixes to configuration handling
yamadapc Jun 19, 2017
f11937c
The default config still uses ws
yamadapc Jun 19, 2017
482ff4c
Remove lib directory from branch
yamadapc Jun 23, 2017
4b05564
Merge branch 'master' into 72-http-socket-support
yamadapc Jun 24, 2017
63696ce
Merge remote-tracking branch 'origin/master' into 72-http-socket-support
yamadapc Jun 27, 2017
d4f98d2
Add missing method
yamadapc Jun 27, 2017
d1f9b8e
Fix ops path
bonustrack Jun 27, 2017
e972eb0
Test comment operation only 1 time
bonustrack Jun 27, 2017
91ebd7d
Merge pull request #170 from beijaflor-io/72-http-socket-support
bonustrack Jun 27, 2017
b8915ef
Git ignore lib/ folder
bonustrack Jun 27, 2017
a95e5ed
Release v0.6.0-beta.0
bonustrack Jun 27, 2017
22a787d
Merge branch 'update-post-install-script' into 72-http-socket-support
nil1511 Jun 30, 2017
a348afd
Change json rpc format
bonustrack Jul 11, 2017
3450878
Merge branch '72-http-socket-support' of https://github.com/steemit/s…
bonustrack Jul 11, 2017
2aa648c
Add "json-rpc": "2.0"
bonustrack Jul 11, 2017
f7e6636
Release v0.6.0-beta.1
bonustrack Jul 11, 2017
1146cb5
needs to be jsonrpc instead of json-rpc to match the spec
jredbeard Jul 12, 2017
c10ff27
Merge pull request #208 from steemit/update-jsonrpc-string
bonustrack Jul 12, 2017
1e33463
Release 0.6.0-beta.2
bonustrack Jul 12, 2017
dca9b07
Merge branch 'master' into 72-http-socket-support
bonustrack Jul 13, 2017
d9d2631
Add doc for JSON-RPC
bonustrack Jul 13, 2017
ee88e81
Remove unnecessary ""
bonustrack Jul 13, 2017
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions config.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
{
"transport": "ws",
"websocket": "wss://steemd.steemit.com",
"uri": "https://steemd.steemit.com",
"dev_uri": "https://steemd.steemitdev.com",
"stage_uri": "https://steemd.steemitstage.com",
"address_prefix": "STM",
"chain_id": "0000000000000000000000000000000000000000000000000000000000000000"
}
24 changes: 12 additions & 12 deletions doc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
- [Install](#install)
- [Browser](#browser)
- [Config](#config)
- [JSON-RPC](#jsonrpc)
- [Database API](#api)
- [Subscriptions](#subscriptions)
- [Tags](#tags)
Expand Down Expand Up @@ -54,6 +55,16 @@ steem.config.set('address_prefix','STM');
steem.config.get('chain_id');
```

## JSON-RPC
Here is how to activate JSON-RPC transport:
```js
steem.api.setOptions({
transport: 'http',
uri: 'https://steemd.steemitdev.com' // Optional, by default https://steemd.steemit.com is used.
});

```

# API

## Subscriptions
Expand Down Expand Up @@ -517,12 +528,6 @@ steem.api.getFollowCount(account, function(err, result) {

## Broadcast API

### Broadcast Transaction
```
steem.api.broadcastTransaction(trx, function(err, result) {
console.log(err, result);
});
```
### Broadcast Transaction Synchronous
```
steem.api.broadcastTransactionSynchronous(trx, function(err, result) {
Expand All @@ -535,12 +540,7 @@ steem.api.broadcastBlock(b, function(err, result) {
console.log(err, result);
});
```
### Broadcast Transaction With Callback
```
steem.api.broadcastTransactionWithCallback(confirmationCallback, trx, function(err, result) {
console.log(err, result);
});
```

# Broadcast

### Account Create
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "steem",
"version": "0.5.20",
"version": "0.6.0",
"description": "Steem.js the JavaScript API for Steem blockchain",
"main": "lib/index.js",
"scripts": {
Expand Down Expand Up @@ -45,9 +45,10 @@
"debug": "^2.6.8",
"detect-node": "^2.0.3",
"ecurve": "^1.0.5",
"isomorphic-fetch": "^2.2.1",
"lodash": "^4.16.4",
"secure-random": "^1.1.1",
"ws": "^1.1.1"
"ws": "^3.0.0"
},
"devDependencies": {
"babel-cli": "^6.16.0",
Expand Down
Loading