From c8988460a2865b99ee96da6799d37ac6ccb79d4d Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Fri, 26 Jul 2013 01:06:01 +0200 Subject: Add support for watch-only addresses Changes: * Add Add/Have WatchOnly methods to CKeyStore, and implementations in CBasicKeyStore. * Add similar methods to CWallet, and support entries for it in CWalletDB. * 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. Conflicts: src/qt/walletmodel.cpp src/rpcserver.cpp src/wallet.cpp --- src/rpcclient.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/rpcclient.cpp') diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp index 501940a730..76c99e7c9f 100644 --- a/src/rpcclient.cpp +++ b/src/rpcclient.cpp @@ -72,6 +72,7 @@ static const CRPCConvertParam vRPCConvertParams[] = { "lockunspent", 0 }, { "lockunspent", 1 }, { "importprivkey", 2 }, + { "importaddress", 2 }, { "verifychain", 0 }, { "verifychain", 1 }, { "keypoolrefill", 0 }, -- cgit v1.2.3 From d4640d7d8c3ba373195d33ab75db9c8cb43f8806 Mon Sep 17 00:00:00 2001 From: JaSK Date: Tue, 8 Apr 2014 15:23:50 +0200 Subject: Added argument to getbalance to include watchonly addresses and fixed errors in balance calculation. --- src/rpcclient.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/rpcclient.cpp') diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp index 76c99e7c9f..ea5ca8e0f6 100644 --- a/src/rpcclient.cpp +++ b/src/rpcclient.cpp @@ -40,6 +40,7 @@ static const CRPCConvertParam vRPCConvertParams[] = { "listreceivedbyaccount", 0 }, { "listreceivedbyaccount", 1 }, { "getbalance", 1 }, + { "getbalance", 2 }, { "getblockhash", 0 }, { "move", 2 }, { "move", 3 }, -- cgit v1.2.3 From 83f3543f20348aa718620314e7deb37bd0f71b90 Mon Sep 17 00:00:00 2001 From: JaSK Date: Tue, 8 Apr 2014 16:13:15 +0200 Subject: Added argument to listaccounts to include watchonly addresses --- src/rpcclient.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/rpcclient.cpp') diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp index ea5ca8e0f6..d96b47833f 100644 --- a/src/rpcclient.cpp +++ b/src/rpcclient.cpp @@ -49,6 +49,7 @@ static const CRPCConvertParam vRPCConvertParams[] = { "listtransactions", 1 }, { "listtransactions", 2 }, { "listaccounts", 0 }, + { "listaccounts", 1 }, { "walletpassphrase", 1 }, { "getblocktemplate", 0 }, { "listsinceblock", 1 }, -- cgit v1.2.3 From d7d5d23b77e204eccd4bf8a5608c1a499d5fc42f Mon Sep 17 00:00:00 2001 From: JaSK Date: Tue, 8 Apr 2014 17:51:04 +0200 Subject: Added argument to listtransactions and listsinceblock to include watchonly addresses --- src/rpcclient.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/rpcclient.cpp') diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp index d96b47833f..f329d517b3 100644 --- a/src/rpcclient.cpp +++ b/src/rpcclient.cpp @@ -48,11 +48,13 @@ static const CRPCConvertParam vRPCConvertParams[] = { "sendfrom", 3 }, { "listtransactions", 1 }, { "listtransactions", 2 }, + { "listtransactions", 3 }, { "listaccounts", 0 }, { "listaccounts", 1 }, { "walletpassphrase", 1 }, { "getblocktemplate", 0 }, { "listsinceblock", 1 }, + { "listsinceblock", 2 }, { "sendmany", 1 }, { "sendmany", 2 }, { "addmultisigaddress", 0 }, @@ -129,7 +131,6 @@ Array RPCConvertValues(const std::string &strMethod, const std::vector Date: Fri, 23 May 2014 00:58:15 +0200 Subject: added includeWatchonly argument to 'gettransaction' because it affects balance calculation --- src/rpcclient.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'src/rpcclient.cpp') diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp index f329d517b3..b2387cb062 100644 --- a/src/rpcclient.cpp +++ b/src/rpcclient.cpp @@ -65,6 +65,7 @@ static const CRPCConvertParam vRPCConvertParams[] = { "listunspent", 1 }, { "listunspent", 2 }, { "getblock", 1 }, + { "gettransaction", 1}, { "getrawtransaction", 1 }, { "createrawtransaction", 0 }, { "createrawtransaction", 1 }, -- cgit v1.2.3 From 0fa2f8899adf8f9f0ead29ba5d708ead6c5d4eaf Mon Sep 17 00:00:00 2001 From: JaSK Date: Sat, 31 May 2014 16:57:26 +0200 Subject: added includedWatchonly argument to listreceivedbyaddress/...account --- src/rpcclient.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/rpcclient.cpp') diff --git a/src/rpcclient.cpp b/src/rpcclient.cpp index b2387cb062..5edeecf933 100644 --- a/src/rpcclient.cpp +++ b/src/rpcclient.cpp @@ -37,8 +37,10 @@ static const CRPCConvertParam vRPCConvertParams[] = { "getreceivedbyaccount", 1 }, { "listreceivedbyaddress", 0 }, { "listreceivedbyaddress", 1 }, + { "listreceivedbyaddress", 2 }, { "listreceivedbyaccount", 0 }, { "listreceivedbyaccount", 1 }, + { "listreceivedbyaccount", 2 }, { "getbalance", 1 }, { "getbalance", 2 }, { "getblockhash", 0 }, @@ -65,7 +67,6 @@ static const CRPCConvertParam vRPCConvertParams[] = { "listunspent", 1 }, { "listunspent", 2 }, { "getblock", 1 }, - { "gettransaction", 1}, { "getrawtransaction", 1 }, { "createrawtransaction", 0 }, { "createrawtransaction", 1 }, -- cgit v1.2.3