diff --git a/src/messaging/CredentialApiMessageType.ts b/src/messaging/CredentialApiMessageType.ts index ac2788a..ac81073 100644 --- a/src/messaging/CredentialApiMessageType.ts +++ b/src/messaging/CredentialApiMessageType.ts @@ -104,8 +104,9 @@ export function ensureOwnerIsSender(message: IMessage): void { * * @param decryptedMessage The decrypted message to check. */ -export function verify(decryptedMessage: IMessage): void { +export function assertKnownMessage(decryptedMessage: IMessage): IMessage['body'] { verifyMessageBody(decryptedMessage) verifyMessageEnvelope(decryptedMessage) ensureOwnerIsSender(decryptedMessage) + return decryptedMessage.body } diff --git a/src/tests/index.ts b/src/tests/index.ts index 68a3e17..bf4c9a1 100644 --- a/src/tests/index.ts +++ b/src/tests/index.ts @@ -1,2 +1,9 @@ +/** + * Copyright (c) 2018-2023, BOTLabs GmbH. + * + * This source code is licensed under the BSD 4-Clause "Original" license + * found in the LICENSE file in the root directory of this source tree. + */ + export * from './messageUtils' export * from './utils'