Quickstart
Get a Zypp intent created, queued, and settled in under five minutes.
Prerequisites
- Node.js 18+ and pnpm (for Expo SDK)
- Rust toolchain (for Rust Core development)
- Unity 2021.3+ (for Unity SDK)
Expo (React Native)
1. Install
npx expo install @zypp-labs/expo-sdk
2. Create and Queue an Intent
import { createIntent, markProvisional, finalize, getQueue } from '@zypp-labs/expo-sdk';
// Create an action intent (works offline)
const { intentId } = createIntent('move_player', '{"x":10,"y":20}');
// Mark as provisionally synced
markProvisional(intentId);
// Finalize
finalize(intentId);
// Check the queue
const queue = getQueue();
console.log('Queue entries:', queue.length);
3. Settle On-Chain
import { settle } from '@zypp-labs/expo-sdk';
settle(intentId, 'https://api.devnet.solana.com', 0);
Unity (C#)
1. Install
Add via Unity Package Manager:
https://github.com/zypp-labs/zypp-sdk.git?path=packages/unity-sdk
2. Create and Queue an Intent
using ZyppLabs;
var intent = ZyppSdk.CreateIntent("move_player", "{\"x\":10}", ZyppTrustTier.Unsigned);
ZyppSdk.MarkProvisional(intent.intentId);
ZyppSdk.Finalize(intent.intentId);
var queue = ZyppSdk.GetQueue();
Debug.Log($"Queue entries: {queue.Length}");
3. Settle On-Chain
var result = ZyppSdk.Settle(intent.intentId, "https://api.devnet.solana.com", ZyppExitType.SolanaRpc);
Rust Core
1. Add Dependency
[dependencies]
zypp-labs-core = { path = "../rust-core" }
2. Create and Queue an Intent
use zypp_labs_core::ZyppEngine;
use zypp_labs_core::intent::TrustTier;
let engine = ZyppEngine::new();
let intent = engine.create_intent("move_player", r#"{"x":10,"y":20}"#, TrustTier::Unsigned);
Key Concepts
- Created offline: All
createIntentcalls work without internet access - Content-hash dedup: Identical payloads are rejected at creation time
- Encrypted at rest: Optional AES-256-GCM via
initWithSecureStorage() - Transferable: Intents can be moved between devices via BLE, NFC, or QR codes
Next Steps
- Learn about the Intent data model
- Build a Payment flow with USDC transfers
- Explore the Expo SDK in depth