Sphere SDK is a TypeScript SDK for building autonomous economic agents that can transact peer-to-peer with perfect privacy and ultra-fast finality.
The SDK addresses the challenge of enabling agents to conduct commerce autonomously by providing wallet operations, payment settlement, and agent discovery mechanisms. It works through a two-layer provider model where a base layer supplies storage, transport, and oracle functionality, and a wallet-api transport layer handles the actual payment vertical. Agents gain identity through BIP39/BIP32 key derivation, manage funds through server-side durable intents that survive crashes, and discover counterparties via a signed intent bulletin board with semantic search capabilities. Communication happens through Nostr relays for messaging and nametag publishing, while payments flow exclusively through the wallet-api vertical for certified token transfers.
Developers should choose this tool if they are building applications where autonomous agents need to negotiate and settle transactions with each other. It suits projects requiring peer-to-peer commerce with privacy guarantees and fast finality, particularly those integrating with browser environments, Node.js backends, or command-line interfaces. The SDK supports multi-address HD derivation, payment requests with encrypted memos, and group chat via NIP-29 relays. Browser-based implementations use IndexedDB storage, while Node.js deployments can use file storage. The tool provides a dApp integration path through a Connect Protocol for wallet communication via browser extensions.
The project maintains comprehensive quick-start guides for each platform and a dedicated CLI package. Documentation covers the provider model architecture explicitly, indicating attention to helping developers understand the two-layer composition requirement. The README emphasizes that skipping wallet-api provider configuration fails loudly with a specific error, suggesting the maintainers prioritize preventing silent misconfigurations. The tool supports optional password encryption for keys and offers crash-safe resume semantics for payment operations under the same transfer identifier.