Can you write a unit test for this? Bitcoinj shouldn't persist a wallet at all unless instructed.
Maybe try using the Wallet class without WalletAppKit? On 19/10/2018 23.05, Stanislaw Baranski wrote: > Hello, > Thanks for the answer. I tried with wallet() .encryp/.decrypt, but there > is a problem. I can not prevent the BitcoinJ from saving the decrypted > wallet. > > Even if I set > > kit.setAutoSave(false) > > the .wallet file is still saved. > I would like to save it only when it's encrypted like > > bitcoin.kit.wallet().encrypt(keyCrypter, key); > bitcoin.kit.wallet().saveToFile(bitcoin.getWalletFile()); > > Is it possible ? > > > On Wed, Oct 17, 2018 at 12:20 AM Andreas Schildbach > <andr...@schildbach.de <mailto:andr...@schildbach.de>> wrote: > > Yes, you either could encrypt the keys (and keep the decryption key just > in memory). Or you could use a read-only wallet that only has the public > keys to begin with. > > > On 15/10/2018 12.27, Stanislaw Baranski wrote: > > Hello, > > I'm creating the physical wallet (similar to Ledger Nano S), and I > want > > to store private key in my own way. I don't want the BitcoinJ to store > > the private key in .wallet file. Is there some way to configure the > > library so it keep the private key in-memory and lost it after the > > session ? I would like to restore/import the private key after some > > process of authorization (button, pin, 2FA etc.). > > > > Or maybe should I take use of wallet().encrypt() and > wallet().encrypt() > > is it safer ? > > > > -- > > You received this message because you are subscribed to the Google > > Groups "bitcoinj" group. > > To unsubscribe from this group and stop receiving emails from it, send > > an email to bitcoinj+unsubscr...@googlegroups.com > <mailto:bitcoinj%2bunsubscr...@googlegroups.com> > > <mailto:bitcoinj+unsubscr...@googlegroups.com > <mailto:bitcoinj%2bunsubscr...@googlegroups.com>>. > > For more options, visit https://groups.google.com/d/optout. > > > -- > You received this message because you are subscribed to a topic in > the Google Groups "bitcoinj" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/bitcoinj/eCRiK0RBdjw/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > bitcoinj+unsubscr...@googlegroups.com > <mailto:bitcoinj%2bunsubscr...@googlegroups.com>. > For more options, visit https://groups.google.com/d/optout. > > -- > > Stanisław Barański > > -- > You received this message because you are subscribed to the Google > Groups "bitcoinj" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to bitcoinj+unsubscr...@googlegroups.com > <mailto:bitcoinj+unsubscr...@googlegroups.com>. > For more options, visit https://groups.google.com/d/optout. -- You received this message because you are subscribed to the Google Groups "bitcoinj" group. To unsubscribe from this group and stop receiving emails from it, send an email to bitcoinj+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.