{
  "markdown": "# Rustok\n\nEthereum wallet with chain abstraction and transaction security engine.\n\n**Status:** Production — Phase 7 DONE — Android verified on Sepolia; iOS supported. React Native app with real on-chain transactions, full onboarding, and txguard live analysis.\n\n**Website:** [rustok.uz](https://rustok.uz) | **API:** [api.rustok.uz](https://api.rustok.uz/health) | **X:** [@rustokwallet](https://x.com/rustokwallet)\n\n---\n\n## What is this?\n\nRustok is a self-custody Ethereum wallet built around two ideas:\n\n1. **Your keys, your chains** — one seed phrase controls addresses across Ethereum, Arbitrum, Base, Optimism, and zkSync. Balance and routing are unified; you pick the chain, the wallet handles the rest.\n2. **Trust but verify** — every transaction is analyzed by `txguard` before signing. It decodes calldata, runs security rules, simulates execution via `revm`, and enriches findings with threat intelligence.\n\nThe mobile app (Android + iOS) is the primary interface. A public HTTP API and CLI are available for headless txguard analysis.\n\n---\n\n## Features\n\n- **Multi-chain wallet** — unified balance, send, and receive across 5 mainnet chains + Sepolia testnet\n- **BIP39 seed phrase** — MetaMask-compatible path (`m/44'/60'/0'/0/0`), cross-device recovery\n- **txguard analysis** — pre-sign security scan with risk badge and per-finding breakdown\n- **PIN + Biometric lock** — Argon2id-hashed PIN, Face ID / fingerprint unlock, background auto-lock\n- **Onboarding** — create wallet (4-step wizard + phrase quiz), import from seed phrase, or recover from lockout / biometric change\n- **Activity history** — real transaction feed with pending-state tracking and explorer links\n- **Theme** — light / dark / system with design-token consistency across the UI\n\n---\n\n## Architecture\n\n```\n┌─────────────────────────────────────────────────────────────┐\n│                    Mobile App (Android / iOS)                │\n│  ┌─────────┐  ┌─────────┐  ┌─────────┐  ┌────────────────┐ │\n│  │ Wallet  │  │ Activity│  │ TxGuard │  │    Settings    │ │\n│  │  Tab    │  │  Tab    │  │  Tab    │  │  (Appearance,   │ │\n│  │         │  │         │  │         │  │   Biometric,   │ │\n│  │ • Hero  │  │ • TX    │  │ • Risk  │  │   Auto-lock,   │ │\n│  │   card  │  │   list  │  │   badge │  │   Network)     │ │\n│  │ • Send  │  │ • Pull  │  │ • Per-  │  │                │ │\n│  │ • QR    │  │   refresh│  │   finding│  │                │ │\n│  └─────────┘  └─────────┘  └─────────┘  └────────────────┘ │\n│  ┌─────────────────────────────────────────────────────────┐│\n│  │  React Navigation v7  •  Zustand 5  •  NativeWind v4   ││\n│  │  Reanimated 4  •  MMKV  •  Keychain  •  Argon2id       ││\n│  └─────────────────────────────────────────────────────────┘│\n└───────────────────────────┬─────────────────────────────────┘\n                            │ JS ↔ Rust Bridge\n┌───────────────────────────▼─────────────────────────────────┐\n│          react-native-rustok-bridge                          │\n│          (uniffi-bindgen-react-native 0.31)                 │\n└───────────────────────────┬─────────────────────────────────┘\n                            │ FFI\n┌───────────────────────────▼─────────────────────────────────┐\n│                      Rust Workspace                          │\n│  ┌─────────────┐  ┌─────────────┐  ┌─────────────────────┐ │\n│  │ rustok-core │  │   txguard   │  │    rustok-api       │ │\n│  │             │  │             │  │                     │ │\n│  │ • keyring   │  │ • parser    │  │  Axum HTTP server   │ │\n│  │ • provider  │  │ • rules     │  │  /health            │ │\n│  │ • router    │  │ • simulator │  │  /check-address     │ │\n│  │ • send      │  │ • enrichment│  │  /decode            │ │\n│  │ • explorer  │  │             │  │                     │ │\n│  │ • explainer │  │ 8 security  │  │  Live:              │ │\n│  │ • convert   │  │ rules       │  │  api.rustok.uz      │ │\n│  └─────────────┘  └─────────────┘  └─────────────────────┘ │\n│  ┌─────────────┐  ┌─────────────┐  ┌─────────────────────┐ │\n│  │ rustok-cli  │  │ rustok-types│  │rustok-mobile-bindings│ │\n│  │             │  │             │  │                     │ │\n│  │  CLI binary │  │ Shared DTOs │  │  uniffi FFI exports │ │\n│  │  (decode,   │  │  (no crypto │  │  for iOS / Android  │ │\n│  │   analyze,  │  │   deps)     │  │                     │ │\n│  │   wallet,   │  │             │  │                     │ │\n│  │   send)     │  │             │  │                     │ │\n│  └─────────────┘  └─────────────┘  └─────────────────────┘ │\n└─────────────────────────────────────────────────────────────┘\n```\n\n---\n\n## Tech Stack\n\n| Layer | Technology |\n|-------|-----------|\n| **Mobile** | React Native 0.85.2, React 19.2.3, TypeScript 5.8 |\n| **Navigation** | React Navigation v7 (bottom-tabs, native-stack) |\n| **Styling** | NativeWind v4, TailwindCSS 3.4, design-token system |\n| **State** | Zustand 5, MMKV (persistent), React Native Keychain (secrets) |\n| **Animations** | Reanimated 4.3, React Native Worklets, Gesture Handler |\n| **Bridge** | uniffi-bindgen-react-native 0.31.0-2 |\n| **Language** | Rust (edition 2024) |\n| **EVM** | revm v36, alloy-evm v0.30 |\n| **Ethereum** | alloy-rs v1.8 (provider, signer, primitives, consensus) |\n| **Crypto** | BIP39 (m/44'/60'/0'/0/0), AES-256-GCM, Argon2id, secp256k1 |\n| **HTTP** | Axum 0.8, Tower HTTP (CORS, trace) |\n| **Async** | Tokio, Futures |\n| **Serialization** | Serde, Serde JSON |\n| **CLI** | clap v4 |\n| **Logging** | tracing, tracing-subscriber |\n\n---\n\n## Quick Start\n\n### Mobile App\n\n**Prerequisites:** Node.js ≥ 22.11, Android SDK (for Android) or Xcode + CocoaPods (for iOS).\n\n```bash\n# Install dependencies\ncd mobile && npm install\n\n# Start Metro bundler\nnpx react-native start --port 8081\n\n# Android (separate terminal)\ncd android && ./gradlew app:installDebug -PreactNativeDevServerPort=8081\n# Windows: .\\gradlew.bat app:installDebug -PreactNativeDevServerPort=8081\n\n# iOS (macOS only, separate terminal)\ncd ios && pod install && cd .. && npx react-native run-ios\n```\n\nFor physical Android devices:\n```bash\nadb reverse tcp:8081 tcp:8081\n```\n\n> **Detailed mobile docs:** See [`mobile/README.md`](mobile/README.md) for onboarding flow, bridge surface, DEV escape hatches, and Android/Windows specifics.\n\n### Rust Workspace\n\n```bash\n# Run all tests\ncargo test --workspace\n\n# Build CLI\ncargo build -p rustok --release\n\n# Run API server locally\ncargo run -p rustok-api\n```\n\n### CLI Examples\n\n#### Transaction Security Analysis\n\n```bash\n# Decode ERC-20 approve calldata\nrustok decode \\\n  --to 0xdAC17F958D2ee523a2206206994597C13D831ec7 \\\n  --data 0x095ea7b3000000000000000000000000000000000000000000000000000000000000dead00000000000000000000000000000000000000000000000000000000000f4240\n\n# Full security analysis (parse + rules + verdict)\n# Exit codes: 0=allow, 1=warn, 2=block\nrustok analyze \\\n  --to 0xdAC17F958D2ee523a2206206994597C13D831ec7 \\\n  --data 0x095ea7b3ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\n```\n\n#### Wallet Operations\n\n```bash\n# Generate a new encrypted wallet\nrustok wallet new --password \"your-secure-password\"\n\n# Check unified balance across Ethereum, Arbitrum, Base, Optimism, zkSync\nrustok wallet balance 0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045\n\n# Show wallet info from keystore file\nrustok wallet info --keystore 0xabc...def.json --password \"your-password\"\n\n# Send ETH (txguard security check mandatory, testnet by default)\nrustok wallet send --keystore wallet.json --password \"pwd\" --to 0xd8dA...6045 --amount 0.1\n```\n\n---\n\n## Security Rules (txguard)\n\n| Rule | Severity | Trigger |\n|------|----------|---------|\n| `unlimited_approval` | Warning | `approve(spender, type(uint256).max)` |\n| `set_approval_for_all` | Warning | `setApprovalForAll(operator, true)` |\n| `permit_to_unknown` | Danger | EIP-2612 permit to unknown spender |\n| `permit_unlimited` | Warning | Permit with `value == U256::MAX` |\n| `known_scam` | Forbidden | Address in scam database |\n| `unknown_function` | Warning | Unrecognized function selector |\n| `value_with_calldata` | Warning | ETH sent with contract call |\n| `send_to_contract` | Info | Transfer to contract address |\n\n---\n\n## Supported Chains\n\n| Chain | ID | Status |\n|-------|---:|--------|\n| Ethereum | 1 | Active |\n| Arbitrum One | 42161 | Active |\n| Base | 8453 | Active |\n| Optimism | 10 | Active |\n| zkSync Era | 324 | Active |\n| Sepolia | 11155111 | Testnet |\n\n---\n\n## txguard API\n\nPublic API for transaction security analysis. Live at `api.rustok.uz`.\n\n| Endpoint | Method | Description |\n|----------|--------|-------------|\n| `/health` | GET | Health check |\n| `/check-address` | POST | Address security check via GoPlus (malicious flag, risk level, risks) |\n| `/decode` | POST | Decode and analyze raw EVM transaction (action, risk score, findings) |\n\n```bash\n# Check address\ncurl -X POST https://api.rustok.uz/check-address \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"address\": \"0xdAC17F958D2ee523a2206206994597C13D831ec7\"}'\n\n# Decode transaction\ncurl -X POST https://api.rustok.uz/decode \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"to\": \"0xdAC17F958D2ee523a2206206994597C13D831ec7\", \"data\": \"0x095ea7b3000000000000000000000000000000000000000000000000000000000000dead00000000000000000000000000000000000000000000000000000000000f4240\"}'\n```\n\nDeployed via Docker + Caddy on 185.197.195.191 (`deploy/`).\n\n---\n\n## Tests\n\n```\n517 tests, 0 failures\n - Rust workspace: 231 tests (txguard, core, types, mobile-bindings)\n - Mobile (Jest):   286 tests (components, stores, hooks, screens)\n```\n\nPre-commit gates:\n```bash\n# Rust\ncargo fmt --all --check\ncargo clippy --workspace --all-targets -- -D warnings\ncargo test --workspace\n\n# Mobile\ncd mobile && npm run typecheck && npm run lint && npm run test\n```\n\n---\n\n## Project Layout\n\n```\nrustok/\n├── mobile/                          # React Native app (primary UI)\n│   ├── src/\n│   │   ├── screens/                 # Wallet, Activity, TxGuard, Settings, Onboarding\n│   │   ├── components/              # Design system primitives\n│   │   ├── navigation/              # AppShell, navigators\n│   │   ├── stores/                  # Zustand + MMKV state\n│   │   ├── hooks/                   # Selectors and logic\n│   │   ├── lib/                     # Bridge, formatting, explorers\n│   │   └── theme/                   # Design tokens\n│   ├── android/                     # Gradle project\n│   └── ios/                         # Xcode project\n│\n├── packages/\n│   └── react-native-rustok-bridge/  # uniffi JS ↔ Rust bridge package\n│\n├── crates/                          # Rust workspace\n│   ├── txguard/                     # Transaction security engine\n│   ├── core/                        # Wallet logic (keyring, provider, router, send)\n│   ├── types/                       # Shared DTOs\n│   ├── api/                         # Axum HTTP server\n│   ├── cli/                         # CLI binary\n│   └── rustok-mobile-bindings/      # uniffi FFI exports\n│\n├── deploy/                          # Docker + Caddy deployment\n└── docs/                            # Architecture, phase handoffs, incident reports\n```\n\n---\n\n## License\n\nRustok is dual-licensed:\n\n- **[AGPL-3.0-or-later](LICENSE)** — open source. Free for any use that complies with AGPL terms, including making source code of derivative works and network-accessible services available to users.\n- **[Commercial License](LICENSE-COMMERCIAL.md)** — available from the copyright holder for uses that cannot comply with AGPL-3.0 (e.g. closed-source Apple App Store or Google Play distribution, bundling into proprietary products).\n\nSee [`NOTICE.md`](NOTICE.md) for a summary of licensing, trademarks, and contribution terms.\n\n### Trademarks\n\n\"Rustok\" and \"txguard\" are trademarks of Temrjan Khasenov. Source code is AGPL-3.0, but the marks are not — see [`TRADEMARK.md`](TRADEMARK.md).\n\n### Visual assets\n\nLogos, icons, and brand imagery are **not** under AGPL-3.0. See [`ASSETS-LICENSE.md`](ASSETS-LICENSE.md).\n\n### Contributing\n\nContributions are accepted under the Developer Certificate of Origin (DCO). See [`CONTRIBUTING.md`](CONTRIBUTING.md).\n\nCopyright (c) 2025-2026 Temrjan Khasenov.\n",
  "bytes": 12137,
  "sha": "0f4bd8992904621881e77956956c6b25022d5546fbcf655adc8981958a7f0f32",
  "repo_slug": "temrjan/rustok",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_temrjan_rustok_wallet_a1205b32/readme"
}