🚧

NOTE: This SDK is a Release Candidate.

The Java SDK requires JDK 11 or later.

Initialization sets up the app private key and handle for the SDK to use for signing subsequent requests. The other SDK functionality will not be available until this configuration is completed. The SDK does not store this information outside of the instance that is configured. Private keys are never transmitted over the network or stored outside the scope of this instance.

  

Installation

// Installation
// Add the SDK from the Maven repository.
<dependency>
    <groupId>com.silamoney.client</groupId>
    <artifactId>SilamoneySDK</artifactId>
    <version>0.2.48</version>
</dependency>

// Initialize the application
import com.silamoney.client.api.SilaApi;

SilaApi api = new SilaApi(
  Environments.SilaEnvironment.SANDBOX,
  appHandle,
  privateKey
);

Wallet Generation

The installation step does not require ==wallet generation== the Wallet Generation code provided here are the wallet environment variables that you will need when you get to the register step. They will live with the other environment variable but you do not need them in the initial installation set up.

// Generate wallet
Wallet wallet = api.generateWallet();
System.out.println(wallet.getBlockChainAddress()); // Wallet public address
System.out.println(wallet.getPrivateKey()); // Wallet private key

Did this page help you?