Class Cancel

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

    
    public final class Cancel
     implements Message, WalletUpdateMessage
                        

    Represents a Cancel message in the tbDEX protocol.

    A Cancel message is sent by Alice to a PFI to terminate an exchange that has not been completed, typically when Alice decides to back out of the transaction or request a refund.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      public class Cancel.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 CancelData getData() The data part of the Cancel message, which includes the reason for cancellation.
      final String getSignature() The signature verifying the authenticity and integrity of the Cancel message.
      final String toJsonString() Serializes the Cancel message to a JSON string.
      final Unit sign(BearerDid bearerDid) Signs the Cancel message using the provided Bearer DID.
      final Unit verify() Verifies the Cancel message'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 CancelData getData()

        The data part of the Cancel message, which includes the reason for cancellation.

      • getSignature

         final String getSignature()

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

      • toJsonString

         final String toJsonString()

        Serializes the Cancel message to a JSON string.

        Returns:

        The serialized JSON string of the Cancel message.

      • sign

         final Unit sign(BearerDid bearerDid)

        Signs the Cancel message using the provided Bearer DID.

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

         final Unit verify()

        Verifies the Cancel message's signature and validity.