Replace tmcrypto.PubKey by our own cryptotypes.PubKey (#7419)
* WIP on removing tm pub/privkey * Fix part of crypto tests * Add PrivKeyLedgerSecp256K1 proto type * Use BasePrivKey for ledger priv key type * Refacto continued * First round * x/staking * Continue porting * x/* done * Make build pass * More conversion * Remove IntoTmPubKey * Fix test * Remove crypto.PubKey in some other places * Revert ledger changes * Fix comment * Remove useless function * Add To/FromTmPublicKey * Add migrate tests * Fix test * Fix another test * Rename tm conversion functions * Less code * Rename BasePrivKey to LedgerPrivKey * Add changelog * Rename functions Co-authored-by: Amaury Martiny <amaury.martiny@protonmail.com> Co-authored-by: Alessio Treglia <alessio@tendermint.com>
This commit is contained in:
co-authored by
Amaury Martiny
Alessio Treglia
parent
e172a08333
commit
90e9370bd8
Vendored
+2
-3
@@ -3,14 +3,13 @@ package testdata
|
||||
import (
|
||||
"encoding/json"
|
||||
|
||||
"github.com/tendermint/tendermint/crypto"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/crypto/keys/secp256k1"
|
||||
cryptotypes "github.com/cosmos/cosmos-sdk/crypto/types"
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
)
|
||||
|
||||
// KeyTestPubAddr generates a new secp256k1 keypair.
|
||||
func KeyTestPubAddr() (crypto.PrivKey, crypto.PubKey, sdk.AccAddress) {
|
||||
func KeyTestPubAddr() (cryptotypes.PrivKey, cryptotypes.PubKey, sdk.AccAddress) {
|
||||
key := secp256k1.GenPrivKey()
|
||||
pub := key.PubKey()
|
||||
addr := sdk.AccAddress(pub.Address())
|
||||
|
||||
Reference in New Issue
Block a user