Commit f40fe4c
committed
feat(sdk-coin-sol): add MPCv2 support to recoverConsolidations
- Detect MPCv2 once at the top of recoverConsolidations instead of
relying on per-iteration keycard decryption in recover(). This avoids
decrypting the same keycard N times across the scan loop.
- For MPCv2 wallets, derive the base destination address (index 0) using
deriveUnhardenedMps instead of MPC.deriveUnhardened, so funds are swept
to the correct MPCv2 address.
- Thread multisigTypeVersion='MPCv2' into each recover() call so recover()
short-circuits isMpcv2SigningMaterial and skips redundant detection.
- Add multisigTypeVersion field to SolRecoveryOptions interface to support
pre-resolved route threading.
- Add unit tests for MPCv2 signed native SOL and SPL token consolidation,
single-detection assertion, unsigned cold path regression, and MPCv1
signed consolidation regression.
Ticket: WCI-496
Session-Id: 71c94edb-c9b3-41bf-9ddb-e895b1efb51a
Task-Id: 1e1b82e3-1575-4f53-b072-ce133a0dce651 parent f509a08 commit f40fe4c
2 files changed
Lines changed: 358 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| 190 | + | |
| 191 | + | |
190 | 192 | | |
191 | 193 | | |
192 | 194 | | |
| |||
1252 | 1254 | | |
1253 | 1255 | | |
1254 | 1256 | | |
1255 | | - | |
1256 | | - | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
1257 | 1264 | | |
1258 | 1265 | | |
1259 | 1266 | | |
| |||
1810 | 1817 | | |
1811 | 1818 | | |
1812 | 1819 | | |
1813 | | - | |
| 1820 | + | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
| 1825 | + | |
| 1826 | + | |
| 1827 | + | |
1814 | 1828 | | |
1815 | 1829 | | |
1816 | 1830 | | |
1817 | 1831 | | |
1818 | | - | |
1819 | | - | |
| 1832 | + | |
| 1833 | + | |
| 1834 | + | |
| 1835 | + | |
1820 | 1836 | | |
1821 | 1837 | | |
1822 | 1838 | | |
| |||
1829 | 1845 | | |
1830 | 1846 | | |
1831 | 1847 | | |
| 1848 | + | |
1832 | 1849 | | |
1833 | 1850 | | |
1834 | 1851 | | |
| |||
0 commit comments