message

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2026 License: LGPL-3.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ARBITRUM_CHAIN_ID          = big.NewInt(42161)
	USDC_ACCOUNT_INDEX uint64  = 3
	USDC_DECIMALS      float64 = 6
)

Functions

func NewLighterMessage

func NewLighterMessage(source, destination uint64, lighterData *LighterData) *message.Message

Types

type Coordinator

type Coordinator interface {
	Execute(ctx context.Context, tssProcesses []tss.TssProcess, resultChn chan interface{}, coordinator peer.ID) error
}

type LighterData

type LighterData struct {
	ErrChn chan error `json:"-"`

	OrderHash     string
	Coordinator   peer.ID
	LiquidityPool common.Address
	DepositTxHash string
	Calldata      string
	Nonce         *big.Int
	Deadline      uint64
	Source        uint64
	Destination   uint64
}

type LighterMessageHandler

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

func NewLighterMessageHandler

func NewLighterMessageHandler(
	lighterAddress common.Address,
	usdcAddress common.Address,
	repaymentAccount string,
	confirmations map[uint64]uint64,
	txFetcher TxFetcher,
	coordinator Coordinator,
	host host.Host,
	comm comm.Communication,
	fetcher signing.SaveDataFetcher,
	sigChn chan any,
) *LighterMessageHandler

func (*LighterMessageHandler) HandleMessage

func (h *LighterMessageHandler) HandleMessage(m *message.Message) (*proposal.Proposal, error)

HandleMessage finds the Mayan deposit with the according deposit ID and starts the MPC signature process for it. The result will be saved into the signature cache through the result channel.

func (*LighterMessageHandler) Listen

func (h *LighterMessageHandler) Listen(ctx context.Context)

type TxFetcher

type TxFetcher interface {
	GetTx(hash string) (*lighter.LighterTx, error)
}

Directories

Path Synopsis
Package mock_message is a generated GoMock package.
Package mock_message is a generated GoMock package.

Jump to

Keyboard shortcuts

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