forked from oracleNetworkProtocol/plugchain-sdk-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
proto.go
26 lines (24 loc) · 1.26 KB
/
proto.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
package codec
import (
tmcrypto "github.com/tendermint/tendermint/crypto"
codectypes "plugchain-sdk-go/codec/types"
"plugchain-sdk-go/crypto/keys/ed25519"
"plugchain-sdk-go/crypto/keys/multisig"
"plugchain-sdk-go/crypto/keys/secp256k1"
cryptotypes "plugchain-sdk-go/crypto/types"
)
// RegisterInterfaces registers the sdk.Tx interface.
func RegisterInterfaces(registry codectypes.InterfaceRegistry) {
// TODO We now register both Tendermint's PubKey and our own PubKey. In the
// long-term, we should move away from Tendermint's PubKey, and delete
// these lines.
registry.RegisterInterface("tendermint.crypto.Pubkey", (*tmcrypto.PubKey)(nil))
registry.RegisterImplementations((*tmcrypto.PubKey)(nil), &ed25519.PubKey{})
registry.RegisterImplementations((*tmcrypto.PubKey)(nil), &secp256k1.PubKey{})
registry.RegisterImplementations((*tmcrypto.PubKey)(nil), &multisig.LegacyAminoPubKey{})
//ethermint.crypto.v1.ethsecp256k1.PubKey
registry.RegisterInterface("cosmos.crypto.Pubkey", (*cryptotypes.PubKey)(nil))
registry.RegisterImplementations((*cryptotypes.PubKey)(nil), &ed25519.PubKey{})
registry.RegisterImplementations((*cryptotypes.PubKey)(nil), &secp256k1.PubKey{})
registry.RegisterImplementations((*cryptotypes.PubKey)(nil), &multisig.LegacyAminoPubKey{})
}