# Introducing LYNC

Build and launch your Web3 game in minutes with LYNC SDK

## What is LYNC?

LYNC is a GameFi infrastructure that allows game developers to launch their game on-chain, by keeping blockchain complexities aside. \
\
LYNC SDKs can be easily integrated into game engines like Unity and Unreal in a few clicks. LYNC SDKs enable Wallet Integration, In-game marketplace, LYNC Game Launcher, Dynamic NFT Integration, Asset Interoperability, In-game monetisation and Cross Chain support (Using Axelar). We are helping game developers to push their games on the blockchain. \
\
At LYNC, we aim to streamline the process for game developers to integrate blockchain into their games without the hassle of complex web3 development. We aim to empower developers to focus solely on creating immersive gaming experiences, while LYNC handles the seamless integration of digital asset ownership for players, enhancing their overall gaming experience.

## Why LYNC?

The Web3 game industry is yet to see a successful example. To make Web3 game development a reality, a streamlined infrastructure is needed to eliminate barriers. At LYNC, we are committed to delivering just that - a simplified infrastructure that can cut down 99% of the development time, enabling the seamless launch of Web 3.0 games.

We've put together some helpful guides for you to get setup with our product quickly and easily.


# Pre-Requisites

### Get Your API Key&#x20;

Please get your API key before downloading the SDK from [**here**](https://www.lync.world/form.html)<br>

### Supported Game Engines

The LYNC SDK is Compatible with Unreal Engine and [Unity](https://unity.com/). The Currently Supported Versions are:&#x20;

* Unity 2019.4.21f1 and above&#x20;
* Unreal Engine 4.27.2, 5.0.2, 5.0.3, 5.1.0 **(Unreal Engine plugins are still under development)**


# LYNC Account Abstraction SDK

LYNC AA SDK is a no-code Unity SDK supporting PC (MacOS and Windows) and Mobile (Android and iOS)

LYNC Unity Account Abstraction SDK, your solution to seamless gamer onboarding in Web3 Games! Enable effortless logins via socials, wallets, email, and more. Integrate swiftly into any game on Mac, Windows, Android, iOS, or browser. Simplify the gaming experience with LYNC AA SDK, connecting gamers effortlessly.

## Get your API Key

Please get your API key before downloading the SDK from [**here**](https://www.lync.world/form.html)

## Installation

Download the LYNC Account Abstraction SDK from [Here](https://github.com/LYNC-WORLD/LYNC-Unity-AA)

Import the SDK .unitypackage file to your project. or simply drag and drop .unitypackage file to your project.

<figure><img src="/files/ZOxvCM5mHIK23sqZKmoO" alt=""><figcaption><p>Assets -> Import Package -> Custom Package</p></figcaption></figure>

\
Once the Account Abstraction SDK package has finished importing into your Unity project, you can begin integrating it into your game.

The Folder structure looks like this

<figure><img src="/files/GlZODMKKsnHA1inutdb5" alt="" width="279"><figcaption><p>SDK Folder Structure</p></figcaption></figure>

### Integrating AA SDK in Unity

There are 2 Example Projects present in the SDK:\
Assets -> LYNC-AA-SDK -> Example / Example-2

<figure><img src="/files/T3B6J2xx2ufsNBr6k0Cf" alt=""><figcaption><p>Example Projects</p></figcaption></figure>

You can find the example scene in the folders. Simply pass the API key in lyncManager GameObject.

To test, Build and Run after adding this scene in (Scene in Build).\ <br>

<figure><img src="/files/qx5oHV654XDvB4mQjCN0" alt="" width="375"><figcaption><p>Pass LYNC API Key</p></figcaption></figure>

### **Setup the Project**

To use LYNC Manager Prefab, it needs to be attached to the first scene. This will serve as the starting point for your project.

In LYNC Manager Prefab, be sure to provide the following details:

1. LYNC API Key ([The API Key can be generated from here](https://lync.world/form.html))
2. Choose chain
3. Pass in the Dapp API Key ([The API key can be generated from the Biconomy Dashboard](https://dashboard.biconomy.io/) )
4. Web3 Auth Client ID ([The API key can be generated from the Web3 Auth Dashboard](https://dashboard.web3auth.io/login))
5. Pass a deep link name (example: lync/gameName etc.)

### Integrating Login or Transaction Layer via Account Abstraction in Unity

Login and Transactions can be done once the action is triggered.

The Sample Code for Login can be found at LoginTransactionExample.cs and ExampleLogin.cs

<figure><img src="/files/wVffBV3NTHb6hIaY5fgk" alt=""><figcaption><p>Assets -> LYNC-AA-SDK -> Example -> Scripts -> ExampleLogin.cs</p></figcaption></figure>

**Note: Make sure to Import LYNC.**

```csharp
using LYNC;
using LYNC.Wallet;
```

**Example (Event Trigger):**

LYNC ready Should be a function which has an argument of type "LyncManager"

<pre class="language-csharp"><code class="lang-csharp"><strong>LyncManager.onLyncReady += LyncReady;
</strong><strong>
</strong>private void LyncReady(LyncManager Lync)
    {
        // Once LYNC is ready, you can do any steps like Login, Logout, Transactions etc.
    }
</code></pre>

**To Login:**

```csharp
Lync.WalletAuth.ConnectWallet((wallet) =>
{
    addressTxt.text = "Wallet Address: " + wallet.publicAddress;
    loginDateTxt.text = "Login Date: " + wallet.loginDate.ToString();
});
```

**To Logout:**

<pre class="language-csharp"><code class="lang-csharp"><strong>Lync.WalletAuth.Logout();
</strong></code></pre>

**To do transactions:**

To do transactions, TokenExample.cs and LoginTransactionExample.cs can be taken as a reference.

Pass in the Contract Address and Function Name Example: MintNFT(). MintNFT(unit256 id, unit256 amount)

Args are not compulsory parameters, but if the function accepts any argument, make sure to pass them.

<figure><img src="/files/h1mVB8Y86RlCnr3uyzoG" alt=""><figcaption><p>Token Transactions</p></figcaption></figure>

To do it from the script:

```csharp
LyncManager.Instance.blockchainMiddleware.SendTransaction(contractAddress, functionName, args, onSuccess,onError);
```

onSuccess: Once the transactions are completed, this handles what to do.

onError: If the transactions failed, this handles what to do.

### Setup Gasless Transactions with Biconomy

To enable gasless transactions via biconomy, Register a new paymaster on the [Biconomy Dashboard](https://dashboard.biconomy.io/#).&#x20;

<figure><img src="/files/TLfk2mecScq18HJdUuCe" alt="" width="482"><figcaption></figcaption></figure>

Once done, Get the API Key and Pass it in to the [LYNC Manager](#setup-the-project).

<figure><img src="/files/pQcmGQANx7B1ZLnLEs1y" alt=""><figcaption><p>Bicnomy API Key</p></figcaption></figure>

Setup the gas tank, in Policies create a new one and pass the contract address

<figure><img src="/files/YwCvXwePaESMpW0E9LaI" alt="" width="124"><figcaption><p>Contract Address setup</p></figcaption></figure>

That's it, now you can do the gasless transaction on this contract address passing in the LYNC AA SDK.

#### Some common bugs and their resolutions

**Problem**: The type name 'HttpUtility' could not be found in the namespace 'System.Web'.

<pre class="language-csharp"><code class="lang-csharp"><strong>Assets\LYNC-AA-SDK\Auth\DeepLink\DeepLinkManager.cs(76,35):
</strong>error CS1069: The type name 'HttpUtility' could not be found in the namespace 'System.Web'.
This type has been forwarded to assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' 
Consider adding a reference to that assembly.
</code></pre>

**Solution**:&#x20;

Change the API Compatibility Level\
To change the . NET profile, go to Edit > Project Settings > Player >Other settings.

Please change the .NET to 2.1 or 2

<figure><img src="/files/qDRk8p4tZBtcVkZTN4rV" alt=""><figcaption><p>Change the .NET Version</p></figcaption></figure>

**Problem:** Newtonsoft JSON is missing.

**Solution**: Please, Add this as a git URL in adding package

```csharp
com.unity.nuget.newtonsoft-json
```

<figure><img src="/files/IBRqYJeXVwk7OQ1DDEEy" alt="" width="563"><figcaption><p>Add newtonsoft</p></figcaption></figure>


# Metamask Wallet

Integrate Metamask Wallet into game engine

LYNC Metamask Wallet SDK is a one-stop solution for game developers to easily integrate Metamask into their game engine and deploy their game on multiple networks with just a few clicks. This SDK allows game developers to monitor gamers’ data via LYNC analytics system and update the SDK without leaving the game engine.

<figure><img src="/files/4rZYYGrPA22SirECAN0V" alt=""><figcaption><p>Integrate Metamask wallet inside any game using LYNC SDK</p></figcaption></figure>

## Get Your API Key&#x20;

Please get your API key before downloading the SDK from [**here**](https://www.lync.world/form.html)

## Installation

Download the LYNC - Metamask Wallet SDK from [**here**](https://github.com/LYNC-WORLD/Metamask-Unity-Wallet-SDK)<br>

Import the SDK .unitypackage file to your project. or simply drag and drop .unitypackage file to your project.

<figure><img src="/files/ZOxvCM5mHIK23sqZKmoO" alt=""><figcaption><p>Assets -> Import Package -> Custom Package</p></figcaption></figure>

Once the Metamask Wallet SDK package has finished importing into your Unity project, you can begin integrating it into your game. To do this, open the **ConnectWallet** scene provided by the LYNC - Metamask SDK.\
\
&#x20;                                            **Path : Assets ->LYNC-Metamask-SDK -> Scenes**<br>

<figure><img src="/files/2Q17jvrURq99NRDDSOsz" alt=""><figcaption><p><strong>Assets ->LYNC-Metamask-SDK -> Scenes</strong></p></figcaption></figure>

## Choose blockchain network&#x20;

{% hint style="info" %}
If you haven't generated API Key, please check [#get-your-api-key](#get-your-api-key "mention")
{% endhint %}

After opening **ConnectWallet** scene, Go to **Interface.** In the "Inspector" window, go to the API key & Enter the **API key**.&#x20;

<figure><img src="/files/BROEKhh7HJcC9l5PktvW" alt=""><figcaption></figcaption></figure>

To choose the blockchain network, simply go to the **CurrentChain** drop-down menu and pick the network of your preference to deploy your game on.

<figure><img src="/files/3sGSj9Xe4fHCPrbNsqJd" alt=""><figcaption><p>Interface -> CurrentChain -> Choose Your Chain</p></figcaption></figure>

## Integrating ConnetWallet scene into the build&#x20;

To deploy your Unity project, it's necessary to set up the Player Settings in Unity. Follow these steps to select the LYNC WebGL template.

<figure><img src="/files/DXxDHLZH7ryfrLKOPoO5" alt=""><figcaption><p>File -> Build Settings</p></figcaption></figure>

In the "**Build Settings**" window, place **ConnectWallet** and **FetchWallet** at the top of this section.&#x20;

<figure><img src="/files/hnXXn2Jnkyq2rhdAU7qO" alt=""><figcaption><p>Add ConnectWallet &#x26; FetchWallet Scene to the top of Scenes in Build</p></figcaption></figure>

Go to "**Player Settings**" and navigate to "**Resolution and Presentation**". **Select LYNC - Template** in WebGL Template

<figure><img src="/files/YegsxNgCDuWxy9WEFS7B" alt=""><figcaption><p>Player Settings -> Resolution and Presentation -> Select LYNC - Template</p></figcaption></figure>

After completing all the necessary steps and configuring the Player Settings with the LYNC WebGL template, you can now build and run your game.

* To do this, go to "**File**" on the top menu bar in the Unity editor and select "**Build and Run**."&#x20;

<figure><img src="/files/qSb6qB2mV2jQuJszRQ5a" alt=""><figcaption><p>Build and Run </p></figcaption></figure>

Congratulation, you have successfully integrated the Metamask wallet with your favourite blockchain network using LYNC SDK. \
\
NOTE: If you wish to use wallet address inside game after user's wallet is connected, use:

```
PlayerPrefs.GetString("WalletAddress");
```

If you face any error, while Build and Run.\
\
PLEASE ADD, Unity package install by git link\
\
com.unity.nuget.newtonsoft-json

<figure><img src="/files/D72XvPGZk4IAisG4BKMm" alt=""><figcaption></figcaption></figure>


# OKX Wallet

Integrate OKX wallet into game engine

<figure><img src="https://miro.medium.com/max/1100/1*zBhTVCuPi_qOcP-YEHMAnQ.webp" alt=""><figcaption></figcaption></figure>

The LYNC - OKX wallet SDK allows game developers to integrate OKX Wallet into their games quickly, and set up OKX Chain inside the game in less than 30 seconds. This SDK allows game developers to monitor gamers’ data via the LYNC analytics system and update the SDK without leaving the game engine.

## Get Your API Key&#x20;

Please get your API key before downloading the SDK from [**here**](https://www.lync.world/form.html)

## Installation

Download the LYNC - OKX Wallet SDK from [**here**](https://github.com/LYNC-WORLD/OKX-Unity-Wallet-SDK)\
\
Import the SDK .unitypackage file to your project. or simply drag and drop .unitypackage file to your project.

<figure><img src="/files/ZOxvCM5mHIK23sqZKmoO" alt=""><figcaption><p>Assets -> Import Package -> Custom Package</p></figcaption></figure>

Once the OKX Wallet SDK package has finished importing into your Unity project, you can begin integrating it into your game. To do this, open the **ConnectWallet** scene provided by the LYNC-OKX SDK.\
\
&#x20;                                            **Path : Assets ->LYNC-OKX-SDK -> Scenes**<br>

<figure><img src="/files/2Q17jvrURq99NRDDSOsz" alt=""><figcaption><p><strong>Assets ->LYNC-OKX-SDK -> Scenes</strong></p></figcaption></figure>

## Choose blockchain network&#x20;

{% hint style="info" %}
If you haven't generated API Key, please check [#get-your-api-key](#get-your-api-key "mention")
{% endhint %}

After opening **ConnectWallet** scene, Go to **Interface.** In the "Inspector" window, go to the API key & Enter the **API key**.&#x20;

<figure><img src="/files/M2VGwEmoC250lwfHto2g" alt=""><figcaption><p>Enter the API key</p></figcaption></figure>

To choose the blockchain network, simply go to the **CurrentChain** drop-down menu and pick the network of your preference to deploy your game on.

<figure><img src="/files/VJGmwBSJ4EA8gfPWZxk6" alt=""><figcaption><p>Interface -> CurrentChain -> Choose Your Chain</p></figcaption></figure>

## Integrating ConnetWallet scene into the build&#x20;

To deploy your Unity project, it's necessary to set up the Player Settings in Unity. Follow these steps to select the LYNC WebGL template.

<figure><img src="/files/DXxDHLZH7ryfrLKOPoO5" alt=""><figcaption><p>File -> Build Settings</p></figcaption></figure>

In the "**Build Settings**" window, place **ConnectWallet** and **FetchWallet** at the top of this section.&#x20;

<figure><img src="/files/JJRO9Pi2u2iyhF31VVgP" alt=""><figcaption><p>Add ConnectWallet &#x26; FetchWallet Scene to the top of Scenes in Build</p></figcaption></figure>

Go to "**Player Settings**" and navigate to "**Resolution and Presentation**". **Select LYNC - Template** in WebGL Template

<figure><img src="/files/YegsxNgCDuWxy9WEFS7B" alt=""><figcaption><p>Player Settings -> Resolution and Presentation -> Select LYNC - Template</p></figcaption></figure>

After completing all the necessary steps and configuring the Player Settings with the LYNC WebGL template, you can now build and run your game.

* To do this, go to "**File**" on the top menu bar in the Unity editor and select "**Build and Run**."&#x20;

<figure><img src="/files/qSb6qB2mV2jQuJszRQ5a" alt=""><figcaption><p>Build and Run </p></figcaption></figure>

Congratulation, you have successfully integrated the OKX wallet with your favourite blockchain network using LYNC SDK. \
\
NOTE: If you wish to use wallet address inside game after user's wallet is connected, use:

`PlayerPrefs.GetString("WalletAddress");`


# LYNC In-Game Marketplace SDK

Integrate in-game Marketplace into game engine

The in-game marketplace SDK enables developers to integrate a blockchain-based marketplace into their games, allowing players to perform transactions using NFT-based in-game assets. Key features include:

1. Decentralized profile management.
2. Buy, sell, rent, and lend NFTs.
3. NFT minting for free.
4. Cross-chain swaps.
5. Cross-chain rent/lend.
6. On-Ramp / Off-ramp Integration

By incorporating this SDK, developers can enhance player engagement, create monetization opportunities, and foster a strong player community.

<figure><img src="/files/4CXe7Xox8ItZan0t19Mr" alt=""><figcaption><p>LYNC MARKETPLACE SDK</p></figcaption></figure>

### Steps to Integrate Marketplace in Games:

**Note:** Make sure to Integrate any wallet SDK provided by LYNC.

Download the LYNC - Marketplace Wallet SDK

Import the SDK .unitypackage file to your project. or simply drag and drop .unitypackage file to your project.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3h3YUWYt8sR5rHLOIeFc%2Fuploads%2FdDzWzt5kkCqpWZTINSsu%2FLYNC%20wallet%20sdk.png?alt=media&token=65ae978c-fa8b-4eb5-a2ba-548146b3bb14>" %}
Import LYNC Marketplace SDK
{% endembed %}

Once the Marketplace Wallet SDK package has finished importing into your Unity project, you can begin integrating it into your game. To do this, open the **Marketplace** scene provided by the LYNC.

&#x20;<mark style="background-color:yellow;">**Path : Assets ->LYNC-Marketplace -> Scenes**</mark>

After opening the **Marketplace** scene, Go to **Marketplace** GameObjec&#x74;**.** In the "Inspector" window, go to the Contract Address & Enter the **Contract Address** of your in-game assets which are listed as NFT.

<figure><img src="/files/NBdp8QY38vJQeOuQdMj9" alt=""><figcaption><p>Enter contract address</p></figcaption></figure>

Once you have entered the Contract Address, the chain id is getting fetched directly by Interface from the wallet Integration Screen.

Once the contract address is added, if you play the Unity game. It will start fetching all the NFTs by this contract address.

**Listing In-Game Assets on the In-Game Marketplace:**\
Players can list their in-game assets on either sell or lend in just one click.

<figure><img src="/files/50PvhTk6unzpacbNB8ee" alt=""><figcaption></figcaption></figure>

1. Navigate to the 'Inventory' section to access your owned NFTs.
2. Choose the desired NFT from your inventory' owned NFT Section.
3. Input a price for the asset.
4. Click the 'Sell' button to initiate the listing process.
5. Complete the first wallet transaction to approve your token.
6. Finalize the second transaction to successfully list your item on the marketplace.

***Voila! You've just listed your item for sale.***

Similarly, players can easily list their in-game assets for lending with just a few clicks:

1. Go to the 'Inventory' section to view your owned NFTs.
2. Select the NFT you wish to lend from your inventory's 'Owned NFT' section.
3. Set a daily rental price for the asset.
4. Specify the maximum duration for which the asset can be rented.
5. Complete the transaction to list your token for lending.

***And there you have it! You've successfully listed your item for rent.***

Additionally, our in-game marketplace SDK allows cross-chain token swaps, enabling players to exchange tokens seamlessly within the game environment, without worrying about any complexities.

<figure><img src="/files/WZ1ehOfTSteWYEzToO3s" alt=""><figcaption><p>Cross chain swaps visa Squid</p></figcaption></figure>

**In-Game Claimer Page**

LYNC Marketplace SDK allows gamers to mint in-game assets as NFT from the game itself, gamers can bring their contract address from any chain and the claimer page can be used by the gamers.

such If you want to deploy in-game assets as NFTs, Loot boxes, gasless NFT mint, or even dynamic NFTs. This can be done via [LYNC NFT Deployer](/lync/products/lync-nft-deployer).&#x20;

<figure><img src="/files/NsT8j1ugbk0b7c9v3Arg" alt=""><figcaption><p>Claim/Mint NFTs in game</p></figcaption></figure>


# NFT Fetcher

Fetch NFTs directly from wallet.

### Introduction&#x20;

NFT Fetcher is a tool that allows developers to easily integrate NFT (Non-Fungible Tokens) into game engines like Unity and Unreal. With just a few clicks, developers can fetch NFT from specific chains and contracts and integrate them into their game.

### Integration with Game Engines&#x20;

NFT Fetcher can be integrated into Unity and Unreal game engines with ease. Simply download the SDK from the NFT Fetcher website and import it into the engine by dragging and dropping the files.

### Fetching NFT&#x20;

NFT Fetcher allows developers to fetch NFT from specific chains and contracts. To do this, developers must choose the chain and contract address they want to fetch NFT from. Developers can also enter the contract address to fetch all NFTs from a specific contract or get NFTs from a wallet of a contract address.

### Steps to Integrate NFT Fetcher:

* Download the SDK from the NFT Fetcher from [LYNC World](https://request-demo.lync.world/)
* Import the SDK into Unity or Unreal by dragging and dropping the files.
* Choose the chain, List of supported chains are:
  * Ethereum
  * Goerli
  * Polygon
  * Mumbai
  * Arbitrum Mainnet
  * Arbitrum Goerli
  * Optimism Mainnet
  * Optimism Goerli

<figure><img src="/files/ChSv05HVc4ocrYubls1c" alt="" width="563"><figcaption><p>Choose chain</p></figcaption></figure>

* Pass the Contract Address on the selected chain. It will start fetching all the NFTs of that contract address.

<figure><img src="/files/9JGIpIAZKfSsYe8Swk5u" alt="" width="563"><figcaption></figcaption></figure>

* If you want gamers to fetch their NFTs from the wallet address, mark "*Show User NFTS*" as True (Mark Tick).

<figure><img src="/files/TuGHUJPeQhxo2TiU2dAy" alt="" width="563"><figcaption></figcaption></figure>

* For testing in Unity Editor, Pass Wallet Address and NFTs will start showing.
* If you wish to see logs, enable Debug Logs as True (Mark Tick).


# LYNC Portal: Game Launcher

Launch your game in a decentralised environment in a few clicks

Link to LYNC Portal:- <https://portal.lync.world/>\
\
LYNC Portal is a decentralized game launcher that allows game developers to launch their games in a decentralized environment and also as NFT (Non-Fungible Tokens). This platform provides an easy and seamless way for game developers to deploy and launch their games on the blockchain, providing gamers with a secure and decentralized gaming experience.

### On-Chain Gaming Experience:&#x20;

Gamers can play games on the blockchain without sacrificing their gaming experience. LYNC Portal allows for an on-chain gaming experience, where players can own and trade their in-game assets as NFTs. This opens up a new level of ownership and value for players and provides game developers with new revenue streams.

### LYNC Marketplace and Other Marketplaces:&#x20;

LYNC Portal makes it easy for developers to list their games on the LYNC Marketplace, as well as other marketplaces. This provides a new distribution channel for developers and expands the reach of their games.

### Steps to Launch Your Game:

Click on the "Launch Game" button.&#x20;

<figure><img src="/files/N1jx2oDw8HWe1RINiu5w" alt=""><figcaption></figcaption></figure>

Drag and drop the .zip file of your build folder.&#x20;

<figure><img src="/files/TWeRGdlyvSxYXCDfT8K6" alt=""><figcaption></figcaption></figure>

Add details such as game name, game description, choose a category, and, add a game thumbnail.&#x20;

<figure><img src="/files/rPbT75qgSFKKXyAbz3mx" alt=""><figcaption></figcaption></figure>

Click on "Upload".&#x20;

<figure><img src="/files/WeznUxlSajLFZp0No4f5" alt=""><figcaption></figcaption></figure>

Your game has been uploaded on IPFS. If you want to deploy your game as an NFT, click on "Deploy as NFT". Then, write the contract name and game token symbol. After adding details, click on "Deploy as NFT".&#x20;

<figure><img src="/files/c7rdc5a4ZuVNDciB2GCJ" alt=""><figcaption></figcaption></figure>

Congratulations, now you can list your game on the LYNC Marketplace and other marketplaces as well. LFG


# LYNC NFT Deployer

Launch, manage, and deploy smart contracts with ease - no blockchain knowledge required!

Get early access now - [Book a Demo](https://request-demo.lync.world/)\
\
LYNC NFT Deployer is a smart contract deployment platform that allows users to create and deploy their 1/1 NFT, Multiple editions, in-game assets as an NFT and Entire NFT Collection with gasless transactions in just a few clicks.\
\
**ERC-721A and ERC-1155 Support:**

The platform supports the two most popular NFT standards - ERC-721A and ERC-1155. ERC-721A is ideal for one-of-a-kind digital assets, while ERC-1155 is used for multi-edition or fungible tokens.\
\
**How to deploy NFT Collection on LYNC NFT Deployer.**

1. Connect your wallet to the NFT Deployer.
2. Select the type of NFT Collection you want to launch, there are four options:
   1. 1/1 NFT
   2. Multiple Edition
   3. Collection
   4. Web3 Game

LYNC supports all EVM Compatible chains including, Polygon, Ethereum, Arbitrum, Avalanche, Astar, zkSync, and the Shardeum blockchains. In the deployer, there is a network selector dropdown. Select the network you want to deploy your collection to.

**Launch your** **entire Collection**

<figure><img src="/files/iSyORisgmv69jjsgYRc6" alt=""><figcaption><p>Launch NFT Collection</p></figcaption></figure>

1. Choose the type of collection as "Collection"
2. Provide an image, name, and description that will be displayed on the claimer page, where your community can mint the NFTs.
3. Enter a Contract name, Contract symbol, and select the desired chain from the network selector dropdown.
4. Choose the type of contract based on your needs: ERC-721A for unique NFTs, ERC-1155 for multiple copies, or opt for a gasless contract if you want to cover the gas fees for your users.
5. Input the token URI of your metadata, which should look like this:

   `ipfs://CID/`
6. Specify the maximum number of mints allowed per wallet address, the total supply for the collection, and the cost of minting.
7. Once all the required information is provided, click on "Deploy" to launch your NFT collection.
8. Once the contract is deployed, you can share the claimer page with your community to allow the minting of NFTs. Claimer page is available under "Your Contracts"

   <figure><img src="/files/tHCZMb3NP5O7m0u2Yjzf" alt=""><figcaption><p>Claimer Page</p></figcaption></figure>

**Launch your single-edition or multiple-edition collection**

1. Choose the type of collection as "1/1 NFT" or "Multiple Edition"&#x20;
2. Enter a Contract name, Contract symbol, and select the desired chain from the network selector dropdown.
3. After providing the necessary details, click on "Deploy" to launch your NFT collection.

Following the contract deployment:

1. Head to the "Tokens" section and click on "Create."
2. When creating an NFT, you will be prompted to provide an image, name, description, and other information about the NFT. You can also add properties to the NFT.
3. Once you have minted your NFTs, you need to link them to your project and integrate them into your game using our API and SDKs.


# FEVM Support

LYNC supports FEVM to allow anyone to remove blockchain complexities and build with an ease.


# LYNC Wallet SDK supporting FEVM

Integrate FEVM Network in any game in less than 30 seconds.

Link to SDK: <https://github.com/LYNC-WORLD/Metamask-Unity-Wallet-SDK>

LYNC Metamask Wallet SDK allows game developers to easily integrate Metamask into their game engine and deploy their game on FEVM.

<figure><img src="/files/4rZYYGrPA22SirECAN0V" alt=""><figcaption><p>Integrate Metamask wallet inside any game using LYNC SDK</p></figcaption></figure>

## Get Your API Key&#x20;

Please get your API key before downloading the SDK from [**here**](https://www.lync.world/form.html)

## Installation

Download the LYNC - Metamask Wallet SDK from [**here**](https://github.com/LYNC-WORLD/Metamask-Unity-Wallet-SDK)<br>

Import the SDK .unitypackage file to your project. or simply drag and drop .unitypackage file to your project.

<figure><img src="/files/ZOxvCM5mHIK23sqZKmoO" alt=""><figcaption><p>Assets -> Import Package -> Custom Package</p></figcaption></figure>

Once the Metamask Wallet SDK package has finished importing into your Unity project, you can begin integrating it into your game. To do this, open the **ConnectWallet** scene provided by the LYNC - Metamask SDK.\
\
&#x20;                                            **Path : Assets ->LYNC-Metamask-SDK -> Scenes**<br>

<figure><img src="/files/2Q17jvrURq99NRDDSOsz" alt=""><figcaption><p><strong>Assets ->LYNC-Metamask-SDK -> Scenes</strong></p></figcaption></figure>

## Choose blockchain network&#x20;

{% hint style="info" %}
If you haven't generated API Key, please check [#get-your-api-key](#get-your-api-key "mention")
{% endhint %}

After opening **ConnectWallet** scene, Go to **Interface.** In the "Inspector" window, go to the API key & Enter the **API key**.&#x20;

<figure><img src="/files/BROEKhh7HJcC9l5PktvW" alt=""><figcaption></figcaption></figure>

To choose the blockchain network, simply go to the **CurrentChain** drop-down menu and pick the FEVM Network.

<figure><img src="/files/N5QvnTj6DM8v1ALoaBtN" alt=""><figcaption><p>Interface -> CurrentChain -> Choose Your Chain</p></figcaption></figure>

## Integrating ConnetWallet scene into the build&#x20;

To deploy your Unity project, it's necessary to set up the Player Settings in Unity. Follow these steps to select the LYNC WebGL template.

<figure><img src="/files/DXxDHLZH7ryfrLKOPoO5" alt=""><figcaption><p>File -> Build Settings</p></figcaption></figure>

In the "**Build Settings**" window, place **ConnectWallet** and **FetchWallet** at the top of this section.&#x20;

<figure><img src="/files/hnXXn2Jnkyq2rhdAU7qO" alt=""><figcaption><p>Add ConnectWallet &#x26; FetchWallet Scene to the top of Scenes in Build</p></figcaption></figure>

Go to "**Player Settings**" and navigate to "**Resolution and Presentation**". **Select LYNC - Template** in WebGL Template

<figure><img src="/files/YegsxNgCDuWxy9WEFS7B" alt=""><figcaption><p>Player Settings -> Resolution and Presentation -> Select LYNC - Template</p></figcaption></figure>

After completing all the necessary steps and configuring the Player Settings with the LYNC WebGL template, you can now build and run your game.

* To do this, go to "**File**" on the top menu bar in the Unity editor and select "**Build and Run**."&#x20;

<figure><img src="/files/qSb6qB2mV2jQuJszRQ5a" alt=""><figcaption><p>Build and Run </p></figcaption></figure>

Congratulation, you have successfully integrated the Metamask wallet with your favourite blockchain network using LYNC SDK. \
\
NOTE: If you wish to use wallet address inside game after user's wallet is connected, use:

`PlayerPrefs.GetString("WalletAddress");`<br>


# NFT Deployer -> FEVM

Launch NFT Collection on FEVM Network in 4 clicks.

Link to NFT Deployer: <https://fevm.lync.world/>\
\
LYNC NFT Deployer is a smart contract deployment platform that allows users to create and deploy their 1/1 NFT, Multiple editions, in-game assets as an NFT, and Entire NFT Collection with gasless transactions in just a few clicks.\
\
**ERC-721A and ERC-1155 Support:**

The platform supports the two most popular NFT standards - ERC-721A and ERC-1155. ERC-721A is ideal for one-of-a-kind digital assets, while ERC-1155 is used for multi-edition or fungible tokens.\
\
**How to deploy NFT Collection on LYNC NFT Deployer.**

1. Connect your wallet to the NFT Deployer.
2. Select the type of NFT Collection you want to launch, there are four options:
   1. 1/1 NFT
   2. Multiple Edition
   3. Collection
   4. Web3 Game

LYNC supports FEVM Hyperspace Testnet.&#x20;

**Launch your** **entire Collection**

<figure><img src="/files/iSyORisgmv69jjsgYRc6" alt=""><figcaption><p>Launch NFT Collection</p></figcaption></figure>

1. Choose the type of collection as "Collection"
2. Provide an image, name, and description that will be displayed on the claimer page, where your community can mint the NFTs.
3. Enter a Contract name, Contract symbol.
4. Choose the type of contract based on your needs: ERC-721A for unique NFTs, ERC-1155 for multiple copies, or opt for a gasless contract if you want to cover the gas fees for your users.
5. Input the token URI of your metadata, which should look like this:

   `ipfs://CID/`
6. Specify the maximum number of mints allowed per wallet address, the total supply for the collection, and the cost of minting.
7. Once all the required information is provided, click on "Deploy" to launch your NFT collection.
8. Once the contract is deployed, you can share the claimer page with your community to allow the minting of NFTs. Claimer page is available under "Your Contracts"

<figure><img src="/files/tHCZMb3NP5O7m0u2Yjzf" alt=""><figcaption><p>Claimer Page</p></figcaption></figure>

**Launch your single-edition or multiple-edition collection**

1. Choose the type of collection as "1/1 NFT" or "Multiple Edition"&#x20;
2. Enter a Contract name, Contract symbol.
3. After providing the necessary details, click on "Deploy" to launch your NFT collection.

Following the contract deployment:

1. Head to the "Tokens" section and click on "Create."
2. When creating an NFT, you will be prompted to provide an image, name, description, and other information about the NFT. You can also add properties to the NFT.
3. Once you have minted your NFTs, you need to link them to your project and integrate them into your game using LYNC SDK.


# Marketplace

LYNC Marketplace NPM SDK allows anyone to create their own decentralized marketplace, including Buy/Sell and Rent/Lend for ERC-721 and ERC-1155 contracts in a few lines of code.

### Steps to setup Marketplace NPM inside any project:

Before intergating the marketplace, we will need to integrate [LYNC Wallet SDK](https://www.npmjs.com/package/lync-wallet-sdk)

Install Wallet NPM Package: `npm i lync-wallet-sdk` and set up wallet integration as [mentioned here](https://www.npmjs.com/package/lync-wallet-sdk)

Once done, We are ready to install LYNC Marketplace NPM Package.

Install NPM Package: `npm install @lync/marketplace`

#### Step 1: Create a .env file to store your private keys

Example .env file:&#x20;

```
REACT_APP_ALCHEMY_KEY=""
```

### Custom Hooks

* [useAllCollectionNFT](/lync/npm-packages/marketplace/hook-useallcollectionnft)
* [useAllBuyNFT](/lync/npm-packages/marketplace/hook-useallbuynft)
* [useAllOwnerNFT](/lync/npm-packages/marketplace/hook-useallownernft)
* [useNFTDetails](/lync/npm-packages/marketplace/hook-usenftdetails)
* [useAllNFTForRent](/lync/npm-packages/marketplace/hook-useallnftforrent)

### List of chains

* ChainConfig.MATIC\_MUMBAI&#x20;
* ChainConfig.ETH\_GOERLI&#x20;
* ChainConfig.ARB\_GOERLI


# Hook: useAllCollectionNFT

Fetch an entire NFT Collection with its metadata and all NFT's metadata in that collection.

Fetch all NFTs and contracts metadata for a given ERC-721 and ERC-1155 contract and takes in a `contractAddress` and `chainId`.

**Interface**

```javascript
function useAllCollectionNFT( 
contractAddress?:string, 
chainId?: string )
```

**Response**

```javascript
type useAllCollectionNFTType = {
  allNfts: [{Object}];
  isLoading?: bool;
  contractMetadata?: any;
};
```

Example Code:

```javascript
import {ChainConfig, useAllCollectionNFT} from "@lyncworld/nft-marketplace";

function App() {
    const { allNfts, isLoading, contractMetadata } = 
    useAllCollectionNFT(
        "0x9342b1039949d536b2eb456de198c26362daa523", 
        ChainConfig.MATIC_MUMBAI
    );
}
```

Not ready to create your own UI yet, don't worry we have got you covered!!\
Example Code:

```javascript
import {LyncCollection, ChainConfig} from "@lyncworld/nft-marketplace";
<LyncCollection
    bannerImageUrl={
    "https://helpx.adobe.com/content/dam/help/en/photoshop/using/convert-color-image-black-white/jcr_content/main-pars/before_and_after/image-before/Landscape-Color.jpg"
    }
    collectionDescription={"Welcome"}
    contractAddress={"0xa879c01913f56419605fde494b5c140a6d146a1b"}
    chainId={ChainConfig.MATIC_MUMBAI}
/>
```


# Hook: useAllBuyNFT

Fetch all NFT of Collection which are available for Buying with metadata.

Fetch all NFTs and their metadata for ERC-721 and ERC-1155, NFTs available to buy and takes in a `contractAddress` and `chainId`.

**Interface**

```javascript
function useAllBuyNFT(
contractAddress?:string,
chainId?:string)
```

**Response**

```javascript
type useAllBuyNFTType = {
allBuyNFT: [{Object}];
isLoading?: bool;
};
```

Example Code:

```javascript
import {ChainConfig, useAllBuyNFT} from "@lyncworld/nft-marketplace";

function App() {
const { isLoading, allBuyNFT } = useAllBuyNFT(
"0x9342b1039949d536b2eb456de198c26362daa523",
ChainConfig.MATIC_MUMBAI
);


```

Not ready to create your own UI yet, don't worry we have got you covered!!\
Example Code:

```javascript
import {ChainConfig, LyncListedNFTToBuy} from "@lyncworld/nft-marketplace";

<LyncListedNFTToBuy 
    contractAddress={"0xa879c01913f56419605fde494b5c140a6d146a1b"}
    chainId={ChainConfig.MATIC_MUMBAI}
/>
```


# Hook: useAllOwnerNFT

Fetch all NFT of a particular wallet address

Fetch all NFTs and their metadata for a given ERC-721 and ERC-1155 contract and takes in  `walletAddress`,`contractAddress` and `chainId`.

**Interface**

```javascript
function useAllOwnerNFT(
walletAddress?:string,
contractAddress?:string,
chainId?:string)
```

**Response**

```javascript
type useAllOwnerNFTType = {
allOwnerNFT: [{Object}];
isLoading?: bool;
};
```

Example Code:

```javascript
import {ChainConfig, useAllOwnerNFT} from "@lyncworld/nft-marketplace";
import { AuthContext } from "lync-wallet-sdk";

function App() {
const {  walletAddress } = useContext(AuthContext);

const { isLoading, allOwnerNFT } = useAllOwnerNFT(
walletAddress,
"0x9342b1039949d536b2eb456de198c26362daa523",
ChainConfig.MATIC_MUMBAI
);

```

Not ready to create your own UI yet, don't worry we have got you covered!!\
Example Code:

```javascript
import {AuthContext } from "lync-wallet-sdk";
import {ChainConfig, LyncOwnersNFT} from "@lyncworld/nft-marketplace";

const { provider, walletAddress } = useContext(AuthContext);

<LyncOwnersNFT
contractAddress={"0xd82990166ac626ed191ffeda2a73ba364c340748"}
chainId={ChainConfig.ETH_GOERLI}
ownerAddress={walletAddress}
/>
```


# Hook: useNFTDetails

Fetch all details of an NFT

Fetch all details of an NFT, for a given ERC-721 and ERC-1155 contract and takes in `walletAddress`,`contractAddress`,`tokenId` and `chainId`.

**Interface**

```javascript
function useNFTDetails(
walletAddress?:string, 
contractAddress?:string, 
tokenId?:String, 
chainId?:string)
```

**Response**

```javascript
type useNFTDetails = {
owners?: [array of owner ];
isLoading?: bool;
listingData?:[{listing data if item is listed  ex. price, id, nftAddress, seller etc}],
nftMetaData?:,{nft meta data ex. title, description ,media etc},
lendingData?:,{lendingData if item is on lend ex. lenderAddress, pricePerDay, maxRentDuration etc}
};
```

Example Code:

```javascript
import {ChainConfig, useAllOwnerNFT} from "@lyncworld/nft-marketplace";
import { AuthContext } from "lync-wallet-sdk";

function App() {
const {  walletAddress } = useContext(AuthContext);

const { isLoading, allOwnerNFT } = useAllOwnerNFT(
walletAddress,
"0x9342b1039949d536b2eb456de198c26362daa523",
ChainConfig.MATIC_MUMBAI
);

```

Not ready to create your own UI yet, don't worry we have got you covered!!\
Example Code:

```javascript
import {AuthContext} from "lync-wallet-sdk";
import {ChainConfig, LyncNFTDetails} from "@lyncworld/nft-marketplace";

const {provider, walletAddress} = useContext(AuthContext);

<LyncNFTDetails 
contractAddress={"0x9342b1039949d536b2eb456de198c26362daa523"}
chainId={ChainConfig.MATIC_MUMBAI}
tokenId={"1"}
provider={provider}
walletAddress={walletAddress}
/>
```


# Hook: useAllNFTForRent

Fetch all NFT which are available to rent

Fetch all details of an NFT, for a given ERC-721 and ERC-1155 contract and takes in `contractAddress` and `chainId`.

**Interface**

```javascript
function useAllNFTForRent(contractAddress?:string, chainId?:string)
```

**Response**

```javascript
type useAllNFTForRent = {
allNftForRent?: [{}];
isLoading?: bool;
};
```

Example Code:

```javascript
import {ChainConfig, useNFTDetails} from "lync-marketplace";
import { AuthContext } from "lync-wallet-sdk";

function App() {

const {  walletAddress } = useContext(AuthContext);

const {isLoading, allNftForRent } = useNFTDetails(
"0x9342b1039949d536b2eb456de198c26362daa523",
"1",
);

```

Not ready to create your own UI yet, don't worry we have got you covered!!\
Example Code:

```javascript
import {ChainConfig,LyncNFTForRent} from "@lyncworld/nft-marketplace";

<LyncNFTForRent 
contractAddress={"0x9342b1039949d536b2eb456de198c26362daa523"}
chainId={ChainConfig.MATIC_MUMBAI}
/>
```


