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

    Class ServiceWorkerWallet

    Core wallet interface for Bitcoin transactions with Arkade protocol support.

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

    IReadonlyWallet

    Hierarchy (View Summary)

    Implements

    Index

    Properties

    contractRepository: ContractRepository
    identity: Identity

    Signing identity associated with the wallet.

    serviceWorker: ServiceWorker
    walletRepository: WalletRepository

    Accessors

    Methods

    • Return service-worker wallet status, including connectivity and sync state.

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

      Current service-worker wallet status payload including walletInitalized and xOnlyPublicKey

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

      Parameters

      • options: ServiceWorkerWalletSetupOptions

      Returns Promise<ServiceWorkerWallet>

      const wallet = await ServiceWorkerWallet.setup({
      serviceWorkerPath: '/service-worker.js',
      arkServerUrl: 'https://arkade.computer',
      identity: MnemonicIdentity.fromMnemonic('abandon abandon...')
      });