@arkade-os/sdk Documentation - v0.3.11
    Preparing search index...

    Class ServiceWorkerWallet

    Core wallet interface for Bitcoin transactions with Ark protocol support.

    This interface defines the contract that all wallet implementations must follow. It provides methods for address management, balance checking, virtual UTXO operations, and transaction management including sending, settling, and unrolling.

    Hierarchy (View Summary)

    Implements

    Index

    Properties

    contractRepository: ContractRepository
    identity: Identity
    serviceWorker: ServiceWorker
    walletRepository: WalletRepository

    Methods

    • Returns Promise<
          {
              walletInitialized: boolean;
              xOnlyPublicKey: Uint8Array<ArrayBufferLike>
              | undefined;
          },
      >

    • Simplified setup method that handles service worker registration, identity creation, and wallet initialization automatically.

      Parameters

      • options: ServiceWorkerWalletSetupOptions

      Returns Promise<ServiceWorkerWallet>

      // One-liner setup - handles everything automatically!
      const wallet = await ServiceWorkerWallet.setup({
      serviceWorkerPath: '/service-worker.js',
      arkServerUrl: 'https://mutinynet.arkade.sh'
      });

      // With custom identity
      const identity = SingleKey.fromHex('your_private_key_hex');
      const wallet = await ServiceWorkerWallet.setup({
      serviceWorkerPath: '/service-worker.js',
      arkServerUrl: 'https://mutinynet.arkade.sh',
      identity
      });