Class CreateExchangeKt

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static Unit createExchange(ApplicationCall call, OfferingsApi offeringsApi, ExchangesApi exchangesApi, SuspendFunction4<ApplicationCall, Rfq, Offering, String, Unit> callback) Handles the submission of a Request for Quote (RFQ) through the TBDex API.
      final static Boolean isValidUrl(String replyToUrl) Checks if a string is a valid URL.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • createExchange

         final static Unit createExchange(ApplicationCall call, OfferingsApi offeringsApi, ExchangesApi exchangesApi, SuspendFunction4<ApplicationCall, Rfq, Offering, String, Unit> callback)

        Handles the submission of a Request for Quote (RFQ) through the TBDex API.

        This function parses an RFQ message, performs necessary validations, and invokes the callback if provided. It responds with appropriate HTTP status codes for success or failure scenarios.

        Parameters:
        call - The Ktor application call object representing the incoming HTTP request.
        offeringsApi - An instance of OfferingsApi for interacting with offerings data.
        exchangesApi - An instance of ExchangesApi for interacting with exchanges data.
        callback - An optional callback function to be invoked after processing the RFQ.
      • isValidUrl

         final static Boolean isValidUrl(String replyToUrl)

        Checks if a string is a valid URL.

        Parameters:
        replyToUrl - The string to be checked.
        Returns:

        boolean indicating whether the string is a valid URL.