Possibly define Address as a basic holder of the public key. Then, hold the creation, formatting and transformation logic into a separate component, e.g. AddressComputer, AddressFormatter or something similar. This allows the code that operates with addresses (basically, references of on-chain accounts) to be agnostic of address representation strategies.
That is, the code that operates with addresses should be concerned as little as possible with the different possible ways of formatting one.
Possibly define
Address
as a basic holder of the public key. Then, hold the creation, formatting and transformation logic into a separate component, e.g.AddressComputer
,AddressFormatter
or something similar. This allows the code that operates with addresses (basically, references of on-chain accounts) to be agnostic of address representation strategies.That is, the code that operates with addresses should be concerned as little as possible with the different possible ways of formatting one.