{"id":50500665,"url":"https://github.com/prof-faustus/anchorchain","last_synced_at":"2026-06-02T11:02:21.904Z","repository":{"id":361592093,"uuid":"1254976532","full_name":"prof-faustus/anchorchain","owner":"prof-faustus","description":"AnchorChain: immutable referencing of AI memory states through Bitcoin (BSV) blockchain-indexed volumetric data linking, with file linking and selective disclosure, an AI credit system, and a hardened metering authority.","archived":false,"fork":false,"pushed_at":"2026-05-31T11:29:01.000Z","size":170,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-31T12:16:23.607Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","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":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/SECURITY.md","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-05-31T08:34:03.000Z","updated_at":"2026-05-31T11:28:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/prof-faustus/anchorchain","commit_stats":null,"previous_names":["prof-faustus/anchorchain"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/prof-faustus/anchorchain","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prof-faustus%2Fanchorchain","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prof-faustus%2Fanchorchain/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prof-faustus%2Fanchorchain/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prof-faustus%2Fanchorchain/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/prof-faustus","download_url":"https://codeload.github.com/prof-faustus/anchorchain/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/prof-faustus%2Fanchorchain/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33818568,"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-02T02:00:07.132Z","response_time":109,"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-02T11:02:21.228Z","updated_at":"2026-06-02T11:02:21.894Z","avatar_url":"https://github.com/prof-faustus.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# AnchorChain\n\nImmutable referencing of AI memory states through Bitcoin (BSV) blockchain-indexed\nvolumetric data linking — with file linking and selective disclosure, an AI credit\nsystem bound to the same chain, and a hardened metering authority.\n\nAnchorChain commits AI memory atoms (and files) as Merkle leaves, anchors each\nbatch's root in a BSV transaction (post-Genesis OP_RETURN data carrier), and lets\nanyone verify, header-only (SPV), that a remembered item existed, unaltered, at a\ngiven time — terminating in the validated BSV block-header chain, the trust root.\n\n## Inclusion proofs: what each reveals\n\nThere are **two** inclusion-proof forms, and **neither is zero-knowledge**:\n\n- **plain** — a Merkle inclusion proof: tamper-evident inclusion that **reveals**\n  the leaf and its sibling path.\n- **shard** — proof-sharding selective disclosure (patents WO 2022/100946,\n  WO 2025/119666): discloses only the queried lower portion plus public\n  proof-assistance labels, hiding the rest **by structure**. This is selective\n  disclosure, **not** zero-knowledge — it reveals the disclosed portion and the\n  public labels.\n\nThere is no implemented path that hides the identity of a memory leaf while proving\nits inclusion. If you need that, it is future work, not a feature here.\n\n## Where zero-knowledge actually appears\n\nZero-knowledge in AnchorChain is confined to **confidential amounts** in the credit\nand settlement layers, via Pedersen commitments built from scratch on the BSV SDK's\nsecp256k1:\n\n- a **range proof** in two forms — a linear sigma-protocol (bit decomposition +\n  per-bit OR) and a genuine **Bulletproof** (inner-product argument) whose size is\n  **logarithmic** in the bit-width (at 64 bits: 16 group elements vs the linear\n  proof's 192 — see [BENCHMARKS.md](BENCHMARKS.md));\n- a **membership proof** (one-out-of-many) — a committed value is in a public set\n  without revealing which; also used for set-obfuscated metadata;\n- **homomorphic conservation** — the books balance without revealing any amount.\n\n**Honest labelling.** These are sound under discrete log in the random-oracle model,\nwith **no trusted setup** and **no post-quantum claim**. The Bulletproof is a real\nBulletproof; the rest are sigma-protocols. There is **no zk-STARK** — a sound one\ncannot be built honestly from scratch here, so it is not claimed (see\n[docs/SECURITY.md](docs/SECURITY.md)).\n\n## What it secures, and what it does not\n\nAnchorChain secures the **integrity of what was remembered** — existence,\nintegrity, identity, and time of a committed memory/file. It does **not** secure\nmodel behaviour, data poisoning, or prompt injection. Key custody is **Shamir\nreconstruction**, not threshold ECDSA: the key is reassembled to sign, then\ndiscarded. A separate **threshold Schnorr** mode signs *without* reconstructing the\nkey (sound for Schnorr, explicitly not threshold ECDSA). See\n[docs/SECURITY.md](docs/SECURITY.md).\n\n## Using it\n\n`AnchorChainService` drives the whole workflow — append a memory → a batch closes →\nanchor it in an OP_RETURN transaction → confirm it in a block → verify inclusion\nheader-only with the correct two-tree (batch + block) SPV proof → recall it\ncross-agent. The durable `proofstore` `FileBackend` and the `memstore`/`credit`\nsnapshots persist state across restarts. The entire public surface is re-exported\nfrom `@anchorchain/api`.\n\n## Packages\n\nBuilt bottom-up; each layer terminates its verification in the one below, and\nultimately in the header chain.\n\n| layer | packages |\n| --- | --- |\n| chain | `bsv` (hash, secp256k1, ECDSA, script, tx, header chain, OP_RETURN carrier, node client) |\n| commit | `hashing`, `schema`, `merkle`, `shard` |\n| anchor | `memstore`, `anchor`, `file` |\n| verify | `proofentity`, `proofstore`, `provenance` |\n| confidential | `privacy` (Pedersen + sigma-protocol ZK) |\n| authority | `custody`, `identity` |\n| metering | `credit`, `settlement` |\n| surface | `api`, `cli`, `bench` |\n\n## Build and verify\n\n```\nnpm ci\nnpm run build        # strict tsc -b across all packages\nnpm run lint         # format check + BSV-only / no-tool-identity scan\nnpm test             # full unit suite\nnpm run selftest     # end-to-end exercise of every layer\nnpm run reproduce    # regenerate + verify all deterministic vectors and studies\nnpm run bench        # live micro-benchmarks (host-dependent timings, exact sizes)\n```\n\nBSV is the entire technical universe, post-Genesis. The sole chain/crypto\ndependency is the BSV SDK. Every number comes from `bench`/`reproduce` at run time\non the host that produced it; no figure is fabricated, and any on-chain fixture used\nin a test is genuine.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprof-faustus%2Fanchorchain","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprof-faustus%2Fanchorchain","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprof-faustus%2Fanchorchain/lists"}