Page Navigation

epress node Developer Docs

Open

Collapsed while browsing epress world protocol docs.

EWP API Reference

Endpoint-level reference for the current epress world protocol baseline. These interfaces define interoperable behavior between nodes.

Error Response Format

All errors follow a consistent JSON structure:

{
  "error": "ERROR_CODE",
  "message": "Human-readable description"
}
GET/ewp/profilePublic/Protocol

Node Profile

Returns canonical profile metadata for the current node instance.

Auth

None

Params

  • No params

Body

  • No request body

Response

  • 200 with address, title, url, description, created_at, updated_at

Error Codes

  • 404 NODE_NOT_FOUND
  • 500 INTERNAL_ERROR

Example

curl https://node.example.com/ewp/profile
GET/ewp/avatarPublic/Protocol

Node Avatar

Returns avatar binary from node settings with default fallback.

Auth

None

Params

  • No params

Body

  • No request body

Response

  • 200 image binary with Content-Type from stored data URI

Error Codes

  • 500 Internal Server Error

Example

curl -L https://node.example.com/ewp/avatar --output avatar.png
POST/ewp/connectionsPublic/Protocol

Create Connection

Accepts signed follow handshake payload and persists follower-followee relationship.

Auth

Typed-data signature in body

Params

  • No path params

Body

  • typedData (domain/types/primaryType/message)
  • signature

Response

  • 201 { status: created }

Error Codes

  • 400 INVALID_PAYLOAD
  • 400 INVALID_SIGNATURE
  • 400 INVALID_TIMESTAMP
  • 400 INVALID_URL_FORMAT
  • 401 FOLLOWEE_IDENTITY_MISMATCH
  • 409 CONNECTION_ALREADY_EXISTS
  • 500 INTERNAL_ERROR

Example

curl -X POST https://node.example.com/ewp/connections -H 'Content-Type: application/json' -d '{"typedData":{},"signature":"0x..."}'
DELETE/ewp/connectionsPublic/Protocol

Destroy Connection

Accepts signed unfollow payload and removes relationship state.

Auth

Typed-data signature in body

Params

  • No path params

Body

  • typedData.message with followeeAddress, followerAddress, timestamp
  • signature

Response

  • 204 empty

Error Codes

  • 400 INVALID_PAYLOAD
  • 400 INVALID_TIMESTAMP
  • 400 INVALID_SIGNATURE

Example

curl -X DELETE https://node.example.com/ewp/connections -H 'Content-Type: application/json' -d '{"typedData":{},"signature":"0x..."}'
GET/ewp/publicationsPublic/Protocol

Publication Index

Returns pageable publication metadata for node-owned content.

Auth

None

Params

  • Query: since (ISO datetime)
  • Query: limit (1..1000)
  • Query: page (>=1)

Body

  • No request body

Response

  • 200 { data: Publication[], pagination: { page, limit, total, totalPages, hasNextPage, hasPrevPage } }

Error Codes

  • 400 INVALID_LIMIT
  • 400 INVALID_PAGE
  • 400 INVALID_SINCE_FORMAT
  • 500 INTERNAL_ERROR

Example

curl 'https://node.example.com/ewp/publications?since=2026-01-01T00:00:00.000Z&limit=50&page=1'
GET/ewp/contents/:content_hashPublic/Protocol

Content Fetch

Fetches markdown or binary content by content hash with optional timestamp and thumbnail options.

Auth

None

Params

  • Path: content_hash
  • Query: timestamp (unix seconds)
  • Query: thumb (sm|md|lg for images)

Body

  • No request body

Response

  • 200 markdown or file stream with range support and metadata headers

Error Codes

  • 400 INVALID_TIMESTAMP
  • 400 INVALID_THUMBNAIL_SIZE
  • 404 PUBLICATION_NOT_FOUND
  • 404 CONTENT_NOT_FOUND
  • 500 INTERNAL_ERROR

Example

curl -L 'https://node.example.com/ewp/contents/0xCONTENT_HASH?thumb=md' --output content.bin
POST/ewp/replicationsPublic/Protocol

Replication Ingest

Accepts signed replication requests from followed publishers and syncs publication content.

Auth

Connection relationship + typed-data signature

Params

  • No path params

Body

  • typedData.message with contentHash, publisherAddress, timestamp
  • signature

Response

  • 201 { status: replicated }

Error Codes

  • 400 INVALID_PAYLOAD
  • 400 CONTENT_HASH_MISMATCH
  • 400 CONTENT_DESCRIPTION_MISSING
  • 400 INVALID_SIGNATURE
  • 401 NOT_FOLLOWING
  • 409 REPLICATION_ALREADY_EXISTS
  • 500 INTERNAL_ERROR

Example

curl -X POST https://node.example.com/ewp/replications -H 'Content-Type: application/json' -d '{"typedData":{},"signature":"0x..."}'
PATCH/ewp/nodes/:addressPublic/Protocol

Remote Node Profile Update

Accepts signed profile update payloads and applies updates only when timestamp is newer.

Auth

Typed-data signature

Params

  • Path: address (publisher address)

Body

  • typedData.message with publisherAddress, url, title, description, timestamp
  • signature

Response

  • 204 empty

Error Codes

  • 400 INVALID_PAYLOAD
  • 400 ADDRESS_MISMATCH
  • 400 INVALID_ADDRESS
  • 400 INVALID_SIGNATURE

Example

curl -X PATCH https://node.example.com/ewp/nodes/0xPublisher -H 'Content-Type: application/json' -d '{"typedData":{},"signature":"0x..."}'