Categorygithub.com/synapsecns/sanguine/contrib/restclient
modulepackage
0.0.2
Repository: https://github.com/synapsecns/sanguine.git
Documentation: pkg.go.dev

# README

REST Client

Auto-generated REST client for the Synapse Protocol REST API.

Usage

package main

import "github.com/synapsecns/sanguine/contrib/restclient"
func main() {
  client := restclient.NewClient("http://localhost:3000")
  // Use the client methods...
}

Note: This stub is experimental and may be removed without notice until this README indicates otherwise.

TODOs

  • Implement built-in/native tracing for the REST client to monitor and trace API calls.
  • Add a health endpoint to check the status and health of the REST client.
  • Improve error handling and logging mechanisms.
  • Enhance the client with retry logic for transient errors.
  • Write comprehensive unit tests and integration tests for the client methods.

# Functions

Creates a new Client, with reasonable defaults.
NewClientWithResponses creates a new ClientWithResponses, which wraps Client with return type handling.
NewGetBridgeLimitsRequest generates requests for GetBridgeLimits.
NewGetBridgeRequest generates requests for GetBridge.
NewGetBridgeTxInfoRequest generates requests for GetBridgeTxInfo.
NewGetBridgeTxStatusRequest generates requests for GetBridgeTxStatus.
NewGetConflictingProofsRequest generates requests for GetConflictingProofs.
NewGetContractsRequest generates requests for GetContracts.
NewGetDestinationTokensRequest generates requests for GetDestinationTokens.
NewGetDestinationTxRequest generates requests for GetDestinationTx.
NewGetDisputesRequest generates requests for GetDisputes.
NewGetInvalidRelaysRequest generates requests for GetInvalidRelays.
NewGetOpenQuoteRequestsRequest generates requests for GetOpenQuoteRequests.
NewGetPendingTransactionsExceedDeadlineRequest generates requests for GetPendingTransactionsExceedDeadline.
NewGetPendingTransactionsMissingClaimRequest generates requests for GetPendingTransactionsMissingClaim.
NewGetPendingTransactionsMissingProofRequest generates requests for GetPendingTransactionsMissingProof.
NewGetPendingTransactionsMissingRelayRequest generates requests for GetPendingTransactionsMissingRelay.
NewGetQuotesRequest generates requests for GetQuotes.
NewGetRefundedAndRelayedRequest generates requests for GetRefundedAndRelayed.
NewGetRequest generates requests for Get.
NewGetRfqStreamRequest generates requests for GetRfqStream.
NewGetSwapRequest generates requests for GetSwap.
NewGetSwapTxInfoRequest generates requests for GetSwapTxInfo.
NewGetSynapseTxIdRequest generates requests for GetSynapseTxId.
NewGetTokenlistRequest generates requests for GetTokenlist.
NewGetTransactionIdTransactionIdRequest generates requests for GetTransactionIdTransactionId.
NewPutAckRequest calls the generic PutAck builder with application/json body.
NewPutAckRequestWithBody generates requests for PutAck with any type of body.
NewPutBulkQuotesRequest calls the generic PutBulkQuotes builder with application/json body.
NewPutBulkQuotesRequestWithBody generates requests for PutBulkQuotes with any type of body.
NewPutQuotesRequest calls the generic PutQuotes builder with application/json body.
NewPutQuotesRequestWithBody generates requests for PutQuotes with any type of body.
NewPutRfqRequest calls the generic PutRfq builder with application/json body.
NewPutRfqRequestWithBody generates requests for PutRfq with any type of body.
ParseGetBridgeLimitsResponse parses an HTTP response from a GetBridgeLimitsWithResponse call.
ParseGetBridgeResponse parses an HTTP response from a GetBridgeWithResponse call.
ParseGetBridgeTxInfoResponse parses an HTTP response from a GetBridgeTxInfoWithResponse call.
ParseGetBridgeTxStatusResponse parses an HTTP response from a GetBridgeTxStatusWithResponse call.
ParseGetConflictingProofsResponse parses an HTTP response from a GetConflictingProofsWithResponse call.
ParseGetContractsResponse parses an HTTP response from a GetContractsWithResponse call.
ParseGetDestinationTokensResponse parses an HTTP response from a GetDestinationTokensWithResponse call.
ParseGetDestinationTxResponse parses an HTTP response from a GetDestinationTxWithResponse call.
ParseGetDisputesResponse parses an HTTP response from a GetDisputesWithResponse call.
ParseGetInvalidRelaysResponse parses an HTTP response from a GetInvalidRelaysWithResponse call.
ParseGetOpenQuoteRequestsResponse parses an HTTP response from a GetOpenQuoteRequestsWithResponse call.
ParseGetPendingTransactionsExceedDeadlineResponse parses an HTTP response from a GetPendingTransactionsExceedDeadlineWithResponse call.
ParseGetPendingTransactionsMissingClaimResponse parses an HTTP response from a GetPendingTransactionsMissingClaimWithResponse call.
ParseGetPendingTransactionsMissingProofResponse parses an HTTP response from a GetPendingTransactionsMissingProofWithResponse call.
ParseGetPendingTransactionsMissingRelayResponse parses an HTTP response from a GetPendingTransactionsMissingRelayWithResponse call.
ParseGetQuotesResponse parses an HTTP response from a GetQuotesWithResponse call.
ParseGetRefundedAndRelayedResponse parses an HTTP response from a GetRefundedAndRelayedWithResponse call.
ParseGetResponse parses an HTTP response from a GetWithResponse call.
ParseGetRfqStreamResponse parses an HTTP response from a GetRfqStreamWithResponse call.
ParseGetSwapResponse parses an HTTP response from a GetSwapWithResponse call.
ParseGetSwapTxInfoResponse parses an HTTP response from a GetSwapTxInfoWithResponse call.
ParseGetSynapseTxIdResponse parses an HTTP response from a GetSynapseTxIdWithResponse call.
ParseGetTokenlistResponse parses an HTTP response from a GetTokenlistWithResponse call.
ParseGetTransactionIdTransactionIdResponse parses an HTTP response from a GetTransactionIdTransactionIdWithResponse call.
ParsePutAckResponse parses an HTTP response from a PutAckWithResponse call.
ParsePutBulkQuotesResponse parses an HTTP response from a PutBulkQuotesWithResponse call.
ParsePutQuotesResponse parses an HTTP response from a PutQuotesWithResponse call.
ParsePutRfqResponse parses an HTTP response from a PutRfqWithResponse call.
WithBaseURL overrides the baseURL.
WithHTTPClient allows overriding the default Doer, which is automatically created using http.Client.
WithRequestEditorFn allows setting up a callback function, which will be called right before sending the request.

