diff --git a/sphinx-ffi/Cargo.toml b/sphinx-ffi/Cargo.toml index a7cba97..fa1918c 100644 --- a/sphinx-ffi/Cargo.toml +++ b/sphinx-ffi/Cargo.toml @@ -25,7 +25,7 @@ sphinx-signer = { path = "../signer", default-features = false, features = [ "no-native", ] } sphinx-glyph = { path = "../glyph", default-features = false } -sphinx = { git = "https://github.com/stakwork/sphinx", rev = "d8c490d241b37ab0c47e725f9dae5d2e92f0ccfa", features = [ +sphinx = { git = "https://github.com/stakwork/sphinx", rev = "768a010bc4e7e5807dd679819faf39c94f7eeab6", features = [ "msg", "bindings", "macaroon", diff --git a/sphinx-ffi/src/auto.rs b/sphinx-ffi/src/auto.rs index 79fc632..37560c5 100644 --- a/sphinx-ffi/src/auto.rs +++ b/sphinx-ffi/src/auto.rs @@ -801,22 +801,6 @@ pub fn signed_timestamp(seed: String, idx: u64, time: String, network: String) - .into()) } -pub fn contact_for_encrypted_child_key( - seed: String, - unique_time: String, - full_state: Vec, - encrypted_child_idx: String, -) -> Result { - Ok(bindings::contact_for_encrypted_child_key( - &seed, - &unique_time, - &full_state, - &encrypted_child_idx, - ) - .map_err(|e| SphinxError::SendFailed { r: e.to_string() })? - .into()) -} - pub fn find_route( full_state: Vec, to_pubkey: String, diff --git a/sphinx-ffi/src/sphinxrs.swift b/sphinx-ffi/src/sphinxrs.swift index 6a7bf67..9258d48 100644 --- a/sphinx-ffi/src/sphinxrs.swift +++ b/sphinx-ffi/src/sphinxrs.swift @@ -2642,18 +2642,6 @@ public func `idFromMacaroon`(`macaroon`: String) throws -> String { ) } -public func `contactForEncryptedChildKey`(`seed`: String, `uniqueTime`: String, `state`: Data, `encryptedChildKey`: String) throws -> String { - return try FfiConverterString.lift( - try rustCallWithError(FfiConverterTypeSphinxError.lift) { - uniffi_sphinxrs_fn_func_contact_for_encrypted_child_key( - FfiConverterString.lower(`seed`), - FfiConverterString.lower(`uniqueTime`), - FfiConverterData.lower(`state`), - FfiConverterString.lower(`encryptedChildKey`),$0) -} - ) -} - public func `findRoute`(`state`: Data, `toPubkey`: String, `routeHint`: String?, `amtMsat`: UInt64) throws -> String { return try FfiConverterString.lift( try rustCallWithError(FfiConverterTypeSphinxError.lift) { @@ -2921,9 +2909,6 @@ private var initializationResult: InitializationResult { if (uniffi_sphinxrs_checksum_func_id_from_macaroon() != 36424) { return InitializationResult.apiChecksumMismatch } - if (uniffi_sphinxrs_checksum_func_contact_for_encrypted_child_key() != 36351) { - return InitializationResult.apiChecksumMismatch - } if (uniffi_sphinxrs_checksum_func_find_route() != 27285) { return InitializationResult.apiChecksumMismatch } diff --git a/sphinx-ffi/src/sphinxrs.udl b/sphinx-ffi/src/sphinxrs.udl index 8b769f0..fb16418 100644 --- a/sphinx-ffi/src/sphinxrs.udl +++ b/sphinx-ffi/src/sphinxrs.udl @@ -269,7 +269,5 @@ namespace sphinxrs { [Throws=SphinxError] string id_from_macaroon(string macaroon); [Throws=SphinxError] - string contact_for_encrypted_child_key(string seed, string unique_time, bytes state, string encrypted_child_key); - [Throws=SphinxError] string find_route(bytes state, string to_pubkey, string? route_hint, u64 amt_msat); }; \ No newline at end of file diff --git a/sphinx-ffi/src/sphinxrsFFI.h b/sphinx-ffi/src/sphinxrsFFI.h index da516d2..1c48f37 100644 --- a/sphinx-ffi/src/sphinxrsFFI.h +++ b/sphinx-ffi/src/sphinxrsFFI.h @@ -223,8 +223,6 @@ RustBuffer uniffi_sphinxrs_fn_func_fetch_pings(RustBuffer seed, RustBuffer uniqu ); RustBuffer uniffi_sphinxrs_fn_func_id_from_macaroon(RustBuffer macaroon, RustCallStatus *_Nonnull out_status ); -RustBuffer uniffi_sphinxrs_fn_func_contact_for_encrypted_child_key(RustBuffer seed, RustBuffer unique_time, RustBuffer state, RustBuffer encrypted_child_key, RustCallStatus *_Nonnull out_status -); RustBuffer uniffi_sphinxrs_fn_func_find_route(RustBuffer state, RustBuffer to_pubkey, RustBuffer route_hint, uint64_t amt_msat, RustCallStatus *_Nonnull out_status ); RustBuffer ffi_sphinxrs_rustbuffer_alloc(int32_t size, RustCallStatus *_Nonnull out_status @@ -474,9 +472,6 @@ uint16_t uniffi_sphinxrs_checksum_func_fetch_pings(void ); uint16_t uniffi_sphinxrs_checksum_func_id_from_macaroon(void -); -uint16_t uniffi_sphinxrs_checksum_func_contact_for_encrypted_child_key(void - ); uint16_t uniffi_sphinxrs_checksum_func_find_route(void diff --git a/sphinx-ffi/src/uniffi/sphinxrs/sphinxrs.kt b/sphinx-ffi/src/uniffi/sphinxrs/sphinxrs.kt index 40daa7a..718d9f8 100644 --- a/sphinx-ffi/src/uniffi/sphinxrs/sphinxrs.kt +++ b/sphinx-ffi/src/uniffi/sphinxrs/sphinxrs.kt @@ -524,8 +524,6 @@ internal interface _UniFFILib : Library { ): RustBuffer.ByValue fun uniffi_sphinxrs_fn_func_id_from_macaroon(`macaroon`: RustBuffer.ByValue,_uniffi_out_err: RustCallStatus, ): RustBuffer.ByValue - fun uniffi_sphinxrs_fn_func_contact_for_encrypted_child_key(`seed`: RustBuffer.ByValue,`uniqueTime`: RustBuffer.ByValue,`state`: RustBuffer.ByValue,`encryptedChildKey`: RustBuffer.ByValue,_uniffi_out_err: RustCallStatus, - ): RustBuffer.ByValue fun uniffi_sphinxrs_fn_func_find_route(`state`: RustBuffer.ByValue,`toPubkey`: RustBuffer.ByValue,`routeHint`: RustBuffer.ByValue,`amtMsat`: Long,_uniffi_out_err: RustCallStatus, ): RustBuffer.ByValue fun ffi_sphinxrs_rustbuffer_alloc(`size`: Int,_uniffi_out_err: RustCallStatus, @@ -696,8 +694,6 @@ internal interface _UniFFILib : Library { ): Short fun uniffi_sphinxrs_checksum_func_id_from_macaroon( ): Short - fun uniffi_sphinxrs_checksum_func_contact_for_encrypted_child_key( - ): Short fun uniffi_sphinxrs_checksum_func_find_route( ): Short fun ffi_sphinxrs_uniffi_contract_version( @@ -957,9 +953,6 @@ private fun uniffiCheckApiChecksums(lib: _UniFFILib) { if (lib.uniffi_sphinxrs_checksum_func_id_from_macaroon() != 36424.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_sphinxrs_checksum_func_contact_for_encrypted_child_key() != 36351.toShort()) { - throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - } if (lib.uniffi_sphinxrs_checksum_func_find_route() != 27285.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } @@ -3135,15 +3128,6 @@ fun `idFromMacaroon`(`macaroon`: String): String { @Throws(SphinxException::class) -fun `contactForEncryptedChildKey`(`seed`: String, `uniqueTime`: String, `state`: ByteArray, `encryptedChildKey`: String): String { - return FfiConverterString.lift( - rustCallWithError(SphinxException) { _status -> - _UniFFILib.INSTANCE.uniffi_sphinxrs_fn_func_contact_for_encrypted_child_key(FfiConverterString.lower(`seed`),FfiConverterString.lower(`uniqueTime`),FfiConverterByteArray.lower(`state`),FfiConverterString.lower(`encryptedChildKey`),_status) -}) -} - -@Throws(SphinxException::class) - fun `findRoute`(`state`: ByteArray, `toPubkey`: String, `routeHint`: String?, `amtMsat`: ULong): String { return FfiConverterString.lift( rustCallWithError(SphinxException) { _status ->