Skip to content

Latest commit

 

History

History
56 lines (37 loc) · 1.49 KB

README.md

File metadata and controls

56 lines (37 loc) · 1.49 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>func</artifactId>
    <version>0.8.2</version>
</dependency>

Jitpack

<dependency>
    <groupId>io.github.neodix42.ton4j</groupId>
    <artifactId>func</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:

FuncRunner funcRunner=FuncRunner.builder().build();
        URL resource=TestFuncRunner.class.getResource("/test.fc");
        File funcFile=Paths.get(resource.toURI()).toFile();
        String absolutePath=funcFile.getAbsolutePath();

        FuncRunner funcRunner=FuncRunner.builder().funcExecutablePath(resourcePath).build();

        String result=funcRunner.run(funcFile.getParent(),"-PA",absolutePath);
        log.info("output: {}",result);

More examples in TestFuncRunner class.