Conversation
Co-authored-by: Borja Castellano <borja.castellano@dash.org>
Co-authored-by: Quantum Explorer <quantum@dash.org>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Borja Castellano <borja.castellano@dash.org>
Co-authored-by: Borja Castellano <borja.castellano@dash.org>
Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Borja Castellano <borja.castellano@dash.org>
|
Important Review skippedToo many files! This PR contains 259 files, which is 109 over the limit of 150. ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (259)
You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). 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 |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
✅ gRPC Query Coverage Report |
Issue being fixed or feature implemented
Adds full iOS SDK support for Dash Platform, unifying Core (SPV wallet) and Platform (identity/documents/DashPay) functionality into a single native iOS framework. This enables iOS applications to interact with both the Dash Core network (SPV sync, transactions, HD wallets) and Dash Platform (identities, documents, data contracts, DashPay contacts) through idiomatic Swift APIs backed by Rust FFI.
What was done?
New Crates
rs-platform-wallet— Core Rust library for wallet-aware identity management. Combines SPV wallet state (ManagedWalletInfofromkey-wallet) with Platform identity tracking viaIdentityManager. Key types:PlatformWalletInfo: Unified wallet + identity container with transaction maturity tracking and contact request processingManagedIdentity: Wrapsdpp::Identitywith sync state, user labels, established contacts, and inbound/outbound contact requestsContactRequest: One-way DashPay relationship with DIP-15 encrypted extended public key (96 bytes: IV + AES-256-CBC ciphertext)EstablishedContact: Bidirectional contact (auto-established when mutual requests are detected), with alias, notes, hidden status, and multi-account supportrs-platform-encryption— DIP-15 cryptographic utilities:rs-platform-wallet-ffi— C-compatible FFI bindings forrs-platform-walletwith opaque handle management (Box::into_raw/Box::from_raw), generated C header (platform_wallet_ffi.h), comprehensive integration and unit testsSDK Enhancements
rs-sdk— Newplatform/dashpaymodule providing high-level Rust helpers for DashPay contact request creation, querying, and DIP-15 key negotiationrs-sdk-ffi— Expanded unified FFI surface with new modules:address/— Platform address queries (info, balance changes, branch/trunk state) and transitions (top-up, transfer, withdraw)identity/— Full identity lifecycle FFI (create from addresses, top-up, transfer credits, withdraw, key management)dashpay/— Contact request FFI operationsrs-platform-wallet-ffisymbols for a single unified C interfaceDashSDKConfig,DashSDKAddressInfo,DashSDKNetwork, result enums)Swift SDK (96 source files)
Addresses,PlatformAddressInfowrappers with multi-format support (hex, bech32m, raw bytes)DashPayService,ContactRequest,EstablishedContactfor social payment workflowsSPVClientandSPVEventHandlerwrapping Core SPV FFI with progress tracking, event callbacks, and network lifecycle managementHDWallet,HDTransactionwith SwiftData persistence, BIP44 derivation (13 account categories), multi-account supportFilterMatch,HDWalletModels,CoreTransaction,CoreTypesfor SPV dataTokenModel,DataContract,DocumentModel,IdentityModelwith full SwiftData persistence layerTransactionBuilderandTransactionServicefor creating and broadcasting transactionsUnifiedStateManagercoordinating Core wallet sync, Platform identity sync, and cross-layer operationsKeychainManager,KeyWalletTypes,PrivateKeyUtils, input validationDataTransformers(hex/bech32m/base58 conversion),TestnetNodesconfiguration, error handlingSendable-compliant for Swift structured concurrency (async/await)Build & CI
build_ios.sh— Builds unifiedrs-sdk-ffiframework (Core + Platform), with intelligent dependency change detection and automatic cache invalidation when localrust-dashcorechangesswift-sdk-build.yml) — Automated iOS framework builds on PR/push with protoc caching, multi-architecture targets (device + simulator ARM64 + simulator x86), 90-minute timeoutOther Changes
Cargo.lockand workspaceCargo.tomlto include new cratesrs-dapi-client(tonic channel),rs-dapi(bloom filter streaming),rs-dpp(dependency versions).bakfiles fromrs-sdk-ffiswift-sdk/Package.swiftupdated for new module structureArchitecture
How Has This Been Tested?
rs-platform-wallet-ffi: Comprehensive integration tests (tests/integration_tests.rs) and comprehensive tests (tests/comprehensive_tests.rs) covering FFI handle lifecycle, contact request creation, identity management, and memory safetyrs-platform-wallet: Contact workflow tests (tests/contact_workflow_tests.rs) covering the full contact request → established contact lifecycle with auto-establishment logicswift-sdk-build.yml) targeting iPhone simulator (arm64 + x86_64) and device (arm64)Breaking Changes
None — this is entirely additive. New crates and modules are introduced without modifying existing public APIs.
Checklist:
For repository code-owners and collaborators only