mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-23 03:38:35 +00:00
cli: rename multisig sign
to wallet sign
This commit is contained in:
parent
e66d36900c
commit
8ef7dd320c
3 changed files with 18 additions and 28 deletions
|
@ -76,7 +76,7 @@ func TestSignMultisigTx(t *testing.T) {
|
|||
"--out", txPath)
|
||||
|
||||
e.In.WriteString("pass\r")
|
||||
e.Run(t, "neo-go", "wallet", "multisig", "sign",
|
||||
e.Run(t, "neo-go", "wallet", "sign",
|
||||
"--rpc-endpoint", "http://"+e.RPC.Addr,
|
||||
"--wallet", wallet2Path, "--address", multisigAddr,
|
||||
"--in", txPath, "--out", txPath)
|
||||
|
@ -100,7 +100,7 @@ func TestSignMultisigTx(t *testing.T) {
|
|||
"--", strings.Join([]string{multisigHash.StringLE(), ":", "Global"}, ""))
|
||||
|
||||
e.In.WriteString("pass\r")
|
||||
e.Run(t, "neo-go", "wallet", "multisig", "sign",
|
||||
e.Run(t, "neo-go", "wallet", "sign",
|
||||
"--rpc-endpoint", "http://"+e.RPC.Addr,
|
||||
"--wallet", wallet2Path, "--address", multisigAddr,
|
||||
"--in", txPath, "--out", txPath)
|
||||
|
|
|
@ -10,29 +10,7 @@ import (
|
|||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
func newMultisigCommands() []cli.Command {
|
||||
signFlags := []cli.Flag{
|
||||
walletPathFlag,
|
||||
outFlag,
|
||||
inFlag,
|
||||
cli.StringFlag{
|
||||
Name: "address, a",
|
||||
Usage: "Address to use",
|
||||
},
|
||||
}
|
||||
signFlags = append(signFlags, options.RPC...)
|
||||
return []cli.Command{
|
||||
{
|
||||
Name: "sign",
|
||||
Usage: "sign a transaction",
|
||||
UsageText: "multisig sign --wallet <path> --address <address> --in <file.in> --out <file.out>",
|
||||
Action: signMultisig,
|
||||
Flags: signFlags,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
func signMultisig(ctx *cli.Context) error {
|
||||
func signStoredTransaction(ctx *cli.Context) error {
|
||||
wall, err := openWallet(ctx.String("wallet"))
|
||||
if err != nil {
|
||||
return cli.NewExitError(err, 1)
|
||||
|
|
|
@ -69,6 +69,16 @@ func NewCommands() []cli.Command {
|
|||
},
|
||||
}
|
||||
claimFlags = append(claimFlags, options.RPC...)
|
||||
signFlags := []cli.Flag{
|
||||
walletPathFlag,
|
||||
outFlag,
|
||||
inFlag,
|
||||
cli.StringFlag{
|
||||
Name: "address, a",
|
||||
Usage: "Address to use",
|
||||
},
|
||||
}
|
||||
signFlags = append(signFlags, options.RPC...)
|
||||
return []cli.Command{{
|
||||
Name: "wallet",
|
||||
Usage: "create, open and manage a NEO wallet",
|
||||
|
@ -191,9 +201,11 @@ func NewCommands() []cli.Command {
|
|||
},
|
||||
},
|
||||
{
|
||||
Name: "multisig",
|
||||
Usage: "work with multisig address",
|
||||
Subcommands: newMultisigCommands(),
|
||||
Name: "sign",
|
||||
Usage: "cosign transaction with multisig/contract/additional account",
|
||||
UsageText: "sign --wallet <path> --address <address> --in <file.in> --out <file.out>",
|
||||
Action: signStoredTransaction,
|
||||
Flags: signFlags,
|
||||
},
|
||||
{
|
||||
Name: "nep17",
|
||||
|
|
Loading…
Reference in a new issue