UNPKG

571 BJavaScriptView Raw
1#!/usr/bin/env node
2let ScryptaCore = require('./index')
3let scrypta = new ScryptaCore
4
5const argv = require('yargs').argv
6const command = argv._[0]
7const arguments = []
8if(argv._.length > 1){
9 for(let x in argv._){
10 if(x > 0){
11 arguments.push(argv._[x])
12 }
13 }
14}
15
16// SWITCH COMMANDS
17async 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
26parseCommand()
\No newline at end of file