-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: 🎸 Categorizing to organize command line tools
- Loading branch information
Showing
50 changed files
with
512 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 4 additions & 3 deletions
7
packages/ddn/src/cmds/maintain.js → packages/ddn/src/cmds/account.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { init, lock } from '../../plugins/api' | ||
|
||
module.exports = { | ||
command: 'lock', | ||
aliases: 'L', | ||
desc: 'Lock account to ban transfer ...', | ||
builder: { | ||
secret: { | ||
alias: 'e', | ||
describe: 'secret' | ||
}, | ||
secondSecret: { | ||
alias: 's', | ||
describe: 'secondSecret' | ||
}, | ||
height: { | ||
alias: 'h', | ||
describe: 'lock height' | ||
} | ||
}, | ||
|
||
handler: function (argv) { | ||
init(argv) | ||
lock(argv) | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { init, setSecondSecret } from '../../plugins/api' | ||
|
||
module.exports = { | ||
command: 'setSecondSecret', | ||
aliases: 'SSS', | ||
desc: 'Set second secret', | ||
builder: { | ||
secret: { | ||
alias: 'e', | ||
describe: 'secret' | ||
}, | ||
secondSecret: { | ||
alias: 's', | ||
describe: 'secondSecret' | ||
} | ||
}, | ||
|
||
handler: function (argv) { | ||
init(argv) | ||
setSecondSecret(argv) | ||
} | ||
} |
8 changes: 4 additions & 4 deletions
8
packages/ddn/src/cmds/blockchain.js → packages/ddn/src/cmds/block.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { init, getBlockPayloadHash } from '../../plugins/api' | ||
|
||
module.exports = { | ||
command: 'getBlockPayloadHash', | ||
aliases: 'GBI', | ||
desc: 'Get block payload hash', | ||
builder: { | ||
file: { | ||
alias: 'f', | ||
describe: 'block file' | ||
} | ||
}, | ||
|
||
handler: function (argv) { | ||
init(argv) | ||
getBlockPayloadHash(argv) | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { init, getFullBlockByHeight } from '../../plugins/api' | ||
|
||
module.exports = { | ||
command: 'getFullBlockByHeight [height]', | ||
aliases: 'GFBBH', | ||
desc: 'Get full block by block height', | ||
builder: {}, | ||
|
||
handler: function (argv) { | ||
init(argv) | ||
getFullBlockByHeight(argv.height) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import { init, getFullBlockById } from '../../plugins/api' | ||
|
||
module.exports = { | ||
command: 'getFullBlockById [id]', | ||
aliases: 'GFBBI', | ||
desc: 'Get full block by block id', | ||
builder: {}, | ||
|
||
handler: function (argv) { | ||
init(argv) | ||
getFullBlockById(argv.id) | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
command: 'delegate [command]', | ||
aliases: ['D'], | ||
desc: 'DDN delegate manage tools.', | ||
builder: function (yargs) { | ||
return yargs.commandDir('delegate') | ||
}, | ||
|
||
handler: function (argv) { | ||
console.log('Hi, please select a command, e.g: peerStat, --help') | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { init, downvote } from '../../plugins/api' | ||
|
||
module.exports = { | ||
command: 'downvote', | ||
aliases: 'DV', | ||
desc: 'Cancel vote for delegates', | ||
builder: { | ||
secret: { | ||
alias: 'e', | ||
describe: 'secret' | ||
}, | ||
secondSecret: { | ||
alias: 's', | ||
describe: 'secondSecret' | ||
}, | ||
publicKeys: { | ||
alias: 'p', | ||
describe: 'publicKey list' | ||
} | ||
}, | ||
|
||
handler: function (argv) { | ||
init(argv) | ||
downvote(argv) | ||
} | ||
} |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { init, listdiffvotes } from '../../plugins/api' | ||
|
||
module.exports = { | ||
command: 'listdiffvotes', | ||
aliases: 'LDV', | ||
desc: 'List all you voted but doesn`t vote you and voted you but you don`t vote.', | ||
builder: { | ||
username: { | ||
alias: 'u', | ||
describe: 'username' | ||
} | ||
}, | ||
|
||
handler: function (argv) { | ||
init(argv) | ||
listdiffvotes(argv) | ||
} | ||
} |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { init, registerDelegate } from '../../plugins/api' | ||
|
||
module.exports = { | ||
command: 'registerDelegate', | ||
aliases: 'RD', | ||
desc: 'Register delegate', | ||
builder: { | ||
secret: { | ||
alias: 'e', | ||
describe: 'secret' | ||
}, | ||
secondSecret: { | ||
alias: 's', | ||
describe: 'secondSecret' | ||
}, | ||
username: { | ||
alias: 'u', | ||
describe: 'username' | ||
} | ||
}, | ||
|
||
handler: function (argv) { | ||
init(argv) | ||
registerDelegate(argv) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { init, upvote } from '../../plugins/api' | ||
|
||
module.exports = { | ||
command: 'upvote', | ||
aliases: 'UV', | ||
desc: 'Vote for delegates', | ||
builder: { | ||
secret: { | ||
alias: 'e', | ||
describe: 'secret' | ||
}, | ||
secondSecret: { | ||
alias: 's', | ||
describe: 'secondSecret' | ||
}, | ||
publicKeys: { | ||
alias: 'p', | ||
describe: 'publicKey list' | ||
} | ||
}, | ||
|
||
handler: function (argv) { | ||
init(argv) | ||
upvote(argv) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { init, getBlockBytes } from '../../plugins/api' | ||
|
||
module.exports = { | ||
command: 'getBlockBytes', | ||
aliases: 'GBB', | ||
desc: 'Get block bytes', | ||
builder: { | ||
file: { | ||
alias: 'f', | ||
describe: 'block file' | ||
} | ||
}, | ||
|
||
handler: function (argv) { | ||
init(argv) | ||
getBlockBytes(argv) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { init, getBlockId } from '../../plugins/api' | ||
|
||
module.exports = { | ||
command: 'getBlockId', | ||
aliases: 'GBI', | ||
desc: 'Get block id', | ||
builder: { | ||
file: { | ||
alias: 'f', | ||
describe: 'block file' | ||
} | ||
}, | ||
|
||
handler: function (argv) { | ||
init(argv) | ||
getBlockId(argv) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { init, getTransactionBytes } from '../../plugins/api' | ||
|
||
module.exports = { | ||
command: 'getTransactionBytes', | ||
aliases: 'GTB', | ||
desc: 'Get transaction bytes', | ||
builder: { | ||
file: { | ||
alias: 'f', | ||
describe: 'transaction file' | ||
} | ||
}, | ||
|
||
handler: function (argv) { | ||
init(argv) | ||
getTransactionBytes(argv) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { init, getTransactionId } from '../../plugins/api' | ||
|
||
module.exports = { | ||
command: 'getTransactionId', | ||
aliases: 'GTI', | ||
desc: 'Get transaction id', | ||
builder: { | ||
file: { | ||
alias: 'f', | ||
describe: 'transaction file' | ||
} | ||
}, | ||
|
||
handler: function (argv) { | ||
init(argv) | ||
getTransactionId(argv) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { init, verifyBytes } from '../../plugins/api' | ||
|
||
module.exports = { | ||
command: 'verifyBytes', | ||
aliases: 'VB', | ||
desc: 'Verify bytes/signature/publickey', | ||
builder: { | ||
bytes: { | ||
alias: 'b', | ||
describe: 'transaction or block bytes' | ||
}, | ||
signature: { | ||
alias: 's', | ||
describe: 'transaction or block signature' | ||
}, | ||
publicKey: { | ||
alias: 'p', | ||
describe: 'signer public key' | ||
} | ||
}, | ||
|
||
handler: function (argv) { | ||
init(argv) | ||
verifyBytes(argv) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
module.exports = { | ||
command: 'transaction [command]', | ||
aliases: ['T', 'trs'], | ||
desc: 'Manage transaction tools.', | ||
builder: function (yargs) { | ||
return yargs.commandDir('transaction') | ||
}, | ||
|
||
handler: function (argv) { | ||
console.log('Hi, please select a command, e.g: getTransaction, --help') | ||
} | ||
} |
Oops, something went wrong.