# Siwe.parseMessage

[EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message into message fields object.

## 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.parseMessage(`example.com wants you to sign in with your Ethereum account:
0xA0Cf798816D4b9b9866b5330EEa46a18382f251e

I accept the ExampleOrg Terms of Service: https://example.com/tos

URI: https://example.com/path
Version: 1
Chain ID: 1
Nonce: foobarbaz
Issued At: 2023-02-01T00:00:00.000Z`)
// @log: {
// @log:   address: '0xA0Cf798816D4b9b9866b5330EEa46a18382f251e',
// @log:   chainId: 1n,
// @log:   domain: 'example.com',
// @log:   issuedAt: '2023-02-01T00:00:00.000Z',
// @log:   nonce: 'foobarbaz',
// @log:   statement: 'I accept the ExampleOrg Terms of Service: https://example.com/tos',
// @log:   uri: 'https://example.com/path',
// @log:   version: '1',
// @log: }
```

## Definition

```ts
function parseMessage(
  message: string,
): ExactPartial<Message>
```

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

## Parameters

### message

* **Type:** `string`

[EIP-4361](https://eips.ethereum.org/EIPS/eip-4361) formatted message.

## Return Type

Message fields object.

`ExactPartial<Message>`
