First functional commit!
This commit is contained in:
24
EXAMPLE.md
24
EXAMPLE.md
@@ -20,7 +20,7 @@ Alice wants to post a message under her real identity while hiding her location
|
||||
"pubkey": "alice123...",
|
||||
"content": "The government is lying about inflation statistics",
|
||||
"tags": [],
|
||||
"created_at": 1703000000,
|
||||
"created_at": 1702222200,
|
||||
"id": "alice_event_id",
|
||||
"sig": "alice_signature"
|
||||
}
|
||||
@@ -34,9 +34,10 @@ Payload for Superball B (final hop - no `p` field):
|
||||
"routing": {
|
||||
"relays": ["wss://relay3.com", "wss://relay4.com"],
|
||||
"delay": 15,
|
||||
"audit": "9f8e7d6c5b4a39281726354019283746502918374650283746501928374650"
|
||||
"payment": "eCash_ZYX321..." // Optional payment
|
||||
// No "p" field - this means final posting
|
||||
// No "pad" field - can't modify signed event
|
||||
// No "audit" field - can't audit final signed event - no need
|
||||
}
|
||||
}
|
||||
```
|
||||
@@ -44,7 +45,7 @@ Payload for Superball B (final hop - no `p` field):
|
||||
Creates routing event:
|
||||
```json
|
||||
{
|
||||
"kind": 30000,
|
||||
"kind": 22222,
|
||||
"pubkey": "ephemeral_key_2",
|
||||
"content": "<encrypted_payload_for_superball_b>",
|
||||
"tags": [["p", "sball_b012..."]],
|
||||
@@ -62,7 +63,7 @@ Payload for Superball A (continuing chain):
|
||||
"routing": {
|
||||
"relays": ["wss://relay2.com"],
|
||||
"delay": 45,
|
||||
"pad": "+200",
|
||||
"padding": "+200",
|
||||
"p": "sball_b012...", // Next Superball in chain
|
||||
"audit": "1a2b3c4d5e6f7890abcdef1234567890abcdef1234567890abcdef1234567890",
|
||||
"payment": "eCash_A1B2C3..." // Optional payment
|
||||
@@ -73,10 +74,13 @@ Payload for Superball A (continuing chain):
|
||||
Alice posts this to Relay1:
|
||||
```json
|
||||
{
|
||||
"kind": 30000,
|
||||
"kind": 22222,
|
||||
"pubkey": "ephemeral_key_1",
|
||||
"content": "<encrypted_payload_for_superball_a>",
|
||||
"tags": [["p", "sball_a789..."]],
|
||||
"tags": [
|
||||
["p", "sball_a789..."],
|
||||
["p", "fake audit tag..."],
|
||||
],
|
||||
"created_at": 1703000200,
|
||||
"id": "routing_for_a",
|
||||
"sig": "ephemeral_signature_1"
|
||||
@@ -87,12 +91,12 @@ Alice posts this to Relay1:
|
||||
|
||||
**T+0**: Alice posts routing event to Relay1
|
||||
```
|
||||
Relay1: kind 30000 event (p tag = sball_a789...)
|
||||
Relay1: kind 22222 event (p tag = sball_a789...)
|
||||
```
|
||||
|
||||
**T+5**: Superball A processes
|
||||
- Decrypts payload
|
||||
- Sees: relay2.com, delay 45s, pad +200
|
||||
- Sees: relay2.com, delay 45s, padding +200
|
||||
- Needs to ADD padding, so creates new wrapper
|
||||
- Queues for 45-second delay
|
||||
|
||||
@@ -100,7 +104,7 @@ Relay1: kind 30000 event (p tag = sball_a789...)
|
||||
```
|
||||
Relay2: NEW routing event (always looks the same)
|
||||
{
|
||||
"kind": 30000,
|
||||
"kind": 22222,
|
||||
"pubkey": "superball_a_ephemeral_key", // Fresh key
|
||||
"content": "<newly_encrypted_payload>", // Re-encrypted
|
||||
"tags": [
|
||||
@@ -130,7 +134,7 @@ Relay3 AND Relay4: Alice's original signed event appears exactly as she created
|
||||
"pubkey": "alice123...",
|
||||
"content": "The government is lying about inflation statistics",
|
||||
"tags": [], // Original tags preserved
|
||||
"created_at": 1703000000,
|
||||
"created_at": 1702222200,
|
||||
"id": "alice_event_id",
|
||||
"sig": "alice_signature" // Original signature preserved
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user