-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathindex.js
executable file
·48 lines (37 loc) · 1.26 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env node
var commander = require('commander')
var lib = require('./lib/program')
commander
.version(require('./package.json').version)
.option('-a --account <account>', 'ripple account')
.option('-k --key-path <path>', 'path to account secret key')
.option('-s --server <uri>', 'websocket uri to rippled server')
commander
.command('wallet')
.description('generate new random ripple account and secret key')
.action(lib.wallet.bind(commander))
commander
.command('balances')
.description('list balances for the specified account')
.action(lib.balances.bind(commander))
commander
.command('pay <destination> <amount> <currency> [issuer]')
.description('send money to another ripple account')
.action(lib.pay.bind(commander))
commander
.command('server_info')
.description('retrieve info of a running rippled server')
.action(lib.server_info.bind(commander))
commander
.command('account_info')
.description('retrieve info of a ripple account')
.action(lib.account_info.bind(commander))
commander
.command('account_set_domain <domain>')
.description('set account Domain field')
.action(lib.account_set_domain.bind(commander))
commander
.parse(process.argv)
if (!process.argv.slice(2).length) {
commander.outputHelp();
}