Class Balance

  • All Implemented Interfaces:

    
    public final class Balance
    
                        

    Represents a Balance resource in the tbDEX protocol.

    A Balance resource communicates the amounts of each currency held by a PFI on behalf of a customer.

    • Nested Class Summary

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

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final ResourceMetadata getMetadata() Metadata about the resource, including the sender and resource type.
      final BalanceData getData() The balance data, including currency code and available balance.
      final String getSignature() The signature verifying the authenticity and integrity of the Balance resource.
      final String toJsonString() Serializes the Balance resource to a JSON string.
      final Unit sign(BearerDid bearerDid) Signs the Balance resource using the provided Bearer DID.
      final Unit verify() Verifies the Balance resource'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

      • getData

         final BalanceData getData()

        The balance data, including currency code and available balance.

      • getSignature

         final String getSignature()

        The signature verifying the authenticity and integrity of the Balance resource.

      • toJsonString

         final String toJsonString()

        Serializes the Balance resource to a JSON string.

        Returns:

        The serialized JSON string of the Balance resource.

      • sign

         final Unit sign(BearerDid bearerDid)

        Signs the Balance resource using the provided Bearer DID.

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

         final Unit verify()

        Verifies the Balance resource's signature and validity.