Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 11 additions & 30 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 5 additions & 6 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,11 @@ members = [
]

[workspace.dependencies]
dashcore = { git = "https://github.com/dashpay/rust-dashcore", rev = "8cbae416458565faac21d3452fbc6d80b324f6d3" }
dash-spv = { git = "https://github.com/dashpay/rust-dashcore", rev = "8cbae416458565faac21d3452fbc6d80b324f6d3" }
dash-spv-ffi = { git = "https://github.com/dashpay/rust-dashcore", rev = "8cbae416458565faac21d3452fbc6d80b324f6d3" }
key-wallet = { git = "https://github.com/dashpay/rust-dashcore", rev = "8cbae416458565faac21d3452fbc6d80b324f6d3" }
key-wallet-manager = { git = "https://github.com/dashpay/rust-dashcore", rev = "8cbae416458565faac21d3452fbc6d80b324f6d3" }
dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", rev = "8cbae416458565faac21d3452fbc6d80b324f6d3" }
dashcore = { git = "https://github.com/dashpay/rust-dashcore", rev = "88eacdf19d984c34a4bd8a586ede2c4acf055c54" }
dash-spv = { git = "https://github.com/dashpay/rust-dashcore", rev = "88eacdf19d984c34a4bd8a586ede2c4acf055c54" }
dash-spv-ffi = { git = "https://github.com/dashpay/rust-dashcore", rev = "88eacdf19d984c34a4bd8a586ede2c4acf055c54" }
key-wallet = { git = "https://github.com/dashpay/rust-dashcore", rev = "88eacdf19d984c34a4bd8a586ede2c4acf055c54" }
dashcore-rpc = { git = "https://github.com/dashpay/rust-dashcore", rev = "88eacdf19d984c34a4bd8a586ede2c4acf055c54" }