# Constants

Defines values for BigNumberType.
Defines values for GetBridgeTxStatusParamsBridgeModule.
Defines values for GetBridgeTxStatusParamsBridgeModule.
Defines values for GetBridgeTxStatusParamsBridgeModule.
Defines values for GetSynapseTxIdParamsBridgeModule.
Defines values for GetSynapseTxIdParamsBridgeModule.
Defines values for GetSynapseTxIdParamsBridgeModule.

# Structs

BigNumber defines model for BigNumber.
Client which conforms to the OpenAPI3 specification for this service.
ClientWithResponses builds on ClientInterface to offer response payloads.
GetBridgeLimitsParams defines parameters for GetBridgeLimits.
No description provided by the author
GetBridgeParams defines parameters for GetBridge.
No description provided by the author
GetBridgeTxInfoParams defines parameters for GetBridgeTxInfo.
No description provided by the author
GetBridgeTxStatusParams defines parameters for GetBridgeTxStatus.
No description provided by the author
No description provided by the author
No description provided by the author
GetDestinationTokensParams defines parameters for GetDestinationTokens.
No description provided by the author
GetDestinationTxParams defines parameters for GetDestinationTx.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GetQuotesParams defines parameters for GetQuotes.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
GetSwapParams defines parameters for GetSwap.
No description provided by the author
GetSwapTxInfoParams defines parameters for GetSwapTxInfo.
No description provided by the author
GetSynapseTxIdParams defines parameters for GetSynapseTxId.
No description provided by the author
No description provided by the author
No description provided by the author
ModelGetContractsResponse defines model for model.GetContractsResponse.
ModelGetOpenQuoteRequestsResponse defines model for model.GetOpenQuoteRequestsResponse.
ModelGetQuoteResponse defines model for model.GetQuoteResponse.
ModelPutBulkQuotesRequest defines model for model.PutBulkQuotesRequest.
ModelPutRelayerQuoteRequest defines model for model.PutRelayerQuoteRequest.
ModelPutRFQRequest defines model for model.PutRFQRequest.
ModelPutRFQResponse defines model for model.PutRFQResponse.
ModelQuoteData defines model for model.QuoteData.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Interfaces

The interface specification for the client above.
ClientWithResponsesInterface is the interface specification for the client with responses above.
Doer performs HTTP requests.

# Type aliases

BigNumberType defines model for BigNumber.Type.
ClientOption allows setting custom parameters during construction.
No description provided by the author
GetBridgeTxStatusParamsBridgeModule defines parameters for GetBridgeTxStatus.
No description provided by the author
GetSynapseTxIdParamsBridgeModule defines parameters for GetSynapseTxId.
PutAckJSONRequestBody defines body for PutAck for application/json ContentType.
PutBulkQuotesJSONRequestBody defines body for PutBulkQuotes for application/json ContentType.
PutQuotesJSONRequestBody defines body for PutQuotes for application/json ContentType.
PutRfqJSONRequestBody defines body for PutRfq for application/json ContentType.
RequestEditorFn is the function signature for the RequestEditor callback function.