feat: mint ed25519 safe wallets from StrKey seed user roots - #9686
Draft
davidkaplanbitgo wants to merge 1 commit into
Draft
davidkaplanbitgo wants to merge 1 commit into
davidkaplanbitgo wants to merge 1 commit into
Conversation
Contributor
Contributor
|
|
davidkaplanbitgo
force-pushed
the
WCN-2411
branch
from
September 14, 2026 18:19
1b2a637 to
e8eff14
Compare
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
davidkaplanbitgo
force-pushed
the
WCN-2411
branch
from
September 14, 2026 18:26
e8eff14 to
f498d68
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
non-canonical values;
Ticket: WCN-2411