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 enum
static interface
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
static final record
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncalcStorageFee
(int ctxId, String account, Long period) Calculates storage fee for an account over a specified time periodcompressZstd
(int ctxId, String uncompressed, Long level) Compresses data using Zstandard algorithmconvertAddress
(int ctxId, String address, Utils.AddressStringFormat outputFormat) Converts address from any TON format to any TON formatdecompressZstd
(int ctxId, String compressed) Decompresses data using Zstandard algorithmgetAddressType
(int ctxId, 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 CompletableFuture<Utils.ResultOfConvertAddress> convertAddress(int ctxId, 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 CompletableFuture<Utils.ResultOfGetAddressType> getAddressType(int ctxId, 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 CompletableFuture<Utils.ResultOfCalcStorageFee> calcStorageFee(int ctxId, String account, Long period) throws EverSdkException Calculates storage fee for an account over a specified time period- Throws:
EverSdkException
-
compressZstd
public static CompletableFuture<Utils.ResultOfCompressZstd> compressZstd(int ctxId, 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 CompletableFuture<Utils.ResultOfDecompressZstd> decompressZstd(int ctxId, String compressed) throws EverSdkException Decompresses data using Zstandard algorithm- Parameters:
compressed
- Must be encoded as base64. Compressed data.- Throws:
EverSdkException
-