Commit 0a1bbec
committed
Merge bitcoin/bitcoin#32489: wallet: Add
a15bdc0 doc: update offline-signing-tutorial to use exportwatchonlywallet rpc (Pol Espinasa)
a388076 test: Test for exportwatchonlywallet (Ava Chow)
d053e3e wallet, rpc: Add exportwatchonlywallet RPC (Ava Chow)
444878e wallet: Add CWallet::ExportWatchOnly (Ava Chow)
f9273f0 wallet: Move listdescriptors retrieving from RPC to CWallet (Ava Chow)
a1c8378 wallet: Write new descriptor's cache in AddWalletDescriptor (Ava Chow)
1e99664 wallet: Use Descriptor::CanSelfExpand() in CanGetAddresses() (Ava Chow)
d2ee922 descriptor: Add CanSelfExpand() (Ava Chow)
Pull request description:
Currently, if a user wants to use an airgapped setup, they need to manually create the watchonly wallet that will live on the online node by importing the public descriptors. This PR introduces `exportwatchonlywallet` which will create a wallet file with the public descriptors to avoid exposing the specific internals to the user. Additionally, this RPC will copy any existing labels, transactions, and wallet flags. This ensures that the exported watchonly wallet is almost entirely a copy of the original wallet but without private keys.
ACKs for top commit:
polespinasa:
lgtm ACK a15bdc0
Sjors:
re-utACK a15bdc0
pablomartin4btc:
re-ACK [a15bdc0](bitcoin/bitcoin@a15bdc0)
w0xlt:
lgtm reACK a15bdc0
Tree-SHA512: cfc59415ad9aa13d1445cf2a85db1c051215496b6edcf5a8db463499b2b51b92ee7bf840b709035dff7635f9d0c533423bceb58c851f220500e1ea254d12f3b8exportwatchonlywallet RPC to export a watchonly version of a wallet15 files changed
Lines changed: 688 additions & 102 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
| 42 | + | |
44 | 43 | | |
45 | | - | |
46 | | - | |
47 | | - | |
| 44 | + | |
| 45 | + | |
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
51 | | - | |
| 49 | + | |
52 | 50 | | |
53 | 51 | | |
54 | 52 | | |
55 | | - | |
56 | | - | |
| 53 | + | |
57 | 54 | | |
58 | 55 | | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | 56 | | |
63 | | - | |
| 57 | + | |
64 | 58 | | |
65 | | - | |
66 | | - | |
| 59 | + | |
67 | 60 | | |
68 | 61 | | |
69 | 62 | | |
70 | 63 | | |
71 | 64 | | |
72 | 65 | | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
85 | | - | |
86 | | - | |
87 | | - | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | 66 | | |
109 | 67 | | |
110 | 68 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
247 | 247 | | |
248 | 248 | | |
249 | 249 | | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
250 | 253 | | |
251 | 254 | | |
252 | 255 | | |
| |||
317 | 320 | | |
318 | 321 | | |
319 | 322 | | |
| 323 | + | |
320 | 324 | | |
321 | 325 | | |
322 | 326 | | |
| |||
381 | 385 | | |
382 | 386 | | |
383 | 387 | | |
| 388 | + | |
384 | 389 | | |
385 | 390 | | |
386 | 391 | | |
| |||
607 | 612 | | |
608 | 613 | | |
609 | 614 | | |
| 615 | + | |
610 | 616 | | |
611 | 617 | | |
612 | 618 | | |
| |||
810 | 816 | | |
811 | 817 | | |
812 | 818 | | |
| 819 | + | |
| 820 | + | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
| 826 | + | |
| 827 | + | |
813 | 828 | | |
814 | 829 | | |
815 | 830 | | |
| |||
824 | 839 | | |
825 | 840 | | |
826 | 841 | | |
827 | | - | |
| 842 | + | |
828 | 843 | | |
829 | 844 | | |
830 | 845 | | |
| |||
1099 | 1114 | | |
1100 | 1115 | | |
1101 | 1116 | | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
1102 | 1129 | | |
1103 | 1130 | | |
1104 | 1131 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
143 | 146 | | |
144 | 147 | | |
145 | 148 | | |
| |||
0 commit comments