Skip to content

feat: mint ed25519 safe wallets from StrKey seed user roots - #9686

Draft
davidkaplanbitgo wants to merge 1 commit into
masterfrom
WCN-2411
Draft

davidkaplanbitgo wants to merge 1 commit into
masterfrom
WCN-2411

Conversation

@davidkaplanbitgo

@davidkaplanbitgo davidkaplanbitgo commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Change the ed25519Multisig Safe root public-key contract so backup and
BitGo roots are represented by raw Ed25519 public derivation material:

raw public key (32 bytes) || raw chain code (32 bytes)

Encode the 64-byte payload as canonical, unpadded RFC 4648 base32 using
the uppercase A-Z2-7 alphabet. The resulting root value is exactly 103
characters and is independent of Stellar, Algorand, HBAR, or any other
coin-specific public-key format.

Update Safe backup-key creation to decode the representative XLM
public key into raw bytes before composing the neutral root value.
Update Safe root validation to validate the canonical base32 payload and
to apply the same contract to both backup and BitGo ed25519Multisig
roots.

Keep Stellar StrKey handling isolated to the user-root and
coin-specific child-key boundaries. The neutral Safe root codec now
uses Buffer inputs and outputs for raw public-key and chain-code
material, minimizing string parsing and hexadecimal re-encoding.
Public derivation continues to consume the SDK's internal raw
public-key-plus-chain-code representation and discards child chain
codes at the wallet-child boundary.

Update SDK Safe root fixtures and tests for:

  • canonical base32 encoding and decoding;
  • exact 32-byte public-key and chain-code boundaries;
  • rejection of lowercase, malformed, padded, truncated, and
    non-canonical values;
  • raw Buffer-based codec APIs;
  • deterministic Ed25519 public derivation vectors;
  • unchanged Stellar StrKey user-root encoding;
  • backup and BitGo Safe root validation.

Ticket: WCN-2411

@linear-code

linear-code Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

WCN-2411

@github-actions

github-actions Bot commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

⚠️ Unit tests are failing on Node 26.x (Current release line, non-blocking). This is not an LTS version yet, so it does not block merge, but it signals an incompatibility to fix before Node 26.x becomes LTS.

View run

Change the ed25519Multisig Safe root public-key contract so backup and
BitGo roots are represented by raw Ed25519 public derivation material:

  raw public key (32 bytes) || raw chain code (32 bytes)

Encode the 64-byte payload as canonical, unpadded RFC 4648 base32 using
the uppercase A-Z2-7 alphabet. The resulting root value is exactly 103
characters and is independent of Stellar, Algorand, HBAR, or any other
coin-specific public-key format.

Update Safe backup-key creation to decode the representative XLM
public key into raw bytes before composing the neutral root value.
Update Safe root validation to validate the canonical base32 payload and
to apply the same contract to both backup and BitGo ed25519Multisig
roots.

Keep Stellar StrKey handling isolated to the user-root and
coin-specific child-key boundaries. The neutral Safe root codec now
uses Buffer inputs and outputs for raw public-key and chain-code
material, minimizing string parsing and hexadecimal re-encoding.
Public derivation continues to consume the SDK's internal raw
public-key-plus-chain-code representation and discards child chain
codes at the wallet-child boundary.

Update SDK Safe root fixtures and tests for:

- canonical base32 encoding and decoding;
- exact 32-byte public-key and chain-code boundaries;
- rejection of lowercase, malformed, padded, truncated, and
  non-canonical values;
- raw Buffer-based codec APIs;
- deterministic Ed25519 public derivation vectors;
- unchanged Stellar StrKey user-root encoding;
- backup and BitGo Safe root validation.

Ticket: WCN-2411
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