Kastle
  • Kastle Wallet Documentation
    • Architecture
    • Kastle Wallet Derivation Path
    • How to Integrate
      • Kastle Wallet API
      • Kastle SDK
    • EVM compatible
    • Bug Report
  • 🔗Contact Us
    • Website
    • Email
    • Telegram
    • X
    • Medium
Powered by GitBook
On this page
  1. Kastle Wallet Documentation

Architecture

Kastle is built with modern tools to ensure performance, security, and extensibility:

  • wxt: A framework for building browser extensions with TypeScript, simplifying Chrome API integration.

  • React: A component-based UI library for creating responsive, dynamic interfaces.

  • Kaspa WASM: WebAssembly bindings for Kaspa’s core logic, enabling fast blockchain interactions (key generation, transaction signing) client-side.

  • TypeScript: Type-safe codebase for reduced runtime errors.

  • Vite: Bundling and development server for rapid iteration.

Components

  1. Background Script (Service Worker)

    • Handles wallet initialization, key management.

    • Listens for API requests from websites and forwards them to the UI for user approval.

  2. Content Script

    • Injects a window.kastle object into websites to enable dApp interactions.

    • Relays messages between websites and the background script.

  3. UI Layer (React)

    • Popup: Quick access to balance, send/receive buttons, and network settings.

    • Options Page: Manage seed phrases, view addresses, and configure security.

    • Approval Dialogs: User prompts for transaction signing or dApp connections.

  4. Kaspa WASM Module

    • Compiled Rust code for address derivation, and transaction signing.

  5. Encrypted Storage

    • Securely stores private keys and wallet metadata using Chrome’s chrome.storage.local API.

PreviousKastle Wallet DocumentationNextKastle Wallet Derivation Path

Last updated 3 months ago