Getting Started

First, add jitpack to your root gradle file at the end of repositories:

allprojects {
    repositories {
    ...
        maven { url 'https://jitpack.io'}
    }
}

Adding Quark Chain Client SDK as a Maven Dependency

For “Maven” add this dependency to your module:

<dependency>
        <groupId>com.github.centerprime</groupId>
        <artifactId>Quark-Chain-Client-SDK</artifactId>
        <version>1.0.8</version>
</dependency>

For “Gradle” add this dependency to your module:

dependencies {
     implementation 'com.github.centerprime:Quark-Chain-Client-SDK:1.0.8'
}

Basic Usage

Once you have the dependencies set up you can start using CenterPrime by creating a Quark Chain Wallet:

public class MainActivity extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        QKCManager qkcManager = QKCManager.getInstance();

        qkcManager.createWallet("{{wallet_password}}", this)
                .subscribeOn(Schedulers.io())
                .observeOn(AndroidSchedulers.mainThread())
                .subscribe(wallet -> {
                    String walletAddress = wallet.getAddress();
                    String keystore = wallet.getKeystore();
            
            String qckWalletAddress = QKCManager.
                            getQCKAddress(walletAddress,this);
            int chainId = 1;
            int shardId = 0;
            String chainId1 = QKCManager.getQCKAddressByChainIdAndShardId(qckWalletAddress, chainId , shardId, this);
            
                }, error -> {
                    System.out.println(error);
                });
    }
}

Congratulations! Now you are a CenterPrime user.