sigs

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllDataHash added in v0.9.0

func AllDataHash(relayResponse *pairingtypes.RelayReply, relayData pairingtypes.RelayPrivateData) (data_hash []byte)

func CalculateContentHashForRelayData added in v0.9.0

func CalculateContentHashForRelayData(relayRequestData *pairingtypes.RelayPrivateData) []byte

func CalculateRelaySessionHashForFinalization added in v0.20.0

func CalculateRelaySessionHashForFinalization(relaySession *pairingtypes.RelaySession) (hash []byte)

func DataToSignRequestResponse added in v0.20.0

func DataToSignRequestResponse(relayResponse *pairingtypes.RelayReply, relayReq *pairingtypes.RelayRequest) (dataToSign []byte)

func DataToSignResponseFinalizationData added in v0.9.0

func DataToSignResponseFinalizationData(latestBlock int64, finalizedBlocksHashes []byte, relaySession *pairingtypes.RelaySession, clientAddress sdk.AccAddress) (dataToSign []byte)

func DataToSignResponseFinalizationDataInner added in v0.9.0

func DataToSignResponseFinalizationDataInner(latestBlock int64, finalizedBlockHashes []byte, clientAddress sdk.AccAddress, relaySessionHash []byte) (dataToSign []byte)

func ExtractSignerAddress

func ExtractSignerAddress(in *pairingtypes.RelaySession) (sdk.AccAddress, error)

func ExtractSignerAddressFromBadge added in v0.12.0

func ExtractSignerAddressFromBadge(badge pairingtypes.Badge) (sdk.AccAddress, error)

func GenerateFloatingKey

func GenerateFloatingKey() (secretKey *btcSecp256k1.PrivateKey, addr sdk.AccAddress)

func GetKeyName

func GetKeyName(clientCtx client.Context) (string, error)

func GetPrivKey

func GetPrivKey(clientCtx client.Context, keyName string) (*btcSecp256k1.PrivateKey, error)

func HashMsg

func HashMsg(msgData []byte) []byte

func RecoverPubKey

func RecoverPubKey(sig []byte, msgHash []byte) (secp256k1.PubKey, error)

func RecoverPubKeyFromRelay added in v0.9.0

func RecoverPubKeyFromRelay(relay pairingtypes.RelaySession) (secp256k1.PubKey, error)

func RecoverPubKeyFromRelayReply added in v0.9.0

func RecoverPubKeyFromRelayReply(relayResponse *pairingtypes.RelayReply, relayReq *pairingtypes.RelayRequest) (secp256k1.PubKey, error)

func RecoverPubKeyFromReplyMetadata added in v0.20.0

func RecoverPubKeyFromReplyMetadata(relayResponse *conflicttypes.ReplyMetadata) (secp256k1.PubKey, error)

func RecoverPubKeyFromReplyMetadataFinalizationData added in v0.20.0

func RecoverPubKeyFromReplyMetadataFinalizationData(relayResponse *conflicttypes.ReplyMetadata, relayReq *pairingtypes.RelayRequest, addr sdk.AccAddress) (secp256k1.PubKey, error)

func RecoverPubKeyFromResponseFinalizationData added in v0.9.0

func RecoverPubKeyFromResponseFinalizationData(relayResponse *pairingtypes.RelayReply, relayReq *pairingtypes.RelayRequest, consumerAddr sdk.AccAddress) (secp256k1.PubKey, error)

func SignBadge added in v0.12.0

func SignBadge(pkey *btcSecp256k1.PrivateKey, badge pairingtypes.Badge) ([]byte, error)

func SignRelay added in v0.9.0

func SignRelay(pkey *btcSecp256k1.PrivateKey, request pairingtypes.RelaySession) ([]byte, error)

func SignRelayResponse added in v0.9.0

func SignRelayResponse(pkey *btcSecp256k1.PrivateKey, relayResponse *pairingtypes.RelayReply, relayReq *pairingtypes.RelayRequest) ([]byte, error)

func SignResponseFinalizationData added in v0.9.0

func SignResponseFinalizationData(pkey *btcSecp256k1.PrivateKey, relayResponse *pairingtypes.RelayReply, relayReq *pairingtypes.RelayRequest, clientAddress sdk.AccAddress) ([]byte, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL