mirror of
https://github.com/aljazceru/ark.git
synced 2025-12-17 12:14:21 +01:00
* Cleanup common * Cleanup client * Cleanup server * Renamings * Tidy up proto * Update ocean protos * Fixes * Fixes
25 lines
429 B
Go
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()),
|
|
})
|
|
}
|