# Optimize heavy crypto crates even in dev/test builds so that
# Halo 2 proof generation and verification run at near-release speed.
Expand Down
3 changes: 0 additions & 3 deletions packages/rs-dpp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,13 @@ chrono = { version = "0.4.35", default-features = false, features = [
chrono-tz = { version = "0.8", optional = true }
ciborium = { version = "0.2.2", optional = true }
dashcore = { workspace = true, features = [
"std",
"secp-recovery",
"rand",
"signer",
"serde",
"eddsa",
], default-features = false }
key-wallet = { workspace = true, optional = true }
key-wallet-manager = { workspace = true, optional = true }
dash-spv = { workspace = true, optional = true }
dashcore-rpc = { workspace = true, optional = true }

Expand Down Expand Up @@ -94,7 +92,6 @@ core_quorum_validation = ["dashcore/quorum_validation"]
core_key_wallet = ["dep:key-wallet"]
core_key_wallet_bincode = ["dep:key-wallet", "key-wallet/bincode"]
core_key_wallet_bip_38 = ["dep:key-wallet", "key-wallet/bip38"]
core_key_wallet_manager = ["dep:key-wallet-manager"]
core_key_wallet_serde = ["dep:key-wallet", "key-wallet/serde"]
core_spv = ["dep:dash-spv"]
core_rpc_client = ["dep:dashcore-rpc"]
Expand Down
3 changes: 0 additions & 3 deletions packages/rs-dpp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ pub use dashcore;
#[cfg(feature = "core_key_wallet")]
pub use key_wallet;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We stll have manager and there is a feature flag to enable or disable it. For some crates we need it enabled and for some of them - disabled.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tell me one crate that need the manager to be enable and other one that needs it to be disble

#[cfg(feature = "core_key_wallet_manager")]
pub use key_wallet_manager;

#[cfg(feature = "core_spv")]
pub use dash_spv;

Expand Down
4 changes: 1 addition & 3 deletions packages/rs-platform-wallet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ platform-encryption = { path = "../rs-platform-encryption" }

# Key wallet dependencies (from rust-dashcore)
key-wallet = { workspace = true }
key-wallet-manager = { workspace = true, optional = true }

# Core dependencies
dashcore = { workspace = true }
Expand All @@ -31,7 +30,6 @@ rand = "0.8"


[features]
default = ["bls", "eddsa", "manager"]
default = ["bls", "eddsa"]
bls = ["key-wallet/bls"]
eddsa = ["key-wallet/eddsa"]
manager = ["key-wallet-manager"]
4 changes: 1 addition & 3 deletions packages/rs-platform-wallet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,10 @@ The package is structured as follows:
### Compatibility
- Works with `WalletManager<PlatformWalletInfo>` for standard wallet management
- Works with `SPVWalletManager<PlatformWalletInfo>` for SPV/light client functionality
- Fully compatible with existing `key-wallet-manager` infrastructure

## Dependencies

- `key-wallet`: Core wallet functionality
- `key-wallet-manager`: Wallet management and SPV support
- `key-wallet`: Core wallet functionality, wallet management and SPV support
- `dpp`: Dash Platform Protocol types and identity definitions
- `dashcore`: Core blockchain types

Expand Down
11 changes: 3 additions & 8 deletions packages/rs-platform-wallet/examples/basic_usage.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
//! Example demonstrating basic usage of PlatformWalletInfo

use key_wallet::manager::WalletManager;
use key_wallet::wallet::managed_wallet_info::wallet_info_interface::WalletInfoInterface;
use key_wallet::Network;
use platform_wallet::error::PlatformWalletError;
Expand All @@ -22,14 +23,8 @@ fn main() -> Result<(), PlatformWalletError> {
platform_wallet.identities().len()
);

// The platform wallet can be used with WalletManager (requires "manager" feature)
#[cfg(feature = "manager")]
{
use key_wallet_manager::wallet_manager::WalletManager;

let _wallet_manager = WalletManager::<PlatformWalletInfo>::new(network);
println!("Platform wallet successfully integrated with wallet managers!");
}
let _wallet_manager = WalletManager::<PlatformWalletInfo>::new(network);
println!("Platform wallet successfully integrated with wallet managers!");

Ok(())
}
3 changes: 0 additions & 3 deletions packages/rs-platform-wallet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,3 @@ pub use established_contact::EstablishedContact;
pub use identity_manager::IdentityManager;
pub use managed_identity::ManagedIdentity;
pub use platform_wallet_info::PlatformWalletInfo;

#[cfg(feature = "manager")]
pub use key_wallet_manager;
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::platform_wallet_info::PlatformWalletInfo;
use crate::IdentityManager;
use dashcore::{Address as DashAddress, Network, Transaction};
use dashcore::{Address as DashAddress, Network, Transaction, Txid};
use dpp::prelude::CoreBlockHeight;
use key_wallet::account::{ManagedAccountCollection, TransactionRecord};
use key_wallet::wallet::managed_wallet_info::wallet_info_interface::WalletInfoInterface;
Expand Down Expand Up @@ -111,4 +111,12 @@ impl WalletInfoInterface for PlatformWalletInfo {
fn update_synced_height(&mut self, current_height: u32) {
self.wallet_info.update_synced_height(current_height)
}

fn mark_instant_send_utxos(&mut self, txid: &Txid) -> bool {
self.wallet_info.mark_instant_send_utxos(txid)
}

fn monitor_revision(&self) -> u64 {
self.wallet_info.monitor_revision()
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ impl WalletTransactionChecker for PlatformWalletInfo {
&mut self,
tx: &Transaction,
context: TransactionContext,
wallet: &Wallet,
wallet: &mut Wallet,
update_state: bool,
update_balance: bool,
) -> TransactionCheckResult {
// Check transaction with underlying wallet info
let result = self
.wallet_info
.check_core_transaction(tx, context, wallet, update_state)
.check_core_transaction(tx, context, wallet, update_state, update_balance)
.await;

// If the transaction is relevant, and it's an asset lock, automatically fetch identities
Expand Down
2 changes: 1 addition & 1 deletion packages/rs-sdk-ffi/build_ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ if [[ "$CLEAN_BUILD" -eq 1 ]]; then
cargo clean --release --target aarch64-apple-ios-sim -p rs-sdk-ffi 2>/dev/null || true
cargo clean --release --target x86_64-apple-ios -p rs-sdk-ffi 2>/dev/null || true
# Also clean path-dependency crates that cargo may cache
for pkg in dashcore key-wallet key-wallet-manager dash-spv dash-spv-ffi rs-platform-wallet rs-platform-wallet-ffi; do
for pkg in dashcore key-wallet dash-spv dash-spv-ffi rs-platform-wallet rs-platform-wallet-ffi; do
cargo clean --release --target aarch64-apple-ios -p "$pkg" 2>/dev/null || true
cargo clean --release --target aarch64-apple-ios-sim -p "$pkg" 2>/dev/null || true
cargo clean --release --target x86_64-apple-ios -p "$pkg" 2>/dev/null || true
Expand Down
2 changes: 0 additions & 2 deletions packages/rs-sdk-ffi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ mod signer_simple;
mod system;
mod token;
mod types;
mod unified;
mod utils;
Comment on lines 32 to 35
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Blocking: PR removes unified FFI exports but keeps shipped headers declaring dash_unified_sdk_*

The branch deletes packages/rs-sdk-ffi/src/unified.rs and removes mod unified; / pub use unified::*; from packages/rs-sdk-ffi/src/lib.rs, so the dash_unified_sdk_* symbols are no longer implemented. However, the committed headers still declare those APIs in packages/rs-sdk-ffi/include/dash_sdk_ffi.h:2148-2219 and packages/rs-sdk-ffi/test_header.h:1608-1677, and cbindgen configs still include the dash_unified_sdk_* prefix. Consumers compiling against the shipped headers will still expect those symbols and can fail at link/load time.

source: codex

🤖 Fix this with AI agents
These findings are from an automated code review. Verify each finding against the current code and only fix it if needed.

In `packages/rs-sdk-ffi/src/lib.rs`:
- [BLOCKING] lines 32-35: PR removes unified FFI exports but keeps shipped headers declaring `dash_unified_sdk_*`
  The branch deletes `packages/rs-sdk-ffi/src/unified.rs` and removes `mod unified;` / `pub use unified::*;` from `packages/rs-sdk-ffi/src/lib.rs`, so the `dash_unified_sdk_*` symbols are no longer implemented. However, the committed headers still declare those APIs in `packages/rs-sdk-ffi/include/dash_sdk_ffi.h:2148-2219` and `packages/rs-sdk-ffi/test_header.h:1608-1677`, and cbindgen configs still include the `dash_unified_sdk_*` prefix. Consumers compiling against the shipped headers will still expect those symbols and can fail at link/load time.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@QuantumExplorer how are you updating the headers?? any script to generate them or I should use cbindgen cli directly??

mod voting;

Expand Down Expand Up @@ -65,7 +64,6 @@ pub use signer_simple::*;
pub use system::*;
pub use token::*;
pub use types::*;
pub use unified::*;
pub use utils::*;
pub use voting::*;

Expand Down
Loading
Loading