originstamp-client-fetch
Version:
TypeScript Fetch client for the OriginStamp service
84 lines (72 loc) • 2.86 kB
text/typescript
/* tslint:disable */
/* eslint-disable */
/**
* OriginStamp Timestamping
* OriginStamp Timestamping leverages decentralized blockchain technology to create anonymous, tamper-proof timestamps for digital content. This service enables users to timestamp files, emails, or plain text, and store the resulting hashes on the blockchain. Users can also retrieve and verify timestamps that have been committed. The trusted timestamping mechanism ensures that a hash fingerprint can be generated and used as proof that specific data existed at a given point in time.
*
* The version of the OpenAPI document: 1.0.0
* Contact: support@originstamp.com
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
import { mapValues } from '../runtime';
import type { TimestampData } from './TimestampData';
import {
TimestampDataFromJSON,
TimestampDataFromJSONTyped,
TimestampDataToJSON,
TimestampDataToJSONTyped,
} from './TimestampData';
/**
*
* @export
* @interface HashStatusResponse
*/
export interface HashStatusResponse {
/**
* The time when your hash was submitted to OriginStamp. The date is returned in the following format: [ms] since 1.1.1970 (unix epoch), timezone: UTC. This is not considered as a true timestamp.
* @type {number}
* @memberof HashStatusResponse
*/
dateCreated: number;
/**
*
* @type {Array<TimestampData>}
* @memberof HashStatusResponse
*/
trees: Array<TimestampData>;
}
/**
* Check if a given object implements the HashStatusResponse interface.
*/
export function instanceOfHashStatusResponse(value: object): value is HashStatusResponse {
if (!('dateCreated' in value) || value['dateCreated'] === undefined) return false;
if (!('trees' in value) || value['trees'] === undefined) return false;
return true;
}
export function HashStatusResponseFromJSON(json: any): HashStatusResponse {
return HashStatusResponseFromJSONTyped(json, false);
}
export function HashStatusResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): HashStatusResponse {
if (json == null) {
return json;
}
return {
'dateCreated': json['dateCreated'],
'trees': ((json['trees'] as Array<any>).map(TimestampDataFromJSON)),
};
}
export function HashStatusResponseToJSON(json: any): HashStatusResponse {
return HashStatusResponseToJSONTyped(json, false);
}
export function HashStatusResponseToJSONTyped(value?: HashStatusResponse | null, ignoreDiscriminator: boolean = false): any {
if (value == null) {
return value;
}
return {
'dateCreated': value['dateCreated'],
'trees': ((value['trees'] as Array<any>).map(TimestampDataToJSON)),
};
}