Closed dlongley closed 1 year ago
OK, are you suggesting we place this into a package like the DID CLI package? For context, I created the util folder mainly as a way for a contributing developer to understand how we went from the ECDSA hex values in the multicodec table to the varint values that we use in the code. However, I have also included descriptive comments in lib/constants.js illustrating this conversion. The other file I added was a last minute addition that helped to create key pairs, but I recognize that this is also achievable from log statements in the tests. With all of that context, do you still think we need this standalone util library or should we just do away with util
altogether? cc: @gannan08
If the issue is that the util
dir is in every distribution of this package, then we can solve that by excluding it in the package.json file.
This was a way to "serialize knowledge". This will not be the first time, nor the last time one needs to create the proper hex value based on its varint value in the multicodec table. Having this script in the same repo can help future implementers.
So I noticed that the util
dir is already not included in the package. I think we can close this issue. If we have need for a shared tool in the future (e.g., we find that we're duplicating this effort in other places), then we can abstract the util
dir out into a package that does what we need. I'm going to close this.
Rather than including
util
in every distribution of this package, it should be moved into its own separate-cli
package that could be installed to use the utility as needed.