# Gasless Transaction

## Apply to use TX-SERVER

In order to use TX-SERVER's API to send tokens to a specific wallet address, you can apply for API key issuance and obtain information for linking after completing the issuance process from the following site.

{% tabs %}
{% tab title="Website" %}
<https://business.fncy.world/page/issue/partner/key>
{% endtab %}
{% endtabs %}

<figure><img src="https://content.gitbook.com/content/psMz9WhH659LlTSzzODD/blobs/XENnAyNPSrZJuSxHzo4X/API%20Key.png" alt=""><figcaption></figcaption></figure>

* [x] **Step 1.** Access website
* [x] **Step 2.** Note "<mark style="color:red;">Received ID</mark>" after completing the API key issuance application
* [x] **Step 3.** Check API key issuance information after a period of time

## TX-SERVER API Features

When the API key issuance application is completed, you can check the request domain, Api-Key, and other information required for integration, and use the information to make the following API requests.

## Get a list of managed contract methods

<mark style="color:blue;">`GET`</mark> `/v1/management-contract-methods`

#### Headers

| Name                                      | Type   | Description                  |
| ----------------------------------------- | ------ | ---------------------------- |
| Api-Key<mark style="color:red;">\*</mark> | String | API Key Issuance Information |

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

{% endtab %}
{% endtabs %}

## Registering a transaction request

<mark style="color:green;">`POST`</mark> `/v1/transaction-request`

#### Headers

| Name                                      | Type   | Description                  |
| ----------------------------------------- | ------ | ---------------------------- |
| Api-Key<mark style="color:red;">\*</mark> | String | API Key Issuance Information |

#### Request Body

| Name                                             | Type   | Description                                                                     |
| ------------------------------------------------ | ------ | ------------------------------------------------------------------------------- |
| functionParams<mark style="color:red;">\*</mark> | String | Required parameter values for contract function calls                           |
| methodNo<mark style="color:red;">\*</mark>       | String | Eigenvalues of callable contract functions (method list lookup API information) |
| ticketId<mark style="color:red;">\*</mark>       |        | Request ID requested by the Points Redemption Server (UNIQUE)                   |

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

{% endtab %}
{% endtabs %}

## Service Example between Web2 and Web3 using Gasless Transaction

## 1. UX/UI design

<figure><img src="https://content.gitbook.com/content/psMz9WhH659LlTSzzODD/blobs/4zhJraVcnkH3PX7w8M7R/Exchange.png" alt=""><figcaption></figcaption></figure>

## 2. Sequence diagrams

## 1) Login

<figure><img src="https://content.gitbook.com/content/psMz9WhH659LlTSzzODD/blobs/a5a0O4XXb9ttFh8ihac1/Untitled%20(4).png" alt=""><figcaption><p>Login Simple Sequence Diagram</p></figcaption></figure>

* To log in by looking up the game player ID, the Points Exchange Center provides the same authentication channel as the authentication in the game, and issues a login token using the information passed by authenticating through each channel.
* The Points Exchange uses tokens issued by the game certifier for protected support requests.

## 2) Withdrawing points (depositing tokens)

<figure><img src="https://content.gitbook.com/content/psMz9WhH659LlTSzzODD/blobs/oEElXHQp2BgKqpkaxISJ/Untitled%20(5).png" alt=""><figcaption><p>Point Withdrawal Simple Sequence Diagram</p></figcaption></figure>

* If the request to deduct points from the game server is successful, a token deposit request is made to the TX-SERVER to a specific wallet address, and the result is checked using the request information in a later callback.
* TICKET\_IDs for TX-SERVER requests are generated, requested, and stored as unique, non-duplicated information.

## 3) Deposit points (withdraw tokens)

<figure><img src="https://content.gitbook.com/content/psMz9WhH659LlTSzzODD/blobs/73jNdllIdpZuT4pmGU5k/Untitled%20(6).png" alt=""><figcaption><p>Point Deposit Simple Sequence Diagram</p></figcaption></figure>

* After the token withdrawal request, the resulting callback will only request a point increase through the game server if successful.&#x20;
* TICKET\_IDs for TX-SERVER requests are generated, requested, and stored as unique, non-duplicated information.

## 4) Transferring withdrawal tokens

<figure><img src="https://content.gitbook.com/content/psMz9WhH659LlTSzzODD/blobs/pC7EMga2YZNDeQCWxYjH/Untitled%20(7).png" alt=""><figcaption><p>Withdrawal Token Transfer Simple Sequence Diagram</p></figcaption></figure>

* Withdraw game points and send the deposited tokens to a specified wallet address.
* TICKET\_IDs for TX-SERVER requests are generated, requested, and stored as unique, non-duplicated information.

##
