Skip to content
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

Finally add support for watch-only addresses #4045

merged 18 commits into from Jul 7, 2014
Commits on Jul 2, 2014
  1. Add support for watch-only addresses

    sipa authored and sdkfjlsfjlskdfjlsdjflsjf committed Jul 25, 2013
    * Add Add/Have WatchOnly methods to CKeyStore, and implementations
      in CBasicKeyStore.
    * Add similar methods to CWallet, and support entries for it in
    * Make IsMine in script/wallet return a new enum 'isminetype',
      rather than a boolean. This allows distinguishing between
      spendable and unspendable coins.
    * Add a field fSpendable to COutput (GetAvailableCoins' return type).
    * Mark watchonly coins in listunspent as 'watchonly': true.
    * Add 'watchonly' to validateaddress, suppressing script/pubkey/...
      in this case.
    Based on a patch by Eric Lombrozo.
  2. Showing 'involvesWatchonly' property for transactions returned by 'li…

    sdkfjlsfjlskdfjlsdjflsjf committed Apr 9, 2014
    …sttransactions' and 'listsinceblock'.
    It is only appended when the transaction involves a watchonly address.
  3. Use script matching rather than destination matching for watch-only.

    sipa authored and sdkfjlsfjlskdfjlsdjflsjf committed Jun 9, 2014
    This changes the keystore data format, wallet format and IsMine logic
    to detect watch-only outputs based on direct script matching rather
    than first trying to convert outputs to destinations (addresses).
    The reason is that we don't know how the software that has the spending
    keys works. It may support the same types of scripts as us, but that is
    not guaranteed. Furthermore, it removes the ambiguity between addresses
    used as identifiers for output scripts or identifiers for public keys.
    One practical implication is that adding a normal pay-to-pubkey-hash
    address via importaddress will not cause payments to the corresponding
    full public key to be detected as IsMine. If that is wanted, add those
    scripts directly (importaddress now also accepts any hex-encoded script).
You can’t perform that action at this time.