# ContentAddressedStoreOptions

Defined in: [packages/cas/src/content-addressed-store.ts:45](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/cas/src/content-addressed-store.ts#L45)

Options for [contentAddressedStore](/reference/knotkit/cas/functions/contentaddressedstore/).

## Properties

### backend

> `readonly` **backend**: [`ArtifactBackend`](/reference/knotkit/cas/interfaces/artifactbackend/)

Defined in: [packages/cas/src/content-addressed-store.ts:47](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/cas/src/content-addressed-store.ts#L47)

Where bytes are stored and read. The store never assumes it is local.

***

### hash

> `readonly` **hash**: (`bytes`) => `string`

Defined in: [packages/cas/src/content-addressed-store.ts:58](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/cas/src/content-addressed-store.ts#L58)

Content hash from framed bytes to address. Injected, so a caller chooses the algorithm and its width, and so a test can use a hash that cannot collide.

It must be deterministic — two calls on equal bytes return one string — and collision-resistant enough for the store’s expected population. A 64-bit non-cryptographic hash is adequate below roughly 2^32 artifacts; above that, or against an adversary choosing the inputs, use SHA-256. A collision is not silent: see [ContentAddressedStore.add](/reference/knotkit/cas/interfaces/contentaddressedstore/#add).

#### Parameters

##### bytes

`Uint8Array`

#### Returns

`string`

***

### magic

> `readonly` **magic**: `Uint8Array`

Defined in: [packages/cas/src/content-addressed-store.ts:65](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/cas/src/content-addressed-store.ts#L65)

The four-byte family marker this store accepts and writes. One store addresses one family of artifacts, so a `knotkit/heap` artifact read through a `knotkit/trie` store fails as `INVALID_MAGIC` rather than decoding under the wrong package’s rules.
