Back to docs

Styx App Kit

v1.0.0

Build Privacy-First Solana Mobile Apps

Overview

Styx App Kit is a complete privacy-first development kit for Solana mobile apps. It follows the Solana App Kit playbook to provide a familiar structure for building Signal-like messaging, private payments, anonymous governance, and more.

8
Privacy Modules
100%
Tree-Shakeable
All
Platforms Supported

Quick Start

1. Install

npm install @styx-stack/app-kit @solana/web3.js

2. Wrap Your App

import { StyxProvider } from '@styx-stack/app-kit';

function App() {
  return (
    <StyxProvider cluster="mainnet-beta">
      <YourApp />
    </StyxProvider>
  );
}

3. Use Privacy Hooks

import { usePrivateMessaging, usePrivatePayments } from '@styx-stack/app-kit';

function ChatScreen() {
  const { sendMessage, messages } = usePrivateMessaging();
  const { createPaymentLink } = usePrivatePayments();

  // Signal-like encrypted messaging
  await sendMessage(recipientPubkey, "Hello, privately!");

  // Private payment link (share via SMS/email)
  const link = await createPaymentLink({ amount: 1.0 });
}

Privacy Modules

Platform Support

PlatformSupportedNotes
React Native (Expo)Full support with native secure storage
React Native (bare)Full support
Solana SeekerOptimized for mobile wallet adapter
iOSVia React Native
AndroidVia React Native + Kotlin SDK
Web (Next.js)Full support
Web (Vite)Full support
Node.jsServer-side operations

React Native Setup

For React Native apps, also install the crypto polyfills:

npm install react-native-get-random-values expo-secure-store

Add to your entry file before any other imports:

// App.tsx or index.js
import 'react-native-get-random-values';

Then use the native utilities:

import { SecureKeyStorage, BiometricAuth, MobileWallet } from '@styx-stack/app-kit/native';

// Secure key storage with keychain/keystore
await SecureKeyStorage.saveKey('my-key', keypair.secretKey);

// Biometric protection
await BiometricAuth.authenticate({
  reason: 'Unlock your wallet',
  fallbackLabel: 'Use PIN',
});

Tutorials

Step-by-step guides for common use cases

GitHub

Source code and examples

API Reference

Complete API documentation