# Mint

<mark style="color:green;">`POST`</mark> `/mint`

This endpoint mints or issues ENSC tokens by generating an unsigned transaction. It requires that the asset symbol is `"ENSC"`, verifies that the recipient is eligible to mint and confirms that the amount does not exceed the recipient’s mint allocation. Upon successful validation, it returns the unsigned transaction details.

**Headers**

| Name          | Value              |
| ------------- | ------------------ |
| Content-Type  | `application/json` |
| Authorization | `Bearer <api_key>` |

**Body**

<table><thead><tr><th width="173">Name</th><th width="143">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>recipient</code></td><td>string</td><td>The wallet address that will receive the minted tokens.</td></tr><tr><td><code>amount</code></td><td>number</td><td>The amount to mint (in whole tokens).</td></tr><tr><td><code>assetSymbol</code></td><td>string</td><td>The asset symbol to mint (must be <code>"ENSC"</code>).</td></tr></tbody></table>

**Example**

{% tabs %}
{% tab title="Mint Request" %}

```json
{
  "recipient": "0xRecipientAddressABC123",
  "amount": 500,
  "assetSymbol": "ENSC"
}
```

{% endtab %}

{% tab title="Response (200) Ok" %}

```json
{
  "status": 200,
  "message": "Transaction processed successfully",
  "data": {
    "to": "0xTokenContractAddressXYZ",
    "value": 0,
    "gasLimit": "0x186a0",
    "gasPrice": "20000000000",
    "nonce": "5",
    "data": "0x40c10f19000000000000000000000000xRecipientAddressABC12300000000000000000000000000000000000000000000000000000000001f4",
    "gasPrice": "20000000000",
    "nonce": "5"
  }
}
```

{% endtab %}
{% endtabs %}

**Error Responses**

{% tabs %}
{% tab title="Invalid Recipient Address" %}

```json
{
  "status": 400,
  "error": "Invalid Request",
  "message": "Invalid recipient address",
  "data": null
}
```

{% endtab %}

{% tab title="Invalid Asset Symbol" %}

```json
// If the asset symbol is not "ENSC", the service returns an error:
{
  "status": 400,
  "error": "Invalid Request",
  "message": "Invalid asset symbol, only ENSC is supported",
  "data": null
}
```

{% endtab %}

{% tab title="Recipient Not Allowed to Mint" %}

```json
{
  "status": 403,
  "error": "Forbidden",
  "message": "Recipient is not allowed to mint",
  "data": null
}
```

{% endtab %}

{% tab title="Exceeded Mint Allocation" %}

```json
// If the requested amount exceeds the recipient’s mint allocation:
{
  "status": 400,
  "error": "Invalid Request",
  "message": "Recipient has reached their mint limit",
  "data": null
}
```

{% endtab %}
{% endtabs %}
