1.6 KiB
1.6 KiB
HTTP Messages
A specification for exchanging data using remote HTTP messages on a trusted server
Overview
Enables a local client to make and receive http requests from a remote computer. Requires:
- A trusted machine to process the messages (can be a home PC or Raspberry Pi)
- A relay (can be untrusted)
- A blossom server (can be untrusted)
Architecture
Event Structure
{
"kind": 1120,
"pubkey": "<pubkey>",
"content": "nip44Encrypt({'url':'blossom.one','decrypt':'password123'})",
"tags": [
["x", "<hash of encrypted message blob>"]
["E", "<request event id>"], // (RES) Request ID (mandatory)
["r", "https://relay.one"] // (REQ) Response Relay (optional)
],
// other fields...
}
Explanations:
kind:1120
- BIP39 word #1120 (message)."content"
- encrypted (NIP-44) JSON with location of blob and decryption key"x"
- Blossom file hash of the encrypted request or response"E"
- ID of the request event. Enables a response to be easily identified."r"
- (optional) relay on which the response should be sent. For Requests only.