Documentation ¶
Overview ¶
Package api contains server-side logic for the relayer's REST API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageResult ¶ added in v0.0.13
type MessageResult struct { OriginHash string `json:"origin_hash"` DestinationHash string `json:"destination_hash"` Origin uint32 `json:"origin"` Destination uint32 `json:"destination"` RequestID string `json:"request_id"` State string `json:"state"` }
MessageResult is the result of a successful /tx request.
type RelayRequest ¶ added in v0.0.13
RelayRequest is a request to relay a transaction.
type RelayerAPIServer ¶ added in v0.0.13
type RelayerAPIServer struct {
// contains filtered or unexported fields
}
RelayerAPIServer exposes API endpoints that interact with CCTPRelayer.
func NewRelayerAPIServer ¶ added in v0.0.13
func NewRelayerAPIServer(port uint16, host string, db db2.CCTPRelayerDB, relayRequestChan chan *RelayRequest) *RelayerAPIServer
NewRelayerAPIServer creates a new RelayerAPIServer.
func (RelayerAPIServer) GetTx ¶ added in v0.0.13
func (r RelayerAPIServer) GetTx(ctx *gin.Context)
GetTx handles the /tx endpoint. If the transaction is found in the db, return information about the transaction. Otherwise, queue the corresponding Message for relay.
type RelayerResponse ¶ added in v0.0.13
type RelayerResponse struct { Success bool `json:"success"` Result interface{} `json:"result"` }
RelayerResponse is a wrapper struct for a relayer API response.
Click to show internal directories.
Click to hide internal directories.