Files
ark/client/dump.go
Pietralberto Mazza 6d0d03e316 Cleanup (#121)
* Cleanup common

* Cleanup client

* Cleanup server

* Renamings

* Tidy up proto

* Update ocean protos

* Fixes

* Fixes
2024-02-28 18:05:03 +01:00

25 lines
429 B
Go

package main
import (
"encoding/hex"
"github.com/urfave/cli/v2"
)
var dumpCommand = cli.Command{
Name: "dump-privkey",
Usage: "Dumps private key of the Ark wallet",
Action: dumpAction,
}
func dumpAction(ctx *cli.Context) error {
privateKey, err := privateKeyFromPassword()
if err != nil {
return err
}
return printJSON(map[string]interface{}{
"private_key": hex.EncodeToString(privateKey.Serialize()),
})
}