Account Abstraction Unity SDK
LYNC X Biconomy Account Abstraction SDK
Account abstractions (AA) revolutionize blockchain gaming by offering a seamless gaming experience akin to Web2 environments. AA simplifies onboarding, eliminates transaction complexities, and introduces features like in-game popups, gasless transactions, and session login.
Import the SDK .unitypackage file to your project. or simply drag and drop .unitypackage file to your project.

Assets -> Import Package -> Custom Package
Once the Account Abstraction SDK package has finished importing into your Unity project, you can begin integrating it into your game. To do this, open the Biconomy-Login scene provided by the LYNC - Metamask SDK.
Path : Assets -> Scenes

After opening Biconomy-Login scene, Go to LYNCXBiconomyInterface. In the "Inspector" window. You'll need to enter API Key, and domain address and choose chain.
Once done, the dashboard looks like this:

Biconomy Dashboard
Register new paymaster -> Once done copy the API Key
Note: Fill the gas tank with some tokens.

New Paymaster
Pass the API Key in the Interface Game Object:

Domain address: Not required in the local builds, if launching on LYNC Portal: Game Launcher, make sure to pass the API key with the domain as: https://portal.lync.world/
To choose the blockchain network, simply go to the Current Chain drop-down menu and pick the network of your preference.

Choose chain
Once the user is logged in their wallet address can be fetched on any scene via
PlayerPrefs.GetString("EOAAccount");
To enable gasless transactions, register the smart contract.

Once done, you can pass in the contract address, ABI, and function name in the "GaslessTrx" scene.

Last modified 2mo ago