AINFT Avatars Mobile App (Android/iOS)

photo_2023-09-17 17 43 45

Introduction

Welcome to the AINFT Mobile App project. This project contains the code for an Android/iOS app that allows users to seamlessly interact with AINFT avatars and manage their semi-custodial crypto wallet. Users can log in using various social logins like Google and Facebook, receive a small amount of tokens to cover gas fees, mint avatars, and interact with them. Additionally, users can copy their wallet address and export the passphrase to import the wallet into MetaMask for trading avatars on OpenSea or other marketplaces.

Table of Contents

  1. What is an AINFT Avatar?
  2. AINFT Smart Contract
  3. Distribute Tokens Smart Contract
  4. MintNft Unity Script
  5. OpenAIChat Unity Script
  6. NFTStorage.js Script

avatars

What is an AINFT Avatar?

An AINFT avatar is a digital representation of a person or historical figure created using advanced artificial intelligence and blockchain technology. These avatars are more than just images; they encapsulate the essence of individuals, including their appearance, voice, mannerisms, and stories. Here's what you need to know:

  • Digital Time Capsules: AINFT avatars serve as digital time capsules, preserving memories and identities for future generations.
  • Personal Legacy: They enable descendants to interact with avatars of their ancestors, gaining insights into family histories and forging a sense of continuity.
  • Historical Figures: AINFT avatars can bring historical figures to life, offering personalized interactions and immersive learning experiences.
  • Companionship: In an increasingly isolated world, these avatars provide companionship and connection, offering solace and conversation.
  • Continuous Learning: They redefine learning by enabling conversations with experts, like Einstein, and facilitating continuous growth.
  • Entertainment: Artists and celebrities can create avatars for unique fan interactions, revolutionizing entertainment.
  • Cultural Heritage: AINFT avatars preserve cultural traditions and ensure their accessibility and appreciation on a global scale.
  • Generational Understanding: They bridge generational gaps by encouraging empathy, dialogue, and shared connections.

To dive deeper into the fascinating world of AINFT avatars, read the full article.

AINFT Smart Contract

contracts/AINFT.sol

Contract Details

  • Name: AINFT
  • Inheritance: ERC721Enumerable, ContextMixin, NativeMetaTransaction, Ownable
  • Description: This smart contract represents the AINFT avatars. Users can mint new avatars and check their balance.
  • Functions:
    • mintItem(string memory tokenURI): Allows users to mint a new avatar with the given token URI.
    • getBalance(address wallet): Returns the balance of avatars owned by a specific wallet.
    • getTokensOfOwner(address owner): Returns the avatars owned by a specific owner in JSON format.

Contract Usage

  • The mintItem function is used to mint new avatars with a token URI.
  • The getBalance function returns the balance of avatars owned by a specific wallet.
  • The getTokensOfOwner function returns the avatars owned by a specific owner in JSON format.

Example Usage

// Mint a new avatar
uint256 newItemId = mintItem("https://tokenURI.example/avatar123");

// Check the balance of avatars owned by a wallet
uint256 balance = getBalance(walletAddress);

// Get the avatars owned by an owner in JSON format
string memory tokens = getTokensOfOwner(ownerAddress);

Distribute Tokens Smart Contract

contracts/Distributor.sol

Contract Details

  • Name: Distributor
  • Description: This smart contract allows the owner to distribute tokens to other addresses.

Functions

  • distribute(address payable _recipient): Allows the owner to distribute tokens to the specified recipient.
  • withdraw(): Allows the owner to withdraw the contract's balance.

Contract Usage

  • The distribute function is used by the owner to distribute tokens to a recipient.
  • The withdraw function is used by the owner to withdraw the contract's balance.

Example Usage

// Distribute tokens to a recipient
distribute(recipientAddress);

// Withdraw the contract's balance
withdraw();

MintNft Unity Script

web3auth-unity/Assets/Scripts/Web3Auth/MintNft.cs

Overview

The MintNft Unity script allows users to log in, mint AINFT avatars, and check their avatar balances. It interacts with the AINFT smart contract on the Ethereum network.

Key Functions

  • login(): Initiates the login process using social logins like Google.
  • onLogin(Web3AuthResponse response): Handles the user's login response and initializes the Web3 instance.
  • mintNft(): Mints a new AINFT avatar.
  • GetTokensOfOwner(): Retrieves the avatars owned by the user.
  • ProcessSentenceQueue(): Processes sentences for speech synthesis.

Example Usage

// Login with Google
login();

// Mint a new AINFT avatar
mintNft();

// Get avatars owned by the user
GetTokensOfOwner();

OpenAIChat Unity Script

web3auth-unity/Assets/Scripts/AiNft/OpenAIChat.cs

