Sphere SDK

Identity, wallets, private communication, and peer-to-peer settlement for autonomous economic agents.

Stars
★ 5.4k
Last updated
20d ago v0.8.0
FARS reviewed
Nov 08, 2026
License
MIT
Primary language
TypeScript

At a glance

How it runs
Library / SDKCLI
Works with
Universal · cross-platform
Cost
Free, no paid service needed
Setup effort
Medium · a few setup steps
You'll need
TypeScript or JavaScript runtimenpmws for Node.js usageShell / CLINetwork access
Typical use
A browser-wallet or dApp team can combine localStorage or IndexedDB with ConnectClient / ConnectHost and the Sphere extension or popup flow.
Not a fit if
  • Teams that need fully self-custodied token inventory — the wallet-api backend holds it
  • Teams needing working mainnet or dev transfers now — v1 gateways fail with AGGREGATOR_ERROR
  • Projects wanting zero-config setup — you must supply a gateway API key and wallet-api deployment
Website
unicity.ai ↗ set on GitHub
Maintenance
Commits in the last 30 dayslast commit 2026-11-13latest release v0.8.0 (2026-05-29)
Source review
71/100 · Some gaps

What does this agent do, and when should you use it?

Sphere SDK is a modular TypeScript wallet SDK for the Unicity state transition network, with documented browser and Node.js implementations. Its Sphere entry point composes identity, payments, payment requests, market intents, Nostr direct messages, and NIP-29 group chat. Wallet keys remain on the client, while the wallet-api backend holds token inventory and receives engine-certified transfers through per-user mailboxes. Base providers supply storage, Nostr transport, and oracle configuration; payment functionality requires a second configuration layer added with createWalletApiProviders. The SDK supports HD addresses, replaceable payment transport ports, browser or file-backed persistence, and wallet-to-dApp communication, making it suitable for teams embedding economic identity and settlement in agents, services, dApps, or wallet interfaces.

An application starts with createBrowserProviders or createNodeProviders to construct storage, Nostr transport, and oracle configuration, then attaches the required wallet-api configuration with createWalletApiProviders before calling Sphere.init. The SDK derives identities and multiple addresses with BIP39/BIP32, registers or recovers nametags, and exposes a primary DIRECT:// address. sphere.payments lists assets and history, drains incoming mailbox transfers, self-mints testnet tokens, and executes send() through durable transfer intents; completed v2 CBOR token blobs are proof- and ownership-checked before entering the balance. sphere.payments.requests creates, pays, declines, and tracks requests with encrypted memos, while sphere.market exposes a signed intent bulletin board with semantic search and a live feed. sphere.communications sends and receives NIP-17 encrypted direct messages, and the optional sphere.groupChat module uses a separate NIP-29 relay for groups, invitations, messages, and moderation. Additional interfaces cover the Connect protocol, dynamic relay management, encrypted wallet export/import, optional CoinGecko prices, and crypto, currency, hashing, and Base58 utilities.

  1. A browser-wallet or dApp team can combine localStorage or IndexedDB with ConnectClient / ConnectHost and the Sphere extension or popup flow.
  2. A developer building autonomous trading agents can give each agent a locally held identity, resolve recipients through nametags or DIRECT:// addresses, and settle with sphere.payments.send().
  3. A Node.js service or batch application can use file-backed storage and a stable deviceId, explicitly call receive() to drain its mailbox, and resume unfinished transfers after restart.
  4. An application collecting payments can create requests through sphere.payments.requests, include encrypted memos, and react to pending, settling, paid, rejected, and expired states.
  5. A product requiring agent-to-agent communication can use NIP-17 private messages or enable NIP-29 groups with private invitations, unread counts, and administrator or moderator controls.
  6. A team testing Unicity v2 asset flows can self-mint on testnet/testnet2 and exercise multi-address wallets, transfer recovery, and mailbox delivery.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • npm install @unicitylabs/sphere-sdk
  • npm install -g @unicity-sphere/cli

How do you install or deploy this agent?

Install the SDK package:

npm install @unicitylabs/sphere-sdk

The documented Node.js setup also requires ws, although the source does not provide its exact installation command. The CLI is maintained as a separate package and can be installed when needed:

npm install -g @unicity-sphere/cli
sphere --help

Operational payments additionally require access to a v2 gateway, a wallet-api deployment, and the appropriate oracle API key. The published testnet2 key may be used in client-side test code; a mainnet key must remain secret in the deployment environment.

How do you use this agent?

Browser initialization has two required provider layers. This example creates the base providers, attaches wallet-api, initializes a wallet, and submits a transfer:

import { Sphere } from '@unicitylabs/sphere-sdk';
import { createBrowserProviders } from '@unicitylabs/sphere-sdk/impl/browser';
import { createWalletApiProviders } from '@unicitylabs/sphere-sdk/impl/shared/wallet-api';

