# 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 <a href="#get-your-api-key" id="get-your-api-key"></a>

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

### Installation <a href="#installation" id="installation"></a>

Download the LYNC Account Abstraction SDK from Here[^1]\
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.

<figure><img src="/files/XHnDx1XNgpeUPicPZ1pA" alt="" width="561"><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/ntv05TX7P0I7spPbF12K" alt="" width="320"><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-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).

<figure><img src="/files/sqmXfI7iwIJIl23NwJWy" alt="" width="563"><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).

<figure><img src="/files/yaiX2dLtagwjFz4kNTGS" 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))

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

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

To Login with Code:

```csharp
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);
  }
);
```

[^1]:


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://lync-1.gitbook.io/lync/products/lync-account-abstraction-webgl-sdk.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
