Skip to content

QuarkChain/quarkchain-web3j

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QuarkChain Web3j

The Java JSON-RPC client for QuarkChain.

Getting Started

Add the following dependency to your pom.xml:

<dependency>
	<groupId>org.quarkchain</groupId>
	<artifactId>web3j</artifactId>
	<version>0.0.1</version>
	<scope>system</scope>
	<systemPath>${project.basedir}/lib/quarkchain-web3j.jar</systemPath>
</dependency>

Start up a QuarkChain cluster such as GoQuarkChain. Or connect to devnet with url: http://jrpc.devnet.quarkchain.io:38391.

To send asynchronous requests:

Web3j web3 = Web3j.build(new HttpService());  // defaults to http://localhost:38391/
NetworkInfo network = web3.networkInfo().sendAsync().get();
Info networkInfo = network.getResult();

To send synchronous requests:

Web3j web3 = Web3j.build(new HttpService());  // defaults to http://localhost:38391/
NetworkInfo network = web3.networkInfo().send();
Info networkInfo = network.getResult();

See here for more examples.

APIs

See JSON-RPC documentation for API references.

About

Java JSON-RPC client for QuarkChain.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published