# SerializedSnapshotSet

Defined in: [packages/snapshot-set/src/serialization/json.ts:39](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/snapshot-set/src/serialization/json.ts#L39)

A plain, inert description of a [SnapshotSet](/reference/knotkit/snapshot-set/interfaces/snapshotset/). It holds no behavior and no reference to the structure it came from, so it can be stored, compared, structurally cloned, or sent through `postMessage`. It survives `JSON.stringify` when the values themselves do.

`values` lists every value ever registered, in first-registration order, including values currently absent — a value’s `history` alone determines whether it is present at any given version, so reconstructing that requires every registered value, not just the current members. `history[i]` is the strictly increasing toggle-version list for `values[i]`. `snapshots` is every id `createSnapshot()` has minted, ascending. `version` is the current version counter.

Serialization here is **faithful, not canonical**: two structures with identical observable behavior can serialize differently if they took different mutation paths. An `add` followed by a `delete` of the same value between two snapshots leaves two toggle entries behind that a canonicalized form would collapse away, but canonicalizing would mean renumbering versions — and a caller may be holding an id minted under the old numbering. `knotkit/disjoint-set`’s serialization is canonical instead, because it exposes no ids: nothing constrains it to preserve a numbering scheme, so two structures with the same partition always serialize identically.

## Type Parameters

### T

`T`

## Properties

### schemaVersion

> `readonly` **schemaVersion**: `1`

Defined in: [packages/snapshot-set/src/serialization/json.ts:41](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/snapshot-set/src/serialization/json.ts#L41)

Wire-schema version.

***

### kind

> `readonly` **kind**: `"version-chain"`

Defined in: [packages/snapshot-set/src/serialization/json.ts:43](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/snapshot-set/src/serialization/json.ts#L43)

The storage layout to restore. Only `'version-chain'` exists today.

***

### values

> `readonly` **values**: readonly `T`\[]

Defined in: [packages/snapshot-set/src/serialization/json.ts:45](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/snapshot-set/src/serialization/json.ts#L45)

Every registered value, in first-registration order, including currently absent ones.

***

### history

> `readonly` **history**: readonly (readonly `number`\[])\[]

Defined in: [packages/snapshot-set/src/serialization/json.ts:47](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/snapshot-set/src/serialization/json.ts#L47)

The toggle-version history of the value at the same position, strictly increasing.

***

### snapshots

> `readonly` **snapshots**: readonly `number`\[]

Defined in: [packages/snapshot-set/src/serialization/json.ts:49](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/snapshot-set/src/serialization/json.ts#L49)

Every id `createSnapshot()` has minted, ascending.

***

### version

> `readonly` **version**: `number`

Defined in: [packages/snapshot-set/src/serialization/json.ts:51](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/snapshot-set/src/serialization/json.ts#L51)

The current version counter.
