Skip to content

Commit ff05e06

Browse files
committed
refactor: remove debug fn
1 parent 1d183c3 commit ff05e06

11 files changed

Lines changed: 7 additions & 94 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "vss-rust-client-ffi"
3-
version = "0.5.9"
3+
version = "0.5.10"
44
edition = "2021"
55
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
66

bindings/android/gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ android.useAndroidX=true
33
android.nonTransitiveRClass=true
44
kotlin.code.style=official
55
# project settings:
6-
version=0.5.9
6+
version=0.5.10
Binary file not shown.
Binary file not shown.
-5.58 KB
Binary file not shown.
-3.44 KB
Binary file not shown.

bindings/android/src/main/kotlin/com/synonym/vssclient/vss_rust_client_ffi.kt

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -792,12 +792,6 @@ internal interface UniffiLib : Library {
792792
`namespace`: RustBuffer.ByValue,
793793
): Long
794794

795-
fun uniffi_vss_rust_client_ffi_fn_func_vss_ldk_debug_obfuscate(
796-
`key`: RustBuffer.ByValue,
797-
`namespace`: RustBuffer.ByValue,
798-
uniffi_out_err: UniffiRustCallStatus,
799-
): RustBuffer.ByValue
800-
801795
fun uniffi_vss_rust_client_ffi_fn_func_vss_ldk_delete(
802796
`key`: RustBuffer.ByValue,
803797
`namespace`: RustBuffer.ByValue,
@@ -1096,8 +1090,6 @@ internal interface UniffiLib : Library {
10961090

10971091
fun uniffi_vss_rust_client_ffi_checksum_func_vss_get_ldk(): Short
10981092

1099-
fun uniffi_vss_rust_client_ffi_checksum_func_vss_ldk_debug_obfuscate(): Short
1100-
11011093
fun uniffi_vss_rust_client_ffi_checksum_func_vss_ldk_delete(): Short
11021094

11031095
fun uniffi_vss_rust_client_ffi_checksum_func_vss_ldk_get(): Short
@@ -1168,9 +1160,6 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
11681160
if (lib.uniffi_vss_rust_client_ffi_checksum_func_vss_get_ldk() != 7390.toShort()) {
11691161
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
11701162
}
1171-
if (lib.uniffi_vss_rust_client_ffi_checksum_func_vss_ldk_debug_obfuscate() != 6943.toShort()) {
1172-
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
1173-
}
11741163
if (lib.uniffi_vss_rust_client_ffi_checksum_func_vss_ldk_delete() != 46664.toShort()) {
11751164
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
11761165
}
@@ -2318,25 +2307,6 @@ suspend fun `vssGetLdk`(
23182307
VssException.ErrorHandler,
23192308
)
23202309

2321-
/**
2322-
* Shows obfuscated key for a given key+namespace (LDK client).
2323-
* Diagnostic function to compare against raw keys on the server.
2324-
*/
2325-
@Throws(VssException::class)
2326-
fun `vssLdkDebugObfuscate`(
2327-
`key`: kotlin.String,
2328-
`namespace`: LdkNamespace,
2329-
): kotlin.String =
2330-
FfiConverterString.lift(
2331-
uniffiRustCallWithError(VssException) { _status ->
2332-
UniffiLib.INSTANCE.uniffi_vss_rust_client_ffi_fn_func_vss_ldk_debug_obfuscate(
2333-
FfiConverterString.lower(`key`),
2334-
FfiConverterTypeLdkNamespace.lower(`namespace`),
2335-
_status,
2336-
)
2337-
},
2338-
)
2339-
23402310
/**
23412311
* Deletes a key-value pair using the dedicated LDK client.
23422312
*/

src/ldk_client.rs

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -274,28 +274,10 @@ impl LdkVssClient {
274274
.collect())
275275
}
276276

277-
/// Shows the obfuscated key for a given key+namespace in both V0 and V1 formats.
278-
/// Diagnostic function to compare against raw keys on the server.
279-
pub fn debug_obfuscate(&self, key: String, namespace: &LdkNamespace) -> String {
280-
let obfuscated_key = self.key_obfuscator.obfuscate(&key);
281-
let primary = namespace.primary();
282-
let secondary = namespace.secondary();
283-
let prefix_str = format!("{}#{}", primary, secondary);
284-
285-
// V0: plaintext prefix + # + obfuscated key
286-
let v0 = format!("{}#{}", prefix_str, obfuscated_key);
287-
288-
// V1: obfuscated prefix + # + obfuscated key
289-
let obfuscated_prefix = self.key_obfuscator.obfuscate(&prefix_str);
290-
let v1 = format!("{}#{}", obfuscated_prefix, obfuscated_key);
291-
292-
format!("v0: {}\nv1: {}", v0, v1)
293-
}
294-
295277
// --- Internal helpers ---
296278

297279
/// Builds an obfuscated storage key matching ldk-node's V1 format.
298-
fn build_key(&self, key: &str, namespace: &LdkNamespace) -> String {
280+
pub(crate) fn build_key(&self, key: &str, namespace: &LdkNamespace) -> String {
299281
let primary = namespace.primary();
300282
let secondary = namespace.secondary();
301283
let prefix = format!("{}#{}", primary, secondary);

src/lib.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -590,13 +590,3 @@ pub async fn vss_ldk_list_all_raw_keys() -> Result<Vec<KeyVersion>, VssError> {
590590
})
591591
}
592592

593-
/// Shows obfuscated key for a given key+namespace (LDK client).
594-
/// Diagnostic function to compare against raw keys on the server.
595-
#[uniffi::export]
596-
pub fn vss_ldk_debug_obfuscate(
597-
key: String,
598-
namespace: LdkNamespace,
599-
) -> Result<String, VssError> {
600-
let client = try_get_ldk_client()?;
601-
Ok(client.debug_obfuscate(key, &namespace))
602-
}

0 commit comments

Comments
 (0)