Mirror World Smart SDK - Authentication, Marketplaces/Storefronts for Web and Mobile Dapps
Published: 2022-11-18 10:15:10

---
title: Mirror World Smart SDK - Authentication, Marketplaces/Storefronts for Web and Mobile Dapps
published: True
description: 
tags: 
# cover_image: ![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/flnjdruabhxzowxrcesj.jpg)
# Use a ratio of 100:42 for best results.
# published_at: 2022-11-04 10:21 +0000
---
Today we will be using our newest Web 3 game demo as a showcase of our All-in-one Web 3 dApp SDK covers the whole process of building a dApp. We will explain how we brought our newest game on chain and fully functional within a day using our SDK, and how you can utilize the same tool to maximize productivity in your own dApps that are not limited to gaming alone. 

We will have the link to APIs of a specific function ready next to every function we mention, so that you are able to have hands-on experience of building a dApp using Mirror World SDK with minimal frictions.
### About Mirrors Jump
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0bogkv5jh7isp1vrfc6z.jpg)
Mirrors Jump is a mobile platform-jumping game demo we made to bring developers a closer view of what our Smart SDK can do. We strongly advise developers to download [our gaming demo here](https://www.producthunt.com/products/mirror-world-smart-sdk#mirror-world-smart-sdk) and check out our features while enjoying the game.
### SDK and On-Chain Integration
The overall principle of bringing a game on-chain with our SDK is simple. You build a game, you plug-in our SDK, and all the functions will be there for you to use.
#### Build a Game First
The first step to bringing a mobile game on chain is to build a traditional game with several outlets prepared to later connect to the SDK. The outlet part varies depending on where you want the Web 3 features to take place. Take Mirrors Jump for example. We want our character, the Mirror NFT who is jumping in the game to be the interoperable asset, even independent from the game per se. That is where we leave the outlet for future connections.
#### Start Auth Integration
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jwosh7ub85pcbfjy103b.png)
The on-chain integration of our game starts with Auth.
Being a Web 3 mobile game, we want our game to have a broader range of users. Logging in with a method people are familiar with could bring much more potential customers to your game or Dapp. So we integrated both Web 2 login methods such as Discord, Facebook, Twitter, Google and Web 3 method, crypto wallet into Mirrors Jump. We completed this whole process solely using our Smart SDK, calling the APIs below.

Here are some basic APIs we used:
[Token-Based Login](https://developer.mirrorworld.fun/#e46fd010-f07a-424d-8bb6-1438bd5c2e38)
[Transaction Approval Code](https://developer.mirrorworld.fun/#e3221f61-62fc-4a11-b4c7-30feb1af9c57)
[Change Email](https://developer.mirrorworld.fun/#1651ac93-bbc6-4b92-8d5b-1b7d92188748)
[Social Authentication](https://developer.mirrorworld.fun/#63610ea6-b720-4f50-bf0b-7858ae1293b5)
[Action Authorization](https://developer.mirrorworld.fun/#800dcde2-66c3-446b-b157-f7e79c9d255d)
[Oauth2](https://developer.mirrorworld.fun/#3a0f8d55-e65f-41cb-8274-8ef6d1b66aef)

You can find a more detailed version in our [HTTP API](https://developer.mirrorworld.fun/).
Since Mirror World Smart SDK is now open to developers for free. For different login APIs, you could just login into our [creator dashboard](https://app.mirrorworld.fun/auth/login), click the embedded link below and try them out right now. It is super easy to use and it shouldn't take more than a couple minutes to deploy.
#### Start In-App-Wallet Integration
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/mbt72nc0pqa69v2atkfo.png)
The second part of integration is to bring Web 3 wallet into full operation in our mobile game. This part is partially done together with the login integration, but we still need to bring in the transaction, token as well as the on-ramp part of the wallet. Once all that is integrated, your customers will be able to perform all kinds of transaction-related actions without having to leave the dApp at all, which really drastically improves the purchasing experience.

Regarding the security considerations, we are still in the process of developing a kind of safe wallet called MPC wallet (multi-party computational wallet), which will be ready in the test environment next week. 

For all of the wallet functions, feel free to [login to the dashboard](https://app.mirrorworld.fun/auth/login) and try it out now.
#### About Our Wallet and Its Safety
This part intends to dive deeper into our wallet's safety configuration. For more information about SDK integration, you could scroll down to the next part.

In this MPC wallet, the private key is not actually stored in any form, because it doesn't exist. Whenever a new wallet is created, the public key is computed (in one direction) by a set of other trusted parties. In our case, we have multiple partners running nodes that participate in the process. We followed the EdDSA algorithm in our implementation of this TSS variant. This type of wallet is called a multi-party computational wallet. 

So the user's private key is not actually stored in a database because there is actually no private key to store. However, we can prove that the user's public key has performed an action when multiple parties have signed a given transaction. The final signature generated by the transaction is an ed25519-compliant signature produced by computing the resultant signatures from all parties. So no one entity can perform an action alone on behalf of the user.
#### NFT Collection Creation
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jd8ujocwzyim239pj24i.png)
After the login and the transactions, we are now getting at the asset we are actually purchasing here in the dApp. In our case, it is the little jumper character——the Mirror NFT. The problem we are solving here is how to create an NFT collection, mint it so that it could exist as a digital asset independent from the game. We used our SDK to enable our in-app minting as well as creating your own NFT collection.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/rejb1loauzky7b59ivux.png)
Below are some basic APIs we used for minting a new NFT collection and getting the NFT metadata.
[Mint New NFT](https://developer.mirrorworld.fun/#4fb51141-d65b-4c24-a256-b3f065fdb261)
[Mint New Collection](https://developer.mirrorworld.fun/#1696cb75-cb3b-46c0-9d3d-dea7c0f87f74)
[Mint New NFTs on Collection](https://developer.mirrorworld.fun/#69b4fc11-c126-4ffe-b51e-b30aa8ae107b)
[Get nft events](https://developer.mirrorworld.fun/#7df3c913-bc85-4371-8fef-e985eab5e4a0)
[Get nft info](https://developer.mirrorworld.fun/#91bce4c8-14d5-4de1-ad15-a4c4701bf1ea)
[Get nft real price](https://developer.mirrorworld.fun/#1cf5530a-ad2e-4cc2-8beb-b2b733b29960)

They are all open to developers for free. You could try them out now by going to our dashboard by [clicking here](https://app.mirrorworld.fun/auth/login).
#### In-App NFT Marketplace 
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ioh1csmsqvvi87y1v51g.png)
With the elements like NFT collection minting as well as metadata ready, we can proceed to take our final step of adding Web 3 elements onto our game——enable listing and purchasing NFT in an NFT Marketplace. Just like the wallet, our NFT marketplace and its operations are all completely inside the dApp as you can see in the Mirrors Jump demo. Users can browse, purchase, use on-ramp service and list their NFTs inside the dApp, which makes the user experience extremely smooth.

Here are some APIs we used for building our NFT Marketplace for Mirrors Jump:
[List NFT on the marketplace](https://developer.mirrorworld.fun/#fc6c3693-60f1-4fbc-94f7-868802a322a4)
[Buy NFT on the marketplace](https://developer.mirrorworld.fun/#34acc2c8-ddb3-4872-85d3-81eb0ce46d36)
[Update Listing of NFT on the marketplace](https://developer.mirrorworld.fun/#b6dee8d9-82a2-44b1-a5de-579fa9d91319)

For the full set of APIs, you can visit our HTTP API here: https://developer.mirrorworld.fun/#intro
Smart SDK also provides a dashboard for basic color and layout modifications, though you could always make more delicate modifications in our opensource storefront. 
### Final Note
Above are all the steps you need to take to better utilize our SDK. If you do have an existing game ready, it shouldn't take more than 30 minutes for you to complete the whole on-chain process, and this could take couple of months for a small developer team to build from ground up. If you have specific questions regarding the API plug in and so on, you can always contact our professional tech team for help. For more information regarding Mirror World, please visit the link below.

Official Website: https://mirrorworld.fun/
For our doc: https://docs.mirrorworld.fun/overview/introduction
Also, if you have any feedback to our product or questions of any kind, please let us know here:https://mirrorworld.fun/feedback

Orignally Published on: https://blog.mirrorworld.fun/p/how-to-integrate-blockchain-sdk-to