LYNC
DashboardSupport
  • 👋Introducing LYNC
  • Products
    • LYNC Account Abstraction SDK
    • LYNC Account Abstraction WebGL SDK
    • Metamask Wallet
    • LYNC Metamask PC SDK
    • OKX Wallet
    • LYNC In-Game Marketplace SDK
    • NFT Fetcher
    • No-Code Smart Contract Deployer
    • EVM Lootbox SDK
      • Getting Started
      • Using the SDK
        • Creating a new lootbox
        • Opening a lootbox
        • Claiming rewards
        • Whitelisting users using lootbox
        • Lootbox admin functions
        • Useful information functions from LyncLootBox class
        • Multicall : opening and claiming multiple lootboxes in a single transaction
      • Example Codes in React & TypeScript
        • Example code for creating a new lootbox
        • Example code for opening a lootbox
        • Example code for claiming a lootbox
    • Launch your products on Telegram
      • Configure Your Telegram Bot
      • Deploying Your Product on TG
  • APTOS
    • LYNC Paymaster - Supporting Aptos
      • How to Register on LYNC Dashboard
      • How to Create Paymaster
      • How to Fund the Paymaster
      • Module & Function Whitelist
      • How to Integrate Paymaster
        • Unity
        • API
        • JavaScript/ TypeScript
    • LYNC Unity Aptos SDK
    • Keyless Accounts
      • Configure Your OIDC Provider
      • Integrate Keyless in Unity
    • Wallet Creation and Transaction APIs
      • Pre-requisites
      • Integration
        • API Overview
        • Create a new wallet
        • Get already created wallet
        • Mint NFT transactions
        • Send generic transactions on Aptos
    • LYNC Social Login SDK on Aptos
      • Getting Started
      • Using the SDK
      • Example Codes in React & TypeScript
      • Types Used in the Methods Provided by the SDK
      • Other Specification
    • LYNC Aptos Lootbox
      • Getting Started
      • Creating a Lootbox
      • Opening a Lootbox
      • Claiming the Rewards
      • Conclusion
  • Movement Labs
    • 📇Indexer
      • How to run index custom data?
      • Example Queries
        • Get Token Info
        • Get Token Balances
        • Get NFTs Owned by an Account
    • NFT Deployer
    • LYNC Social Login SDK on Movement
      • Getting Started
      • Using the SDK
      • Example Codes in React & TypeScript
      • Types and Enums Used in the Methods Provided by the SDK
      • Other Specification
    • LYNC Unity Movement SDK
    • Wallet Creation and Transaction APIs
      • Pre-requisites
      • Integration
        • API Overview
        • Create a new wallet
        • Get already created wallet
        • Mint NFT transactions
    • LYNC Paymaster - Supporting Movement
      • How to Register on LYNC Dashboard
      • How to Create Paymaster
      • How to Fund the Paymaster
      • Module & Function Whitelist
      • How to Integrate Paymaster
        • JavaScript/ TypeScript
  • Supra
    • LYNC Paymaster - Supporting Supra L1
      • How to Register on LYNC Dashboard
      • How to Create Paymaster
      • How to Fund the Paymaster
      • Module & Function Whitelist
      • How to Integrate Paymaster
        • JavaScript/ TypeScript
    • LYNC Unity SUPRA SDK
    • Wallet Creation and Transaction APIs
      • Pre-requisites
      • Integration
        • API Overview
        • Create a new wallet
        • Get already created wallet
        • Mint NFT transactions
  • Fuel
    • LYNC Unity Fuel SDK
    • LYNC NFT Deployer
      • Introduction
      • Getting Started
      • Deploying Your NFTs
        • Launch Your Entire Collection
      • Troubleshooting and FAQs
    • LYNC Fuel Lootbox
      • Getting Started
      • Creating a Lootbox
      • Opening a Lootbox
      • Claiming the Rewards
      • Conclusion
    • Wallet Creation and Transaction APIs
      • Pre-requisites
      • Integration
        • API Overview
        • Create a new wallet
        • Get already created wallet
    • Fuel Marketplace NPM SDK
      • Getting Started
      • Using the SDK
        • Using hooks to get the marketplace data
        • Using services provided by the SDK to list, buy, and manage tokens
        • Some useful functions provided by the SDK
        • Error codes for the SDK
        • Interfaces and Enums provided by the SDK
      • Support
  • Metis
    • Wallet Creation and Transaction APIs
      • Pre-requisites
      • Integration
        • API Overview
        • Create a new wallet
        • Get already created wallet
        • Mint NFT transactions
  • NPM Packages
    • Marketplace
      • Hook: useAllCollectionNFT
      • Hook: useAllBuyNFT
      • Hook: useAllOwnerNFT
      • Hook: useNFTDetails
      • Hook: useAllNFTForRent
Powered by GitBook
On this page
  • Get Your API Key
  • Installation
  • Choose blockchain network
  • Integrating the Transaction Layer
  1. Products

LYNC Metamask PC SDK

PreviousMetamask WalletNextOKX Wallet

Last updated 6 months ago

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.

Get Your API Key

Installation

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

Once the Metamask PC SDK package has finished importing into your Unity project, you can begin integrating it into your game. To do this, open the Metamask scene provided by the LYNC - Metamask SDK. Path : Assets ->LYNC -> Metamask

Choose blockchain network

If you haven't generated an API Key, please check Get Your API Key

the After opening Metamask scene, Go to LYNC Manager. In the "Inspector" window, go to the API key & Enter the API key.

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

Integrating the Transaction Layer

The Transactions are divided into 2 parts:

  1. No Code Transactions

  2. Modular Transactions

Check the LYNCIntigrationExample GameObject, you can just pass in a few parameters to write on any custom contract inside the game.

Just pass the following parameters:

  1. Contract Address - Type any contract address on the chain you selected in the LYNCInterface GameObject.

  2. ABI - You can get the contract ABI of a verified contract on the explorer.

  3. Function Name - Write the exact function name from the contract

  4. Arguments - The arguments required by the transaction, are left blank if none.

Modular Transactions

Check the TransactionExample GameObject, it has a TransactionExample.cs file attached. This example contains 3 types of transaction transactions, ERC-721, ERC-1155 and ERC-20.

In this example:

  1. cost - The cost required to do the transaction, if it's free you can pass 0 else pass the value in wei. (In this case, as the function is not payable the value is 0).

  2. args - Converts compatible to be a JSON

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 in ABI, then open in JSON Format and select result as ABI.

Please get your API key before downloading the SDK from

Download the LYNC - Metamask Wallet SDK from

Example Project-

No-code Transaction

contractAddress - is the contract address for a custom transaction.

ABI -

functionName - Write the exact function name from the contract

ParametersOfFunctions - You can pass in the arguments required for the transaction. (In this example, the argument is how much amount you want to send, You can pass n number of arguments separated with a comma( , ) ).

here
here
https://github.com/LYNC-WORLD/Metamask-Unity-PC-SDK
(In this case, it's a Sepolia contract address on Ethereum Testnet)
You can get the ABI from Contract(Code)
(In this case, sendToken)
1000 is the value in wei, i.e 0.000000000000001 eth.
Integrate Metamask wallet inside any game using LYNC SDK
Assets -> Import Package -> Custom Package
Assets ->LYNC -> Metamask
Enter the API key
LYNC Manager -> Network
LYNC Intigration Example
Copy ABI from explorer
Example Code
Open in JSON Format
Copy the Result