messages

package
v0.0.1-alpha-7 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(
	ethSigner service.Signer,
	contractsService service.Contracts,
	scheduler service.Scheduler,
	transferRepository repository.Transfer,
	messageRepository repository.Message,
	hederaClient client.HederaNode,
	mirrorClient client.MirrorNode,
	ethClient client.Ethereum,
	topicID string,
) *Service

func (*Service) ProcessEthereumTxMessage

func (ss *Service) ProcessEthereumTxMessage(tm message.Message) error

func (*Service) ProcessSignature

func (ss *Service) ProcessSignature(tm message.Message) error

ProcessSignature processes the signature message, verifying and updating all necessary fields in the DB

func (*Service) SanityCheckSignature

func (ss *Service) SanityCheckSignature(tm message.Message) (bool, error)

SanityCheckSignature performs validation on the topic message metadata. Validates it against the Transaction Record metadata from DB

func (*Service) ScheduleEthereumTxForSubmission

func (ss *Service) ScheduleEthereumTxForSubmission(transferID string) error

ScheduleForSubmission computes the execution slot and schedules the Eth TX for submission

func (*Service) VerifyEthereumTxAuthenticity

func (ss *Service) VerifyEthereumTxAuthenticity(tm message.Message) (bool, error)

VerifyEthereumTxAuthenticity performs the validation required prior handling the topic message (verifies the submitted TX against the required target contract and arguments passed)

Jump to

Keyboard shortcuts

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