Skip to main content
BETA
View Zag.js on Github
Join the Discord server

Unity API Reference

Authentication Methods

All authentication methods on the Unity SDK

LoginWithEmail

Logs in a user with email and password..

LoginWithEmail(debugEmail, debugPassword, (response) => { long resCode = response.Code; LoginResponse details = response.Data; string error = response.Error; string message = response.Message; string status = response.Status; });

fetchUser

Fetches the current user's object.

MirrorWrapper.Instance.FetchUser(email, (response) => { long resCode = response.Code; UserResponse details = response.Data; string error = response.Error; string message = response.Message; string status = response.Status; });

GetWalletTokens

Get's the current user's tokens

MirrorSDK.GetWalletTokens((response) => { long resCode = response.Code; WalletTokenResponse details = response.Data; string error = response.Error; string message = response.Message; string status = response.Status; });

GetNFTDetails

Fetches an NFT's details by mint address

string mintAddress = "mint_address"; MirrorSDK.GetNFTDetails(mintAddress,(response) => { long resCode = response.Code; SingleNFTResponseObj details = response.Data; string error = response.Error; string message = response.Message; string status = response.Status; });

GetNFTsOwnedByAddress

Fetches the NFTs owned by a specific address.

List<string> owners = new List<string>(); owners.Add("owner_address_1"); owners.Add("owner_address_2"); MirrorSDK.GetNFTsOwnedByAddress(owners,(response) => { long resCode = response.Code; MultipleNFTsResponse details = response.Data; string error = response.Error; string message = response.Message; string status = response.Status; });

Wallet Methods

TransferSPLToken

Transfer SPL token to a recipient

ulong amount = 1; string publicKey = "public_key"; MirrorSDK.TransferSPLToken(amount,publicKey,(response) => { long resCode = response.Code; TransferTokenResponse result = response.Data; string error = response.Error; string message = response.Message; string status = response.Status; });

TransferSol

Transfer SOL to wallet address

ulong amount = 1; string publicKey = "public_key"; MirrorSDK.TransferSol(amount,publicKey,(response) => { long resCode = response.Code; TransferSolResponse result = response.Data; string error = response.Error; string message = response.Message; string status = response.Status; });

Marketplace Methods

CreateVerifiedCollection

Create a new Verified Collection

string collectionName = "TopCollection"; string collectionSymbol = "Top"; string collectionUrl = "https://example.com/path/detail.json"; MirrorSDK.CreateVerifiedCollection(collectionName,collectionSymbol,collectionUrl(response) => { long resCode = response.Code; MintResponse result = response.Data; string error = response.Error; string message = response.Message; string status = response.Status; });

CreateVerifiedSubCollection

Create a new Verified Sub Collection. A subcollection is a collection that belongs to a main collection

string parentCollection = "collection_address"; string collectionName = "SubCollection"; string collectionSymbol = "Sub"; string collectionUrl = "https://example.com/path/detail.json"; MirrorSDK.CreateVerifiedCollection(parentCollection,collectionName,collectionSymbol,collectionUrl,(response) => { long resCode = response.Code; MintResponse result = response.Data; string error = response.Error; string message = response.Message; string status = response.Status; });

MintNFT

Mint NFT into collection

string parentCollection = "collection_address"; string collectionName = "NewNFT"; string collectionSymbol = "NFT"; string collectionUrl = "https://example.com/path/detail.json"; MirrorSDK.MintNFT(parentCollection,collectionName,collectionSymbol,collectionUrl,(response) => { long resCode = response.Code; MintResponse result = response.Data; string error = response.Error; string message = response.Message; string status = response.Status; });

ListNFT

List NFT on Mirror World Marketplace

string mintAddress = "mint_address"; decimal price = 1; MirrorSDK.ListNFT(mintAddress,price,(response) => { long resCode = response.Code; ListingResponse result = response.Data; string error = response.Error; string message = response.Message; string status = response.Status; });

BuyNFT

Purchase NFT on Mirror World Marketplace

string mintAddress = "mint_address"; decimal price = 1; MirrorSDK.BuyNFT(mintAddress,price,(response) => { long resCode = response.Code; ListingResponse result = response.Data; string error = response.Error; string message = response.Message; string status = response.Status; });

UpdateNFTListing

Update NFT Listing on Mirror World Marketplace

string mintAddress = "mint_address"; decimal price = 1; MirrorSDK.UpdateNFTListing(mintAddress,price,(response) => { long resCode = response.Code; ListingResponse result = response.Data; string error = response.Error; string message = response.Message; string status = response.Status; });

CancelNFTListing

Cancel listing NFT on Mirror World Marketplace

string mintAddress = "mint_address"; decimal price = 1; MirrorSDK.CancelNFTListing(mintAddress,price,(response) => { long resCode = response.Code; ListingResponse result = response.Data; string error = response.Error; string message = response.Message; string status = response.Status; });

TransferNFT

Transfer NFT from holder's wallet to another address

string mintAddress = "mint_address"; string toWallet = "wallet_address"; MirrorSDK.TransferNFT(mintAddress,toWallet,(response) => { long resCode = response.Code; ListingResponse result = response.Data; string error = response.Error; string message = response.Message; string status = response.Status; });

FetchNFTsByMintAddresses

Fetch NFTs By Mint Addresses. Returns a detailed payload of all NFTs whose mintAddresses are provided

List<string> addresses = new List<string>(); addresses.Add("mint_address_1"); addresses.Add("mint_address_2"); MirrorSDK.FetchNFTsByMintAddresses(addresses,(response) => { long resCode = response.Code; MultipleNFTsResponse result = response.Data; string error = response.Error; string message = response.Message; string status = response.Status; });

FetchNFTsByCreatorAddresses

Fetch NFTs By Creator Addresses. Returns a detailed payload of all NFTs whose creatorAddresses are provided

List<string> creators = new List<string>(); creators.Add("address_1"); creators.Add("address_2"); MirrorSDK.FetchNFTsByCreatorAddresses(creators,(response) => { long resCode = response.Code; MultipleNFTsResponse result = response.Data; string error = response.Error; string message = response.Message; string status = response.Status; });

FetchNFTsByUpdateAuthorities

Fetch NFTs By Update Authorities. Returns a detailed payload of all NFTs whose updateAuthorities are provided

List<string> addresses = new List<string>(); addresses.Add("address_1"); addresses.Add("address_2"); MirrorSDK.FetchNFTsByUpdateAuthorities(addresses,creators,(response) => { long resCode = response.Code; MultipleNFTsResponse result = response.Data; string error = response.Error; string message = response.Message; string status = response.Status; });

FetchNFTsByOwnerAddresses

Fetch NFTs By Update Authorities. Returns a detailed payload of all NFTs whose owners are provided

List<string> addresses = new List<string>(); addresses.Add("address_1"); addresses.Add("address_2"); MirrorSDK.FetchNFTsByOwnerAddresses(addresses,creators,(response) => { long resCode = response.Code; MultipleNFTsResponse result = response.Data; string error = response.Error; string message = response.Message; string status = response.Status; });

Edit this page on GitHub

On this page