{"id":50857723,"url":"https://github.com/prof-faustus/nft-wallet-bsv","last_synced_at":"2026-06-14T19:30:58.919Z","repository":{"id":362063007,"uuid":"1257043893","full_name":"prof-faustus/nft-wallet-bsv","owner":"prof-faustus","description":"Stage 1: non-custodial BSV full-Script wallet + encrypted-NFT atomic swap (regtest). BSV only, no OP_RETURN.","archived":false,"fork":false,"pushed_at":"2026-06-02T12:38:13.000Z","size":151,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-02T13:14:51.441Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/prof-faustus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-02T10:06:55.000Z","updated_at":"2026-06-02T12:38:17.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/prof-faustus/nft-wallet-bsv","commit_stats":null,"previous_names":["prof-faustus/nft-wallet-bsv"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/prof-faustus/nft-wallet-bsv","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prof-faustus%2Fnft-wallet-bsv","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prof-faustus%2Fnft-wallet-bsv/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prof-faustus%2Fnft-wallet-bsv/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prof-faustus%2Fnft-wallet-bsv/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prof-faustus","download_url":"https://codeload.github.com/prof-faustus/nft-wallet-bsv/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prof-faustus%2Fnft-wallet-bsv/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34335688,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-14T02:00:07.365Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-14T19:30:58.189Z","updated_at":"2026-06-14T19:30:58.911Z","avatar_url":"https://github.com/prof-faustus.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# nft-wallet-bsv — Stage 1 Architecture (Encrypted-NFT Transfer Wallet, BSV)\n\n**Status:** Architecture specification only. This repository contains **no application\nsource code**. It is the design that an implementer (Claude Code) builds from.\n\n**Chain:** Bitcoin SV (**BSV**) only. Never BTC. See `CLAUDE.md` §1.\n\n**Hard prohibitions (absolute, CI-enforced):**\n\n- **No BTC.** No BTC libraries, network parameters, address formats, or assumptions.\n  BSV and BTC share no codebase here. Any BTC dependency is a build failure.\n- **No `OP_RETURN`.** Anywhere. In any locking or unlocking script. Data is carried\n  by push-drop in a locking script or by a push in an unlocking script — never\n  `OP_RETURN`. A static scanner rejects any script containing opcode `0x6a`.\n- **BSVM and Rúnar are available.** They are usable primitives in this project, not\n  excluded. The only hard exclusion is `OP_RETURN` (above). The project's academic papers\n  use BSVM and Rúnar; their constructions may be drawn on, minus any `OP_RETURN` path.\n- **TEE is an open decision, not a prohibition.** The current design does not *require* a\n  device TEE — its baseline is honest-host execution plus software key custody, labelled as\n  such. Whether/when a TEE is adopted, and whether \"T\" means TEE, is an open decision\n  (`docs/07`, OD-1).\n\n---\n\n## 1. What this system is\n\nA **Windows desktop application** that is a non-custodial, full-Script-capable **BSV\nwallet** which additionally holds and transfers a **tokenised object** (\"the NFT\").\n\nTwo instances of the same application interact:\n\n- **Alice** holds the NFT.\n- **Bob** wants it. Bob connects to Alice, they **chat**, they agree a price, and the\n  NFT is exchanged for BSV in a **single atomic transaction**.\n\nThe application can run against **regtest** (local, primary for the prototype and the\ntest suite), **testnet**, or **mainnet**. All three are supported; the prototype is\ndemonstrated and exercised on regtest.\n\n## 2. What Stage 1 delivers (and what it deliberately does not)\n\nStage 1 is the **transport and settlement plumbing**, end to end and exhaustively tested:\n\n- Pairing and an authenticated peer-to-peer channel between two app instances.\n- Chat, and price negotiation carried as signed structured messages.\n- Off-chain delivery of the NFT payload file, hash-bound to the on-chain token.\n- An **atomic swap**: NFT-for-BSV in one transaction, co-signed, all-or-nothing.\n- On-chain **transfer of control** (the token UTXO moves from Alice's key to Bob's).\n- A **cooperative deletion attestation** from Alice after settlement.\n\nStage 1 **does not** provide, and **does not claim**:\n\n- **Real payload confidentiality / crypto-shredding.** Encryption is a placeholder in\n  Stage 1 and is the subject of Stage 2. Alice can technically retain a usable copy of\n  the payload in Stage 1. This is stated, not hidden. See `docs/04`.\n- **Verified deletion of Alice's local copy.** Only a signed *claim* of deletion. See\n  `docs/04` for why true verifiable deletion needs Stage 2 (crypto-shred) or the\n  T-element (TEE).\n- **Script-enforced token continuity.** Stage 1 enforces token identity by wallet +\n  indexer convention. The `OP_PUSH_TX` covenant that makes continuity Script-enforced\n  (no `OP_RETURN`) is specified as a hardening — see `docs/02`\n  §6 — and is an open decision for whether to pull into Stage 1.\n\n## 2.5 What Stage 2 adds — BUILT (see `docs/08`, `TESTING.md`)\n\nStage 2 is implemented, exhaustively tested, and CI-green (incl. a live SV Node job):\n\n- **Real payload encryption + crypto-shredding**, six selectable schemes\n  (`internal/shred`): `ecdh-singleuse`, `key-surrender`, `reencrypt`, `tee-attested`\n  (a simple software stand-in), `threshold` — a **dealerless threshold ECDSA** key\n  generation/sharing (`internal/threshold`, Shamir over secp256k1 N, reconstruct-to-use) —\n  and **`tee-enclave`**, the **T-element**: an attested secure-enclave release using the\n  project's `tee-sim` wire format (`internal/tee`), fail-closed verifier, interop-proven\n  against the real `tee-sim` binary. Cooperative shred is a CLAIM, never \"verified deletion\";\n  the enclave path is a SIMULATION (self-generated root), not hardware.\n- **Script-enforced token continuity — the `OP_PUSH_TX` covenant (OD-3), built**\n  (`internal/covenant`). A spend must reproduce a successor token output with identical\n  identity + value; stripping/mutating is impossible in Script. No `OP_RETURN`. Proven\n  in the BSV interpreter (3000-iteration sweep + every tampering vector) **and on a real\n  SV Node** (faithful mint+swap accepted, strip rejected).\n- **A menu-driven exchange** (`internal/sidecar` `/v2`, native WPF shell in `apps/shell`):\n  the user chooses every option (scheme, continuity, all amounts) — no assistant-selected\n  defaults; a missing required value is an error. Bots/simulation are test-only.\n\n## 3. Deferred to later stages (slots are defined now)\n\n| Item | Stage | Status / Defined in |\n|---|---|---|\n| Real payload encryption + crypto-shredding | 2 | ✅ **built** — `internal/shred`, `docs/08` |\n| Dealerless threshold ECDSA custody | 2 | ✅ **built** — `internal/threshold`, `docs/08` |\n| Script-enforced token continuity (`OP_PUSH_TX` covenant) | 2 (OD-3) | ✅ **built** — `internal/covenant`, `docs/08` §8.4 |\n| The **T**-element (read as **TEE**; see `docs/07`) — attested execution + attested wipe | 2 (sim) / 2+ (hardware) | ✅ **attested enclave built** — `tee-enclave` scheme via `internal/tee`, wire-compatible with `Property/tee-sim` (KAT-proven); a SIMULATION (self-generated root). Genuine hardware TEE (verified vendor root) drops into the same verifier — `docs/04` §6, `docs/07` |\n| Full two-tier discovery network (Bitcoin-style + Bitmessage-style) | built | ✅ **built** — Tier A `internal/discovery`, Tier B `internal/relay`; the secure channel runs over it (`docs/03` §3.8) |\n\n## 4. Document map\n\nRead in order. Each document is self-contained for its scope.\n\n| File | Contents |\n|---|---|\n| `CLAUDE.md` | Operating rules for the implementer. The non-negotiable gates. Read first. |\n| `docs/00-scope-and-stages.md` | Precise scope, the Stage 1/2/T boundary, definitions. |\n| `docs/01-system-architecture.md` | Components, process model, technology stack, persistence, the Windows-app shape. |\n| `docs/02-nft-and-transaction-model.md` | The non-`OP_RETURN` token; push-drop construction; locking/unlocking templates; payload binding; the atomic-swap transaction; the optional continuity covenant. |\n| `docs/03-exchange-protocol.md` | Pairing, secure channel, chat, negotiation, delivery, co-signing, broadcast, attestation. Wire messages, state machine, timeouts, aborts. |\n| `docs/04-deletion-and-trust-model.md` | The honest deletion analysis. Trust register. The T (TEE) slot. The crypto-shred hook. Threats. |\n| `docs/05-test-plan-and-regtest-harness.md` | The regtest harness, the scenario matrix (happy path + every abort/fault), property tests, fault injection, the CI gates. |\n| `docs/06-implementation-workstreams.md` | The ordered build plan, each with a Definition of Done, plus the documentation/comment standard. |\n| `docs/07-assumptions-and-open-decisions.md` | Every assumption, classified. Every open decision awaiting the project owner. What is NOT guaranteed. |\n\n## 5. Provenance of the design\n\nGrounded in this project's own documents:\n\n- Non-`OP_RETURN` data carriers (push-drop prefix; unlocking-script push) — from the\n  project's *BSVM Online Appendix 2, \"Script-Embedded DA.\"* The data-carrier technique is\n  plain Script; BSVM and Rúnar remain available where they would strengthen it.\n- Funding → 2-of-2 multisig with a pre-signed settlement template; timeout redirection\n  (Path T); fair-play locking scripts as the no-TTP enforcement; TTP arbitration as a\n  composable add-on — from *Fair_Play_Transactions*.\n- Conjunctive settlement predicate using only `OP_CHECKSIG`; pre-signed recovery\n  transactions rather than script-level time-locks where applicable — from\n  *strict_provable_fairness*.\n- Technology stack, two-tier networking, wallet-as-protocol-agent, API surface, and the\n  workstream structure — from `formal-architecture-v1.docx` (the In-Between deliverable).\n\nBSV infrastructure facts used here were verified against current BSV documentation\n(SV Node and Teranode; regtest/testnet/mainnet; ARC broadcaster; BSV SDKs), not assumed\nfrom BTC tooling.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprof-faustus%2Fnft-wallet-bsv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprof-faustus%2Fnft-wallet-bsv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprof-faustus%2Fnft-wallet-bsv/lists"}