A Unity wrapper for NMKR Studio API
The NMKR Studio Unity SDK is a software development kit designed to facilitate the integration of NMKR services into Unity-based applications. This SDK primarily focuses on Managed Wallet functionality and Minting of NFTs. This document provides a comprehensive guide for developers looking to integrate this SDK into their Unity projects.
Ensure that you have the following prerequisites in place:
- Unity Project (tested on version 2022.3)
- An NMKR Studio account
- Preprod for testing (https://studio.preprod.nmkr.io/)
- Mainnet for production (https://studio.nmkr.io/)
- Basic knowledge of Unity development
To integrate the NMKR Studio Unity SDK into your Unity project, follow these steps:
-
Copy package URL from GitHub
- Go to https://github.com/FutureFest/NMKR-Studio-Unity-SDK > Code > Local > HTTPS > Copy git URL
- or copy this: https://github.com/FutureFest/NMKR-Studio-Unity-SDK.git
-
Import package into Unity project
- Go to your Unity project’s Package Manager
- Click ‘+’ button at top left corner of Package Manger window
- Click “Add package from git URL…”
- Paste the git URL and click “Add”
- Package should be under Packages folder in Project view
-
Package should be installed and ready to use!
Here's an example of how you would initialize the SDK for Preprod:
using UnityEngine;
using Nmkr.Sdk;
using Nmkr.Sdk.Schemas;
using static Nmkr.Sdk.Api;
public class ExampleUsage : MonoBehaviour
{
[SerializeField] private string customerId = "000000"; //user id of NMKR Studio account
[SerializeField] private string apiKey = "abc...123"; // api keys are created from NMKR Studio website
[Space]
[SerializeField] private string projectUid = "123...abc";
private void Awake()
{
ApiSettings settings = new ApiSettings()
{
apiServer = ApiServer.Preprod,
apiKey = apiKey
};
// After initialization, the NMKR Studio API can now be used
Initialize(settings);
}
}
Caution
You are responsible for the security of your NMKR API keys. Make sure all API calls requiring your API key are implemented on the server and hidden from clients. Revoke and recreate your api keys if exposed to clients immediately!
Below is a prototype of the designs for the demo we are creating.
- General Account Creation/Sign in
- Account name and password will match the created managed wallet name and password
- All sensitive information will be embedded in the demo (not to be used in production)
- Storefront (View of NFTs on sale)
- Inventory (View and send out purchased NFTS in your managed wallet)
- Send out NFT from managed wallet to an external Cardano wallet
- View/copy managed wallet address
Caution
This demo is not meant for production. The purpose for this demo is to get an idea of how the SDK works. You are responsible for the security of your NMKR API keys.
For further support and detailed documentation, please visit the following links:
- Swagger API Documentation: https://studio-api.preprod.nmkr.io/swagger/index.html
- Learn more about NMKR: https://www.nmkr.io/
The NMKR Studio Unity SDK is provided under the MIT License.