> For the complete documentation index, see [llms.txt](https://docs.inverter.network/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.inverter.network/contracts/technical-reference/modules/lib/libmetadata.sol.md).

# LibMetadata.sol

[Git Source](https://github.com/InverterNetwork/inverter-contracts/blob/649b450f02fc8b735c128ff0821467e71966c666/src/modules/lib/LibMetadata.sol)

**Author:** Inverter Network

*Provides common functions for {IModule\_v1}'s Metadata type.*

### Functions

#### identifier

*Returns the identifier for given metadata.*

```solidity
function identifier(IModule_v1.Metadata memory metadata)
    internal
    pure
    returns (bytes32);
```

**Parameters**

| Name       | Type                  | Description   |
| ---------- | --------------------- | ------------- |
| `metadata` | `IModule_v1.Metadata` | The metadata. |

**Returns**

| Name     | Type      | Description                |
| -------- | --------- | -------------------------- |
| `<none>` | `bytes32` | The metadata's identifier. |

#### isValid

*Returns whether the given metadata is valid.*

```solidity
function isValid(IModule_v1.Metadata memory metadata)
    internal
    pure
    returns (bool);
```

**Parameters**

| Name       | Type                  | Description   |
| ---------- | --------------------- | ------------- |
| `metadata` | `IModule_v1.Metadata` | The metadata. |

**Returns**

| Name     | Type   | Description                              |
| -------- | ------ | ---------------------------------------- |
| `<none>` | `bool` | True if metadata valid, false otherwise. |
