1 | #!/usr/bin/env node
|
2 | let ScryptaCore = require('./index')
|
3 | let scrypta = new ScryptaCore
|
4 |
|
5 | const argv = require('yargs').argv
|
6 | const command = argv._[0]
|
7 | const arguments = []
|
8 | if(argv._.length > 1){
|
9 | for(let x in argv._){
|
10 | if(x > 0){
|
11 | arguments.push(argv._[x])
|
12 | }
|
13 | }
|
14 | }
|
15 |
|
16 |
|
17 | async function parseCommand(){
|
18 | switch(command){
|
19 | case "getinfo":
|
20 | let getinfo = await scrypta.get('/wallet/getinfo').catch(err=>{console.log(err)})
|
21 | console.log(JSON.stringify(getinfo))
|
22 | break;
|
23 | }
|
24 | }
|
25 |
|
26 | parseCommand() |
\ | No newline at end of file |