# unicity-sphere/sphere-sdk-connect-example

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/unicity-sphere-sphere-sdk-connect-example).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

9,502 stars · 33 forks · TypeScript

## Links

- GitHub: https://github.com/unicity-sphere/sphere-sdk-connect-example
- awesome-repositories: https://awesome-repositories.com/repository/unicity-sphere-sphere-sdk-connect-example.md

## Description

This repository is a set of reference examples showing how to connect applications to a user's crypto wallet with the Sphere SDK. Browser and terminal apps talk to the wallet through iframe, popup, extension, or WebSocket sessions, so the app never handles private keys. The examples cover a browser app, a Node command-line client, a wallet-signature login backend, an autonomous bot with its own wallet, and a mock wallet host.

Reading wallet data such as identity, balances, tokens, and history runs as scoped, read-only queries after the user grants permissions. State-changing actions, including token transfers, payment requests, NFT minting, direct messages, and message signing, are submitted as intents that the wallet owner approves one by one. Interrupted sends can be replayed under the same intent identifier, so a transfer settles once instead of paying twice. The wallet also pushes events such as lock, unlock, identity changes, and incoming transfers, so interfaces update without polling.

Several examples cover the surrounding integration work. Wallet signature authentication has the wallet sign a server-issued challenge, then a backend recovers the public key and issues a session token. Handshake checks refuse outdated SDK versions or mismatched networks, and the examples turn those refusals into readable messages. A React hook manages connection state, sessions resume after a reload, and a locked wallet pauses the session instead of ending it. The mock wallet server and a public-tunnel workflow let developers test the full connection flow without real funds.

## Tags

### Security & Cryptography

