Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set type of all hash to bytes in protobuf files #1265

Closed
1 task
NicolasMahe opened this issue Aug 28, 2019 · 0 comments · Fixed by #1270
Closed
1 task

Set type of all hash to bytes in protobuf files #1265

NicolasMahe opened this issue Aug 28, 2019 · 0 comments · Fixed by #1270
Assignees

Comments

@NicolasMahe
Copy link
Member

Currently the type of all hash are string in the protobuf files and thus on the gRPC API.

We should change it to bytes.

  • this allow to generate proto files in with gogoproto with the exact hash type:
    string hash = 10 [
    (gogoproto.moretags) = 'validate:"required"',
    (gogoproto.customtype) = "github.com/mesg-foundation/engine/hash.Hash",
    (gogoproto.nullable) = false
    ];
  • update the mesg-js and/or cli to display the hash in base58
    • the marketplace service is currently using base-x to do it
  • we could at the same time, use multihash and multibase to be able to change the hash function and the displayed base in the future
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants