relayer

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2023 License: LGPL-3.0 Imports: 19 Imported by: 0

Documentation

Overview

Package relayer provides libraries for creating and validating relay requests and responses.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateRelayClaimRequest

func CreateRelayClaimRequest(
	claimerEthKey *ecdsa.PrivateKey,
	relaySwap *contracts.SwapCreatorRelaySwap,
	secret [32]byte,
) (*message.RelayClaimRequest, error)

CreateRelayClaimRequest fills and returns a RelayClaimRequest ready for submission to a relayer.

func Sign added in v0.2.1

func Sign(key *ecdsa.PrivateKey, digest [32]byte) ([]byte, error)

Sign signs the given digest and returns a 65-byte signature in (r,s,v) format.

func ValidateAndSendTransaction

func ValidateAndSendTransaction(
	ctx context.Context,
	req *message.RelayClaimRequest,
	ec extethclient.EthClient,
	ourSwapCreatorAddr ethcommon.Address,
	salt [4]byte,
) (*message.RelayClaimResponse, error)

ValidateAndSendTransaction sends the relayed transaction to the network if it validates successfully.

Types

This section is empty.

Jump to

Keyboard shortcuts

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