user124878: I'm working on an SPV wallet using bitpay's bitcore lib package.
Am I able to save to local storage the privateKey object generated with 'new bitcore.PrivateKey()'
Or should I be converting it to WIF before setting it to local storage? Are there any drawbacks or advantages of doing it one way over the other?

user26873: 
Am I able to save to local storage the privateKey object generated with 'new bitcore.PrivateKey()'

"Able" vs "should".  Yes you are able to save whatever you want to localStorage including the private key in string format or if an object use JSON.stringify(). It is never wise to store private keys on an internet connected machine. The localStorage data can only been read by the domain that saved the data, so it does have some security, but that's not much. It's essentially just cookie data saved on the users machine, unencrypted. So this approach might be useful when developing wallet concepts or personal projects, but definitely not kosher for production level.

124878: <p>I'm working on an SPV wallet using bitpay's bitcore lib package.</p>
<p>Am I able to save to local storage the privateKey object generated with 'new bitcore.PrivateKey()'</p>
<p>Or should I be converting it to WIF before setting it to local storage? Are there any drawbacks or advantages of doing it one way over the other?</p>
 26873: <blockquote>
<p>Am I able to save to local storage the privateKey object generated with 'new bitcore.PrivateKey()'</p>
</blockquote>
<p>&quot;Able&quot; vs &quot;should&quot;.  Yes you are able to save whatever you want to localStorage including the private key in string format or if an object use JSON.stringify(). It is never wise to store private keys on an internet connected machine. The localStorage data can only been read by the domain that saved the data, so it does have some security, but that's not much. It's essentially just cookie data saved on the users machine, unencrypted. So this approach might be useful when developing wallet concepts or personal projects, but definitely not kosher for production level.</p>
