sphere-sdk: a modular TypeScript SDK for Unicity L3 wallet operations and decentralized messaging
sphere-sdk: a modular TypeScript SDK for Unicity L3 wallet operations and decentralized messaging
What it solves
Sphere SDK provides a modular TypeScript toolkit for interacting with the Unicity Layer 3 state transition network. It simplifies the complex process of managing wallets, executing certified token transfers, and integrating decentralized communication (Nostr/NIP-29) into applications, removing the need for developers to manually handle low-level chain operations or delivery protocols.
How it works
The SDK uses a layered provider model to separate core wallet state from delivery mechanisms. It first establishes a Base layer (storage, transport, and oracle) and then adds wallet-api rails (mailbox delivery and token storage). This architecture ensures that token transfers are certified on-chain by a token engine but delivered via a specific mailbox provider, separating the payment rail from the messaging rail (Nostr).
Who it’s for
It is designed for TypeScript developers building dApps, browser extensions, or Node.js applications that require L3 wallet functionality, P2P payments, and decentralized group messaging.
Highlights
- Engine-Certified Payments: Secure token transfers with self-healing coin selection and concurrent-send safety.
- Hybrid Communication: Integrates Nostr for DMs and nametags, and NIP-29 for relay-based group chats with moderation.
- HD Wallet Support: Implements BIP32/BIP44 for hierarchical deterministic address derivation and multi-address management.
- Modular Provider System: Swappable ports for storage and delivery, allowing developers to choose between server-side custody and own-custody models.
- Advanced Payment Tools: Includes support for P2P atomic swaps, payment requests with async tracking, and an experimental invoicing system.
Sources
- undefinedunicity-sphere/sphere-sdk