Skip to content

fix(platform-wallet): record derivation paths only for wallet-owned identity keys #6460

Backlog

Description

@lklimek

TL;DR: After registering an identity with a mix of wallet-derived and externally managed keys, the wallet records a derivation path under its own seed for every key, so an externally managed key cannot be re-derived from what was saved.

User story

As a developer of a wallet app built on platform-wallet, I want the wallet to remember derivation details only for keys it actually derived, so restoring an identity never points at the wrong key.

Scenario

Base flow

The app registers an asset-lock-funded identity with caller-supplied keys: the wallet's own MASTER key and an authentication key managed elsewhere (for example a hardware signer).

Actual behavior

Registration succeeds, but the wallet stores a DIP-9 path under its own seed for every registered key. Re-deriving the external key from that path yields a different public key.

Expected behavior

Keys whose wallet ownership and derivation coordinates are established keep their path. Externally managed keys are saved without a wallet derivation path.

Detailed discussion

  • Applies to the asset-lock-funded registration paths that accept a caller-built key map and signer in rs-platform-wallet (identity registration and identity state persistence).
  • Acceptance: a successful registration of a mixed key set persists the correct metadata for both keys, covered by a test.

🤖 Co-authored by Claudius the Magnificent AI Agent

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions