# TimeStampProviderBase

## Content

# Interface: TimeStampProviderBase

Defines a contract for providing trusted timestamp tokens for arbitrary binary data.

## Methods

### buildTimeStampToken()

```ts
buildTimeStampToken(dataHash, timeStampParams): Promise<Uint8Array<ArrayBufferLike>>;
```

Generates a timestamp token (RFC 3161) for the provided data hash.

#### Parameters

##### dataHash

`Uint8Array`

The data hash to be timestamped.

##### timeStampParams

[`TimeStampParams`](../type-aliases/TimeStampParams)

The [TimeStampParams](../type-aliases/TimeStampParams) returned by [TimeStampProviderBase.getTimeStampParams](#gettimestampparams).

#### Returns

`Promise`&lt;`Uint8Array`&lt;`ArrayBufferLike`&gt;&gt;

A promise that resolves to a DER-encoded timestamp token.

***

### getTimeStampParams()

```ts
getTimeStampParams(): Promise<TimeStampParams>;
```

Prepares parameters required for the first stage of the timestamping process.

This method performs validation, initializes timestamping-related data,
and collects all inputs required for building the final timestamp container.
It corresponds to the "preparation stage" of timestamping.

#### Returns

`Promise`&lt;[`TimeStampParams`](../type-aliases/TimeStampParams)&gt;

A [TimeStampParams](../type-aliases/TimeStampParams) object containing parameters required for timestamp generation

#### Throws

If the configured timestamp format is invalid or unsupported.
