> ## Documentation Index
> Fetch the complete documentation index at: https://docs.neynar.com/llms.txt
> Use this file to discover all available pages before exploring further.

# signManifest (Experimental)

> Signs a domain manifest for verification

<Warning>
  This is an experimental feature and may change or be removed in future versions.
</Warning>

<Warning>
  **Host Discretion**

  The availability and behavior of `signManifest` depends entirely on the host implementation. Hosts may choose to:

  * Enable manifest signing for all domains
  * Restrict signing to specific allowlisted domains
  * Disable the feature entirely
  * Implement additional validation requirements

  Check with your specific host's documentation for their manifest signing policies.
</Warning>

Signs a domain manifest for verification and authenticity purposes.

## Usage

```ts theme={"system"}
import { sdk } from '@farcaster/miniapp-sdk'

const result = await sdk.experimental.signManifest({
  domain: 'example.com'
})
```

## Parameters

### `options`

* **domain** (required): The domain to sign the manifest for

## Return Value

Returns an object with the following properties:

* **header**: The header component of the signed manifest
* **payload**: The payload component containing the domain data
* **signature**: The cryptographic signature

```ts theme={"system"}
{
  header: string
  payload: string
  signature: string
}
```

## Errors

### `RejectedByUser`

Thrown if a user rejects the request to sign the manifest.

```ts theme={"system"}
try {
  await sdk.experimental.signManifest({ domain: 'example.com' })
} catch (error) {
  if (error instanceof SignManifest.RejectedByUser) {
    // Handle user rejection
  }
}
```

### `InvalidDomain`

Thrown when the provided domain is invalid or malformed.

```ts theme={"system"}
try {
  await sdk.experimental.signManifest({ domain: 'invalid-domain' })
} catch (error) {
  if (error instanceof SignManifest.InvalidDomain) {
    // Handle invalid domain
  }
}
```

### `GenericError`

Thrown when manifest signing fails for various reasons including host restrictions, network issues, or other implementation-specific failures.

```ts theme={"system"}
try {
  await sdk.experimental.signManifest({ domain: 'example.com' })
} catch (error) {
  if (error instanceof SignManifest.GenericError) {
    // Handle generic signing failures
    console.log('Signing failed:', error.message)
  }
}
```

### Generic Error Handling

For robust error handling, you should catch all specific error types:

```ts theme={"system"}
try {
  const result = await sdk.experimental.signManifest({ domain: 'example.com' })
  // Handle successful signing
} catch (error) {
  if (error instanceof SignManifest.RejectedByUser) {
    // User declined to sign the manifest
    console.log('User rejected manifest signing')
  } else if (error instanceof SignManifest.InvalidDomain) {
    // Domain format is invalid
    console.log('Invalid domain format')
  } else if (error instanceof SignManifest.GenericError) {
    // Generic signing failures
    console.log('Signing failed:', error.message)
    // This could include:
    // - Domain not allowlisted by host
    // - Feature disabled by host
    // - Network or connectivity issues
    // - Host-specific validation failures
  } else {
    // Other unexpected errors
    console.log('Manifest signing failed:', error.message)
    // This could include network or authentication errors
  }
}
```
