lukechampine / user

A CLI renter for Sia
MIT License
12 stars 2 forks source link

Seed should not be required when scanning #16

Open lukechampine opened 5 years ago

lukechampine commented 5 years ago

user scan will prompt you for your seed, even though the only reason it needs a wallet is to get an estimate for the contract fees. This is because renterutil.NewWalrusClient requires the seed as a parameter.

I'm not sure how best to address this. I could make NewWalrusClient "lazy," such that it only requires a seed if you call SignTransaction or NextWalletAddress. But that's kind of a weird API. Passing the seed to those functions directly would be reasonable, but then they wouldn't implement the same interface as before. Finally, I could add a separate "unprivileged" client type, but that's a weird API too (why would you not have the seed to your own wallet?). I'll have to sit on this awhile longer.