Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 1.47 KB

README.md

File metadata and controls

56 lines (37 loc) · 1.47 KB

Liteclient module

Java Lite-client wrapper uses JNA to access methods in native lite-client binary.

Maven Maven Central

<dependency>
    <groupId>io.github.neodix42</groupId>
    <artifactId>tolk</artifactId>
    <version>0.8.2</version>
</dependency>

Jitpack

<dependency>
    <groupId>io.github.neodix42.ton4j</groupId>
    <artifactId>tolk</artifactId>
    <version>0.8.2</version>
</dependency>

Usage

Notice, if you installed TON binaries using package managers like brew, apt or chocolatey you can omit specifying path to a func executable and simply use it as follows:

TolkRunner tolkRunner=TolkRunner.builder().build();
URL resource=TestTolkRunner.class.getResource("/test.tolk");
        File tolkFile=Paths.get(resource.toURI()).toFile();
        String absolutePath=tolkFile.getAbsolutePath();

        TolkRunner tolkRunner=TolkRunner.builder().tolkExecutablePath(tolkPath).build();

        String result=tolkRunner.run(tolkFile.getParent(),absolutePath);
        log.info("output: {}",result);

More examples in TestTolkRunner class.