verify_signer_offline
Validate signer code offline by running it locally against sample inputs and comparing results to expected values. Identify divergences and pass rates without network calls.
Instructions
Verify a signer against explicit expected values without sending requests.
Args: signer_code: JS expression evaluating to a function receiving sample.input and returning an object. Async functions are supported. Only run code you intend to execute locally; Node vm is not a security boundary. samples: Non-empty list (up to 1000) of {id?, input: object, expected: object}. Each expected object must contain at least one comparison key. compare_params: Optional non-empty list of expected keys. Missing keys are invalid input; missing computed keys fail even if expected is null. runtime: "browser" preserves the current-page default. "node" runs an independent process without launching a browser, supports require of crypto/node:crypto, and needs Node.js on PATH. No runtime fallback. timeout_ms: Node process deadline (1..120000); also the maximum wait for the browser evaluation. A browser timeout does not undo/stop effects.
Returns: total_samples, passed, failed, pass_rate, first_divergence and details. Invalid input returns error before any signer code is executed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| runtime | No | browser | |
| samples | Yes | ||
| timeout_ms | No | ||
| signer_code | Yes | ||
| compare_params | No |