├── .gitignore ├── README.md └── src ├── drinkless └── org │ └── ton │ ├── Client.java │ ├── GlobalConfig.java │ ├── TonApi.java │ └── TonTestJava.java ├── libnative-lib.dylib ├── libnative-lib.so └── native-lib.dll /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | out/ 3 | *.iml 4 | src/drinkless/org/ton/*.class -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # tonlib-java 2 | 3 | This is a JVM wrapper for TonLib that can be used with Java/Scala/Kotlin/etc. 4 | 5 | TonLib is a C++ client-side library for interacting with TON. 6 | 7 | The basic necessary functionality is safely and securely implemented in TonLib. 8 | 9 | TonLib checks the Merkle-proofs of data received from the liteserver, so the library can be used with public liteservers. 10 | 11 | Java interacts with TonLib via JNI, `Client.java` and generated typed messages classes declared in `TonApi.java`. 12 | 13 | 14 | # Example 15 | 16 | The repository contains the `TonTestJava.java` example of use. 17 | 18 | Compile and Run: 19 | 20 | ```bash 21 | cd src 22 | 23 | javac drinkless/org/ton/TonTestJava.java 24 | 25 | java -cp . -Djava.library.path=$(pwd) drinkless/org/ton/TonTestJava 26 | ``` 27 | 28 | # Artifacts 29 | 30 | The repository contains already built libraries for Windows, MacOS and Ubuntu. 31 | 32 | You can take the latest library and TonApi.java from [TON autobuilds](https://github.com/newton-blockchain/ton/actions?query=branch%3Amaster+is%3Acompleted). 33 | 34 | * tonlib-java/ folder for MacOS and Ubuntu 35 | 36 | * native-lib.dll for Windows (You can take TonApi.java from MacOS or Ununtu autobuild) 37 | 38 | > Note: there are no autobuilds for the Apple M1 processor yet. 39 | 40 | # Build tonlib and generate TonApi.java 41 | 42 | If necessary, you can manually rebuild the C++ libraries and re-generate TonApi.java as described below. 43 | 44 | ## Set Java variables 45 | 46 | Java must be installed. 47 | 48 | Check that the `JAVA_HOME` variable is set. 49 | 50 | Set JNI variables: 51 | 52 | ```bash 53 | export JAVA_AWT_LIBRARY=NotNeeded 54 | export JAVA_JVM_LIBRARY=NotNeeded 55 | export JAVA_INCLUDE_PATH=${JAVA_HOME}/include 56 | export JAVA_AWT_INCLUDE_PATH=${JAVA_HOME}/include 57 | 58 | # export JAVA_INCLUDE_PATH2=${JAVA_HOME}/include/ 59 | # for MacOS: 60 | export JAVA_INCLUDE_PATH2=${JAVA_HOME}/include/darwin 61 | # for Linux: 62 | export JAVA_INCLUDE_PATH2=${JAVA_HOME}/include/linux 63 | ``` 64 | 65 | ## Install TON Dependencies 66 | 67 | Install the newest versions of make, cmake (version 3.22.1 or later), OpenSSL (version 1.1.1 or later, including C header files), and g++ or clang (or another C++14-compatible compiler as appropriate for your operating system). 68 | 69 | ## Generate and build 70 | 71 | ```bash 72 | git clone --recurse-submodules -j8 https://github.com/newton-blockchain/ton 73 | 74 | cd ton 75 | 76 | git checkout wallets 77 | 78 | cd example/android/ 79 | 80 | mkdir build 81 | 82 | cd build 83 | 84 | cmake -DTON_ONLY_TONLIB=ON .. 85 | 86 | cmake --build . --target prepare_cross_compiling 87 | 88 | cmake --build . --target native-lib 89 | ``` 90 | 91 | After `prepare_cross_compiling` your will get generated `TonApi.java` in `ton/example/android/src/drinkless/org/ton/TonApi.java` 92 | 93 | After `native-lib` your will get `libnative-lib.so` (for Linux) or `libnative-lib.dylib` (for MacOS) in build directory. 94 | 95 | Copy `TonApi.java` and `libnative-lib` to your project. 96 | -------------------------------------------------------------------------------- /src/drinkless/org/ton/Client.java: -------------------------------------------------------------------------------- 1 | // Distributed under the Boost Software License, Version 1.0. (See accompanying 2 | // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 3 | // 4 | package drinkless.org.ton; 5 | 6 | import java.util.concurrent.ConcurrentHashMap; 7 | import java.util.concurrent.atomic.AtomicLong; 8 | import java.util.concurrent.locks.Lock; 9 | import java.util.concurrent.locks.ReadWriteLock; 10 | import java.util.concurrent.locks.ReentrantReadWriteLock; 11 | 12 | /** 13 | * Main class for interaction with the tonlib. 14 | */ 15 | public final class Client implements Runnable { 16 | static { 17 | System.loadLibrary("native-lib"); 18 | } 19 | /** 20 | * Interface for handler for results of queries to tonlib and incoming updates from tonlib. 21 | */ 22 | public interface ResultHandler { 23 | /** 24 | * Callback called on result of query to tonlib or incoming update from tonlib. 25 | * 26 | * @param object Result of query or update of type TonApi.Update about new events. 27 | */ 28 | void onResult(TonApi.Object object); 29 | } 30 | 31 | /** 32 | * Interface for handler of exceptions thrown while invoking ResultHandler. 33 | * By default, all such exceptions are ignored. 34 | * All exceptions thrown from ExceptionHandler are ignored. 35 | */ 36 | public interface ExceptionHandler { 37 | /** 38 | * Callback called on exceptions thrown while invoking ResultHandler. 39 | * 40 | * @param e Exception thrown by ResultHandler. 41 | */ 42 | void onException(Throwable e); 43 | } 44 | 45 | /** 46 | * Sends a request to the tonlib. 47 | * 48 | * @param query Object representing a query to the tonlib. 49 | * @param resultHandler Result handler with onResult method which will be called with result 50 | * of the query or with TonApi.Error as parameter. If it is null, nothing 51 | * will be called. 52 | * @param exceptionHandler Exception handler with onException method which will be called on 53 | * exception thrown from resultHandler. If it is null, then 54 | * defaultExceptionHandler will be called. 55 | * @throws NullPointerException if query is null. 56 | */ 57 | public void send(TonApi.Function query, ResultHandler resultHandler, ExceptionHandler exceptionHandler) { 58 | if (query == null) { 59 | throw new NullPointerException("query is null"); 60 | } 61 | 62 | readLock.lock(); 63 | try { 64 | if (isClientDestroyed) { 65 | if (resultHandler != null) { 66 | handleResult(new TonApi.Error(500, "Client is closed"), resultHandler, exceptionHandler); 67 | } 68 | return; 69 | } 70 | 71 | long queryId = currentQueryId.incrementAndGet(); 72 | handlers.put(queryId, new Handler(resultHandler, exceptionHandler)); 73 | nativeClientSend(nativeClientId, queryId, query); 74 | } finally { 75 | readLock.unlock(); 76 | } 77 | } 78 | 79 | /** 80 | * Sends a request to the tonlib with an empty ExceptionHandler. 81 | * 82 | * @param query Object representing a query to the tonlib. 83 | * @param resultHandler Result handler with onResult method which will be called with result 84 | * of the query or with TonApi.Error as parameter. If it is null, then 85 | * defaultExceptionHandler will be called. 86 | * @throws NullPointerException if query is null. 87 | */ 88 | public void send(TonApi.Function query, ResultHandler resultHandler) { 89 | send(query, resultHandler, null); 90 | } 91 | 92 | /** 93 | * Synchronously executes a tonlib request. Only a few marked accordingly requests can be executed synchronously. 94 | * 95 | * @param query Object representing a query to the tonlib. 96 | * @return request result. 97 | * @throws NullPointerException if query is null. 98 | */ 99 | public static TonApi.Object execute(TonApi.Function query) { 100 | if (query == null) { 101 | throw new NullPointerException("query is null"); 102 | } 103 | return nativeClientExecute(query); 104 | } 105 | 106 | /** 107 | * Replaces handler for incoming updates from the tonlib. 108 | * 109 | * @param updatesHandler Handler with onResult method which will be called for every incoming 110 | * update from the tonlib. 111 | * @param exceptionHandler Exception handler with onException method which will be called on 112 | * exception thrown from updatesHandler, if it is null, defaultExceptionHandler will be invoked. 113 | */ 114 | public void setUpdatesHandler(ResultHandler updatesHandler, ExceptionHandler exceptionHandler) { 115 | handlers.put(0L, new Handler(updatesHandler, exceptionHandler)); 116 | } 117 | 118 | /** 119 | * Replaces handler for incoming updates from the tonlib. Sets empty ExceptionHandler. 120 | * 121 | * @param updatesHandler Handler with onResult method which will be called for every incoming 122 | * update from the tonlib. 123 | */ 124 | public void setUpdatesHandler(ResultHandler updatesHandler) { 125 | setUpdatesHandler(updatesHandler, null); 126 | } 127 | 128 | /** 129 | * Replaces default exception handler to be invoked on exceptions thrown from updatesHandler and all other ResultHandler. 130 | * 131 | * @param defaultExceptionHandler Default exception handler. If null Exceptions are ignored. 132 | */ 133 | public void setDefaultExceptionHandler(Client.ExceptionHandler defaultExceptionHandler) { 134 | this.defaultExceptionHandler = defaultExceptionHandler; 135 | } 136 | 137 | /** 138 | * Overridden method from Runnable, do not call it directly. 139 | */ 140 | @Override 141 | public void run() { 142 | while (!stopFlag) { 143 | receiveQueries(300.0 /*seconds*/); 144 | } 145 | } 146 | 147 | /** 148 | * Creates new Client. 149 | * 150 | * @param updatesHandler Handler for incoming updates. 151 | * @param updatesExceptionHandler Handler for exceptions thrown from updatesHandler. If it is null, exceptions will be iggnored. 152 | * @param defaultExceptionHandler Default handler for exceptions thrown from all ResultHandler. If it is null, exceptions will be iggnored. 153 | * @return created Client 154 | */ 155 | public static Client create(ResultHandler updatesHandler, ExceptionHandler updatesExceptionHandler, ExceptionHandler defaultExceptionHandler) { 156 | Client client = new Client(updatesHandler, updatesExceptionHandler, defaultExceptionHandler); 157 | new Thread(client, "tonlib thread").start(); 158 | return client; 159 | } 160 | 161 | /** 162 | * Closes Client. 163 | */ 164 | public void close() { 165 | writeLock.lock(); 166 | try { 167 | if (isClientDestroyed) { 168 | return; 169 | } 170 | if (!stopFlag) { 171 | //send(new TonApi.Close(), null); 172 | } 173 | isClientDestroyed = true; 174 | while (!stopFlag) { 175 | Thread.yield(); 176 | } 177 | while (handlers.size() != 1) { 178 | receiveQueries(300.0); 179 | } 180 | destroyNativeClient(nativeClientId); 181 | } finally { 182 | writeLock.unlock(); 183 | } 184 | } 185 | 186 | private final ReadWriteLock readWriteLock = new ReentrantReadWriteLock(); 187 | private final Lock readLock = readWriteLock.readLock(); 188 | private final Lock writeLock = readWriteLock.writeLock(); 189 | 190 | private volatile boolean stopFlag = false; 191 | private volatile boolean isClientDestroyed = false; 192 | private final long nativeClientId; 193 | 194 | private final ConcurrentHashMap handlers = new ConcurrentHashMap(); 195 | private final AtomicLong currentQueryId = new AtomicLong(); 196 | 197 | private volatile ExceptionHandler defaultExceptionHandler = null; 198 | 199 | private static final int MAX_EVENTS = 1000; 200 | private final long[] eventIds = new long[MAX_EVENTS]; 201 | private final TonApi.Object[] events = new TonApi.Object[MAX_EVENTS]; 202 | 203 | private static class Handler { 204 | final ResultHandler resultHandler; 205 | final ExceptionHandler exceptionHandler; 206 | 207 | Handler(ResultHandler resultHandler, ExceptionHandler exceptionHandler) { 208 | this.resultHandler = resultHandler; 209 | this.exceptionHandler = exceptionHandler; 210 | } 211 | } 212 | 213 | private Client(ResultHandler updatesHandler, ExceptionHandler updateExceptionHandler, ExceptionHandler defaultExceptionHandler) { 214 | nativeClientId = createNativeClient(); 215 | handlers.put(0L, new Handler(updatesHandler, updateExceptionHandler)); 216 | this.defaultExceptionHandler = defaultExceptionHandler; 217 | } 218 | 219 | @Override 220 | protected void finalize() throws Throwable { 221 | try { 222 | close(); 223 | } finally { 224 | super.finalize(); 225 | } 226 | } 227 | 228 | private void processResult(long id, TonApi.Object object) { 229 | /* 230 | if (object instanceof TonApi.UpdateAuthorizationState) { 231 | if (((TonApi.UpdateAuthorizationState) object).authorizationState instanceof TonApi.AuthorizationStateClosed) { 232 | stopFlag = true; 233 | } 234 | } 235 | */ 236 | Handler handler; 237 | if (id == 0) { 238 | // update handler stays forever 239 | handler = handlers.get(id); 240 | } else { 241 | handler = handlers.remove(id); 242 | } 243 | if (handler == null) { 244 | return; 245 | } 246 | 247 | handleResult(object, handler.resultHandler, handler.exceptionHandler); 248 | } 249 | 250 | private void handleResult(TonApi.Object object, ResultHandler resultHandler, ExceptionHandler exceptionHandler) { 251 | if (resultHandler == null) { 252 | return; 253 | } 254 | 255 | try { 256 | resultHandler.onResult(object); 257 | } catch (Throwable cause) { 258 | if (exceptionHandler == null) { 259 | exceptionHandler = defaultExceptionHandler; 260 | } 261 | if (exceptionHandler != null) { 262 | try { 263 | exceptionHandler.onException(cause); 264 | } catch (Throwable ignored) { 265 | } 266 | } 267 | } 268 | } 269 | 270 | private void receiveQueries(double timeout) { 271 | int resultN = nativeClientReceive(nativeClientId, eventIds, events, timeout); 272 | for (int i = 0; i < resultN; i++) { 273 | processResult(eventIds[i], events[i]); 274 | events[i] = null; 275 | } 276 | } 277 | 278 | private static native long createNativeClient(); 279 | 280 | private static native void nativeClientSend(long nativeClientId, long eventId, TonApi.Function function); 281 | 282 | private static native int nativeClientReceive(long nativeClientId, long[] eventIds, TonApi.Object[] events, double timeout); 283 | 284 | private static native TonApi.Object nativeClientExecute(TonApi.Function function); 285 | 286 | private static native void destroyNativeClient(long nativeClientId); 287 | 288 | } -------------------------------------------------------------------------------- /src/drinkless/org/ton/GlobalConfig.java: -------------------------------------------------------------------------------- 1 | package drinkless.org.ton; 2 | 3 | public class GlobalConfig { 4 | 5 | // downloaded from https://ton.org/global-config.json 6 | public final static String config = "{\n" + 7 | "\"liteservers\": [\n" + 8 | " {\n" + 9 | " \"ip\": 1137658550,\n" + 10 | " \"port\": 4924,\n" + 11 | " \"id\": {\n" + 12 | " \"@type\": \"pub.ed25519\",\n" + 13 | " \"key\": \"peJTw/arlRfssgTuf9BMypJzqOi7SXEqSPSWiEw2U1M=\"\n" + 14 | " }\n" + 15 | " },\n" + 16 | " {\n" + 17 | " \"ip\": 84478511,\n" + 18 | " \"port\": 19949,\n" + 19 | " \"id\": {\n" + 20 | " \"@type\": \"pub.ed25519\",\n" + 21 | " \"key\": \"n4VDnSCUuSpjnCyUk9e3QOOd6o0ItSWYbTnW3Wnn8wk=\"\n" + 22 | " }\n" + 23 | " },\n" + 24 | " {\n" + 25 | " \"ip\": 84478479,\n" + 26 | " \"port\": 48014,\n" + 27 | " \"id\": {\n" + 28 | " \"@type\": \"pub.ed25519\",\n" + 29 | " \"key\": \"3XO67K/qi+gu3T9v8G2hx1yNmWZhccL3O7SoosFo8G0=\"\n" + 30 | " }\n" + 31 | " },\n" + 32 | " {\n" + 33 | " \"ip\": -2018135749,\n" + 34 | " \"port\": 53312,\n" + 35 | " \"id\": {\n" + 36 | " \"@type\": \"pub.ed25519\",\n" + 37 | " \"key\": \"aF91CuUHuuOv9rm2W5+O/4h38M3sRm40DtSdRxQhmtQ=\"\n" + 38 | " }\n" + 39 | " },\n" + 40 | " {\n" + 41 | " \"ip\": -2018145068,\n" + 42 | " \"port\": 13206,\n" + 43 | " \"id\": {\n" + 44 | " \"@type\": \"pub.ed25519\",\n" + 45 | " \"key\": \"K0t3+IWLOXHYMvMcrGZDPs+pn58a17LFbnXoQkKc2xw=\"\n" + 46 | " }\n" + 47 | " },\n" + 48 | " {\n" + 49 | " \"ip\": -2018145059,\n" + 50 | " \"port\": 46995,\n" + 51 | " \"id\": {\n" + 52 | " \"@type\": \"pub.ed25519\",\n" + 53 | " \"key\": \"wQE0MVhXNWUXpWiW5Bk8cAirIh5NNG3cZM1/fSVKIts=\"\n" + 54 | " }\n" + 55 | " },\n" + 56 | " {\n" + 57 | " \"ip\": 868462740,\n" + 58 | " \"port\": 4194,\n" + 59 | " \"id\": {\n" + 60 | " \"@type\": \"pub.ed25519\",\n" + 61 | " \"key\": \"8sEr/sw8EmFyuJaOQlbNbT0IKj8NtoCsFw5052hVvHw=\"\n" + 62 | " }\n" + 63 | " },\n" + 64 | " {\n" + 65 | " \"ip\": 1091931625,\n" + 66 | " \"port\": 30131,\n" + 67 | " \"id\": {\n" + 68 | " \"@type\": \"pub.ed25519\",\n" + 69 | " \"key\": \"wrQaeIFispPfHndEBc0s0fx7GSp8UFFvebnytQQfc6A=\"\n" + 70 | " }\n" + 71 | " },\n" + 72 | " {\n" + 73 | " \"ip\": 1091931590,\n" + 74 | " \"port\": 47160,\n" + 75 | " \"id\": {\n" + 76 | " \"@type\": \"pub.ed25519\",\n" + 77 | " \"key\": \"vOe1Xqt/1AQ2Z56Pr+1Rnw+f0NmAA7rNCZFIHeChB7o=\"\n" + 78 | " }\n" + 79 | " },\n" + 80 | " {\n" + 81 | " \"ip\": 1091931623,\n" + 82 | " \"port\": 17728,\n" + 83 | " \"id\": {\n" + 84 | " \"@type\": \"pub.ed25519\",\n" + 85 | " \"key\": \"BYSVpL7aPk0kU5CtlsIae/8mf2B/NrBi7DKmepcjX6Q=\"\n" + 86 | " }\n" + 87 | " },\n" + 88 | " {\n" + 89 | " \"ip\": 1091931589,\n" + 90 | " \"port\": 13570,\n" + 91 | " \"id\": {\n" + 92 | " \"@type\": \"pub.ed25519\",\n" + 93 | " \"key\": \"iVQH71cymoNgnrhOT35tl/Y7k86X5iVuu5Vf68KmifQ=\"\n" + 94 | " }\n" + 95 | " },\n" + 96 | " {\n" + 97 | " \"ip\": -1539021362,\n" + 98 | " \"port\": 52995,\n" + 99 | " \"id\": {\n" + 100 | " \"@type\": \"pub.ed25519\",\n" + 101 | " \"key\": \"QnGFe9kihW+TKacEvvxFWqVXeRxCB6ChjjhNTrL7+/k=\"\n" + 102 | " }\n" + 103 | " },\n" + 104 | " {\n" + 105 | " \"ip\": -1539021936,\n" + 106 | " \"port\": 20334,\n" + 107 | " \"id\": {\n" + 108 | " \"@type\": \"pub.ed25519\",\n" + 109 | " \"key\": \"gyLh12v4hBRtyBygvvbbO2HqEtgl+ojpeRJKt4gkMq0=\"\n" + 110 | " }\n" + 111 | " },\n" + 112 | " {\n" + 113 | " \"ip\": -1136338705,\n" + 114 | " \"port\": 19925,\n" + 115 | " \"id\": {\n" + 116 | " \"@type\": \"pub.ed25519\",\n" + 117 | " \"key\": \"ucho5bEkufbKN1JR1BGHpkObq602whJn3Q3UwhtgSo4=\"\n" + 118 | " }\n" + 119 | " },\n" + 120 | " {\n" + 121 | " \"ip\": 868465979,\n" + 122 | " \"port\": 52888,\n" + 123 | " \"id\": {\n" + 124 | " \"@type\": \"pub.ed25519\",\n" + 125 | " \"key\": \"MhrcOEIlxMNe34cfb4GMmMl0OoPKe3HSDGl8miK5rRU=\"\n" + 126 | " }\n" + 127 | " },\n" + 128 | " {\n" + 129 | " \"ip\": 868466060,\n" + 130 | " \"port\": 48621,\n" + 131 | " \"id\": {\n" + 132 | " \"@type\": \"pub.ed25519\",\n" + 133 | " \"key\": \"z0eg+Dll54aUJFc8WvU8CZP6CUKPqUcra+zJLxti5wU=\"\n" + 134 | " }\n" + 135 | " },\n" + 136 | " {\n" + 137 | " \"ip\": -2018147130,\n" + 138 | " \"port\": 53560,\n" + 139 | " \"id\": {\n" + 140 | " \"@type\": \"pub.ed25519\",\n" + 141 | " \"key\": \"NlYhh/xf4uQpE+7EzgorPHqIaqildznrpajJTRRH2HU=\"\n" + 142 | " }\n" + 143 | " },\n" + 144 | " {\n" + 145 | " \"ip\": -2018147075,\n" + 146 | " \"port\": 46529,\n" + 147 | " \"id\": {\n" + 148 | " \"@type\": \"pub.ed25519\",\n" + 149 | " \"key\": \"jLO6yoooqUQqg4/1QXflpv2qGCoXmzZCR+bOsYJ2hxw=\"\n" + 150 | " }\n" + 151 | " },\n" + 152 | " {\n" + 153 | " \"ip\": 908566172,\n" + 154 | " \"port\": 51565,\n" + 155 | " \"id\": {\n" + 156 | " \"@type\": \"pub.ed25519\",\n" + 157 | " \"key\": \"TDg+ILLlRugRB4Kpg3wXjPcoc+d+Eeb7kuVe16CS9z8=\"\n" + 158 | " }\n" + 159 | " }\n" + 160 | " ],\n" + 161 | " \"validator\": {\n" + 162 | " \"@type\": \"validator.config.global\",\n" + 163 | " \"zero_state\": {\n" + 164 | " \"workchain\": -1,\n" + 165 | " \"shard\": -9223372036854775808,\n" + 166 | " \"seqno\": 0,\n" + 167 | " \"root_hash\": \"F6OpKZKqvqeFp6CQmFomXNMfMj2EnaUSOXN+Mh+wVWk=\",\n" + 168 | " \"file_hash\": \"XplPz01CXAps5qeSWUtxcyBfdAo5zVb1N979KLSKD24=\"\n" + 169 | " },\n" + 170 | " \"init_block\": {\n" + 171 | " \"root_hash\": \"irEt9whDfgaYwD+8AzBlYzrMZHhrkhSVp3PU1s4DOz4=\",\n" + 172 | " \"seqno\": 10171687,\n" + 173 | " \"file_hash\": \"lay/bUKUUFDJXU9S6gx9GACQFl+uK+zX8SqHWS9oLZc=\",\n" + 174 | " \"workchain\": -1,\n" + 175 | " \"shard\": -9223372036854775808\n" + 176 | " },\n" + 177 | " \"hardforks\": [\n" + 178 | " {\n" + 179 | " \"file_hash\": \"t/9VBPODF7Zdh4nsnA49dprO69nQNMqYL+zk5bCjV/8=\",\n" + 180 | " \"seqno\": 8536841,\n" + 181 | " \"root_hash\": \"08Kpc9XxrMKC6BF/FeNHPS3MEL1/Vi/fQU/C9ELUrkc=\",\n" + 182 | " \"workchain\": -1,\n" + 183 | " \"shard\": -9223372036854775808\n" + 184 | " }\n" + 185 | " ]\n" + 186 | " }\n" + 187 | "}"; 188 | 189 | } 190 | -------------------------------------------------------------------------------- /src/drinkless/org/ton/TonApi.java: -------------------------------------------------------------------------------- 1 | package drinkless.org.ton; 2 | 3 | public class TonApi { 4 | /** 5 | * This class is a base class for all tonlib interface classes. 6 | */ 7 | public abstract static class Object { 8 | /** 9 | * @return string representation of the object. 10 | */ 11 | public native String toString(); 12 | 13 | /** 14 | * @return identifier uniquely determining type of the object. 15 | */ 16 | public abstract int getConstructor(); 17 | } 18 | 19 | /** 20 | * This class is a base class for all tonlib interface function-classes. 21 | */ 22 | public abstract static class Function extends Object { 23 | /** 24 | * @return string representation of the object. 25 | */ 26 | public native String toString(); 27 | } 28 | 29 | /** 30 | * 31 | */ 32 | public static class AccountAddress extends Object { 33 | public String accountAddress; 34 | 35 | /** 36 | * 37 | */ 38 | public AccountAddress() { 39 | } 40 | 41 | public AccountAddress(String accountAddress) { 42 | this.accountAddress = accountAddress; 43 | } 44 | 45 | /** 46 | * Identifier uniquely determining type of the object. 47 | */ 48 | public static final int CONSTRUCTOR = 755613099; 49 | 50 | /** 51 | * @return this.CONSTRUCTOR 52 | */ 53 | @Override 54 | public int getConstructor() { 55 | return CONSTRUCTOR; 56 | } 57 | } 58 | 59 | /** 60 | * 61 | */ 62 | public static class AccountList extends Object { 63 | public FullAccountState[] accounts; 64 | 65 | /** 66 | * 67 | */ 68 | public AccountList() { 69 | } 70 | 71 | public AccountList(FullAccountState[] accounts) { 72 | this.accounts = accounts; 73 | } 74 | 75 | /** 76 | * Identifier uniquely determining type of the object. 77 | */ 78 | public static final int CONSTRUCTOR = 2017374805; 79 | 80 | /** 81 | * @return this.CONSTRUCTOR 82 | */ 83 | @Override 84 | public int getConstructor() { 85 | return CONSTRUCTOR; 86 | } 87 | } 88 | 89 | /** 90 | * 91 | */ 92 | public static class AccountRevisionList extends Object { 93 | public FullAccountState[] revisions; 94 | 95 | /** 96 | * 97 | */ 98 | public AccountRevisionList() { 99 | } 100 | 101 | public AccountRevisionList(FullAccountState[] revisions) { 102 | this.revisions = revisions; 103 | } 104 | 105 | /** 106 | * Identifier uniquely determining type of the object. 107 | */ 108 | public static final int CONSTRUCTOR = 527197386; 109 | 110 | /** 111 | * @return this.CONSTRUCTOR 112 | */ 113 | @Override 114 | public int getConstructor() { 115 | return CONSTRUCTOR; 116 | } 117 | } 118 | 119 | public abstract static class AccountState extends Object { 120 | } 121 | 122 | public static class RawAccountState extends AccountState { 123 | public byte[] code; 124 | public byte[] data; 125 | public byte[] frozenHash; 126 | 127 | /** 128 | * 129 | */ 130 | public RawAccountState() { 131 | } 132 | 133 | public RawAccountState(byte[] code, byte[] data, byte[] frozenHash) { 134 | this.code = code; 135 | this.data = data; 136 | this.frozenHash = frozenHash; 137 | } 138 | 139 | /** 140 | * Identifier uniquely determining type of the object. 141 | */ 142 | public static final int CONSTRUCTOR = -531917254; 143 | 144 | /** 145 | * @return this.CONSTRUCTOR 146 | */ 147 | @Override 148 | public int getConstructor() { 149 | return CONSTRUCTOR; 150 | } 151 | } 152 | 153 | public static class WalletV3AccountState extends AccountState { 154 | public long walletId; 155 | public int seqno; 156 | 157 | /** 158 | * 159 | */ 160 | public WalletV3AccountState() { 161 | } 162 | 163 | public WalletV3AccountState(long walletId, int seqno) { 164 | this.walletId = walletId; 165 | this.seqno = seqno; 166 | } 167 | 168 | /** 169 | * Identifier uniquely determining type of the object. 170 | */ 171 | public static final int CONSTRUCTOR = -1619351478; 172 | 173 | /** 174 | * @return this.CONSTRUCTOR 175 | */ 176 | @Override 177 | public int getConstructor() { 178 | return CONSTRUCTOR; 179 | } 180 | } 181 | 182 | public static class WalletHighloadV1AccountState extends AccountState { 183 | public long walletId; 184 | public int seqno; 185 | 186 | /** 187 | * 188 | */ 189 | public WalletHighloadV1AccountState() { 190 | } 191 | 192 | public WalletHighloadV1AccountState(long walletId, int seqno) { 193 | this.walletId = walletId; 194 | this.seqno = seqno; 195 | } 196 | 197 | /** 198 | * Identifier uniquely determining type of the object. 199 | */ 200 | public static final int CONSTRUCTOR = 1616372956; 201 | 202 | /** 203 | * @return this.CONSTRUCTOR 204 | */ 205 | @Override 206 | public int getConstructor() { 207 | return CONSTRUCTOR; 208 | } 209 | } 210 | 211 | public static class WalletHighloadV2AccountState extends AccountState { 212 | public long walletId; 213 | 214 | /** 215 | * 216 | */ 217 | public WalletHighloadV2AccountState() { 218 | } 219 | 220 | public WalletHighloadV2AccountState(long walletId) { 221 | this.walletId = walletId; 222 | } 223 | 224 | /** 225 | * Identifier uniquely determining type of the object. 226 | */ 227 | public static final int CONSTRUCTOR = -1803723441; 228 | 229 | /** 230 | * @return this.CONSTRUCTOR 231 | */ 232 | @Override 233 | public int getConstructor() { 234 | return CONSTRUCTOR; 235 | } 236 | } 237 | 238 | public static class DnsAccountState extends AccountState { 239 | public long walletId; 240 | 241 | /** 242 | * 243 | */ 244 | public DnsAccountState() { 245 | } 246 | 247 | public DnsAccountState(long walletId) { 248 | this.walletId = walletId; 249 | } 250 | 251 | /** 252 | * Identifier uniquely determining type of the object. 253 | */ 254 | public static final int CONSTRUCTOR = 1727715434; 255 | 256 | /** 257 | * @return this.CONSTRUCTOR 258 | */ 259 | @Override 260 | public int getConstructor() { 261 | return CONSTRUCTOR; 262 | } 263 | } 264 | 265 | public static class RwalletAccountState extends AccountState { 266 | public long walletId; 267 | public int seqno; 268 | public long unlockedBalance; 269 | public RwalletConfig config; 270 | 271 | /** 272 | * 273 | */ 274 | public RwalletAccountState() { 275 | } 276 | 277 | public RwalletAccountState(long walletId, int seqno, long unlockedBalance, RwalletConfig config) { 278 | this.walletId = walletId; 279 | this.seqno = seqno; 280 | this.unlockedBalance = unlockedBalance; 281 | this.config = config; 282 | } 283 | 284 | /** 285 | * Identifier uniquely determining type of the object. 286 | */ 287 | public static final int CONSTRUCTOR = -739540008; 288 | 289 | /** 290 | * @return this.CONSTRUCTOR 291 | */ 292 | @Override 293 | public int getConstructor() { 294 | return CONSTRUCTOR; 295 | } 296 | } 297 | 298 | public static class PchanAccountState extends AccountState { 299 | public PchanConfig config; 300 | public PchanState state; 301 | public String description; 302 | 303 | /** 304 | * 305 | */ 306 | public PchanAccountState() { 307 | } 308 | 309 | public PchanAccountState(PchanConfig config, PchanState state, String description) { 310 | this.config = config; 311 | this.state = state; 312 | this.description = description; 313 | } 314 | 315 | /** 316 | * Identifier uniquely determining type of the object. 317 | */ 318 | public static final int CONSTRUCTOR = 1612869496; 319 | 320 | /** 321 | * @return this.CONSTRUCTOR 322 | */ 323 | @Override 324 | public int getConstructor() { 325 | return CONSTRUCTOR; 326 | } 327 | } 328 | 329 | public static class UninitedAccountState extends AccountState { 330 | public byte[] frozenHash; 331 | 332 | /** 333 | * 334 | */ 335 | public UninitedAccountState() { 336 | } 337 | 338 | public UninitedAccountState(byte[] frozenHash) { 339 | this.frozenHash = frozenHash; 340 | } 341 | 342 | /** 343 | * Identifier uniquely determining type of the object. 344 | */ 345 | public static final int CONSTRUCTOR = 1522374408; 346 | 347 | /** 348 | * @return this.CONSTRUCTOR 349 | */ 350 | @Override 351 | public int getConstructor() { 352 | return CONSTRUCTOR; 353 | } 354 | } 355 | 356 | public abstract static class Action extends Object { 357 | } 358 | 359 | public static class ActionNoop extends Action { 360 | 361 | /** 362 | * 363 | */ 364 | public ActionNoop() { 365 | } 366 | 367 | /** 368 | * Identifier uniquely determining type of the object. 369 | */ 370 | public static final int CONSTRUCTOR = 1135848603; 371 | 372 | /** 373 | * @return this.CONSTRUCTOR 374 | */ 375 | @Override 376 | public int getConstructor() { 377 | return CONSTRUCTOR; 378 | } 379 | } 380 | 381 | public static class ActionMsg extends Action { 382 | public MsgMessage[] messages; 383 | public boolean allowSendToUninited; 384 | 385 | /** 386 | * 387 | */ 388 | public ActionMsg() { 389 | } 390 | 391 | public ActionMsg(MsgMessage[] messages, boolean allowSendToUninited) { 392 | this.messages = messages; 393 | this.allowSendToUninited = allowSendToUninited; 394 | } 395 | 396 | /** 397 | * Identifier uniquely determining type of the object. 398 | */ 399 | public static final int CONSTRUCTOR = 246839120; 400 | 401 | /** 402 | * @return this.CONSTRUCTOR 403 | */ 404 | @Override 405 | public int getConstructor() { 406 | return CONSTRUCTOR; 407 | } 408 | } 409 | 410 | public static class ActionDns extends Action { 411 | public DnsAction[] actions; 412 | 413 | /** 414 | * 415 | */ 416 | public ActionDns() { 417 | } 418 | 419 | public ActionDns(DnsAction[] actions) { 420 | this.actions = actions; 421 | } 422 | 423 | /** 424 | * Identifier uniquely determining type of the object. 425 | */ 426 | public static final int CONSTRUCTOR = 1193750561; 427 | 428 | /** 429 | * @return this.CONSTRUCTOR 430 | */ 431 | @Override 432 | public int getConstructor() { 433 | return CONSTRUCTOR; 434 | } 435 | } 436 | 437 | public static class ActionPchan extends Action { 438 | public PchanAction action; 439 | 440 | /** 441 | * 442 | */ 443 | public ActionPchan() { 444 | } 445 | 446 | public ActionPchan(PchanAction action) { 447 | this.action = action; 448 | } 449 | 450 | /** 451 | * Identifier uniquely determining type of the object. 452 | */ 453 | public static final int CONSTRUCTOR = -1490172447; 454 | 455 | /** 456 | * @return this.CONSTRUCTOR 457 | */ 458 | @Override 459 | public int getConstructor() { 460 | return CONSTRUCTOR; 461 | } 462 | } 463 | 464 | public static class ActionRwallet extends Action { 465 | public RwalletActionInit action; 466 | 467 | /** 468 | * 469 | */ 470 | public ActionRwallet() { 471 | } 472 | 473 | public ActionRwallet(RwalletActionInit action) { 474 | this.action = action; 475 | } 476 | 477 | /** 478 | * Identifier uniquely determining type of the object. 479 | */ 480 | public static final int CONSTRUCTOR = -117295163; 481 | 482 | /** 483 | * @return this.CONSTRUCTOR 484 | */ 485 | @Override 486 | public int getConstructor() { 487 | return CONSTRUCTOR; 488 | } 489 | } 490 | 491 | /** 492 | * 493 | */ 494 | public static class AdnlAddress extends Object { 495 | public String adnlAddress; 496 | 497 | /** 498 | * 499 | */ 500 | public AdnlAddress() { 501 | } 502 | 503 | public AdnlAddress(String adnlAddress) { 504 | this.adnlAddress = adnlAddress; 505 | } 506 | 507 | /** 508 | * Identifier uniquely determining type of the object. 509 | */ 510 | public static final int CONSTRUCTOR = 70358284; 511 | 512 | /** 513 | * @return this.CONSTRUCTOR 514 | */ 515 | @Override 516 | public int getConstructor() { 517 | return CONSTRUCTOR; 518 | } 519 | } 520 | 521 | /** 522 | * 523 | */ 524 | public static class Bip39Hints extends Object { 525 | public String[] words; 526 | 527 | /** 528 | * 529 | */ 530 | public Bip39Hints() { 531 | } 532 | 533 | public Bip39Hints(String[] words) { 534 | this.words = words; 535 | } 536 | 537 | /** 538 | * Identifier uniquely determining type of the object. 539 | */ 540 | public static final int CONSTRUCTOR = 1012243456; 541 | 542 | /** 543 | * @return this.CONSTRUCTOR 544 | */ 545 | @Override 546 | public int getConstructor() { 547 | return CONSTRUCTOR; 548 | } 549 | } 550 | 551 | /** 552 | * 553 | */ 554 | public static class Config extends Object { 555 | public String config; 556 | public String blockchainName; 557 | public boolean useCallbacksForNetwork; 558 | public boolean ignoreCache; 559 | 560 | /** 561 | * 562 | */ 563 | public Config() { 564 | } 565 | 566 | public Config(String config, String blockchainName, boolean useCallbacksForNetwork, boolean ignoreCache) { 567 | this.config = config; 568 | this.blockchainName = blockchainName; 569 | this.useCallbacksForNetwork = useCallbacksForNetwork; 570 | this.ignoreCache = ignoreCache; 571 | } 572 | 573 | /** 574 | * Identifier uniquely determining type of the object. 575 | */ 576 | public static final int CONSTRUCTOR = -1538391496; 577 | 578 | /** 579 | * @return this.CONSTRUCTOR 580 | */ 581 | @Override 582 | public int getConstructor() { 583 | return CONSTRUCTOR; 584 | } 585 | } 586 | 587 | /** 588 | * 589 | */ 590 | public static class Data extends Object { 591 | public byte[] bytes; 592 | 593 | /** 594 | * 595 | */ 596 | public Data() { 597 | } 598 | 599 | public Data(byte[] bytes) { 600 | this.bytes = bytes; 601 | } 602 | 603 | /** 604 | * Identifier uniquely determining type of the object. 605 | */ 606 | public static final int CONSTRUCTOR = -414733967; 607 | 608 | /** 609 | * @return this.CONSTRUCTOR 610 | */ 611 | @Override 612 | public int getConstructor() { 613 | return CONSTRUCTOR; 614 | } 615 | } 616 | 617 | /** 618 | * 619 | */ 620 | public static class Error extends Object { 621 | public int code; 622 | public String message; 623 | 624 | /** 625 | * 626 | */ 627 | public Error() { 628 | } 629 | 630 | public Error(int code, String message) { 631 | this.code = code; 632 | this.message = message; 633 | } 634 | 635 | /** 636 | * Identifier uniquely determining type of the object. 637 | */ 638 | public static final int CONSTRUCTOR = -1679978726; 639 | 640 | /** 641 | * @return this.CONSTRUCTOR 642 | */ 643 | @Override 644 | public int getConstructor() { 645 | return CONSTRUCTOR; 646 | } 647 | } 648 | 649 | /** 650 | * 651 | */ 652 | public static class ExportedEncryptedKey extends Object { 653 | public byte[] data; 654 | 655 | /** 656 | * 657 | */ 658 | public ExportedEncryptedKey() { 659 | } 660 | 661 | public ExportedEncryptedKey(byte[] data) { 662 | this.data = data; 663 | } 664 | 665 | /** 666 | * Identifier uniquely determining type of the object. 667 | */ 668 | public static final int CONSTRUCTOR = 2024406612; 669 | 670 | /** 671 | * @return this.CONSTRUCTOR 672 | */ 673 | @Override 674 | public int getConstructor() { 675 | return CONSTRUCTOR; 676 | } 677 | } 678 | 679 | /** 680 | * 681 | */ 682 | public static class ExportedKey extends Object { 683 | public String[] wordList; 684 | 685 | /** 686 | * 687 | */ 688 | public ExportedKey() { 689 | } 690 | 691 | public ExportedKey(String[] wordList) { 692 | this.wordList = wordList; 693 | } 694 | 695 | /** 696 | * Identifier uniquely determining type of the object. 697 | */ 698 | public static final int CONSTRUCTOR = -1449248297; 699 | 700 | /** 701 | * @return this.CONSTRUCTOR 702 | */ 703 | @Override 704 | public int getConstructor() { 705 | return CONSTRUCTOR; 706 | } 707 | } 708 | 709 | /** 710 | * 711 | */ 712 | public static class ExportedPemKey extends Object { 713 | public String pem; 714 | 715 | /** 716 | * 717 | */ 718 | public ExportedPemKey() { 719 | } 720 | 721 | public ExportedPemKey(String pem) { 722 | this.pem = pem; 723 | } 724 | 725 | /** 726 | * Identifier uniquely determining type of the object. 727 | */ 728 | public static final int CONSTRUCTOR = 1425473725; 729 | 730 | /** 731 | * @return this.CONSTRUCTOR 732 | */ 733 | @Override 734 | public int getConstructor() { 735 | return CONSTRUCTOR; 736 | } 737 | } 738 | 739 | /** 740 | * 741 | */ 742 | public static class ExportedUnencryptedKey extends Object { 743 | public byte[] data; 744 | 745 | /** 746 | * 747 | */ 748 | public ExportedUnencryptedKey() { 749 | } 750 | 751 | public ExportedUnencryptedKey(byte[] data) { 752 | this.data = data; 753 | } 754 | 755 | /** 756 | * Identifier uniquely determining type of the object. 757 | */ 758 | public static final int CONSTRUCTOR = 730045160; 759 | 760 | /** 761 | * @return this.CONSTRUCTOR 762 | */ 763 | @Override 764 | public int getConstructor() { 765 | return CONSTRUCTOR; 766 | } 767 | } 768 | 769 | /** 770 | * 771 | */ 772 | public static class Fees extends Object { 773 | public long inFwdFee; 774 | public long storageFee; 775 | public long gasFee; 776 | public long fwdFee; 777 | 778 | /** 779 | * 780 | */ 781 | public Fees() { 782 | } 783 | 784 | public Fees(long inFwdFee, long storageFee, long gasFee, long fwdFee) { 785 | this.inFwdFee = inFwdFee; 786 | this.storageFee = storageFee; 787 | this.gasFee = gasFee; 788 | this.fwdFee = fwdFee; 789 | } 790 | 791 | /** 792 | * Identifier uniquely determining type of the object. 793 | */ 794 | public static final int CONSTRUCTOR = 1676273340; 795 | 796 | /** 797 | * @return this.CONSTRUCTOR 798 | */ 799 | @Override 800 | public int getConstructor() { 801 | return CONSTRUCTOR; 802 | } 803 | } 804 | 805 | /** 806 | * 807 | */ 808 | public static class FullAccountState extends Object { 809 | public AccountAddress address; 810 | public long balance; 811 | public InternalTransactionId lastTransactionId; 812 | public TonBlockIdExt blockId; 813 | public long syncUtime; 814 | public AccountState accountState; 815 | public int revision; 816 | 817 | /** 818 | * 819 | */ 820 | public FullAccountState() { 821 | } 822 | 823 | public FullAccountState(AccountAddress address, long balance, InternalTransactionId lastTransactionId, TonBlockIdExt blockId, long syncUtime, AccountState accountState, int revision) { 824 | this.address = address; 825 | this.balance = balance; 826 | this.lastTransactionId = lastTransactionId; 827 | this.blockId = blockId; 828 | this.syncUtime = syncUtime; 829 | this.accountState = accountState; 830 | this.revision = revision; 831 | } 832 | 833 | /** 834 | * Identifier uniquely determining type of the object. 835 | */ 836 | public static final int CONSTRUCTOR = 1456618057; 837 | 838 | /** 839 | * @return this.CONSTRUCTOR 840 | */ 841 | @Override 842 | public int getConstructor() { 843 | return CONSTRUCTOR; 844 | } 845 | } 846 | 847 | public abstract static class InitialAccountState extends Object { 848 | } 849 | 850 | public static class RawInitialAccountState extends InitialAccountState { 851 | public byte[] code; 852 | public byte[] data; 853 | 854 | /** 855 | * 856 | */ 857 | public RawInitialAccountState() { 858 | } 859 | 860 | public RawInitialAccountState(byte[] code, byte[] data) { 861 | this.code = code; 862 | this.data = data; 863 | } 864 | 865 | /** 866 | * Identifier uniquely determining type of the object. 867 | */ 868 | public static final int CONSTRUCTOR = -337945529; 869 | 870 | /** 871 | * @return this.CONSTRUCTOR 872 | */ 873 | @Override 874 | public int getConstructor() { 875 | return CONSTRUCTOR; 876 | } 877 | } 878 | 879 | public static class WalletV3InitialAccountState extends InitialAccountState { 880 | public String publicKey; 881 | public long walletId; 882 | 883 | /** 884 | * 885 | */ 886 | public WalletV3InitialAccountState() { 887 | } 888 | 889 | public WalletV3InitialAccountState(String publicKey, long walletId) { 890 | this.publicKey = publicKey; 891 | this.walletId = walletId; 892 | } 893 | 894 | /** 895 | * Identifier uniquely determining type of the object. 896 | */ 897 | public static final int CONSTRUCTOR = -118074048; 898 | 899 | /** 900 | * @return this.CONSTRUCTOR 901 | */ 902 | @Override 903 | public int getConstructor() { 904 | return CONSTRUCTOR; 905 | } 906 | } 907 | 908 | public static class WalletHighloadV1InitialAccountState extends InitialAccountState { 909 | public String publicKey; 910 | public long walletId; 911 | 912 | /** 913 | * 914 | */ 915 | public WalletHighloadV1InitialAccountState() { 916 | } 917 | 918 | public WalletHighloadV1InitialAccountState(String publicKey, long walletId) { 919 | this.publicKey = publicKey; 920 | this.walletId = walletId; 921 | } 922 | 923 | /** 924 | * Identifier uniquely determining type of the object. 925 | */ 926 | public static final int CONSTRUCTOR = -327901626; 927 | 928 | /** 929 | * @return this.CONSTRUCTOR 930 | */ 931 | @Override 932 | public int getConstructor() { 933 | return CONSTRUCTOR; 934 | } 935 | } 936 | 937 | public static class WalletHighloadV2InitialAccountState extends InitialAccountState { 938 | public String publicKey; 939 | public long walletId; 940 | 941 | /** 942 | * 943 | */ 944 | public WalletHighloadV2InitialAccountState() { 945 | } 946 | 947 | public WalletHighloadV2InitialAccountState(String publicKey, long walletId) { 948 | this.publicKey = publicKey; 949 | this.walletId = walletId; 950 | } 951 | 952 | /** 953 | * Identifier uniquely determining type of the object. 954 | */ 955 | public static final int CONSTRUCTOR = 1966373161; 956 | 957 | /** 958 | * @return this.CONSTRUCTOR 959 | */ 960 | @Override 961 | public int getConstructor() { 962 | return CONSTRUCTOR; 963 | } 964 | } 965 | 966 | public static class RwalletInitialAccountState extends InitialAccountState { 967 | public String initPublicKey; 968 | public String publicKey; 969 | public long walletId; 970 | 971 | /** 972 | * 973 | */ 974 | public RwalletInitialAccountState() { 975 | } 976 | 977 | public RwalletInitialAccountState(String initPublicKey, String publicKey, long walletId) { 978 | this.initPublicKey = initPublicKey; 979 | this.publicKey = publicKey; 980 | this.walletId = walletId; 981 | } 982 | 983 | /** 984 | * Identifier uniquely determining type of the object. 985 | */ 986 | public static final int CONSTRUCTOR = 1169755156; 987 | 988 | /** 989 | * @return this.CONSTRUCTOR 990 | */ 991 | @Override 992 | public int getConstructor() { 993 | return CONSTRUCTOR; 994 | } 995 | } 996 | 997 | public static class DnsInitialAccountState extends InitialAccountState { 998 | public String publicKey; 999 | public long walletId; 1000 | 1001 | /** 1002 | * 1003 | */ 1004 | public DnsInitialAccountState() { 1005 | } 1006 | 1007 | public DnsInitialAccountState(String publicKey, long walletId) { 1008 | this.publicKey = publicKey; 1009 | this.walletId = walletId; 1010 | } 1011 | 1012 | /** 1013 | * Identifier uniquely determining type of the object. 1014 | */ 1015 | public static final int CONSTRUCTOR = 1842062527; 1016 | 1017 | /** 1018 | * @return this.CONSTRUCTOR 1019 | */ 1020 | @Override 1021 | public int getConstructor() { 1022 | return CONSTRUCTOR; 1023 | } 1024 | } 1025 | 1026 | public static class PchanInitialAccountState extends InitialAccountState { 1027 | public PchanConfig config; 1028 | 1029 | /** 1030 | * 1031 | */ 1032 | public PchanInitialAccountState() { 1033 | } 1034 | 1035 | public PchanInitialAccountState(PchanConfig config) { 1036 | this.config = config; 1037 | } 1038 | 1039 | /** 1040 | * Identifier uniquely determining type of the object. 1041 | */ 1042 | public static final int CONSTRUCTOR = -1304552124; 1043 | 1044 | /** 1045 | * @return this.CONSTRUCTOR 1046 | */ 1047 | @Override 1048 | public int getConstructor() { 1049 | return CONSTRUCTOR; 1050 | } 1051 | } 1052 | 1053 | public abstract static class InputKey extends Object { 1054 | } 1055 | 1056 | public static class InputKeyRegular extends InputKey { 1057 | public Key key; 1058 | public byte[] localPassword; 1059 | 1060 | /** 1061 | * 1062 | */ 1063 | public InputKeyRegular() { 1064 | } 1065 | 1066 | public InputKeyRegular(Key key, byte[] localPassword) { 1067 | this.key = key; 1068 | this.localPassword = localPassword; 1069 | } 1070 | 1071 | /** 1072 | * Identifier uniquely determining type of the object. 1073 | */ 1074 | public static final int CONSTRUCTOR = -555399522; 1075 | 1076 | /** 1077 | * @return this.CONSTRUCTOR 1078 | */ 1079 | @Override 1080 | public int getConstructor() { 1081 | return CONSTRUCTOR; 1082 | } 1083 | } 1084 | 1085 | public static class InputKeyFake extends InputKey { 1086 | 1087 | /** 1088 | * 1089 | */ 1090 | public InputKeyFake() { 1091 | } 1092 | 1093 | /** 1094 | * Identifier uniquely determining type of the object. 1095 | */ 1096 | public static final int CONSTRUCTOR = -1074054722; 1097 | 1098 | /** 1099 | * @return this.CONSTRUCTOR 1100 | */ 1101 | @Override 1102 | public int getConstructor() { 1103 | return CONSTRUCTOR; 1104 | } 1105 | } 1106 | 1107 | /** 1108 | * 1109 | */ 1110 | public static class Key extends Object { 1111 | public String publicKey; 1112 | public byte[] secret; 1113 | 1114 | /** 1115 | * 1116 | */ 1117 | public Key() { 1118 | } 1119 | 1120 | public Key(String publicKey, byte[] secret) { 1121 | this.publicKey = publicKey; 1122 | this.secret = secret; 1123 | } 1124 | 1125 | /** 1126 | * Identifier uniquely determining type of the object. 1127 | */ 1128 | public static final int CONSTRUCTOR = -1978362923; 1129 | 1130 | /** 1131 | * @return this.CONSTRUCTOR 1132 | */ 1133 | @Override 1134 | public int getConstructor() { 1135 | return CONSTRUCTOR; 1136 | } 1137 | } 1138 | 1139 | public abstract static class KeyStoreType extends Object { 1140 | } 1141 | 1142 | public static class KeyStoreTypeDirectory extends KeyStoreType { 1143 | public String directory; 1144 | 1145 | /** 1146 | * 1147 | */ 1148 | public KeyStoreTypeDirectory() { 1149 | } 1150 | 1151 | public KeyStoreTypeDirectory(String directory) { 1152 | this.directory = directory; 1153 | } 1154 | 1155 | /** 1156 | * Identifier uniquely determining type of the object. 1157 | */ 1158 | public static final int CONSTRUCTOR = -378990038; 1159 | 1160 | /** 1161 | * @return this.CONSTRUCTOR 1162 | */ 1163 | @Override 1164 | public int getConstructor() { 1165 | return CONSTRUCTOR; 1166 | } 1167 | } 1168 | 1169 | public static class KeyStoreTypeInMemory extends KeyStoreType { 1170 | 1171 | /** 1172 | * 1173 | */ 1174 | public KeyStoreTypeInMemory() { 1175 | } 1176 | 1177 | /** 1178 | * Identifier uniquely determining type of the object. 1179 | */ 1180 | public static final int CONSTRUCTOR = -2106848825; 1181 | 1182 | /** 1183 | * @return this.CONSTRUCTOR 1184 | */ 1185 | @Override 1186 | public int getConstructor() { 1187 | return CONSTRUCTOR; 1188 | } 1189 | } 1190 | 1191 | /** 1192 | * This class is an abstract base class. 1193 | * Describes a stream to which tonlib internal log is written. 1194 | */ 1195 | public abstract static class LogStream extends Object { 1196 | } 1197 | 1198 | /** 1199 | * The log is written to stderr or an OS specific log. 1200 | */ 1201 | public static class LogStreamDefault extends LogStream { 1202 | 1203 | /** 1204 | * The log is written to stderr or an OS specific log. 1205 | */ 1206 | public LogStreamDefault() { 1207 | } 1208 | 1209 | /** 1210 | * Identifier uniquely determining type of the object. 1211 | */ 1212 | public static final int CONSTRUCTOR = 1390581436; 1213 | 1214 | /** 1215 | * @return this.CONSTRUCTOR 1216 | */ 1217 | @Override 1218 | public int getConstructor() { 1219 | return CONSTRUCTOR; 1220 | } 1221 | } 1222 | 1223 | /** 1224 | * The log is written to a file. 1225 | */ 1226 | public static class LogStreamFile extends LogStream { 1227 | /** 1228 | * Path to the file to where the internal tonlib log will be written. 1229 | */ 1230 | public String path; 1231 | /** 1232 | * Maximum size of the file to where the internal tonlib log is written before the file will be auto-rotated. 1233 | */ 1234 | public long maxFileSize; 1235 | 1236 | /** 1237 | * The log is written to a file. 1238 | */ 1239 | public LogStreamFile() { 1240 | } 1241 | 1242 | /** 1243 | * The log is written to a file. 1244 | * 1245 | * @param path Path to the file to where the internal tonlib log will be written. 1246 | * @param maxFileSize Maximum size of the file to where the internal tonlib log is written before the file will be auto-rotated. 1247 | */ 1248 | public LogStreamFile(String path, long maxFileSize) { 1249 | this.path = path; 1250 | this.maxFileSize = maxFileSize; 1251 | } 1252 | 1253 | /** 1254 | * Identifier uniquely determining type of the object. 1255 | */ 1256 | public static final int CONSTRUCTOR = -1880085930; 1257 | 1258 | /** 1259 | * @return this.CONSTRUCTOR 1260 | */ 1261 | @Override 1262 | public int getConstructor() { 1263 | return CONSTRUCTOR; 1264 | } 1265 | } 1266 | 1267 | /** 1268 | * The log is written nowhere. 1269 | */ 1270 | public static class LogStreamEmpty extends LogStream { 1271 | 1272 | /** 1273 | * The log is written nowhere. 1274 | */ 1275 | public LogStreamEmpty() { 1276 | } 1277 | 1278 | /** 1279 | * Identifier uniquely determining type of the object. 1280 | */ 1281 | public static final int CONSTRUCTOR = -499912244; 1282 | 1283 | /** 1284 | * @return this.CONSTRUCTOR 1285 | */ 1286 | @Override 1287 | public int getConstructor() { 1288 | return CONSTRUCTOR; 1289 | } 1290 | } 1291 | 1292 | /** 1293 | * Contains a list of available tonlib internal log tags. 1294 | */ 1295 | public static class LogTags extends Object { 1296 | /** 1297 | * List of log tags. 1298 | */ 1299 | public String[] tags; 1300 | 1301 | /** 1302 | * Contains a list of available tonlib internal log tags. 1303 | */ 1304 | public LogTags() { 1305 | } 1306 | 1307 | /** 1308 | * Contains a list of available tonlib internal log tags. 1309 | * 1310 | * @param tags List of log tags. 1311 | */ 1312 | public LogTags(String[] tags) { 1313 | this.tags = tags; 1314 | } 1315 | 1316 | /** 1317 | * Identifier uniquely determining type of the object. 1318 | */ 1319 | public static final int CONSTRUCTOR = -1604930601; 1320 | 1321 | /** 1322 | * @return this.CONSTRUCTOR 1323 | */ 1324 | @Override 1325 | public int getConstructor() { 1326 | return CONSTRUCTOR; 1327 | } 1328 | } 1329 | 1330 | /** 1331 | * Contains a tonlib internal log verbosity level. 1332 | */ 1333 | public static class LogVerbosityLevel extends Object { 1334 | /** 1335 | * Log verbosity level. 1336 | */ 1337 | public int verbosityLevel; 1338 | 1339 | /** 1340 | * Contains a tonlib internal log verbosity level. 1341 | */ 1342 | public LogVerbosityLevel() { 1343 | } 1344 | 1345 | /** 1346 | * Contains a tonlib internal log verbosity level. 1347 | * 1348 | * @param verbosityLevel Log verbosity level. 1349 | */ 1350 | public LogVerbosityLevel(int verbosityLevel) { 1351 | this.verbosityLevel = verbosityLevel; 1352 | } 1353 | 1354 | /** 1355 | * Identifier uniquely determining type of the object. 1356 | */ 1357 | public static final int CONSTRUCTOR = 1734624234; 1358 | 1359 | /** 1360 | * @return this.CONSTRUCTOR 1361 | */ 1362 | @Override 1363 | public int getConstructor() { 1364 | return CONSTRUCTOR; 1365 | } 1366 | } 1367 | 1368 | /** 1369 | * 1370 | */ 1371 | public static class Ok extends Object { 1372 | 1373 | /** 1374 | * 1375 | */ 1376 | public Ok() { 1377 | } 1378 | 1379 | /** 1380 | * Identifier uniquely determining type of the object. 1381 | */ 1382 | public static final int CONSTRUCTOR = -722616727; 1383 | 1384 | /** 1385 | * @return this.CONSTRUCTOR 1386 | */ 1387 | @Override 1388 | public int getConstructor() { 1389 | return CONSTRUCTOR; 1390 | } 1391 | } 1392 | 1393 | /** 1394 | * 1395 | */ 1396 | public static class Options extends Object { 1397 | public Config config; 1398 | public KeyStoreType keystoreType; 1399 | 1400 | /** 1401 | * 1402 | */ 1403 | public Options() { 1404 | } 1405 | 1406 | public Options(Config config, KeyStoreType keystoreType) { 1407 | this.config = config; 1408 | this.keystoreType = keystoreType; 1409 | } 1410 | 1411 | /** 1412 | * Identifier uniquely determining type of the object. 1413 | */ 1414 | public static final int CONSTRUCTOR = -1924388359; 1415 | 1416 | /** 1417 | * @return this.CONSTRUCTOR 1418 | */ 1419 | @Override 1420 | public int getConstructor() { 1421 | return CONSTRUCTOR; 1422 | } 1423 | } 1424 | 1425 | public abstract static class SyncState extends Object { 1426 | } 1427 | 1428 | public static class SyncStateDone extends SyncState { 1429 | 1430 | /** 1431 | * 1432 | */ 1433 | public SyncStateDone() { 1434 | } 1435 | 1436 | /** 1437 | * Identifier uniquely determining type of the object. 1438 | */ 1439 | public static final int CONSTRUCTOR = 1408448777; 1440 | 1441 | /** 1442 | * @return this.CONSTRUCTOR 1443 | */ 1444 | @Override 1445 | public int getConstructor() { 1446 | return CONSTRUCTOR; 1447 | } 1448 | } 1449 | 1450 | public static class SyncStateInProgress extends SyncState { 1451 | public int fromSeqno; 1452 | public int toSeqno; 1453 | public int currentSeqno; 1454 | 1455 | /** 1456 | * 1457 | */ 1458 | public SyncStateInProgress() { 1459 | } 1460 | 1461 | public SyncStateInProgress(int fromSeqno, int toSeqno, int currentSeqno) { 1462 | this.fromSeqno = fromSeqno; 1463 | this.toSeqno = toSeqno; 1464 | this.currentSeqno = currentSeqno; 1465 | } 1466 | 1467 | /** 1468 | * Identifier uniquely determining type of the object. 1469 | */ 1470 | public static final int CONSTRUCTOR = 107726023; 1471 | 1472 | /** 1473 | * @return this.CONSTRUCTOR 1474 | */ 1475 | @Override 1476 | public int getConstructor() { 1477 | return CONSTRUCTOR; 1478 | } 1479 | } 1480 | 1481 | /** 1482 | * 1483 | */ 1484 | public static class UnpackedAccountAddress extends Object { 1485 | public int workchainId; 1486 | public boolean bounceable; 1487 | public boolean testnet; 1488 | public byte[] addr; 1489 | 1490 | /** 1491 | * 1492 | */ 1493 | public UnpackedAccountAddress() { 1494 | } 1495 | 1496 | public UnpackedAccountAddress(int workchainId, boolean bounceable, boolean testnet, byte[] addr) { 1497 | this.workchainId = workchainId; 1498 | this.bounceable = bounceable; 1499 | this.testnet = testnet; 1500 | this.addr = addr; 1501 | } 1502 | 1503 | /** 1504 | * Identifier uniquely determining type of the object. 1505 | */ 1506 | public static final int CONSTRUCTOR = 1892946998; 1507 | 1508 | /** 1509 | * @return this.CONSTRUCTOR 1510 | */ 1511 | @Override 1512 | public int getConstructor() { 1513 | return CONSTRUCTOR; 1514 | } 1515 | } 1516 | 1517 | public abstract static class Update extends Object { 1518 | } 1519 | 1520 | public static class UpdateSendLiteServerQuery extends Update { 1521 | public long id; 1522 | public byte[] data; 1523 | 1524 | /** 1525 | * 1526 | */ 1527 | public UpdateSendLiteServerQuery() { 1528 | } 1529 | 1530 | public UpdateSendLiteServerQuery(long id, byte[] data) { 1531 | this.id = id; 1532 | this.data = data; 1533 | } 1534 | 1535 | /** 1536 | * Identifier uniquely determining type of the object. 1537 | */ 1538 | public static final int CONSTRUCTOR = -1555130916; 1539 | 1540 | /** 1541 | * @return this.CONSTRUCTOR 1542 | */ 1543 | @Override 1544 | public int getConstructor() { 1545 | return CONSTRUCTOR; 1546 | } 1547 | } 1548 | 1549 | public static class UpdateSyncState extends Update { 1550 | public SyncState syncState; 1551 | 1552 | /** 1553 | * 1554 | */ 1555 | public UpdateSyncState() { 1556 | } 1557 | 1558 | public UpdateSyncState(SyncState syncState) { 1559 | this.syncState = syncState; 1560 | } 1561 | 1562 | /** 1563 | * Identifier uniquely determining type of the object. 1564 | */ 1565 | public static final int CONSTRUCTOR = 1204298718; 1566 | 1567 | /** 1568 | * @return this.CONSTRUCTOR 1569 | */ 1570 | @Override 1571 | public int getConstructor() { 1572 | return CONSTRUCTOR; 1573 | } 1574 | } 1575 | 1576 | public abstract static class DnsAction extends Object { 1577 | } 1578 | 1579 | public static class DnsActionDeleteAll extends DnsAction { 1580 | 1581 | /** 1582 | * 1583 | */ 1584 | public DnsActionDeleteAll() { 1585 | } 1586 | 1587 | /** 1588 | * Identifier uniquely determining type of the object. 1589 | */ 1590 | public static final int CONSTRUCTOR = 1067356318; 1591 | 1592 | /** 1593 | * @return this.CONSTRUCTOR 1594 | */ 1595 | @Override 1596 | public int getConstructor() { 1597 | return CONSTRUCTOR; 1598 | } 1599 | } 1600 | 1601 | public static class DnsActionDelete extends DnsAction { 1602 | public String name; 1603 | public int category; 1604 | 1605 | /** 1606 | * 1607 | */ 1608 | public DnsActionDelete() { 1609 | } 1610 | 1611 | public DnsActionDelete(String name, int category) { 1612 | this.name = name; 1613 | this.category = category; 1614 | } 1615 | 1616 | /** 1617 | * Identifier uniquely determining type of the object. 1618 | */ 1619 | public static final int CONSTRUCTOR = 775206882; 1620 | 1621 | /** 1622 | * @return this.CONSTRUCTOR 1623 | */ 1624 | @Override 1625 | public int getConstructor() { 1626 | return CONSTRUCTOR; 1627 | } 1628 | } 1629 | 1630 | public static class DnsActionSet extends DnsAction { 1631 | public DnsEntry entry; 1632 | 1633 | /** 1634 | * 1635 | */ 1636 | public DnsActionSet() { 1637 | } 1638 | 1639 | public DnsActionSet(DnsEntry entry) { 1640 | this.entry = entry; 1641 | } 1642 | 1643 | /** 1644 | * Identifier uniquely determining type of the object. 1645 | */ 1646 | public static final int CONSTRUCTOR = -1374965309; 1647 | 1648 | /** 1649 | * @return this.CONSTRUCTOR 1650 | */ 1651 | @Override 1652 | public int getConstructor() { 1653 | return CONSTRUCTOR; 1654 | } 1655 | } 1656 | 1657 | /** 1658 | * 1659 | */ 1660 | public static class DnsEntry extends Object { 1661 | public String name; 1662 | public int category; 1663 | public DnsEntryData entry; 1664 | 1665 | /** 1666 | * 1667 | */ 1668 | public DnsEntry() { 1669 | } 1670 | 1671 | public DnsEntry(String name, int category, DnsEntryData entry) { 1672 | this.name = name; 1673 | this.category = category; 1674 | this.entry = entry; 1675 | } 1676 | 1677 | /** 1678 | * Identifier uniquely determining type of the object. 1679 | */ 1680 | public static final int CONSTRUCTOR = -1842435400; 1681 | 1682 | /** 1683 | * @return this.CONSTRUCTOR 1684 | */ 1685 | @Override 1686 | public int getConstructor() { 1687 | return CONSTRUCTOR; 1688 | } 1689 | } 1690 | 1691 | public abstract static class DnsEntryData extends Object { 1692 | } 1693 | 1694 | public static class DnsEntryDataUnknown extends DnsEntryData { 1695 | public byte[] bytes; 1696 | 1697 | /** 1698 | * 1699 | */ 1700 | public DnsEntryDataUnknown() { 1701 | } 1702 | 1703 | public DnsEntryDataUnknown(byte[] bytes) { 1704 | this.bytes = bytes; 1705 | } 1706 | 1707 | /** 1708 | * Identifier uniquely determining type of the object. 1709 | */ 1710 | public static final int CONSTRUCTOR = -1285893248; 1711 | 1712 | /** 1713 | * @return this.CONSTRUCTOR 1714 | */ 1715 | @Override 1716 | public int getConstructor() { 1717 | return CONSTRUCTOR; 1718 | } 1719 | } 1720 | 1721 | public static class DnsEntryDataText extends DnsEntryData { 1722 | public String text; 1723 | 1724 | /** 1725 | * 1726 | */ 1727 | public DnsEntryDataText() { 1728 | } 1729 | 1730 | public DnsEntryDataText(String text) { 1731 | this.text = text; 1732 | } 1733 | 1734 | /** 1735 | * Identifier uniquely determining type of the object. 1736 | */ 1737 | public static final int CONSTRUCTOR = -792485614; 1738 | 1739 | /** 1740 | * @return this.CONSTRUCTOR 1741 | */ 1742 | @Override 1743 | public int getConstructor() { 1744 | return CONSTRUCTOR; 1745 | } 1746 | } 1747 | 1748 | public static class DnsEntryDataNextResolver extends DnsEntryData { 1749 | public AccountAddress resolver; 1750 | 1751 | /** 1752 | * 1753 | */ 1754 | public DnsEntryDataNextResolver() { 1755 | } 1756 | 1757 | public DnsEntryDataNextResolver(AccountAddress resolver) { 1758 | this.resolver = resolver; 1759 | } 1760 | 1761 | /** 1762 | * Identifier uniquely determining type of the object. 1763 | */ 1764 | public static final int CONSTRUCTOR = 330382792; 1765 | 1766 | /** 1767 | * @return this.CONSTRUCTOR 1768 | */ 1769 | @Override 1770 | public int getConstructor() { 1771 | return CONSTRUCTOR; 1772 | } 1773 | } 1774 | 1775 | public static class DnsEntryDataSmcAddress extends DnsEntryData { 1776 | public AccountAddress smcAddress; 1777 | 1778 | /** 1779 | * 1780 | */ 1781 | public DnsEntryDataSmcAddress() { 1782 | } 1783 | 1784 | public DnsEntryDataSmcAddress(AccountAddress smcAddress) { 1785 | this.smcAddress = smcAddress; 1786 | } 1787 | 1788 | /** 1789 | * Identifier uniquely determining type of the object. 1790 | */ 1791 | public static final int CONSTRUCTOR = -1759937982; 1792 | 1793 | /** 1794 | * @return this.CONSTRUCTOR 1795 | */ 1796 | @Override 1797 | public int getConstructor() { 1798 | return CONSTRUCTOR; 1799 | } 1800 | } 1801 | 1802 | public static class DnsEntryDataAdnlAddress extends DnsEntryData { 1803 | public AdnlAddress adnlAddress; 1804 | 1805 | /** 1806 | * 1807 | */ 1808 | public DnsEntryDataAdnlAddress() { 1809 | } 1810 | 1811 | public DnsEntryDataAdnlAddress(AdnlAddress adnlAddress) { 1812 | this.adnlAddress = adnlAddress; 1813 | } 1814 | 1815 | /** 1816 | * Identifier uniquely determining type of the object. 1817 | */ 1818 | public static final int CONSTRUCTOR = -1114064368; 1819 | 1820 | /** 1821 | * @return this.CONSTRUCTOR 1822 | */ 1823 | @Override 1824 | public int getConstructor() { 1825 | return CONSTRUCTOR; 1826 | } 1827 | } 1828 | 1829 | /** 1830 | * 1831 | */ 1832 | public static class DnsResolved extends Object { 1833 | public DnsEntry[] entries; 1834 | 1835 | /** 1836 | * 1837 | */ 1838 | public DnsResolved() { 1839 | } 1840 | 1841 | public DnsResolved(DnsEntry[] entries) { 1842 | this.entries = entries; 1843 | } 1844 | 1845 | /** 1846 | * Identifier uniquely determining type of the object. 1847 | */ 1848 | public static final int CONSTRUCTOR = 2090272150; 1849 | 1850 | /** 1851 | * @return this.CONSTRUCTOR 1852 | */ 1853 | @Override 1854 | public int getConstructor() { 1855 | return CONSTRUCTOR; 1856 | } 1857 | } 1858 | 1859 | /** 1860 | * 1861 | */ 1862 | public static class TonBlockId extends Object { 1863 | public int workchain; 1864 | public long shard; 1865 | public int seqno; 1866 | 1867 | /** 1868 | * 1869 | */ 1870 | public TonBlockId() { 1871 | } 1872 | 1873 | public TonBlockId(int workchain, long shard, int seqno) { 1874 | this.workchain = workchain; 1875 | this.shard = shard; 1876 | this.seqno = seqno; 1877 | } 1878 | 1879 | /** 1880 | * Identifier uniquely determining type of the object. 1881 | */ 1882 | public static final int CONSTRUCTOR = -1185382494; 1883 | 1884 | /** 1885 | * @return this.CONSTRUCTOR 1886 | */ 1887 | @Override 1888 | public int getConstructor() { 1889 | return CONSTRUCTOR; 1890 | } 1891 | } 1892 | 1893 | /** 1894 | * 1895 | */ 1896 | public static class InternalTransactionId extends Object { 1897 | public long lt; 1898 | public byte[] hash; 1899 | 1900 | /** 1901 | * 1902 | */ 1903 | public InternalTransactionId() { 1904 | } 1905 | 1906 | public InternalTransactionId(long lt, byte[] hash) { 1907 | this.lt = lt; 1908 | this.hash = hash; 1909 | } 1910 | 1911 | /** 1912 | * Identifier uniquely determining type of the object. 1913 | */ 1914 | public static final int CONSTRUCTOR = -989527262; 1915 | 1916 | /** 1917 | * @return this.CONSTRUCTOR 1918 | */ 1919 | @Override 1920 | public int getConstructor() { 1921 | return CONSTRUCTOR; 1922 | } 1923 | } 1924 | 1925 | /** 1926 | * 1927 | */ 1928 | public static class LiteServerInfo extends Object { 1929 | public long now; 1930 | public int version; 1931 | public long capabilities; 1932 | 1933 | /** 1934 | * 1935 | */ 1936 | public LiteServerInfo() { 1937 | } 1938 | 1939 | public LiteServerInfo(long now, int version, long capabilities) { 1940 | this.now = now; 1941 | this.version = version; 1942 | this.capabilities = capabilities; 1943 | } 1944 | 1945 | /** 1946 | * Identifier uniquely determining type of the object. 1947 | */ 1948 | public static final int CONSTRUCTOR = -1250165133; 1949 | 1950 | /** 1951 | * @return this.CONSTRUCTOR 1952 | */ 1953 | @Override 1954 | public int getConstructor() { 1955 | return CONSTRUCTOR; 1956 | } 1957 | } 1958 | 1959 | public abstract static class MsgData extends Object { 1960 | } 1961 | 1962 | public static class MsgDataRaw extends MsgData { 1963 | public byte[] body; 1964 | public byte[] initState; 1965 | 1966 | /** 1967 | * 1968 | */ 1969 | public MsgDataRaw() { 1970 | } 1971 | 1972 | public MsgDataRaw(byte[] body, byte[] initState) { 1973 | this.body = body; 1974 | this.initState = initState; 1975 | } 1976 | 1977 | /** 1978 | * Identifier uniquely determining type of the object. 1979 | */ 1980 | public static final int CONSTRUCTOR = -1928962698; 1981 | 1982 | /** 1983 | * @return this.CONSTRUCTOR 1984 | */ 1985 | @Override 1986 | public int getConstructor() { 1987 | return CONSTRUCTOR; 1988 | } 1989 | } 1990 | 1991 | public static class MsgDataText extends MsgData { 1992 | public byte[] text; 1993 | 1994 | /** 1995 | * 1996 | */ 1997 | public MsgDataText() { 1998 | } 1999 | 2000 | public MsgDataText(byte[] text) { 2001 | this.text = text; 2002 | } 2003 | 2004 | /** 2005 | * Identifier uniquely determining type of the object. 2006 | */ 2007 | public static final int CONSTRUCTOR = -341560688; 2008 | 2009 | /** 2010 | * @return this.CONSTRUCTOR 2011 | */ 2012 | @Override 2013 | public int getConstructor() { 2014 | return CONSTRUCTOR; 2015 | } 2016 | } 2017 | 2018 | public static class MsgDataDecryptedText extends MsgData { 2019 | public byte[] text; 2020 | 2021 | /** 2022 | * 2023 | */ 2024 | public MsgDataDecryptedText() { 2025 | } 2026 | 2027 | public MsgDataDecryptedText(byte[] text) { 2028 | this.text = text; 2029 | } 2030 | 2031 | /** 2032 | * Identifier uniquely determining type of the object. 2033 | */ 2034 | public static final int CONSTRUCTOR = -1289133895; 2035 | 2036 | /** 2037 | * @return this.CONSTRUCTOR 2038 | */ 2039 | @Override 2040 | public int getConstructor() { 2041 | return CONSTRUCTOR; 2042 | } 2043 | } 2044 | 2045 | public static class MsgDataEncryptedText extends MsgData { 2046 | public byte[] text; 2047 | 2048 | /** 2049 | * 2050 | */ 2051 | public MsgDataEncryptedText() { 2052 | } 2053 | 2054 | public MsgDataEncryptedText(byte[] text) { 2055 | this.text = text; 2056 | } 2057 | 2058 | /** 2059 | * Identifier uniquely determining type of the object. 2060 | */ 2061 | public static final int CONSTRUCTOR = -296612902; 2062 | 2063 | /** 2064 | * @return this.CONSTRUCTOR 2065 | */ 2066 | @Override 2067 | public int getConstructor() { 2068 | return CONSTRUCTOR; 2069 | } 2070 | } 2071 | 2072 | /** 2073 | * 2074 | */ 2075 | public static class MsgDataDecrypted extends Object { 2076 | public byte[] proof; 2077 | public MsgData data; 2078 | 2079 | /** 2080 | * 2081 | */ 2082 | public MsgDataDecrypted() { 2083 | } 2084 | 2085 | public MsgDataDecrypted(byte[] proof, MsgData data) { 2086 | this.proof = proof; 2087 | this.data = data; 2088 | } 2089 | 2090 | /** 2091 | * Identifier uniquely determining type of the object. 2092 | */ 2093 | public static final int CONSTRUCTOR = 195649769; 2094 | 2095 | /** 2096 | * @return this.CONSTRUCTOR 2097 | */ 2098 | @Override 2099 | public int getConstructor() { 2100 | return CONSTRUCTOR; 2101 | } 2102 | } 2103 | 2104 | /** 2105 | * 2106 | */ 2107 | public static class MsgDataDecryptedArray extends Object { 2108 | public MsgDataDecrypted[] elements; 2109 | 2110 | /** 2111 | * 2112 | */ 2113 | public MsgDataDecryptedArray() { 2114 | } 2115 | 2116 | public MsgDataDecryptedArray(MsgDataDecrypted[] elements) { 2117 | this.elements = elements; 2118 | } 2119 | 2120 | /** 2121 | * Identifier uniquely determining type of the object. 2122 | */ 2123 | public static final int CONSTRUCTOR = -480491767; 2124 | 2125 | /** 2126 | * @return this.CONSTRUCTOR 2127 | */ 2128 | @Override 2129 | public int getConstructor() { 2130 | return CONSTRUCTOR; 2131 | } 2132 | } 2133 | 2134 | /** 2135 | * 2136 | */ 2137 | public static class MsgDataEncrypted extends Object { 2138 | public AccountAddress source; 2139 | public MsgData data; 2140 | 2141 | /** 2142 | * 2143 | */ 2144 | public MsgDataEncrypted() { 2145 | } 2146 | 2147 | public MsgDataEncrypted(AccountAddress source, MsgData data) { 2148 | this.source = source; 2149 | this.data = data; 2150 | } 2151 | 2152 | /** 2153 | * Identifier uniquely determining type of the object. 2154 | */ 2155 | public static final int CONSTRUCTOR = 564215121; 2156 | 2157 | /** 2158 | * @return this.CONSTRUCTOR 2159 | */ 2160 | @Override 2161 | public int getConstructor() { 2162 | return CONSTRUCTOR; 2163 | } 2164 | } 2165 | 2166 | /** 2167 | * 2168 | */ 2169 | public static class MsgDataEncryptedArray extends Object { 2170 | public MsgDataEncrypted[] elements; 2171 | 2172 | /** 2173 | * 2174 | */ 2175 | public MsgDataEncryptedArray() { 2176 | } 2177 | 2178 | public MsgDataEncryptedArray(MsgDataEncrypted[] elements) { 2179 | this.elements = elements; 2180 | } 2181 | 2182 | /** 2183 | * Identifier uniquely determining type of the object. 2184 | */ 2185 | public static final int CONSTRUCTOR = 608655794; 2186 | 2187 | /** 2188 | * @return this.CONSTRUCTOR 2189 | */ 2190 | @Override 2191 | public int getConstructor() { 2192 | return CONSTRUCTOR; 2193 | } 2194 | } 2195 | 2196 | /** 2197 | * 2198 | */ 2199 | public static class MsgMessage extends Object { 2200 | public AccountAddress destination; 2201 | public String publicKey; 2202 | public long amount; 2203 | public MsgData data; 2204 | 2205 | /** 2206 | * 2207 | */ 2208 | public MsgMessage() { 2209 | } 2210 | 2211 | public MsgMessage(AccountAddress destination, String publicKey, long amount, MsgData data) { 2212 | this.destination = destination; 2213 | this.publicKey = publicKey; 2214 | this.amount = amount; 2215 | this.data = data; 2216 | } 2217 | 2218 | /** 2219 | * Identifier uniquely determining type of the object. 2220 | */ 2221 | public static final int CONSTRUCTOR = -2110533580; 2222 | 2223 | /** 2224 | * @return this.CONSTRUCTOR 2225 | */ 2226 | @Override 2227 | public int getConstructor() { 2228 | return CONSTRUCTOR; 2229 | } 2230 | } 2231 | 2232 | /** 2233 | * 2234 | */ 2235 | public static class OptionsConfigInfo extends Object { 2236 | public long defaultWalletId; 2237 | public String defaultRwalletInitPublicKey; 2238 | 2239 | /** 2240 | * 2241 | */ 2242 | public OptionsConfigInfo() { 2243 | } 2244 | 2245 | public OptionsConfigInfo(long defaultWalletId, String defaultRwalletInitPublicKey) { 2246 | this.defaultWalletId = defaultWalletId; 2247 | this.defaultRwalletInitPublicKey = defaultRwalletInitPublicKey; 2248 | } 2249 | 2250 | /** 2251 | * Identifier uniquely determining type of the object. 2252 | */ 2253 | public static final int CONSTRUCTOR = 129457942; 2254 | 2255 | /** 2256 | * @return this.CONSTRUCTOR 2257 | */ 2258 | @Override 2259 | public int getConstructor() { 2260 | return CONSTRUCTOR; 2261 | } 2262 | } 2263 | 2264 | /** 2265 | * 2266 | */ 2267 | public static class OptionsInfo extends Object { 2268 | public OptionsConfigInfo configInfo; 2269 | 2270 | /** 2271 | * 2272 | */ 2273 | public OptionsInfo() { 2274 | } 2275 | 2276 | public OptionsInfo(OptionsConfigInfo configInfo) { 2277 | this.configInfo = configInfo; 2278 | } 2279 | 2280 | /** 2281 | * Identifier uniquely determining type of the object. 2282 | */ 2283 | public static final int CONSTRUCTOR = -64676736; 2284 | 2285 | /** 2286 | * @return this.CONSTRUCTOR 2287 | */ 2288 | @Override 2289 | public int getConstructor() { 2290 | return CONSTRUCTOR; 2291 | } 2292 | } 2293 | 2294 | public abstract static class PchanAction extends Object { 2295 | } 2296 | 2297 | public static class PchanActionInit extends PchanAction { 2298 | public long incA; 2299 | public long incB; 2300 | public long minA; 2301 | public long minB; 2302 | 2303 | /** 2304 | * 2305 | */ 2306 | public PchanActionInit() { 2307 | } 2308 | 2309 | public PchanActionInit(long incA, long incB, long minA, long minB) { 2310 | this.incA = incA; 2311 | this.incB = incB; 2312 | this.minA = minA; 2313 | this.minB = minB; 2314 | } 2315 | 2316 | /** 2317 | * Identifier uniquely determining type of the object. 2318 | */ 2319 | public static final int CONSTRUCTOR = 439088778; 2320 | 2321 | /** 2322 | * @return this.CONSTRUCTOR 2323 | */ 2324 | @Override 2325 | public int getConstructor() { 2326 | return CONSTRUCTOR; 2327 | } 2328 | } 2329 | 2330 | public static class PchanActionClose extends PchanAction { 2331 | public long extraA; 2332 | public long extraB; 2333 | public PchanPromise promise; 2334 | 2335 | /** 2336 | * 2337 | */ 2338 | public PchanActionClose() { 2339 | } 2340 | 2341 | public PchanActionClose(long extraA, long extraB, PchanPromise promise) { 2342 | this.extraA = extraA; 2343 | this.extraB = extraB; 2344 | this.promise = promise; 2345 | } 2346 | 2347 | /** 2348 | * Identifier uniquely determining type of the object. 2349 | */ 2350 | public static final int CONSTRUCTOR = 1671187222; 2351 | 2352 | /** 2353 | * @return this.CONSTRUCTOR 2354 | */ 2355 | @Override 2356 | public int getConstructor() { 2357 | return CONSTRUCTOR; 2358 | } 2359 | } 2360 | 2361 | public static class PchanActionTimeout extends PchanAction { 2362 | 2363 | /** 2364 | * 2365 | */ 2366 | public PchanActionTimeout() { 2367 | } 2368 | 2369 | /** 2370 | * Identifier uniquely determining type of the object. 2371 | */ 2372 | public static final int CONSTRUCTOR = 1998487795; 2373 | 2374 | /** 2375 | * @return this.CONSTRUCTOR 2376 | */ 2377 | @Override 2378 | public int getConstructor() { 2379 | return CONSTRUCTOR; 2380 | } 2381 | } 2382 | 2383 | /** 2384 | * 2385 | */ 2386 | public static class PchanConfig extends Object { 2387 | public String alicePublicKey; 2388 | public AccountAddress aliceAddress; 2389 | public String bobPublicKey; 2390 | public AccountAddress bobAddress; 2391 | public int initTimeout; 2392 | public int closeTimeout; 2393 | public long channelId; 2394 | 2395 | /** 2396 | * 2397 | */ 2398 | public PchanConfig() { 2399 | } 2400 | 2401 | public PchanConfig(String alicePublicKey, AccountAddress aliceAddress, String bobPublicKey, AccountAddress bobAddress, int initTimeout, int closeTimeout, long channelId) { 2402 | this.alicePublicKey = alicePublicKey; 2403 | this.aliceAddress = aliceAddress; 2404 | this.bobPublicKey = bobPublicKey; 2405 | this.bobAddress = bobAddress; 2406 | this.initTimeout = initTimeout; 2407 | this.closeTimeout = closeTimeout; 2408 | this.channelId = channelId; 2409 | } 2410 | 2411 | /** 2412 | * Identifier uniquely determining type of the object. 2413 | */ 2414 | public static final int CONSTRUCTOR = -2071530442; 2415 | 2416 | /** 2417 | * @return this.CONSTRUCTOR 2418 | */ 2419 | @Override 2420 | public int getConstructor() { 2421 | return CONSTRUCTOR; 2422 | } 2423 | } 2424 | 2425 | /** 2426 | * 2427 | */ 2428 | public static class PchanPromise extends Object { 2429 | public byte[] signature; 2430 | public long promiseA; 2431 | public long promiseB; 2432 | public long channelId; 2433 | 2434 | /** 2435 | * 2436 | */ 2437 | public PchanPromise() { 2438 | } 2439 | 2440 | public PchanPromise(byte[] signature, long promiseA, long promiseB, long channelId) { 2441 | this.signature = signature; 2442 | this.promiseA = promiseA; 2443 | this.promiseB = promiseB; 2444 | this.channelId = channelId; 2445 | } 2446 | 2447 | /** 2448 | * Identifier uniquely determining type of the object. 2449 | */ 2450 | public static final int CONSTRUCTOR = -1576102819; 2451 | 2452 | /** 2453 | * @return this.CONSTRUCTOR 2454 | */ 2455 | @Override 2456 | public int getConstructor() { 2457 | return CONSTRUCTOR; 2458 | } 2459 | } 2460 | 2461 | public abstract static class PchanState extends Object { 2462 | } 2463 | 2464 | public static class PchanStateInit extends PchanState { 2465 | public boolean signedA; 2466 | public boolean signedB; 2467 | public long minA; 2468 | public long minB; 2469 | public long expireAt; 2470 | public long A; 2471 | public long B; 2472 | 2473 | /** 2474 | * 2475 | */ 2476 | public PchanStateInit() { 2477 | } 2478 | 2479 | public PchanStateInit(boolean signedA, boolean signedB, long minA, long minB, long expireAt, long A, long B) { 2480 | this.signedA = signedA; 2481 | this.signedB = signedB; 2482 | this.minA = minA; 2483 | this.minB = minB; 2484 | this.expireAt = expireAt; 2485 | this.A = A; 2486 | this.B = B; 2487 | } 2488 | 2489 | /** 2490 | * Identifier uniquely determining type of the object. 2491 | */ 2492 | public static final int CONSTRUCTOR = -1188426504; 2493 | 2494 | /** 2495 | * @return this.CONSTRUCTOR 2496 | */ 2497 | @Override 2498 | public int getConstructor() { 2499 | return CONSTRUCTOR; 2500 | } 2501 | } 2502 | 2503 | public static class PchanStateClose extends PchanState { 2504 | public boolean signedA; 2505 | public boolean signedB; 2506 | public long minA; 2507 | public long minB; 2508 | public long expireAt; 2509 | public long A; 2510 | public long B; 2511 | 2512 | /** 2513 | * 2514 | */ 2515 | public PchanStateClose() { 2516 | } 2517 | 2518 | public PchanStateClose(boolean signedA, boolean signedB, long minA, long minB, long expireAt, long A, long B) { 2519 | this.signedA = signedA; 2520 | this.signedB = signedB; 2521 | this.minA = minA; 2522 | this.minB = minB; 2523 | this.expireAt = expireAt; 2524 | this.A = A; 2525 | this.B = B; 2526 | } 2527 | 2528 | /** 2529 | * Identifier uniquely determining type of the object. 2530 | */ 2531 | public static final int CONSTRUCTOR = 887226867; 2532 | 2533 | /** 2534 | * @return this.CONSTRUCTOR 2535 | */ 2536 | @Override 2537 | public int getConstructor() { 2538 | return CONSTRUCTOR; 2539 | } 2540 | } 2541 | 2542 | public static class PchanStatePayout extends PchanState { 2543 | public long A; 2544 | public long B; 2545 | 2546 | /** 2547 | * 2548 | */ 2549 | public PchanStatePayout() { 2550 | } 2551 | 2552 | public PchanStatePayout(long A, long B) { 2553 | this.A = A; 2554 | this.B = B; 2555 | } 2556 | 2557 | /** 2558 | * Identifier uniquely determining type of the object. 2559 | */ 2560 | public static final int CONSTRUCTOR = 664671303; 2561 | 2562 | /** 2563 | * @return this.CONSTRUCTOR 2564 | */ 2565 | @Override 2566 | public int getConstructor() { 2567 | return CONSTRUCTOR; 2568 | } 2569 | } 2570 | 2571 | /** 2572 | * 2573 | */ 2574 | public static class QueryFees extends Object { 2575 | public Fees sourceFees; 2576 | public Fees[] destinationFees; 2577 | 2578 | /** 2579 | * 2580 | */ 2581 | public QueryFees() { 2582 | } 2583 | 2584 | public QueryFees(Fees sourceFees, Fees[] destinationFees) { 2585 | this.sourceFees = sourceFees; 2586 | this.destinationFees = destinationFees; 2587 | } 2588 | 2589 | /** 2590 | * Identifier uniquely determining type of the object. 2591 | */ 2592 | public static final int CONSTRUCTOR = 1614616510; 2593 | 2594 | /** 2595 | * @return this.CONSTRUCTOR 2596 | */ 2597 | @Override 2598 | public int getConstructor() { 2599 | return CONSTRUCTOR; 2600 | } 2601 | } 2602 | 2603 | /** 2604 | * 2605 | */ 2606 | public static class QueryInfo extends Object { 2607 | public long id; 2608 | public long validUntil; 2609 | public byte[] bodyHash; 2610 | public byte[] body; 2611 | public byte[] initState; 2612 | 2613 | /** 2614 | * 2615 | */ 2616 | public QueryInfo() { 2617 | } 2618 | 2619 | public QueryInfo(long id, long validUntil, byte[] bodyHash, byte[] body, byte[] initState) { 2620 | this.id = id; 2621 | this.validUntil = validUntil; 2622 | this.bodyHash = bodyHash; 2623 | this.body = body; 2624 | this.initState = initState; 2625 | } 2626 | 2627 | /** 2628 | * Identifier uniquely determining type of the object. 2629 | */ 2630 | public static final int CONSTRUCTOR = 1451875440; 2631 | 2632 | /** 2633 | * @return this.CONSTRUCTOR 2634 | */ 2635 | @Override 2636 | public int getConstructor() { 2637 | return CONSTRUCTOR; 2638 | } 2639 | } 2640 | 2641 | /** 2642 | * 2643 | */ 2644 | public static class RawFullAccountState extends Object { 2645 | public long balance; 2646 | public byte[] code; 2647 | public byte[] data; 2648 | public InternalTransactionId lastTransactionId; 2649 | public TonBlockIdExt blockId; 2650 | public byte[] frozenHash; 2651 | public long syncUtime; 2652 | 2653 | /** 2654 | * 2655 | */ 2656 | public RawFullAccountState() { 2657 | } 2658 | 2659 | public RawFullAccountState(long balance, byte[] code, byte[] data, InternalTransactionId lastTransactionId, TonBlockIdExt blockId, byte[] frozenHash, long syncUtime) { 2660 | this.balance = balance; 2661 | this.code = code; 2662 | this.data = data; 2663 | this.lastTransactionId = lastTransactionId; 2664 | this.blockId = blockId; 2665 | this.frozenHash = frozenHash; 2666 | this.syncUtime = syncUtime; 2667 | } 2668 | 2669 | /** 2670 | * Identifier uniquely determining type of the object. 2671 | */ 2672 | public static final int CONSTRUCTOR = -1465398385; 2673 | 2674 | /** 2675 | * @return this.CONSTRUCTOR 2676 | */ 2677 | @Override 2678 | public int getConstructor() { 2679 | return CONSTRUCTOR; 2680 | } 2681 | } 2682 | 2683 | /** 2684 | * 2685 | */ 2686 | public static class RawMessage extends Object { 2687 | public AccountAddress source; 2688 | public AccountAddress destination; 2689 | public long value; 2690 | public long fwdFee; 2691 | public long ihrFee; 2692 | public long createdLt; 2693 | public byte[] bodyHash; 2694 | public MsgData msgData; 2695 | 2696 | /** 2697 | * 2698 | */ 2699 | public RawMessage() { 2700 | } 2701 | 2702 | public RawMessage(AccountAddress source, AccountAddress destination, long value, long fwdFee, long ihrFee, long createdLt, byte[] bodyHash, MsgData msgData) { 2703 | this.source = source; 2704 | this.destination = destination; 2705 | this.value = value; 2706 | this.fwdFee = fwdFee; 2707 | this.ihrFee = ihrFee; 2708 | this.createdLt = createdLt; 2709 | this.bodyHash = bodyHash; 2710 | this.msgData = msgData; 2711 | } 2712 | 2713 | /** 2714 | * Identifier uniquely determining type of the object. 2715 | */ 2716 | public static final int CONSTRUCTOR = 1368093263; 2717 | 2718 | /** 2719 | * @return this.CONSTRUCTOR 2720 | */ 2721 | @Override 2722 | public int getConstructor() { 2723 | return CONSTRUCTOR; 2724 | } 2725 | } 2726 | 2727 | /** 2728 | * 2729 | */ 2730 | public static class RawTransaction extends Object { 2731 | public long utime; 2732 | public byte[] data; 2733 | public InternalTransactionId transactionId; 2734 | public long fee; 2735 | public long storageFee; 2736 | public long otherFee; 2737 | public RawMessage inMsg; 2738 | public RawMessage[] outMsgs; 2739 | 2740 | /** 2741 | * 2742 | */ 2743 | public RawTransaction() { 2744 | } 2745 | 2746 | public RawTransaction(long utime, byte[] data, InternalTransactionId transactionId, long fee, long storageFee, long otherFee, RawMessage inMsg, RawMessage[] outMsgs) { 2747 | this.utime = utime; 2748 | this.data = data; 2749 | this.transactionId = transactionId; 2750 | this.fee = fee; 2751 | this.storageFee = storageFee; 2752 | this.otherFee = otherFee; 2753 | this.inMsg = inMsg; 2754 | this.outMsgs = outMsgs; 2755 | } 2756 | 2757 | /** 2758 | * Identifier uniquely determining type of the object. 2759 | */ 2760 | public static final int CONSTRUCTOR = 1887601793; 2761 | 2762 | /** 2763 | * @return this.CONSTRUCTOR 2764 | */ 2765 | @Override 2766 | public int getConstructor() { 2767 | return CONSTRUCTOR; 2768 | } 2769 | } 2770 | 2771 | /** 2772 | * 2773 | */ 2774 | public static class RawTransactions extends Object { 2775 | public RawTransaction[] transactions; 2776 | public InternalTransactionId previousTransactionId; 2777 | 2778 | /** 2779 | * 2780 | */ 2781 | public RawTransactions() { 2782 | } 2783 | 2784 | public RawTransactions(RawTransaction[] transactions, InternalTransactionId previousTransactionId) { 2785 | this.transactions = transactions; 2786 | this.previousTransactionId = previousTransactionId; 2787 | } 2788 | 2789 | /** 2790 | * Identifier uniquely determining type of the object. 2791 | */ 2792 | public static final int CONSTRUCTOR = -2063931155; 2793 | 2794 | /** 2795 | * @return this.CONSTRUCTOR 2796 | */ 2797 | @Override 2798 | public int getConstructor() { 2799 | return CONSTRUCTOR; 2800 | } 2801 | } 2802 | 2803 | /** 2804 | * 2805 | */ 2806 | public static class RwalletActionInit extends Object { 2807 | public RwalletConfig config; 2808 | 2809 | /** 2810 | * 2811 | */ 2812 | public RwalletActionInit() { 2813 | } 2814 | 2815 | public RwalletActionInit(RwalletConfig config) { 2816 | this.config = config; 2817 | } 2818 | 2819 | /** 2820 | * Identifier uniquely determining type of the object. 2821 | */ 2822 | public static final int CONSTRUCTOR = 624147819; 2823 | 2824 | /** 2825 | * @return this.CONSTRUCTOR 2826 | */ 2827 | @Override 2828 | public int getConstructor() { 2829 | return CONSTRUCTOR; 2830 | } 2831 | } 2832 | 2833 | /** 2834 | * 2835 | */ 2836 | public static class RwalletConfig extends Object { 2837 | public long startAt; 2838 | public RwalletLimit[] limits; 2839 | 2840 | /** 2841 | * 2842 | */ 2843 | public RwalletConfig() { 2844 | } 2845 | 2846 | public RwalletConfig(long startAt, RwalletLimit[] limits) { 2847 | this.startAt = startAt; 2848 | this.limits = limits; 2849 | } 2850 | 2851 | /** 2852 | * Identifier uniquely determining type of the object. 2853 | */ 2854 | public static final int CONSTRUCTOR = -85490534; 2855 | 2856 | /** 2857 | * @return this.CONSTRUCTOR 2858 | */ 2859 | @Override 2860 | public int getConstructor() { 2861 | return CONSTRUCTOR; 2862 | } 2863 | } 2864 | 2865 | /** 2866 | * 2867 | */ 2868 | public static class RwalletLimit extends Object { 2869 | public int seconds; 2870 | public long value; 2871 | 2872 | /** 2873 | * 2874 | */ 2875 | public RwalletLimit() { 2876 | } 2877 | 2878 | public RwalletLimit(int seconds, long value) { 2879 | this.seconds = seconds; 2880 | this.value = value; 2881 | } 2882 | 2883 | /** 2884 | * Identifier uniquely determining type of the object. 2885 | */ 2886 | public static final int CONSTRUCTOR = 1222571646; 2887 | 2888 | /** 2889 | * @return this.CONSTRUCTOR 2890 | */ 2891 | @Override 2892 | public int getConstructor() { 2893 | return CONSTRUCTOR; 2894 | } 2895 | } 2896 | 2897 | /** 2898 | * 2899 | */ 2900 | public static class SmcInfo extends Object { 2901 | public long id; 2902 | 2903 | /** 2904 | * 2905 | */ 2906 | public SmcInfo() { 2907 | } 2908 | 2909 | public SmcInfo(long id) { 2910 | this.id = id; 2911 | } 2912 | 2913 | /** 2914 | * Identifier uniquely determining type of the object. 2915 | */ 2916 | public static final int CONSTRUCTOR = 1134270012; 2917 | 2918 | /** 2919 | * @return this.CONSTRUCTOR 2920 | */ 2921 | @Override 2922 | public int getConstructor() { 2923 | return CONSTRUCTOR; 2924 | } 2925 | } 2926 | 2927 | public abstract static class SmcMethodId extends Object { 2928 | } 2929 | 2930 | public static class SmcMethodIdNumber extends SmcMethodId { 2931 | public int number; 2932 | 2933 | /** 2934 | * 2935 | */ 2936 | public SmcMethodIdNumber() { 2937 | } 2938 | 2939 | public SmcMethodIdNumber(int number) { 2940 | this.number = number; 2941 | } 2942 | 2943 | /** 2944 | * Identifier uniquely determining type of the object. 2945 | */ 2946 | public static final int CONSTRUCTOR = -1541162500; 2947 | 2948 | /** 2949 | * @return this.CONSTRUCTOR 2950 | */ 2951 | @Override 2952 | public int getConstructor() { 2953 | return CONSTRUCTOR; 2954 | } 2955 | } 2956 | 2957 | public static class SmcMethodIdName extends SmcMethodId { 2958 | public String name; 2959 | 2960 | /** 2961 | * 2962 | */ 2963 | public SmcMethodIdName() { 2964 | } 2965 | 2966 | public SmcMethodIdName(String name) { 2967 | this.name = name; 2968 | } 2969 | 2970 | /** 2971 | * Identifier uniquely determining type of the object. 2972 | */ 2973 | public static final int CONSTRUCTOR = -249036908; 2974 | 2975 | /** 2976 | * @return this.CONSTRUCTOR 2977 | */ 2978 | @Override 2979 | public int getConstructor() { 2980 | return CONSTRUCTOR; 2981 | } 2982 | } 2983 | 2984 | /** 2985 | * 2986 | */ 2987 | public static class SmcRunResult extends Object { 2988 | public long gasUsed; 2989 | public TvmStackEntry[] stack; 2990 | public int exitCode; 2991 | 2992 | /** 2993 | * 2994 | */ 2995 | public SmcRunResult() { 2996 | } 2997 | 2998 | public SmcRunResult(long gasUsed, TvmStackEntry[] stack, int exitCode) { 2999 | this.gasUsed = gasUsed; 3000 | this.stack = stack; 3001 | this.exitCode = exitCode; 3002 | } 3003 | 3004 | /** 3005 | * Identifier uniquely determining type of the object. 3006 | */ 3007 | public static final int CONSTRUCTOR = 1413805043; 3008 | 3009 | /** 3010 | * @return this.CONSTRUCTOR 3011 | */ 3012 | @Override 3013 | public int getConstructor() { 3014 | return CONSTRUCTOR; 3015 | } 3016 | } 3017 | 3018 | /** 3019 | * 3020 | */ 3021 | public static class TonBlockIdExt extends Object { 3022 | public int workchain; 3023 | public long shard; 3024 | public int seqno; 3025 | public byte[] rootHash; 3026 | public byte[] fileHash; 3027 | 3028 | /** 3029 | * 3030 | */ 3031 | public TonBlockIdExt() { 3032 | } 3033 | 3034 | public TonBlockIdExt(int workchain, long shard, int seqno, byte[] rootHash, byte[] fileHash) { 3035 | this.workchain = workchain; 3036 | this.shard = shard; 3037 | this.seqno = seqno; 3038 | this.rootHash = rootHash; 3039 | this.fileHash = fileHash; 3040 | } 3041 | 3042 | /** 3043 | * Identifier uniquely determining type of the object. 3044 | */ 3045 | public static final int CONSTRUCTOR = 2031156378; 3046 | 3047 | /** 3048 | * @return this.CONSTRUCTOR 3049 | */ 3050 | @Override 3051 | public int getConstructor() { 3052 | return CONSTRUCTOR; 3053 | } 3054 | } 3055 | 3056 | /** 3057 | * 3058 | */ 3059 | public static class TvmCell extends Object { 3060 | public byte[] bytes; 3061 | 3062 | /** 3063 | * 3064 | */ 3065 | public TvmCell() { 3066 | } 3067 | 3068 | public TvmCell(byte[] bytes) { 3069 | this.bytes = bytes; 3070 | } 3071 | 3072 | /** 3073 | * Identifier uniquely determining type of the object. 3074 | */ 3075 | public static final int CONSTRUCTOR = -413424735; 3076 | 3077 | /** 3078 | * @return this.CONSTRUCTOR 3079 | */ 3080 | @Override 3081 | public int getConstructor() { 3082 | return CONSTRUCTOR; 3083 | } 3084 | } 3085 | 3086 | /** 3087 | * 3088 | */ 3089 | public static class TvmList extends Object { 3090 | public TvmStackEntry[] elements; 3091 | 3092 | /** 3093 | * 3094 | */ 3095 | public TvmList() { 3096 | } 3097 | 3098 | public TvmList(TvmStackEntry[] elements) { 3099 | this.elements = elements; 3100 | } 3101 | 3102 | /** 3103 | * Identifier uniquely determining type of the object. 3104 | */ 3105 | public static final int CONSTRUCTOR = 1270320392; 3106 | 3107 | /** 3108 | * @return this.CONSTRUCTOR 3109 | */ 3110 | @Override 3111 | public int getConstructor() { 3112 | return CONSTRUCTOR; 3113 | } 3114 | } 3115 | 3116 | /** 3117 | * 3118 | */ 3119 | public static class TvmNumberDecimal extends Object { 3120 | public String number; 3121 | 3122 | /** 3123 | * 3124 | */ 3125 | public TvmNumberDecimal() { 3126 | } 3127 | 3128 | public TvmNumberDecimal(String number) { 3129 | this.number = number; 3130 | } 3131 | 3132 | /** 3133 | * Identifier uniquely determining type of the object. 3134 | */ 3135 | public static final int CONSTRUCTOR = 1172477619; 3136 | 3137 | /** 3138 | * @return this.CONSTRUCTOR 3139 | */ 3140 | @Override 3141 | public int getConstructor() { 3142 | return CONSTRUCTOR; 3143 | } 3144 | } 3145 | 3146 | /** 3147 | * 3148 | */ 3149 | public static class TvmSlice extends Object { 3150 | public byte[] bytes; 3151 | 3152 | /** 3153 | * 3154 | */ 3155 | public TvmSlice() { 3156 | } 3157 | 3158 | public TvmSlice(byte[] bytes) { 3159 | this.bytes = bytes; 3160 | } 3161 | 3162 | /** 3163 | * Identifier uniquely determining type of the object. 3164 | */ 3165 | public static final int CONSTRUCTOR = 537299687; 3166 | 3167 | /** 3168 | * @return this.CONSTRUCTOR 3169 | */ 3170 | @Override 3171 | public int getConstructor() { 3172 | return CONSTRUCTOR; 3173 | } 3174 | } 3175 | 3176 | public abstract static class TvmStackEntry extends Object { 3177 | } 3178 | 3179 | public static class TvmStackEntrySlice extends TvmStackEntry { 3180 | public TvmSlice slice; 3181 | 3182 | /** 3183 | * 3184 | */ 3185 | public TvmStackEntrySlice() { 3186 | } 3187 | 3188 | public TvmStackEntrySlice(TvmSlice slice) { 3189 | this.slice = slice; 3190 | } 3191 | 3192 | /** 3193 | * Identifier uniquely determining type of the object. 3194 | */ 3195 | public static final int CONSTRUCTOR = 1395485477; 3196 | 3197 | /** 3198 | * @return this.CONSTRUCTOR 3199 | */ 3200 | @Override 3201 | public int getConstructor() { 3202 | return CONSTRUCTOR; 3203 | } 3204 | } 3205 | 3206 | public static class TvmStackEntryCell extends TvmStackEntry { 3207 | public TvmCell cell; 3208 | 3209 | /** 3210 | * 3211 | */ 3212 | public TvmStackEntryCell() { 3213 | } 3214 | 3215 | public TvmStackEntryCell(TvmCell cell) { 3216 | this.cell = cell; 3217 | } 3218 | 3219 | /** 3220 | * Identifier uniquely determining type of the object. 3221 | */ 3222 | public static final int CONSTRUCTOR = 1303473952; 3223 | 3224 | /** 3225 | * @return this.CONSTRUCTOR 3226 | */ 3227 | @Override 3228 | public int getConstructor() { 3229 | return CONSTRUCTOR; 3230 | } 3231 | } 3232 | 3233 | public static class TvmStackEntryNumber extends TvmStackEntry { 3234 | public TvmNumberDecimal number; 3235 | 3236 | /** 3237 | * 3238 | */ 3239 | public TvmStackEntryNumber() { 3240 | } 3241 | 3242 | public TvmStackEntryNumber(TvmNumberDecimal number) { 3243 | this.number = number; 3244 | } 3245 | 3246 | /** 3247 | * Identifier uniquely determining type of the object. 3248 | */ 3249 | public static final int CONSTRUCTOR = 1358642622; 3250 | 3251 | /** 3252 | * @return this.CONSTRUCTOR 3253 | */ 3254 | @Override 3255 | public int getConstructor() { 3256 | return CONSTRUCTOR; 3257 | } 3258 | } 3259 | 3260 | public static class TvmStackEntryTuple extends TvmStackEntry { 3261 | public TvmTuple tuple; 3262 | 3263 | /** 3264 | * 3265 | */ 3266 | public TvmStackEntryTuple() { 3267 | } 3268 | 3269 | public TvmStackEntryTuple(TvmTuple tuple) { 3270 | this.tuple = tuple; 3271 | } 3272 | 3273 | /** 3274 | * Identifier uniquely determining type of the object. 3275 | */ 3276 | public static final int CONSTRUCTOR = -157391908; 3277 | 3278 | /** 3279 | * @return this.CONSTRUCTOR 3280 | */ 3281 | @Override 3282 | public int getConstructor() { 3283 | return CONSTRUCTOR; 3284 | } 3285 | } 3286 | 3287 | public static class TvmStackEntryList extends TvmStackEntry { 3288 | public TvmList list; 3289 | 3290 | /** 3291 | * 3292 | */ 3293 | public TvmStackEntryList() { 3294 | } 3295 | 3296 | public TvmStackEntryList(TvmList list) { 3297 | this.list = list; 3298 | } 3299 | 3300 | /** 3301 | * Identifier uniquely determining type of the object. 3302 | */ 3303 | public static final int CONSTRUCTOR = -1186714229; 3304 | 3305 | /** 3306 | * @return this.CONSTRUCTOR 3307 | */ 3308 | @Override 3309 | public int getConstructor() { 3310 | return CONSTRUCTOR; 3311 | } 3312 | } 3313 | 3314 | public static class TvmStackEntryUnsupported extends TvmStackEntry { 3315 | 3316 | /** 3317 | * 3318 | */ 3319 | public TvmStackEntryUnsupported() { 3320 | } 3321 | 3322 | /** 3323 | * Identifier uniquely determining type of the object. 3324 | */ 3325 | public static final int CONSTRUCTOR = 378880498; 3326 | 3327 | /** 3328 | * @return this.CONSTRUCTOR 3329 | */ 3330 | @Override 3331 | public int getConstructor() { 3332 | return CONSTRUCTOR; 3333 | } 3334 | } 3335 | 3336 | /** 3337 | * 3338 | */ 3339 | public static class TvmTuple extends Object { 3340 | public TvmStackEntry[] elements; 3341 | 3342 | /** 3343 | * 3344 | */ 3345 | public TvmTuple() { 3346 | } 3347 | 3348 | public TvmTuple(TvmStackEntry[] elements) { 3349 | this.elements = elements; 3350 | } 3351 | 3352 | /** 3353 | * Identifier uniquely determining type of the object. 3354 | */ 3355 | public static final int CONSTRUCTOR = -1363953053; 3356 | 3357 | /** 3358 | * @return this.CONSTRUCTOR 3359 | */ 3360 | @Override 3361 | public int getConstructor() { 3362 | return CONSTRUCTOR; 3363 | } 3364 | } 3365 | 3366 | /** 3367 | * Adds a message to tonlib internal log. This is an offline method. Can be called before authorization. Can be called synchronously. 3368 | * 3369 | *

Returns {@link Ok Ok}

3370 | */ 3371 | public static class AddLogMessage extends Function { 3372 | /** 3373 | * Minimum verbosity level needed for the message to be logged, 0-1023. 3374 | */ 3375 | public int verbosityLevel; 3376 | /** 3377 | * Text of a message to log. 3378 | */ 3379 | public String text; 3380 | 3381 | /** 3382 | * Default constructor for a function, which adds a message to tonlib internal log. This is an offline method. Can be called before authorization. Can be called synchronously. 3383 | * 3384 | *

Returns {@link Ok Ok}

3385 | */ 3386 | public AddLogMessage() { 3387 | } 3388 | 3389 | /** 3390 | * Creates a function, which adds a message to tonlib internal log. This is an offline method. Can be called before authorization. Can be called synchronously. 3391 | * 3392 | *

Returns {@link Ok Ok}

3393 | * 3394 | * @param verbosityLevel Minimum verbosity level needed for the message to be logged, 0-1023. 3395 | * @param text Text of a message to log. 3396 | */ 3397 | public AddLogMessage(int verbosityLevel, String text) { 3398 | this.verbosityLevel = verbosityLevel; 3399 | this.text = text; 3400 | } 3401 | 3402 | /** 3403 | * Identifier uniquely determining type of the object. 3404 | */ 3405 | public static final int CONSTRUCTOR = 1597427692; 3406 | 3407 | /** 3408 | * @return this.CONSTRUCTOR 3409 | */ 3410 | @Override 3411 | public int getConstructor() { 3412 | return CONSTRUCTOR; 3413 | } 3414 | } 3415 | 3416 | /** 3417 | * 3418 | * 3419 | *

Returns {@link Key Key}

3420 | */ 3421 | public static class ChangeLocalPassword extends Function { 3422 | public InputKey inputKey; 3423 | public byte[] newLocalPassword; 3424 | 3425 | /** 3426 | * Default constructor for a function, which 3427 | * 3428 | *

Returns {@link Key Key}

3429 | */ 3430 | public ChangeLocalPassword() { 3431 | } 3432 | 3433 | public ChangeLocalPassword(InputKey inputKey, byte[] newLocalPassword) { 3434 | this.inputKey = inputKey; 3435 | this.newLocalPassword = newLocalPassword; 3436 | } 3437 | 3438 | /** 3439 | * Identifier uniquely determining type of the object. 3440 | */ 3441 | public static final int CONSTRUCTOR = -401590337; 3442 | 3443 | /** 3444 | * @return this.CONSTRUCTOR 3445 | */ 3446 | @Override 3447 | public int getConstructor() { 3448 | return CONSTRUCTOR; 3449 | } 3450 | } 3451 | 3452 | /** 3453 | * 3454 | * 3455 | *

Returns {@link Ok Ok}

3456 | */ 3457 | public static class Close extends Function { 3458 | 3459 | /** 3460 | * Default constructor for a function, which 3461 | * 3462 | *

Returns {@link Ok Ok}

3463 | */ 3464 | public Close() { 3465 | } 3466 | 3467 | /** 3468 | * Identifier uniquely determining type of the object. 3469 | */ 3470 | public static final int CONSTRUCTOR = -1187782273; 3471 | 3472 | /** 3473 | * @return this.CONSTRUCTOR 3474 | */ 3475 | @Override 3476 | public int getConstructor() { 3477 | return CONSTRUCTOR; 3478 | } 3479 | } 3480 | 3481 | /** 3482 | * 3483 | * 3484 | *

Returns {@link Key Key}

3485 | */ 3486 | public static class CreateNewKey extends Function { 3487 | public byte[] localPassword; 3488 | public byte[] mnemonicPassword; 3489 | public byte[] randomExtraSeed; 3490 | 3491 | /** 3492 | * Default constructor for a function, which 3493 | * 3494 | *

Returns {@link Key Key}

3495 | */ 3496 | public CreateNewKey() { 3497 | } 3498 | 3499 | public CreateNewKey(byte[] localPassword, byte[] mnemonicPassword, byte[] randomExtraSeed) { 3500 | this.localPassword = localPassword; 3501 | this.mnemonicPassword = mnemonicPassword; 3502 | this.randomExtraSeed = randomExtraSeed; 3503 | } 3504 | 3505 | /** 3506 | * Identifier uniquely determining type of the object. 3507 | */ 3508 | public static final int CONSTRUCTOR = -1861385712; 3509 | 3510 | /** 3511 | * @return this.CONSTRUCTOR 3512 | */ 3513 | @Override 3514 | public int getConstructor() { 3515 | return CONSTRUCTOR; 3516 | } 3517 | } 3518 | 3519 | /** 3520 | * 3521 | * 3522 | *

Returns {@link QueryInfo QueryInfo}

3523 | */ 3524 | public static class CreateQuery extends Function { 3525 | public InputKey privateKey; 3526 | public AccountAddress address; 3527 | public int timeout; 3528 | public Action action; 3529 | public InitialAccountState initialAccountState; 3530 | 3531 | /** 3532 | * Default constructor for a function, which 3533 | * 3534 | *

Returns {@link QueryInfo QueryInfo}

3535 | */ 3536 | public CreateQuery() { 3537 | } 3538 | 3539 | public CreateQuery(InputKey privateKey, AccountAddress address, int timeout, Action action, InitialAccountState initialAccountState) { 3540 | this.privateKey = privateKey; 3541 | this.address = address; 3542 | this.timeout = timeout; 3543 | this.action = action; 3544 | this.initialAccountState = initialAccountState; 3545 | } 3546 | 3547 | /** 3548 | * Identifier uniquely determining type of the object. 3549 | */ 3550 | public static final int CONSTRUCTOR = -242540347; 3551 | 3552 | /** 3553 | * @return this.CONSTRUCTOR 3554 | */ 3555 | @Override 3556 | public int getConstructor() { 3557 | return CONSTRUCTOR; 3558 | } 3559 | } 3560 | 3561 | /** 3562 | * 3563 | * 3564 | *

Returns {@link Data Data}

3565 | */ 3566 | public static class Decrypt extends Function { 3567 | public byte[] encryptedData; 3568 | public byte[] secret; 3569 | 3570 | /** 3571 | * Default constructor for a function, which 3572 | * 3573 | *

Returns {@link Data Data}

3574 | */ 3575 | public Decrypt() { 3576 | } 3577 | 3578 | public Decrypt(byte[] encryptedData, byte[] secret) { 3579 | this.encryptedData = encryptedData; 3580 | this.secret = secret; 3581 | } 3582 | 3583 | /** 3584 | * Identifier uniquely determining type of the object. 3585 | */ 3586 | public static final int CONSTRUCTOR = 357991854; 3587 | 3588 | /** 3589 | * @return this.CONSTRUCTOR 3590 | */ 3591 | @Override 3592 | public int getConstructor() { 3593 | return CONSTRUCTOR; 3594 | } 3595 | } 3596 | 3597 | /** 3598 | * 3599 | * 3600 | *

Returns {@link Ok Ok}

3601 | */ 3602 | public static class DeleteAllKeys extends Function { 3603 | 3604 | /** 3605 | * Default constructor for a function, which 3606 | * 3607 | *

Returns {@link Ok Ok}

3608 | */ 3609 | public DeleteAllKeys() { 3610 | } 3611 | 3612 | /** 3613 | * Identifier uniquely determining type of the object. 3614 | */ 3615 | public static final int CONSTRUCTOR = 1608776483; 3616 | 3617 | /** 3618 | * @return this.CONSTRUCTOR 3619 | */ 3620 | @Override 3621 | public int getConstructor() { 3622 | return CONSTRUCTOR; 3623 | } 3624 | } 3625 | 3626 | /** 3627 | * 3628 | * 3629 | *

Returns {@link Ok Ok}

3630 | */ 3631 | public static class DeleteKey extends Function { 3632 | public Key key; 3633 | 3634 | /** 3635 | * Default constructor for a function, which 3636 | * 3637 | *

Returns {@link Ok Ok}

3638 | */ 3639 | public DeleteKey() { 3640 | } 3641 | 3642 | public DeleteKey(Key key) { 3643 | this.key = key; 3644 | } 3645 | 3646 | /** 3647 | * Identifier uniquely determining type of the object. 3648 | */ 3649 | public static final int CONSTRUCTOR = -1579595571; 3650 | 3651 | /** 3652 | * @return this.CONSTRUCTOR 3653 | */ 3654 | @Override 3655 | public int getConstructor() { 3656 | return CONSTRUCTOR; 3657 | } 3658 | } 3659 | 3660 | /** 3661 | * 3662 | * 3663 | *

Returns {@link DnsResolved DnsResolved}

3664 | */ 3665 | public static class DnsResolve extends Function { 3666 | public AccountAddress accountAddress; 3667 | public String name; 3668 | public int category; 3669 | public int ttl; 3670 | 3671 | /** 3672 | * Default constructor for a function, which 3673 | * 3674 | *

Returns {@link DnsResolved DnsResolved}

3675 | */ 3676 | public DnsResolve() { 3677 | } 3678 | 3679 | public DnsResolve(AccountAddress accountAddress, String name, int category, int ttl) { 3680 | this.accountAddress = accountAddress; 3681 | this.name = name; 3682 | this.category = category; 3683 | this.ttl = ttl; 3684 | } 3685 | 3686 | /** 3687 | * Identifier uniquely determining type of the object. 3688 | */ 3689 | public static final int CONSTRUCTOR = -149238065; 3690 | 3691 | /** 3692 | * @return this.CONSTRUCTOR 3693 | */ 3694 | @Override 3695 | public int getConstructor() { 3696 | return CONSTRUCTOR; 3697 | } 3698 | } 3699 | 3700 | /** 3701 | * 3702 | * 3703 | *

Returns {@link Data Data}

3704 | */ 3705 | public static class Encrypt extends Function { 3706 | public byte[] decryptedData; 3707 | public byte[] secret; 3708 | 3709 | /** 3710 | * Default constructor for a function, which 3711 | * 3712 | *

Returns {@link Data Data}

3713 | */ 3714 | public Encrypt() { 3715 | } 3716 | 3717 | public Encrypt(byte[] decryptedData, byte[] secret) { 3718 | this.decryptedData = decryptedData; 3719 | this.secret = secret; 3720 | } 3721 | 3722 | /** 3723 | * Identifier uniquely determining type of the object. 3724 | */ 3725 | public static final int CONSTRUCTOR = -1821422820; 3726 | 3727 | /** 3728 | * @return this.CONSTRUCTOR 3729 | */ 3730 | @Override 3731 | public int getConstructor() { 3732 | return CONSTRUCTOR; 3733 | } 3734 | } 3735 | 3736 | /** 3737 | * 3738 | * 3739 | *

Returns {@link ExportedEncryptedKey ExportedEncryptedKey}

3740 | */ 3741 | public static class ExportEncryptedKey extends Function { 3742 | public InputKey inputKey; 3743 | public byte[] keyPassword; 3744 | 3745 | /** 3746 | * Default constructor for a function, which 3747 | * 3748 | *

Returns {@link ExportedEncryptedKey ExportedEncryptedKey}

3749 | */ 3750 | public ExportEncryptedKey() { 3751 | } 3752 | 3753 | public ExportEncryptedKey(InputKey inputKey, byte[] keyPassword) { 3754 | this.inputKey = inputKey; 3755 | this.keyPassword = keyPassword; 3756 | } 3757 | 3758 | /** 3759 | * Identifier uniquely determining type of the object. 3760 | */ 3761 | public static final int CONSTRUCTOR = 218237311; 3762 | 3763 | /** 3764 | * @return this.CONSTRUCTOR 3765 | */ 3766 | @Override 3767 | public int getConstructor() { 3768 | return CONSTRUCTOR; 3769 | } 3770 | } 3771 | 3772 | /** 3773 | * 3774 | * 3775 | *

Returns {@link ExportedKey ExportedKey}

3776 | */ 3777 | public static class ExportKey extends Function { 3778 | public InputKey inputKey; 3779 | 3780 | /** 3781 | * Default constructor for a function, which 3782 | * 3783 | *

Returns {@link ExportedKey ExportedKey}

3784 | */ 3785 | public ExportKey() { 3786 | } 3787 | 3788 | public ExportKey(InputKey inputKey) { 3789 | this.inputKey = inputKey; 3790 | } 3791 | 3792 | /** 3793 | * Identifier uniquely determining type of the object. 3794 | */ 3795 | public static final int CONSTRUCTOR = -1622353549; 3796 | 3797 | /** 3798 | * @return this.CONSTRUCTOR 3799 | */ 3800 | @Override 3801 | public int getConstructor() { 3802 | return CONSTRUCTOR; 3803 | } 3804 | } 3805 | 3806 | /** 3807 | * 3808 | * 3809 | *

Returns {@link ExportedPemKey ExportedPemKey}

3810 | */ 3811 | public static class ExportPemKey extends Function { 3812 | public InputKey inputKey; 3813 | public byte[] keyPassword; 3814 | 3815 | /** 3816 | * Default constructor for a function, which 3817 | * 3818 | *

Returns {@link ExportedPemKey ExportedPemKey}

3819 | */ 3820 | public ExportPemKey() { 3821 | } 3822 | 3823 | public ExportPemKey(InputKey inputKey, byte[] keyPassword) { 3824 | this.inputKey = inputKey; 3825 | this.keyPassword = keyPassword; 3826 | } 3827 | 3828 | /** 3829 | * Identifier uniquely determining type of the object. 3830 | */ 3831 | public static final int CONSTRUCTOR = -643259462; 3832 | 3833 | /** 3834 | * @return this.CONSTRUCTOR 3835 | */ 3836 | @Override 3837 | public int getConstructor() { 3838 | return CONSTRUCTOR; 3839 | } 3840 | } 3841 | 3842 | /** 3843 | * 3844 | * 3845 | *

Returns {@link ExportedUnencryptedKey ExportedUnencryptedKey}

3846 | */ 3847 | public static class ExportUnencryptedKey extends Function { 3848 | public InputKey inputKey; 3849 | 3850 | /** 3851 | * Default constructor for a function, which 3852 | * 3853 | *

Returns {@link ExportedUnencryptedKey ExportedUnencryptedKey}

3854 | */ 3855 | public ExportUnencryptedKey() { 3856 | } 3857 | 3858 | public ExportUnencryptedKey(InputKey inputKey) { 3859 | this.inputKey = inputKey; 3860 | } 3861 | 3862 | /** 3863 | * Identifier uniquely determining type of the object. 3864 | */ 3865 | public static final int CONSTRUCTOR = -634665152; 3866 | 3867 | /** 3868 | * @return this.CONSTRUCTOR 3869 | */ 3870 | @Override 3871 | public int getConstructor() { 3872 | return CONSTRUCTOR; 3873 | } 3874 | } 3875 | 3876 | /** 3877 | * 3878 | * 3879 | *

Returns {@link AccountAddress AccountAddress}

3880 | */ 3881 | public static class GetAccountAddress extends Function { 3882 | public InitialAccountState initialAccountState; 3883 | public int revision; 3884 | public int workchainId; 3885 | 3886 | /** 3887 | * Default constructor for a function, which 3888 | * 3889 | *

Returns {@link AccountAddress AccountAddress}

3890 | */ 3891 | public GetAccountAddress() { 3892 | } 3893 | 3894 | public GetAccountAddress(InitialAccountState initialAccountState, int revision, int workchainId) { 3895 | this.initialAccountState = initialAccountState; 3896 | this.revision = revision; 3897 | this.workchainId = workchainId; 3898 | } 3899 | 3900 | /** 3901 | * Identifier uniquely determining type of the object. 3902 | */ 3903 | public static final int CONSTRUCTOR = 512468424; 3904 | 3905 | /** 3906 | * @return this.CONSTRUCTOR 3907 | */ 3908 | @Override 3909 | public int getConstructor() { 3910 | return CONSTRUCTOR; 3911 | } 3912 | } 3913 | 3914 | /** 3915 | * 3916 | * 3917 | *

Returns {@link FullAccountState FullAccountState}

3918 | */ 3919 | public static class GetAccountState extends Function { 3920 | public AccountAddress accountAddress; 3921 | 3922 | /** 3923 | * Default constructor for a function, which 3924 | * 3925 | *

Returns {@link FullAccountState FullAccountState}

3926 | */ 3927 | public GetAccountState() { 3928 | } 3929 | 3930 | public GetAccountState(AccountAddress accountAddress) { 3931 | this.accountAddress = accountAddress; 3932 | } 3933 | 3934 | /** 3935 | * Identifier uniquely determining type of the object. 3936 | */ 3937 | public static final int CONSTRUCTOR = -2116357050; 3938 | 3939 | /** 3940 | * @return this.CONSTRUCTOR 3941 | */ 3942 | @Override 3943 | public int getConstructor() { 3944 | return CONSTRUCTOR; 3945 | } 3946 | } 3947 | 3948 | /** 3949 | * 3950 | * 3951 | *

Returns {@link Bip39Hints Bip39Hints}

3952 | */ 3953 | public static class GetBip39Hints extends Function { 3954 | public String prefix; 3955 | 3956 | /** 3957 | * Default constructor for a function, which 3958 | * 3959 | *

Returns {@link Bip39Hints Bip39Hints}

3960 | */ 3961 | public GetBip39Hints() { 3962 | } 3963 | 3964 | public GetBip39Hints(String prefix) { 3965 | this.prefix = prefix; 3966 | } 3967 | 3968 | /** 3969 | * Identifier uniquely determining type of the object. 3970 | */ 3971 | public static final int CONSTRUCTOR = -1889640982; 3972 | 3973 | /** 3974 | * @return this.CONSTRUCTOR 3975 | */ 3976 | @Override 3977 | public int getConstructor() { 3978 | return CONSTRUCTOR; 3979 | } 3980 | } 3981 | 3982 | /** 3983 | * Returns information about currently used log stream for internal logging of tonlib. This is an offline method. Can be called before authorization. Can be called synchronously. 3984 | * 3985 | *

Returns {@link LogStream LogStream}

3986 | */ 3987 | public static class GetLogStream extends Function { 3988 | 3989 | /** 3990 | * Default constructor for a function, which returns information about currently used log stream for internal logging of tonlib. This is an offline method. Can be called before authorization. Can be called synchronously. 3991 | * 3992 | *

Returns {@link LogStream LogStream}

3993 | */ 3994 | public GetLogStream() { 3995 | } 3996 | 3997 | /** 3998 | * Identifier uniquely determining type of the object. 3999 | */ 4000 | public static final int CONSTRUCTOR = 1167608667; 4001 | 4002 | /** 4003 | * @return this.CONSTRUCTOR 4004 | */ 4005 | @Override 4006 | public int getConstructor() { 4007 | return CONSTRUCTOR; 4008 | } 4009 | } 4010 | 4011 | /** 4012 | * Returns current verbosity level for a specified tonlib internal log tag. This is an offline method. Can be called before authorization. Can be called synchronously. 4013 | * 4014 | *

Returns {@link LogVerbosityLevel LogVerbosityLevel}

4015 | */ 4016 | public static class GetLogTagVerbosityLevel extends Function { 4017 | /** 4018 | * Logging tag to change verbosity level. 4019 | */ 4020 | public String tag; 4021 | 4022 | /** 4023 | * Default constructor for a function, which returns current verbosity level for a specified tonlib internal log tag. This is an offline method. Can be called before authorization. Can be called synchronously. 4024 | * 4025 | *

Returns {@link LogVerbosityLevel LogVerbosityLevel}

4026 | */ 4027 | public GetLogTagVerbosityLevel() { 4028 | } 4029 | 4030 | /** 4031 | * Creates a function, which returns current verbosity level for a specified tonlib internal log tag. This is an offline method. Can be called before authorization. Can be called synchronously. 4032 | * 4033 | *

Returns {@link LogVerbosityLevel LogVerbosityLevel}

4034 | * 4035 | * @param tag Logging tag to change verbosity level. 4036 | */ 4037 | public GetLogTagVerbosityLevel(String tag) { 4038 | this.tag = tag; 4039 | } 4040 | 4041 | /** 4042 | * Identifier uniquely determining type of the object. 4043 | */ 4044 | public static final int CONSTRUCTOR = 951004547; 4045 | 4046 | /** 4047 | * @return this.CONSTRUCTOR 4048 | */ 4049 | @Override 4050 | public int getConstructor() { 4051 | return CONSTRUCTOR; 4052 | } 4053 | } 4054 | 4055 | /** 4056 | * Returns list of available tonlib internal log tags, for example, ["actor", "binlog", "connections", "notifications", "proxy"]. This is an offline method. Can be called before authorization. Can be called synchronously. 4057 | * 4058 | *

Returns {@link LogTags LogTags}

4059 | */ 4060 | public static class GetLogTags extends Function { 4061 | 4062 | /** 4063 | * Default constructor for a function, which returns list of available tonlib internal log tags, for example, ["actor", "binlog", "connections", "notifications", "proxy"]. This is an offline method. Can be called before authorization. Can be called synchronously. 4064 | * 4065 | *

Returns {@link LogTags LogTags}

4066 | */ 4067 | public GetLogTags() { 4068 | } 4069 | 4070 | /** 4071 | * Identifier uniquely determining type of the object. 4072 | */ 4073 | public static final int CONSTRUCTOR = -254449190; 4074 | 4075 | /** 4076 | * @return this.CONSTRUCTOR 4077 | */ 4078 | @Override 4079 | public int getConstructor() { 4080 | return CONSTRUCTOR; 4081 | } 4082 | } 4083 | 4084 | /** 4085 | * Returns current verbosity level of the internal logging of tonlib. This is an offline method. Can be called before authorization. Can be called synchronously. 4086 | * 4087 | *

Returns {@link LogVerbosityLevel LogVerbosityLevel}

4088 | */ 4089 | public static class GetLogVerbosityLevel extends Function { 4090 | 4091 | /** 4092 | * Default constructor for a function, which returns current verbosity level of the internal logging of tonlib. This is an offline method. Can be called before authorization. Can be called synchronously. 4093 | * 4094 | *

Returns {@link LogVerbosityLevel LogVerbosityLevel}

4095 | */ 4096 | public GetLogVerbosityLevel() { 4097 | } 4098 | 4099 | /** 4100 | * Identifier uniquely determining type of the object. 4101 | */ 4102 | public static final int CONSTRUCTOR = 594057956; 4103 | 4104 | /** 4105 | * @return this.CONSTRUCTOR 4106 | */ 4107 | @Override 4108 | public int getConstructor() { 4109 | return CONSTRUCTOR; 4110 | } 4111 | } 4112 | 4113 | /** 4114 | * 4115 | * 4116 | *

Returns {@link AccountRevisionList AccountRevisionList}

4117 | */ 4118 | public static class GuessAccount extends Function { 4119 | public String publicKey; 4120 | public String rwalletInitPublicKey; 4121 | 4122 | /** 4123 | * Default constructor for a function, which 4124 | * 4125 | *

Returns {@link AccountRevisionList AccountRevisionList}

4126 | */ 4127 | public GuessAccount() { 4128 | } 4129 | 4130 | public GuessAccount(String publicKey, String rwalletInitPublicKey) { 4131 | this.publicKey = publicKey; 4132 | this.rwalletInitPublicKey = rwalletInitPublicKey; 4133 | } 4134 | 4135 | /** 4136 | * Identifier uniquely determining type of the object. 4137 | */ 4138 | public static final int CONSTRUCTOR = -1737659296; 4139 | 4140 | /** 4141 | * @return this.CONSTRUCTOR 4142 | */ 4143 | @Override 4144 | public int getConstructor() { 4145 | return CONSTRUCTOR; 4146 | } 4147 | } 4148 | 4149 | /** 4150 | * 4151 | * 4152 | *

Returns {@link AccountRevisionList AccountRevisionList}

4153 | */ 4154 | public static class GuessAccountRevision extends Function { 4155 | public InitialAccountState initialAccountState; 4156 | public int workchainId; 4157 | 4158 | /** 4159 | * Default constructor for a function, which 4160 | * 4161 | *

Returns {@link AccountRevisionList AccountRevisionList}

4162 | */ 4163 | public GuessAccountRevision() { 4164 | } 4165 | 4166 | public GuessAccountRevision(InitialAccountState initialAccountState, int workchainId) { 4167 | this.initialAccountState = initialAccountState; 4168 | this.workchainId = workchainId; 4169 | } 4170 | 4171 | /** 4172 | * Identifier uniquely determining type of the object. 4173 | */ 4174 | public static final int CONSTRUCTOR = 1857589922; 4175 | 4176 | /** 4177 | * @return this.CONSTRUCTOR 4178 | */ 4179 | @Override 4180 | public int getConstructor() { 4181 | return CONSTRUCTOR; 4182 | } 4183 | } 4184 | 4185 | /** 4186 | * 4187 | * 4188 | *

Returns {@link Key Key}

4189 | */ 4190 | public static class ImportEncryptedKey extends Function { 4191 | public byte[] localPassword; 4192 | public byte[] keyPassword; 4193 | public ExportedEncryptedKey exportedEncryptedKey; 4194 | 4195 | /** 4196 | * Default constructor for a function, which 4197 | * 4198 | *

Returns {@link Key Key}

4199 | */ 4200 | public ImportEncryptedKey() { 4201 | } 4202 | 4203 | public ImportEncryptedKey(byte[] localPassword, byte[] keyPassword, ExportedEncryptedKey exportedEncryptedKey) { 4204 | this.localPassword = localPassword; 4205 | this.keyPassword = keyPassword; 4206 | this.exportedEncryptedKey = exportedEncryptedKey; 4207 | } 4208 | 4209 | /** 4210 | * Identifier uniquely determining type of the object. 4211 | */ 4212 | public static final int CONSTRUCTOR = 656724958; 4213 | 4214 | /** 4215 | * @return this.CONSTRUCTOR 4216 | */ 4217 | @Override 4218 | public int getConstructor() { 4219 | return CONSTRUCTOR; 4220 | } 4221 | } 4222 | 4223 | /** 4224 | * 4225 | * 4226 | *

Returns {@link Key Key}

4227 | */ 4228 | public static class ImportKey extends Function { 4229 | public byte[] localPassword; 4230 | public byte[] mnemonicPassword; 4231 | public ExportedKey exportedKey; 4232 | 4233 | /** 4234 | * Default constructor for a function, which 4235 | * 4236 | *

Returns {@link Key Key}

4237 | */ 4238 | public ImportKey() { 4239 | } 4240 | 4241 | public ImportKey(byte[] localPassword, byte[] mnemonicPassword, ExportedKey exportedKey) { 4242 | this.localPassword = localPassword; 4243 | this.mnemonicPassword = mnemonicPassword; 4244 | this.exportedKey = exportedKey; 4245 | } 4246 | 4247 | /** 4248 | * Identifier uniquely determining type of the object. 4249 | */ 4250 | public static final int CONSTRUCTOR = -1607900903; 4251 | 4252 | /** 4253 | * @return this.CONSTRUCTOR 4254 | */ 4255 | @Override 4256 | public int getConstructor() { 4257 | return CONSTRUCTOR; 4258 | } 4259 | } 4260 | 4261 | /** 4262 | * 4263 | * 4264 | *

Returns {@link Key Key}

4265 | */ 4266 | public static class ImportPemKey extends Function { 4267 | public byte[] localPassword; 4268 | public byte[] keyPassword; 4269 | public ExportedPemKey exportedKey; 4270 | 4271 | /** 4272 | * Default constructor for a function, which 4273 | * 4274 | *

Returns {@link Key Key}

4275 | */ 4276 | public ImportPemKey() { 4277 | } 4278 | 4279 | public ImportPemKey(byte[] localPassword, byte[] keyPassword, ExportedPemKey exportedKey) { 4280 | this.localPassword = localPassword; 4281 | this.keyPassword = keyPassword; 4282 | this.exportedKey = exportedKey; 4283 | } 4284 | 4285 | /** 4286 | * Identifier uniquely determining type of the object. 4287 | */ 4288 | public static final int CONSTRUCTOR = 76385617; 4289 | 4290 | /** 4291 | * @return this.CONSTRUCTOR 4292 | */ 4293 | @Override 4294 | public int getConstructor() { 4295 | return CONSTRUCTOR; 4296 | } 4297 | } 4298 | 4299 | /** 4300 | * 4301 | * 4302 | *

Returns {@link Key Key}

4303 | */ 4304 | public static class ImportUnencryptedKey extends Function { 4305 | public byte[] localPassword; 4306 | public ExportedUnencryptedKey exportedUnencryptedKey; 4307 | 4308 | /** 4309 | * Default constructor for a function, which 4310 | * 4311 | *

Returns {@link Key Key}

4312 | */ 4313 | public ImportUnencryptedKey() { 4314 | } 4315 | 4316 | public ImportUnencryptedKey(byte[] localPassword, ExportedUnencryptedKey exportedUnencryptedKey) { 4317 | this.localPassword = localPassword; 4318 | this.exportedUnencryptedKey = exportedUnencryptedKey; 4319 | } 4320 | 4321 | /** 4322 | * Identifier uniquely determining type of the object. 4323 | */ 4324 | public static final int CONSTRUCTOR = -1184671467; 4325 | 4326 | /** 4327 | * @return this.CONSTRUCTOR 4328 | */ 4329 | @Override 4330 | public int getConstructor() { 4331 | return CONSTRUCTOR; 4332 | } 4333 | } 4334 | 4335 | /** 4336 | * 4337 | * 4338 | *

Returns {@link OptionsInfo OptionsInfo}

4339 | */ 4340 | public static class Init extends Function { 4341 | public Options options; 4342 | 4343 | /** 4344 | * Default constructor for a function, which 4345 | * 4346 | *

Returns {@link OptionsInfo OptionsInfo}

4347 | */ 4348 | public Init() { 4349 | } 4350 | 4351 | public Init(Options options) { 4352 | this.options = options; 4353 | } 4354 | 4355 | /** 4356 | * Identifier uniquely determining type of the object. 4357 | */ 4358 | public static final int CONSTRUCTOR = -1000594762; 4359 | 4360 | /** 4361 | * @return this.CONSTRUCTOR 4362 | */ 4363 | @Override 4364 | public int getConstructor() { 4365 | return CONSTRUCTOR; 4366 | } 4367 | } 4368 | 4369 | /** 4370 | * 4371 | * 4372 | *

Returns {@link Data Data}

4373 | */ 4374 | public static class Kdf extends Function { 4375 | public byte[] password; 4376 | public byte[] salt; 4377 | public int iterations; 4378 | 4379 | /** 4380 | * Default constructor for a function, which 4381 | * 4382 | *

Returns {@link Data Data}

4383 | */ 4384 | public Kdf() { 4385 | } 4386 | 4387 | public Kdf(byte[] password, byte[] salt, int iterations) { 4388 | this.password = password; 4389 | this.salt = salt; 4390 | this.iterations = iterations; 4391 | } 4392 | 4393 | /** 4394 | * Identifier uniquely determining type of the object. 4395 | */ 4396 | public static final int CONSTRUCTOR = -1667861635; 4397 | 4398 | /** 4399 | * @return this.CONSTRUCTOR 4400 | */ 4401 | @Override 4402 | public int getConstructor() { 4403 | return CONSTRUCTOR; 4404 | } 4405 | } 4406 | 4407 | /** 4408 | * 4409 | * 4410 | *

Returns {@link LiteServerInfo LiteServerInfo}

4411 | */ 4412 | public static class LiteServerGetInfo extends Function { 4413 | 4414 | /** 4415 | * Default constructor for a function, which 4416 | * 4417 | *

Returns {@link LiteServerInfo LiteServerInfo}

4418 | */ 4419 | public LiteServerGetInfo() { 4420 | } 4421 | 4422 | /** 4423 | * Identifier uniquely determining type of the object. 4424 | */ 4425 | public static final int CONSTRUCTOR = 1435327470; 4426 | 4427 | /** 4428 | * @return this.CONSTRUCTOR 4429 | */ 4430 | @Override 4431 | public int getConstructor() { 4432 | return CONSTRUCTOR; 4433 | } 4434 | } 4435 | 4436 | /** 4437 | * 4438 | * 4439 | *

Returns {@link MsgDataDecryptedArray MsgDataDecryptedArray}

4440 | */ 4441 | public static class MsgDecrypt extends Function { 4442 | public InputKey inputKey; 4443 | public MsgDataEncryptedArray data; 4444 | 4445 | /** 4446 | * Default constructor for a function, which 4447 | * 4448 | *

Returns {@link MsgDataDecryptedArray MsgDataDecryptedArray}

4449 | */ 4450 | public MsgDecrypt() { 4451 | } 4452 | 4453 | public MsgDecrypt(InputKey inputKey, MsgDataEncryptedArray data) { 4454 | this.inputKey = inputKey; 4455 | this.data = data; 4456 | } 4457 | 4458 | /** 4459 | * Identifier uniquely determining type of the object. 4460 | */ 4461 | public static final int CONSTRUCTOR = 223596297; 4462 | 4463 | /** 4464 | * @return this.CONSTRUCTOR 4465 | */ 4466 | @Override 4467 | public int getConstructor() { 4468 | return CONSTRUCTOR; 4469 | } 4470 | } 4471 | 4472 | /** 4473 | * 4474 | * 4475 | *

Returns {@link MsgData MsgData}

4476 | */ 4477 | public static class MsgDecryptWithProof extends Function { 4478 | public byte[] proof; 4479 | public MsgDataEncrypted data; 4480 | 4481 | /** 4482 | * Default constructor for a function, which 4483 | * 4484 | *

Returns {@link MsgData MsgData}

4485 | */ 4486 | public MsgDecryptWithProof() { 4487 | } 4488 | 4489 | public MsgDecryptWithProof(byte[] proof, MsgDataEncrypted data) { 4490 | this.proof = proof; 4491 | this.data = data; 4492 | } 4493 | 4494 | /** 4495 | * Identifier uniquely determining type of the object. 4496 | */ 4497 | public static final int CONSTRUCTOR = -2111649663; 4498 | 4499 | /** 4500 | * @return this.CONSTRUCTOR 4501 | */ 4502 | @Override 4503 | public int getConstructor() { 4504 | return CONSTRUCTOR; 4505 | } 4506 | } 4507 | 4508 | /** 4509 | * 4510 | * 4511 | *

Returns {@link Ok Ok}

4512 | */ 4513 | public static class OnLiteServerQueryError extends Function { 4514 | public long id; 4515 | public Error error; 4516 | 4517 | /** 4518 | * Default constructor for a function, which 4519 | * 4520 | *

Returns {@link Ok Ok}

4521 | */ 4522 | public OnLiteServerQueryError() { 4523 | } 4524 | 4525 | public OnLiteServerQueryError(long id, Error error) { 4526 | this.id = id; 4527 | this.error = error; 4528 | } 4529 | 4530 | /** 4531 | * Identifier uniquely determining type of the object. 4532 | */ 4533 | public static final int CONSTRUCTOR = -677427533; 4534 | 4535 | /** 4536 | * @return this.CONSTRUCTOR 4537 | */ 4538 | @Override 4539 | public int getConstructor() { 4540 | return CONSTRUCTOR; 4541 | } 4542 | } 4543 | 4544 | /** 4545 | * 4546 | * 4547 | *

Returns {@link Ok Ok}

4548 | */ 4549 | public static class OnLiteServerQueryResult extends Function { 4550 | public long id; 4551 | public byte[] bytes; 4552 | 4553 | /** 4554 | * Default constructor for a function, which 4555 | * 4556 | *

Returns {@link Ok Ok}

4557 | */ 4558 | public OnLiteServerQueryResult() { 4559 | } 4560 | 4561 | public OnLiteServerQueryResult(long id, byte[] bytes) { 4562 | this.id = id; 4563 | this.bytes = bytes; 4564 | } 4565 | 4566 | /** 4567 | * Identifier uniquely determining type of the object. 4568 | */ 4569 | public static final int CONSTRUCTOR = 2056444510; 4570 | 4571 | /** 4572 | * @return this.CONSTRUCTOR 4573 | */ 4574 | @Override 4575 | public int getConstructor() { 4576 | return CONSTRUCTOR; 4577 | } 4578 | } 4579 | 4580 | /** 4581 | * 4582 | * 4583 | *

Returns {@link OptionsConfigInfo OptionsConfigInfo}

4584 | */ 4585 | public static class OptionsSetConfig extends Function { 4586 | public Config config; 4587 | 4588 | /** 4589 | * Default constructor for a function, which 4590 | * 4591 | *

Returns {@link OptionsConfigInfo OptionsConfigInfo}

4592 | */ 4593 | public OptionsSetConfig() { 4594 | } 4595 | 4596 | public OptionsSetConfig(Config config) { 4597 | this.config = config; 4598 | } 4599 | 4600 | /** 4601 | * Identifier uniquely determining type of the object. 4602 | */ 4603 | public static final int CONSTRUCTOR = 1870064579; 4604 | 4605 | /** 4606 | * @return this.CONSTRUCTOR 4607 | */ 4608 | @Override 4609 | public int getConstructor() { 4610 | return CONSTRUCTOR; 4611 | } 4612 | } 4613 | 4614 | /** 4615 | * 4616 | * 4617 | *

Returns {@link OptionsConfigInfo OptionsConfigInfo}

4618 | */ 4619 | public static class OptionsValidateConfig extends Function { 4620 | public Config config; 4621 | 4622 | /** 4623 | * Default constructor for a function, which 4624 | * 4625 | *

Returns {@link OptionsConfigInfo OptionsConfigInfo}

4626 | */ 4627 | public OptionsValidateConfig() { 4628 | } 4629 | 4630 | public OptionsValidateConfig(Config config) { 4631 | this.config = config; 4632 | } 4633 | 4634 | /** 4635 | * Identifier uniquely determining type of the object. 4636 | */ 4637 | public static final int CONSTRUCTOR = -346965447; 4638 | 4639 | /** 4640 | * @return this.CONSTRUCTOR 4641 | */ 4642 | @Override 4643 | public int getConstructor() { 4644 | return CONSTRUCTOR; 4645 | } 4646 | } 4647 | 4648 | /** 4649 | * 4650 | * 4651 | *

Returns {@link AccountAddress AccountAddress}

4652 | */ 4653 | public static class PackAccountAddress extends Function { 4654 | public UnpackedAccountAddress accountAddress; 4655 | 4656 | /** 4657 | * Default constructor for a function, which 4658 | * 4659 | *

Returns {@link AccountAddress AccountAddress}

4660 | */ 4661 | public PackAccountAddress() { 4662 | } 4663 | 4664 | public PackAccountAddress(UnpackedAccountAddress accountAddress) { 4665 | this.accountAddress = accountAddress; 4666 | } 4667 | 4668 | /** 4669 | * Identifier uniquely determining type of the object. 4670 | */ 4671 | public static final int CONSTRUCTOR = -1388561940; 4672 | 4673 | /** 4674 | * @return this.CONSTRUCTOR 4675 | */ 4676 | @Override 4677 | public int getConstructor() { 4678 | return CONSTRUCTOR; 4679 | } 4680 | } 4681 | 4682 | /** 4683 | * 4684 | * 4685 | *

Returns {@link Data Data}

4686 | */ 4687 | public static class PchanPackPromise extends Function { 4688 | public PchanPromise promise; 4689 | 4690 | /** 4691 | * Default constructor for a function, which 4692 | * 4693 | *

Returns {@link Data Data}

4694 | */ 4695 | public PchanPackPromise() { 4696 | } 4697 | 4698 | public PchanPackPromise(PchanPromise promise) { 4699 | this.promise = promise; 4700 | } 4701 | 4702 | /** 4703 | * Identifier uniquely determining type of the object. 4704 | */ 4705 | public static final int CONSTRUCTOR = -851703103; 4706 | 4707 | /** 4708 | * @return this.CONSTRUCTOR 4709 | */ 4710 | @Override 4711 | public int getConstructor() { 4712 | return CONSTRUCTOR; 4713 | } 4714 | } 4715 | 4716 | /** 4717 | * 4718 | * 4719 | *

Returns {@link PchanPromise PchanPromise}

4720 | */ 4721 | public static class PchanSignPromise extends Function { 4722 | public InputKey inputKey; 4723 | public PchanPromise promise; 4724 | 4725 | /** 4726 | * Default constructor for a function, which 4727 | * 4728 | *

Returns {@link PchanPromise PchanPromise}

4729 | */ 4730 | public PchanSignPromise() { 4731 | } 4732 | 4733 | public PchanSignPromise(InputKey inputKey, PchanPromise promise) { 4734 | this.inputKey = inputKey; 4735 | this.promise = promise; 4736 | } 4737 | 4738 | /** 4739 | * Identifier uniquely determining type of the object. 4740 | */ 4741 | public static final int CONSTRUCTOR = 1814322974; 4742 | 4743 | /** 4744 | * @return this.CONSTRUCTOR 4745 | */ 4746 | @Override 4747 | public int getConstructor() { 4748 | return CONSTRUCTOR; 4749 | } 4750 | } 4751 | 4752 | /** 4753 | * 4754 | * 4755 | *

Returns {@link PchanPromise PchanPromise}

4756 | */ 4757 | public static class PchanUnpackPromise extends Function { 4758 | public byte[] data; 4759 | 4760 | /** 4761 | * Default constructor for a function, which 4762 | * 4763 | *

Returns {@link PchanPromise PchanPromise}

4764 | */ 4765 | public PchanUnpackPromise() { 4766 | } 4767 | 4768 | public PchanUnpackPromise(byte[] data) { 4769 | this.data = data; 4770 | } 4771 | 4772 | /** 4773 | * Identifier uniquely determining type of the object. 4774 | */ 4775 | public static final int CONSTRUCTOR = -1250106157; 4776 | 4777 | /** 4778 | * @return this.CONSTRUCTOR 4779 | */ 4780 | @Override 4781 | public int getConstructor() { 4782 | return CONSTRUCTOR; 4783 | } 4784 | } 4785 | 4786 | /** 4787 | * 4788 | * 4789 | *

Returns {@link Ok Ok}

4790 | */ 4791 | public static class PchanValidatePromise extends Function { 4792 | public byte[] publicKey; 4793 | public PchanPromise promise; 4794 | 4795 | /** 4796 | * Default constructor for a function, which 4797 | * 4798 | *

Returns {@link Ok Ok}

4799 | */ 4800 | public PchanValidatePromise() { 4801 | } 4802 | 4803 | public PchanValidatePromise(byte[] publicKey, PchanPromise promise) { 4804 | this.publicKey = publicKey; 4805 | this.promise = promise; 4806 | } 4807 | 4808 | /** 4809 | * Identifier uniquely determining type of the object. 4810 | */ 4811 | public static final int CONSTRUCTOR = 258262242; 4812 | 4813 | /** 4814 | * @return this.CONSTRUCTOR 4815 | */ 4816 | @Override 4817 | public int getConstructor() { 4818 | return CONSTRUCTOR; 4819 | } 4820 | } 4821 | 4822 | /** 4823 | * 4824 | * 4825 | *

Returns {@link QueryFees QueryFees}

4826 | */ 4827 | public static class QueryEstimateFees extends Function { 4828 | public long id; 4829 | public boolean ignoreChksig; 4830 | 4831 | /** 4832 | * Default constructor for a function, which 4833 | * 4834 | *

Returns {@link QueryFees QueryFees}

4835 | */ 4836 | public QueryEstimateFees() { 4837 | } 4838 | 4839 | public QueryEstimateFees(long id, boolean ignoreChksig) { 4840 | this.id = id; 4841 | this.ignoreChksig = ignoreChksig; 4842 | } 4843 | 4844 | /** 4845 | * Identifier uniquely determining type of the object. 4846 | */ 4847 | public static final int CONSTRUCTOR = -957002175; 4848 | 4849 | /** 4850 | * @return this.CONSTRUCTOR 4851 | */ 4852 | @Override 4853 | public int getConstructor() { 4854 | return CONSTRUCTOR; 4855 | } 4856 | } 4857 | 4858 | /** 4859 | * 4860 | * 4861 | *

Returns {@link Ok Ok}

4862 | */ 4863 | public static class QueryForget extends Function { 4864 | public long id; 4865 | 4866 | /** 4867 | * Default constructor for a function, which 4868 | * 4869 | *

Returns {@link Ok Ok}

4870 | */ 4871 | public QueryForget() { 4872 | } 4873 | 4874 | public QueryForget(long id) { 4875 | this.id = id; 4876 | } 4877 | 4878 | /** 4879 | * Identifier uniquely determining type of the object. 4880 | */ 4881 | public static final int CONSTRUCTOR = -1211985313; 4882 | 4883 | /** 4884 | * @return this.CONSTRUCTOR 4885 | */ 4886 | @Override 4887 | public int getConstructor() { 4888 | return CONSTRUCTOR; 4889 | } 4890 | } 4891 | 4892 | /** 4893 | * 4894 | * 4895 | *

Returns {@link QueryInfo QueryInfo}

4896 | */ 4897 | public static class QueryGetInfo extends Function { 4898 | public long id; 4899 | 4900 | /** 4901 | * Default constructor for a function, which 4902 | * 4903 | *

Returns {@link QueryInfo QueryInfo}

4904 | */ 4905 | public QueryGetInfo() { 4906 | } 4907 | 4908 | public QueryGetInfo(long id) { 4909 | this.id = id; 4910 | } 4911 | 4912 | /** 4913 | * Identifier uniquely determining type of the object. 4914 | */ 4915 | public static final int CONSTRUCTOR = -799333669; 4916 | 4917 | /** 4918 | * @return this.CONSTRUCTOR 4919 | */ 4920 | @Override 4921 | public int getConstructor() { 4922 | return CONSTRUCTOR; 4923 | } 4924 | } 4925 | 4926 | /** 4927 | * 4928 | * 4929 | *

Returns {@link Ok Ok}

4930 | */ 4931 | public static class QuerySend extends Function { 4932 | public long id; 4933 | 4934 | /** 4935 | * Default constructor for a function, which 4936 | * 4937 | *

Returns {@link Ok Ok}

4938 | */ 4939 | public QuerySend() { 4940 | } 4941 | 4942 | public QuerySend(long id) { 4943 | this.id = id; 4944 | } 4945 | 4946 | /** 4947 | * Identifier uniquely determining type of the object. 4948 | */ 4949 | public static final int CONSTRUCTOR = 925242739; 4950 | 4951 | /** 4952 | * @return this.CONSTRUCTOR 4953 | */ 4954 | @Override 4955 | public int getConstructor() { 4956 | return CONSTRUCTOR; 4957 | } 4958 | } 4959 | 4960 | /** 4961 | * 4962 | * 4963 | *

Returns {@link Ok Ok}

4964 | */ 4965 | public static class RawCreateAndSendMessage extends Function { 4966 | public AccountAddress destination; 4967 | public byte[] initialAccountState; 4968 | public byte[] data; 4969 | 4970 | /** 4971 | * Default constructor for a function, which 4972 | * 4973 | *

Returns {@link Ok Ok}

4974 | */ 4975 | public RawCreateAndSendMessage() { 4976 | } 4977 | 4978 | public RawCreateAndSendMessage(AccountAddress destination, byte[] initialAccountState, byte[] data) { 4979 | this.destination = destination; 4980 | this.initialAccountState = initialAccountState; 4981 | this.data = data; 4982 | } 4983 | 4984 | /** 4985 | * Identifier uniquely determining type of the object. 4986 | */ 4987 | public static final int CONSTRUCTOR = -772224603; 4988 | 4989 | /** 4990 | * @return this.CONSTRUCTOR 4991 | */ 4992 | @Override 4993 | public int getConstructor() { 4994 | return CONSTRUCTOR; 4995 | } 4996 | } 4997 | 4998 | /** 4999 | * 5000 | * 5001 | *

Returns {@link QueryInfo QueryInfo}

5002 | */ 5003 | public static class RawCreateQuery extends Function { 5004 | public AccountAddress destination; 5005 | public byte[] initCode; 5006 | public byte[] initData; 5007 | public byte[] body; 5008 | 5009 | /** 5010 | * Default constructor for a function, which 5011 | * 5012 | *

Returns {@link QueryInfo QueryInfo}

5013 | */ 5014 | public RawCreateQuery() { 5015 | } 5016 | 5017 | public RawCreateQuery(AccountAddress destination, byte[] initCode, byte[] initData, byte[] body) { 5018 | this.destination = destination; 5019 | this.initCode = initCode; 5020 | this.initData = initData; 5021 | this.body = body; 5022 | } 5023 | 5024 | /** 5025 | * Identifier uniquely determining type of the object. 5026 | */ 5027 | public static final int CONSTRUCTOR = -1928557909; 5028 | 5029 | /** 5030 | * @return this.CONSTRUCTOR 5031 | */ 5032 | @Override 5033 | public int getConstructor() { 5034 | return CONSTRUCTOR; 5035 | } 5036 | } 5037 | 5038 | /** 5039 | * 5040 | * 5041 | *

Returns {@link RawFullAccountState RawFullAccountState}

5042 | */ 5043 | public static class RawGetAccountState extends Function { 5044 | public AccountAddress accountAddress; 5045 | 5046 | /** 5047 | * Default constructor for a function, which 5048 | * 5049 | *

Returns {@link RawFullAccountState RawFullAccountState}

5050 | */ 5051 | public RawGetAccountState() { 5052 | } 5053 | 5054 | public RawGetAccountState(AccountAddress accountAddress) { 5055 | this.accountAddress = accountAddress; 5056 | } 5057 | 5058 | /** 5059 | * Identifier uniquely determining type of the object. 5060 | */ 5061 | public static final int CONSTRUCTOR = -1327847118; 5062 | 5063 | /** 5064 | * @return this.CONSTRUCTOR 5065 | */ 5066 | @Override 5067 | public int getConstructor() { 5068 | return CONSTRUCTOR; 5069 | } 5070 | } 5071 | 5072 | /** 5073 | * 5074 | * 5075 | *

Returns {@link RawTransactions RawTransactions}

5076 | */ 5077 | public static class RawGetTransactions extends Function { 5078 | public InputKey privateKey; 5079 | public AccountAddress accountAddress; 5080 | public InternalTransactionId fromTransactionId; 5081 | 5082 | /** 5083 | * Default constructor for a function, which 5084 | * 5085 | *

Returns {@link RawTransactions RawTransactions}

5086 | */ 5087 | public RawGetTransactions() { 5088 | } 5089 | 5090 | public RawGetTransactions(InputKey privateKey, AccountAddress accountAddress, InternalTransactionId fromTransactionId) { 5091 | this.privateKey = privateKey; 5092 | this.accountAddress = accountAddress; 5093 | this.fromTransactionId = fromTransactionId; 5094 | } 5095 | 5096 | /** 5097 | * Identifier uniquely determining type of the object. 5098 | */ 5099 | public static final int CONSTRUCTOR = 1029612317; 5100 | 5101 | /** 5102 | * @return this.CONSTRUCTOR 5103 | */ 5104 | @Override 5105 | public int getConstructor() { 5106 | return CONSTRUCTOR; 5107 | } 5108 | } 5109 | 5110 | /** 5111 | * 5112 | * 5113 | *

Returns {@link Ok Ok}

5114 | */ 5115 | public static class RawSendMessage extends Function { 5116 | public byte[] body; 5117 | 5118 | /** 5119 | * Default constructor for a function, which 5120 | * 5121 | *

Returns {@link Ok Ok}

5122 | */ 5123 | public RawSendMessage() { 5124 | } 5125 | 5126 | public RawSendMessage(byte[] body) { 5127 | this.body = body; 5128 | } 5129 | 5130 | /** 5131 | * Identifier uniquely determining type of the object. 5132 | */ 5133 | public static final int CONSTRUCTOR = -1789427488; 5134 | 5135 | /** 5136 | * @return this.CONSTRUCTOR 5137 | */ 5138 | @Override 5139 | public int getConstructor() { 5140 | return CONSTRUCTOR; 5141 | } 5142 | } 5143 | 5144 | /** 5145 | * 5146 | * 5147 | *

Returns {@link Ok Ok}

5148 | */ 5149 | public static class RunTests extends Function { 5150 | public String dir; 5151 | 5152 | /** 5153 | * Default constructor for a function, which 5154 | * 5155 | *

Returns {@link Ok Ok}

5156 | */ 5157 | public RunTests() { 5158 | } 5159 | 5160 | public RunTests(String dir) { 5161 | this.dir = dir; 5162 | } 5163 | 5164 | /** 5165 | * Identifier uniquely determining type of the object. 5166 | */ 5167 | public static final int CONSTRUCTOR = -2039925427; 5168 | 5169 | /** 5170 | * @return this.CONSTRUCTOR 5171 | */ 5172 | @Override 5173 | public int getConstructor() { 5174 | return CONSTRUCTOR; 5175 | } 5176 | } 5177 | 5178 | /** 5179 | * Sets new log stream for internal logging of tonlib. This is an offline method. Can be called before authorization. Can be called synchronously. 5180 | * 5181 | *

Returns {@link Ok Ok}

5182 | */ 5183 | public static class SetLogStream extends Function { 5184 | /** 5185 | * New log stream. 5186 | */ 5187 | public LogStream logStream; 5188 | 5189 | /** 5190 | * Default constructor for a function, which sets new log stream for internal logging of tonlib. This is an offline method. Can be called before authorization. Can be called synchronously. 5191 | * 5192 | *

Returns {@link Ok Ok}

5193 | */ 5194 | public SetLogStream() { 5195 | } 5196 | 5197 | /** 5198 | * Creates a function, which sets new log stream for internal logging of tonlib. This is an offline method. Can be called before authorization. Can be called synchronously. 5199 | * 5200 | *

Returns {@link Ok Ok}

5201 | * 5202 | * @param logStream New log stream. 5203 | */ 5204 | public SetLogStream(LogStream logStream) { 5205 | this.logStream = logStream; 5206 | } 5207 | 5208 | /** 5209 | * Identifier uniquely determining type of the object. 5210 | */ 5211 | public static final int CONSTRUCTOR = -1364199535; 5212 | 5213 | /** 5214 | * @return this.CONSTRUCTOR 5215 | */ 5216 | @Override 5217 | public int getConstructor() { 5218 | return CONSTRUCTOR; 5219 | } 5220 | } 5221 | 5222 | /** 5223 | * Sets the verbosity level for a specified tonlib internal log tag. This is an offline method. Can be called before authorization. Can be called synchronously. 5224 | * 5225 | *

Returns {@link Ok Ok}

5226 | */ 5227 | public static class SetLogTagVerbosityLevel extends Function { 5228 | /** 5229 | * Logging tag to change verbosity level. 5230 | */ 5231 | public String tag; 5232 | /** 5233 | * New verbosity level; 1-1024. 5234 | */ 5235 | public int newVerbosityLevel; 5236 | 5237 | /** 5238 | * Default constructor for a function, which sets the verbosity level for a specified tonlib internal log tag. This is an offline method. Can be called before authorization. Can be called synchronously. 5239 | * 5240 | *

Returns {@link Ok Ok}

5241 | */ 5242 | public SetLogTagVerbosityLevel() { 5243 | } 5244 | 5245 | /** 5246 | * Creates a function, which sets the verbosity level for a specified tonlib internal log tag. This is an offline method. Can be called before authorization. Can be called synchronously. 5247 | * 5248 | *

Returns {@link Ok Ok}

5249 | * 5250 | * @param tag Logging tag to change verbosity level. 5251 | * @param newVerbosityLevel New verbosity level; 1-1024. 5252 | */ 5253 | public SetLogTagVerbosityLevel(String tag, int newVerbosityLevel) { 5254 | this.tag = tag; 5255 | this.newVerbosityLevel = newVerbosityLevel; 5256 | } 5257 | 5258 | /** 5259 | * Identifier uniquely determining type of the object. 5260 | */ 5261 | public static final int CONSTRUCTOR = -2095589738; 5262 | 5263 | /** 5264 | * @return this.CONSTRUCTOR 5265 | */ 5266 | @Override 5267 | public int getConstructor() { 5268 | return CONSTRUCTOR; 5269 | } 5270 | } 5271 | 5272 | /** 5273 | * Sets the verbosity level of the internal logging of tonlib. This is an offline method. Can be called before authorization. Can be called synchronously. 5274 | * 5275 | *

Returns {@link Ok Ok}

5276 | */ 5277 | public static class SetLogVerbosityLevel extends Function { 5278 | /** 5279 | * New value of the verbosity level for logging. Value 0 corresponds to fatal errors, value 1 corresponds to errors, value 2 corresponds to warnings and debug warnings, value 3 corresponds to informational, value 4 corresponds to debug, value 5 corresponds to verbose debug, value greater than 5 and up to 1023 can be used to enable even more logging. 5280 | */ 5281 | public int newVerbosityLevel; 5282 | 5283 | /** 5284 | * Default constructor for a function, which sets the verbosity level of the internal logging of tonlib. This is an offline method. Can be called before authorization. Can be called synchronously. 5285 | * 5286 | *

Returns {@link Ok Ok}

5287 | */ 5288 | public SetLogVerbosityLevel() { 5289 | } 5290 | 5291 | /** 5292 | * Creates a function, which sets the verbosity level of the internal logging of tonlib. This is an offline method. Can be called before authorization. Can be called synchronously. 5293 | * 5294 | *

Returns {@link Ok Ok}

5295 | * 5296 | * @param newVerbosityLevel New value of the verbosity level for logging. Value 0 corresponds to fatal errors, value 1 corresponds to errors, value 2 corresponds to warnings and debug warnings, value 3 corresponds to informational, value 4 corresponds to debug, value 5 corresponds to verbose debug, value greater than 5 and up to 1023 can be used to enable even more logging. 5297 | */ 5298 | public SetLogVerbosityLevel(int newVerbosityLevel) { 5299 | this.newVerbosityLevel = newVerbosityLevel; 5300 | } 5301 | 5302 | /** 5303 | * Identifier uniquely determining type of the object. 5304 | */ 5305 | public static final int CONSTRUCTOR = -303429678; 5306 | 5307 | /** 5308 | * @return this.CONSTRUCTOR 5309 | */ 5310 | @Override 5311 | public int getConstructor() { 5312 | return CONSTRUCTOR; 5313 | } 5314 | } 5315 | 5316 | /** 5317 | * 5318 | * 5319 | *

Returns {@link TvmCell TvmCell}

5320 | */ 5321 | public static class SmcGetCode extends Function { 5322 | public long id; 5323 | 5324 | /** 5325 | * Default constructor for a function, which 5326 | * 5327 | *

Returns {@link TvmCell TvmCell}

5328 | */ 5329 | public SmcGetCode() { 5330 | } 5331 | 5332 | public SmcGetCode(long id) { 5333 | this.id = id; 5334 | } 5335 | 5336 | /** 5337 | * Identifier uniquely determining type of the object. 5338 | */ 5339 | public static final int CONSTRUCTOR = -2115626088; 5340 | 5341 | /** 5342 | * @return this.CONSTRUCTOR 5343 | */ 5344 | @Override 5345 | public int getConstructor() { 5346 | return CONSTRUCTOR; 5347 | } 5348 | } 5349 | 5350 | /** 5351 | * 5352 | * 5353 | *

Returns {@link TvmCell TvmCell}

5354 | */ 5355 | public static class SmcGetData extends Function { 5356 | public long id; 5357 | 5358 | /** 5359 | * Default constructor for a function, which 5360 | * 5361 | *

Returns {@link TvmCell TvmCell}

5362 | */ 5363 | public SmcGetData() { 5364 | } 5365 | 5366 | public SmcGetData(long id) { 5367 | this.id = id; 5368 | } 5369 | 5370 | /** 5371 | * Identifier uniquely determining type of the object. 5372 | */ 5373 | public static final int CONSTRUCTOR = -427601079; 5374 | 5375 | /** 5376 | * @return this.CONSTRUCTOR 5377 | */ 5378 | @Override 5379 | public int getConstructor() { 5380 | return CONSTRUCTOR; 5381 | } 5382 | } 5383 | 5384 | /** 5385 | * 5386 | * 5387 | *

Returns {@link TvmCell TvmCell}

5388 | */ 5389 | public static class SmcGetState extends Function { 5390 | public long id; 5391 | 5392 | /** 5393 | * Default constructor for a function, which 5394 | * 5395 | *

Returns {@link TvmCell TvmCell}

5396 | */ 5397 | public SmcGetState() { 5398 | } 5399 | 5400 | public SmcGetState(long id) { 5401 | this.id = id; 5402 | } 5403 | 5404 | /** 5405 | * Identifier uniquely determining type of the object. 5406 | */ 5407 | public static final int CONSTRUCTOR = -214390293; 5408 | 5409 | /** 5410 | * @return this.CONSTRUCTOR 5411 | */ 5412 | @Override 5413 | public int getConstructor() { 5414 | return CONSTRUCTOR; 5415 | } 5416 | } 5417 | 5418 | /** 5419 | * 5420 | * 5421 | *

Returns {@link SmcInfo SmcInfo}

5422 | */ 5423 | public static class SmcLoad extends Function { 5424 | public AccountAddress accountAddress; 5425 | 5426 | /** 5427 | * Default constructor for a function, which 5428 | * 5429 | *

Returns {@link SmcInfo SmcInfo}

5430 | */ 5431 | public SmcLoad() { 5432 | } 5433 | 5434 | public SmcLoad(AccountAddress accountAddress) { 5435 | this.accountAddress = accountAddress; 5436 | } 5437 | 5438 | /** 5439 | * Identifier uniquely determining type of the object. 5440 | */ 5441 | public static final int CONSTRUCTOR = -903491521; 5442 | 5443 | /** 5444 | * @return this.CONSTRUCTOR 5445 | */ 5446 | @Override 5447 | public int getConstructor() { 5448 | return CONSTRUCTOR; 5449 | } 5450 | } 5451 | 5452 | /** 5453 | * 5454 | * 5455 | *

Returns {@link SmcRunResult SmcRunResult}

5456 | */ 5457 | public static class SmcRunGetMethod extends Function { 5458 | public long id; 5459 | public SmcMethodId method; 5460 | public TvmStackEntry[] stack; 5461 | 5462 | /** 5463 | * Default constructor for a function, which 5464 | * 5465 | *

Returns {@link SmcRunResult SmcRunResult}

5466 | */ 5467 | public SmcRunGetMethod() { 5468 | } 5469 | 5470 | public SmcRunGetMethod(long id, SmcMethodId method, TvmStackEntry[] stack) { 5471 | this.id = id; 5472 | this.method = method; 5473 | this.stack = stack; 5474 | } 5475 | 5476 | /** 5477 | * Identifier uniquely determining type of the object. 5478 | */ 5479 | public static final int CONSTRUCTOR = -255261270; 5480 | 5481 | /** 5482 | * @return this.CONSTRUCTOR 5483 | */ 5484 | @Override 5485 | public int getConstructor() { 5486 | return CONSTRUCTOR; 5487 | } 5488 | } 5489 | 5490 | /** 5491 | * 5492 | * 5493 | *

Returns {@link TonBlockIdExt TonBlockIdExt}

5494 | */ 5495 | public static class Sync extends Function { 5496 | 5497 | /** 5498 | * Default constructor for a function, which 5499 | * 5500 | *

Returns {@link TonBlockIdExt TonBlockIdExt}

5501 | */ 5502 | public Sync() { 5503 | } 5504 | 5505 | /** 5506 | * Identifier uniquely determining type of the object. 5507 | */ 5508 | public static final int CONSTRUCTOR = -1875977070; 5509 | 5510 | /** 5511 | * @return this.CONSTRUCTOR 5512 | */ 5513 | @Override 5514 | public int getConstructor() { 5515 | return CONSTRUCTOR; 5516 | } 5517 | } 5518 | 5519 | /** 5520 | * 5521 | * 5522 | *

Returns {@link UnpackedAccountAddress UnpackedAccountAddress}

5523 | */ 5524 | public static class UnpackAccountAddress extends Function { 5525 | public String accountAddress; 5526 | 5527 | /** 5528 | * Default constructor for a function, which 5529 | * 5530 | *

Returns {@link UnpackedAccountAddress UnpackedAccountAddress}

5531 | */ 5532 | public UnpackAccountAddress() { 5533 | } 5534 | 5535 | public UnpackAccountAddress(String accountAddress) { 5536 | this.accountAddress = accountAddress; 5537 | } 5538 | 5539 | /** 5540 | * Identifier uniquely determining type of the object. 5541 | */ 5542 | public static final int CONSTRUCTOR = -682459063; 5543 | 5544 | /** 5545 | * @return this.CONSTRUCTOR 5546 | */ 5547 | @Override 5548 | public int getConstructor() { 5549 | return CONSTRUCTOR; 5550 | } 5551 | } 5552 | 5553 | /** 5554 | * 5555 | * 5556 | *

Returns {@link Object Object}

5557 | */ 5558 | public static class WithBlock extends Function { 5559 | public TonBlockIdExt id; 5560 | public Function function; 5561 | 5562 | /** 5563 | * Default constructor for a function, which 5564 | * 5565 | *

Returns {@link Object Object}

5566 | */ 5567 | public WithBlock() { 5568 | } 5569 | 5570 | public WithBlock(TonBlockIdExt id, Function function) { 5571 | this.id = id; 5572 | this.function = function; 5573 | } 5574 | 5575 | /** 5576 | * Identifier uniquely determining type of the object. 5577 | */ 5578 | public static final int CONSTRUCTOR = -789093723; 5579 | 5580 | /** 5581 | * @return this.CONSTRUCTOR 5582 | */ 5583 | @Override 5584 | public int getConstructor() { 5585 | return CONSTRUCTOR; 5586 | } 5587 | } 5588 | 5589 | } 5590 | -------------------------------------------------------------------------------- /src/drinkless/org/ton/TonTestJava.java: -------------------------------------------------------------------------------- 1 | package drinkless.org.ton; 2 | 3 | import java.util.concurrent.CountDownLatch; 4 | import drinkless.org.ton.Client; 5 | import drinkless.org.ton.TonApi; 6 | import drinkless.org.ton.GlobalConfig; 7 | 8 | public class TonTestJava { 9 | static class JavaClient { 10 | Client client = Client.create(null, null, null); 11 | 12 | public Object send(TonApi.Function query) { 13 | Object[] result = new Object[1]; 14 | CountDownLatch countDownLatch = new CountDownLatch(1); 15 | 16 | class Callback implements Client.ResultHandler { 17 | Object[] result; 18 | CountDownLatch countDownLatch; 19 | 20 | Callback(Object[] result, CountDownLatch countDownLatch) { 21 | this.result = result; 22 | this.countDownLatch = countDownLatch; 23 | } 24 | 25 | public void onResult(TonApi.Object object) { 26 | if (object instanceof TonApi.Error) { 27 | appendLog(((TonApi.Error) object).message); 28 | } else { 29 | result[0] = object; 30 | } 31 | if (countDownLatch != null) { 32 | countDownLatch.countDown(); 33 | } 34 | } 35 | } 36 | 37 | client.send(query, new Callback(result, countDownLatch) , null); 38 | if (countDownLatch != null) { 39 | try { 40 | countDownLatch.await(); 41 | } catch (Throwable e) { 42 | appendLog(e.toString()); 43 | } 44 | } 45 | return result[0]; 46 | } 47 | } 48 | 49 | private static void appendLog(String log) { 50 | System.out.println(log); 51 | } 52 | 53 | public static void main(String[] args) { 54 | appendLog("start..."); 55 | String[] words = { 56 | "project", 57 | "planet", 58 | "betray", 59 | "brief", 60 | "coral", 61 | "dizzy", 62 | "melody", 63 | "pepper", 64 | "mandate", 65 | "better", 66 | "bar", 67 | "like", 68 | "lock", 69 | "reveal", 70 | "gas", 71 | "hunt", 72 | "ghost", 73 | "fringe", 74 | "soap", 75 | "term", 76 | "robust", 77 | "urge", 78 | "fortune", 79 | "good" 80 | }; 81 | String dir = "."; // set your directory to storage tonlib data 82 | JavaClient client = new JavaClient(); 83 | Object result = client.send(new TonApi.Init(new TonApi.Options(new TonApi.Config(GlobalConfig.config, "", false, false), new TonApi.KeyStoreTypeDirectory((dir))))); 84 | if (!(result instanceof TonApi.OptionsInfo)) { 85 | appendLog("failed to set config"); 86 | return; 87 | } 88 | appendLog("config set ok"); 89 | TonApi.OptionsInfo info = (TonApi.OptionsInfo)result; 90 | TonApi.Key key = (TonApi.Key) client.send(new TonApi.CreateNewKey("local password".getBytes(), "mnemonic password".getBytes(), "".getBytes())); 91 | TonApi.InputKey inputKey = new TonApi.InputKeyRegular(key, "local password".getBytes()); 92 | TonApi.AccountAddress walletAddress = (TonApi.AccountAddress)client.send(new TonApi.GetAccountAddress(new TonApi.WalletV3InitialAccountState(key.publicKey, info.configInfo.defaultWalletId), 1, 0)); 93 | 94 | TonApi.Key giverKey = (TonApi.Key)client.send(new TonApi.ImportKey("local password".getBytes(), "".getBytes(), new TonApi.ExportedKey(words))) ; 95 | TonApi.InputKey giverInputKey = new TonApi.InputKeyRegular(giverKey, "local password".getBytes()); 96 | TonApi.AccountAddress giverAddress = (TonApi.AccountAddress)client.send(new TonApi.GetAccountAddress(new TonApi.WalletV3InitialAccountState(giverKey.publicKey, info.configInfo.defaultWalletId), 1, 0)); 97 | 98 | appendLog("sending coins..."); 99 | TonApi.QueryInfo queryInfo = (TonApi.QueryInfo)client.send(new TonApi.CreateQuery(giverInputKey, giverAddress, 60, new TonApi.ActionMsg(new TonApi.MsgMessage[]{new TonApi.MsgMessage(walletAddress, "", 6660000000L, new TonApi.MsgDataText("Hello".getBytes()) )}, true), new TonApi.WalletV3InitialAccountState(giverKey.publicKey, info.configInfo.defaultWalletId))); 100 | result = client.send(new TonApi.QuerySend(queryInfo.id)); 101 | if (!(result instanceof TonApi.Ok)) { 102 | appendLog("failed to send coins"); 103 | return; 104 | } 105 | appendLog("coins sent, getting balance"); 106 | 107 | while (true) { 108 | TonApi.FullAccountState state = (TonApi.FullAccountState) client.send(new TonApi.GetAccountState(walletAddress)); 109 | if (state.balance <= 0L) { 110 | try { 111 | Thread.sleep(1000); 112 | } catch (Throwable e) { 113 | appendLog(e.toString()); 114 | } 115 | } else { 116 | appendLog(String.format("balance = %d", state.balance)); 117 | break; 118 | } 119 | } 120 | } 121 | } -------------------------------------------------------------------------------- /src/libnative-lib.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ton-blockchain/tonlib-java/49b228fe710cd742e82012875ea5c09a177b1904/src/libnative-lib.dylib -------------------------------------------------------------------------------- /src/libnative-lib.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ton-blockchain/tonlib-java/49b228fe710cd742e82012875ea5c09a177b1904/src/libnative-lib.so -------------------------------------------------------------------------------- /src/native-lib.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ton-blockchain/tonlib-java/49b228fe710cd742e82012875ea5c09a177b1904/src/native-lib.dll --------------------------------------------------------------------------------