timeseal

Documentation for /timeseal endpoint

Overview

The /timestamp endpoint is a part of our blockchain-based timestamping API that allows you to securely timestamp data on the blockchain. Timestamping data on the blockchain ensures the immutability and tamper-proof nature of the data, providing strong evidence of the data's existence and integrity at a specific point in time.

To access the /timestamp endpoint, you need a valid API key, the data you want to timestamp, and the type of change you are making to the data. The API will then process your request, generate a cryptographic hash of the data, and record it as a timestamp on the designated blockchain.

Request Parameters

The /timestamp endpoint requires the following parameters in the request body:

data (string, required)

The data you want to timestamp on the blockchain. It can be any string or JSON data representing the information you want to store.

type (string, required)

The type of change you are making to the data. This parameter helps in categorizing different types of updates to the data. Examples of type include "create," "update," or "delete". This information is not stored on the blockchain and is only used as metadata.

Example Request

await axios.post(
  "https://api.timeseal.com/v1/timestamp",
  { data: "{inventoryItems: 5}", type: "created" },
  { 
    headers: { 
      apiKey: process.env.TIMESEAL_API_KEY
    }
  },
);

Response

The API will respond with a JSON object containing the timestamping details.

Example Response

{
    "status": "success",
    "msg": "operation completed successfully !",
    "txIds": [
        {
            "txId": "cb8f8e8c2116dd7177a63b5726dbaed332c37691bd5045d1855c6d7f9f81d53e",
            "url": "B://cb8f8e8c2116dd7177a63b5726dbaed332c37691bd5045d1855c6d7f9f81d53e"
        }
    ],
    "errors": []
}
  • status (string): Indicates the status of the operation. Possible values are "success", "error" or other relevant status indicators.

  • msg (string): A human-readable message providing information about the outcome of the operation.

  • txIds (array): An array containing objects with information about transaction IDs and their corresponding URLs.

    • txId (string): The unique identifier for a transaction.

    • url (string): The URL associated with the transaction ID, typically in the format "B://txId".

  • errors (array): An array that may contain error objects if there were issues during the operation. Each error object should provide relevant information about the error.

Warning

Please be advised that when utilizing our services, all data is stored as-is on the blockchain. It is essential to recognize that information stored on the blockchain is publicly visible and can be accessed by anyone. Therefore, we strongly recommend encrypting any sensitive or private data before storing it on the blockchain. Failing to do so may expose your confidential information to unintended parties. By using our service, you acknowledge the inherent risks associated with the transparency of blockchain technology, and you bear the responsibility to take appropriate measures to protect your privacy.

Last updated