aboutsummaryrefslogtreecommitdiff
path: root/plugin/evm
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/evm')
-rw-r--r--plugin/evm/service.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugin/evm/service.go b/plugin/evm/service.go
index c34a59d..8ede1b0 100644
--- a/plugin/evm/service.go
+++ b/plugin/evm/service.go
@@ -143,7 +143,8 @@ type ExportKeyArgs struct {
// ExportKeyReply is the response for ExportKey
type ExportKeyReply struct {
// The decrypted PrivateKey for the Address provided in the arguments
- PrivateKey string `json:"privateKey"`
+ PrivateKey string `json:"privateKey"`
+ PrivateKeyHex string `json:"privateKeyHex"`
}
// ExportKey returns a private key from the provided user
@@ -167,6 +168,7 @@ func (service *AvaxAPI) ExportKey(r *http.Request, args *ExportKeyArgs, reply *E
return fmt.Errorf("problem retrieving private key: %w", err)
}
reply.PrivateKey = constants.SecretKeyPrefix + formatting.CB58{Bytes: sk.Bytes()}.String()
+ reply.PrivateKeyHex = hexutil.Encode(sk.Bytes())
return nil
}