LYNC Account Abstraction WebGL SDK

LYNC AA SDK is a no-code Unity SDK allowing seamless integration of Account Abstraction. Supported Platforms: WebGL (Browser Games).

Get your API Key

Please get your API key before downloading the SDK from here​

Installation

Download the LYNC Account Abstraction SDK from Reference Project: https://github.com/LYNC-WORLD/LYNC-Unity-AA-WebGL/releases​

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

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

Integrating AA SDK in Unity

There are 2 Example Projects present in the SDK: Assets -> LYNC-AA-WEBGL -> Example / Example-2 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).

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).

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. Choose chain

Once done, You can attach the Login Example Script in your Scene by dragging and dropping a Button as a Game Object

To Login with Code:

using LYNC;
using LYNC.Wallet;

LyncManager.Instance.walletAuth.ConnectWallet(
  wallet =>
  {
      Debug.Log("EOA Address: "+walletData.PublicAddress);
      Debug.Log("Smart Account Address: "+walletData.SmartAccount);
  },
  error =>
  {
    Debug.LogError(error);
  }
);

Last updated