Add more validation on the data

proposal

#1

From @Anthony https://github.com/mesg-foundation/core/issues/294

With the issue https://github.com/mesg-foundation/core/issues/194 data from inputs, results and events are validated to match at least the data in the mesg.yml

We should make sure that we also don’t send too much data but exactly the ones needed.

Example:

Let’s have an event that have the data “foo” and “bar”

we actually need to send the payload with “foo” and “bar” but we can also add any other attribute “x”, “y”… and this will be accepted by the core.

We can be strict on the validation and make sure to only have what the mesg.yml file defines otherwise it’s an error.

This filter can be done directly in the different libraries like https://github.com/mesg-foundation/mesg-js