TealeSDK
Let third-party apps contribute idle device resources to the Teale network.
Overview
TealeSDK allows any app to participate in the Teale inference network. When users opt in, their device contributes idle compute resources to serve AI inference requests. Users earn Teale Credits for availability and for serving requests; developers get attribution for the resources their app's users provide.
The SDK handles:
- User consent -- persistent opt-in/opt-out with a standard consent UI
- Resource management -- RAM limits, scheduling, battery awareness
- Network participation -- relay connection, peer discovery, inference serving
- Earnings tracking -- per-developer attribution and real-time earnings reporting
Design Principles
- User consent is mandatory. The SDK will not contribute resources until the user explicitly grants consent via
grantConsent(). Users can revoke consent at any time. - Respect device resources. Configurable RAM limits, Wi-Fi requirements, power requirements, and scheduling ensure the host app's performance is never degraded.
- Battery-aware. Contribution automatically pauses on low battery, high thermal state, or when the device is on cellular.
Quick Start
import TealeSDK
let contributor = TealeContributor(
appID: "com.example.myapp",
developerWalletID: "your-solana-wallet-address",
options: ContributionOptions(
ramLimit: .percent(0.5),
schedule: .idle,
requireWiFi: true,
requirePluggedIn: false
)
)
// Must get user consent before starting
contributor.grantConsent()
try await contributor.start()
Pages
- Getting Started -- Step-by-step integration guide
- TealeContributor -- Main API reference
- Contribution Options -- Resource limits and scheduling
- Consent Flow -- User consent management
- Earnings Reporting -- Revenue tracking and attribution
- SwiftUI Integration -- Pre-built views for consent, earnings, and settings