Uminoyou on Nostr: Don’t miss this release!! ...
Don’t miss this release!!
quoting nevent1q…tfehTo make WASM happen, we’ve made major improvements across the SDK.
⚠️ Warning: we’re about to go technical ⚠️
WASM-Compatible SDK Core
We updated the 𝚜𝚍𝚔-𝚌𝚘𝚖𝚖𝚘𝚗 crate to work in WASM environments by:
→ Integrating a WASM-compatible gRPC client using 𝚝𝚘𝚗𝚒𝚌_𝚠𝚎𝚋_𝚠𝚊𝚜𝚖_𝚌𝚕𝚒𝚎𝚗𝚝
→ Implementing custom DNS resolution for WASM
→ Refactoring the internal REST client to remove non-WASM-compatible dependencies
→ Introducing a new 𝚜𝚍𝚔-𝚖𝚊𝚌𝚛𝚘𝚜 crate for shared macro support across platforms
New WASM-Specific Crate
We added a dedicated WASM interface using 𝚠𝚊𝚜𝚖-𝚋𝚒𝚗𝚍𝚐𝚎𝚗, with custom type and callback handling to provide a smooth developer experience.
Flexible SDK Customization
The new 𝙻𝚒𝚚𝚞𝚒𝚍𝚂𝚍𝚔𝙱𝚞𝚒𝚕𝚍𝚎𝚛 makes it easy to configure SDK components:
→ Includes platform-specific filesystem abstractions
→ Supports persistent storage in both Web and Node.js environments
SQLite and Cache Handling
Since traditional databases are challenging in WASM, we:
→ Use an adapted in-memory SQLite setup via 𝚛𝚞𝚜𝚚𝚕𝚒𝚝𝚎
→ Added a custom persistent watcher to handle state
Background Tasks & System Adaptations
We implemented WASM-friendly alternatives for:
→ Background task spawning
→ Interval management
→ Accessing system time
Alternative Blockchain Data Sources
Electrum isn’t viable in-browser, so we:
→ Integrated support for 𝚆𝚊𝚝𝚎𝚛𝚏𝚊𝚕𝚕𝚜 as a lightweight blockchain data source
WASM-Ready Boltz Integration
→ We refactored the Boltz swap client to be fully compatible with WASM environments.
gRPC-Web Proxy Support
All gRPC-based services (e.g., Breez Server and real-time sync):
→ Now support 𝚐𝚁𝙿𝙲-𝚆𝚎𝚋 proxies
→ Enabling full connectivity from browser environments