Since version 0.10.0 bitcoind has support for watch-only addresses.
Here is the text from the release notes:
Watch-only wallet support
The wallet can now track transactions to and from wallets for which
you know all addresses (or scripts), even without the private keys.
This can be used to track payments without needing the private keys
online on a possibly vulnerable system. In addition, it can help for
(manual) construction of multisig transactions where you are only one
of the signers.
One new RPC, importaddress
, is added which functions similarly to
importprivkey
, but instead takes an address or script (in
hexadecimal) as argument. After using it, outputs credited to this
address or script are considered to be received, and transactions
consuming these outputs will be considered to be sent.
The following RPCs have optional support for watch-only: getbalance
,
listreceivedbyaddress
, listreceivedbyaccount
, listtransactions
,
listaccounts
, listsinceblock
, gettransaction
. See the RPC
documentation for those methods for more information.
Compared to using getrawtransaction
, this mechanism does not require
-txindex
, scales better, integrates better with the wallet, and is
compatible with future block chain pruning functionality. It does mean
that all relevant addresses need to added to the wallet before the
payment, though.
Try bitcoin-cli help importaddress
(and the help texts for the other relevant commands listed above) for the details.