Onairos
  • 🔮Welcome to Onairos
  • Installation
  • API Reference
  • LLM Memory SDK
  • 🖱️Developer Guides
    • Integrate Onairos Web
      • ⬇️Installation
      • 🔅1 Line of Code
      • Manual API Call
        • 📥Receiving API
        • 🖥️Using the Inference API
      • 📲Inference API Response
      • 🏟️Examples
    • Integrate Onairos Mobile
      • ⬇️Installation
      • 🔅1 Line of Code
      • Manual API Call
        • 📥Receiving API
        • 🖥️Using the Inference API
      • 📲Inference API Response
      • 🏟️Examples
    • Example Usage of Data
    • 🚤Coming Soon
    • Developer FAQ
    • Developer Debugging
  • Overview
    • 🦄Digital Personality
    • 🔐Security and Privacy
Powered by GitBook
On this page
  • Request Data Object
  • That is all for the setup and users you can now recieve user data in the OnComplete function
  1. Developer Guides
  2. Integrate Onairos Web

1 Line of Code

You thought we were joking? No really just 1* line of code

PreviousInstallationNextManual API Call

Last updated 9 months ago

Instantiate the Onairos object from the Onairos package to add the Onairos button onto your application which asks the user for the Persona Data

<Onairos className="w-20 h-20 py-2 px-4 ml-5" 
    textColor={"black"} textLayout="right"
    webpageName="Onairos Internship Onboarding"  
    requestData={requestData} 
    autoFetch={true} onComplete={onComplete} inferenceData={data}  
    proofMode={false} />

className : Tailwindcss (CSS) for height, width sizing and margins

Onairos Object fields:

  • webpageName - String - Required - App Display Name

  • requestData - Json - Required - User Request data (

  • textColor - String - Optional - Text Color of Onairos Button

    'black' | 'white'
  • textLayout - String - Optional - Position of Onairos Title relative to Button Icon

    'right' | 'left' | 'below' | 'none';
  • autoFetch - Boolean - Optional - Whether to automatically fetch user data as soon as they consent

  • onComplete - Function - Optional - Function to fetch user data via API manually

          onComplete: (data: any, error?: Error) => void; 
  • inferenceData - Json () - Optional (Required if autoFetch = true) - Inference Input Data

  • proofMode - Boolean - Optional - ZK proof returned after recieving Data

Request Data Object

"RequestObject":{ 
    "Traits": { 
      "type": "Traits", 
      "descriptions": "Understand you Personality and Soft Skills"
      "rewards":"10% Discount"
    },
    "Small": {
      "type":"Personality",
      "descriptions":"Insight into your Interests",
      "reward":"" // Can leave blank if no associated reward
    },
    "Medium":{
      "type":"Personality",
      "descriptions":"Insight into your Interests",
      "reward":"0.5 USDC"
    },
    "Large":{
      "type":"Personality",
      "descriptions":"Insight into your Interests",
      "reward":"1 USDC"
    }
  }

Setup the Onairos Connection Object

Create the Request Object which Users will Authorize (or not) in the extension popup

RequestObject.size key:

  • Small - Upto 16 inference items

  • Medium - Upto 32 inference items

  • Large - Upto 64 inference items

Individual Request Information:

  • type: Only the Personality key is valid at this time (represents the users Onairos Personality)

  • description: Description to display to users about your request

  • reward: Reward Given to User for granting Data Request

That is all for the setup and users you can now recieve user data in the OnComplete function

Please go to our to see an example Onairos integration

If you set autoFetch = false, you will need to manually fetch the user data using the

🖱️
🔅
Demo
following
See Below)
Format