Unity Wallet SDK (Alpha)
The Unity Wallet SDK is used to enhance interoperability across the open metaverse.
For real-time updates on the SDK, please check out our GitHub Repo here.
Overview
The Unity Wallet SDK is a pioneering solution designed to enhance interoperability across the open metaverse.
This SDK enables seamless interoperability across the open metaverse, allowing users to import and interact with 3D digital objects from their wallets into various metaverse platforms and games developed with Unity.
Purpose
Enable your users to connect their Web3 wallets to the open metaverse, allowing them to import and interact with their 3D NFTs within your Unity-based games and applications using our SDK.
Scope
A set of APIs and Web3 wallet integrations that streamline importing 3D digital objects into Unity3D-based applications.
Prerequisites
Unity 2022.3.17f or above.
IL2CPP managed code stripping level: Minimal (or lower).
Supported Platforms
Android
iOS
macOS
Windows
WebGL
Getting Started
The Mona Wallet Unity SDK is distributed as a Unity Package.
Download Package
You can download the latest official .unitypackage
from the Releases page.
Alternatively, you can download the latest generated package from Build Packages workflow page. The file is available at the bottom of each workflow run as monaverse-sdk-package
. Please note that this version may not be stable.
Install package
Drag and drop the .unitypackage
file into your Unity project or double click it. Feel free to deselect common packages like Newtonsoft if you already have them.
If there are no compiler errors in the console, you are all set!
Important Notes:
If you have an existing Web3 integration in your project such as
Thirdweb
,WalletConnect
, etc. Please try using our API-only package instead.The SDK has been tested using Unity 2022 LTS. We highly recommend using 2022 LTS.
The Newtonsoft and Nethereums DLLs are included as part of the Unity Package, feel free to deselect them if you already have them installed as a dependency to avoid conflicts.
Monaverse Manager
All you need now is a MonaverseManager
prefab present in your scene.
Navigate to Assets > Monaverse > Core > Prefabs > MonaverseManager
and drag it into your scene.
Make sure you set the following fields:
Mona Application Id
: You can get one from MonaverseWalletConnectProjectId
: Your project ID for WalletConnect. Get one at Wallet Connect
Core Integration Layers
Web3 Wallet Integration Layer
The Unity Wallet SDK integrates the WalletConnect SDK
, offering developers and users the choice from a broad range of supported wallets.
Key functionalities
Select Wallet: Users can select from a wide range of compatible Wallet Apps to connect with.
Connect: Users can connect their Web3 wallets through WalletConnect-compatible wallets, providing their address for authentication.
Sign: Enables users to approve SIWE messages manually via their Wallet App for secure login to the
Mona
Platform.
This layer manages the connection to the user's Web3 wallet to access public wallet information and perform signature authorization for the Mona platform.
For a full list of all the compatible wallets available check out the following WalletConnect website.
Mona API Layer
The API layer acts as the primary interface for interacting with the Mona platform, providing secure endpoints and features such as:
VerifyWallet: Validates a given wallet address and generates a
SIWE
message for user authentication.Authorize: Accepts a
SIWE Message
and aSignature
to generate anAccessToken
for subsequent authenticated API calls. (The signing process happens in the Wallet layer where the User is prompted to approve the signature within their Wallet App)GetCollectibles: Retrieves the authenticated user's collection of 3D NFTs.
GetCollectibleById: Fetches a specific collectible by its unique identifier.
Example of how to Authorize
a client:
Example of Collectible
data returned:
The API layer is delivered as an independent sub-package that can be used by those developers/projects that already have an Web3 integration (i.e. WalletConnect
, MetamaskSDK
, ThirdwebSDK
, etc)
This API layer can be pulled separately as a sub package from:
User Interface Layer (WIP)
Developers will be equipped with a comprehensive set of screens and views to handle wallet and API tasks:
Network selection
Wallet Provider Selection
Connect and Authorization
Collectibles Grid and Detail View
Last updated