Skip to content
Merged
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
20 changes: 0 additions & 20 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 @@ -52,7 +52,6 @@ members = [
dashcore = { git = "https://github.com/dashpay/rust-dashcore", rev = "53130869e5b9343ae59016323e5e5269e717a8fd" }
dash-network-seeds = { git = "https://github.com/dashpay/rust-dashcore", rev = "53130869e5b9343ae59016323e5e5269e717a8fd" }
dash-spv = { git = "https://github.com/dashpay/rust-dashcore", rev = "53130869e5b9343ae59016323e5e5269e717a8fd" }
dash-spv-ffi = { git = "https://github.com/dashpay/rust-dashcore", rev = "53130869e5b9343ae59016323e5e5269e717a8fd" }
key-wallet = { git = "https://github.com/dashpay/rust-dashcore", rev = "53130869e5b9343ae59016323e5e5269e717a8fd" }
key-wallet-ffi = { git = "https://github.com/dashpay/rust-dashcore", rev = "53130869e5b9343ae59016323e5e5269e717a8fd" }
key-wallet-manager = { git = "https://github.com/dashpay/rust-dashcore", rev = "53130869e5b9343ae59016323e5e5269e717a8fd" }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,7 @@ impl PlatformAddressWallet {
.platform_payment_managed_account_at_index_mut(*account_index)
{
for (p2pkh, funds) in account_state.found() {
account.set_address_credit_balance(
*p2pkh,
funds.balance,
None,
);
account.set_address_credit_balance(*p2pkh, funds.balance, None);
}
}
}
Expand Down
4 changes: 2 additions & 2 deletions packages/rs-sdk-ffi/cbindgen.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ documentation_style = "c99"
[defines]

[export]
include = ["dash_sdk_*", "dash_core_*", "dash_unified_sdk_*", "dash_spv_ffi_*"]
# Exclude types that come from key-wallet-ffi or dash-spv-ffi to avoid duplication
include = ["dash_sdk_*", "dash_core_*", "dash_unified_sdk_*"]
# Exclude types that come from key-wallet-ffi to avoid duplication
exclude = ["FFIAccountType", "FFIAccountTypePreference", "FFIAccountTypeUsed", "FFIAccountCreationOptionType"]
prefix = ""
item_types = ["enums", "structs", "unions", "typedefs", "opaque", "functions"]
Expand Down
1 change: 0 additions & 1 deletion packages/rs-unified-sdk-ffi/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ rust-version.workspace = true
crate-type = ["staticlib", "cdylib"]

[dependencies]
dash-spv-ffi = { workspace = true }
key-wallet-ffi = { workspace = true }
platform-wallet-ffi = { path = "../rs-platform-wallet-ffi" }
rs-sdk-ffi = { path = "../rs-sdk-ffi" }
Expand Down
1 change: 0 additions & 1 deletion packages/rs-unified-sdk-ffi/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
pub use dash_network;
pub use dash_spv_ffi;
pub use key_wallet_ffi;
pub use platform_wallet_ffi;
pub use rs_sdk_ffi;
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public enum LoggingPreferences {
let preset = loadPreset()
let enableSwiftVerbose: Bool

SDK.initializeSPVLogging(level: SDK.LogLevel.info, enableConsole: true, maxFiles: 5)
SDK.enableLogging(level: .info)

switch preset {
case .high:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public class WalletManager {

deinit {
if ownsHandle {
dash_spv_ffi_wallet_manager_free(handle)
wallet_manager_free(handle)
}
}

Expand Down
56 changes: 0 additions & 56 deletions packages/swift-sdk/Sources/SwiftDashSDK/SDK.swift
Original file line number Diff line number Diff line change
Expand Up @@ -81,62 +81,6 @@ public final class SDK: @unchecked Sendable {
print("🔵 SDK: Logging enabled at level: \(level)")
}

/// Initialize SPV logging with configurable output options
/// - Parameters:
/// - level: Log level (defaults to .info if nil)
/// - enableConsole: Whether to output logs to console/stderr
/// - logDirectory: Directory for log files (nil to disable file logging)
/// - maxFiles: Maximum archived log files to retain (ignored if logDirectory is nil)
/// - Returns: true if logging was initialized successfully
@discardableResult
public static func initializeSPVLogging(
level: LogLevel? = nil,
enableConsole: Bool = true,
logDirectory: String? = nil,
maxFiles: UInt = 5
) -> Bool {
let levelString: String? = level.map { lvl in
switch lvl {
case .error: return "error"
case .warn: return "warn"
case .info: return "info"
case .debug: return "debug"
case .trace: return "trace"
}
}

let result: Int32
if let levelStr = levelString {
if let logDir = logDirectory {
result = levelStr.withCString { levelCStr in
logDir.withCString { dirCStr in
dash_spv_ffi_init_logging(levelCStr, enableConsole, dirCStr, maxFiles)
}
}
} else {
result = levelStr.withCString { levelCStr in
dash_spv_ffi_init_logging(levelCStr, enableConsole, nil, maxFiles)
}
}
} else {
if let logDir = logDirectory {
result = logDir.withCString { dirCStr in
dash_spv_ffi_init_logging(nil, enableConsole, dirCStr, maxFiles)
}
} else {
result = dash_spv_ffi_init_logging(nil, enableConsole, nil, maxFiles)
}
}

let success = result == 0
if success {
print("🔵 SDK: SPV logging initialized (level: \(levelString ?? "default"), console: \(enableConsole))")
} else {
print("⚠️ SDK: SPV logging initialization returned code \(result)")
}
return success
}

/// Local Platform DAPI addresses; override via UserDefaults key "platformDAPIAddresses"
private static var platformDAPIAddresses: String {
if let override = UserDefaults.standard.string(forKey: "platformDAPIAddresses"), !override.isEmpty {
Expand Down
1 change: 0 additions & 1 deletion packages/swift-sdk/build_ios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,6 @@ inject_modulemap() {

#include "dash-network/dash-network.h"
#include "key-wallet-ffi/key-wallet-ffi.h"
#include "dash-spv-ffi/dash-spv-ffi.h"
#include "rs-sdk-ffi/rs-sdk-ffi.h"
#include "platform-wallet-ffi/platform-wallet-ffi.h"

Expand Down
Loading