Skip to content
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
09c8aef
feat(swift-sdk): add ZK shielded sync status UI with periodic note an…
QuantumExplorer Mar 20, 2026
d2fdce3
Merge remote-tracking branch 'origin/v3.1-dev' into feat/ios-zk-integ…
QuantumExplorer Mar 20, 2026
5ebd4bc
feat(swift-sdk): add collapsible sync status sections and remove anim…
QuantumExplorer Mar 20, 2026
93205ff
feat(ffi): support local Docker setup with quorum sidecar for regtest
QuantumExplorer Mar 21, 2026
55008db
feat(swift-sdk): add account creation UI, regtest SPV config, and new…
QuantumExplorer Mar 21, 2026
3212d87
fix(swift-sdk): list Platform Payment accounts in wallet account view
QuantumExplorer Mar 21, 2026
822cc24
fix(swift-sdk): use HTTP for local DAPI and list platform payment acc…
QuantumExplorer Mar 21, 2026
2cfe1e8
feat(swift-sdk): add local Docker faucet button and RPC password setting
QuantumExplorer Mar 21, 2026
ac65440
Merge remote-tracking branch 'origin/v3.1-dev' into feat/ios-zk-integ…
QuantumExplorer Mar 26, 2026
033c509
chore: update for key-wallet-manager merge into key-wallet crate
QuantumExplorer Mar 26, 2026
f1ef279
fix(swift-sdk): only show Docker toggle on Local network, auto-disabl…
QuantumExplorer Mar 26, 2026
0bd1341
Merge remote-tracking branch 'origin/v3.1-dev' into feat/ios-zk-integ…
QuantumExplorer Mar 29, 2026
c8d9d86
fix: revert rs-dpp and rs-platform-wallet to v3.1-dev versions
QuantumExplorer Mar 29, 2026
a6671ff
fix(swift-sdk): use Docker peers for SPV when useDockerSetup is enabled
QuantumExplorer Mar 29, 2026
13c6e19
fix(swift-sdk): bump rust-dashcore to a1b2116 and clear default peers…
QuantumExplorer Mar 29, 2026
c38b5a0
fix(swift-sdk): show Platform Payment account addresses in account de…
QuantumExplorer Mar 29, 2026
87320a2
fix(swift-sdk): encode Platform Payment addresses as bech32m in accou…
QuantumExplorer Mar 29, 2026
53adb35
fix(swift-sdk): fix bech32m HRP for platform address detection in Sen…
QuantumExplorer Mar 29, 2026
b367564
fix(swift-sdk): add Core→Platform and Core→Core send flows, fix defau…
QuantumExplorer Mar 29, 2026
e032548
fix(swift-sdk): use stored_height for filter sync progress display
QuantumExplorer Mar 30, 2026
870a0cd
feat(swift-sdk): add quick-fill address buttons in Send view
QuantumExplorer Mar 30, 2026
ab5a56a
chore: bump rust-dashcore to 5db46b4 (adds asset lock transaction bui…
QuantumExplorer Mar 30, 2026
2c27c01
Merge branch 'v3.1-dev' into feat/ios-zk-integration
QuantumExplorer Mar 31, 2026
7fa5afe
feat(swift-sdk): add Swift wrapper for asset lock transaction builder
QuantumExplorer Mar 31, 2026
f2d9088
feat(swift-sdk): add broadcastTransaction to SPVClient
QuantumExplorer Mar 31, 2026
7487f45
feat(swift-sdk): add InstantSend lock store and waitForInstantLock API
QuantumExplorer Mar 31, 2026
808c5f1
feat(swift-sdk): wire up Core→Platform asset lock transfer flow
QuantumExplorer Mar 31, 2026
3d47fac
fix(swift-sdk): convert platform address to P2PKH scriptPubKey for as…
QuantumExplorer Mar 31, 2026
b224aff
fix(swift-sdk): fix dangling pointer in asset lock FFI call
QuantumExplorer Mar 31, 2026
5b1c28f
chore: bump rust-dashcore to 6638745 (fix asset lock coin selection)
QuantumExplorer Mar 31, 2026
c3c9c7b
fix(swift-sdk): replace continuation-based IS lock wait with simple p…
QuantumExplorer Mar 31, 2026
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.

1 change: 0 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ dashcore = { git = "https://github.com/dashpay/rust-dashcore", rev = "8cbae41645
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" }

# Optimize heavy crypto crates even in dev/test builds so that
Expand Down
4 changes: 1 addition & 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,7 @@ 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_manager = ["dep:key-wallet"]
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: 1 addition & 2 deletions packages/rs-dpp/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ pub use dashcore;
#[cfg(feature = "core_key_wallet")]
pub use key_wallet;

#[cfg(feature = "core_key_wallet_manager")]
pub use key_wallet_manager;
// key_wallet_manager was merged into key_wallet crate

Comment on lines 12 to 17

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check for usages of dpp::key_wallet_manager in the codebase
rg -n "dpp::key_wallet_manager" --type rust

Repository: dashpay/platform

Length of output: 42


🏁 Script executed:

#!/bin/bash
# Check if core_key_wallet_manager feature exists in rs-dpp Cargo.toml
cat packages/rs-dpp/Cargo.toml | grep -A 20 "\[features\]"

Repository: dashpay/platform

Length of output: 800


🏁 Script executed:

#!/bin/bash
# Search for all references to key_wallet_manager in Cargo.toml files
rg "key_wallet_manager" --type toml -n

Repository: dashpay/platform

Length of output: 370


🏁 Script executed:

#!/bin/bash
# Look for references to core_key_wallet_manager feature in the codebase
rg "core_key_wallet_manager" --type toml -n

Repository: dashpay/platform

Length of output: 370


🏁 Script executed:

#!/bin/bash
# Check if key_wallet_manager module/directory still exists
fd "key_wallet_manager" --type f --type d packages/rs-dpp/

Repository: dashpay/platform

Length of output: 42


🏁 Script executed:

#!/bin/bash
# Check the structure of key_wallet module to understand what was merged
ls -la packages/rs-dpp/src/ | grep -i wallet

Repository: dashpay/platform

Length of output: 42


🏁 Script executed:

#!/bin/bash
# Search for any re-export patterns with key_wallet_manager to understand the merge better
rg "key_wallet_manager" packages/rs-dpp/src/ -n

Repository: dashpay/platform

Length of output: 144


🏁 Script executed:

#!/bin/bash
# Check the current state of packages/rs-dpp/src/lib.rs around the removed export
sed -n '1,30p' packages/rs-dpp/src/lib.rs

Repository: dashpay/platform

Length of output: 668


🏁 Script executed:

#!/bin/bash
# Check how rs-sdk handles core_key_wallet_manager feature
grep -A 5 -B 5 "core_key_wallet_manager" packages/rs-sdk/src/lib.rs

Repository: dashpay/platform

Length of output: 42


🏁 Script executed:

#!/bin/bash
# Check if there's any re-export of key_wallet or key_wallet_manager in rs-sdk
rg "pub use.*key_wallet" packages/rs-sdk/src/ -n

Repository: dashpay/platform

Length of output: 42


🏁 Script executed:

#!/bin/bash
# Check the git history to understand what was removed
git log --oneline -n 30 -- packages/rs-dpp/src/lib.rs

Repository: dashpay/platform

Length of output: 150


🏁 Script executed:

#!/bin/bash
# Check if key_wallet crate has a manager module or submodule
rg "mod.*manager|pub.*manager" packages/rs-dpp/Cargo.lock -A 2 | head -50

Repository: dashpay/platform

Length of output: 126


🏁 Script executed:

#!/bin/bash
# Search for any imports of key_wallet in test files or examples
rg "use key_wallet" packages/ -n --type rust | head -20

Repository: dashpay/platform

Length of output: 2541


core_key_wallet_manager feature no longer provides re-export for backwards compatibility.

The core_key_wallet_manager feature still exists in Cargo.toml and is referenced by downstream crates (e.g., rs-sdk marks it as a default feature), but the corresponding pub use key_wallet_manager; re-export has been removed. While the comment indicates an intentional merge of key_wallet_manager into the key_wallet crate, external consumers that relied on dpp::key_wallet_manager::... paths will now encounter compilation errors.

Consider either:

  1. Adding a re-export alias for backwards compatibility: #[cfg(feature = "core_key_wallet_manager")] pub use key_wallet as key_wallet_manager;
  2. Removing the core_key_wallet_manager feature entirely if it is no longer needed
  3. Documenting the migration path clearly (consumers should use key_wallet::manager::... directly)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/rs-dpp/src/lib.rs` around lines 12 - 16, Add a backwards-compatible
re-export for the removed key_wallet_manager symbol so downstream crates using
dpp::key_wallet_manager::... keep compiling: restore a conditional alias by
adding a cfg-guarded re-export for the feature core_key_wallet_manager (e.g.,
under the same cfg style as the existing core_key_wallet feature) that maps
key_wallet to the old name (key_wallet_manager); alternatively, if you prefer
removal, delete the core_key_wallet_manager feature from Cargo.toml and update
documentation and downstream usages to import key_wallet::manager::... directly.

#[cfg(feature = "core_spv")]
pub use dash_spv;
Expand Down
3 changes: 1 addition & 2 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 @@ -34,4 +33,4 @@ rand = "0.8"
default = ["bls", "eddsa", "manager"]
bls = ["key-wallet/bls"]
eddsa = ["key-wallet/eddsa"]
manager = ["key-wallet-manager"]
manager = []
2 changes: 1 addition & 1 deletion packages/rs-platform-wallet/examples/basic_usage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ fn main() -> Result<(), PlatformWalletError> {
// The platform wallet can be used with WalletManager (requires "manager" feature)
#[cfg(feature = "manager")]
{
use key_wallet_manager::wallet_manager::WalletManager;
use key_wallet::manager::wallet_manager::WalletManager;

let _wallet_manager = WalletManager::<PlatformWalletInfo>::new(network);
println!("Platform wallet successfully integrated with wallet managers!");
Expand Down
2 changes: 1 addition & 1 deletion packages/rs-platform-wallet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ pub use managed_identity::ManagedIdentity;
pub use platform_wallet_info::PlatformWalletInfo;

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

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if key-wallet is used elsewhere in the crate without the manager feature gate
rg -n "use key_wallet" packages/rs-platform-wallet/src --type rust

Repository: dashpay/platform

Length of output: 3546


🏁 Script executed:

# Check Cargo.toml for key-wallet dependency configuration
cat -n packages/rs-platform-wallet/Cargo.toml | head -40

Repository: dashpay/platform

Length of output: 1120


🏁 Script executed:

# Search for "manager" feature definition in Cargo.toml
rg -n "manager" packages/rs-platform-wallet/Cargo.toml

Repository: dashpay/platform

Length of output: 116


🏁 Script executed:

# Check if platform_wallet_info is gated by manager feature
rg -n "#\[cfg.*manager" packages/rs-platform-wallet/src --type rust

Repository: dashpay/platform

Length of output: 129


🏁 Script executed:

# Check what platform_wallet_info module exposes publicly
rg -n "^pub " packages/rs-platform-wallet/src/platform_wallet_info/mod.rs | head -20

Repository: dashpay/platform

Length of output: 94


🏁 Script executed:

# Check if any of the crate's public API depends on the re-export being available
rg -n "platform_wallet::key_wallet" . --type rust

Repository: dashpay/platform

Length of output: 42


Remove the unused re-export or clarify its purpose.

The pub use key_wallet; re-export at line 25 is feature-gated under manager, but the manager feature is empty (defined as manager = [] in Cargo.toml) and included in default features. More critically, this re-export is never used—no code in the codebase references platform_wallet::key_wallet. Internal modules import directly from key_wallet, and the public API (PlatformWalletInfo) does not depend on this re-export. Either remove it or document its intended purpose if it's meant for external consumers.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/rs-platform-wallet/src/lib.rs` around lines 24 - 25, The `pub use
key_wallet;` re-export guarded by the "manager" feature is unused; either remove
the re-export from lib.rs (delete the line `pub use key_wallet;` under
#[cfg(feature = "manager")]) or, if intended for external consumers, add a clear
public doc comment above it and ensure the "manager" feature actually exposes
meaningful functionality in Cargo.toml (not an empty `manager = []`) so external
users can rely on `platform_wallet::key_wallet`; references to
`PlatformWalletInfo` and internal imports should keep using direct `key_wallet`
imports if you remove the re-export.

Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,8 @@ 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: &dashcore::Txid) -> bool {
self.wallet_info.mark_instant_send_utxos(txid)
}
}
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,
is_from_mempool: 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, is_from_mempool)
.await;

