From 77170ab0f4f8d4a2ea4c91f2f6938aa164289726 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Tue, 14 Jul 2026 16:39:00 +0700 Subject: [PATCH 1/2] feat(key-wallet): add the DIP-15 auto-accept feature constant to dip9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- key-wallet/src/dip9.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/key-wallet/src/dip9.rs b/key-wallet/src/dip9.rs index 276972df7..c54fc64e7 100644 --- a/key-wallet/src/dip9.rs +++ b/key-wallet/src/dip9.rs @@ -136,6 +136,13 @@ pub const FEATURE_PURPOSE_IDENTITIES_SUBFEATURE_INVITATIONS: u32 = 3; pub const FEATURE_PURPOSE_ASSET_LOCK_SUBFEATURE_ADDRESS_TOPUP: u32 = 4; pub const FEATURE_PURPOSE_ASSET_LOCK_SUBFEATURE_SHIELDED_ADDRESS_TOPUP: u32 = 5; pub const FEATURE_PURPOSE_DASHPAY: u32 = 15; +/// DIP-15 auto-accept feature index: the derivation family +/// `m/9'/coin_type'/16'/expiry'` holding the shareable, expiry-bounded +/// bearer keys that a DashPay user embeds in an auto-accept QR (`dapk`) so a +/// scanned contact request auto-establishes. Consumers (the platform wallet's +/// auto-accept path builder and the FFI signer's raw-key export gate) must +/// reference this constant rather than a local literal. +pub const FEATURE_PURPOSE_DASHPAY_AUTO_ACCEPT: u32 = 16; /// DIP-17: Platform Payment Addresses feature index pub const FEATURE_PURPOSE_PLATFORM_PAYMENT: u32 = 17; pub const DASH_BIP44_PATH_MAINNET: IndexConstPath<2> = IndexConstPath { From 6ab1ac083840745dcc86adc290dc712c6d398ec4 Mon Sep 17 00:00:00 2001 From: Ivan Shumkov Date: Tue, 14 Jul 2026 16:47:46 +0700 Subject: [PATCH 2/2] feat(key-wallet): add the DIP-15 contactInfo child constants to dip9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- key-wallet/src/dip9.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/key-wallet/src/dip9.rs b/key-wallet/src/dip9.rs index c54fc64e7..da8a26aee 100644 --- a/key-wallet/src/dip9.rs +++ b/key-wallet/src/dip9.rs @@ -143,6 +143,14 @@ pub const FEATURE_PURPOSE_DASHPAY: u32 = 15; /// auto-accept path builder and the FFI signer's raw-key export gate) must /// reference this constant rather than a local literal. pub const FEATURE_PURPOSE_DASHPAY_AUTO_ACCEPT: u32 = 16; +/// DIP-15 contactInfo `encToUserId` hardened child (`root / 65536' / index'`, +/// where `root` is the owner's identity-authentication path): derives the +/// AES key that encrypts the contact id in a `contactInfo` document. +pub const DASHPAY_CONTACT_INFO_ENC_TO_USER_ID_CHILD: u32 = 1 << 16; +/// DIP-15 contactInfo `privateData` hardened child (`root / 65537' / index'`): +/// derives the AES key that encrypts the private-data blob in a `contactInfo` +/// document. +pub const DASHPAY_CONTACT_INFO_PRIVATE_DATA_CHILD: u32 = (1 << 16) + 1; /// DIP-17: Platform Payment Addresses feature index pub const FEATURE_PURPOSE_PLATFORM_PAYMENT: u32 = 17; pub const DASH_BIP44_PATH_MAINNET: IndexConstPath<2> = IndexConstPath {