@mega-yfue/eufy-sdk / tuya / HmacSigner
Class: HmacSigner
The real TuyaSigner: sign = HMAC-SHA256(K, preimage) as lowercase hex.
Uses TUYA_SIGN_K by default — no configuration required. The env var TUYA_SIGN_KEY overrides the built-in key (for custom builds); an explicit constructor argument takes precedence over both. Verified: reproduces the captured smartlife.p.time.get sign 97a78b35…a7f8c84.
Implements
Constructors
Constructor
ts
new HmacSigner(key?): HmacSigner;Parameters
key?
string
Returns
HmacSigner
Methods
sign()
ts
sign(preimage): string;Parameters
preimage
string
Returns
string