feat: import existing Platform identities - #68
Open
infraclaw-dash wants to merge 4 commits into
Open
Conversation
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.
Summary
Adds a password-gated import flow for existing Dash Platform identities on the Identities page.
Users can identify the identity using any of:
alice.dashaliceDPNS searches require an exact normalized name match before resolving the owning identity. Users then provide one or more private keys in 64-character hex (optionally
0x-prefixed) or WIF format. The wallet:Imported identities are marked in the identity list. The UI warns that the wallet recovery phrase does not recreate externally imported keys.
Identity discovery hardening
IdentifierWASMvalidation instead of assuming the common 42–44 character encodingSending from imported identities
Identity credits and Platform-address credits remain distinct source types, but the Send UI now makes that distinction actionable:
Key storage
0013_imported_identity_keysadds:is_importedmarker on identitiesidentity_keystable keyed by wallet, identity, and Platform key IDOnly encrypted private-key material is stored. The encryption wrapper uses the wallet's normalized mnemonic as its secret, which remains protected by the wallet password and avoids stranding imported keys when the wallet password is reset.
Wallet deletion removes imported identity keys before deleting identity and wallet rows.
Validation
yarn typecheck✅The test cleanup also updates stale
SdkProviderimport paths, supplies the current shielded-service fixture to the wallet API tests, and keeps both testnet and mainnet wallet creation offline.