SPEEM

Demo Wallet Built with PolkaBind Lib

Native iOS & Android clients using PolkaBind packages

View Demo Workflow

About This Demo

SPEEM is a demonstration wallet whose entire Polkadot integration comes from PolkaBind Lib. Instead of embedding a Rust core, SPEEM installs PolkaBind’s Swift and Kotlin packages to handle all Substrate RPC, key derivation, SCALE encoding, and transaction signing. The app logic is written natively in SwiftUI (iOS) and Jetpack Compose (Android), showcasing how PolkaBind simplifies cross‐platform development.

Of course, we can add another core shared library to abstract out shared business logic so we only care about native UI in both apps, but that's out of the scope of the demo app goal.

Work in Progress: APIs and UI may change as PolkaBind evolves. SPEEM always reflects the latest PolkaBind release.

Tech Stack

PolkaBind Lib

Swift & Kotlin packages generated via UniFFI from SubXT. Provide methods like getBalance(), buildSignedTransfer(), submitExtrinsic(), and more.

iOS (SwiftUI)

Uses PolkaBind.getBalance() and PolkaBind.transfer() directly. Implements native UI for scanning QR, confirming payments, and viewing history.

Android (Jetpack Compose)

Calls PolkaBind.getBalance() and PolkaBind.transfer() via Kotlin bindings. Native UI for QR scanning, transaction review, and history.

Demo Workflow

1. Install PolkaBind Package

Add PolkaBind to your Podfile (iOS) or Gradle (Android), then pod install or gradle sync.

2. Initialize Client

Call PolkaBind.initClient("wss://rpc.polkadot.io") in your app’s startup logic.

3. Build & Sign

Use PolkaBind.buildSignedTransfer(to, amount, seed) to get a signed extrinsic blob.

4. Submit & Monitor

Submit via PolkaBind.submitExtrinsic(blob) and display finality notifications when confirmed.

Positioning vs. SubXT & SmolDOT

SubXT

A Rust SDK for Polkadot that wraps JSON-RPC and SCALE encoding. Requires Rust FFI to use natively; not directly consumable by Swift/Kotlin.

SmolDOT

A no-std Rust light client. On-device verification is possible but requires manual JNI/Swift bridges. Larger footprint.

PolkaBind Lib

Uses UniFFI to generate Swift & Kotlin packages from SubXT (or future SmolDOT). Provides a minimal wallet API out of the box so native apps never write their own FFI.

Get Started

# iOS (Swift Package Manager)
# In Package.swift:
.package(
  name: "PolkaBind",
  url: "https://github.com/PolkaBind/uniffi-polkadot-sdk-swift.git",
  from: "0.2.0"
)

# Then in your Swift code:
import PolkaBind

let status = PolkaBind.initClient("wss://rpc.polkadot.io")
if status == .Ok {
  let balance = PolkaBind.getBalance("5AbC…xyz")
  print("Free: \(balance.free), Reserved: \(balance.reserved)")
}

# Android (Gradle)
# In build.gradle (app module):
implementation "com.polkabind:polkabind-sdk:0.2.0"

# Then in Kotlin:
val status = PolkaBind.initClient("wss://rpc.polkadot.io")
if (status == ErrorCode.Ok) {
    val acct = PolkaBind.getBalance("5AbC…xyz")
    println("Free: ${acct.free}, Reserved: ${acct.reserved}")
}

Roadmap

v0.1 – PolkaBind Core (SubXT)

• Expose initClient, getBalance, buildSignedTransfer, submitExtrinsic. • Publish Swift & Kotlin packages. • SPEEM uses v0.1 to demonstrate basic transfers.

v0.2 – Event Subscriptions & Notifications

• Add subscribeEvents for balances.Transfer. • Merge in SPEEM finality UI. • Improve error handling and retries.

v0.3 – SmolDOT Light‐Client Flag

• Introduce light-client feature to compile SubXT with SmolDOT. • Expose syncHeaders() & verifyBlock(). • Update SPEEM to optionally run fully on-device.

v1.0 – Stable Release

• Polish PolkaBind API, finalize docs. • Publish to CocoaPods & Maven Central. • Finalize SPEEM feature set (no publication to App Stores though).

Note: SPEEM is only a demonstration. All Polkadot logic lives in PolkaBind Lib.