Step 1. Setup up a raiblock node using these instructions https://github.com/clemahieu/raiblocks/wiki/Docker-node
Step 2.
yarn
yarn build:client # then open up index.html and check logs
node . # to run in nodeStep 1. Setup up a raiblock node using these instructions https://github.com/clemahieu/raiblocks/wiki/Docker-node
Step 2.
yarn
yarn build:client # then open up index.html and check logs
node . # to run in node| <html> | |
| <head></head> | |
| <body> | |
| <script src="bundle.js"></script> | |
| </body> | |
| </html> |
| const Rai = require('raiblocks-js').default; | |
| const rai = new Rai(); | |
| console.log(rai); | |
| rai.account.weight({ account: 'xrb_1313648f73x5jkwxa5bzmysf73bw35ajuygniubeqa96qatbpo4uqj9kohhu' }).then((res) => { | |
| console.log(res); | |
| }); |
| { | |
| "name": "test", | |
| "version": "1.0.0", | |
| "description": "", | |
| "main": "index.js", | |
| "scripts": { | |
| "start": "node .", | |
| "build:client": "browserify index.js -o bundle.js" | |
| }, | |
| "author": "", | |
| "license": "ISC", | |
| "dependencies": { | |
| "raiblocks-js": "^0.4.2" | |
| }, | |
| "devDependencies": { | |
| "browserify": "^15.1.0" | |
| } | |
| } |