feat(key-wallet): add missing DIP-15 derivation constants to dip9#886
Conversation
Every other DIP-9-family feature index (identities 5' with its sub-features, coinjoin 4', dashpay 15', platform payment 17') is defined in key_wallet::dip9, but the DIP-15 auto-accept feature 16' (m/9'/coin'/16'/expiry', the expiry-bounded bearer-key family behind the DashPay auto-accept QR) was never added. Downstream consumers — the platform wallet's auto_accept_derivation_path and the FFI resolver signer's raw-key export gate in dashpay/platform — each carry their own local `16` literal as a result. Define FEATURE_PURPOSE_DASHPAY_AUTO_ACCEPT = 16 next to its siblings so those call sites can reference the canonical constant. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 49 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #886 +/- ##
==========================================
- Coverage 74.37% 74.33% -0.04%
==========================================
Files 327 327
Lines 74747 74747
==========================================
- Hits 55590 55563 -27
- Misses 19157 19184 +27
|
Same gap as the auto-accept feature: the DIP-15 contactInfo hardened children (encToUserId = 65536', privateData = 65537' under the identity- auth root) had no canonical constants, so dashpay/platform carries them twice — named consts in rs-platform-wallet's crypto/contact_info.rs and raw 65536/65537 literals in rs-sdk-ffi's resolver signer (which cannot import platform-wallet). Define them beside the other DIP-15 constants. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Issue being fixed or feature implemented
Every other DIP-9-family feature index (identities
5'with its sub-features, coinjoin4', dashpay15', platform payment17') is defined inkey_wallet::dip9, but two DIP-15 derivation families were never added:16'—m/9'/coin_type'/16'/expiry', the expiry-bounded bearer keys behind the DashPay auto-accept QR (dapk);root/65536'/index'(encToUserId) androot/65537'/index'(privateData) under the owner's identity-authentication path.As a result, downstream consumers in dashpay/platform carry their own copies today:
rs-platform-wallet(crypto/auto_accept.rslocal const,crypto/contact_info.rsnamed consts) andrs-sdk-ffi's resolver signer (raw16/65536/65537literals — it cannot import platform-wallet). Duplicated magic numbers for canonical derivation constants are exactly whatdip9exists to prevent (noticed while fixing the same issue for the invitation constants in dashpay/platform#4041).What was done?
Added to
key-wallet/src/dip9.rs, beside their siblings, each with a doc comment describing the derivation family:FEATURE_PURPOSE_DASHPAY_AUTO_ACCEPT: u32 = 16DASHPAY_CONTACT_INFO_ENC_TO_USER_ID_CHILD: u32 = 1 << 16DASHPAY_CONTACT_INFO_PRIVATE_DATA_CHILD: u32 = (1 << 16) + 1No behavior change — documented constants only. The dashpay/platform call sites will switch to them on their next rust-dashcore bump.
How Has This Been Tested?
cargo check -p key-wallet+cargo fmtclean; additive constants only, no runtime paths touched.Breaking Changes
None (additive).
Checklist:
🤖 Generated with Claude Code