java.lang.Object
tech.deplant.java4ever.binding.Utils
Utils
Contains methods of "utils" module of EVER-SDK API
Misc utility Functions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic interfacestatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final recordstatic final record -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Utils.ResultOfCalcStorageFeecalcStorageFee(EverSdkContext ctx, String account, Long period) Calculates storage fee for an account over a specified time periodstatic Utils.ResultOfCompressZstdcompressZstd(EverSdkContext ctx, String uncompressed, Long level) Compresses data using Zstandard algorithmstatic Utils.ResultOfConvertAddressconvertAddress(EverSdkContext ctx, String address, Utils.AddressStringFormat outputFormat) Converts address from any TON format to any TON formatstatic Utils.ResultOfDecompressZstddecompressZstd(EverSdkContext ctx, String compressed) Decompresses data using Zstandard algorithmstatic Utils.ResultOfGetAddressTypegetAddressType(EverSdkContext ctx, String address) Address types are the following `0:919db8e740d50bf349df2eea03fa30c385d846b991ff5542e67098ee833fc7f7` - standard TON address most commonly used in all cases.
-
Constructor Details
-
Utils
public Utils()
-
-
Method Details
-
convertAddress
public static Utils.ResultOfConvertAddress convertAddress(EverSdkContext 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(EverSdkContext 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(EverSdkContext ctx, String account, Long period) throws EverSdkException Calculates storage fee for an account over a specified time period- Throws:
EverSdkException
-
compressZstd
public static Utils.ResultOfCompressZstd compressZstd(EverSdkContext ctx, String uncompressed, Long 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(EverSdkContext ctx, String compressed) throws EverSdkException Decompresses data using Zstandard algorithm- Parameters:
compressed- Must be encoded as base64. Compressed data.- Throws:
EverSdkException
-