Documentation ¶
Overview ¶
Package relayer provides libraries for creating and validating relay requests and responses.
Index ¶
- func CreateRelayClaimRequest(claimerEthKey *ecdsa.PrivateKey, relaySwap *contracts.SwapCreatorRelaySwap, ...) (*message.RelayClaimRequest, error)
- func Sign(key *ecdsa.PrivateKey, digest [32]byte) ([]byte, error)
- func ValidateAndSendTransaction(ctx context.Context, req *message.RelayClaimRequest, ec extethclient.EthClient, ...) (*message.RelayClaimResponse, error)
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.
Click to show internal directories.
Click to hide internal directories.