Overview

The OpenAIChat Unity script enables users to engage in a conversation with an AI character, Aurelia Everwood. It utilizes the OpenAI GPT-3.5 model to generate responses and offers speech synthesis capabilities for a more immersive experience.

Key Functions

  • SendMessage(string message): Sends a message to the AI character and processes responses.
  • ProcessSentenceQueue(): Manages the queue of sentences for speech synthesis.
  • TrimConversationContext(): Ensures the conversation context does not exceed the maximum length.
  • initialGreeting(): Initiates the conversation with an initial greeting.
  • setVoiceConfig(string voice): Sets the voice configuration for speech synthesis.

Example Usage

// Send a message to the AI character
SendMessage("Hello, Aurelia!");

// Set the voice configuration
setVoiceConfig("en-US_AllisonV3Voice");

// Start the conversation with an initial greeting
initialGreeting();

NFTStorage.js Script

nft-storage/upload-script.js

Overview

The NFTStorage.js script is used to upload NFT files and generate metadata for AINFT avatars. It utilizes the NFT.Storage API to store files and metadata on IPFS.

Key Functions

  • uploadNFTFiles(): Uploads NFT files (GLB and JPG) and generates metadata for avatars.
  • readJSONFile(filePath): Reads the content of a JSON file.

Example Usage

// Upload NFT files and generate metadata
uploadNFTFiles();

Conclusion

This documentation provides an overview of the key components in the AINFT Mobile App GitHub repository. Developers can use this information to understand and work with the codebase for building and improving the AINFT mobile application.

Deployments

Rootstock Testnet Contract Address: 0x6fFE8420D0faCE10E86dbb8657F11e7CD0957e43

Traction, Future Plans and Vision

  • Traction
  • 🥇 Polygon DevX EMEA Hackathon: Polygon (Labs) Prize
  • 🏆 Game Development World Championship: Best Web3 Game Finalist
  • 🥇 GameWave Genesis Hackathon: AAG Prize
  • 🥇 SAGA Multiverse Hackathon 1st place
  • 🥇 ZetaChain Omnichain Hackathon 1st place GameFi
  • 🥇 Kirobu Trading Hackathon 1st place
  • 🥈 AIBC Playnance Hackathon 2nd place:
  • 🥉 Hack-a-TONx 3rd place:
  • 🎓 Startup Wise Guys Pre-Accelerator Graduate
  • 👨🏻‍💻 Proud to partner with Microsoft for Startups- Short-term Goals:

  • Increase Monthly Recurring Revenue (MRR) to $5000.

    • Improve User Retention Rate to 5% by the 31st day.
    • Boost Monthly Active Users (MAU) to 3000.
  • Evolution: Introduction of Avatar Creation, In-game Store, Creators Portal, and enhanced game retention mechanics.

  • Potential Collaborations:

    • Engaged 30k pre-alpha testers on STEAM, generating valuable feedback.
    • Achieved substantial success in skin sales, indicating strong market interest.
    • Exploring partnerships with influential streamers and micro-influencers to host dynamic online championships, boosting the game's visibility and reach.
    • Actively discussing collaborations with diverse influencers to craft exclusive NFT avatar collections, enabling fan engagement and personalized skin sales.

Contact Information and Resources

  • Website: ailand.app
  • Email Address: team@ailand.app
  • Phone Number / Telegram: +351965096200 / @INF_INI_TY / @Andreas_0xAI
  • Location: AFI+ Network, R. da Madalena 111, 1100-319 Lisbon
  • Social Media and Github: GitHub Twitter

Let's revolutionize the gaming industry together!

Screenshot of replying and reposting the tweet

Screenshot 2023-09-17 at 23 32 43 Screenshot 2023-09-17 at 23 32 38

Built With

Share this project:

Updates

posted an update

Update: Exciting News!

We started our journey by building the AI NFT Avatars project from scratch with full implementation: Check it out here. However, as we delved deeper, we realized that we had embarked on this fantastic project a bit too early, and unfortunately, we didn't meet the deadlines for the hackathons we originally aimed for.

But guess what? We're not giving up! We believe in the potential of AINFT Avatars and their power to redefine the digital landscape. So, we decided to continue building on our vision and created a brand new project based on the AINFT Avatars infrastructure we had diligently developed earlier.

Introducing the AINFT Avatars Mobile App

You can find the entire codebase for this exciting new project right here: AINFT Avatars Mobile App GitHub Repository.

We're committed to making this project even more amazing, accessible, and user-friendly. Stay tuned for updates, and thank you for joining us on this incredible journey into the future of digital connection and legacy preservation!

Log in or sign up for Devpost to join the conversation.