Commit 97847c5
committed
Merge #18: feat(selector): allow multiple change sources with ChangeDescriptor
aadeca5 feat(selector)!: allow multiple change sources (nymius)
Pull request description:
**Description**
Previously, the `change_descriptor` field only accepted a definite descriptor to derive the change output script pubkey. This worked for most cases but failed for scenarios - such as silent payments - where a definite descriptor is not yet available.
To address this, introduce the `ChangeDescriptor` enum, which supports:
- The standard case of providing a definite descriptor.
- An alternative where the script pubkey and its maximum satisfaction weight can be specified directly.
This makes change output generation flexible enough to handle both standard and exceptional workflows.
Fixes #17
#### All Submissions:
* [x] I've signed all my commits
* [x] I followed the [conventional commit guidelines](https://www.conventionalcommits.org/en/v1.0.0/)
* [x] I ran `cargo +nigthly fmt` before committing
#### New Features:
* [ ] I've added tests for the new feature
* [x] I've added docs for the new feature
ACKs for top commit:
ValuedMammal:
ACK aadeca5
Tree-SHA512: 40d366ecf0c65dfc1f2048ac1953c255a3c9c945c24ecfaf65281c11342d84e76348a18c33032917d1215870827ec7e4812baa0a6589d0235dc25f637918265b4 files changed
Lines changed: 62 additions & 41 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | | - | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| |||
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
137 | 162 | | |
138 | 163 | | |
139 | 164 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
64 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| |||
134 | 135 | | |
135 | 136 | | |
136 | 137 | | |
137 | | - | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
138 | 141 | | |
| 142 | + | |
139 | 143 | | |
140 | 144 | | |
141 | 145 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
77 | 86 | | |
78 | 87 | | |
79 | 88 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| |||
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
| |||
140 | 143 | | |
141 | 144 | | |
142 | 145 | | |
143 | | - | |
| 146 | + | |
144 | 147 | | |
| 148 | + | |
145 | 149 | | |
146 | 150 | | |
147 | | - | |
148 | | - | |
149 | 151 | | |
150 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
151 | 156 | | |
152 | 157 | | |
153 | 158 | | |
| |||
171 | 176 | | |
172 | 177 | | |
173 | 178 | | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | 179 | | |
193 | 180 | | |
194 | 181 | | |
195 | 182 | | |
196 | 183 | | |
197 | 184 | | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | | - | |
202 | | - | |
203 | | - | |
| 185 | + | |
| 186 | + | |
204 | 187 | | |
205 | 188 | | |
206 | 189 | | |
| |||
268 | 251 | | |
269 | 252 | | |
270 | 253 | | |
271 | | - | |
| 254 | + | |
272 | 255 | | |
273 | 256 | | |
274 | 257 | | |
| |||
281 | 264 | | |
282 | 265 | | |
283 | 266 | | |
284 | | - | |
| 267 | + | |
285 | 268 | | |
286 | 269 | | |
287 | 270 | | |
| |||
358 | 341 | | |
359 | 342 | | |
360 | 343 | | |
361 | | - | |
362 | | - | |
| 344 | + | |
| 345 | + | |
363 | 346 | | |
364 | | - | |
| 347 | + | |
365 | 348 | | |
366 | 349 | | |
367 | 350 | | |
| |||
0 commit comments