Files
ark/client/dump.go
Louis Singer 852756eaba Add integration tests and regtest support (#128)
* regtest support + integration tests (e2e)

* add integration CI

* add PR trigger on integration CI

* wait for ocean to be unlocked at startup

* integration tests: add tests flags and build docker images at startup

* use nigiri chopsticks-liquid

* fix after reviews

* Update client/init.go

Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
Signed-off-by: Louis Singer <41042567+louisinger@users.noreply.github.com>

* do not trigger integration on PR

---------

Signed-off-by: Louis Singer <41042567+louisinger@users.noreply.github.com>
Co-authored-by: Pietralberto Mazza <18440657+altafan@users.noreply.github.com>
2024-04-19 18:57:13 +02:00

26 lines
468 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,
Flags: []cli.Flag{&passwordFlag},
}
func dumpAction(ctx *cli.Context) error {
privateKey, err := privateKeyFromPassword(ctx)
if err != nil {
return err
}
return printJSON(map[string]interface{}{
"private_key": hex.EncodeToString(privateKey.Serialize()),
})
}