const base = createBrowserProviders({
  network: 'testnet',
  oracle: { apiKey: 'sk_ddc3cfcc001e4a28ac3fad7407f99590' },
});

const providers = createWalletApiProviders(base, {
  baseUrl: 'https://wallet-api.unicity.network',
  network: 'testnet2',
  deviceId: 'my-stable-device-id',
});

const { sphere, created, generatedMnemonic } = await Sphere.init({
  ...providers,
  autoGenerate: true,
});

if (created && generatedMnemonic) {
  console.log('SAVE THIS RECOVERY PHRASE:', generatedMnemonic);
}

const result = await sphere.payments.send({
  recipient: '@alice',
  amount: '1000000',
  coinId: 'UCT',
  memo: 'hello',
});

console.log(result.status);
const { transfers } = await sphere.payments.receive();
console.log(transfers);
console.log(await sphere.payments.assets());

Amounts must be decimal strings rather than JavaScript numbers. The recipient must have a published identity containing a chain public key, or the call fails with INVALID_RECIPIENT. A result with status === 'completed' and deliveryPending === true is already certified on-chain; only mailbox delivery is deferred, so the UI must not report it as a payment failure. If send() throws CERTIFICATION_UNCONFIRMED, do not issue a fresh send() because the original intent may already be certified; the SDK resumes it automatically under the same transferId, while a new call could double-pay the recipient. For wallets holding real value, pass a user password to Sphere.init, Sphere.create, or Sphere.load instead of relying on the built-in default-key obfuscation.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

FARS trust-control audit

Verified present in source (3/3)
  • data-flow disclosure

What are this agent's strengths and limitations?

Pros
  • Durable server-side transfer intents resume under the same transferId, covering crashes and partially committed outcomes without intentionally creating a second spend.
  • Keys stay on the client while wallet-api handles inventory and mailbox delivery, and every incoming token is proof- and ownership-verified before it affects the balance.
  • One SDK combines payments, requests, signed market intents, NIP-17 direct messages, NIP-29 groups, multi-address wallets, and the Connect protocol.
  • Documented provider implementations cover browsers and Node.js, while the money-port contracts and paymentsV2Transport seam support custom hosts and offline test replacements.
  • The package includes practical supporting features such as strict amount parsing, encrypted import/export, dynamic relay management, and optional CoinGecko price data.
Limitations
  • Payments are not a purely client-side or self-custodied inventory design: the wallet-api backend holds token inventory, sessions, and recipient mailboxes.
  • Initialization requires both the base-provider layer and wallet-api layer, with network configuration in both places; omissions cause INVALID_CONFIG.
  • Mainnet and dev still target v1-era aggregators, so send and mint fail with AGGREGATOR_ERROR until those gateways move to v2.
  • CERTIFICATION_UNCONFIRMED requires specialized application handling and must never trigger a fresh send, or automatic recovery of the original intent may lead to a double payment.
  • There is no bundled default gateway API key; Node.js also requires ws, and operation depends on gateway, wallet-api, and Nostr relay availability.
  • Without a user-supplied password, the seed receives only built-in-key obfuscation at rest, which is unsuitable for a wallet holding real value.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Sphere SDK This agent 71 · Some gaps Library / SDKFree ★ 5.4k 20d ago TypeScript —
Deuz SDK 76 · Good Library / SDKFree + model costs ★ 504 8d ago TypeScript OpenAI API · Claude API
Excalibur (xcb) 71 · Some gaps — ★ 14 1mo ago Rust Claude Code
TrueForge 65 · Some gaps CLIFree + model costs ★ 6.7k today TypeScript OpenAI API · Claude API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
71/ 100 5-point scale 3.6 / 5
Trust 17/29
Reliability 11/14
Adaptability 14/18
Convention 14/18
Effectiveness 10/13
Verifiability 5/8
Why each dimension lost points
Trust17 / 29 · 2.9/5

The README distinguishes local keys, server-custodied token inventory, the wallet-api mailbox, and Nostr messaging, and makes a messaging-only wallet an explicit walletApi: 'none' choice. It also tells users to back up the mnemonic, keep a mainnet API key in the deployment environment, and avoid resending payments that may have committed. These support data-flow transparency and ordinary-use permission boundaries. Deductions: the source sample does not show the key-encryption implementation, key lifecycle, or authorization details; payments create on-chain and mailbox effects, but no cancellation or rollback mechanism is shown; attribution is limited to author and repository fields in package.json, while publisher identity remains unknown.

Reliability11 / 14 · 3.9/5

