# 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. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.inverter.network/contracts/technical-reference/modules/lib/libmetadata.sol.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
