-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scanning private keys doesn't work yet #11
Comments
else if (PATTERN_PRIVATE_KEY.matcher(input).matches())
{
try
{
final ECKey key = new DumpedPrivateKey(Constants.NETWORK_PARAMETERS, input).getKey();
final Address address = new Address(Constants.NETWORK_PARAMETERS, key.getPubKeyHash());
bitcoinRequest(address, null, null, null);
}
// ...
} Current behavior is to just derive the address from the private key and start a new sendrequest. This is rather useless since you'd just scan the QR of the address to do that, not the private key. Scanning private either implies an import of the address to the wallet or a sweep. We should probably ask which they want to do, and then execute it. Sweeping might require a fair bit of code because we need to:
This should probably be done in a rather automated way. |
@wtogami and I agree that this should be tabled for now. It looks like SendCoinsFragment and Activity could be easily modified to take an ephemeral wallet object as a parameter to an intent to make this work. Then an arbitrary send could happen. The main issue is the blockchain rescan required to derive the balance. More thought needs to be put into it. |
I just had an idea that applies to this ticket as well as #21 - what if paper wallets were HD wallets. For instance:
By chaining in this way, the sync time is simply the time between now and the last transaction, which isn't all that bad really - it doesn't get perpetually longer like it does with traditional paper wallets. Also, by encrypting the seeds with a passphrase, the paper wallets themselves could be secured. |
I'd like to be able to scan private keys and put them in the wallet from sites like liteaddress.
The text was updated successfully, but these errors were encountered: