Skip to content

Latest commit

 

History

History
61 lines (42 loc) · 1.62 KB

README.md

File metadata and controls

61 lines (42 loc) · 1.62 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>fift</artifactId>
    <version>0.8.2</version>
</dependency>

Jitpack

<dependency>
    <groupId>io.github.neodix42.ton4j</groupId>
    <artifactId>fift</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 fift executable and simply use it as follows:

FiftRunner fiftRunne=FiftRunner.builder().build();
URL resource=TestFiftRunner.class.getResource("/test.fift");
        File fiftFile=Paths.get(resource.toURI()).toFile();
        String absolutePath=fiftFile.getAbsolutePath();

        FiftRunner fiftRunner=
        FiftRunner.builder()
        .fiftExecutablePath(fiftPath)
        //            .fiftAsmLibraryPath(libPath)
        //            .fiftSmartcontLibraryPath(smartcontPath)
        .build();

        String result=fiftRunner.run(fiftFile.getParent(),"-s",absolutePath);
        log.info("output: {}",result);

More examples in TestFiftRunner class.