Class Utils

java.lang.Object
tech.deplant.java4ever.binding.Utils

public final class Utils extends Object
Utils Contains methods of "utils" module of EVER-SDK API Misc utility Functions.
  • Constructor Details

    • Utils

      public Utils()
  • Method Details

    • convertAddress

      public static Utils.ResultOfConvertAddress convertAddress(Context ctx, String address, Utils.AddressStringFormat outputFormat) throws EverSdkException
      Converts address from any TON format to any TON format
      Parameters:
      address - Account address in any TON format.
      outputFormat - Specify the format to convert to.
      Throws:
      EverSdkException
    • getAddressType

      public static Utils.ResultOfGetAddressType getAddressType(Context ctx, String address) throws EverSdkException
      Address types are the following `0:919db8e740d50bf349df2eea03fa30c385d846b991ff5542e67098ee833fc7f7` - standard TON address most commonly used in all cases. Also called as hex address `919db8e740d50bf349df2eea03fa30c385d846b991ff5542e67098ee833fc7f7` - account ID. A part of full address. Identifies account inside particular workchain `EQCRnbjnQNUL80nfLuoD+jDDhdhGuZH/VULmcJjugz/H9wam` - base64 address. Also called "user-friendly". Was used at the beginning of TON. Now it is supported for compatibility Validates and returns the type of any TON address.
      Parameters:
      address - Account address in any TON format.
      Throws:
      EverSdkException
    • calcStorageFee

      public static Utils.ResultOfCalcStorageFee calcStorageFee(Context ctx, String account, Integer period) throws EverSdkException
      Calculates storage fee for an account over a specified time period
      Throws:
      EverSdkException
    • compressZstd

      public static Utils.ResultOfCompressZstd compressZstd(Context ctx, String uncompressed, Integer level) throws EverSdkException
      Compresses data using Zstandard algorithm
      Parameters:
      uncompressed - Must be encoded as base64. Uncompressed data.
      level - Compression level, from 1 to 21. Where: 1 - lowest compression level (fastest compression); 21 - highest compression level (slowest compression). If level is omitted, the default compression level is used (currently `3`).
      Throws:
      EverSdkException
    • decompressZstd

      public static Utils.ResultOfDecompressZstd decompressZstd(Context ctx, String compressed) throws EverSdkException
      Decompresses data using Zstandard algorithm
      Parameters:
      compressed - Must be encoded as base64. Compressed data.
      Throws:
      EverSdkException