From e7a871b4955f5a770ebe6e28bc7c3e40ee25d56e Mon Sep 17 00:00:00 2001 From: Paulo Koch Date: Tue, 17 Dec 2024 11:49:03 +0000 Subject: [PATCH] Get rid of old encryptionPrivateKey --- examples/idos-example-dapp/api/NEAR.ts | 4 ++-- packages/idos-sdk-server-dapp/src/idOS-grantee.ts | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/idos-example-dapp/api/NEAR.ts b/examples/idos-example-dapp/api/NEAR.ts index 4e0ef185d..89813aa23 100644 --- a/examples/idos-example-dapp/api/NEAR.ts +++ b/examples/idos-example-dapp/api/NEAR.ts @@ -15,7 +15,7 @@ const nearGranteeSigner = KeyPair.fromString(NEAR_GRANTEE_PRIVATE_KEY); const idosGrantee = await idOSGrantee.init({ chainType: "NEAR", granteeSigner: nearGranteeSigner, - encryptionPrivateKey: ENCRYPTION_SECRET_KEY, + recipientEncryptionPrivateKey: ENCRYPTION_SECRET_KEY, }); const encryptionPublicKey = idosGrantee.encryptionPublicKey; @@ -38,7 +38,7 @@ export default async function (request: VercelRequest, response: VercelResponse) } const rawBody = request.read(); - let body; + let body: ReturnType; try { body = JSON.parse(rawBody); } catch (e) { diff --git a/packages/idos-sdk-server-dapp/src/idOS-grantee.ts b/packages/idos-sdk-server-dapp/src/idOS-grantee.ts index 5ddf19b27..546874d23 100644 --- a/packages/idos-sdk-server-dapp/src/idOS-grantee.ts +++ b/packages/idos-sdk-server-dapp/src/idOS-grantee.ts @@ -129,7 +129,7 @@ export class idOSGrantee { }): Promise; static async init({ - recipientEncryptionPrivateKey: encryptionPrivateKey, + recipientEncryptionPrivateKey, nodeUrl = KwilWrapper.defaults.kwilProvider, chainId, dbId, @@ -173,7 +173,7 @@ export class idOSGrantee { } return new idOSGrantee( - NoncedBox.fromBase64SecretKey(encryptionPrivateKey), + NoncedBox.fromBase64SecretKey(recipientEncryptionPrivateKey), nodeKwil, kwilSigner, dbId,