phoenix-core
phoenix-core copied to clipboard
`SecretKey` should be enough to verify note's ownership
Summary
We created the ViewKey
as a way to delegate the ownership check, however we don't always do that: for example, in the current implementation of the wallet (CLI and web) we're verifying the note locally.
In order to do so, we need to create a ViewKey
even if we have access to a SecretKey
, that should be enough to verify the note's ownership.
Possible solution design or implementation
As the ViewKey
has, the SecretKey
should implement the owns
method as well.
Additional context
The hope is to reduce not only the code involved, but at least a bit of the operations too.