Skip to content

Latest commit

 

History

History
118 lines (81 loc) · 4.76 KB

File metadata and controls

118 lines (81 loc) · 4.76 KB

GhostLink

Private Relationship Protocol for Sui-native invisible social graph infrastructure.

GhostLink demonstrates relationship objects, hidden groups, capability-based access, ZK membership proofs, realtime activity, and a Sui Move protocol module.

Stack

  • apps/web: Vite, React, TypeScript, React Router, Zustand, TanStack Query, React Flow, Framer Motion, Sui dApp Kit
  • apps/server: Bun, Hono, Drizzle ORM, SQLite, Zod, SSE, Sui TS SDK relay service
  • packages/shared: shared API and domain types
  • contracts/ghostlink: Sui Move module for relationship, capability, hidden group, group member, and membership proof objects

Local Development

bun install
bun run seed
bun run dev:server
bun run dev:web

Default URLs:

  • Web: http://localhost:5173
  • API: http://localhost:3000
  • SSE: http://localhost:3000/api/events/stream

Environment

Copy .env.example to .env for the server or set variables directly.

PORT=3000
DATABASE_URL=./data/app.db
SUI_NETWORK=testnet
SUI_PACKAGE_ID=0xcaeef4140d37e57d1e7e51fb2e49f833fed5412d89d194062709a086e096b325
SUI_RELAYER_PRIVATE_KEY=suiprivkey...
SUI_CLI_PATH=sui
PROOF_SIGNING_SECRET=change-me-for-production
DEMO_MODE=true

Frontend:

VITE_API_BASE_URL=http://localhost:3000
VITE_SUI_NETWORK=testnet

MVP Demo Flow

  1. Create or accept a trusted relationship.
  2. Inspect relationship capabilities and private graph edges.
  3. Create a hidden group and invite members.
  4. Generate a ZK membership proof.
  5. Verify the proof and unlock restricted demo content.
  6. Review Sui object references emitted by the simulated relayer.

Sui Overflow 2026 Materials

Hackathon submission copy, pitch scripts, judge Q&A, demo script, video shot list, and final checklist are in docs/hackathon/README.md.

Relayer Modes

DEMO_MODE=true keeps the app fully local and emits deterministic demo Sui object references.

For testnet writes:

  1. Publish contracts/ghostlink.
  2. Set DEMO_MODE=false.
  3. Set SUI_PACKAGE_ID to 0xcaeef4140d37e57d1e7e51fb2e49f833fed5412d89d194062709a086e096b325.
  4. Optionally set SUI_RELAYER_PRIVATE_KEY to a Sui suiprivkey... Ed25519 key with gas. If omitted, the API relays through the local sui CLI.

See docs/testnet-deployment.md for the full publish checklist. In non-demo mode the API fails fast when the package id or relayer key is missing.

In testnet mode, the server calls:

  • ghostlink::protocol::record_relationship
  • ghostlink::protocol::record_hidden_group
  • ghostlink::protocol::record_membership_proof

Proofs use ghostlink-merkle-v1: each hidden group member is represented by a persisted salted commitment, the group root is a versioned Merkle root, and verification checks the Merkle path, public signals, nullifier uniqueness, expiry, and verifier attestation via PROOF_SIGNING_SECRET. The witness secret is generated and stored client-side, not derived by the server. The proof reveals only the group hash/root/nullifier and does not reveal the wallet address, member list, or relationship graph.

The API surface is SNARK-ready. circuits/membership.circom defines the replacement membership circuit with the same public signal shape.

项目简介(中文)

GhostLink 是基于 Sui 的隐私关系协议,构建不可见社交图基础设施。支持隐私关系对象、隐藏群组、基于能力的访问控制、ZK 成员资格证明、实时活动流以及完整的 Move 协议模块。前端提供 React 界面,后端使用 Bun + Hono 实现关系/群组/证明的完整 CRUD 和 SSE 实时推送。

核心功能:创建信任关系 → 查看关系能力 → 建立隐藏群组 → 生成 ZK 证明 → 验证并解锁受限内容。

Reviewer Flow / 评委操作路径

  1. 打开 Web 前端,创建或接受一个信任关系
  2. 查看关系能力和隐私社交图边(关系类型、强度、状态)
  3. 创建隐藏群组并邀请成员加入
  4. 生成 ZK 成员资格证明(Merkle 证明),验证后解锁受限 Demo 内容

部署信息

组件 地址
Package ID 0xcaeef4140d37e57d1e7e51fb2e49f833fed5412d89d194062709a086e096b325
Web 前端 http://localhost:5173(本地)
API http://localhost:3000(本地)
SSE 实时流 http://localhost:3000/api/events/stream
数据库 SQLite (Drizzle ORM)

链上交易验证

该项目使用以下真实 Sui Testnet 交易进行验证:

交易 Digest 状态
SUI Transfer FrZVaDnCULPp6FW8rWJGM2MHfN7YJkxkzFoXYYMwCpSv ✅ Success (查看)
SUI Transfer 3RrvRuoe9V5TiSskBDktBhU8YatPUwGhihur5U1tvzF2 ✅ Success (查看)