> For the complete documentation index, see [llms.txt](https://docs.timeseal.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.timeseal.com/the-sdk/javascript.md).

# Javascript

The TimeSeal Node.js SDK allows you to easily integrate TimeSeal's API into your Node.js applications. This documentation provides an overview of how to install the SDK, authenticate using your API key, and make requests to the TimeSeal API endpoints.

### Installation

You can install the TimeSeal Node.js SDK using npm, the Node.js package manager. Open a terminal and run the following command:

```bash
npm install timeseal-sdk
```

### Usage

1. Import the TimeSeal SDK and configure it with your API key.

```javascript
const TimesealSDK = require('timeseal-sdk');

const config = {
    apikey: process.env.TIMESEAL_API_KEY,
};

const timeseal = new TimesealSDK(config);
```

2. Make API requests using the Timeseal SDK.

```javascript
const response = await timeseal.Timeseal.v1.timeseal({
    data: "test",
    type: "create",
});
```

### API Reference

#### `timeseal.Timeseal.v1.timeseal(options)`

This method sends a request to create a TimeSeal for the specified data.

* `options` (object): An object containing the request parameters.
  * `data` (string): The data to be TimeSealed.
  * `type` (string): The type of operation. Can be `create`, `update` or `delete`

Returns a Promise that resolves to the API response.

### Conclusion

The TimeSeal Node.js SDK provides a simple way to interact with the TimeSeal API using Node.js applications. By following the installation and usage instructions, you can seamlessly integrate timesealing functionality into your projects. For more information about the TimeSeal API endpoints and features, refer to the official [TimeSeal API documentation.](/the-api.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.timeseal.com/the-sdk/javascript.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
