Class Resource

  • All Implemented Interfaces:

    
    public class Resource
    
                        

    An abstract class representing the structure and common functionality available on all Resources.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Constructor Detail

    • Method Detail

      • sign

         final Unit sign(BearerDid did)

        Signs the Resource using the specified BearerDid

        Parameters:
        did - The DID (Decentralized Identifier) used for signing.
      • verify

         final Unit verify()

        Verifies the signature of the Resource.

        This function verifies the signature using the previously set signature property. It compares the signature against a hashed payload consisting of metadata and data.

      • toString

         String toString()

        Uses Json to serialize the Resource as a json string.

        Returns:

        The json string