- [Wallet Connection Interfaces](https://awesome-repositories.com/f/security-cryptography/cryptocurrency-wallets/wallet-management-interfaces/ethereum-wallet-managers/wallet-connection-interfaces.md) — Establishes an authenticated session between an app and a wallet via iframe or popup, declaring the network and app identity without exposing private keys. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example/blob/main/browser/CONNECT.md))
- [Approved Token Transfers](https://awesome-repositories.com/f/security-cryptography/approved-token-transfers.md) — Submits transfers, payment requests, and NFT mints as intents the wallet owner approves one by one, with safe replay so a send settles once.
- [Autonomous Wallet Bots](https://awesome-repositories.com/f/security-cryptography/autonomous-wallet-bots.md) — Boots a standalone bot with its own keys and funds that mints tokens and replies to direct messages with no human approval prompts. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example/blob/main/README.md))
- [Self-Custodied Wallet Bots](https://awesome-repositories.com/f/security-cryptography/self-custodied-wallet-bots.md) — Boots a standalone bot with its own keys and identity using the SDK directly, with no connection to any external wallet. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example/blob/main/bot/README.md))
- [Wallet-Approved Token Transfers](https://awesome-repositories.com/f/security-cryptography/wallet-approved-token-transfers.md) — Requests token transfers, NFT mints, and payment requests that the owner approves one by one, replaying interrupted sends so nothing is paid twice.
- [Wallet Action Intents](https://awesome-repositories.com/f/security-cryptography/wallet-integrations/wallet-action-intents.md) — Submits token sends, minting, direct messages, payment requests, and signing as intents the user must explicitly confirm inside the wallet. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example/blob/main/browser/CONNECT.md))
- [Wallet Signature Authentications](https://awesome-repositories.com/f/security-cryptography/wallet-signature-authentications.md) — Has the user's wallet sign a message, recovers the public key on a backend, and issues a session token proving identity. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example/blob/main/README.md))
- [Wallet Transaction Routing](https://awesome-repositories.com/f/security-cryptography/wallet-transaction-routing.md) — Routes transfer, mint, message, payment request, and signing requests to the user's wallet, which opens so the user approves each action. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example/blob/main/browser/README.md))
- [Scoped Permission Assignments](https://awesome-repositories.com/f/security-cryptography/access-assignment-analyzers/scoped-permission-assignments.md) — Maps each query and request to a permission scope granted at connect time and checks it on every call.
- [Server-Delegated Custody](https://awesome-repositories.com/f/security-cryptography/account-management/server-delegated-custody.md) — Splits storage so keys and identity stay local while token inventory, history and mailbox live on a required remote wallet server. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example/blob/main/bot/README.md))
- [View-Only Wallets](https://awesome-repositories.com/f/security-cryptography/cryptocurrency-wallets/view-only-wallets.md) — Reads wallet identity, balances, tokens, history, and nametag lookups through scoped read-only queries that need no per-call user approval. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example/blob/main/browser/README.md))
- [Session Handshakes](https://awesome-repositories.com/f/security-cryptography/cryptocurrency-wallets/wallet-management-interfaces/ethereum-wallet-managers/wallet-connection-interfaces/session-handshakes.md) — Opens a wallet transport, waits for readiness, and requests user approval that grants the app a defined set of permissions. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example/blob/main/CLAUDE.md))
- [Transport Selection Strategies](https://awesome-repositories.com/f/security-cryptography/cryptocurrency-wallets/wallet-management-interfaces/ethereum-wallet-managers/wallet-connection-interfaces/transport-selection-strategies.md) — Picks the connection method by priority, trying an embedding iframe first, then a browser extension, and otherwise a popup window. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example/blob/main/browser/README.md))
- [Compatibility Error Messages](https://awesome-repositories.com/f/security-cryptography/cryptocurrency-wallets/wallet-management-interfaces/ethereum-wallet-managers/wallet-connection-interfaces/wallet-lock-handling/compatibility-error-messages.md) — Converts handshake refusals for old SDK versions or wrong networks, plus locked-wallet and rejected-request errors, into clear messages and recovery guidance.
- [Read-Only Wallet Queries](https://awesome-repositories.com/f/security-cryptography/cryptocurrency-wallets/wallet-management-interfaces/wallet-balance-management/read-only-wallet-queries.md) — Reads identity, balances, fiat value, tokens, history, and nametag lookups through scoped read-only requests that need no user confirmation. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example/blob/main/browser/CONNECT.md))
- [Double-Spend Safeguards](https://awesome-repositories.com/f/security-cryptography/double-spend-safeguards.md) — Treats delivery-pending sends as successes and halts on possibly-committed outcomes instead of resending, so the same payment is never spent twice. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example/blob/main/bot/README.md))
- [Per-Action Transfer Approvals](https://awesome-repositories.com/f/security-cryptography/per-action-transfer-approvals.md) — Requires the wallet owner to approve every token send an external app requests, so funds never move without explicit consent. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example#readme))
- [Public Key Recovery](https://awesome-repositories.com/f/security-cryptography/public-key-authentication/public-key-retrieval/public-key-recovery.md) — Derives the signer's public key from a message and signature on the server, proving identity by cryptography instead of client claims. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example/tree/main/backend-auth))
- [Signer Identity Recoverers](https://awesome-repositories.com/f/security-cryptography/transaction-signers/signer-identity-recoverers.md) — Rebuilds a challenge on the backend and recovers the signer's public key from the signature to prove identity cryptographically.
- [Mock Wallet Testing](https://awesome-repositories.com/f/security-cryptography/wallet-integrations/mock-wallet-testing.md) — Ships a mock wallet host and a public-tunnel workflow so developers can test the whole connection flow without real funds.
- [Wallet Event Subscriptions](https://awesome-repositories.com/f/security-cryptography/wallet-integrations/wallet-event-subscriptions.md) — Pushes wallet lock, unlock, identity change, incoming transfer, and inventory events over the open channel so interfaces update without polling.
- [Wallet Intent Approvals](https://awesome-repositories.com/f/security-cryptography/wallet-intent-approvals.md) — Opens the wallet so the user approves each token send, mint, direct message, payment request, or message signature. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example/tree/main/browser))

### Testing & Quality Assurance

- [Mock Wallet Hosts](https://awesome-repositories.com/f/testing-quality-assurance/mock-wallet-hosts.md) — Runs a local mock wallet server answering queries and requests with realistic responses, so the connection flow can be tested without a live wallet. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example/tree/main/nodejs))

### Business & Productivity Software

- [Double-Payment Safeguards](https://awesome-repositories.com/f/business-productivity-software/double-payment-safeguards.md) — Treats delivery-pending sends as success and halts on possibly-committed outcomes instead of resending, which could pay twice. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example/tree/main/bot))
- [Idempotent Transfer Replays](https://awesome-repositories.com/f/business-productivity-software/idempotent-transfer-replays.md) — Replays an unfinished transfer under the same identifier and lists transfers still settling, avoiding a fresh spend of a different source token. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example/tree/main/bot))

### Data & Databases

- [NFT Minting](https://awesome-repositories.com/f/data-databases/token-supply-models/minting-mechanisms/nft-minting.md) — Builds NFT content with linked media, digest, and metadata, then asks the wallet to sign and mint it under a dedicated permission scope. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example/tree/main/browser))

### Networking & Communication

- [Connection Handshake Protocols](https://awesome-repositories.com/f/networking-communication/connection-handshake-protocols.md) — Starts every session with a handshake declaring network, protocol version, and app identity so the wallet can refuse mismatches before approval.
- [Multi-Protocol Transport Abstraction](https://awesome-repositories.com/f/networking-communication/network-transport-protocols/multi-protocol-transport-abstraction.md) — Puts one client protocol over interchangeable iframe, popup, extension, and WebSocket channels so identical application code runs in browsers and servers.

### Software Engineering & Architecture

- [Idempotency Key Response Replays](https://awesome-repositories.com/f/software-engineering-architecture/idempotency-mechanisms/operation-idempotency/idempotency-key-response-replays.md) — Resubmits unfinished transfers under the same intent identifier so interrupted sends settle once instead of spending a second token.
- [Idempotent Transfer Replays](https://awesome-repositories.com/f/software-engineering-architecture/idempotent-transfer-replays.md) — Replays an interrupted transfer under the same intent identifier and lists pending transfers, so a send settles once instead of paying twice. ([source](https://github.com/unicity-sphere/sphere-sdk-connect-example/blob/main/bot/README.md))
- [User Action Intents](https://awesome-repositories.com/f/software-engineering-architecture/intent-based-coordination/intent-to-action-handlers/user-action-intents.md) — Separates silent read-only queries from state-changing intents such as transfers and minting that need explicit per-action wallet approval.
