Giter Site home page Giter Site logo

chrsfrrll / unity-test-console Goto Github PK

View Code? Open in Web Editor NEW

This project forked from teamaikon/unity-test-console

0.0 0.0 0.0 1.36 MB

Unity project files and ORE ID Scripts that creates a simple API testing console. This project uses custodial account functionality to create blockchain wallets, store private keys, and make transactions on the blockchain.

C# 17.20% HLSL 12.26% ShaderLab 70.54%

unity-test-console's Introduction

ORE ID Unity Test Console

Overview

This project lays the groundwork for implementing blockchain actions within the popular game development platform. The test console demonstrates ORE ID Custodial API functionality:

  • Custodial ORE ID account creation -> Easily provision blockchain accounts which the developer holds the keys to.
  • Custodial blockchain account creation -> Add additional blockchain accounts to a custodial user's wallet.
  • Custodial transaction signing -> Sign and broadcast transactions for a custodial user.

Docs

Prerequisites

  1. Register an ORE ID dApp using the developer dashboard.
  2. Request a service-key by opening a ticket on ORE ID support You will need to enter the Application ID of the dApp created in step one. Our team will issue you a service-key.

Running the sample app

  1. Download this repo to your local file system.
  2. Add your serviceKey to the "Assets/Scripts/APIConnection.cs" file.
  3. Launch Unity Hub and select the "Open" option.
  4. Choose the folder that contains the downloaded sample app.
  5. Unity Hub will open a new window with the sample project.
  6. Run the SampleScene by clicking the "Play" arrow.
  7. Test the individual API Calls and see the feedback on the screen, additional info is printed to the console.

The Unity script

Check the "Assets/Scripts" folder for the "APIConnection.cs" file.

This APIConnection.cs file contains the functionality to call the ORE ID Service API. The "CallApi" function is the manager which is attached to the API Manager Unity Object. The function takes a string which triggers the corresponding API call.

Also included are data structures for the API requests and responses.

Custodial Management

Custodial functionality for account creation, management, and signing keeps the control of the user's private keys with the developer. This makes the onboarding experience of a new user straightforward. The blockchain functionality can be hidden from the user entirely, creating a familiar gaming experience with no complicated blockchain wallet connection process.

Provisioning each of your game's users a blockchain account is the first step. Then, transactions can be conducted on the blockchain using the custodial blockchain accounts.

Hiding blockchain functionality

Using Custodial tooling it is possible to mask blockchain functionality as familiar gaming actions. Gamers are most-likely already comfortable with the ideas of in-game currency, digital marketplaces, and in-game purchases. These are the most common actions that can be executed on the blockchain instead of silo'd in a centralized database. Give gamers the right to own their digital assets.

As users get more familiar with your game, you can slowly introduce them to different facets of the blockchain. With the goal of giving full custody of the blockchain wallet to the user (after they have completed a certain task, racked up enough in game currency, or some other qualifying task).

Expanding on this project

This project was created as a sample to demonstrate the ORE ID API Custodial functionality within the Unity environment. This project does not present a working web wallet, but one can be built with the provided tooling. Onboarding gamers quickly and outfitting them with a blockchain wallet and accounts is the goal of this project. Drop off rates are as high as 90% when gamers are presented with the action to link/sign-in their own crypto wallet. Getting new gamers in the door and set up with a blockchain account with no effort on the gamer will ease onboarding drop off.

Custodidal to Non-custodial migration

What if you want to transfer custodial user accounts to non-custodial? This would give full custody of the wallet to the user. Once converted to non-custodial, developers can no longer sign and broadcast transactions on behalf of the user. Instead, the user will be asked to enter a passcode to sign the transaction. This functionality is currently under construction, but will be available in a future release.

unity-test-console's People

Contributors

boyroywax avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.