Skip to content

fix(platform-wallet): support HASH160 DashPay profile signing keys - #4653

Draft
lklimek wants to merge 1 commit into
v4.2-devfrom
fix/dashpay-keys
Draft

fix(platform-wallet): support HASH160 DashPay profile signing keys#4653
lklimek wants to merge 1 commit into
v4.2-devfrom
fix/dashpay-keys

Conversation

@lklimek

@lklimek lklimek commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

TL;DR

Allow users whose identity uses hashed ECDSA keys to create and update their DashPay profile.

User story

As a wallet user, I can save my profile with my existing identity keys.

Scenario

An identity has a master authentication key, a high-security authentication key, and a transfer key, all stored as public-key hashes. Profile writes currently fail with a missing-authentication-key error. The high-security key should authorize the write.

Detailed discussion

Issue being fixed or feature implemented

Related to dashpay/dash-evo-tool#760. The platform-wallet external-signer profile paths restrict eligible keys to ECDSA_SECP256K1, excluding ECDSA_HASH160 before invoking the signer.

What was done?

Both profile creation and replacement use one selector accepting ECDSA_SECP256K1 and ECDSA_HASH160. It continues to require enabled AUTHENTICATION keys at HIGH or CRITICAL security. The supplied signer remains responsible for the selected key.

How Has This Been Tested?

  • Regression tests failed with the original type restriction and pass with HASH160 enabled.
  • cargo test -p platform-wallet --lib wallet::identity::network::profile::tests --locked: 10 passed. Covers both ECDSA types at HIGH/CRITICAL, the reported three-key identity, and rejection of disabled, MASTER, MEDIUM, TRANSFER, unsupported-type, and absent keys.
  • cargo fmt -p platform-wallet -- --check: passed.
  • cargo clippy -p platform-wallet --all-targets --all-features --locked -- --no-deps -D warnings: passed (existing dependency warning in Drive).
  • Self-reviewed the shared selector's use by both write paths and the SDK handoff. No iOS or live network end-to-end test was run.

Breaking Changes

None.

Checklist

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation if needed
  • I have assigned this pull request to a milestone

🤖 Co-authored by Claudius the Magnificent AI Agent

Share the active HIGH/CRITICAL authentication key selector across profile creation and replacement, accepting both ECDSA public-key representations. Add regression coverage for HASH160 identities and ineligible keys.

Co-Authored-By: Codex <noreply@openai.com>
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added this to the v4.2.0 milestone Sep 10, 2026
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