# `IL1MessageService`

### ClaimMessageWithProofParams

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |

```solidity
struct ClaimMessageWithProofParams {
  bytes32[] proof;
  uint256 messageNumber;
  uint32 leafIndex;
  address from;
  address to;
  uint256 fee;
  uint256 value;
  address payable feeRecipient;
  bytes32 merkleRoot;
  bytes data;
}
```

### L2MerkleRootDoesNotExist

```solidity
error L2MerkleRootDoesNotExist()
```

_Thrown when L2 Merkle root does not exist._

### InvalidMerkleProof

```solidity
error InvalidMerkleProof()
```

_Thrown when the Merkle proof is invalid._

### ProofLengthDifferentThanMerkleDepth

```solidity
error ProofLengthDifferentThanMerkleDepth(uint256 actual, uint256 expected)
```

_Thrown when Merkle depth doesn't match proof length._

### claimMessageWithProof

```solidity
function claimMessageWithProof(struct IL1MessageService.ClaimMessageWithProofParams _params) external
```

Claims and delivers a cross-chain message using a Merkle proof.

_if tree depth is empty, it will revert with L2MerkleRootDoesNotExist.
if tree depth is different than proof size, it will revert with ProofLengthDifferentThanMerkleDepth._

#### Parameters

| Name | Type | Description |
| ---- | ---- | ----------- |
| _params | struct IL1MessageService.ClaimMessageWithProofParams | Collection of claim data with proof and supporting data. |

