# API Overview

{% hint style="success" %}
Xyxyx API Testnet is now live. Read the full announcement [here](https://mirror.xyz/0xB42dD0878219c3fC356ABe8F7c0800b80147B7a1/jcXbOnDOSokrZVkv9nA1c5sU6HPaFJ0_huPrLKCjgyM).
{% endhint %}

The Xyxyx API is a REST API for building text-based tokenization applications, which can be integrated into any existing system. The API is designed on top of the [Xyxyx Text-Based Tokenization Architecture (XTBTA)](https://docs.xyxyx.pro/introduction/xyxyx-text-based-tokenization-architecture-xtbta).

The Xyxyx API is a Representational State Transfer (REST) API consisting of HTTP endpoints. The endpoints use blockchain-based methods for authentication and are designed in a common pattern, largely using JSON requests and responses.

Refer to the [Getting Started](/getting-started/authentication) section to begin using the Xyxyx API.

***

### Additional Learning Resources & Background

* [User Documentation](https://docs.xyxyx.pro/)
* [Blog](https://mirror.xyz/0xB42dD0878219c3fC356ABe8F7c0800b80147B7a1)
* [GitHub Repository](https://github.com/xyxyxpro)

***

### Need help? <a href="#need-help" id="need-help"></a>

Having trouble? Seeing something you don’t expect? Have other questions? Reach out to <info@xyxyx.pro> or join our [Telegram](https://t.me/xyxyx404).


# Authentication

{% hint style="info" %}
Access to the Xyxyx API Testnet is limited to Xyxyx API Keys.
{% endhint %}

The Xyxyx API pioneers a new, innovative approach to API authentication by leveraging blockchain technology via the EVM instead of traditional methods like the OAuth 2.0 protocol. Xyxyx's blockchain-based, dual-token method ensures permissionless, secure, and efficient access to the API.

&#x20;Xyxyx API authentication is achieved through two methods:

* [**Xyxyx API Keys**](/getting-started/xyxyx-api-keys)
* [**Xyxyx Issuer Nodes (XINs)**](https://docs.xyxyx.pro/protocol/xyxyx/xyxyx-issuer-nodes-xins)

The API authentication can occur based on three architectures:

1. **Node**

Users can authenticate via a node. This means `1` **Xyxyx API Key** or `1` **XIN** owned by an address.

***

2. **Cluster**

Users can authenticate via a cluster. This means multiple Xyxyx API Keys or multiple XINs owned by an address.

e.g., `2` **Xyxyx API Keys** or `2` **XINs**

***

3. **Composite**

Users can authenticate via a composite. This means a token composite between Xyxyx API Keys and XINs.

e.g., `1` **Xyxyx API Key** + `1` **XIN**

***

Refer to the [Getting an API Key](/getting-started/quickstart) page to learn how to get an Xyxyx API or an XIN.

Refer to the [Rates & Limits](/getting-started/rates-and-limits) page to learn about rates and limits of Xyxyx API Keys and XINs.


# Xyxyx API Keys

### Overview

Xyxyx API Keys are ERC-721 tokens that integrate API key functionality within the Xyxyx API. Each API key is tokenized as an ERC-721 token.

Xyxyx is pioneering a novel approach to API authentication by tokenizing API keys and leveraging blockchain technology. This method moves beyond traditional protocols like OAuth, offering permissionless, trustless, and decentralized access to the Xyxyx API.

* [Getting an API Key](/getting-started/quickstart)

***

### Validity

Xyxyx API Keys (Genesis) are valid for one year, starting from the mainnet launch of the Xyxyx API (TBA). The validity period is fixed at 365 days, granting access to the API for the entire duration.

| Name                     | Supply | From | To  |
| ------------------------ | ------ | ---- | --- |
| Xyxyx API Keys (Genesis) | 1,000  | TBA  | TBA |

***

### Authentication

We've designed the Xyxyx API's authentication system so that Xyxyx API Keys can be clustered. This means that multiple keys held by a single address will aggregate their respective call limits, enabling greater API throughput.

For example, an address holding two Xyxyx API Keys will receive 2x the API calls per 24-hour period, three keys provide 3x calls, four keys offer 4x calls, and so on, allowing for scalable access.

Refer to the [Authentication](/getting-started/authentication) page to learn about how API keys are authenticated on-chain.

Refer to the [Rates & Limits](/getting-started/rates-and-limits) page to learn about rates and limits of Xyxyx API Keys.


# Getting an API Key

Mint your API key [here](https://xyxyx.pro/mint).


# Rates & Limits

The Xyxyx API utilizes a two-tiered rate limiting system. Rate limits are determined by users' token balance. Two options are oferred to grant access to the API:

| Token                         | Rate Limit (calls per 24h) | Requirement                                    |
| ----------------------------- | -------------------------- | ---------------------------------------------- |
| **Xyxyx API Key**             | 25                         | Address holds at least `1` Xyxyx API Key token |
| **Xyxyx Issuer Nodes (XINs)** | TBA                        | Address holds at least `1` XIN                 |

***

#### How rate limits are counted?

<table data-view="cards"><thead><tr><th>Action</th><th>API Call</th><th></th></tr></thead><tbody><tr><td>Deploy Contract</td><td>1</td><td></td></tr><tr><td>Mint Token</td><td>1</td><td></td></tr><tr><td>Transfer Token</td><td>0</td><td></td></tr></tbody></table>

***

#### How rate limits are enforced?

#### 1. Wallet Verification

Each request must include the private key for the wallet you wish to use:

```json
{
  "walletPrivateKey": "YOUR_PRIVATE_KEY_HERE"
}
```

Upon receiving the request:

1. The system checks the wallet balance using the provided `walletPrivateKey`.
2. It verifies which token the wallet holds (Xyxyx API Keys or XINs, or both).
3. The rate limit is applied based on the verified token type in the wallet.

In other words, when making an API request, you will include your `walletPrivateKey` in the request body (JSON format). Our system uses this private key to verify the associated public key and its token balance.

***

#### 2. 24-Hour Rolling Window

All rate limits are enforced on a rolling 24-hour basis. This means that each API call is timestamped, and your remaining quota is calculated based on calls made within the last 24 hours. Once the limit is reached, further requests will be blocked until your usage resets below the threshold.

***

#### 3. Error Handling

If your application exceeds its allocated rate limit, an HTTP **429 (Too Many Requests)** status code is returned. The response may include information about how long you need to wait before making additional calls.

> Please note that Xyxyx API Keys can be freely traded on the secondary market and are instantly activated by the new address. However, if the API key was used in the previous window and the new address is still within that same window when incorporating it, the node will keep the previous address' discounts.

***

#### 4. XINs: **24-Hour Waiting Period**

XINs incorporated by an address must wait a 24-hour period to be allowed to interact with the Xyxyx API.

***

#### Security Considerations

* **Do not expose your private key**: Always ensure you transmit your private key securely. Ideally, you should sign the request and send the signature rather than the raw key.
* **Single point of authentication**: Using a single private key for all requests simplifies your usage but also centralizes risk. Follow best practices to protect this key.
* **Separate wallets**: You can maintain multiple wallets for different environments (development, testing, and production). Each wallet’s token balance is evaluated independently.

***

{% hint style="info" %}
If you have any questions regarding authentication, wallet usage, or encounter issues with rate limits, send us a message at <info@xyxyx.pro>.
{% endhint %}


# Endpoint URLs

The Xyxyx API provides structured endpoints for deploying and interacting with ERC-721F, ERC-404, and ERC-721 smart contracts and text-based tokens. These endpoints allow developers to deploy, mint, and preview text-based tokens efficiently across supported blockchain networks.

Below is the list of available endpoints, categorized by token standard and tokenization model.

***

#### [**ERC-721F Endpoints**](/api-endpoints/erc-721f)

<table><thead><tr><th width="173.75390625">Action</th><th>1x1</th><th>A4</th></tr></thead><tbody><tr><td><strong>Deploy Contract</strong></td><td><code>/api/v1/ERC721F/{network}/deploy-contract</code></td><td><code>/api/v1/ERC721F/{network}/deploy-contract</code></td></tr><tr><td><strong>Mint Token</strong></td><td><code>/api/v1/ERC721F/{network}/mint-token-1x1</code></td><td><code>/api/v1/ERC721F/{network}/mint-token-A4</code></td></tr></tbody></table>

***

#### [**ERC-721 Endpoints**](/api-endpoints/erc-721)

| Action              | 1x1                                            | A4                                    |
| ------------------- | ---------------------------------------------- | ------------------------------------- |
| **Deploy Contract** | `/api/v1/ERC721/{network}/deploy-contract-1x1` | `ERC721/{network}/deploy-contract-A4` |
| **Mint Token**      | `api/v1/ERC721F/{network}/mint-token`          | `api/v1/ERC721F/{network}/mint-token` |

***

#### [**ERC-404 Endpoints**](/api-endpoints/deploy)

<table><thead><tr><th width="191.69921875">Action</th><th>1x1</th><th>A4</th></tr></thead><tbody><tr><td><strong>Deploy Contract</strong></td><td><code>/api/v1/ERC404/{network}/deploy-contract-1x1</code></td><td><code>/api/v1/ERC404/{network}/deploy-contract-A4</code></td></tr></tbody></table>

***

#### [**Preview Token**](/api-endpoints/preview-token)

The Xyxyx API allows users to preview 1x1 and A4 text-based tokens' outputs before deploying or minting them. This feature helps ensure the correct parameters and design are applied to the final token output.

**Preview Token Endpoints**

<table><thead><tr><th width="184.4375">Tokenization Model</th><th>Endpoint URL</th></tr></thead><tbody><tr><td><strong>1x1</strong></td><td><code>/api/v1/preview-token/1x1</code></td></tr><tr><td><strong>A4</strong></td><td><code>/api/v1/preview-token/A4</code></td></tr></tbody></table>


# Networks

The Xyxyx API allows deployment of smart contracts on the Ethereum Mainnet, L2 solutions (OP Mainnet, Base Mainnet, and Arbitrum One), and Testnets (Ethereum Sepolia, OP Sepolia, Base Sepolia, and Arbitrum Sepolia).

Below is a list of the available networks for deploying smart contracts via the Xyxyx API and their correspondent endpoint value.

***

#### Endpoints

| Network                                                    | Endpoint Value     |
| ---------------------------------------------------------- | ------------------ |
| Ethereum Mainnet <mark style="color:orange;">`SOON`</mark> | `mainnet`          |
| Optimism Mainnet <mark style="color:orange;">`SOON`</mark> | `optimism`         |
| Base Mainnet <mark style="color:orange;">`SOON`</mark>     | `base`             |
| Arbitrum One <mark style="color:orange;">`SOON`</mark>     | `arbitrum`         |
| Ethereum Sepolia <mark style="color:green;">`LIVE`</mark>  | `sepolia`          |
| Optimism Sepolia <mark style="color:green;">`LIVE`</mark>  | `optimism-sepolia` |
| Base Sepolia <mark style="color:green;">`LIVE`</mark>      | `base-sepolia`     |
| Arbitrum Sepolia <mark style="color:green;">`LIVE`</mark>  | `arbitrum-sepolia` |

***

#### **Endpoint Structure**

For example, to deploy an ERC-721F contract, replace `{network}` in the API endpoint with one of the supported values:

```plaintext
/api/v1/ERC721F/{network}/deploy-contract-1x1
```

**Examples**

* Deploy on **Ethereum Mainnet**:

  ```plaintext
  /api/v1/ERC721F/mainnet/deploy-contract-1x1
  ```
* Deploy on **Optimism Mainnet**:

  ```plaintext
  /api/v1/ERC721F/optimism/deploy-contract-1x1
  ```
* Deploy on **Base Sepolia Testnet**:

  ```plaintext
  /api/v1/ERC721F/base-sepolia/deploy-contract-1x1
  ```


# Tokenization Models

The Xyxyx API allows developers to build upon Xyxyx's two foundational tokenization models ([A4](https://docs.xyxyx.pro/products-and-services/tokenization-models/A4/specifications) and [1x1](https://docs.xyxyx.pro/products-and-services/tokenization-models/1x1/specifications)). Each model is designed for specific use cases, offering different levels of customization and text content capacity.

For further understanding about Tokenization Models, please refer [here](https://docs.xyxyx.pro/products-and-services/tokenization-models).


# Explorer

The [Xyxyx Explorer](https://www.xyxyx.pro/explorer) is the native platform for exploring and searching deployments on Xyxyx, specifically designed for text-based tokenization.

For further understanding about the Xyxyx Explorer, please refer [here](https://docs.xyxyx.pro/explorer).


# ERC-721F

The ERC-721F standard is a variant of the ERC-721 standard conceived by Xyxyx.

ERC-721F is designed to provide highly customizable token issuance by assigning each token an individualized SVG output (`svgString`) at the time of minting.

* [ERC-721F Github repo](https://github.com/xyxyxpro/ERC-721F)

***

#### **Endpoints**

The Xyxyx API provides dedicated ERC-721F endpoints that allow developers to deploy contracts and mint text-based tokens dynamically using Xyxyx's two foundational tokenization models:

* [**Deploy Contract**](/api-endpoints/erc-721/deploy-contract-1x1)
* [**Mint 1x1**](/api-endpoints/erc-721f/mint-1x1)
* [**Mint A4**](/api-endpoints/erc-721f/mint-a4)

**Deployment & Minting Process**

1. **Deploy an ERC-721F contract** using the API’s deployment endpoints.
2. **Mint tokens** by calling the `mint-token` endpoint, specifying:
   * The **recipient address**
   * The **token ID**
   * The **custom SVG** (`svgString`) to be used for the text-based token

#### **Endpoint Structure**

All ERC-721F endpoints follow the format:

```plaintext
/api/v1/ERC721F/{network}/{action}{model}
```

Where:

* `{network}` is the target blockchain (e.g., `mainnet`, `sepolia`, `optimism`, etc.).
* `{action}` defines the specific operation (e.g., `deploy-contract`, `mint-nft`).
* `{model}` is either `1x1` or `A4`, depending on the tokenization model used.

**Example Endpoints**

* **Deploy an ERC-721F contract** on **Ethereum Mainnet**:

  ```plaintext
  /api/v1/ERC721F/mainnet/deploy-contract
  ```
* **Mint a token** using the **1x1 model** on **Arbitrum**:

  ```plaintext
  /api/v1/ERC721F/arbitrum/mint-nft-1x1
  ```
* **Mint a token** using the **A4 model** on **Base Sepolia Testnet**:

  ```plaintext
  /api/v1/ERC721F/base-sepolia/mint-nft-A4
  ```

***

#### **Constructor Arguments**

The ERC-721F contract supports constructor arguments to customize contract behavior at deployment:

| Argument          | Description                                                                                   | Example Value           |
| ----------------- | --------------------------------------------------------------------------------------------- | ----------------------- |
| `name`            | Defines the token's name                                                                      | Token Name              |
| `ticker`          | Defines the token's ticker                                                                    | TN                      |
| `supply`          | Defines the max supply. If set to `0`, the collection has **infinite supply**.                | `0` or e.g., `10000`    |
| `mintPrice`       | Determines the minting cost per token. If set to `0`, the minting is **free**.                | `0` or e.g., `0.05 ETH` |
| `restrictToOwner` | If set to `true`, **only the contract owner** can mint tokens. If `false`, minting is public. | `true` or `false`       |


# Deploy Contract

#### Endpoint

<mark style="color:green;">`POST`</mark> `/api/v1/ERC721F/{network}/deploy-contract`

> Executes deployment of an ERC-721F smart contract.

{% hint style="info" %}
Check the [Networks](/getting-started/networks) section for replacing the `{network}` text in the Endpoint URL.
{% endhint %}

***

**Headers**

| Name          | Value                                                                                                                    |
| ------------- | ------------------------------------------------------------------------------------------------------------------------ |
| Content-Type  | `application/json`                                                                                                       |
| Authorization | [Xyxyx API Key](/getting-started/xyxyx-api-keys) or [XIN](https://docs.xyxyx.pro/protocol/xyxyx/xyxyx-issuer-nodes-xins) |

***

**Body**

<table><thead><tr><th width="239">Name</th><th width="258">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td>string</td><td>Defines the token name</td></tr><tr><td><code>ticker</code></td><td>string</td><td>Defines the token ticker</td></tr><tr><td><code>mintPrice</code></td><td>integer</td><td>Defines the token mint price</td></tr><tr><td><code>supply</code></td><td>integer</td><td>Defines the token supply</td></tr><tr><td><code>walletPrivateKey</code></td><td>string</td><td>Deployer private key for authorizing transaction</td></tr><tr><td><code>restrictToOwner</code></td><td>boolean (optional), defaults to <code>false</code></td><td>Defines if minting is restricted to contract owner</td></tr></tbody></table>

***

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "success": true,
  "status": "Contract deployed at address: {contractAddress}`",
  "hash": "1x111...",
  "deploymentAddress": "0x32a...",
  "adressUrl": "https://etherscan.io/address/{contractAddress}",
}
```

{% endtab %}

{% tab title="400" %}

```javascript
{
  "success": false,
  "status": "Failed to deploy contract: {error.message}"
}
```

{% endtab %}

{% tab title="401" %}

```javascript
{
  "success": false,
  "status": "The wallet does not own any valid Xyxyx API Key or XIN",
}
```

{% endtab %}

{% tab title="429" %}

```javascript
{
  "success": false,
  "status": "This wallet has already consumed its 24-hour request quota"
}
```

{% endtab %}
{% endtabs %}


# Mint 1x1

#### Endpoint

<mark style="color:green;">`POST`</mark> `/api/v1/ERC721F/{network}/mint-token-1x1`

> Executes minting of an ERC-721F token, enabling token creation based on the 1x1 tokenization model.

{% hint style="info" %}
Check the [Networks](/getting-started/networks) section for replacing the `{network}` text in the Endpoint URL.
{% endhint %}

***

**Headers**

| Name          | Value                                                                                                                    |
| ------------- | ------------------------------------------------------------------------------------------------------------------------ |
| Content-Type  | `application/json`                                                                                                       |
| Authorization | [Xyxyx API Key](/getting-started/xyxyx-api-keys) or [XIN](https://docs.xyxyx.pro/protocol/xyxyx/xyxyx-issuer-nodes-xins) |

***

**Body**

<table><thead><tr><th width="239">Name</th><th width="216">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>contractAddress</code></td><td>string</td><td>Address of the smart contract that will issue the token</td></tr><tr><td><code>tokenId</code></td><td>integer</td><td>Token unique identifier</td></tr><tr><td><code>mintCost</code></td><td>integer</td><td>Amount required to mint a token</td></tr><tr><td><code>tokenText</code></td><td>string</td><td>The text content that is stamped in the token output</td></tr><tr><td><code>metadata</code></td><td>string</td><td>The text content that is inserted in the token metadata, stored within its SVG file</td></tr><tr><td><code>walletPrivateKey</code></td><td>string</td><td>Deployer private key for authorizing transaction</td></tr><tr><td><code>background</code></td><td>string (optional), defaults to <code>#000000</code></td><td>Hexadecimal color for the token output background</td></tr><tr><td><code>textColor</code></td><td>string (optional), defaults to <code>#FFFFFF</code></td><td>Hexadecimal color for the token output text</td></tr><tr><td><code>fontFamily</code></td><td>string (optional), defaults to <code>sans-serif</code></td><td>Font-family that is used in the token output text</td></tr><tr><td><code>borderRadius</code></td><td>integer (optional), defaults to <code>0</code></td><td>Border radius that is applied to the token output</td></tr><tr><td><code>showTrademark</code></td><td>boolean (optional), defaults to <code>false</code></td><td>Xyxyx trademark displayed on the token output bottom right corner</td></tr><tr><td><code>showDeployerAddress</code></td><td>boolean (optional), defaults to <code>false</code></td><td>Deployer address displayed on the token output bottom left corner</td></tr><tr><td><code>logo</code></td><td>string (SVG) (optional), defaults to null</td><td>1:1 SVG that is displayed on the top left corner of the token output</td></tr><tr><td><code>watermark</code></td><td>string (SVG) (optional), defaults to null</td><td>1:1 SVG that is displayed in the background of the token output (with 70% opacity)</td></tr></tbody></table>

***

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "success": true,
  "status": "Token minted successfully at address: {contractAddress}`",
  "hash": "1x111..."
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "success": false,
  "status": "Failed to mint token: {error.message}"
}
```

{% endtab %}

{% tab title="401" %}

<pre class="language-json"><code class="lang-json">{
  "success": false,
<strong>  "status": "The wallet does not own any valid Xyxyx API Key or XIN",
</strong>}
</code></pre>

{% endtab %}

{% tab title="429" %}

```javascript
{
  "success": false,
  "status": "This wallet has already consumed its 24-hour request quota"
}
```

{% endtab %}
{% endtabs %}


# Mint A4

#### Endpoint

<mark style="color:green;">`POST`</mark> `/api/v1/ERC721F/{network}/mint-token-A4`

> Executes minting of an ERC-721F token, enabling token creation based on the A4 tokenization model.

{% hint style="info" %}
Check the [Networks](/getting-started/networks) section for replacing the `{network}` text in the Endpoint URL.
{% endhint %}

***

**Headers**

| Name          | Value                                                                                                                    |
| ------------- | ------------------------------------------------------------------------------------------------------------------------ |
| Content-Type  | `application/json`                                                                                                       |
| Authorization | [Xyxyx API Key](/getting-started/xyxyx-api-keys) or [XIN](https://docs.xyxyx.pro/protocol/xyxyx/xyxyx-issuer-nodes-xins) |

***

**Body**

<table><thead><tr><th width="239">Name</th><th width="206.00006103515625">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>contractAddress</code></td><td>string</td><td>Address of the smart contract that will issue the token</td></tr><tr><td><code>tokenId</code></td><td>integer</td><td>Token unique identifier</td></tr><tr><td><code>mintCost</code></td><td>integer</td><td>Amount required to mint a token</td></tr><tr><td><code>tokenText</code></td><td>string</td><td>The text content that is stamped in the token output</td></tr><tr><td><code>metadata</code></td><td>string</td><td>The text content that is inserted in the token metadata, stored within its SVG file</td></tr><tr><td><code>walletPrivateKey</code></td><td>string</td><td>Deployer private key for authorizing transaction</td></tr><tr><td><code>documentTitle</code></td><td>string (optional)</td><td>Document title, displayed on the top of the first page</td></tr><tr><td><code>documentSubtitle</code></td><td>string (optional)</td><td>Document subtitle, displayed below the document title</td></tr><tr><td><code>fontFamily</code></td><td>string (optional), defaults to <code>serif</code></td><td>Font-family that is used in the token output text</td></tr></tbody></table>

***

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "success": true,
  "status": "Token minted successfully at address: {contractAddress}`",
  "hash": "1x111..."
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "success": false,
  "status": "Failed to mint token: {error.message}"
}
```

{% endtab %}

{% tab title="401" %}

<pre class="language-json"><code class="lang-json">{
  "success": false,
<strong>  "status": "The wallet does not own any valid Xyxyx API Key or XIN",
</strong>}
</code></pre>

{% endtab %}

{% tab title="429" %}

```javascript
{
  "success": false,
  "status": "This wallet has already consumed its 24-hour request quota"
}
```

{% endtab %}
{% endtabs %}


# ERC-404

The [ERC-404](https://docs.xyxyx.pro/products-and-services/tokenization-models/token-standards/erc-404) is a hybrid token standard that combines the functionalities of the ERC-721 standard (non-fungible tokens) and the ERC-20 standard (fungible tokens).

***

#### **Endpoints**

The Xyxyx API provides ERC-404 functionality through dedicated endpoints, categorized into two subsections, which are based on Xyxyx's two foundational tokenization models:

* [**Deploy Contract 1x1**](/api-endpoints/deploy/deploy-contract-a4)
* [**Deploy Contract A4**](/api-endpoints/deploy/deploy-contract-a4)

Each subsection contains specific API endpoints tailored for deploying and interacting with ERC-404 smart contracts using the respective tokenization model.

#### **Endpoint Structure**

All ERC-404 endpoints follow the format:

```plaintext
/api/v1/ERC404/{network}/deploy-contract-{model}
```

Where:

* `{network}` is replaced with the target blockchain network (e.g., `mainnet`, `sepolia`, `optimism`, etc.).
* `{model}` is either 1x1 or A4, depending on the tokenization model used.

**Example Endpoints**

* Deploy an **ERC-404 contract** using the **1x1** tokenization model on the **Ethereum Mainnet**:

  ```plaintext
  /api/v1/ERC404/mainnet/deploy-contract-1x1
  ```
* Deploy an **ERC-404 contract** using the **A4** tokenization model on the **Ethereum Sepolia**:

  ```plaintext
  /api/v1/ERC404/sepolia/deploy-contract-A4
  ```


# Deploy Contract 1x1

#### Endpoint

<mark style="color:green;">`POST`</mark> `/api/v1/ERC404/{network}/deploy-contract-1x1`

> This endpoint executes the deployment of an ERC-404 smart contract that issues 1x1 tokens.

{% hint style="info" %}
Check the [Networks](/getting-started/networks) section for replacing the `{network}` text in the Endpoint URL.
{% endhint %}

***

**Headers**

| Name          | Value                                                                                                                    |
| ------------- | ------------------------------------------------------------------------------------------------------------------------ |
| Content-Type  | `application/json`                                                                                                       |
| Authorization | [Xyxyx API Key](/getting-started/xyxyx-api-keys) or [XIN](https://docs.xyxyx.pro/protocol/xyxyx/xyxyx-issuer-nodes-xins) |

***

**Body**

<table><thead><tr><th width="239">Name</th><th width="258">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>name</code></td><td>string</td><td>Defines the token name</td></tr><tr><td><code>ticker</code></td><td>string</td><td>Defines the token ticker</td></tr><tr><td><code>decimals</code></td><td>integer</td><td>Defines the token decimals</td></tr><tr><td><code>supply</code></td><td>integer</td><td>Defines the token total supply</td></tr><tr><td><code>tokenText</code></td><td>string</td><td>The text content that is stamped in the token output</td></tr><tr><td><code>metadata</code></td><td>string</td><td>The text content that is inserted in the token metadata, stored within its SVG file</td></tr><tr><td><code>walletPrivateKey</code></td><td>string</td><td>Deployer private key for authorizing transaction</td></tr><tr><td><code>background</code></td><td>string (optional), defaults to <code>#000000</code></td><td>Hexadecimal color for the token output background</td></tr><tr><td><code>textColor</code></td><td>string (optional), defaults to <code>#FFFFFF</code></td><td>Hexadecimal color for the token output text</td></tr><tr><td><code>fontFamily</code></td><td>string (optional), defaults to <code>sans-serif</code></td><td>Font-family that is used in the token output text</td></tr><tr><td><code>borderRadius</code></td><td>integer (optional), defaults to <code>0</code></td><td>Border radius that is applied to the token output</td></tr><tr><td><code>showTrademark</code></td><td>boolean (optional), defaults to <code>false</code></td><td>Xyxyx trademark displayed on the token output bottom right corner</td></tr><tr><td><code>showDeployerAddress</code></td><td>boolean (optional), defaults to <code>false</code></td><td>Deployer address displayed on the token output bottom left corner</td></tr><tr><td><code>logo</code></td><td>string (SVG) (optional), defaults to null</td><td>1:1 SVG that is displayed on the top left corner of the token output</td></tr><tr><td><code>watermark</code></td><td>string (SVG) (optional), defaults to null</td><td>1:1 SVG that is displayed in the background of the token output (with 70% opacity)</td></tr><tr><td><code>transferTokenTo</code></td><td>string (address) (optional), defaults to null</td><td>Transfer first token from supply to the provided address</td></tr></tbody></table>

***

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "success": true,
  "status": "Contract deployed at address: {contractAddress}`",
  "hash": "1x111...",
  "deploymentAddress": "0x32a...",
  "adressUrl": "https://etherscan.io/address/{contractAddress}",
  "deployerAddress": "0x567...",
  "transferTxHash": "0x222...",
  "transferMessage": "1 token transferred to {transferFirstTokenTo}"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "success": false,
  "status": "Failed to deploy contract: {error.message}"
}
```

{% endtab %}

{% tab title="401" %}

```json
{
  "success": false,
  "status": "The wallet does not own any valid Xyxyx API Key or XIN",
}
```

{% endtab %}

{% tab title="429" %}

```javascript
{
  "success": false,
  "status": "This wallet has already consumed its 24-hour request quota"
}
```

{% endtab %}
{% endtabs %}


# Deploy Contract A4

#### Endpoint

<mark style="color:green;">`POST`</mark> `/api/v1/ERC404/{network}/deploy-contract-A4`

> This endpoint executes the deployment of an ERC-404 smart contract that issues A4 tokens.

{% hint style="info" %}
Check the [Networks](/getting-started/networks) section for replacing the `{network}` text in the Endpoint URL.
{% endhint %}

***

**Headers**

| Name          | Value                                                                                                                    |
| ------------- | ------------------------------------------------------------------------------------------------------------------------ |
| Content-Type  | `application/json`                                                                                                       |
| Authorization | [Xyxyx API Key](/getting-started/xyxyx-api-keys) or [XIN](https://docs.xyxyx.pro/protocol/xyxyx/xyxyx-issuer-nodes-xins) |

***

**Body**

| Name               | Type                                   | Description                                                                         |
| ------------------ | -------------------------------------- | ----------------------------------------------------------------------------------- |
| `name`             | string                                 | Defines the token name                                                              |
| `ticker`           | string                                 | Defines the token ticker                                                            |
| `decimals`         | integer                                | Defines the token decimals                                                          |
| `supply`           | integer                                | Defines the token supply                                                            |
| `tokenText`        | string                                 | The text content that is stamped in the token output                                |
| `metadata`         | string                                 | The text content that is inserted in the token metadata, stored within its SVG file |
| `walletPrivateKey` | string                                 | Deployer private key for authorizing transaction                                    |
| `documentTitle`    | string (optional)                      | Document title, displayed on the top of the first page                              |
| `documentSubtitle` | string (optional)                      | Document subtitle, displayed below the document title                               |
| `fontFamily`       | string (optional), defaults to `serif` | Font-family that is used in the token output text                                   |

***

**Response**

{% tabs %}
{% tab title="200" %}

```json
{
  "success": true,
  "status": "Contract deployed at address: {contractAddress}`",
  "hash": "1x111...",
  "deploymentAddress": "0x32a...",
  "adressUrl": "https://etherscan.io/address/{contractAddress}",
  "deployerAddress": "0x567...",
  "transferTxHash": "0x222...",
  "transferMessage": "1 token transferred to {transferFirstTokenTo}"
}
```

{% endtab %}

{% tab title="400" %}

```json
{
  "success": false,
  "status": "Failed to deploy contract: {error.message}"
}
```

{% endtab %}

{% tab title="401" %}

```json
{
  "success": false,
  "status": "The wallet does not own any valid Xyxyx API Key or XIN",
}
```

{% endtab %}

{% tab title="429" %}

```javascript
{
  "success": false,
  "status": "This wallet has already consumed its 24-hour request quota"
}
```

{% endtab %}
{% endtabs %}


# Preview Token

The **Preview Token** endpoints for 1x1 and A4 allow you to simulate the final token design and metadata before performing any on-chain actions. Because Xyxyx uses fully on-chain methods, previewing helps prevent irreversible mistakes in your deployment or mint processes.

By previewing tokens in SVG format, you can catch errors, verify designs, and maintain the integrity of your on-chain data — ensuring a smooth and accurate tokenization process.

***

#### How it works

1. **Select the endpoint**
   * [**Preview 1x1**](/api-endpoints/preview-token/1x1)
   * [**Preview A4**](/api-endpoints/preview-token/a4)
2. **Submit parameters via JSON**
   * Provide the intended token name, ID, metadata fields, or other relevant settings in a JSON payload.
   * The endpoint processes these parameters exactly as they would be for an on-chain deployment.
3. **Download the SVG preview**
   * The API responds with an SVG file that visually represents how your text-based token would appear on-chain.
   * You can download and inspect this SVG to confirm layout, text, and all embedded metadata.
4. **Validate & adjust**
   * If something looks off in the preview, revise the parameters and repeat.
   * This cycle ensures your final on-chain data will match your intended design.
5. **Proceed to deployment or mint**
   * Once satisfied, use the **Deploy Contract** or **Mint** endpoints with confidence, knowing your token model is verified.


# 1x1

#### Endpoint

<mark style="color:green;">`POST`</mark> `/api/v1/preview-token-1x1`

> Download an SVG file to preview a 1x1 token output

***

**Headers**

| Name          | Value                                                                                                                    |
| ------------- | ------------------------------------------------------------------------------------------------------------------------ |
| Content-Type  | `application/json`                                                                                                       |
| Authorization | [Xyxyx API Key](/getting-started/xyxyx-api-keys) or [XIN](https://docs.xyxyx.pro/protocol/xyxyx/xyxyx-issuer-nodes-xins) |

***

**Body**

<table><thead><tr><th width="239">Name</th><th width="258">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>tokenText</code></td><td>string</td><td>The text content that is stamped in the token output</td></tr><tr><td><code>walletPrivateKey</code></td><td>string</td><td>For authorizing wallet transaction</td></tr><tr><td><code>background</code></td><td>string (optional), defaults to <code>#000000</code></td><td>Hexadecimal color for the token output background</td></tr><tr><td><code>textColor</code></td><td>string (optional), defaults to <code>#FFFFFF</code></td><td>Hexadecimal color for the token output text</td></tr><tr><td><code>fontFamily</code></td><td>string (optional), defaults to <code>sans-serif</code></td><td>Font-family that is used in the token output text</td></tr><tr><td><code>borderRadius</code></td><td>integer (optional), defaults to <code>0</code></td><td>Border radius that is applied to the token output</td></tr><tr><td><code>showTrademark</code></td><td>boolean (optional), defaults to <code>false</code></td><td>Xyxyx trademark displayed on the token output bottom right corner</td></tr><tr><td><code>showDeployerAddress</code></td><td>boolean (optional), defaults to <code>false</code></td><td>Deployer address displayed on the token output bottom left corner</td></tr><tr><td><code>logo</code></td><td>string (SVG) (optional), defaults to null</td><td>1:1 SVG that is displayed on the top left corner of the token output</td></tr><tr><td><code>watermark</code></td><td>string (SVG) (optional), defaults to null</td><td>1:1 SVG that is displayed in the background of the token output (with 70% opacity)</td></tr></tbody></table>

***

**Response**

{% tabs %}
{% tab title="200" %}
`Downloads SVG file.`
{% endtab %}

{% tab title="400" %}

```json
{
  "success": false,
  "status": "Failed to preview token: {error.message}"
}
```

{% endtab %}

{% tab title="401" %}

```json
{
  "success": false,
  "status": "The wallet does not own any valid Xyxyx API Key or XIN"
}
```

{% endtab %}

{% tab title="429" %}

```javascript
{
  "success": false,
  "status": "This wallet has already consumed its 24-hour request quota"
}
```

{% endtab %}
{% endtabs %}


# A4

#### Endpoint

<mark style="color:green;">`POST`</mark> `/api/v1/preview-token-A4`

> Download an SVG file to preview an A4 token output

***

**Headers**

| Name          | Value                                                                                                                    |
| ------------- | ------------------------------------------------------------------------------------------------------------------------ |
| Content-Type  | `application/json`                                                                                                       |
| Authorization | [Xyxyx API Key](/getting-started/xyxyx-api-keys) or [XIN](https://docs.xyxyx.pro/protocol/xyxyx/xyxyx-issuer-nodes-xins) |

***

**Body**

<table><thead><tr><th width="239">Name</th><th width="258">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>tokenText</code></td><td>string</td><td>The text content that is stamped in the token output</td></tr><tr><td><code>walletPrivateKey</code></td><td>string</td><td>For authorizing wallet transaction</td></tr><tr><td><code>fontFamily</code></td><td>string (optional), defaults to <code>serif</code></td><td>Font-family that is used in the token output text</td></tr><tr><td><code>documentTitle</code></td><td>string (optional)</td><td>Document title, displayed on the top of the first page</td></tr><tr><td><code>documentSubtitle</code></td><td>string (optional)</td><td>Document subtitle, displayed below the document title</td></tr></tbody></table>

***

**Response**

{% tabs %}
{% tab title="200" %}
`Downloads SVG file.`
{% endtab %}

{% tab title="400" %}

```json
{
  "success": false,
  "status": "Failed to preview token: {error.message}"
}
```

{% endtab %}

{% tab title="401" %}

```json
{
  "success": false,
  "status": "The wallet does not own any valid Xyxyx API Key or XIN"
}
```

{% endtab %}

{% tab title="429" %}

```javascript
{
  "success": false,
  "status": "This wallet has already consumed its 24-hour request quota"
}
```

{% endtab %}
{% endtabs %}


# Authorization for wallet transactions

The Xyxyx API requires an authorization key for any on-chain operation (e.g., minting or transferring tokens, or deploying contracts). You have two primary options for providing this authorization:

1. **Use your existing wallet private key** to sign transactions for as many operations as you need.
2. **Generate single-transaction (or limited-use) keys** that grant only a constrained level of authority — often just for one operation or a fixed set of operations.

Below, we discuss each approach in detail, including tool suggestions for generating single-transaction or limited-use keys.

***

#### 1. Using your wallet private key

**Overview**\
You provide your existing wallet private key each time you call the API, allowing all signed transactions to originate from that wallet.

**Advantages**

* **Simplicity**: Setup is straightforward. You already have a private key; just provide it when making API requests.
* **No repeated key generation**: You don’t need to create new keys for every transaction.

**Considerations**

* **Security risk**: If your private key is leaked, an attacker could sign unlimited transactions without further approval.
* **User responsibility**: The Xyxyx API does not store your private key. You must protect it and supply it securely for each request.

This approach is best suited for frequent transactions where managing multiple, short-lived keys would be cumbersome.

***

#### 2. Using single-transaction (or limited-use) keys

**Overview**\
Single-use or limited-use keys provide fine-grained authorization. They can be configured so they are only valid for one transaction, or they may expire after a certain time or number of uses. This approach significantly reduces the risk of ongoing wallet exposure.

**Advantages**

* **Enhanced security**: Even if the key is compromised, the attacker can only submit transactions that the key was specifically authorized to handle.
* **Granular control**: Each transaction authorization is discrete, preventing accidental reuse.

**Considerations**

* **Repeated setup**: You must generate a new key or signature for each transaction or batch of transactions.
* **Additional complexity**: Some solutions may require specialized smart contracts or scripts to manage key validity or expiration.

This method is ideal for high-value operations or any scenario where limiting the scope of each transaction is paramount.

***

#### Tool Suggestions and How to Generate Limited-Use Keys

**1. Ephemeral Wallet Generation with Ethers**

* **Ethers.js Library**
  * A straightforward way to create a new wallet is using functions like `ethers.Wallet.createRandom()`.
  * Fund this ephemeral wallet only with the amount of ETH or tokens needed for a single transaction.
  * Provide the ephemeral wallet’s private key to the Xyxyx API for one-time use.
  * After the transaction completes, discard or drain the wallet, ensuring no lingering value remains.

**2. Gnosis Safe (Multi-Sig / Module Approach)**

* **Multiple Signature Workflow**
  * Deploy a Gnosis Safe and authorize specific modules or sub-accounts for limited, single-transaction actions.
  * This can be extended with Safe Modules to restrict spending limits or transaction counts.

**3. OpenZeppelin Defender or Relayers**

* **Managed Infrastructure**
  * Platforms like OpenZeppelin Defender offer “Relayers” that store a key and can be configured to only sign specific transactions or enforce a time/window limit.
  * This allows you to delegate minimal authority to a service which then orchestrates exactly one or a limited number of transactions on your behalf.

**4. Meta-Transaction Services (e.g., Biconomy, Gas Station Network)**

* **Abstracted Gas & Permissions**
  * You generate a signature for a single operation, and the meta-transaction provider executes it on-chain.
  * This method can prevent your main private key from ever being directly used by the DApp or API.

***

#### Which approach is right for you?

* **Frequent, Low-to-Moderate Risk Transactions**
  * If your operations are routine and you trust the environment where you provide the key, using a single wallet private key may be enough.
  * Ensure you follow strong key management and operational security practices.
* **High-Value or Security-Critical Operations**
  * When you cannot risk your primary wallet’s exposure, or your use case demands ultra-fine control, single-transaction (limited-use) keys are the safer choice.
  * Tools like ephemeral wallets, Gnosis Safe modules, or meta-transaction relayers can give you peace of mind and limit potential damage in case of a breach.

***

#### Summary

Whether you opt for a **full private key** or **single-transaction/limited-use key**, the Xyxyx API supports secure blockchain transactions on your behalf. Single-transaction keys add a layer of protection for high-risk scenarios, while reusing your main private key is often simpler for ongoing, automated tasks. By choosing the right method — and the right tools — you can balance convenience with the level of security you require.


# Function insights

This page provides a behind-the-scenes look at the text-based token minting and contract deployment processes within the Xyxyx API. We will illustrate how the [Ethers v6 Library](https://docs.ethers.org/v6/getting-started/) is used under the hood, and why the wallet private key is critical to sign transactions autonomously — allowing calls to be made without user interaction via a front-end.

***

#### Overview

By leveraging Ethers, the API can:

1. **Connect to the blockchain** via a provider (e.g., `ethers.JsonRpcProvider`).
2. **Create a wallet** (signer) using the private key that you provide in each request.
3. **Deploy contracts** through the `ContractFactory`.
4. **Mint tokens** by calling contract methods.

Because the private key is included with every request (rather than stored server-side), you remain fully responsible for its confidentiality. However, this design still allows an entirely automated flow for contract deployment and token minting, without interactive wallet confirmations.

***

#### Mint Token

```js
const { ethers } = require("ethers");

const contractAbi = require("../utils/ERC-721F/abi.json");

// Load the contract
const contract = new ethers.Contract(contractAddress, contractAbi, wallet);

// Mint cost in wei (10000000000 WEI === 0.00000001 ETH)
const weiCost = ethers.parseUnits(mintCost.toString(), "wei");

// Execute the mint function on the contract
const tx = await contract.mint(tokenId, svgBody, { value: weiCost });

// Wait for the transaction to be mined
const receipt = await tx.wait();
```

**Explanation**

1. **Import Ethers:**\
   Using `require("ethers")` imports the core Ethers library.
2. **Load Contract ABI:**\
   The ABI (Application Binary Interface) `abi.json` describes the functions, events, and error signatures of the ERC-721F contract. It allows Ethers to understand how to encode calls to `mint()` and decode contract responses.
3. **Create Contract Instance:**

   ```js
   const contract = new ethers.Contract(contractAddress, contractAbi, wallet);
   ```

   * `contractAddress` is the on-chain address of the deployed contract.
   * `contractAbi` is the ABI loaded from the JSON file.
   * `wallet` is an instance of `ethers.Wallet`, which includes the private key (provided by the user in the request) and a provider.
   * Passing the `wallet` as the third parameter ensures that all contract calls are signed by the wallet.
4. **Calculate Mint Cost in Wei:**

   ```js
   const weiCost = ethers.parseUnits(mintCost.toString(), "wei");
   ```

   * `ethers.parseUnits()` converts a string or numeric value into a **BigInt** representing the smallest unit (in this case, wei).
   * This is crucial for Ethereum transactions, which require values in wei rather than ETH.
5. **Call the Mint Function:**

   ```js
   const tx = await contract.mint(tokenId, svgBody, { value: weiCost });
   ```

   * `mint(tokenId, svgBody, { value: weiCost })` executes the smart contract’s `mint()` method.
   * The `value` field indicates how much Ether (in wei) to send along with the transaction.
   * Behind the scenes, the wallet signs this transaction, requiring no additional user confirmation beyond providing the private key up front.
6. **Await Transaction Confirmation:**

   ```js
   const receipt = await tx.wait();
   ```

   * Ethers `wait()` method suspends execution until the transaction is mined on the blockchain.
   * The returned `receipt` includes details like block number, gas used, and transaction status.

**Reference Material**

* [Contracts in Ethers v6](https://docs.ethers.org/v6/getting-started/#contracts)
* [Signers and Wallets](https://docs.ethers.org/v6/getting-started/#accounts)

***

#### Deploy Smart Contract

```js
// Create the ContractFactory
const factory = new ethers.ContractFactory(deployData.abi, deployData.bytecode, wallet);

// Deploy the contract with the given parameters
const contractFactory = await factory.deploy(name, ticker, parseInt(supply), mintPrice, onlyOwnerMint);

// Wait for the contract to be mined
await contractFactory.deploymentTransaction().wait();

// Retrieve the deployed contract address
const contractAddress = await contractFactory.getAddress();
const deploymentHash = await contractFactory.deploymentTransaction().hash;
```

**Explanation**

1. **Initialize ContractFactory:**

   ```js
   const factory = new ethers.ContractFactory(deployData.abi, deployData.bytecode, wallet);
   ```

   * `deployData.abi` is the ABI for the contract being deployed.
   * `deployData.bytecode` contains the compiled contract bytecode.
   * The `wallet` signer is provided by the user on each request and used to sign the deployment transaction.
2. **Deploy the Contract:**

   ```js
   const contractFactory = await factory.deploy(name, ticker, parseInt(supply), mintPrice, onlyOwnerMint);
   ```

   * `factory.deploy(...)` sends a transaction to create a new contract on-chain.
   * The parameters (`name`, `ticker`, `supply`, `mintPrice`, `onlyOwnerMint`) are passed to the constructor of the contract.
   * Under the hood, Ethers automatically calculates the gas limit and constructs the transaction data required for deployment.
3. **Await Mining:**

   ```js
   await contractFactory.deploymentTransaction().wait();
   ```

   * Similar to the mint example, this waits until the deployment transaction is confirmed.
   * Once confirmed, the contract is live on the blockchain.
4. **Obtain Deployment Details:**

   ```js
   const contractAddress = await contractFactory.getAddress();
   const deploymentHash = await contractFactory.deploymentTransaction().hash;
   ```

   * `getAddress()` retrieves the newly deployed contract address.
   * `deploymentTransaction().hash` gives the transaction hash of the deploy transaction.
   * These details can be used for logging, user notifications, or subsequent on-chain interactions.

**Reference Material**

* [Contract Factories in Ethers v6](https://docs.ethers.org/v6/getting-started/#contracts%E2%80%93contractfactory)
* [Transaction Lifecycle](https://docs.ethers.org/v6/getting-started/#transactions)

***

#### Why the private key is necessary?

* **Automatic signing:** Without the private key provided in each request, every transaction would require interactive approval from a front-end wallet (e.g., MetaMask). This manual process is not suitable for automated or large-scale operations.
* **Autonomous execution:** Including the private key in the API call allows the service to sign and broadcast transactions programmatically, enabling continuous, unattended minting and deployment.

***

#### Security & Custody

* **User responsibility:** The Xyxyx API does not store or persist your private key. You are required to provide the private key each time you make a request. As a result, you have full responsibility for its security.
* **Protecting your key:** If your private key is compromised, unauthorized transactions could be performed on your behalf. Always use secure channels and best practices when transmitting private keys.
* **No server-side sustody:** Since the API does not manage or retain your private key, there is no server-side wallet custody. Every signed transaction is generated by you, on demand, within each request.

***

#### Summary

By integrating Ethers v6 and requiring the wallet private key on every request, the Xyxyx API lets you deploy contracts or mint tokens without building a separate front-end signing flow. This approach empowers full autonomy while keeping private key custody in your hands.


# Code samples

Xyxyx’s [Postman collection](https://xyxyx-1337118.postman.co/workspace/5d9d99f0-c619-44e6-8d21-96b936f4957b/documentation/44695209-a81aad73-ad79-4fae-83fd-e05c29242873) enables developers to quickly test the API endpoints. Simply import the JSON file into Postman, set up environment variables (like the API base URL and wallet private key), and begin making requests.

For a more detailed, end-to-end demonstration, visit the Xyxyx Tokenization Boilerplate (XTB) Github repository [here](https://github.com/xyxyxpro/XTB). This repo shows how to integrate the Xyxyx API in a typical Node.js workflow, including code examples for minting text-based tokens and deploying smart contracts.


# Xyxyx Web Components

`xyxyx-web-components` is an npm package designed to integrate Xyxyx API's text-based tokenization functionalities within React applications.

**Components**

* [Xyxyx Tokenizer](/utilities/xyxyx-web-components/tokenizer)

***

#### Getting started

Install the package via npm or yarn:

```
npm install xyxyx-web-components
```

or

```
yarn add xyxyx-web-components
```

***

#### Learn more&#x20;

* [View on NPM](https://www.npmjs.com/package/xyxyx-web-components)
* [GitHub repository](https://github.com/xyxyxpro/xyxyx-web-components)


# Tokenizer

#### Overview

The Xyxyx Tokenizer is the first component included in the `xyxyx-web-components` package. It provides a simple and intuitive user interface that simplifies and streamlines the process of contract deployment and token issuance.&#x20;

The Xyxyx Tokenizer is specifically designed for the [1x1](https://docs.xyxyx.pro/products-and-services/tokenization-models/1x1) tokenization model, with the Xyxyxx API underneath.

***

#### Features

* Supports the integration of 1x1 smart contract deployment & token issuance into any React application, with the Xyxyx API serving as the execution layer behind the scenes
* Enables the generation of 1x1 token previews in SVG format
* Provides easy error handling and state management for 1x1 contract deployment and token issuance

***

#### Intended Use

* [ERC-721F](/api-endpoints/erc-721f): You need an already deployed ERC-721F contract. The Xyxyx Tokenizer will be used to streamline the individualized minting of tokens for this contract.
* [ERC-404](/api-endpoints/deploy): The Xyxyx Tokenizer helps you deploy an ERC-404 smart contract, arbitraging via Tokenizer the token SVG output for the entire token supply.
* [ERC-721](/api-endpoints/erc-721f): The process is the same as for ERC-404.

***

#### 1x1 Props

* `isDeployAllowed` – Enables or disables contract deployment/token issuance button externally
* `tokenText` – The text content that is stamped in the token SVG output
* `metadataText` – The text content that is inserted in the token metadata, stored within its SVG file
* `background` – Hexadecimal color for the token output background
* `textColor` – Hexadecimal color for the token output text
* `fontFamily` – Font-family that is used in the token output text
* `borderRadius` – Border radius that is applied to the token output
* `logo` – 1:1 SVG that is displayed on the top left corner of the token output
* `watermark` – 1:1 SVG that is displayed in the background of the token output (with 70% opacity)
* `showDeployerAddress` – Option to display wallet address
* `showTrademark` – Xyxyx trademark displayed on the token output bottom right corner

***

#### ERC-721F Props (Token Mint)

* `contractAddress` – Existing ERC-721F contract address
* `tokenId` – Token ID of the token to be minted
* `mintCost` – Amount required to mint a token
* `smartContract` – Token standard (`ERC721F`)
* `network`  – Blockchain network to mint the token
* `walletPrivateKey` – Deployer private key for authorizing transaction

***

#### ERC-404 Props (Smart Contract Deploy)

* `name` – Token name
* `ticker` – Token ticker
* `decimals` – Token decimals
* `supply` – Token total supply
* `smartContract` – Token standard (`ERC404`)
* `network` – Blockchain network to deploy the contract
* `walletPrivateKey`– Deployer private key for authorizing transaction

***

#### ERC-721 Props (Smart Contract Deploy)

* `name` – Token name
* `ticker` – Token ticker
* `supply` – Token total supply
* `mintPrice` – Token mint price
* `restrictToOwner` – Defines if minting is restricted to contract owner
* `smartContract` – Token standard (`ERC721`
* `network` – Blockchain network to deploy the contract
* `walletPrivateKey`– Deployer private key for authorizing transaction

***

**Usage Example**

Below is a basic usage example demonstrating how to integrate the `XyxyxTokenizer` component into your React app:

```jsx
import React from 'react';
import { XyxyxTokenizer } from 'xyxyx-web-components';

const App = () => (
  <XyxyxTokenizer
    name="Lorem Ipsum"
    ticker="LI"
    supply={1}
    tokenText="Insert the token SVG output text here"
    metadata="Insert the token metadata here"
    walletPrivateKey="your-wallet-private-key"
    background="#000000"
    textColor="#FFFFFF"
    fontFamily="Arial, sans-serif"
    borderRadius="10"
    showDeployerAddress={true}
    walletAddress="0xABCDEF1234567890"
    smartContract="ERC404"
    network="mainnet"
/>
);
```


