MCPcopy Create free account
hub / github.com/bytespider/Meross / setPrivateKey

Method setPrivateKey

packages/lib/src/device.ts:106–112  ·  view source on GitHub ↗
(privateKey: Buffer)

Source from the content-addressed store, hash-verified

104 }
105
106 async setPrivateKey(privateKey: Buffer) {
107 deviceLogger.debug(`Setting private key for device ${this.id}`);
108
109 const keyPair = await createKeyPair(privateKey);
110
111 this.encryptionKeys.localKeys = keyPair;
112 }
113
114 hasAbility(ability: Namespace) {
115 deviceLogger.debug(`Checking if device ${this.id} has ability ${ability}`, {

Callers 4

createKeyPairFunction · 0.80
deriveSharedKeyFunction · 0.80
meross-setup.tsFile · 0.80
meross-info.tsFile · 0.80

Calls 1

createKeyPairFunction · 0.85

Tested by

no test coverage detected