Skip to content

@mega-yfue/eufy-sdk / p2pCodec / buildRawCommandPayload

Function: buildRawCommandPayload()

ts
function buildRawCommandPayload(
   data, 
   channel?, 
   signCode?, 
   magic?, 
   streamId?
): Buffer;

Build a command body around an ALREADY-encrypted (or plaintext) data buffer with an explicit signCode — used for level-2 (signCode 8, AES-256-GCM) commands like the media-start 1350 the app sends. Same on-wire layout as buildStringCommandPayload but the caller supplies the body and the signCode verbatim (no ECB step): len(u16) ‖ 0000 ‖ 0100 ‖ [channel, signCode] ‖ 0000 ‖ data.

Parameters

data

Buffer

channel?

number = 0

signCode?

number = 0

magic?

[number, number] = ...

streamId?

number = 0

Returns

Buffer

Independent and unofficial. Not affiliated with, endorsed by, or sponsored by Anker Innovations, Anker eufy, or eufy. "Anker eufy", "eufy" and "Anker" are trademarks of their respective owners. Use responsibly — rapid or failed logins can trigger captcha or temporary cooldowns.