Skip to main content

JSON-RPC

Soroban-RPC will accept HTTP POST requests using the JSON-RPC 2.0 specification. Errors are returned via the jsonrpc error object wherever possible (and makes sense).

For production and other publicly-accessible instances, the JSON-RPC endpoint should be served over SSL on port 443, where possible, for security and ease of use. Though, soroban-rpc does not terminate ssl by itself, so will need a load-balancer or other service to terminate SSL for it.

To interact with soroban-rpc from inside a JavaScript application, use the js-soroban-client library, which gives a convenient interface for the RPC methods.

When XDR is passed as a parameter or returned, it is always a string encoded using standard base64.

Open-RPC Specification‚Äč

Soroban-RPC provides an OpenRPC specification document that can be used to mock, build, and/or validate both server and client software implementations. This document is used to generate all of our methods documentation pages. You can view the full specification document here. Additionally, you can experiment with this specificaiton document in the OpenRPC Playground.