Documentation
¶
Index ¶
- func FromCmtProtoPublicKey(protoPk cmtprotocrypto.PublicKey) (cryptotypes.PubKey, error)
- func FromCmtPubKeyInterface(tmPk cmtcrypto.PubKey) (cryptotypes.PubKey, error)
- func PubKeyFromProto(pk cryptotypes.PubKey) (cryptokeys.JSONPubkey, error)
- func PubKeyToProto(pk cryptokeys.JSONPubkey) (cryptotypes.PubKey, error)
- func RegisterCrypto(registrar registry.AminoRegistrar)
- func RegisterInterfaces(registry registry.InterfaceRegistrar)
- func ToCmtProtoPublicKey(pk cryptotypes.PubKey) (cmtprotocrypto.PublicKey, error)
- func ToCmtPubKeyInterface(pk cryptotypes.PubKey) (cmtcrypto.PubKey, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FromCmtProtoPublicKey ¶
func FromCmtProtoPublicKey(protoPk cmtprotocrypto.PublicKey) (cryptotypes.PubKey, error)
FromCmtProtoPublicKey converts a CMT's cmtprotocrypto.PublicKey into our own PubKey.
func FromCmtPubKeyInterface ¶
func FromCmtPubKeyInterface(tmPk cmtcrypto.PubKey) (cryptotypes.PubKey, error)
FromCmtPubKeyInterface converts CMT's cmtcrypto.PubKey to our own PubKey.
func PubKeyFromProto ¶
func PubKeyFromProto(pk cryptotypes.PubKey) (cryptokeys.JSONPubkey, error)
PubKeyFromProto converts a protobuf public key (in `cryptotypes.PubKey` format) to a JSON public key format (`cryptokeys.JSONPubkey`).
Parameters: - pk: A `cryptotypes.PubKey` which is the protobuf representation of a public key.
Returns: - cryptokeys.JSONPubkey: The JSON-formatted public key corresponding to the provided protobuf public key. - error: An error if the key type is invalid or unsupported.
func PubKeyToProto ¶
func PubKeyToProto(pk cryptokeys.JSONPubkey) (cryptotypes.PubKey, error)
PubKeyToProto converts a JSON public key (in `cryptokeys.JSONPubkey` format) to its corresponding protobuf public key type.
Parameters: - pk: A `cryptokeys.JSONPubkey` containing the public key and its type.
Returns: - cryptotypes.PubKey: The protobuf public key corresponding to the provided JSON public key. - error: An error if the key type is invalid or unsupported.
func RegisterCrypto ¶
func RegisterCrypto(registrar registry.AminoRegistrar)
RegisterCrypto registers all crypto dependency types with the provided Amino codec.
func RegisterInterfaces ¶
func RegisterInterfaces(registry registry.InterfaceRegistrar)
RegisterInterfaces registers the sdk.Tx interface.
func ToCmtProtoPublicKey ¶
func ToCmtProtoPublicKey(pk cryptotypes.PubKey) (cmtprotocrypto.PublicKey, error)
ToCmtProtoPublicKey converts our own PubKey to Cmt's cmtprotocrypto.PublicKey.
func ToCmtPubKeyInterface ¶
func ToCmtPubKeyInterface(pk cryptotypes.PubKey) (cmtcrypto.PubKey, error)
ToCmtPubKeyInterface converts our own PubKey to CMT's cmtcrypto.PubKey.
Types ¶
This section is empty.