Skip to content
Snippets Groups Projects
Commit 5773030d authored by adcpm's avatar adcpm
Browse files

- Add browser support

parent 3b8b0d7d
No related branches found
No related tags found
No related merge requests found
# SteemJS # SteemJS
SteemJS the JavaScript API for Steem blockchain SteemJS the JavaScript API for Steem blockchain
## Documentation
Here is full documentation: https://github.com/adcpm/steem/tree/master/doc
## Browser
```html
<script src="./steem.min.js"></script>
<script>
steem.getAccounts(['ned', 'dan'], function(err, response){
console.log(err, response);
});
</script>
```
## Server
## Install ## Install
``` ```
$ npm install steem --save $ npm install steem --save
``` ```
## Documentation
Here is full documentation: https://github.com/adcpm/steem/tree/master/doc
## Examples ## Examples
### Get Accounts ### Get Accounts
```js ```js
...@@ -34,9 +45,6 @@ steem.getConfig(function(err, result) { ...@@ -34,9 +45,6 @@ steem.getConfig(function(err, result) {
}); });
``` ```
## Browser
Front-end library will be available soon as possible.
## Contributions ## Contributions
Patches are welcome! Contributors are listed in the package.json file. Please run the tests before opening a pull request and make sure that you are passing all of them. If you would like to contribute, but don't know what to work on, check the issues list or on Slack https://steem.slack.com/ channel #steemjs. Patches are welcome! Contributors are listed in the package.json file. Please run the tests before opening a pull request and make sure that you are passing all of them. If you would like to contribute, but don't know what to work on, check the issues list or on Slack https://steem.slack.com/ channel #steemjs.
......
...@@ -6,13 +6,11 @@ ...@@ -6,13 +6,11 @@
</head> </head>
<body> <body>
<script src="./../lib/steem.min.js"></script> <script src="./steem.min.js"></script>
<script> <script>
var steem = new Steem(); steem.getAccounts(['ned', 'dan'], function(err, response){
steem.getAccounts(['ned', 'dan'], function(err, response){ console.log(err, response);
console.log(err, response); });
});
</script> </script>
</body> </body>
......
var Steem = require('./steem.js');
steem = new Steem('wss://steemit.com/wstmp3');
\ No newline at end of file
This diff is collapsed.
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
"description": "SteemJS the JavaScript API for Steem blockchain", "description": "SteemJS the JavaScript API for Steem blockchain",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1", "test": "node test.js",
"build": "browserify lib/steem.js | uglifyjs > lib/steem.min.js" "build": "browserify lib/browser.js -o | uglifyjs > lib/steem.min.js && browserify lib/browser.js -o | uglifyjs > examples/steem.min.js"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment