types

package
v6.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2023 License: Apache-2.0 Imports: 14 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
)
View Source
const TronContractAddressLen = 34

TronContractAddressLen is the length of contract address strings

Variables

This section is empty.

Functions

func AddressFromHex

func AddressFromHex(str string) string

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(address 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.MsgValidate
}

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)

func (TronMsgValidate) ValidateAddress

func (b TronMsgValidate) ValidateAddress(addr string) error

Jump to

Keyboard shortcuts

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