Bitcoin Forum
May 29, 2024, 06:55:30 PM *
News: Latest Bitcoin Core release: 27.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: 1:1 copy of wallet but watch only  (Read 223 times)
cellard (OP)
Legendary
*
Offline Offline

Activity: 1372
Merit: 1252


View Profile
January 30, 2019, 03:29:09 AM
 #1

Lets say you have a wallet with a bunch of transactions and different inputs and so on. Is there a way to make a copy but watch-only? I know there's a command where you can manually add the public keys for watch-only in an empty wallet but this is so annoying to do it one by one. It would be cool to make "watch-only copies" of the entire wallet.dat file.
pooya87
Legendary
*
Offline Offline

Activity: 3472
Merit: 10604



View Profile
January 30, 2019, 04:18:31 AM
 #2

(assuming you are talking about bitcoin core) i believe your only option is to use RPC commands to export and import the addresses that you want.
try using getaddressesbyaccount to get the list of your addresses that are associated with a particular account. then use importmulti command to import the list of addresses in a new watch only wallet.
Code:
bitcoin-cli importmulti '
  [
    {
      "scriptPubKey" : { "address": "SomeAddress..." },
      "timestamp" : 0
    },
    {
      "scriptPubKey" : { "address": "SomeOtherAddress..." },
      "timestamp" : 0
    }
  ]' '{ "rescan": true }'

.
.BLACKJACK ♠ FUN.
█████████
██████████████
████████████
█████████████████
████████████████▄▄
░█████████████▀░▀▀
██████████████████
░██████████████
████████████████
░██████████████
████████████
███████████████░██
██████████
CRYPTO CASINO &
SPORTS BETTING
▄▄███████▄▄
▄███████████████▄
███████████████████
█████████████████████
███████████████████████
█████████████████████████
█████████████████████████
█████████████████████████
███████████████████████
█████████████████████
███████████████████
▀███████████████▀
█████████
.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!