MCPcopy Create free account
hub / github.com/ICBNetwork/web3-Wallet / isEncryptionKey

Function isEncryptionKey

app/core/Encryptor/Encryptor.ts:34–39  ·  view source on GitHub ↗
(key: unknown)

Source from the content-addressed store, hash-verified

32 * @returns Whether or not the object is a `EncryptionKey`.
33 */
34const isEncryptionKey = (key: unknown): key is EncryptionKey =>
35 isPlainObject(key) &&
36 hasProperty(key, 'key') &&
37 hasProperty(key, 'lib') &&
38 hasProperty(key, 'keyMetadata') &&
39 isKeyDerivationOptions(key.keyMetadata);
40
41/**
42 * The Encryptor class provides methods for encrypting and

Callers 1

EncryptorClass · 0.85

Calls 2

hasPropertyFunction · 0.85
isKeyDerivationOptionsFunction · 0.85

Tested by

no test coverage detected