Service Worker-based wallet implementation for browser environments.
This wallet uses a service worker as a backend to handle wallet logic,
providing secure key storage and transaction signing in web applications.
The service worker runs in a separate thread and can persist data between
browser sessions.
Example
// Create and initialize the service worker wallet constserviceWorker = awaitsetupServiceWorker("/service-worker.js"); constwallet = newServiceWorkerWallet(serviceWorker); awaitwallet.init({ privateKey:'your_private_key_hex', arkServerUrl:'https://ark.example.com' });
// Use like any other wallet constaddress = awaitwallet.getAddress(); constbalance = awaitwallet.getBalance();
Service Worker-based wallet implementation for browser environments.
This wallet uses a service worker as a backend to handle wallet logic, providing secure key storage and transaction signing in web applications. The service worker runs in a separate thread and can persist data between browser sessions.
Example