Commit cd039f0
committed
Derive
This implements a single algorithm responsible for getting a wallet's
primaryFormat.
This function uses the existing algorithm for publicKeys and is
now also used in `createPrivateKey`.
This change should be an idempotent, but guarantees our future changes
(about how we select the primary key) is couple to the appropriate
routines.
The goal is to future-proof our existing implementation for when we
enable new wallet formats.
We do not introduce any side-effects to existing wallets (wallets
already persisted prior to any change).primaryFormat with a dedicated getPrimaryFormat utility1 parent 8a046c7 commit cd039f0
File tree
2 files changed
+34
-11
lines changed- src/common
- plugin
- utxobased/keymanager
2 files changed
+34
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| 46 | + | |
45 | 47 | | |
46 | 48 | | |
47 | 49 | | |
48 | | - | |
| 50 | + | |
49 | 51 | | |
50 | 52 | | |
51 | 53 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
102 | 127 | | |
103 | 128 | | |
104 | 129 | | |
| |||
147 | 172 | | |
148 | 173 | | |
149 | 174 | | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
160 | 179 | | |
161 | 180 | | |
162 | 181 | | |
| |||
181 | 200 | | |
182 | 201 | | |
183 | 202 | | |
| 203 | + | |
| 204 | + | |
184 | 205 | | |
185 | 206 | | |
186 | 207 | | |
| |||
0 commit comments