The rippled
API specification defined in JSON
.
These files can be used by developers to programmatically generate or validate transactions and API method calls.
API specification can be loaded from spec/api.json
.
The transaction spec defines transaction types and their field detail.
The transaction specification can be loaded from spec/transactions.json
.
Some transaction types have a flag
property. When set, these values can be loaded from spec/flags.json
.
Validation can occur at the transaction type level, or the field level.
A validation
property will occur at either level when appropriate.
Validations for field types like Unsigned Integer
are not explicitly defined.
allow_zero
: Fields may require values be within a range above 0, when also accepting 0.allowed
: An array of allowed values.min
: Minimum value allowed.max
: Maximum value allowed.regex
: Regular expression for string formats.
There are cases where a field is required or not allowed based on another one being defined. This is where group validation comes into play.
Group types:
dependent
: If one of the fields in the group is defined, then the rest are required.exclusive
: Only one of the fields is allowed. Ifrequired
is set, then at least one of them is required.required
: At least one of the fields are required.
There are validations (at least with Escrow) which have not yet been worked out to be defined in JSON format.
For example, with EscrowCreate
, if both CancelAfter
and FinishAfter
are defined, then FinishAfter
must be before
CancelAfter
.