interface · Browser and Node

# ReplayStore

Where the record lives. Load once at start; save gets the whole record, oldest first.

`@toip-tools/trust-core` · [View source](https://github.com/yourbuddyconner/toip-tools/blob/main/packages/trust-core/src/replayGuard.ts#L18)

Import:

```ts
import { type ReplayStore } from "@toip-tools/trust-core";
```

## Declaration

interface:

```ts
interface ReplayStore {
  load(): Promise<ReplayRecord[]>;
  save(records: ReplayRecord[]): Promise<void>;
}
```

## Methods

### `load`

Signature:

```ts
load(): Promise<ReplayRecord[]>;
```

No parameters.

#### Returns

`Promise<ReplayRecord[]>`

### `save`

Signature:

```ts
save(records: ReplayRecord[]): Promise<void>;
```

#### Parameters

- **`records` (required)**: `ReplayRecord[]`

#### Returns

`Promise<void>`

[Usage guide](https://toip.tools/toolkit/trust-core/#usage) · [Error handling](https://toip.tools/toolkit/trust-core/#errors) · [All exports](https://toip.tools/toolkit/trust-core/api/)

---

This is the Markdown version of https://toip.tools/toolkit/trust-core/api/ReplayStore/. An index of the documentation for AI assistants is at https://toip.tools/llms.txt.
