From 4b357b177c00eb7681c7041d1a6afff20a1cabda Mon Sep 17 00:00:00 2001 From: Paulo Koch Date: Tue, 17 Dec 2024 12:27:36 +0000 Subject: [PATCH] Align interface with enclave.js --- .../idos-sdk-js/src/lib/enclave-providers/iframe-enclave.ts | 2 +- packages/idos-sdk-js/src/lib/enclave-providers/types.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/idos-sdk-js/src/lib/enclave-providers/iframe-enclave.ts b/packages/idos-sdk-js/src/lib/enclave-providers/iframe-enclave.ts index 65b5a904a..f79412155 100644 --- a/packages/idos-sdk-js/src/lib/enclave-providers/iframe-enclave.ts +++ b/packages/idos-sdk-js/src/lib/enclave-providers/iframe-enclave.ts @@ -37,7 +37,7 @@ export class IframeEnclave implements EnclaveProvider { signerPublicKey?: string, expectedUserEncryptionPublicKey?: string, ): Promise { - let { userEncryptionPublicKey } = (await this.#requestToEnclave({ + let { encryptionPublicKey: userEncryptionPublicKey } = (await this.#requestToEnclave({ storage: { humanId, signerAddress, diff --git a/packages/idos-sdk-js/src/lib/enclave-providers/types.ts b/packages/idos-sdk-js/src/lib/enclave-providers/types.ts index 2a2d78d14..acf9a82ce 100644 --- a/packages/idos-sdk-js/src/lib/enclave-providers/types.ts +++ b/packages/idos-sdk-js/src/lib/enclave-providers/types.ts @@ -2,10 +2,10 @@ import type { idOSCredential } from "@idos-network/idos-sdk-types"; import type { BackupPasswordInfo } from "../types"; export interface StoredData { - userEncryptionPublicKey?: Uint8Array; + encryptionPublicKey?: Uint8Array; humanId?: string; signerAddress?: string; - signerEncryptionPublicKey?: string; + signerPublicKey?: string; } export interface DiscoverUserEncryptionPublicKeyResponse { @@ -27,7 +27,7 @@ export interface EnclaveProvider { ready( humanId?: string, signerAddress?: string, - signerEncryptionPublicKey?: string, + signerPublicKey?: string, currentUserEncryptionPublicKey?: string, ): Promise; store(key: string, value: string): Promise;