Let's review some code examples on how to handle generic tasks:
​Initializing a Universe​
Tip: if you're new to our Java library, we suggest you begin with our Get Started guide.
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.
Network | Description |
| A locally hosted single node connection. |
| A single node Betanet connection. |
A predefined configuration to bootstrap into the LOCALHOST_SINGLENODE network is available:
BootstrapConfig config = Bootstrap.LOCALHOST_SINGLENODE;
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:
d.dispose();