Skip to content
Fourohtwo

detect.halowerk.com/v1/F-A-NEXT-PROMISE_JOBS/ecmascript-promise-reaction-job-led

Returns observable Promise reaction order and final modeled settlements when callbacks attach before or after settlement and roots or handler returns adopt another promise, for an offline asynchronous-code agent.

BaseAnswering
POSThttps://detect.halowerk.com/v1/F-A-NEXT-PROMISE_JOBS/ecmascript-promise-reaction-job-ledger

Uptime100% of 1 check in 30 days

30 days agoToday

Try it

Pays from your browser wallet in USDC on Base or USDG on Robinhood Chain, whichever the endpoint takes. The provider is paid directly; failed calls aren't refunded by Fourohtwo.

The response shows up here.

Call it from an agent

// npm install fourohtwo
import { createPayer } from "fourohtwo";

// One agent key pays USDC on Base or USDG on Robinhood Chain, inside your spending rules.
const pay = createPayer({ privateKey: process.env.AGENT_KEY, maxPerCallUsd: "0.05" });
const res = await pay("https://detect.halowerk.com/v1/F-A-NEXT-PROMISE_JOBS/ecmascript-promise-reaction-job-ledger", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"artifact":{"promise_jobs":{"claim":2,"commands":[{"fulfill":{"mode":"identity"},"op":"then","promise":0,"reject":{"mode":"absent"},"tag":1},{"fulfill":{"mode":"return","value":9},"op":"then","promise":0,"reject":{"mode":"absent"},"tag":2},{"op":"resolve","promise":0,"value":{"kind":"scalar","value":5}}],"roots":1}}}),
});
console.log(await res.json());

Example input

{
  "artifact": {
    "promise_jobs": {
      "claim": 2,
      "commands": [
        {
          "fulfill": {
            "mode": "identity"
          },
          "op": "then",
          "promise": 0,
          "reject": {
            "mode": "absent"
          },
          "tag": 1
        },
        {
          "fulfill": {
            "mode": "return",
            "value": 9
          },
          "op": "then",
          "promise": 0,
          "reject": {
            "mode": "absent"
          },
          "tag": 2
        },
        {
          "op": "resolve",
          "promise": 0,
          "value": {
            "kind": "scalar",
            "value": 5
          }
        }
      ],
      "roots": 1
    }
  }
}