Skip to content

feat: add eddsaMpc and XLM Safe recovery key params - #10090

Open
danielpeng1 wants to merge 1 commit into
masterfrom
WCN-3914-safe-recovery-eddsampc-xlm
Open

danielpeng1 wants to merge 1 commit into
masterfrom
WCN-3914-safe-recovery-eddsampc-xlm

Conversation

@danielpeng1

Copy link
Copy Markdown
Contributor

buildSafeRecoverKeyParams turns derived Safe child keys into the params a coin's recover() expects. It threw for eddsaMpc wallets (SOL, ADA, etc.) and for XLM, so those couldn't be recovered. This adds both.

eddsaMpc (slot ④)

  • Add an eddsaMpc branch. Signed mode re-encrypts the child shares under a throwaway passphrase; unsigned mode returns only the child common keychain. Both always set isTss: true and broadcast: false.
  • Share one MpcSafeRecoverKeyParams<Slot> type and builder between ecdsaMpc and eddsaMpc. EcdsaMpcSafeRecoverKeyParams keeps its shape.
  • Remove the runtime "not supported yet" fall-through, so a slot added without a branch is now a compile error.

XLM (slot ②, ed25519Multisig)

  • Register xlm and txlm in the ed25519Multisig encoders. rootAddress is not derived (as with HBAR), so the caller still supplies it.

Tests

eddsaMpc

  • sdk-core safe/recovery.ts: the MPC signed and unsigned tests now run for both ecdsaMpc and eddsaMpc.
  • solSafeRecovery.ts and adaSafeRecovery.ts: derive, build, then run the real recover() with real MPS signing. Signed signatures verify under the derived key, unsigned sweeps spend from the derived address, and shares from the wrong account are rejected.

XLM

  • sdk-core safe/recovery.ts: XLM/TXLM golden vectors (signed and unsigned).
  • xlmSafeRecovery.ts: signed recovery through the lazy backup signer with both signatures verified, unsigned recovery with no encrypt or decrypt, and RecoveryKeyMismatchError when the derived keys aren't account signers.

Ticket: WCN-3914

@danielpeng1 danielpeng1 self-assigned this Oct 29, 2026
@linear-code

linear-code Bot commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

WCN-3914

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

⚠️ Compatibility checks are failing on Node.js 27-nightly (experimental, non-blocking). This does not block merge, but it signals an incompatibility to fix before this release becomes supported.

View run

@danielpeng1
danielpeng1 force-pushed the WCN-3914-safe-recovery-eddsampc-xlm branch from 4e2249e to d5ca9d0 Compare October 29, 2026 05:20
@danielpeng1
danielpeng1 force-pushed the WCN-3914-safe-recovery-eddsampc-xlm branch from d5ca9d0 to 46da21b Compare October 29, 2026 13:56
@danielpeng1
danielpeng1 marked this pull request as ready for review October 29, 2026 14:47
@danielpeng1
danielpeng1 requested review from a team as code owners October 29, 2026 14:47

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@danielpeng1
danielpeng1 requested a review from a team as a code owner October 29, 2026 14:48

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant