cli/wallet: specify --wallet-config for all commands accepting it
This commit is contained in:
parent
28e2010cbd
commit
4c8e00369c
3 changed files with 17 additions and 17 deletions
|
@ -48,21 +48,21 @@ func newNEP11Commands() []cli.Command {
|
||||||
{
|
{
|
||||||
Name: "balance",
|
Name: "balance",
|
||||||
Usage: "get address balance",
|
Usage: "get address balance",
|
||||||
UsageText: "balance --wallet <path> --rpc-endpoint <node> [--timeout <time>] [--address <address>] --token <hash-or-name> [--id <token-id>]",
|
UsageText: "balance -w wallet [--wallet-config path] --rpc-endpoint <node> [--timeout <time>] [--address <address>] --token <hash-or-name> [--id <token-id>]",
|
||||||
Action: getNEP11Balance,
|
Action: getNEP11Balance,
|
||||||
Flags: balanceFlags,
|
Flags: balanceFlags,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "import",
|
Name: "import",
|
||||||
Usage: "import NEP-11 token to a wallet",
|
Usage: "import NEP-11 token to a wallet",
|
||||||
UsageText: "import --wallet <path> --rpc-endpoint <node> --timeout <time> --token <hash>",
|
UsageText: "import -w wallet [--wallet-config path] --rpc-endpoint <node> --timeout <time> --token <hash>",
|
||||||
Action: importNEP11Token,
|
Action: importNEP11Token,
|
||||||
Flags: importFlags,
|
Flags: importFlags,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "info",
|
Name: "info",
|
||||||
Usage: "print imported NEP-11 token info",
|
Usage: "print imported NEP-11 token info",
|
||||||
UsageText: "print --wallet <path> [--token <hash-or-name>]",
|
UsageText: "print -w wallet [--wallet-config path] [--token <hash-or-name>]",
|
||||||
Action: printNEP11Info,
|
Action: printNEP11Info,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
walletPathFlag,
|
walletPathFlag,
|
||||||
|
@ -73,7 +73,7 @@ func newNEP11Commands() []cli.Command {
|
||||||
{
|
{
|
||||||
Name: "remove",
|
Name: "remove",
|
||||||
Usage: "remove NEP-11 token from the wallet",
|
Usage: "remove NEP-11 token from the wallet",
|
||||||
UsageText: "remove --wallet <path> --token <hash-or-name>",
|
UsageText: "remove -w wallet [--wallet-config path] --token <hash-or-name>",
|
||||||
Action: removeNEP11Token,
|
Action: removeNEP11Token,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
walletPathFlag,
|
walletPathFlag,
|
||||||
|
@ -85,7 +85,7 @@ func newNEP11Commands() []cli.Command {
|
||||||
{
|
{
|
||||||
Name: "transfer",
|
Name: "transfer",
|
||||||
Usage: "transfer NEP-11 tokens",
|
Usage: "transfer NEP-11 tokens",
|
||||||
UsageText: "transfer --wallet <path> --rpc-endpoint <node> --timeout <time> --from <addr> --to <addr> --token <hash-or-name> --id <token-id> [--amount string] [data] [-- <cosigner1:Scope> [<cosigner2> [...]]]",
|
UsageText: "transfer -w wallet [--wallet-config path] --rpc-endpoint <node> --timeout <time> --from <addr> --to <addr> --token <hash-or-name> --id <token-id> [--amount string] [data] [-- <cosigner1:Scope> [<cosigner2> [...]]]",
|
||||||
Action: transferNEP11,
|
Action: transferNEP11,
|
||||||
Flags: transferFlags,
|
Flags: transferFlags,
|
||||||
Description: `Transfers specified NEP-11 token with optional cosigners list attached to
|
Description: `Transfers specified NEP-11 token with optional cosigners list attached to
|
||||||
|
|
|
@ -90,21 +90,21 @@ func newNEP17Commands() []cli.Command {
|
||||||
{
|
{
|
||||||
Name: "balance",
|
Name: "balance",
|
||||||
Usage: "get address balance",
|
Usage: "get address balance",
|
||||||
UsageText: "balance --wallet <path> --rpc-endpoint <node> [--timeout <time>] [--address <address>] [--token <hash-or-name>]",
|
UsageText: "balance -w wallet [--wallet-config path] --rpc-endpoint <node> [--timeout <time>] [--address <address>] [--token <hash-or-name>]",
|
||||||
Action: getNEP17Balance,
|
Action: getNEP17Balance,
|
||||||
Flags: balanceFlags,
|
Flags: balanceFlags,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "import",
|
Name: "import",
|
||||||
Usage: "import NEP-17 token to a wallet",
|
Usage: "import NEP-17 token to a wallet",
|
||||||
UsageText: "import --wallet <path> --rpc-endpoint <node> --timeout <time> --token <hash>",
|
UsageText: "import -w wallet [--wallet-config path] --rpc-endpoint <node> --timeout <time> --token <hash>",
|
||||||
Action: importNEP17Token,
|
Action: importNEP17Token,
|
||||||
Flags: importFlags,
|
Flags: importFlags,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "info",
|
Name: "info",
|
||||||
Usage: "print imported NEP-17 token info",
|
Usage: "print imported NEP-17 token info",
|
||||||
UsageText: "print --wallet <path> [--token <hash-or-name>]",
|
UsageText: "print -w wallet [--wallet-config path] [--token <hash-or-name>]",
|
||||||
Action: printNEP17Info,
|
Action: printNEP17Info,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
walletPathFlag,
|
walletPathFlag,
|
||||||
|
@ -115,7 +115,7 @@ func newNEP17Commands() []cli.Command {
|
||||||
{
|
{
|
||||||
Name: "remove",
|
Name: "remove",
|
||||||
Usage: "remove NEP-17 token from the wallet",
|
Usage: "remove NEP-17 token from the wallet",
|
||||||
UsageText: "remove --wallet <path> --token <hash-or-name>",
|
UsageText: "remove -w wallet [--wallet-config path] --token <hash-or-name>",
|
||||||
Action: removeNEP17Token,
|
Action: removeNEP17Token,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
walletPathFlag,
|
walletPathFlag,
|
||||||
|
@ -127,7 +127,7 @@ func newNEP17Commands() []cli.Command {
|
||||||
{
|
{
|
||||||
Name: "transfer",
|
Name: "transfer",
|
||||||
Usage: "transfer NEP-17 tokens",
|
Usage: "transfer NEP-17 tokens",
|
||||||
UsageText: "transfer --wallet <path> --rpc-endpoint <node> --timeout <time> --from <addr> --to <addr> --token <hash-or-name> --amount string [data] [-- <cosigner1:Scope> [<cosigner2> [...]]]",
|
UsageText: "transfer -w wallet [--wallet-config path] --rpc-endpoint <node> --timeout <time> --from <addr> --to <addr> --token <hash-or-name> --amount string [data] [-- <cosigner1:Scope> [<cosigner2> [...]]]",
|
||||||
Action: transferNEP17,
|
Action: transferNEP17,
|
||||||
Flags: transferFlags,
|
Flags: transferFlags,
|
||||||
Description: `Transfers specified NEP-17 token amount with optional 'data' parameter and cosigners
|
Description: `Transfers specified NEP-17 token amount with optional 'data' parameter and cosigners
|
||||||
|
@ -140,7 +140,7 @@ func newNEP17Commands() []cli.Command {
|
||||||
{
|
{
|
||||||
Name: "multitransfer",
|
Name: "multitransfer",
|
||||||
Usage: "transfer NEP-17 tokens to multiple recipients",
|
Usage: "transfer NEP-17 tokens to multiple recipients",
|
||||||
UsageText: `multitransfer --wallet <path> --rpc-endpoint <node> --timeout <time> --from <addr>` +
|
UsageText: `multitransfer -w wallet [--wallet-config path] --rpc-endpoint <node> --timeout <time> --from <addr>` +
|
||||||
` <token1>:<addr1>:<amount1> [<token2>:<addr2>:<amount2> [...]] [-- <cosigner1:Scope> [<cosigner2> [...]]]`,
|
` <token1>:<addr1>:<amount1> [<token2>:<addr2>:<amount2> [...]] [-- <cosigner1:Scope> [<cosigner2> [...]]]`,
|
||||||
Action: multiTransferNEP17,
|
Action: multiTransferNEP17,
|
||||||
Flags: multiTransferFlags,
|
Flags: multiTransferFlags,
|
||||||
|
|
|
@ -195,7 +195,7 @@ func NewCommands() []cli.Command {
|
||||||
{
|
{
|
||||||
Name: "export",
|
Name: "export",
|
||||||
Usage: "export keys for address",
|
Usage: "export keys for address",
|
||||||
UsageText: "export --wallet <path> [--decrypt] [<address>]",
|
UsageText: "export -w wallet [--wallet-config path] [--decrypt] [<address>]",
|
||||||
Action: exportKeys,
|
Action: exportKeys,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
walletPathFlag,
|
walletPathFlag,
|
||||||
|
@ -206,7 +206,7 @@ func NewCommands() []cli.Command {
|
||||||
{
|
{
|
||||||
Name: "import",
|
Name: "import",
|
||||||
Usage: "import WIF of a standard signature contract",
|
Usage: "import WIF of a standard signature contract",
|
||||||
UsageText: "import --wallet <path> --wif <wif> [--name <account_name>]",
|
UsageText: "import -w wallet [--wallet-config path] --wif <wif> [--name <account_name>]",
|
||||||
Action: importWallet,
|
Action: importWallet,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
walletPathFlag,
|
walletPathFlag,
|
||||||
|
@ -225,7 +225,7 @@ func NewCommands() []cli.Command {
|
||||||
{
|
{
|
||||||
Name: "import-multisig",
|
Name: "import-multisig",
|
||||||
Usage: "import multisig contract",
|
Usage: "import multisig contract",
|
||||||
UsageText: "import-multisig --wallet <path> --wif <wif> [--name <account_name>] --min <n>" +
|
UsageText: "import-multisig -w wallet [--wallet-config path] --wif <wif> [--name <account_name>] --min <n>" +
|
||||||
" [<pubkey1> [<pubkey2> [...]]]",
|
" [<pubkey1> [<pubkey2> [...]]]",
|
||||||
Action: importMultisig,
|
Action: importMultisig,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
|
@ -245,7 +245,7 @@ func NewCommands() []cli.Command {
|
||||||
{
|
{
|
||||||
Name: "import-deployed",
|
Name: "import-deployed",
|
||||||
Usage: "import deployed contract",
|
Usage: "import deployed contract",
|
||||||
UsageText: "import-deployed --wallet <path> --wif <wif> --contract <hash> [--name <account_name>]",
|
UsageText: "import-deployed -w wallet [--wallet-config path] --wif <wif> --contract <hash> [--name <account_name>]",
|
||||||
Action: importDeployed,
|
Action: importDeployed,
|
||||||
Flags: append([]cli.Flag{
|
Flags: append([]cli.Flag{
|
||||||
walletPathFlag,
|
walletPathFlag,
|
||||||
|
@ -264,7 +264,7 @@ func NewCommands() []cli.Command {
|
||||||
{
|
{
|
||||||
Name: "remove",
|
Name: "remove",
|
||||||
Usage: "remove an account from the wallet",
|
Usage: "remove an account from the wallet",
|
||||||
UsageText: "remove --wallet <path> [--force] --address <addr>",
|
UsageText: "remove -w wallet [--wallet-config path] [--force] --address <addr>",
|
||||||
Action: removeAccount,
|
Action: removeAccount,
|
||||||
Flags: []cli.Flag{
|
Flags: []cli.Flag{
|
||||||
walletPathFlag,
|
walletPathFlag,
|
||||||
|
@ -279,7 +279,7 @@ func NewCommands() []cli.Command {
|
||||||
{
|
{
|
||||||
Name: "sign",
|
Name: "sign",
|
||||||
Usage: "cosign transaction with multisig/contract/additional account",
|
Usage: "cosign transaction with multisig/contract/additional account",
|
||||||
UsageText: "sign --wallet <path> --address <address> --in <file.in> --out <file.out> [-r <endpoint>]",
|
UsageText: "sign -w wallet [--wallet-config path] --address <address> --in <file.in> --out <file.out> [-r <endpoint>]",
|
||||||
Action: signStoredTransaction,
|
Action: signStoredTransaction,
|
||||||
Flags: signFlags,
|
Flags: signFlags,
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in a new issue