lighter

package
v1.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	LIGHTER_DOMAIN_ID uint64 = 1701984817 // lower 32bits of sha256 hash of lighter caip ("lighter:1")
)

Variables

View Source
var (
	ARBITRUM_CHAIN_ID = big.NewInt(42161)
	LIGHTER_CAIP      = "lighter:1"
	ARBITRUM_CAIP     = "eip155:42161"
	USDC              = "usdc"
)

Functions

This section is empty.

Types

type LighterChain

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

func NewLighterChain

func NewLighterChain(messageHandler MessageHandler) *LighterChain

func (*LighterChain) DomainID

func (c *LighterChain) DomainID() uint64

func (*LighterChain) PollEvents

func (c *LighterChain) PollEvents(_ context.Context)

func (*LighterChain) ReceiveMessage

func (c *LighterChain) ReceiveMessage(m *message.Message) (*proposal.Proposal, error)

func (*LighterChain) Write

func (c *LighterChain) Write(_ []*proposal.Proposal) error

type LighterConfig

type LighterConfig struct {
	WithdrawalAddress common.Address
	UsdcAddress       common.Address
	RepaymentAddress  string
	// usd bucket -> confirmations
	ConfirmationsByValue map[uint64]uint64
}

func NewLighterConfig

func NewLighterConfig(solverConfig solverConfig.SolverConfig) (*LighterConfig, error)

type MessageHandler

type MessageHandler interface {
	HandleMessage(m *message.Message) (*proposal.Proposal, error)
}

Directories

Path Synopsis
mock
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