feat(platform-wallet): add gap-limit identity discovery scan#3188
feat(platform-wallet): add gap-limit identity discovery scan#3188QuantumExplorer wants to merge 1 commit intov3.1-devfrom
Conversation
Add DashSync-style identity discovery to PlatformWalletInfo that scans consecutive DIP-13 authentication key indices and queries Platform to find registered identities during wallet sync. New methods: - discover_identities: gap-limit scan using PublicKeyHash queries - discover_identities_with_contacts: same + fetches DashPay contacts Refactors shared key derivation and contact request parsing into reusable modules used by both discovery and asset lock processing. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ 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 |
|
✅ DashSDKFFI.xcframework built for this PR.
SwiftPM (host the zip at a stable URL, then use): .binaryTarget(
name: "DashSDKFFI",
url: "https://your.cdn.example/DashSDKFFI.xcframework.zip",
checksum: "35f483c483c97d2313c5429ca821e18553841a6defefc3cc9acbcd2a95eb115a"
)Xcode manual integration:
|
|
@coderabbitai review |
|
Follow-up refactor in #3206 — extracts duplicated contact request logic, replaces eprintln with tracing, names magic constants, and logs previously-swallowed parse errors. |
Issue being fixed or feature implemented
Implements DashSync-style gap-limit identity discovery for the platform-wallet crate, enabling wallet sync to find registered identities by scanning DIP-13 authentication key hashes against Platform.
What was done?
New: Identity Discovery Scanner
Added
discover_identities()anddiscover_identities_with_contacts()methods toPlatformWalletInfothat:m/9'/COIN_TYPE'/5'/0'/0'/identity_index'/0')Identity::fetch(&sdk, PublicKeyHash(hash))IdentityManagergap_limit(typically 5) consecutive missesThis mirrors the pattern used by DashSync iOS (
DSIdentitiesManager.retrieveIdentitiesByKeysWithCompletion:) which derives 5 consecutive keys beyond the last known used identity index and batch-queries Platform.Refactored: Shared Utilities
key_derivation.rs(derive_identity_auth_key_hash)parse_contact_request_documentto shared location inmod.rsmatured_transactions.rsnow uses these shared helpers (no API changes)How Has This Been Tested?
cargo check -p platform-walletpasses cleanlyBreaking Changes
None. All existing public APIs are unchanged.
Checklist
For future work:
🤖 Generated with Claude Code