Skip to main content

Overview

Three ways to integrate: embed in the App Store iframe, hit the REST API, or talk to contracts directly. For full code, see GitHub.

Architecture

Integration Options

MethodUse CaseComplexity
App Store EmbedRun app in Elata iframeLow
REST APIRead app data, metadataMedium
Smart ContractsDirect blockchain interactionHigh

App Store API

The App Store provides REST endpoints for reading data.

Base URL

https://app.elata.bio/api

Endpoints

Get All Apps

GET /api/apps
Returns list of all apps with metadata:
{
  "apps": [
    {
      "id": "...",
      "tokenAddress": "0x...",
      "name": "NeuroPong",
      "symbol": "NPONG",
      "description": "...",
      "imageUrl": "...",
      "creator": "0x...",
      "status": "raising" | "live",
      "createdAt": "2024-01-01T00:00:00Z"
    }
  ]
}

Get Single App

GET /api/apps/{tokenAddress}
Returns detailed app information including:
  • Basic metadata
  • Social links
  • Team members
  • Artifacts (game files)

Get Prices

GET /api/prices
Returns current ELTA price data for UI display.

Smart Contracts

For direct blockchain interaction, these are the key contracts:

Core Contracts

ContractPurpose
ELTAMain protocol token
VeELTAVote-escrowed staking
AppFactoryCreates new apps
AppFactoryViewsRead app data

Per-App Contracts

ContractPurpose
AppTokenIndividual app ERC-20 token
AppBondingCurvePrice discovery via ELTA curve
AppVestingWallet25% supply — cliff + linear vest
AppEcosystemVault25% supply — admin-controlled
FeeCollectorCollects and routes protocol fees

Contract Addresses

See Resources → Contracts for deployed addresses.

Reading On-Chain Data

import { createPublicClient, http } from 'viem'
import { baseSepolia } from 'viem/chains' // Use 'base' for mainnet

const client = createPublicClient({
  chain: baseSepolia,
  transport: http()
})

// Read app data from factory
const appData = await client.readContract({
  address: APP_FACTORY_ADDRESS,
  abi: AppFactoryABI,
  functionName: 'apps',
  args: [appId]
})

Key Read Functions

ContractFunctionReturns
AppFactoryapps(uint256)App tuple (creator, token, curve, etc.)
AppFactoryappCount()Total apps launched
AppTokenbalanceOf(address)User token balance
AppBondingCurvegetPrice()Current curve price
AppVestingWalletreleasable()Vested tokens available to release
AppEcosystemVaultbalance()Vault token balance
VeELTAbalanceOf(address)User veELTA balance

Writing Transactions

App Launch (Two-Phase)

import { writeContract } from 'wagmi'

// Phase 1 — register the app (no token yet)
await writeContract({
  address: APP_FACTORY_ADDRESS,
  abi: AppFactoryABI,
  functionName: 'createAppWithoutToken',
  args: [name, symbol, description, imageUrl, website]
})

// Phase 2 — approve ELTA and launch the token + bonding curve
await writeContract({
  address: ELTA_ADDRESS,
  abi: ERC20ABI,
  functionName: 'approve',
  args: [APP_FACTORY_ADDRESS, 110n * 10n**18n]
})

await writeContract({
  address: APP_FACTORY_ADDRESS,
  abi: AppFactoryABI,
  functionName: 'launchTokenForApp',
  args: [appId]
})

Buy on Bonding Curve

// Approve ELTA for curve
await writeContract({
  address: ELTA_ADDRESS,
  abi: ERC20ABI,
  functionName: 'approve',
  args: [CURVE_ADDRESS, amount]
})

// Buy tokens
await writeContract({
  address: CURVE_ADDRESS,
  abi: AppBondingCurveABI,
  functionName: 'buy',
  args: [eltaAmount, minTokensOut]
})

Lock ELTA as veELTA

// Approve ELTA for the VeELTA contract
await writeContract({
  address: ELTA_ADDRESS,
  abi: ERC20ABI,
  functionName: 'approve',
  args: [VEELTA_ADDRESS, amount]
})

// Lock ELTA (unlockTime is a Unix timestamp)
await writeContract({
  address: VEELTA_ADDRESS,
  abi: VeELTAABI,
  functionName: 'lock',
  args: [amount, unlockTime]
})

Embedding in Iframe

Apps run inside an iframe on the Elata App Store. Your app can:

Communicate with Parent

// Send message to Elata frame
window.parent.postMessage({
  type: 'ELATA_EVENT',
  payload: { action: 'SCORE_UPDATE', score: 1000 }
}, '*')

// Listen for messages from Elata
window.addEventListener('message', (event) => {
  if (event.data.type === 'ELATA_USER') {
    const { address, balance } = event.data.payload
    // Use user data
  }
})

Access User Data

When embedded, your app receives:
  • Connected wallet address
  • App token balance
  • veELTA balance

Webhooks (Coming Soon)

Future webhook support for:
  • New token purchases
  • Fee collection events

SDKs & Libraries

Elata Bio SDK

PackagePurposeDocs
@elata-biosciences/eeg-webEEG signal processing via WASMSDK — eeg-web
@elata-biosciences/eeg-web-bleWeb Bluetooth headband connectionSDK — eeg-web-ble
@elata-biosciences/rppg-webCamera-based heart rate (rPPG)SDK — rppg-web
See the full SDK documentation for installation, architecture, and integration guides.

App Store Source

Use the App Store codebase as an integration reference:
// Useful hooks from elata-appstore/src/hooks/
useAppFactory()      // App creation and data
useBondingCurve()    // Price quotes, buy/sell
useAppHoldings()     // User balances
useVeELTA()          // veELTA locking

ABIs

Contract ABIs are available in the App Store repository:
elata-appstore/src/abi/
├── AppFactory.json
├── AppBondingCurve.json
├── AppToken.json
├── AppVestingWallet.json
├── AppEcosystemVault.json
├── FeeCollector.json
├── ELTA.json
├── VeELTA.json
└── ...

Rate Limits

API Limits

EndpointLimit
Read endpoints100 req/min
Heavy queries10 req/min

RPC Limits

Use your own RPC provider for production:

Example: Price Display Widget

import { useReadContract } from 'wagmi'
import { formatEther } from 'viem'

function PriceWidget({ curveAddress }) {
  const { data: price } = useReadContract({
    address: curveAddress,
    abi: AppBondingCurveABI,
    functionName: 'getPrice',
  })
  
  return (
    <div>
      Current Price: {price ? formatEther(price) : '...'} ELTA
    </div>
  )
}

Resources

App Store Repo

Frontend implementation reference

Protocol Repo

Smart contract source code

Contract Addresses

Deployed contract addresses

Discord

Developer support channel