The documentation carefully distinguishes confirmed-but-pending delivery, possibly committed outcomes, and clean failures, and explains recovery and error handling. The CI file specifies type checks, builds, tests, and mutation testing on Node 22 and 24. Entry-point and package-export information also partly corroborates module boundaries. Deductions: this is static evidence, so the CI configuration does not establish that this revision passed; the README is incomplete in the packet, so full consistency and runtime behavior cannot be confirmed.

Adaptability14 / 18 · 3.9/5

The material covers browser and Node.js use, CLI guidance, dApp Connect, messaging-only wallets, and payment wallets, and describes network, device-ID, and composition constraints. Deductions: these are primarily SDK integration scenarios; the supplied material does not explain Agent-specific negotiation or delegated-permission configuration in detail. Trigger conditions and environment coverage are useful but incomplete.

Convention14 / 18 · 3.9/5

The README and quick starts provide install commands, browser and Node.js examples, a TypeScript declaration shim, migration guidance, and extensive known limitations; the MIT license text is clear. The package version, export subpaths, and publishing workflow are also documented. Deductions: no CHANGELOG is included in the packet, so the detailed migration notes do not establish a complete change history; CLAUDE.md mainly gives contributor and project workflow guidance, and maintenance ownership or support contacts are not clear.

Effectiveness10 / 13 · 3.8/5

Examples provide practical initialization, payment, receiving, and error-handling code, including guidance not to send a possibly committed payment again. Deductions: the documentation is long and repeats network and payment-state explanations, increasing integration effort; the supplied material does not quantify Agent automation benefits or operating costs.

Verifiability5 / 8 · 3.1/5

Key integration claims can be traced across the README, quick starts, package.json, entry-point exports, and CI configuration. The aggregator test file explains what testing against a real service is meant to verify beyond a fake. Deductions: static test code and workflow configuration are not execution results for this revision; several network, recovery, and security claims remain primarily documentary because the supplied source sample cannot independently verify them.

Risks and how to mitigate them
  • The documentation identifies the mainnet API key as a secret; do not put it in browser bundles or public examples. Mnemonics also need a reliable backup flow, including when initialization fails or a later launch loads an existing wallet.
  • A payment may already be committed on-chain while delivery is pending. Do not call send again; use pendingTransfers() and resumeNow() as documented.
  • Node.js requires version 22 or later and an additional ws install. The browser entry lacks type declarations, so strict TypeScript projects need to supply a shim.
Evidence confidence: Low Reviewed Nov 08, 2026 Reviewed revision ebd0b6312263 New commits since this review; the score may not cover them
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/sphere-sdk.svg)](https://followagents.com/en/agents/sphere-sdk)
<a href="https://followagents.com/en/agents/sphere-sdk"><img src="https://followagents.com/badge/sphere-sdk.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v0.8.0 v0.8.0 — UXF Inter-Wallet Transfer Protocol + Profile-layer hardening
    Release notes excerpt
    178 PRs promoted from integration/all-fixes to main. - Release PR: [#345](https://github.com/unicity-sphere/sphere-sdk/pull/345) - Tag points at: af41bea6fc36 - Period covered: ~4 months of accumulated profile-layer, UXF, recovery, and connectivity work since the previous release lineage (PRs #128–#130 → #303–#342). ⚠️ Breaking: UXF wire-shape default flip …
    View on GitHub ↗
  2. v0.2.4
    Release notes excerpt
    Bug Fixes - CLI process exit: Fix CLI commands hanging ~10s after completion due to lingering Nostr WebSocket handles - Instant split change token: Fix sender losing change token when process.exit() killed background proof collection before completion Changes - InstantSplitExecutor.submitBackgroundV5 now returns a trackable Promise<void> instead of fire-and-forget - PaymentsModule tracks background promises and exposes waitForPendingOperations() for callers to await completion - CLI send command awaits pending background operations before exiting …
    View on GitHub ↗

FAQ

Where are keys and tokens stored?
Private keys remain in client-side storage and do not leave the client. Token inventory is held by the wallet-api backend. Browser deployments can use localStorage or IndexedDB, while Node.js deployments can use file storage.
Does deliveryPending mean that payment failed?
No. When status === 'completed', the spend succeeded. deliveryPending === true means certification is complete but delivery to the recipient's wallet-api mailbox was deferred and will be retried.
Can an application retry after CERTIFICATION_UNCONFIRMED?
It must not create a new send(). The transfer may already be certified, and the SDK retains and resumes the original intent with the same transferId; sending again can pay the recipient twice.
Which documented networks currently support sending and self-minting?
testnet aliases the testnet2 v2 gateway at networkId 4. The documentation states that mainnet and dev still use v1-era aggregators, so their send and mint operations currently fail.
Does Nostr carry the payment itself?
No. Nostr handles nametags, NIP-17 direct messages, and NIP-29 group chat. Payments are certified by the v2 token engine and travel through wallet-api storage and mailbox infrastructure.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts