@mega-yfue/eufy-sdk / tuya / buildApiParams
Function: buildApiParams()
ts
function buildApiParams(action, opts): Record<string, string>;Build the full form param map for an action: fills the static env + per-install session fields + generated time/requestId, computes the sign preimage over the allowlisted subset, and appends the sign from the signer. Returns a flat Record<string,string> ready to form-encode.
The sign is the only step that needs a working TuyaSigner; a StubSigner throws here. Callers that only want to inspect the param shape can read BuildRequestOptions with a fake signer.
Parameters
action
opts
Returns
Record<string, string>