Class Quote

  • All Implemented Interfaces:
    tbdex.sdk.http.ReplyToMessage , tbdex.sdk.messages.Message

    
    public final class Quote
     implements Message, ReplyToMessage
                        

    Represents a Quote message in the tbDEX protocol.

    A Quote message is sent by a PFI to Alice in response to an RFQ (Request for Quote), detailing the exchange rate, fees, and other details for a potential exchange.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class Quote.Companion
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final MessageMetadata getMetadata() Metadata about the message, including sender, recipient, and protocol information.
      final QuoteData getData() The data part of the Quote, containing the exchange rate, payin, and payout details.
      final String getSignature() The signature verifying the authenticity and integrity of the Quote message.
      final String toJsonString() Serializes the Quote to a JSON string.
      final Unit sign(BearerDid bearerDid) Signs the Quote using the provided Bearer DID.
      final Unit verify() Verifies the Quote's signature and validity.
      • Methods inherited from class java.lang.Object

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

    • Method Detail

      • getMetadata

         final MessageMetadata getMetadata()

        Metadata about the message, including sender, recipient, and protocol information.

      • getData

         final QuoteData getData()

        The data part of the Quote, containing the exchange rate, payin, and payout details.

      • getSignature

         final String getSignature()

        The signature verifying the authenticity and integrity of the Quote message.

      • toJsonString

         final String toJsonString()

        Serializes the Quote to a JSON string.

        Returns:

        The serialized JSON string of the Quote.

      • sign

         final Unit sign(BearerDid bearerDid)

        Signs the Quote using the provided Bearer DID.

        Parameters:
        bearerDid - The Bearer DID used to sign the Quote.
      • verify

         final Unit verify()

        Verifies the Quote's signature and validity.