java-multihash icon indicating copy to clipboard operation
java-multihash copied to clipboard

Include prefix in Multihash.toString()

Open vorburger opened this issue 2 years ago • 2 comments

ToDo:

  • [ ] Test coverage

vorburger avatar Jan 02 '24 17:01 vorburger

The premise of this PR is completely wrong.

First, Qm isn't the right prefix for Base58. In fact, no valid Multibase string can start with Q. See specification, implementation.

The hashes that start with Qm are typical (though not required) for IPFS, and they actually don't include the Multibase prefix. See discussion.

Second, the method Base58.encode from io.ipfs.multibase produces results which already include the base prefix. See test examples.

odisseus avatar Apr 24 '24 14:04 odisseus