diff --git a/README.md b/README.md index d2e9c6f04..ebe1f400f 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,6 @@ Supports (or should support) * Pay-to-contract support as in Appendix A of the [Blockstream sidechains whitepaper](https://www.blockstream.com/sidechains.pdf) * JSONRPC interaction with Dash Core * FFI bindings for C/Swift integration (dash-spv-ffi, key-wallet-ffi) -* [Unified SDK](UNIFIED_SDK.md) option for iOS that combines Core and Platform functionality * [High-level wallet management](key-wallet-manager/README.md) with transaction building and UTXO management # Known limitations @@ -112,7 +111,6 @@ Documentation can be found on [dashcore.readme.io/docs](https://dashcore.readme. ## Component Documentation * **[key-wallet-manager](key-wallet-manager/README.md)** - High-level wallet management guide -* **[Unified SDK](UNIFIED_SDK.md)** - iOS SDK combining Core and Platform functionality # Contributing diff --git a/UNIFIED_SDK.md b/UNIFIED_SDK.md deleted file mode 100644 index f66ab5ea4..000000000 --- a/UNIFIED_SDK.md +++ /dev/null @@ -1,90 +0,0 @@ -# Unified SDK Integration - -## Overview - -The rust-dashcore libraries (`dash-spv-ffi` and `key-wallet-ffi`) can be integrated into iOS applications in two ways: - -1. **Standalone Libraries** - Traditional approach with separate binaries -2. **Unified SDK** - Recommended approach combining all functionality into a single optimized binary - -## Unified SDK Architecture - -The Unified SDK combines: -- **dash-spv-ffi** - SPV client functionality -- **key-wallet-ffi** - HD wallet operations -- **dash-sdk-ffi** - Platform SDK functionality - -Into a single `DashUnifiedSDK.xcframework` that: -- Eliminates duplicate symbols -- Reduces total binary size by 79.4% (from 143MB to 29.5MB) -- Simplifies integration -- Maintains full API compatibility - -## Building the Unified SDK - -The Unified SDK is built from the platform-ios repository: - -```bash -cd ../platform-ios/packages/rs-sdk-ffi -./build_ios.sh -``` - -This produces `DashUnifiedSDK.xcframework` containing: -- All Core SDK symbols (`dash_spv_ffi_*`, `key_wallet_ffi_*`) -- All Platform SDK symbols (`dash_sdk_*`) -- Unified header with resolved type conflicts -- Support for both device and simulator architectures - -## Integration in iOS Projects - -### Using SwiftDashCoreSDK - -The SwiftDashCoreSDK automatically detects and uses the Unified SDK when available: - -```swift -// No code changes needed - same API -import SwiftDashCoreSDK - -let sdk = try DashSDK(configuration: .testnet()) -try await sdk.connect() -``` - -### Direct FFI Usage - -If using FFI directly: - -```swift -// Import from unified framework -import DashSPVFFI // Core functionality -import DashSDKFFI // Platform functionality - -// Initialize once for both -dash_sdk_init() -``` - -## Benefits - -1. **Size Reduction**: 79.4% smaller than separate libraries -2. **No Symbol Conflicts**: Shared dependencies included only once -3. **Simplified Distribution**: Single XCFramework to manage -4. **Better Performance**: Reduced memory footprint and faster load times -5. **Easier Maintenance**: One build process for all functionality - -## Compatibility - -- The Unified SDK maintains full API compatibility -- No code changes required when switching from standalone libraries -- Can still use libraries standalone if needed for specific use cases - -## Documentation - -For detailed technical information about the Unified SDK architecture: -- [UNIFIED_SDK_ARCHITECTURE.md](../platform-ios/packages/rs-sdk-ffi/UNIFIED_SDK_ARCHITECTURE.md) -- [MIGRATION_GUIDE.md](../platform-ios/packages/rs-sdk-ffi/MIGRATION_GUIDE.md) - -## Version Requirements - -- iOS 17.0+ deployment target -- Rust 1.70+ -- Swift 5.9+ -- Xcode 15.0+ diff --git a/dash-spv-ffi/CLAUDE.md b/dash-spv-ffi/CLAUDE.md index 979fa9507..6cb8fac28 100644 --- a/dash-spv-ffi/CLAUDE.md +++ b/dash-spv-ffi/CLAUDE.md @@ -27,23 +27,6 @@ The C header is auto-generated by the build script. To regenerate manually: cbindgen --config cbindgen.toml --crate dash-spv-ffi --output include/dash_spv_ffi.h ``` -### Unified SDK Build -For iOS integration with platform-ios: -```bash -# First build dash-spv-ffi for iOS targets (REQUIRED!) -cargo build --release --target aarch64-apple-ios -cargo build --release --target aarch64-apple-ios-sim - -# Then build the unified SDK -cd ../../platform-ios/packages/rs-sdk-ffi -./build_ios.sh - -# Copy to iOS project -cp -R build/DashUnifiedSDK.xcframework ../../../dashpay-ios/DashPayiOS/Libraries/ -``` - -**Important**: The unified SDK build process (`build_ios.sh`) merges dash-spv-ffi with platform SDK. You MUST build dash-spv-ffi first or changes won't be included! - ## Testing ### Rust Tests diff --git a/dash-spv-ffi/README.md b/dash-spv-ffi/README.md index 432876caa..02603b1bd 100644 --- a/dash-spv-ffi/README.md +++ b/dash-spv-ffi/README.md @@ -2,8 +2,6 @@ This crate provides C-compatible FFI bindings for the Dash SPV client library. -> **Note**: This library can be used standalone or as part of the [Unified SDK](../../platform-ios/packages/rs-sdk-ffi/UNIFIED_SDK_ARCHITECTURE.md) which combines both Core (SPV) and Platform functionality into a single optimized binary. The Unified SDK is recommended for iOS applications as it eliminates duplicate symbols and reduces binary size by 79.4%. - ## Features - Complete FFI wrapper for DashSpvClient @@ -26,17 +24,6 @@ This will generate: - Dynamic library: `target/release/libdash_spv_ffi.so` (or `.dylib` on macOS) - C header: `include/dash_spv_ffi.h` -### Unified SDK Build (Recommended for iOS) - -For iOS applications, use the Unified SDK which includes this library: - -```bash -cd ../../platform-ios/packages/rs-sdk-ffi -./build_ios.sh -``` - -This creates `DashUnifiedSDK.xcframework` containing both Core (SPV) and Platform symbols. - ## Usage See `examples/basic_usage.c` for a simple example of using the FFI bindings. diff --git a/key-wallet-ffi/README.md b/key-wallet-ffi/README.md index f75251245..e5f186f6a 100644 --- a/key-wallet-ffi/README.md +++ b/key-wallet-ffi/README.md @@ -2,8 +2,6 @@ FFI bindings for the key-wallet library, providing a C-compatible interface for use in other languages like Swift, Kotlin, Python, etc. -> **Note**: This library can be used standalone or as part of the [Unified SDK](../../platform-ios/packages/rs-sdk-ffi/UNIFIED_SDK_ARCHITECTURE.md) which combines both Core (including this wallet functionality) and Platform features into a single optimized binary. The Unified SDK is recommended for iOS applications as it eliminates duplicate symbols and reduces binary size by 79.4%. - ## Features - **C-compatible FFI**: Direct C-style FFI bindings without code generation @@ -42,17 +40,6 @@ cargo lipo --release cargo ndk -t arm64-v8a -t armeabi-v7a -t x86_64 -t x86 -o ./jniLibs build --release ``` -#### Unified SDK Build (Recommended for iOS) - -For iOS applications, use the Unified SDK which includes this library: - -```bash -cd ../../platform-ios/packages/rs-sdk-ffi -./build_ios.sh -``` - -This creates `DashUnifiedSDK.xcframework` containing both Core (including wallet functionality) and Platform symbols in a single optimized binary. - ## Usage Examples ### Swift