Trust-State Layer
ARCHITECTURE DIRECTIONSafeGate maps invoice, payment, backend verification, receipt, evidence, public verify, access, freshness, integrity, and review states.
V12 documents SafeGate’s longer-term trust-state, privacy, and Web3 architecture direction. It builds on the controlled Pi Testnet payment-spine pass, the V9.1 safe negative backend validation pass, and the completed V9.1 public review sync.
SafeGate does not process payments. SafeGate verifies what happened after payment.
Pi-first, not Pi-only.
| Area | Status |
|---|---|
| Controlled Pi Testnet Payment Spine | PASSED |
| V9.1 Safe Negative Backend Validation | PASSED · 18 / 18 |
| V9.1 Public Review Sync | COMPLETE |
| V12 Trust-State / Privacy / Web3 Direction | DOCUMENTED DIRECTION |
| Complete Privacy Protocol | NOT CLAIMED |
| Production Readiness | NOT CLAIMED |
| Formal Third-Party Audit | NOT CLAIMED |
| All Chains Integrated | NOT CLAIMED |
SafeGate maps invoice, payment, backend verification, receipt, evidence, public verify, access, freshness, integrity, and review states.
Public verify should confirm outcome without exposing raw paymentId, txid, wallet data, customer data, secrets, or raw API responses.
Current evidence is Pi Testnet / Sandbox oriented. Long-term architecture can remain chain-agnostic through adapters.
SafeGate treats payment as a trigger, not the final product.
The product is a verifiable post-payment trust state: what was verified, when it was verified, what receipt/evidence exists, whether public verify is safe, and whether access is active, expired, revoked, disputed, stale, or unavailable.
| Trust State | Meaning |
|---|---|
| INVOICE_CREATED | Invoice exists; access should still be locked. |
| PAYMENT_PENDING | Payment flow started but backend verification is not final. |
| PAYMENT_VERIFIED_TESTNET | Controlled Testnet payment verification state reached. |
| RECEIPT_CREATED | Receipt created after verified state. |
| EVIDENCE_CREATED | Evidence created after verified state. |
| PUBLIC_VERIFY_AVAILABLE | Minimum-disclosure public verification is available. |
| ACCESS_UNLOCKED_BY_BACKEND_VERIFIED_RECEIPT | Access unlock follows backend-verified receipt. |
| ACCESS_EXPIRED | Access is no longer active. |
| ACCESS_REVOKED | Access was revoked. |
| ACCESS_DISPUTED | Record is under dispute. |
| REVIEW_REQUIRED | Ambiguous or unsafe state requires review. |
| STALE | Public verify result may be old or no longer current. |
| UNAVAILABLE | Backend or verify state is unavailable. |
No receipt, no evidence, and no access unlock before backend-verified payment state.
Frontend callback alone must never unlock access. Unknown, missing, ambiguous, duplicate, replayed, mismatched, expired, failed, stale, or unavailable states should fail secure.
{
"verified": true,
"publicSafe": true,
"minimumDisclosure": true,
"paymentState": "PAYMENT_VERIFIED_TESTNET",
"accessState": "ACCESS_UNLOCKED_BY_BACKEND_VERIFIED_RECEIPT",
"receiptStatus": "RECEIPT_CREATED",
"evidenceStatus": "EVIDENCE_CREATED",
"freshnessStatus": "ACTIVE_OR_NOT_IMPLEMENTED_YET",
"integrityStatus": "VALID_OR_NOT_IMPLEMENTED_YET",
"privateDataIncluded": false,
"secretsIncluded": false,
"paymentIdIncluded": false,
"txidIncluded": false,
"customerDataIncluded": false
}
Freshness and integrity are architecture directions unless separately implemented and validated.
SafeGate is Pi-first because the current evidence path uses Pi Browser, Pi authentication, payments scope, Pi Wallet, and Pi Testnet / Sandbox context.
Long-term, SafeGate can remain chain-agnostic through a shared trust-state model and future payment adapters.
| Future Direction | Boundary |
|---|---|
| PaymentAdapter abstraction | Direction, not proof of all integrations. |
| PiAdapter | Current focus is Pi-first evidence path. |
| Future EVM adapter | Not currently claimed complete. |
| Future Stellar / Soroban adapter | Not currently claimed complete. |
| Shared public verify model | Architecture direction. |
| Shared privacy boundary | Minimum disclosure direction. |
V12 can prepare future AI-agent-readable trust states, but AI-agent readiness should not outrun backend hardening.
| Item | Link |
|---|---|
| Main Review Hub | https://www.safegatelabs.xyz |
| Pilot Review Index | /pilot-review-index.html |
| V9 Payment Spine Evidence | /v9-pi-payment-spine-evidence.html |
| V9.1 Backend Behavior Validation | /v9-1-backend-behavior-validation.html |
| V9.1 Public Review Sync | /v9-1-public-review-sync-complete.html |
| V12 Final Freeze Note | /v12-final-freeze-note.html |
| V12 Public Repo Plan | SAFEGATE_V12_TRUST_STATE_PRIVACY_WEB3_PLAN.md |
| V12 Public Repo Close Note | SAFEGATE_V12_FINAL_CLOSE_NOTE.md |
| Public Review Sync Complete | SAFEGATE_V9_1_PUBLIC_REVIEW_SYNC_COMPLETE.md |
Which parts are current evidence, and which parts are future architecture direction?
Current evidence includes the controlled Pi Testnet payment-spine pass and selected V9.1 safe negative backend validation. Trust-state expansion, freshness, integrity, AI-agent readiness, and chain-agnostic adapters remain architecture direction until separately implemented and validated.
V12 is SafeGate’s documented trust-state, privacy, and Web3 architecture direction.
It builds on Controlled Pi Testnet Payment Spine, V9.1 Safe Negative Backend Validation, and V9.1 Public Review Sync.
SafeGate remains not production-ready, not formally audited, and not a completed privacy protocol.