Skip to content

ismoli/minter-java-sdk

Repository files navigation

minter-java-sdk

Plain Java SDK for Minter blockchain

This is fork of Android java libs by MinterTeam https://github.com/MinterTeam?utf8=%E2%9C%93&q=&type=&language=java

All Android deps removed.

If you don't wish to build it yourself, just take jars from build/libs folder. Native libs are required to run this and can be found in libs/x86 folder. Pass path to native libs as VM parameter:

-Djava.library.path=/somepath/libs/x86

Use something like this to initialize SDK before use:

private static final String BASE_API_URL_PROD = "https://explorer-api.apps.minter.network/api/";
private static final String GATE_API_URL_PROD = "https://gate.apps.minter.network/api/";
private static final String BASE_NODE_URL_PROD = "https://minter-node.apps.minter.network";

private static final String BASE_API_URL_TEST = "https://explorer-api.testnet.minter.network/api/";
private static final String GATE_API_URL_TEST = "https://gate.minter.network/api/";
private static final String BASE_NODE_URL_TEST = "http://138.197.222.87:8841";

and then...

       MinterSDK.initialize(env); //env is TEST or PROD

    if (env.equalsIgnoreCase("prod")) {
        BuildConfig.BLOCKCHAIN_ID = BlockchainID.MainNet;
        MinterExplorerApi.initialize(BASE_API_URL_PROD, GATE_API_URL_PROD);
        MinterBlockChainApi.initialize(BASE_NODE_URL_PROD);
    } else {
        BuildConfig.BLOCKCHAIN_ID = BlockchainID.TestNet;
        MinterExplorerApi.initialize(BASE_API_URL_TEST, GATE_API_URL_TEST);
        MinterBlockChainApi.initialize(BASE_NODE_URL_TEST);
    }

About

Plain Java SDK for Minter blockchain

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages