Skip to content

Troubleshooting Validation Errors

Elliot Lee edited this page Sep 14, 2018 · 2 revisions

Validation

JSON schemas can be found in src/common/schemas/.

When a transaction specification does not match a schema, you will receive a ValidationError. If you get a validation error, check that your transaction matches a specification.

  • Amount values must be specified as strings, e.g. "0.01"

Adjustment

An "adjustment" is a specification for a balance modification in the ledger, specifying:

  • The address of the account to be modified
  • The tag of the transaction (which typically represents an internal account number)
  • The amount of money to credit/debit
    • Currency (with counterparty/issuer if applicable)
    • Value

sourceExactAdjustment

For adjusting the source (sender) of a transaction: An exact amount (currency and value), address, and tag.

maxAdjustment

A maximum amount (currency and value), address, and tag. Use this to specify the largest amount of funds that the transaction can debit from the sender's balance.

destinationExactAdjustment

For adjusting the destination (recipient) of a transaction: An exact amount (currency and value), address, and tag.

minAdjustment

A minimum amount (currency and value), address, and tag. Use this to specify the minimum amount of funds that the transaction must deliver.