Documentation ¶
Overview ¶
Package relapi provides RESTful API services for the RFQ relayer
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GetQuoteRequestStatusResponse ¶
type GetQuoteRequestStatusResponse struct { Status string `json:"status"` TxID string `json:"tx_id"` OriginTxHash string `json:"origin_tx_hash"` DestTxHash string `json:"dest_tx_hash"` }
GetQuoteRequestStatusResponse contains the schema for a GET /quote response.
type GetTxRetryResponse ¶
type GetTxRetryResponse struct { TxID string `json:"tx_id"` ChainID uint32 `json:"chain_id"` Nonce uint64 `json:"nonce"` GasAmount string `json:"gas_amount"` }
GetTxRetryResponse contains the schema for a PUT /tx/retry response.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is the REST API handler.
func NewHandler ¶
NewHandler creates a new REST API handler.
func (*Handler) GetHealth ¶
GetHealth returns a successful response to signify the API is up and running.
func (*Handler) GetQuoteRequestStatusByTxHash ¶
GetQuoteRequestStatusByTxHash gets the status of a quote request, given an origin tx hash.
func (*Handler) GetQuoteRequestStatusByTxID ¶
GetQuoteRequestStatusByTxID gets the status of a quote request, given a tx id.
func (*Handler) GetTxRetry ¶
GetTxRetry retries a transaction based on tx hash.
type PutRelayAckResponse ¶ added in v0.22.0
type PutRelayAckResponse struct { TxID string `json:"tx_id"` ShouldRelay bool `json:"should_relay"` RelayerAddress string `json:"relayer_address"` }
PutRelayAckResponse contains the schema for a POST /relay/ack response.
type RelayerAPIServer ¶
type RelayerAPIServer struct {
// contains filtered or unexported fields
}
RelayerAPIServer is a struct that holds the configuration, database connection, gin engine, RPC client, metrics handler, and fast bridge contracts. It is used to initialize and run the API server.
func NewRelayerAPI ¶
func NewRelayerAPI( ctx context.Context, cfg relconfig.Config, handler metrics.Handler, omniRPCClient omniClient.RPCClient, store reldb.Service, submitter submitter.TransactionSubmitter, ) (*RelayerAPIServer, error)
NewRelayerAPI holds the configuration, database connection, gin engine, RPC client, metrics handler, and fast bridge contracts. It is used to initialize and run the API server.