WIP: Events refactoring

This PR add a new `payloads.js` file to describe all the important payloads exchanged between the different parts of the application.

Payloads implemented so far:

- `Offer`