Skip to content
This repository was archived by the owner on Feb 17, 2026. It is now read-only.

Commit d5c40a0

Browse files
authored
Update client (#3)
1 parent cb9769d commit d5c40a0

79 files changed

Lines changed: 3133 additions & 1988 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.swagger-codegen-ignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,3 @@
2121
#docs/*.md
2222
# Then explicitly reverse the ignore rule for a single file:
2323
#!docs/README.md
24-
25-
.gitignore

.swagger-codegen/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.3.1
1+
2.4.18

CONVENTIONS.md

Lines changed: 0 additions & 92 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 OriginStamp
3+
Copyright (c) 2021 OriginStamp
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 72 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,32 @@
11
# OriginStamp Java Client
2+
23
[![Build Status](https://travis-ci.com/OriginStampTimestamping/originstamp-client-java.svg?token=pQzQz38vk99v2uad9eWc&branch=master)](https://travis-ci.com/OriginStampTimestamping/originstamp-client-java)
34

45
![](https://originstamp.com/assets/images/logo/logo_simple_small.png)
56

6-
> A Java implementation of the OriginStamp API. For endpoint documentation see [OriginStamp Documentation](https://docs.originstamp.com)
77

8-
## Table of Contents
8+
> A Java implementation of the OriginStamp API. For endpoint documentation see [OriginStamp Documentation](https://docs.originstamp.com).
99
10-
- [Installation](#installation)
11-
- [Usage](#usage)
12-
- [Building](#building)
13-
- [Contribute](#contribute)
14-
- [License](#license)
1510

16-
## Installation
11+
## OriginStamp API Documentation
12+
13+
OriginStamp is a trusted timestamping service that uses the decentralized blockchain to store anonymous, tamper-proof timestamps for any digital content. OriginStamp allows users to timestamp files, emails, or plain text, and subsequently store the created hashes in the blockchain as well as retrieve and verify timetamps that have been committed to the blockchain.The trusted timestamping service of OriginStamp allows you to generate a hash fingerprint and prove that it was created at a specific point in time. If you are interested in integrating trusted timestamping into your own project, feel free to use our provided API. The following interactive documentation describes the interfaces and supports your integration. With this documentation you are able to try out the different requests and see the responses. For the authorization, add your API key to the Authorization header of your request.<br/><h2>Timestamping Steps</h2><ol><li><strong>Determine Hash: </strong> Calculate the SHA-256 of your record using a cryptographic library.</li><li><strong>Create Timestamp: </strong>Create a timestamp and add meta information to index it, e.g. a comment. You can also request a notification (email or webhook) once the tamper-proof timestamp has been created.</li><li><strong>Archive original file: </strong>Since we have no access to your original data, you should archive it because the timestamp is only valid in combination with the original file.</li><li><strong>Check Timestamp Status: </strong>Since the timestamps are always transmitted to the blockchain network at certain times, i.e. there is a delay, you can check the status of a hash and thus get the timestamp information.</li><li><strong>Get Timestamp Proof: </strong>As soon as the tamper-proof timestamp has been generated, you should archive the proof (Merkle Tree), which we created in our open procedure, together with the original file. With this proof, the existence of the file can be verified independently of OriginStamp. Here you can choose if the raw proof (xml) is sufficient proof or if you want to have a certificate (pdf).</li></ol><br/><h2>Installation Notes</h2><ul><li>Make sure you set the Authorization header correctly using your API key.</li><li>If a Cloudflare error occurs, please set a custom UserAgent header.</li><li>Please have a look at the models below to find out what each field means.</li></ul>
1714

18-
### Official releases
15+
For more information, please visit [https://originstamp.com](https://originstamp.com)
1916

20-
You can use this project by downloading the .zip file from one of the [releases](https://github.com/OriginStampTimestamping/originstamp-client-java/releases).
2117

22-
### Maven, Gradle, SBT
2318

24-
Package managers are supported through [JitPack](https://jitpack.io/#OriginStampTimestamping/originstamp-client-java/) which supports Maven, Gradle, SBT, etc.
19+
## Requirements
20+
21+
Building and using the API client library requires:
22+
1. Java 1.7+
23+
2. Maven/Gradle
24+
25+
## Installation
26+
27+
Releases are listed [here](https://github.com/OriginStampTimestamping/originstamp-client-java/releases).
28+
29+
### Maven users
2530

2631
For Maven, add the following sections to your pom.xml (replacing $LATEST_VERSION):
2732
```
@@ -40,19 +45,27 @@ For Maven, add the following sections to your pom.xml (replacing $LATEST_VERSION
4045
4146
```
4247

43-
### Building
44-
Building the API client library requires [Maven](https://maven.apache.org/) to be installed.
4548

46-
* Clone this repository
47-
* Add the maven dependency
48-
* mvn clean install
49+
### Gradle users
50+
51+
Add this dependency to your project's build file:
52+
53+
```groovy
54+
compile "io.swagger:swagger-java-client:1.0.0"
55+
```
56+
57+
### Others
58+
59+
At first generate the JAR by executing:
4960

50-
### OriginStamp
61+
```shell
62+
mvn clean package
63+
```
5164

52-
OriginStamp.com can be used to prove the existence of a record at a specific point in time.
53-
The resulting timestamps can be used, for example, to secure supply chains, prove damage, simplify regulatory compliance, and prove the authorship of data, such as photos.
54-
Originally launched in 2011 as a research project to protect researchers ideas,
55-
OriginStamp has now become a commercial product and the leading platform for blockchain-based timestamps due to the ever-increasing demand.
65+
Then manually install the following JARs:
66+
67+
* `target/swagger-java-client-1.0.0.jar`
68+
* `target/lib/*.jar`
5669

5770
## Getting Started
5871

@@ -65,16 +78,17 @@ import com.originstamp.api.TimestampApi;
6578
...
6679

6780

68-
TimestampApi apiInstance = new TimestampApi();
69-
String authorization = "authorization_example"; // String | A valid API key is essential for authorization to handle the request.
70-
TimestampRequest timestampRequest = new TimestampRequest(); // TimestampRequest | DTO for the hash submission. Add all relevant information concerning your hash submission.
71-
try {
72-
DefaultTimestampResponse result = apiInstance.createTimestamp(authorization, timestampRequest);
73-
System.out.println(result);
74-
} catch (ApiException e) {
75-
System.err.println("Exception when calling TimestampApi#createTimestamp");
76-
e.printStackTrace();
77-
}
81+
TimestampApi apiInstance = new TimestampApi();
82+
String authorization = "authorization_example"; // String | A valid API key is essential for authorization to handle the request.
83+
TimestampRequest timestampRequest = new TimestampRequest(); // TimestampRequest | DTO for the hash submission. Add all relevant information concerning your hash submission.
84+
try {
85+
DefaultTimestampResponse result = apiInstance.createTimestamp(authorization, timestampRequest);
86+
System.out.println(result);
87+
} catch (ApiException e) {
88+
System.err.println("Exception when calling TimestampApi#createTimestamp");
89+
e.printStackTrace();
90+
}
91+
7892
```
7993

8094
## Documentation for API Endpoints
@@ -83,36 +97,43 @@ All URIs are relative to *https://api.originstamp.com*
8397

8498
Class | Method | HTTP request | Description
8599
------------ | ------------- | ------------- | -------------
86-
*SchedulerApi* | [**getNextSchedulingTime**](docs/SchedulerApi.md#getNextSchedulingTime) | **POST** /v3/submission/times | NextSchedule
100+
*ApiKeyApi* | [**getApiKeyUsage**](docs/ApiKeyApi.md#getApiKeyUsage) | **GET** /v3/api_key/usage | Usage
101+
*ProofApi* | [**getProof**](docs/ProofApi.md#getProof) | **POST** /v3/timestamp/proof/url | Proof
102+
*SchedulerApi* | [**getActiveCurrencies**](docs/SchedulerApi.md#getActiveCurrencies) | **GET** /v3/currencies/get | Get active currencies
87103
*TimestampApi* | [**createTimestamp**](docs/TimestampApi.md#createTimestamp) | **POST** /v3/timestamp/create | Submission
88-
*TimestampApi* | [**getApiKeyUsage**](docs/TimestampApi.md#getApiKeyUsage) | **GET** /v3/api_key/usage | Usage
89104
*TimestampApi* | [**getHashStatus**](docs/TimestampApi.md#getHashStatus) | **GET** /v3/timestamp/{hash_string} | Status
90-
*TimestampApi* | [**getProof**](docs/TimestampApi.md#getProof) | **POST** /v3/timestamp/proof | Proof
91-
*TimestampApi* | [**triggerTimestampWebhook**](docs/TimestampApi.md#triggerTimestampWebhook) | **POST** /v3/webhook/start | Dev
105+
*TimestampApi* | [**getHashStatusForUrlId**](docs/TimestampApi.md#getHashStatusForUrlId) | **GET** /v3/timestamp/url/{url_id} | Status for URL ID
106+
*WebhookApi* | [**getWebhookStatus**](docs/WebhookApi.md#getWebhookStatus) | **POST** /v3/webhook/information | Webhook
107+
*WebhookApi* | [**registerWebhookNotification**](docs/WebhookApi.md#registerWebhookNotification) | **POST** /v3/webhook/register | Webhook
108+
*WebhookApi* | [**triggerTimestampWebhook**](docs/WebhookApi.md#triggerTimestampWebhook) | **POST** /v3/webhook/start | Dev
92109

93110

94111
## Documentation for Models
95112

96-
- [DefaultSchedulerResponse](docs/DefaultSchedulerResponse.md)
97-
- [DefaultTimestampResponse](docs/DefaultTimestampResponse.md)
98-
- [DefaultUsageResponse](docs/DefaultUsageResponse.md)
99-
- [Defaultstring](docs/Defaultstring.md)
100-
- [Notification](docs/Notification.md)
101-
- [ProofRequest](docs/ProofRequest.md)
102-
- [ResponseEntity](docs/ResponseEntity.md)
103-
- [SchedulerRequest](docs/SchedulerRequest.md)
104-
- [SchedulerResponse](docs/SchedulerResponse.md)
105-
- [TimestampData](docs/TimestampData.md)
106-
- [TimestampRequest](docs/TimestampRequest.md)
107-
- [TimestampResponse](docs/TimestampResponse.md)
108-
- [UsageResponse](docs/UsageResponse.md)
109-
- [WebhookRequest](docs/WebhookRequest.md)
113+
- [CurrencyModel](docs/CurrencyModel.md)
114+
- [DefaultOfDownloadLinkResponse](docs/DefaultOfDownloadLinkResponse.md)
115+
- [DefaultOfListOfCurrencyModel](docs/DefaultOfListOfCurrencyModel.md)
116+
- [DefaultOfTimestampResponse](docs/DefaultOfTimestampResponse.md)
117+
- [DefaultOfWebhookResponse](docs/DefaultOfWebhookResponse.md)
118+
- [DefaultOfstring](docs/DefaultOfstring.md)
119+
- [DefaultUsageResponse](docs/DefaultUsageResponse.md)
120+
- [DownloadLinkResponse](docs/DownloadLinkResponse.md)
121+
- [ManualWebhookRequest](docs/ManualWebhookRequest.md)
122+
- [ModelDefault](docs/ModelDefault.md)
123+
- [Notification](docs/Notification.md)
124+
- [ProofRequest](docs/ProofRequest.md)
125+
- [TimestampData](docs/TimestampData.md)
126+
- [TimestampRequest](docs/TimestampRequest.md)
127+
- [TimestampResponse](docs/TimestampResponse.md)
128+
- [UsageResponse](docs/UsageResponse.md)
129+
- [WebhookRequest](docs/WebhookRequest.md)
130+
- [WebhookResponse](docs/WebhookResponse.md)
110131

111132

112133
## Documentation for Authorization
113134

114135
Authentication schemes defined for the API:
115-
### Key Authorization
136+
### API Key Authorization
116137

117138
- **Type**: API key
118139
- **API key parameter name**: Authorization
@@ -123,11 +144,7 @@ Authentication schemes defined for the API:
123144

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

126-
127147
## Author
128148

129149
mail@originstamp.com
130150

131-
## Coding Conventions
132-
133-
Please see [CONVENTIONS.md](CONVENTIONS.md).

build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ if(hasProperty('target') && target == 'android') {
8888
}
8989

9090
task execute(type:JavaExec) {
91-
main = System.getProperty('mainClass')
92-
classpath = sourceSets.main.runtimeClasspath
91+
main = System.getProperty('mainClass')
92+
classpath = sourceSets.main.runtimeClasspath
9393
}
9494
}
9595

9696
dependencies {
97-
compile 'io.swagger:swagger-annotations:1.5.15'
97+
compile 'io.swagger:swagger-annotations:1.5.17'
9898
compile 'com.squareup.okhttp:okhttp:2.7.5'
9999
compile 'com.squareup.okhttp:logging-interceptor:2.7.5'
100100
compile 'com.google.code.gson:gson:2.8.1'

0 commit comments

Comments
 (0)