Record Class Sdk

java.lang.Object
java.lang.Record
tech.deplant.java4ever.framework.Sdk

public record Sdk(tech.deplant.java4ever.binding.EverSdkContext context, long debugTreeTimeout, tech.deplant.java4ever.binding.Client.ClientConfig clientConfig, OnchainConfig onchainConfig, LocalConfig localConfig) extends Record
  • Constructor Details

    • Sdk

      public Sdk(tech.deplant.java4ever.binding.EverSdkContext context, long debugTreeTimeout, tech.deplant.java4ever.binding.Client.ClientConfig clientConfig, OnchainConfig onchainConfig, LocalConfig localConfig)
      Creates an instance of a Sdk record class.
      Parameters:
      context - the value for the context record component
      debugTreeTimeout - the value for the debugTreeTimeout record component
      clientConfig - the value for the clientConfig record component
      onchainConfig - the value for the onchainConfig record component
      localConfig - the value for the localConfig record component
  • Method Details

    • DEFAULT

      public static Sdk DEFAULT() throws IOException
      Throws:
      IOException
    • DEFAULT

      public static Sdk DEFAULT(String endpoint) throws IOException
      Throws:
      IOException
    • builder

      public static Sdk.Builder builder()
    • endpoints

      public String[] endpoints()
    • version

      public String version() throws tech.deplant.java4ever.binding.EverSdkException
      Throws:
      tech.deplant.java4ever.binding.EverSdkException
    • mapper

      public com.fasterxml.jackson.databind.ObjectMapper mapper()
    • convertMap

      public <T> T convertMap(Map<String,Object> inputMap, Class<T> outputClass)
    • convertMap

      public <T> T convertMap(Map<String,Object> inputMap, com.fasterxml.jackson.core.type.TypeReference<T> outputType)
    • parseStruct

      public com.fasterxml.jackson.databind.JsonNode parseStruct(Object struct) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • deserialize

      public <T> T deserialize(String inputString, Class<T> outputClass) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • serialize

      public String serialize(Object inputObject) throws com.fasterxml.jackson.core.JsonProcessingException
      Throws:
      com.fasterxml.jackson.core.JsonProcessingException
    • saveContract

      public void saveContract(String name, AbstractContract contract) throws IOException
      Throws:
      IOException
    • saveKeys

      public void saveKeys(String name, Credentials keys) throws IOException
      Throws:
      IOException
    • executionOptions

      public tech.deplant.java4ever.binding.Tvm.ExecutionOptions executionOptions()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • context

      public tech.deplant.java4ever.binding.EverSdkContext context()
      Returns the value of the context record component.
      Returns:
      the value of the context record component
    • debugTreeTimeout

      public long debugTreeTimeout()
      Returns the value of the debugTreeTimeout record component.
      Returns:
      the value of the debugTreeTimeout record component
    • clientConfig

      public tech.deplant.java4ever.binding.Client.ClientConfig clientConfig()
      Returns the value of the clientConfig record component.
      Returns:
      the value of the clientConfig record component
    • onchainConfig

      public OnchainConfig onchainConfig()
      Returns the value of the onchainConfig record component.
      Returns:
      the value of the onchainConfig record component
    • localConfig

      public LocalConfig localConfig()
      Returns the value of the localConfig record component.
      Returns:
      the value of the localConfig record component