83trust / 100

Digital Twin Sync

by iot.halowerk.com in Documents & files

x402 APIPassing, checked 3 h ago

Groups caller-supplied scalar field changes by field name, selects the highest version, and reports a conflict when equal-version values differ. It does not connect to a twin platform, merge nested documents or resolve semantic conflicts.

POST https://iot.halowerk.com/v1/digital-twin-sync

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
137 ms typical, 137 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://iot.halowerk.com/v1/digital-twin-sync" \
  -H "content-type: application/json" \
  -d '{"local_changes":[{"field":"temperature_setpoint","value":21.5,"version":8},{"field":"mode","value":"eco","version":4}],"remote_changes":[{"field":"temperature_setpoint","value":22,"version":7},{"field":"mode","value":"comfort","version":4}]}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.03:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fiot.halowerk.com%2Fv1%2Fdigital-twin-sync
const res = await pay("https://iot.halowerk.com/v1/digital-twin-sync", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"local_changes":[{"field":"temperature_setpoint","value":21.5,"version":8},{"field":"mode","value":"eco","version":4}],"remote_changes":[{"field":"temperature_setpoint","value":22,"version":7},{"field":"mode","value":"comfort","version":4}]}),
});
console.log(await res.json());

Example input

{
  "local_changes": [
    {
      "field": "temperature_setpoint",
      "value": 21.5,
      "version": 8
    },
    {
      "field": "mode",
      "value": "eco",
      "version": 4
    }
  ],
  "remote_changes": [
    {
      "field": "temperature_setpoint",
      "value": 22,
      "version": 7
    },
    {
      "field": "mode",
      "value": "comfort",
      "version": 4
    }
  ]
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed402137 ms$0.004