Ripple recently announced an improved, unified interface to the Ripple Consensus Ledger.
Prior to RippleAPI, there were three very different APIs to the Ripple Consensus Ledger:
- The rippled APIs: a low-level interface, not designed for ease of use.
- The Ripple-REST API: a high-level HTTP interface
Rome Reginelli, Ripple’s Documentation Engineer, notes:
For better organization, we used the “weak layering principle” to structure the source, according to which each layer can only depend on layers below it. This means that the source files are structured into subdirectories and there are very few imports that reach into parent or sibling directories.
Reginelli indicates that the RippleAPI comes with a comprehensive array of tests, including ubiquitous unit test coverage, integration tests for every method, flow type checking, ESLint checks, and automated testing of the documentation.
All API methods have JSON schemas that specify the return values and parameter types. The unit tests use the schemas to validate the return values, which guarantees that the API results are consistent with expectations.