DEV Community


Posted on

Java Client Library - General Use Code Examples


Let's review some code examples on how to handle generic tasks:

-Initializing a Universe
-Initializing the Application API

Tip: if you're new to our Java library, we suggest you begin with our Get Started guide.

Initializing a Universe

A Universe is an instance of a Radix Distributed Ledger which is defined by a genesis atom and a dynamic set of unpermissioned nodes forming a network.

Available networks

Network Description
LOCALHOST_SINGLENODE A locally hosted single node connection.
A single node Betanet connection. A single node Betanet connection.

A predefined configuration to bootstrap into the LOCALHOST_SINGLENODE network is available:

BootstrapConfig config = Bootstrap.LOCALHOST_SINGLENODE;

Initializing the Application API

The Radix Application API is a client-side API exposing high-level abstractions to make DApp creation easier.

To initialize the API:

RadixApplicationAPI api = RadixApplicationAPI.create(Bootstrap.BETANET, identity);

To continually sync and pull from the network ledger on your account:

Disposable d = api.pull();

To stop syncing:


Join The Radix Community

Telegram for general chat
​Discord for developers chat
​Reddit for general discussion
Forum for technical discussion
Twitter for announcements
​Email newsletter for weekly updates
Mail to for general enquiries

Top comments (0)