unicity-sphere/sphere-sdk
The SDK for autonomous economic agents. Give an agent an identity, a wallet, and the ability to find, negotiate with, and settle with other agents - peer-to-peer, with perfect privacy and ultra-fast finality
What it solves
Sphere SDK 提供一套模組化的 TypeScript 工具組,用於管理錢包與在 Unicity Layer 3 狀態轉換網路上執行操作。它簡化了 BIP39/BIP32 金鑰衍生、安全代幣轉移以及在 Unicity 生態系統內的去中心化通信的複雜性。
How it works
SDK 採用分層提供者模型,將核心錢包狀態與網路傳遞服務分離:
- Base Layer: 處理儲存、傳輸(透過 Nostr 進行訊息傳遞),以及 oracle(閘道/信任基礎)。
- Wallet-API Layer: 為透過 mailbox 系統與伺服器端代幣儲存的傳遞提供「鐵軌」。
付款由代幣引擎在鏈上認證,並透過專屬的 wallet‑api mailbox 交付,而非訊息層。它支援 HD(階層確定性)錢包,允許使用者從單一種子衍生多個位址。
Who it’s for
- Developers 建置需要與 Unicity L3 網路整合的 dApp。
- Wallet Integrators 開發瀏覽器擴充或 Node.js 應用以管理代幣。
- Bot Developers 在 Unicity 網路上建立自動付款或訊息代理。
Highlights
- Engine-Certified Payments: 具自我修復的幣選擇流程與並發發送安全的安全代幣轉移。
- Multi-Address Support: 完整的 BIP32/BIP44 HD 位址衍生與每個位址的名稱標籤註冊。
- Decentralized Communication: 整合 Nostr 基礎的 DM 與 NIP-29 中繼的群組訊息,具審核功能。
- Atomic Swaps: 透過託管與基於 DM 的協商進行 P2P 代幣交換。
- Flexible Custody: 同時支援伺服器端保管(透過 wallet‑api)與自行保管(外部儲存)。
- Connect Protocol: 內建 dApp 與錢包瀏覽器擴充之間的通信橋接。