Openledger nodejs api
Switch branches/tags
Nothing to show
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
libs add balanceorder and fix history Mar 27, 2017
middlewares node api Dec 23, 2016
.gitignore voting update Jan 4, 2017
Examles_in_browser.md add original link Dec 23, 2016
Examles_uses_CURL.md start csv Dec 23, 2016
README.md add original link Dec 23, 2016
cfg.js add run scripts and reserve connect Jan 18, 2017
logo.png node api Dec 23, 2016
package.json add ltm Feb 6, 2017
private_keys.png node api Dec 23, 2016
server_api.js console Mar 1, 2017
startshell.sh node api Dec 23, 2016
webpack.config.js voting update Jan 4, 2017

README.md

Openledger nodejs api

N|Solid

Set accounts and wif passwords

It's required.

you need get your WIF private key from https://bitshares.openledger.info

these keys required for create transaction and read memo

N|Solid

go to cfg.js file and edit.

for example:

module.exports = {
    wssapi: 'wss://bitshares.openledger.info/ws',  // you can choose blockchain server for send your request
    localhost: '127.0.0.1', //your web server
    private_keys: {
        "user-1": '5RTTdfdfdf456456fghfg546kliopiogfghfghxxxxxsdasdasd',
        "name_of_user_2": 'SET YOUR WIF PRIVATE KEY HERE...',
        "name_of_user_3": 'SET YOUR WIF PRIVATE KEY HERE...'
    }
};

Installation

This script for fast install (install nodejs, dependencies and run server on port :8090).

$ git clone https://github.com/openledger/openledger_nodejs_api
$ cd openledger_nodejs_api
$ chmod +x startshell.sh && ./startshell.sh

Custom install

If you dont have nodejs you need install requires Node.js v6+ to run. We recommended install Nodejs 7. node.js package-manager

Run server on custom port

node server_api.js PORT

for example:

node server_api.js 8090

default value of port is 8090

Routing

this api have two urls paths:

Please format body as JSON.

http://127.0.0.1/api/transfer for transaction actions.

http://127.0.0.1/api/history get history of blockchain.

Examples

DON'T FORGET TO ADD KEYS TO CFG.JS AS METIONED ABOVE (cfg.js)

Examles in browser

Examles uses CURL