Sila API Docs | Sila Banking and Payments API

Welcome to the Sila API!

Java SDK

Version 0.2.21

🚧

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.21</version>
</dependency>

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

/* We are refactoring the sdk, you can still use this way to 
initialize the api. Even though there are some endpoints that
need the new way*/  
SilaApi api = new SilaApi(
  Environments.SilaEnvironment.SANDBOX,
  appHandle,
  privateKey
);

/*New way initializing api, this is a singleton instance so you
only need to initialize once. (By now, old way is still needed
in not deprecated methods.)*/
SilaApi.init(Environment.PRODUCTION, "appHandle", "appPrivateKey");


/* This 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.*/

Wallet Generation

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

Updated 8 days ago


Java SDK


Version 0.2.21

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.