types

package
v2.4.2 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// ModuleName is the name of the module
	ModuleName = "tron"

	// StoreKey to be used when creating the KVStore
	StoreKey = ModuleName

	// QuerierRoute to be used for querier msgs
	QuerierRoute = ModuleName
)
View Source
const TronContractAddressLen = 34

TronContractAddressLen is the length of contract address strings

Variables

This section is empty.

Functions

func DefaultGenesisState

func DefaultGenesisState() *crosschaintypes.GenesisState

func GetCheckpointConfirmBatch

func GetCheckpointConfirmBatch(txBatch *types.OutgoingTxBatch, gravityIDStr string) ([]byte, error)

func GetCheckpointOracleSet

func GetCheckpointOracleSet(oracleSet *types.OracleSet, gravityIDStr string) ([]byte, error)

GetCheckpointOracleSet returns the checkpoint

func NewTronSignature

func NewTronSignature(hash []byte, privateKey *ecdsa.PrivateKey) ([]byte, error)

NewTronSignature creates a new signuature over a given byte array

func TronAddressFromSignature

func TronAddressFromSignature(hash []byte, signature []byte) (string, error)

func ValidateTronAddress

func ValidateTronAddress(addr string) error

ValidateTronAddress validates the ethereum address strings

func ValidateTronSignature

func ValidateTronSignature(hash []byte, signature []byte, ethAddress string) error

ValidateTronSignature takes a message, an associated signature and public key and returns an error if the signature isn't valid

Types

type TronMsgValidate

type TronMsgValidate struct {
	crosschaintypes.EthereumMsgValidate
}

func (TronMsgValidate) MsgBondedOracleValidate

func (b TronMsgValidate) MsgBondedOracleValidate(m crosschaintypes.MsgBondedOracle) (err error)

func (TronMsgValidate) MsgBridgeTokenClaimValidate

func (b TronMsgValidate) MsgBridgeTokenClaimValidate(m crosschaintypes.MsgBridgeTokenClaim) (err error)

func (TronMsgValidate) MsgConfirmBatchValidate

func (b TronMsgValidate) MsgConfirmBatchValidate(m crosschaintypes.MsgConfirmBatch) (err error)

func (TronMsgValidate) MsgOracleSetConfirmValidate

func (b TronMsgValidate) MsgOracleSetConfirmValidate(m crosschaintypes.MsgOracleSetConfirm) (err error)

func (TronMsgValidate) MsgOracleSetUpdatedClaimValidate

func (b TronMsgValidate) MsgOracleSetUpdatedClaimValidate(m crosschaintypes.MsgOracleSetUpdatedClaim) (err error)

func (TronMsgValidate) MsgRequestBatchValidate

func (b TronMsgValidate) MsgRequestBatchValidate(m crosschaintypes.MsgRequestBatch) (err error)

func (TronMsgValidate) MsgSendToExternalClaimValidate

func (b TronMsgValidate) MsgSendToExternalClaimValidate(m crosschaintypes.MsgSendToExternalClaim) (err error)

func (TronMsgValidate) MsgSendToExternalValidate

func (b TronMsgValidate) MsgSendToExternalValidate(m crosschaintypes.MsgSendToExternal) (err error)

func (TronMsgValidate) MsgSendToFxClaimValidate

func (b TronMsgValidate) MsgSendToFxClaimValidate(m crosschaintypes.MsgSendToFxClaim) (err error)

Jump to

Keyboard shortcuts

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