[#466] cli: support NEP-2 and NEP-6 key formats
NEP-2 is contains WIF encrypted with password. NEP-6 is format used for neo-go wallets. Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
This commit is contained in:
parent
e9b3488aab
commit
60d74bce67
7 changed files with 152 additions and 37 deletions
|
@ -34,17 +34,17 @@ var accountingBalanceCmd = &cobra.Command{
|
|||
ctx = context.Background()
|
||||
)
|
||||
|
||||
cli, err := getSDKClient()
|
||||
key, err := getKey()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
cli, err := getSDKClient(key)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
if balanceOwner == "" {
|
||||
key, err := getKey()
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
wallet, err := owner.NEO3WalletFromPublicKey(&key.PublicKey)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue