Skip to content
Snippets Groups Projects
Commit 4d2e34a8 authored by Mahdi Yari's avatar Mahdi Yari
Browse files

Merge branch 'min-doc-update' into 'master'

Min doc update

See merge request !8
parents a0e9e6e7 a4dc57e0
No related branches found
No related tags found
1 merge request!8Min doc update
...@@ -25,6 +25,9 @@ Hive.js the Official JavaScript API for Hive blockchain ...@@ -25,6 +25,9 @@ Hive.js the Official JavaScript API for Hive blockchain
- [Broadcast API](https://gitlab.syncad.com/hive/hive-js/tree/master/doc#broadcast-api) - [Broadcast API](https://gitlab.syncad.com/hive/hive-js/tree/master/doc#broadcast-api)
- [Broadcast](https://gitlab.syncad.com/hive/hive-js/tree/master/doc#broadcast) - [Broadcast](https://gitlab.syncad.com/hive/hive-js/tree/master/doc#broadcast)
- [Auth](https://gitlab.syncad.com/hive/hive-js/tree/master/doc#auth) - [Auth](https://gitlab.syncad.com/hive/hive-js/tree/master/doc#auth)
- [Formatter](https://gitlab.syncad.com/hive/hive-js/tree/master/doc#formatter)
- [Utils](https://gitlab.syncad.com/hive/hive-js/tree/master/doc#utils)
- [Tutorials](https://gitlab.syncad.com/hive/hive-js/tree/master/doc#tutorials)
Here is full documentation: Here is full documentation:
......
...@@ -22,6 +22,8 @@ ...@@ -22,6 +22,8 @@
- [Broadcast](#broadcast) - [Broadcast](#broadcast)
- [Auth](#auth) - [Auth](#auth)
- [Formatter](#formatter) - [Formatter](#formatter)
- [Utils](#utils)
- [Tutorials](#tutorials)
# Install # Install
``` ```
...@@ -38,6 +40,12 @@ hive.api.getAccounts(['mahdiyari', 'hiveio'], function(err, response){ ...@@ -38,6 +40,12 @@ hive.api.getAccounts(['mahdiyari', 'hiveio'], function(err, response){
</script> </script>
``` ```
## CDN
https://cdn.jsdelivr.net/npm/@hiveio/hive-js/dist/hive.min.js<br/>
```html
<script src="https://cdn.jsdelivr.net/npm/@hiveio/hive-js/dist/hive.min.js"></script>
```
## Config ## Config
Default config should work with Hive. However you can change default config. Default config should work with Hive. However you can change default config.
as as
...@@ -50,6 +58,15 @@ hive.config.set('alternative_api_endpoints', ['https://api.hive.blog', 'https:// ...@@ -50,6 +58,15 @@ hive.config.set('alternative_api_endpoints', ['https://api.hive.blog', 'https://
### rebranded_api ### rebranded_api
Set `rebranded_api` to `true` for connecting to eclipse (hf24) RPC nodes. Set `rebranded_api` to `true` for connecting to eclipse (hf24) RPC nodes.
**It is highly recommended to change this option in the config.json file!**
OR
```
hive.config.set('rebranded_api','true');
hive.broadcast.updateOperations(); // Necessary to update the already loaded operations
```
### set ### set
``` ```
hive.config.set('address_prefix','STM'); hive.config.set('address_prefix','STM');
...@@ -1001,5 +1018,10 @@ Note: this will update the config too based on the result. ...@@ -1001,5 +1018,10 @@ Note: this will update the config too based on the result.
var apiVersion = await hive.utils.autoDetectApiVersion(); var apiVersion = await hive.utils.autoDetectApiVersion();
console.log(apiVersion); console.log(apiVersion);
// => { rebranded_api: true } // => { rebranded_api: true }
hive.broadcast.updateOperations(); // Necessary to update the already loaded operations
``` ```
## Tutorials
[How to use HiveJs on React Native](https://peakd.com/hive-139531/@stoodkev/how-to-use-hivejs-or-other-modules-referencing-core-node-js-modules-on-react-native)
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