Record Validator

Record validators are a generic mechanism for checking the DHT records, including:

  • Enforcing a data schema (e.g., checking content types)

  • Enforcing security requirements (e.g., allowing only the owner to update the record)

  • Enforcement using predicates/callables for customizable logic on the DHTRecord (e.g., checking keys match allowable keys, checking expiration dates, etc.)

Record validators are middleware between GET and POST/PUT requests between peers for storing data in the subnet.

When starting the DHT, it can be initialized with an Iterablearrow-up-right of the RecordValidatorBase and will validate in order of priority (see How To Use).


Record Validators:

Built-in record validators:

Last updated