Repository navigation
Commit fa613f8
refactor(platform-wallet)!: summarize dApp state transitions in platform-wallet and address review findings
Moves decoding and the approval summary of a dApp-provided state transition out of platform-wallet-ffi into platform-wallet (summarize_state_transition / StateTransitionSummary), on top of rs-dpp's exact untrusted decode and per-kind untagged decode (#4931). The FFI keeps only the C projection and no longer hardcodes bincode variant tags.
What the user is shown before signing: trailing bytes and prefix decodes no longer count as a framing; user_fee_increase and a top-level complete flag (StateTransitionSummary::is_complete) are part of every summary; per-row details render document data, a document base's token payment and action fee agreement, token config update / emergency action / price schedule / claim distribution, quoted public notes, encrypted-note presence, group info and a mint to the default destination; data contract create / update and kinds without a describer carry the whole decoded value in details and are never complete.
Clients: Kotlin initializes the native library before parsing, scrubs a derived Connect key discarded by cancellation, and reads the u32 kind name and complete flag (goldens regenerated); Swift reads the FFI constants for kinds, families and Connect sub-feature / purpose; a JNI test pins Kotlin's Connect constants to the FFI's. The Connect derive reuses the shared mnemonic resolver helper and erases the master key on every path. Key-limit conversion tests now live in rs-dpp.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>1 parent 8641e3e commit fa613f8
22 files changed
Lines changed: 2158 additions & 825 deletions
File tree
- packages
- kotlin-sdk/sdk/src
- main/kotlin/org/dashfoundation/dashsdk
- identity
- wallet
- test
- kotlin/org/dashfoundation/dashsdk/identity
- resources/golden
- rs-platform-wallet-ffi/src
- rs-platform-wallet
- src/wallet/identity/network
- rs-unified-sdk-jni/src
- swift-sdk
- Sources/SwiftDashSDK/PlatformWallet
- SwiftTests/SwiftDashSDKTests
- Fixtures/StateTransitions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
18 | 19 | | |
19 | 20 | | |
20 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
21 | 35 | | |
22 | 36 | | |
23 | 37 | | |
| |||
39 | 53 | | |
40 | 54 | | |
41 | 55 | | |
| 56 | + | |
| 57 | + | |
42 | 58 | | |
43 | 59 | | |
44 | 60 | | |
| |||
47 | 63 | | |
48 | 64 | | |
49 | 65 | | |
50 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
51 | 69 | | |
52 | 70 | | |
53 | 71 | | |
| |||
70 | 88 | | |
71 | 89 | | |
72 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
73 | 95 | | |
74 | 96 | | |
75 | 97 | | |
| |||
78 | 100 | | |
79 | 101 | | |
80 | 102 | | |
81 | | - | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
82 | 107 | | |
83 | 108 | | |
84 | 109 | | |
| |||
134 | 159 | | |
135 | 160 | | |
136 | 161 | | |
137 | | - | |
138 | | - | |
139 | | - | |
140 | | - | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
141 | 166 | | |
142 | 167 | | |
143 | 168 | | |
| |||
148 | 173 | | |
149 | 174 | | |
150 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
151 | 185 | | |
152 | 186 | | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
153 | 193 | | |
154 | 194 | | |
155 | 195 | | |
| |||
180 | 220 | | |
181 | 221 | | |
182 | 222 | | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
183 | 228 | | |
184 | 229 | | |
185 | 230 | | |
| |||
206 | 251 | | |
207 | 252 | | |
208 | 253 | | |
209 | | - | |
| 254 | + | |
210 | 255 | | |
211 | 256 | | |
| 257 | + | |
| 258 | + | |
212 | 259 | | |
| 260 | + | |
213 | 261 | | |
214 | 262 | | |
215 | 263 | | |
| |||
234 | 282 | | |
235 | 283 | | |
236 | 284 | | |
237 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
238 | 288 | | |
239 | 289 | | |
240 | 290 | | |
| |||
285 | 335 | | |
286 | 336 | | |
287 | 337 | | |
288 | | - | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
289 | 345 | | |
290 | 346 | | |
291 | 347 | | |
292 | 348 | | |
293 | 349 | | |
294 | 350 | | |
295 | | - | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
296 | 357 | | |
297 | 358 | | |
298 | 359 | | |
| |||
322 | 383 | | |
323 | 384 | | |
324 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
325 | 389 | | |
326 | 390 | | |
327 | 391 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
687 | 687 | | |
688 | 688 | | |
689 | 689 | | |
690 | | - | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
691 | 696 | | |
692 | 697 | | |
693 | 698 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
33 | 36 | | |
34 | 37 | | |
35 | 38 | | |
36 | 39 | | |
37 | 40 | | |
38 | | - | |
| 41 | + | |
39 | 42 | | |
40 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
41 | 58 | | |
42 | 59 | | |
43 | 60 | | |
| |||
70 | 87 | | |
71 | 88 | | |
72 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
73 | 93 | | |
74 | 94 | | |
75 | 95 | | |
76 | 96 | | |
77 | 97 | | |
78 | 98 | | |
79 | 99 | | |
80 | | - | |
81 | | - | |
| 100 | + | |
| 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 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 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 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
82 | 181 | | |
83 | | - | |
84 | | - | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
85 | 185 | | |
86 | 186 | | |
87 | 187 | | |
88 | 188 | | |
89 | 189 | | |
| 190 | + | |
| 191 | + | |
90 | 192 | | |
| 193 | + | |
91 | 194 | | |
92 | 195 | | |
93 | 196 | | |
| |||
106 | 209 | | |
107 | 210 | | |
108 | 211 | | |
109 | | - | |
| 212 | + | |
| 213 | + | |
110 | 214 | | |
111 | 215 | | |
112 | 216 | | |
| |||
Binary file not shown.
Binary file not shown.
Binary file not shown.
0 commit comments