# Engine.set

Installs crypto implementations, replacing the `@noble/*` implementations ox uses by default.

Slots are named after ox modules, and both the slots and the functions within them are optional -- anything you leave out keeps using the default. Calls merge, so an engine can be installed wholesale and then have a single primitive overridden.

Call this once, during application startup, before any crypto call. ox resolves the engine at call time, so values computed beforehand used whatever implementation was installed then.

## Imports

:::code-group
```ts [Named]
import { Engine } from 'ox'
```

```ts [Entrypoint]
import * as Engine from 'ox/Engine'
```
:::

## Examples

```ts twoslash
// @noErrors
import { Engine } from 'ox/wasm'

await Engine.load()
```

### Overriding a Single Primitive

```ts twoslash
import { Engine, Hash } from 'ox'

Engine.set({
  Hash: { keccak256: () => new Uint8Array(32) }
})

Hash.keccak256('0xdeadbeef')
// @log: '0x0000000000000000000000000000000000000000000000000000000000000000'
```

## Definition

```ts
function set(
  value: engine.Engine,
): void
```

**Source:** [src/core/Engine.ts](https://github.com/wevm/ox/blob/main/src/core/Engine.ts#L237)

## Parameters

### value

* **Type:** `engine.Engine`

Engine to install.

#### value.Bls

* **Type:** `Bls`
* **Optional**

Implementation for [`Bls`](/api/).

#### value.Ed25519

* **Type:** `Eddsa`
* **Optional**

Implementation for [`Ed25519`](/api/).

#### value.Hash

* **Type:** `Hash`
* **Optional**

Implementation for [`Hash`](/api/).

#### value.Keystore

* **Type:** `Keystore`
* **Optional**

Implementation for [`Keystore`](/api/).

#### value.Mnemonic

* **Type:** `Mnemonic`
* **Optional**

Implementation for [`Mnemonic`](/api/).

#### value.P256

* **Type:** `Ecdsa`
* **Optional**

Implementation for [`P256`](/api/).

#### value.Secp256k1

* **Type:** `Ecdsa`
* **Optional**

Implementation for [`Secp256k1`](/api/).

#### value.X25519

* **Type:** `Ecdh`
* **Optional**

Implementation for [`X25519`](/api/).

## Return Type

`void`
