Package tbdex.sdk.messages
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 classQuote.Companion
-
Field Summary
Fields Modifier and Type Field Description private final MessageMetadatametadataprivate final QuoteDatadataprivate final Stringsignaturepublic final static Quote.CompanionCompanion
-
Method Summary
Modifier and Type Method Description final MessageMetadatagetMetadata()Metadata about the message, including sender, recipient, and protocol information. final QuoteDatagetData()The data part of the Quote, containing the exchange rate, payin, and payout details. final StringgetSignature()The signature verifying the authenticity and integrity of the Quote message. final StringtoJsonString()Serializes the Quote to a JSON string. final Unitsign(BearerDid bearerDid)Signs the Quote using the provided Bearer DID. final Unitverify()Verifies the Quote's signature and validity. -
-
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.
-
-
-
-