The @unionlabs/payments/Domain module makes use of Branded Types from Effect. This improves safety when working with data that is structurally identical but semantically different.
Error ts(2345) ― Argument of type 'Erc20Address' is not assignable to parameter of type 'ZAssetAddress'.
Type 'Erc20Address' is not assignable to type 'Brand<"ZAssetAddress">'.
Types of property '[BrandTypeId]' are incompatible.
Property 'ZAssetAddress' is missing in type '{ readonly Erc20Address: "Erc20Address"; }' but required in type '{ readonly ZAssetAddress: "ZAssetAddress"; }'.