Closed NicolasMahe closed 5 years ago
Be careful to also check the data (like https://github.com/mesg-foundation/engine/pull/1112)
We can also check id hash is set and return an error od not empty
We can also check id hash is set and return an error od not empty
Yeah sure
But let's not do it now. Let's first implement Cosmos and see what constraint it provides and then adapt the API again.
Also we can do the same strategy for Filters. Just use data type for a filter, eg:
In every of this palce, we're going to redifine a message type, instead of using one defined in definition.
Let's implement that. To summarize:
Currently the protobuf struct
CreateServiceRequest
is accepting adefinition.Service
as first parameter. This is not the best as the data send toCreateServiceRequest
are not exactly adefinition.Service
, the hash should not be present as it is calculated by the Engine, it makes the API a bit confusing. Also, we cannot pass directly the output of the commandmesg-cli service:compile
as it needs to be inside the keydefinition
inCreateServiceRequest
.My suggestion is to update
CreateServiceRequest
to:Make sure that other
CreateXXXRequest
messages are following the same pattern.