medibloc / panacea-core

MediBloc Blockchain Core
https://medibloc.com
Other
60 stars 19 forks source link

Add a `dep` command and `datahash` command #652

Closed inchori closed 1 year ago

inchori commented 1 year ago

Background

The encrypt-data and decrypt-data command are only used in DEP(Data Exchange Protocol). But for now, the commands are located in root panacead command. Also, the users are now need to get a datahash of provided data by using sha256sum manually. It could cause a providing same data which is not following canonical JSON format.

Implementation

Add a dep command and placed the encrypt-data and decrypt-data command under dep command. Add a panacead dep hash-data ... command for provider to get a unique datahash of provided data. As a result, the commands will be: