LogoLogo
HomeDiscordVideo TutorialsBuilder Opportunities
  • Welcome to MONA
    • What is a Space?
    • Unity Overview
  • ⬛Create
    • Getting Started Building
    • MONA Crash Course
      • Setting up MONA in Unity
      • Introduction to Unity
      • Setting up Simple Assets
      • Metaverse / WebGL Limitations
      • Creating 3D Assets
      • Applying Materials & Unwrapping UVs
      • Importing Assets into Unity
      • Adding Colliders
      • Adding Lighting
      • Adding a Custom Skybox
      • Setting up Canvases
      • Uploading to your Wallet
    • Building Spaces
      • Space Limitations
      • Create your Space
        • Space Overview
        • Colliders
        • Materials
        • Portals
        • Canvases
        • Artifacts
        • Add a Custom Skybox
        • Test Your Space
        • Troubleshooting
      • Improve your Space
        • Lightmaps (Unity Lightmapper)
        • Light Probes
        • Reflection Probes
        • Animation in Unity
        • Importing Animation
        • Player Property Volumes (PPV's)
        • Warp Volumes
        • Adding Audio
        • VRM Switcher
        • Custom Canvases
        • Embedded Video
        • User Interface (UI)
        • Creating Custom Shaders
        • Imported Assets
        • Lightmaps (Bakery Asset)
      • Optimise your Space
        • Prefabs
        • 3D Asset Specs
        • Optimizing your Space
      • Adding Interactivity
        • Visual Scripting
          • Web Request Node
        • Mona Reactor
          • Creating Animation
          • Using Animator
          • The Reactor Component
          • Reactor Overview
      • MONA Tools
        • Template Utility
        • MONA Capture
        • Light Probe Generator
        • VOX Importer
      • Submit Your Space
        • Submitting your Space
        • Creating an Image & Video Preview
        • QA Process
        • Mint Your Space
      • Update your Space
      • Frequently Asked Questions
      • Troubleshooting
    • Creating Assets
      • Asset Requirements
      • 3D Asset Types
      • Asset Creation Approaches
      • Optimizing your Mesh
      • GLB Considerations
      • Example - Cyberpunk Car
    • Creating Avatars
      • Getting Started with VRM
      • VRM Requirements
      • VRM Creation
        • Using Mixamo for Rigging
        • Adding Custom Bones to the Rig (Optional)
      • Creating your Avatar using UniVRM
        • Importing UniVRM into Unity
        • Creating the VRM using UniVRM
        • Adding Spring Bones in UniVRM (Optional)
      • Creating your Avatar using 'VRM for Blender'
        • Adding 'VRM for Blender' into Blender
        • Using 'VRM for Blender' for Rigging
        • Adding a Material
        • Assigning VRM Details
        • Exporting the Avatar
      • Uploading your VRM
      • Using Avatars in WebAR
      • Submitting your VRM to the Mona Marketplace
      • Mint Your Avatar
      • Troubleshooting
    • Resources
      • MONA Claim Asset Requirements
      • Unity Wallet SDK (Alpha)
      • MONA Playground
      • MONA Tutorials
        • Retrowave Modules
      • Asset Resources
        • 3rd Party Assets
        • Textures
        • Shaders
        • 3D Assets
        • Audio
        • Tools
        • Tutorials
      • MONA Library
        • MONA Library Submission
      • Useful Unity Packages
      • Updating the Template SDK
      • Importing Mozilla Hubs Spaces to MONA
      • Importing AltspaceVR spaces to MONA
    • MONA Marketplace
  • ⬛Explore
    • How to Use MONA
    • Using VRM Avatars
    • Audio Settings
    • Explorer's Frequently Asked Questions
  • ⬛Collect
    • Setting up a wallet
      • Delegating a Wallet
    • Own a Space
      • Host an Event
      • Uploading your Images
      • Add Images to a Canvas
      • Live Music Feed
      • Token Gated Access
      • Minted 3rd Party Assets
    • MONA Create
      • Create FAQ
    • Live Streaming in MONA
      • Setting up OBS Studio
      • Livestream using OBS Studio
      • Livestream using a Mobile Device
      • How to Stream Using Twitch or YouTube
      • Add a Livestream to a Canvas
    • Collector's Frequently Asked Questions
  • General Resources
    • Web3 Introduction
    • How to sell Art in Web3
    • Game Dev Glossary
    • Buildathons / Challenges
      • 3D Asset Buildathon (Current)
        • Frequently Asked Questions
      • Emote/Emoji Challenge (Completed)
      • Stream Challenge (Completed)
      • Custom Avatars (Completed)
      • Build : NY Challenge (Completed)
      • Sculpture Challenge (Completed)
      • Portal Hub (Completed)
      • Interact (Completed)
      • The Renaissance (Completed)
Powered by GitBook
On this page
  • Overview
  • Purpose
  • Scope
  • Prerequisites
  • Supported Platforms
  • Getting Started
  • Download Package
  • Install package
  • Important Notes:
  • Monaverse Manager
  • Core Integration Layers
  • Web3 Wallet Integration Layer
  • Mona API Layer
  • User Interface Layer (WIP)

Was this helpful?

  1. Create
  2. Resources

Unity Wallet SDK (Alpha)

The Unity Wallet SDK is used to enhance interoperability across the open metaverse.

PreviousMONA Claim Asset RequirementsNextMONA Playground

Last updated 12 months ago

Was this helpful?

For real-time updates on the SDK, please check out our .

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

Download Package

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:

  • 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:

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.

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 a Signature to generate an AccessToken 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:

// Step 1: Verify Wallet Address
// Obtain the wallet address via your existing Web3 wallet integration
string walletAddress = "user_wallet_address";

// Validate the connected wallet with Mona
var validateWalletResult = await MonaApi.ApiClient.Auth.ValidateWallet(walletAddress);

// Check if the wallet validation request succeeded
if(!validateWalletResult.IsSuccess)
{
    Debug.LogError($"There was a problem validating your wallet: {validateWalletResult.Message}");
    return;
}

//If the wallet is not registered, ask the user to sign up at <https://monaverse.com>
if (validateWalletResult.Data.Result == ValidateWalletResult.WalletIsNotRegistered)
{
    Debug.LogError("Wallet is not registered. Please sign up at <https://monaverse.com>");
    return;
}

// Step 2: Sign the Message and Authorize
// Sign the SiweMessage using your Web3 wallet integration
// This is the equivalent to a Wallet Personal Sign
var signature = await walletSigner.Sign(validateWalletResult.Data.SiweMessage);

// Authorize with Monaverse using the signed message and the SiweMessage
var authorizationResult = await MonaApi.ApiClient.Auth.Authorize(signature, validateWalletResult.Data.SiweMessage);

if (!authorizationResult.IsSuccess)
{
    Debug.LogError($"Authorization failed.{authorizationResult.Message}");
    return;
}

//Ready to call authorized APIs

Example of Collectible data returned:

{
  "id": "bgsDpasdriLhk",
  "type": "Avatar",
  "checked": false,
  "minted": false,
  "nsfw": false,
  "promoted": false,
  "__v": 11,
  "activeVersion": 0,
  "artist": "John Doe",
  "description": "Test",
  "creator": "0xe42c4fe879955cEa16380e9dAf9E7b6B48126E93",
  "slug": "grifter-squid-goerli",
  "views": 0,
  "accessibility": {
    "accessLevel": "Public",
    "accessibleAt": null,
    "accessibleUntil": null
  },
  "_updated_at": "2024-05-03T18:36:56.258Z",
  "_created_at": "2024-05-03T18:32:35.784Z",
  "_deleted_at": null,
  "collectionId": null,
  "hidden": false,
  "image": "bafasdak2ulwymssqfsaeadls65nt7xxftzh3c3npe7snkmhmfqxqoyu",
  "lastSaleEventId": null,
  "lastSalePrice": null,
  "owner": "0xe42c4fe879955cEa16380e9dAf9E7b6B48126E93",
  "owners": [
    {
      "address": "0xe42c4fe879955cEa16380e9dAf9E7b6B48126E93",
      "amount": 1
    }
  ],
  "parentId": null,
  "price": null,
  "properties": [],
  "traits": {
    "Genre": "Cyber Punk",
    "Season": "Spring"
  },
  "subCollectionId": null,
  "title": "Grifter Squaddie Goerli",
  "nft": {
    "contract": null,
    "ipfsUrl": "bafybeig3tvmgazsdfgadfgsdfm7qrtq2undmaxpsy7xnc7m6flzlgffy",
    "network": null,
    "tokenHash": null,
    "tokenId": null,
    "tokenUri": null,
    "transactionId": null,
    "tokenStandard": null,
    "amount": null
  },
  "creatorId": null,
  "documentId": null,
  "versions": [
    {
      "asset": "<https://cdn-staging.mona.gallery/sdfe5433-suet-d9ik-rrgl-fsdfrww.vrm>"
    }
  ]
}

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

The Mona Wallet Unity SDK is distributed as a .

You can download the latest official .unitypackage from the page.

Alternatively, you can download the latest generated package from 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.

If you have an existing Web3 integration in your project such as Thirdweb, WalletConnect, etc. Please try using our package instead.

Mona Application Id: You can get one from

WalletConnectProjectId: Your project ID for WalletConnect. Get one at

For a full list of all the compatible wallets available check out the following website.

⬛
GitHub Repo here
Unity Package
Releases
Build Packages
API-only
Monaverse
Wallet Connect
WalletConnect
https://github.com/monaverse/mona-wallet-unity/tree/main/Assets/Monaverse/Core/Plugins/Mona/com.monaverse.api
Connect Wallet
Wallet Options