Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Transport

  • Protocol: JSON-RPC 2.0 over HTTP/1.1
  • Method: POST / (any path is accepted; the body is what matters)
  • Content-Type: application/json
  • Encoding: UTF-8
  • Framing: Content-Length header is required on every response and is enforced on requests
  • Keep-alive: not used; one request per connection

Request envelope

{
  "jsonrpc": "2.0",
  "method": "<method_name>",
  "params": { ... },
  "id": <int|string|null>
}

Successful response

{ "jsonrpc": "2.0", "result": { ... }, "id": <same id> }

Error response

{ "jsonrpc": "2.0", "error": { "code": <int>, "message": "..." }, "id": <same id> }

Enabling the RPC server

exfer node --datadir ~/.exfer --rpc-bind 127.0.0.1:9334

Default ports: P2P 9333, RPC 9334. The RPC server has no built-in authentication — bind to localhost or place it behind a reverse proxy that provides authentication and TLS.