Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

OriginStamp Java Client

Build Status

A Java implementation of the OriginStamp API. For endpoint documentation see OriginStamp Documentation.

For more information, please visit https://originstamp.com

Requirements

Building and using the API client library requires:

  1. Java 1.7+
  2. Maven/Gradle

Installation

Releases are listed here.

Maven users

For Maven, add the following sections to your pom.xml (replacing $LATEST_VERSION):

  <repositories>
    <repository>
        <id>jitpack.io</id>
        <url>https://jitpack.io</url>
    </repository>
  </repositories>
  
  <dependency>
    <groupId>com.github.OriginStampTimestamping</groupId>
    <artifactId>originstamp-client-java</artifactId>
    <version>$LATEST_VERSION</version>
  </dependency>
  

Gradle users

Add this dependency to your project's build file:

compile "com.originstamp:originstamp-client-java:$LATEST_VERSION"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/originstamp-client-java-$LATEST_VERSION.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

import com.originstamp.api.client.*;
import com.originstamp.api.client.auth.*;
import com.originstamp.model.*;
import com.originstamp.api.TimestampApi;

import java.io.File;
import java.util.*;

public class ClientExample {

    public static void main(String[] args) {
        TimestampApi apiInstance = new TimestampApi();
        String authorization = "authorization_example"; // String | A valid API key is essential for authorization to handle the request.
        TimestampRequest timestampRequest = new TimestampRequest(); // TimestampRequest | DTO for the hash submission. Add all relevant information concerning your hash submission.
        try {
            DefaultOfTimestampResponse result = apiInstance.createTimestamp(authorization, timestampRequest);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling TimestampApi#createTimestamp");
            e.printStackTrace();
        }
    }
}

Documentation for API Endpoints

All URIs are relative to https://api.originstamp.com

Class Method HTTP request Description
ApiKeyApi getApiKeyUsage GET /v3/api_key/usage Usage
BulkApi createBulkTimestamp POST /v4/timestamp/bulk/create Bulk Submission
BulkApi getSeedStatus GET /v4/timestamp/status/seed/{seed_id} Seed Status
ProofApi getProof POST /v3/timestamp/proof/url Proof
SchedulerApi getActiveCurrencies GET /v3/currencies/get Get active currencies
TimestampApi createTimestamp POST /v4/timestamp/create Submission
TimestampApi getHashStatus GET /v4/timestamp/{hash_string} Status
TimestampApi getSeedStatus GET /v4/timestamp/status/seed/{seed_id} Seed Status
WebhookApi getWebhookStatus POST /v3/webhook/information Webhook
WebhookApi registerWebhookNotification POST /v3/webhook/register Webhook
WebhookApi triggerTimestampWebhook POST /v3/webhook/start Dev

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

API Key Authorization

  • Type: API key
  • API key parameter name: Authorization
  • Location: HTTP header

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

mail@originstamp.com

About

Java Client for the OriginStamp service

Resources

License

Packages

No packages published

Languages