# Siwe.generateNonce

Generates random [EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) nonce.

## Imports

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

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

## Examples

```ts twoslash
import { Siwe } from 'ox'

Siwe.generateNonce()
// @log: '65ed4681d4efe0270b923ff5f4b097b1c95974dc33aeebecd5724c42fd86dfd25dc70b27ef836b2aa22e68f19ebcccc1'
```

## Definition

```ts
function generateNonce(): string
```

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

## Return Type

Random nonce.

`string`
