tari-project/tari

Code overlap between `TariAddress` and `EmojiId`

Opened this issue · 0 comments

There is a fair amount of duplication between TariAddress and EmojiId. Both represent a public key, but TariAddress additionally includes a network representation combined with the checksum. While the use cases are strictly different (an EmojiId need not represent a wallet address), the overlap has a bad code smell that suggests the abstractions might be a bit off.

After discussion, it sounds like the preferred design would be to make EmojiId a thin wrapper around a byte representation that only performs encoding and decoding, but not checksums. It would be up to higher-level abstractions (like keys or addresses) to handle checksums and other application-specific details.