Skip to content
LBRY JSON-RPC bindings for Kotlin/Java.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

LBRY JSON-RPC bindings for Kotlin/Java.


Artifacts are published on maven:



The LbryApi object should be initialized once and cached by the client application. The Command object should be provided an Array or HashMap depending on the RPC method being invoked.

A Call may be executed synchronously with execute(), or asynchronously with enqueue(retrofit2.Callback). In either case the call can be canceled at any time with cancel(). A call that is busy writing its request or reading its response may receive a IOException.

A Response wraps the HTTP response, including the response code, body, and headers. Various convenience methods such as isSuccessful() exist.

Java API objects are accessed via the LBRY namespace:

    // Daemon API
    LbryApi api = LBRY.getDaemonApi();
    Call call = Command("resolve", ImmutableMap.of("uri", "what")));
    Response response = call.execute();
    // lbrycrd server API
    LbryApi api = LBRY.getLbrycrdApi("<username>", "<password>");
    Call call = Command("help"));
    Response response = call.execute();

Kotlin accesses api objects via top level methods.

    // Daemon API
    val api = getDaemonApi()
    val call ="resolve", mapOf("uri" to "what")))
    val response = call.execute()
    val data = response.body()

    // lbrycrd server API
    val api = getLbrycrdApi("<username>", "<password>")
    val call ="help"))
    val response = call.execute()
    val data = response.body()


Leverages Retrofit2, Gson, Kotlin, and Maven.

Unit Tests

There are some unit tests, but they were mainly used to manually verify that the retrofit configuration wasn't completely broken.


This project uses a standard Maven build process to package a jar library. Run mvn package to create the jar.

You can’t perform that action at this time.