Skip to content

Commit 116757b

Browse files
committed
keystore: Fix aptoskey public key encoding
1 parent 75cab0f commit 116757b

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

  • core/services/keystore/keys/aptoskey

core/services/keystore/keys/aptoskey/key.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import (
66
crypto_rand "crypto/rand"
77
"fmt"
88
"io"
9-
10-
"github.com/mr-tron/base58"
119
)
1210

1311
// Raw represents the Aptos private key
@@ -77,9 +75,10 @@ func (key Key) GetPublic() ed25519.PublicKey {
7775
return key.pubKey
7876
}
7977

80-
// PublicKeyStr return base58 encoded public key
78+
// PublicKeyStr returns hex encoded public key
79+
// https://github.com/aptos-foundation/AIPs/blob/main/aips/aip-40.md#long
8180
func (key Key) PublicKeyStr() string {
82-
return base58.Encode(key.pubKey)
81+
return fmt.Sprintf("0x%064x", key.pubKey)
8382
}
8483

8584
// Raw returns the seed from private key

0 commit comments

Comments
 (0)