phoenix-core icon indicating copy to clipboard operation
phoenix-core copied to clipboard

`SecretKey` should be enough to verify note's ownership

Open ZER0 opened this issue 11 months ago • 0 comments

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.

ZER0 avatar Mar 05 '24 09:03 ZER0