// If the transaction is relevant, and it's an asset lock, automatically fetch identities
Expand Down
54 changes: 40 additions & 14 deletions packages/rs-sdk-ffi/src/sdk.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,21 +331,47 @@ pub unsafe extern "C" fn dash_sdk_create_trusted(config: *const DashSDKConfig) -
);

// Create trusted context provider
let trusted_provider = match rs_sdk_trusted_context_provider::TrustedHttpContextProvider::new(
network,
None, // Use default quorum lookup endpoints
std::num::NonZeroUsize::new(100).unwrap(), // Cache size
) {
Ok(provider) => {
info!("dash_sdk_create_trusted: trusted context provider created");
Arc::new(provider)
// For local/regtest, use the quorum sidecar at localhost:22444 (dashmate Docker default)
let is_local = matches!(
config.network,
DashSDKNetwork::SDKLocal | DashSDKNetwork::SDKRegtest
);
let trusted_provider = if is_local {
info!("dash_sdk_create_trusted: using local quorum sidecar for regtest");
match rs_sdk_trusted_context_provider::TrustedHttpContextProvider::new_with_url(
network,
"http://127.0.0.1:22444".to_string(),
std::num::NonZeroUsize::new(100).unwrap(),
Comment thread
QuantumExplorer marked this conversation as resolved.
) {
Ok(provider) => {
info!("dash_sdk_create_trusted: local trusted context provider created");
Arc::new(provider)
}
Err(e) => {
error!(error = %e, "dash_sdk_create_trusted: failed to create local context provider");
return DashSDKResult::error(DashSDKError::new(
DashSDKErrorCode::InternalError,
format!("Failed to create local context provider: {}", e),
));
}
}
Err(e) => {
error!(error = %e, "dash_sdk_create_trusted: failed to create trusted context provider");
return DashSDKResult::error(DashSDKError::new(
DashSDKErrorCode::InternalError,
format!("Failed to create trusted context provider: {}", e),
));
} else {
match rs_sdk_trusted_context_provider::TrustedHttpContextProvider::new(
network,
None, // Use default quorum lookup endpoints
std::num::NonZeroUsize::new(100).unwrap(), // Cache size
) {
Ok(provider) => {
info!("dash_sdk_create_trusted: trusted context provider created");
Arc::new(provider)
}
Err(e) => {
error!(error = %e, "dash_sdk_create_trusted: failed to create trusted context provider");
return DashSDKResult::error(DashSDKError::new(
DashSDKErrorCode::InternalError,
format!("Failed to create trusted context provider: {}", e),
));
}
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ public enum AccountCategory: Equatable, Hashable, Sendable {
case providerOwnerKeys
case providerOperatorKeys
case providerPlatformKeys
case dashPayReceivingFunds
case dashPayExternalAccount
case platformPayment
}

// MARK: - Account Info
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ class SPVClient: @unchecked Sendable {
return dash_spv_ffi_config_mainnet()
case 1:
return dash_spv_ffi_config_testnet()
case 2:
// Regtest (local Docker)
return dash_spv_ffi_config_new(FFINetwork(rawValue: 2))
case 3:
Comment on lines 44 to 50

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.

🟡 Suggestion: Borrowed wallet-manager FFI handle can outlive the owning SPV client

The wallet-manager handle obtained from the FFI is a borrowed pointer whose lifetime is tied to the SPV client. If the SPV client is deallocated while the wallet manager is still in use (e.g., during async transaction operations), the handle becomes a dangling pointer. Consider either copying the handle or ensuring the SPV client's lifetime encompasses all wallet manager usage.

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/swift-sdk/Sources/SwiftDashSDK/Core/SPV/SPVClient.swift`:
- [SUGGESTION] lines 1-50: Borrowed wallet-manager FFI handle can outlive the owning SPV client
  The wallet-manager handle obtained from the FFI is a borrowed pointer whose lifetime is tied to the SPV client. If the SPV client is deallocated while the wallet manager is still in use (e.g., during async transaction operations), the handle becomes a dangling pointer. Consider either copying the handle or ensuring the SPV client's lifetime encompasses all wallet manager usage.

Comment on lines 44 to 50

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.

🟡 Suggestion: Core→Platform top-up accepts first InstantSend lock without SPV validation

The top-up flow accepts the first InstantSend lock notification for a transaction without verifying that SPV has actually validated it against the chain. An attacker on the local network could inject a fake IS notification. The code should verify the transaction's confirmation status via SPV before crediting the platform account.

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/swift-sdk/Sources/SwiftDashSDK/Core/SPV/SPVClient.swift`:
- [SUGGESTION] lines 1-50: Core→Platform top-up accepts first InstantSend lock without SPV validation
  The top-up flow accepts the first InstantSend lock notification for a transaction without verifying that SPV has actually validated it against the chain. An attacker on the local network could inject a fake IS notification. The code should verify the transaction's confirmation status via SPV before crediting the platform account.

// Map devnet to custom FFINetwork value 3
return dash_spv_ffi_config_new(FFINetwork(rawValue: 3))
Expand Down Expand Up @@ -134,9 +137,9 @@ class SPVClient: @unchecked Sendable {
}

private static func readLocalCorePeers() -> [String] {
// If no override is set, default to 127.0.0.1 and let FFI pick port by network
// If no override is set, default to dashmate Docker Core P2P port
let raw = UserDefaults.standard.string(forKey: "corePeerAddresses")?.trimmingCharacters(in: .whitespacesAndNewlines)
let list = (raw?.isEmpty == false ? raw! : "127.0.0.1")
let list = (raw?.isEmpty == false ? raw! : "127.0.0.1:20001")
return list
.split(separator: ",")
.map { $0.trimmingCharacters(in: .whitespaces) }
Expand Down
Loading
Loading