Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Modify mdl presentation args #51

Merged
merged 2 commits into from
Sep 30, 2024
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
6 changes: 3 additions & 3 deletions MobileSdkRs/Sources/MobileSdkRs/mobile_sdk_rs.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7518,11 +7518,11 @@ public func initializeMdlPresentation(mdocId: Uuid, uuid: Uuid, storageManager:
* String containing the BLE ident.

*/
public func initializeMdlPresentationFromBytes(mdocBytes: Data, keyAlias: KeyAlias, uuid: Uuid)async throws -> MdlPresentationSession {
public func initializeMdlPresentationFromBytes(mdoc: Mdoc, uuid: Uuid)async throws -> MdlPresentationSession {
return
try await uniffiRustCallAsync(
rustFutureFunc: {
uniffi_mobile_sdk_rs_fn_func_initialize_mdl_presentation_from_bytes(FfiConverterData.lower(mdocBytes),FfiConverterTypeKeyAlias.lower(keyAlias),FfiConverterTypeUuid.lower(uuid)
uniffi_mobile_sdk_rs_fn_func_initialize_mdl_presentation_from_bytes(FfiConverterTypeMdoc.lower(mdoc),FfiConverterTypeUuid.lower(uuid)
)
},
pollFunc: ffi_mobile_sdk_rs_rust_future_poll_pointer,
Expand Down Expand Up @@ -7699,7 +7699,7 @@ private var initializationResult: InitializationResult = {
if (uniffi_mobile_sdk_rs_checksum_func_initialize_mdl_presentation() != 29387) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_mobile_sdk_rs_checksum_func_initialize_mdl_presentation_from_bytes() != 35281) {
if (uniffi_mobile_sdk_rs_checksum_func_initialize_mdl_presentation_from_bytes() != 23808) {
return InitializationResult.apiChecksumMismatch
}
if (uniffi_mobile_sdk_rs_checksum_func_oid4vci_exchange_credential() != 13827) {
Expand Down
7 changes: 1 addition & 6 deletions src/mdl/holder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,9 @@ pub async fn initialize_mdl_presentation(
///
#[uniffi::export]
pub async fn initialize_mdl_presentation_from_bytes(
mdoc_bytes: Vec<u8>,
key_alias: KeyAlias,
mdoc: Arc<Mdoc>,
uuid: Uuid,
) -> Result<MdlPresentationSession, SessionError> {
let mdoc = crate::credential::mdoc::Mdoc::from_cbor_encoded_document(mdoc_bytes, key_alias)
.map_err(|e| SessionError::Generic {
value: format!("Error retrieving MDoc from storage: {e:}"),
})?;
let drms = DeviceRetrievalMethods::new(DeviceRetrievalMethod::BLE(BleOptions {
peripheral_server_mode: None,
central_client_mode: Some(CentralClientMode { uuid }),
Expand Down
Loading