How boiyee/sunmint works
SUNMINT is a solar-certificate system: simulated or real meters produce signed five-minute readings, the verifier checks readings and hourly claims, and certificates can be matched to company load and retired with receipts. The web app exposes producer, matching, tracing, proof, and attack-demo views. The README documents the contract capabilities, but contract implementation files are not present in the supplied tree; those nodes therefore point only to the enclosing contracts/ directory. Some runtime links not shown in excerpts are marked dashed and unverified.
Main entry points: api.ts API client · main.tsx Web routes · api.rs Verifier HTTP API · main.rs Claim processing
Components 25
Meter Simulation
- Demo meters
node/simulator/src/main.rs
Verification Service
- Verifier HTTP API
node/verifier/src/api.rs - Claim processing
node/verifier/src/main.rs - Attack scenarios
node/verifier/src/attacks.rs - Reading & certificate store
node/verifier/src/store.rs - Chain adapter
node/verifier/src/chain.rs
Certificates & Market
- Certificate contract
contracts - Market & retirement
contracts - Test USD token
contracts
Web Experience
- Web routes
web/src/main.tsx - API client
web/src/api.ts - Landing
web/src/pages/Landing.tsx - Daylight view
web/src/pages/Daylight.tsx - Rooftop view
web/src/pages/Rooftop.tsx - Load matching
web/src/pages/Match.tsx - Certificate trace
web/src/pages/Trace.tsx - Proof view
web/src/pages/Proof.tsx - Break it demo
web/src/pages/BreakIt.tsx - Shared UI
web/src/ui.tsx
Shared Verification
- Reading & claim checks
node/core/src/checks.rs - Merkle commitments
node/core/src/merkle.rs - Solar physics
node/core/src/solar.rs - Signed message types
node/core/src/lib.rs
Other components
- Meter operator
- Company
Connections 36
- Meter operator → Demo meters: simulates readings
README.md - Demo meters → Verifier HTTP API: submits readings
- Verifier HTTP API → Reading & claim checks: checks readings
node/verifier/src/api.rs - Verifier HTTP API → Reading & certificate store: records results
node/verifier/src/api.rs - Verifier HTTP API → Claim processing: forwards claims
node/verifier/src/api.rs - Verifier HTTP API → Attack scenarios: uses attacks
node/verifier/src/api.rs - Claim processing → Reading & claim checks: checks claims
node/verifier/src/main.rs - Claim processing → Reading & certificate store: loads readings
node/verifier/src/main.rs - Claim processing → Reading & certificate store: records rejection
node/verifier/src/main.rs - Claim processing → Chain adapter: requests mint
node/verifier/src/main.rs - Reading & claim checks → Merkle commitments: uses tree
node/core/src/checks.rs - Reading & claim checks → Solar physics: checks sun physics
node/core/src/checks.rs - Reading & claim checks → Signed message types: validates signatures
node/core/src/checks.rs - Chain adapter → Certificate contract: mints certificates
README.md - Company → Web routes: uses
README.md - Web routes → Landing: routes to
web/src/main.tsx - Web routes → Daylight view: routes to
web/src/main.tsx - Web routes → Rooftop view: routes to
web/src/main.tsx - Web routes → Load matching: routes to
web/src/main.tsx - Web routes → Certificate trace: routes to
web/src/main.tsx - Web routes → Proof view: routes to
web/src/main.tsx - Web routes → Break it demo: routes to
web/src/main.tsx - Landing → API client: fetches data
web/src/pages/Landing.tsx - Daylight view → API client: fetches data
web/src/pages/Daylight.tsx - Rooftop view → API client: fetches data
web/src/pages/Rooftop.tsx - Load matching → API client: requests match
web/src/pages/Match.tsx - Certificate trace → API client: fetches trace
web/src/pages/Trace.tsx - Proof view → API client: fetches proof
web/src/pages/Proof.tsx - Break it demo → API client: runs attacks
web/src/pages/BreakIt.tsx - API client → Verifier HTTP API: calls HTTP API
- Load matching → Market & retirement: matches load
README.md - Market & retirement → Certificate contract: retires certificates
README.md - Market & retirement → Test USD token: uses payment token
README.md - Company → Market & retirement: buys and retires
README.md - API client → Market & retirement: requests retirement
- Shared UI → API client: loads config
web/src/ui.tsx