In addition to #17.
Let's define a payment network as the sum of all buyer wallets and merchant wallets associated to their respective registries. At the moment there isn't a contract representing this directly (especially since the merchant registry is not used).
Maybe the KeycardWalletFactory could turn into the PaymentNetwork smartcontract which allows creating both merchant and buyer wallets as well as managing both registries. Since different policies can exist for payment networks different implementations might exist. We can defined an interface common to all networks for outside interaction.
Another solution is to have the PaymentNetwork be a contract which simply references to a specific KeycardRegistry and a MerchantRegistry. Wallets would then get access to both registries through this simple mapping contract. This is more or less equivalent to storing the address of both registries in each wallet, but allow changing them (if needed) with a single transaction.
wdty?
In addition to #17.
Let's define a payment network as the sum of all buyer wallets and merchant wallets associated to their respective registries. At the moment there isn't a contract representing this directly (especially since the merchant registry is not used).
Maybe the KeycardWalletFactory could turn into the PaymentNetwork smartcontract which allows creating both merchant and buyer wallets as well as managing both registries. Since different policies can exist for payment networks different implementations might exist. We can defined an interface common to all networks for outside interaction.
Another solution is to have the PaymentNetwork be a contract which simply references to a specific KeycardRegistry and a MerchantRegistry. Wallets would then get access to both registries through this simple mapping contract. This is more or less equivalent to storing the address of both registries in each wallet, but allow changing them (if needed) with a single transaction.
wdty?