Documentation
¶
Index ¶
- Constants
- func NewAcrossMessage(source, destination uint64, acrossData *AcrossData) *message.Message
- func NewLifiEscrowMessage(source, destination uint64, lifiData *LifiEscrowData) *message.Message
- func NewLifiUnlockMessage(source, destination uint64, lifiData *LifiUnlockData) *message.Message
- func NewSprinterCreditMessage(source, destination uint64, sprinterData *SprinterCreditData) *message.Message
- type AcrossData
- type AcrossMessageHandler
- type ConfirmationWatcher
- type Coordinator
- type DepositFetcher
- type EventFilterer
- type LifiEscrowData
- type LifiEscrowMessageHandler
- type LifiUnlockData
- type LifiUnlockHandler
- type OrderFetcher
- type OrderValidator
- type SprinterCreditData
- type SprinterCreditMessageHandler
- type TokenPricer
- type Watcher
Constants ¶
View Source
const ( TIMEOUT = 10 * time.Minute BLOCK_RANGE = 1000 )
View Source
const ( DOMAIN_NAME = "OIFEscrowLIFI" VERSION = "1" )
View Source
const (
TRANSACTION_TIMEOUT = 30 * time.Second
)
Variables ¶
This section is empty.
Functions ¶
func NewAcrossMessage ¶
func NewAcrossMessage(source, destination uint64, acrossData *AcrossData) *message.Message
func NewLifiEscrowMessage ¶ added in v1.0.0
func NewLifiEscrowMessage(source, destination uint64, lifiData *LifiEscrowData) *message.Message
func NewLifiUnlockMessage ¶ added in v0.5.0
func NewLifiUnlockMessage(source, destination uint64, lifiData *LifiUnlockData) *message.Message
func NewSprinterCreditMessage ¶ added in v1.0.0
func NewSprinterCreditMessage( source, destination uint64, sprinterData *SprinterCreditData) *message.Message
Types ¶
type AcrossData ¶
type AcrossMessageHandler ¶
type AcrossMessageHandler struct {
// contains filtered or unexported fields
}
func NewAcrossMessageHandler ¶
func NewAcrossMessageHandler( chainID uint64, tokenStore config.TokenStore, pools map[uint64]common.Address, repayers map[uint64]common.Address, coordinator Coordinator, host host.Host, comm comm.Communication, fetcher signing.SaveDataFetcher, depositFetcher DepositFetcher, confirmationWatcher ConfirmationWatcher, sigChn chan any, ) *AcrossMessageHandler
func (*AcrossMessageHandler) HandleMessage ¶
HandleMessage finds the Across 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 (*AcrossMessageHandler) Listen ¶
func (h *AcrossMessageHandler) Listen(ctx context.Context)
type ConfirmationWatcher ¶ added in v0.2.0
type Coordinator ¶
type DepositFetcher ¶ added in v0.3.0
type EventFilterer ¶
type LifiEscrowData ¶ added in v0.5.0
type LifiEscrowMessageHandler ¶ added in v0.5.0
type LifiEscrowMessageHandler struct {
// contains filtered or unexported fields
}
func NewLifiEscrowMessageHandler ¶ added in v0.5.0
func NewLifiEscrowMessageHandler( chainID uint64, mpcAddress common.Address, lifiAddresses map[uint64]common.Address, coordinator Coordinator, host host.Host, comm comm.Communication, fetcher signing.SaveDataFetcher, confirmationWatcher ConfirmationWatcher, tokenStore config.TokenStore, orderFetcher OrderFetcher, orderPricer pricing.OrderPricer, router router.OrderRouter, validator OrderValidator, sigChn chan any, ) *LifiEscrowMessageHandler
func (*LifiEscrowMessageHandler) HandleMessage ¶ added in v0.5.0
HandleMessage verifies the lifi escrow order on-chain and signs the order if it is valid
func (*LifiEscrowMessageHandler) Listen ¶ added in v0.5.0
func (h *LifiEscrowMessageHandler) Listen(ctx context.Context)
type LifiUnlockData ¶ added in v0.5.0
type LifiUnlockHandler ¶ added in v0.5.0
type LifiUnlockHandler struct {
// contains filtered or unexported fields
}
func NewLifiUnlockHandler ¶ added in v0.5.0
func NewLifiUnlockHandler( chainID uint64, repayers map[uint64]common.Address, coordinator Coordinator, host host.Host, comm comm.Communication, fetcher signing.SaveDataFetcher, ) *LifiUnlockHandler
func (*LifiUnlockHandler) HandleMessage ¶ added in v0.5.0
HandleMessage signs the unlock request to the address of the repayer.
func (*LifiUnlockHandler) Listen ¶ added in v0.5.0
func (h *LifiUnlockHandler) Listen(ctx context.Context)
type OrderFetcher ¶ added in v0.5.0
type OrderValidator ¶ added in v0.5.0
type OrderValidator interface {
Validate(order *lifi.AugmentedLifiOrder) error
}
type SprinterCreditData ¶ added in v1.0.0
type SprinterCreditMessageHandler ¶ added in v1.0.0
type SprinterCreditMessageHandler struct {
// contains filtered or unexported fields
}
func NewSprinterCreditMessageHandler ¶ added in v1.0.0
func NewSprinterCreditMessageHandler( chainID uint64, liquidators map[common.Address]common.Address, coordinator Coordinator, host host.Host, comm comm.Communication, fetcher signing.SaveDataFetcher, sigChn chan any, ) *SprinterCreditMessageHandler
func (*SprinterCreditMessageHandler) HandleMessage ¶ added in v1.0.0
func (h *SprinterCreditMessageHandler) HandleMessage(m *message.Message) (*proposal.Proposal, error)
HandleMessage signs the liquidation request if the transaction is going to the Liquidator contract.
func (*SprinterCreditMessageHandler) Listen ¶ added in v1.0.0
func (h *SprinterCreditMessageHandler) Listen(ctx context.Context)
type TokenPricer ¶
type Watcher ¶ added in v0.2.0
type Watcher struct {
// contains filtered or unexported fields
}
func NewWatcher ¶ added in v0.2.0
func NewWatcher( client EventFilterer, tokenPricer TokenPricer, tokenStore config.TokenStore, confirmations map[uint64]uint64, blocktime time.Duration, ) *Watcher
func (*Watcher) WaitForOrderConfirmations ¶ added in v0.5.0
func (w *Watcher) WaitForOrderConfirmations( ctx context.Context, chainID uint64, txHash common.Hash, orderValue float64, ) error
WaitForConfirmations blocks until the transaction hash has enough on-chain confirmations.
func (*Watcher) WaitForTokenConfirmations ¶ added in v0.5.0
func (w *Watcher) WaitForTokenConfirmations( ctx context.Context, chainID uint64, txHash common.Hash, token common.Address, amount *big.Int, ) error
WaitForTokenConfirmations blocks until the transaction hash has enough on-chain confirmations.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.