Documentation
¶
Index ¶
Constants ¶
View Source
const SIGNATURE_TIMEOUT = time.Second * 15
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ConfirmationsHandler ¶
type ConfirmationsHandler struct {
// contains filtered or unexported fields
}
func NewConfirmationsHandler ¶
func NewConfirmationsHandler(confirmationsByChain map[uint64]map[uint64]uint64) *ConfirmationsHandler
func (*ConfirmationsHandler) HandleRequest ¶
func (h *ConfirmationsHandler) HandleRequest(w http.ResponseWriter, r *http.Request)
HandleRequest returns confirmations by value buckets for the requested chain
type ProtocolType ¶
type ProtocolType string
const ( AcrossProtocol ProtocolType = "across" LifiEscrowProtocol ProtocolType = "lifi-escrow" LighterProtocol ProtocolType = "lighter" SprinterCreditProtocol ProtocolType = "sprinter-credit" )
type SignatureCacher ¶
type SigningBody ¶
type SigningBody struct {
ChainId uint64
DepositId string `json:"depositId"`
Nonce *BigInt `json:"nonce"`
Protocol ProtocolType `json:"protocol"`
LiquidityPool string `json:"liquidityPool"`
Caller string `json:"caller"`
Calldata string `json:"calldata"`
DepositTxHash string `json:"depositTxHash"`
BorrowAmount *BigInt `json:"borrowAmount"`
BorrowToken string `json:"borrowToken"`
RepaymentChainId uint64 `json:"repaymentChainId"`
Deadline uint64 `json:"deadline"`
TokenOut string `json:"tokenOut"`
}
type SigningHandler ¶
type SigningHandler struct {
// contains filtered or unexported fields
}
func NewSigningHandler ¶
func NewSigningHandler(msgChan chan []*message.Message, chains map[uint64]struct{}) *SigningHandler
func (*SigningHandler) HandleSigning ¶
func (h *SigningHandler) HandleSigning(w http.ResponseWriter, r *http.Request)
HandleSigning sends a message to the across message handler and returns status code 202 if the deposit has been accepted for the signing process
type StatusHandler ¶
type StatusHandler struct {
// contains filtered or unexported fields
}
func NewStatusHandler ¶
func NewStatusHandler(cache SignatureCacher, chains map[uint64]struct{}) *StatusHandler
func (*StatusHandler) HandleRequest ¶
func (h *StatusHandler) HandleRequest(w http.ResponseWriter, r *http.Request)
HandleRequest is an sse handler that waits until the signing signature is ready and returns it
type UnlockBody ¶ added in v0.5.0
type UnlockBody struct {
ChainId uint64
Protocol ProtocolType `json:"protocol"`
OrderID string `json:"orderId"`
Settler string `json:"settler"`
BorrowToken string `json:"borrowToken"`
}
type UnlockHandler ¶ added in v0.5.0
type UnlockHandler struct {
// contains filtered or unexported fields
}
func NewUnlockHandler ¶ added in v0.5.0
func NewUnlockHandler(msgChn chan []*message.Message, chains map[uint64]struct{}) *UnlockHandler
func (*UnlockHandler) HandleUnlock ¶ added in v0.5.0
func (h *UnlockHandler) HandleUnlock(w http.ResponseWriter, r *http.Request)
HandleSigning sends a message to the across message handler and returns status code 202 if the deposit has been accepted for the signing process
type UnlockResponse ¶ added in v0.5.0
Click to show internal directories.
Click to hide internal directories.