82trust / 100

Delegate Alignment

by gov.halowerk.com in Developer tools

x402 APIPassing, checked 17 min ago

Joins caller-supplied vote vectors by proposal ID, encodes against/abstain/for as -1/0/1, and computes weighted cosine similarity plus exact agreement. It describes only supplied overlapping votes and does not infer ideology or future behavior.

POST https://gov.halowerk.com/v1/delegate-alignment

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
104 ms typical, 104 ms slowest 5%
Last check
17 min ago
Next check
in 14 min

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://gov.halowerk.com/v1/delegate-alignment" \
  -H "content-type: application/json" \
  -d '{"delegate_votes":[{"proposal_id":"p-101","vote":1,"weight":2},{"proposal_id":"p-102","vote":-1,"weight":1},{"proposal_id":"p-103","vote":0,"weight":1}],"reference_votes":[{"proposal_id":"p-101","vote":1},{"proposal_id":"p-102","vote":1},{"proposal_id":"p-103","vote":0}]}'
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.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fgov.halowerk.com%2Fv1%2Fdelegate-alignment
const res = await pay("https://gov.halowerk.com/v1/delegate-alignment", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"delegate_votes":[{"proposal_id":"p-101","vote":1,"weight":2},{"proposal_id":"p-102","vote":-1,"weight":1},{"proposal_id":"p-103","vote":0,"weight":1}],"reference_votes":[{"proposal_id":"p-101","vote":1},{"proposal_id":"p-102","vote":1},{"proposal_id":"p-103","vote":0}]}),
});
console.log(await res.json());

Example input

{
  "delegate_votes": [
    {
      "proposal_id": "p-101",
      "vote": 1,
      "weight": 2
    },
    {
      "proposal_id": "p-102",
      "vote": -1,
      "weight": 1
    },
    {
      "proposal_id": "p-103",
      "vote": 0,
      "weight": 1
    }
  ],
  "reference_votes": [
    {
      "proposal_id": "p-101",
      "vote": 1
    },
    {
      "proposal_id": "p-102",
      "vote": 1
    },
    {
      "proposal_id": "p-103",
      "vote": 0
    }
  ]
}

Security scan

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

Recent checks

WhenResultHTTPTimePrice
17 min agoPassed402104 ms$0.003
5 h agoPassed402170 ms$0.003