From 6c3f577842962dd57e9b14060fc2238d7f3ee30c Mon Sep 17 00:00:00 2001 From: tatulatu700-lang Date: Thu, 20 Aug 2026 16:46:50 +1000 Subject: [PATCH 1/2] docs: add initial language-agnostic PROTOCOL.md wire specification --- PROTOCOL.md | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 PROTOCOL.md diff --git a/PROTOCOL.md b/PROTOCOL.md new file mode 100644 index 00000000..f8761ff0 --- /dev/null +++ b/PROTOCOL.md @@ -0,0 +1,24 @@ +# Gitlawb Wire Protocol Specification (v1) + +## 1. Identity & DIDs +- **Key Type:** Ed25519 (`ed25519`). +- **Supported Methods:** `did:key`, `did:web`, and `did:gitlawb`. +- **Resolution:** Deterministic public key extraction from multicodec prefixes for verification. + +## 2. Authentication (RFC 9421) +- **HTTP Signatures:** Route requests require `Signature-Input` covering `@method`, `@path`, and `content-digest`. +- **Signer Identity:** `keyid` points to the actor DID; algorithm standard is `alg="ed25519"`. +- **Integrity:** `Content-Digest` SHA-256 header validation on mutating POST/PUT endpoints. + +## 3. Proof of Intelligence (iCaptcha) +- **Gate:** Enforced via `403 icaptcha_proof_required` responses. +- **Headers:** Clients must present `x-icaptcha-url`, `x-icaptcha-level`, and a valid `x-icaptcha-proof`. + +## 4. Ref-Update Certificate +- **Schema:** `gitlawb/ref-update/v1`. +- **Payload:** Canonical JSON bytes including target repository, commit OID, previous OID, and actor DID. +- **Validation:** Multi-signature threshold validation against configured branch protection rules. + +## 5. Storage & Git Transport +- **Smart-HTTP:** Standard `/{owner}/{repo}/info/refs` and `git-upload-pack` endpoints. +- **Content Addressing:** Git SHA-256 mapped to IPFS CID chunks with IPNS-backed branch pointers. From 3b00725fd37ff73c638017ec1047603a57599739 Mon Sep 17 00:00:00 2001 From: tatulatu700-lang Date: Thu, 20 Aug 2026 16:50:29 +1000 Subject: [PATCH 2/2] docs: add language-agnostic PROTOCOL.md wire spec --- PROTOCOL.md | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/PROTOCOL.md b/PROTOCOL.md index f8761ff0..72fcf324 100644 --- a/PROTOCOL.md +++ b/PROTOCOL.md @@ -1,24 +1,23 @@ # Gitlawb Wire Protocol Specification (v1) ## 1. Identity & DIDs -- **Key Type:** Ed25519 (`ed25519`). -- **Supported Methods:** `did:key`, `did:web`, and `did:gitlawb`. -- **Resolution:** Deterministic public key extraction from multicodec prefixes for verification. +- **Key Types:** Ed25519 (`ed25519`). +- **Methods:** `did:key`, `did:web`, `did:gitlawb`. +- **Resolution:** Deterministic public key extraction from multicodec prefixes. ## 2. Authentication (RFC 9421) -- **HTTP Signatures:** Route requests require `Signature-Input` covering `@method`, `@path`, and `content-digest`. -- **Signer Identity:** `keyid` points to the actor DID; algorithm standard is `alg="ed25519"`. -- **Integrity:** `Content-Digest` SHA-256 header validation on mutating POST/PUT endpoints. +- **HTTP Signatures:** Requires `Signature-Input` covering `@method`, `@path`, and `content-digest`. +- **Signer Identity:** `keyid` points to the actor DID; algorithm is `alg="ed25519"`. +- **Integrity:** SHA-256 `Content-Digest` verification on write endpoints. ## 3. Proof of Intelligence (iCaptcha) - **Gate:** Enforced via `403 icaptcha_proof_required` responses. -- **Headers:** Clients must present `x-icaptcha-url`, `x-icaptcha-level`, and a valid `x-icaptcha-proof`. +- **Headers:** Clients must present `x-icaptcha-url`, `x-icaptcha-level`, and `x-icaptcha-proof`. ## 4. Ref-Update Certificate - **Schema:** `gitlawb/ref-update/v1`. -- **Payload:** Canonical JSON bytes including target repository, commit OID, previous OID, and actor DID. -- **Validation:** Multi-signature threshold validation against configured branch protection rules. +- **Payload:** Canonical JSON bytes defining target repo, commit OID, previous OID, and actor DID. ## 5. Storage & Git Transport -- **Smart-HTTP:** Standard `/{owner}/{repo}/info/refs` and `git-upload-pack` endpoints. +- **Smart-HTTP:** Endpoints at `/{owner}/{repo}/info/refs` and `git-upload-pack`. - **Content Addressing:** Git SHA-256 mapped to IPFS CID chunks with IPNS-backed branch pointers.