First functional commit!
This commit is contained in:
25
DAEMON.md
25
DAEMON.md
@@ -5,16 +5,16 @@ I am Superball - an anonymizing node that provides location privacy for Nostr us
|
||||
|
||||
## What I Look For
|
||||
|
||||
### 1. Routing Events (Kind 30000)
|
||||
### 1. Routing Events (Kind 22222)
|
||||
- Monitor all relays I'm connected to
|
||||
- Look for events with `kind: 30000`
|
||||
- Look for events with `kind: 22222`
|
||||
- Check if `tags` contains `["p", "<my_pubkey>"]`
|
||||
- These are events meant for me to process
|
||||
|
||||
### 2. Event Structure I Expect
|
||||
```json
|
||||
{
|
||||
"kind": 30000,
|
||||
"kind": 22222,
|
||||
"pubkey": "<some_ephemeral_key>", // Not important to me
|
||||
"content": "<nip44_encrypted_payload>", // This is what I need
|
||||
"tags": [["p", "<my_pubkey>"]],
|
||||
@@ -29,7 +29,7 @@ I am Superball - an anonymizing node that provides location privacy for Nostr us
|
||||
### 1. Validate
|
||||
- Verify the event signature is valid
|
||||
- Confirm the `p` tag contains my pubkey
|
||||
- Ensure it's kind 30000
|
||||
- Ensure it's kind 22222
|
||||
|
||||
### 2. Decrypt
|
||||
- Use my private key with NIP-44 to decrypt the content
|
||||
@@ -37,10 +37,11 @@ I am Superball - an anonymizing node that provides location privacy for Nostr us
|
||||
```json
|
||||
{
|
||||
"event": { /* The event to forward */ },
|
||||
"routing": {
|
||||
|
||||
"routing": { /* Superball Instructions */
|
||||
"relays": ["wss://relay1.com", "wss://relay2.com"],
|
||||
"delay": 30,
|
||||
"pad": "+150", // or "-50"
|
||||
"padding": "+150", // or "-50"
|
||||
"p": "next_superball_pubkey", // Optional - missing means final posting
|
||||
"audit": "a1b2c3d4e5f6789012345678901234567890abcdef1234567890abcdef123456", // Required audit tag
|
||||
"payment": "eCash_token" // Optional
|
||||
@@ -56,8 +57,8 @@ I am Superball - an anonymizing node that provides location privacy for Nostr us
|
||||
- Queue the event for delayed processing
|
||||
|
||||
#### Padding
|
||||
- **Remove padding (`"pad": "-N"`)**: Delete N bytes worth of padding tags from the event
|
||||
- **Add padding (`"pad": "+N"`)**: Create new routing wrapper with N bytes of padding tags
|
||||
- **Remove padding (`"padding": "-N"`)**: Delete N bytes worth of padding tags from the event
|
||||
- **Add padding (`"padding": "+N"`)**: Create new routing wrapper with N bytes of padding tags
|
||||
|
||||
#### Relays
|
||||
- Post to ALL relays in the `relays` array
|
||||
@@ -69,8 +70,8 @@ I am Superball - an anonymizing node that provides location privacy for Nostr us
|
||||
- **`p` field missing**: Extract inner event and post directly to relays (end chain, no padding changes)
|
||||
|
||||
#### Padding Logic
|
||||
- **`p` field present + `pad` field**: Apply padding changes when creating routing wrapper
|
||||
- **`p` field missing**: Ignore any `pad` field - cannot modify signed event
|
||||
- **`p` field present + `padding` field**: Apply padding changes when creating routing wrapper
|
||||
- **`p` field missing**: Ignore any `padding` field - cannot modify signed event
|
||||
- **Final hop rule**: Never modify signed events, post exactly as received
|
||||
|
||||
#### Audit Tag Processing
|
||||
@@ -89,7 +90,7 @@ I am Superball - an anonymizing node that provides location privacy for Nostr us
|
||||
|
||||
```json
|
||||
{
|
||||
"kind": 30000, // Always use routing event
|
||||
"kind": 22222, // Always use routing event
|
||||
"pubkey": "<my_ephemeral_key>", // Generate fresh ephemeral key
|
||||
"content": "<encrypted_inner_event>", // Re-encrypt with my key
|
||||
"tags": [
|
||||
@@ -143,7 +144,7 @@ I am Superball - an anonymizing node that provides location privacy for Nostr us
|
||||
|
||||
## Example Processing Flow
|
||||
|
||||
1. **Receive**: Kind 30000 event with my pubkey in p tag
|
||||
1. **Receive**: Kind 22222 event with my pubkey in p tag
|
||||
2. **Decrypt**: Extract inner event + routing instructions
|
||||
3. **Queue**: Schedule for delayed processing (e.g., 30 seconds + jitter)
|
||||
4. **Process**: Apply padding changes and prepare for forwarding
|
||||
|
||||
Reference in New Issue
Block a user