api3dao / commons

Common utilities, modules and configurations used in API3 projects
MIT License
0 stars 2 forks source link

Add config hash module #51

Closed Siegrift closed 8 months ago

Siegrift commented 8 months ago

Closes https://github.com/api3dao/commons/issues/48

Rationale

Explained in https://github.com/api3dao/signed-api/issues/240. I was thinking whether to include also the utilities to sign the message, but opted not to (because signing the hash is not required - e.g. Airseeker will likely not do it). So the module is basically about uniquely serialising plain JS object (a.k.a config) and producing a sha256 hash. I also verified that the same hash can be computed using a combination of UNIX utilities.