aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/keypair.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-16 18:27:38 +0800
committerobscuren <geffobscura@gmail.com>2015-03-16 18:27:38 +0800
commitb5234413611ce5984292f85a01de1f56c045b490 (patch)
treee6e0c6f7fe8358a2dc63cdea11ac66b4f59397f5 /crypto/keypair.go
parent0b8f66ed9ef177dc72442dd7ba337c6733e30344 (diff)
downloaddexon-b5234413611ce5984292f85a01de1f56c045b490.tar.gz
dexon-b5234413611ce5984292f85a01de1f56c045b490.tar.zst
dexon-b5234413611ce5984292f85a01de1f56c045b490.zip
Moved ethutil => common
Diffstat (limited to 'crypto/keypair.go')
-rw-r--r--crypto/keypair.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/crypto/keypair.go b/crypto/keypair.go
index da5788437..6702e6595 100644
--- a/crypto/keypair.go
+++ b/crypto/keypair.go
@@ -4,7 +4,7 @@ import (
"strings"
"github.com/ethereum/go-ethereum/crypto/secp256k1"
- "github.com/ethereum/go-ethereum/ethutil"
+ "github.com/ethereum/go-ethereum/common"
)
type KeyPair struct {
@@ -40,19 +40,19 @@ func (k *KeyPair) Address() []byte {
func (k *KeyPair) Mnemonic() string {
if k.mnemonic == "" {
- k.mnemonic = strings.Join(MnemonicEncode(ethutil.Bytes2Hex(k.PrivateKey)), " ")
+ k.mnemonic = strings.Join(MnemonicEncode(common.Bytes2Hex(k.PrivateKey)), " ")
}
return k.mnemonic
}
func (k *KeyPair) AsStrings() (string, string, string, string) {
- return k.Mnemonic(), ethutil.Bytes2Hex(k.Address()), ethutil.Bytes2Hex(k.PrivateKey), ethutil.Bytes2Hex(k.PublicKey)
+ return k.Mnemonic(), common.Bytes2Hex(k.Address()), common.Bytes2Hex(k.PrivateKey), common.Bytes2Hex(k.PublicKey)
}
func (k *KeyPair) RlpEncode() []byte {
return k.RlpValue().Encode()
}
-func (k *KeyPair) RlpValue() *ethutil.Value {
- return ethutil.NewValue(k.PrivateKey)
+func (k *KeyPair) RlpValue() *common.Value {
+ return common.NewValue(k.PrivateKey)
}