finalizer

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2024 License: MIT Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractPayloads

func ExtractPayloads(data []byte) ([]payloadMessage, error)

ExtractPayloads extracts payloads from a transaction input to submission contracts and returns a slice of payloadMessages.

func NewClient

func NewClient(ctx clientContext.ClientContext, messageChannel <-chan shared.ProtocolMessage) (*client, error)

NewClient creates a new client that manages finalizations.

messageChannel is used to receive messages from protocol.client.

func NewRelayContractClient

func NewRelayContractClient(
	ethClient *ethclient.Client,
	address common.Address,
	privateKey *ecdsa.PrivateKey,
	senderAddress common.Address,
	gasConfig *config.Gas,
) (*relayContractClient, error)

func NewSignatureCollection

func NewSignatureCollection(message shared.Message, signingPolicy *policy.SigningPolicy, threshold uint16) *signaturesCollection

func NewSubmissionListener

func NewSubmissionListener(address common.Address) *submissionListener

Types

type FinalizationReady

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

type FinalizationResult

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

func PrepareFinalizationResults

func PrepareFinalizationResults(sc *signaturesCollection) (FinalizationResult, error)

PrepareFinalizationResults returns the message and signatures that are needed to construct the transaction input that is needed for the finalization.

The signatures are chosen in a way to minimize the number of signatures needed for finalization.

func (FinalizationResult) PrepareFinalizationTxInput

func (fr FinalizationResult) PrepareFinalizationTxInput() ([]byte, error)

PrepareFinalizationTxInput prepares a transaction input needed to finalize.

type IndexedSignature

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

Jump to

Keyboard shortcuts

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