1
I want to create a boolean result method WasGeneratedBy that takes two params, a bitcoin address, and a BIP32 pub key. Is there an efficient algorithm (and library, NBitcoin?) to accomplish this?
EDIT:
I'm showing my BIP32 newbieness.. Based upon the first response I received, I would like to modify my desired method such that all required parameters are present (including path). This method gets its information from public web service so obviously that precludes any private keys or other that the user would be unlikely to submit.
I believe this should be possible given this blockchain.info example
In practice, do most/all implementations of wallets using xpubkey generated addresses follow a default path? or is there really no reliable serialized means by which to exhaustively search for an address? – Sean – 2015-10-15T20:33:56.083
1
@Sean There isn't a widely followed standard, but one of our users made a list of common path formats: http://bitcoin.stackexchange.com/questions/36955/what-bip32-derivation-path-does-electrum-use#comment43246_36956
– Nick ODell – 2015-10-16T06:36:57.730@Nick Ok, I see how different wallets could conceivably produce different series' of addresses based upon their proprietary preference for paths, however, I discovered BIP-44 defines an interrogation algorithm that assumes all your valid addresses lie before the first unused 20 addresses in a branch, and all valid branches lie before the first empty branch. So assuming the address-from-path generation formula is strictly defined, is it possible to rapidly generate the entire list of users addresses by cross-referencing generated addresses against the addresses represented in the blockchain? – Sean – 2015-10-16T22:16:44.297
@Sean Yes, assuming those things are true, you can enumerate the user's addresses that way. – Nick ODell – 2015-10-16T22:24:07.277