Contract Test Own Api
by code.halowerk.com in Onchain & crypto
Check bounded JSON response contracts on your own HTTPS GET API, with a private-preimage DNS TXT proof bound to the exact origin and target list. One to three same-origin public HTTPS JSON GET tests after purpose-bound DNS TXT authorization. Compares HTTP status and a deterministic bounded JSON Schema subset; returns ordered pass/fail issues, timings and raw-response hashes, never response bodies.
https://code.halowerk.com/v1/contract-test-own-api- Price
- $0.004
- per call in USDC
- Uptime
- 96.8%
- last 30 days
- Response time
- 130 ms
- 212 ms slowest 5%
- Last check
- Passed
- 2 h ago, next any minute now
Reliability
Status and outage history · Atom feed · Watch with other listings
How to call it
POST https://code.halowerk.com/v1/contract-test-own-api
Each call costs $0.004 in USDC on Base, paid with the request over x402.
Run a free test callOne unpaid request, the way an agent sends it. You see the payment challenge it gets back. Nothing is charged.
Example request
From the listing.
POST https://code.halowerk.com/v1/contract-test-own-api
content-type: application/json
{
"ownership_secret": "halowerk-public-demo-contract-health-readiness-v1-20261115",
"tests": [
{
"expected_status": 200,
"schema": {
"additionalProperties": true,
"properties": {
"endpoints": {
"minimum": 1,
"type": "integer"
},
"status": {
"enum": [
"ok"
],
"type": "string"
}
},
"required": [
"status",
"endpoints"
],
"type": "object"
},
"url": "https://code.halowerk.com/health"
},
{
"expected_status": 200,
"schema": {
"additionalProperties": true,
"properties": {
"ready": {
"enum": [
true
],
"type": "boolean"
},
"settlement": {
"enum": [
"ok"
],
"type": "string"
}
},
"required": [
"ready",
"settlement"
],
"type": "object"
},
"url": "https://code.halowerk.com/readiness"
}
]
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
ownership_secret | string | Yes | TXT at _halowerk-contract.<hostname>: halowerk-contract-v1=SHA256(HALOWERK-CONTRACT-V1+LF+GET+LF+origin+LF+sorted canonical URLs joined with LF+LF+SHA256(secret)). UTF-8, lowercase hex, no trailing LF. Secret is private; example is public demo for two own info paths. |
tests | array of object | Yes | Distinct same-origin exact read-only JSON GET URLs and expectations. |
timeout_ms | integer | No | Network timeout for each target HTTP fetch. Default: 2500. |
Example response
The provider's example. We can't check it without paying.
Example response, 58 lines
{
"limitations": [
"GET only,1–3distinct same-origin canonical public DNS HTTPS443URLs, no query/fragment/credentials/IP literals, no caller headers or body. Owner must authorize t… [truncated, 353 chars]",
"TXT name _halowerk-contract.<API hostname>. Required value halowerk-contract-v1= plus lowercase SHA256 of exact UTF8 bytes: HALOWERK-CONTRACT-V1 + LF + GET + LF… [truncated, 527 chars]",
"System-configured DNS resolver, timeout1500ms/one try; TXT string chunks joined in order. At most16records/2048bytes each. Fresh lookup per call, subject to res… [truncated, 431 chars]",
"Schema profile halowerk-bounded-json-schema-v1: required single type object/array/string/integer/number/boolean/null; primitive enum; properties, required, bool… [truncated, 612 chars]",
"Each response must be valid UTF8JSON with a JSON content type, at most16384decoded bytes/16levels/2048values/finite numbers/well-formed Unicode. JSON-only, so e… [truncated, 596 chars]"
],
"result": {
"elapsed_ms": 84,
"failed_count": 0,
"ownership": {
"checked_at": "2026-11-19T15:07:54.946Z",
"dns_txt_name": "_halowerk-contract.code.halowerk.com",
"dnssec_validated": false,
"identity_verified": false,
"method": "GET"
},
"passed": true,
"passed_count": 2,
"results": [
{
"checks": 3,
"elapsed_ms": 28,
"expected_status": 200,
"http_status": 200,
"index": 0,
"issues": [],
"issues_truncated": false,
"method": "GET",
"passed": true,
"response_bytes": 174,
"response_sha256": "d254a07cf2ffbeeab7efa82d6052cbf1af4f68a6cab99e7c93baca77b082f22c",
"status": "checked",
"url": "https://code.halowerk.com/health"
},
{
"checks": 3,
"elapsed_ms": 26,
"expected_status": 200,
"http_status": 200,
"index": 1,
"issues": [],
"issues_truncated": false,
"method": "GET",
"passed": true,
"response_bytes": 97,
"response_sha256": "195c56ec065896990646c946914a29d5d5906f9590e5e35d94e549c9ed2be2a2",
"status": "checked",
"url": "https://code.halowerk.com/readiness"
}
],
"schema_profile": "halowerk-bounded-json-schema-v1",
"test_count": 2
},
"service": "contract-test-own-api",
"status": "success"
}Call it from code
The curl command shows the payment challenge. The JavaScript and Python versions pay and call, and never pay more than $0.004.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://code.halowerk.com/v1/contract-test-own-api' \
-H 'content-type: application/json' \
--data-raw '{"ownership_secret":"halowerk-public-demo-contract-health-readiness-v1-20261115","tests":[{"expected_status":200,"schema":{"additionalProperties":true,"properties":{"endpoints":{"minimum":1,"type":"integer"},"status":{"enum":["ok"],"type":"string"}},"required":["status","endpoints"],"type":"object"},"url":"https://code.halowerk.com/health"},{"expected_status":200,"schema":{"additionalProperties":true,"properties":{"ready":{"enum":[true],"type":"boolean"},"settlement":{"enum":["ok"],"type":"string"}},"required":["ready","settlement"],"type":"object"},"url":"https://code.halowerk.com/readiness"}]}'
# x402 v2 sends the challenge base64-encoded in the PAYMENT-REQUIRED header (v1 sends it in the body).
# To read the header:
curl -sS -g -o /dev/null -D - -X POST 'https://code.halowerk.com/v1/contract-test-own-api' \
-H 'content-type: application/json' \
--data-raw '{"ownership_secret":"halowerk-public-demo-contract-health-readiness-v1-20261115","tests":[{"expected_status":200,"schema":{"additionalProperties":true,"properties":{"endpoints":{"minimum":1,"type":"integer"},"status":{"enum":["ok"],"type":"string"}},"required":["status","endpoints"],"type":"object"},"url":"https://code.halowerk.com/health"},{"expected_status":200,"schema":{"additionalProperties":true,"properties":{"ready":{"enum":[true],"type":"boolean"},"settlement":{"enum":["ok"],"type":"string"}},"required":["ready","settlement"],"type":"object"},"url":"https://code.halowerk.com/readiness"}]}' \
| grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decodeJavaScript: pay and call
// npm i @x402/fetch @x402/evm viem
import { wrapFetchWithPayment, x402Client } from "@x402/fetch";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
// Pays at most $0.004 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.004" });
registerExactEvmScheme(client, { signer: privateKeyToAccount(process.env.EVM_PRIVATE_KEY) });
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? ToolVet checks it first for $0.005. Pay for that from a separate
// client: this one is capped at $0.004 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fcode.halowerk.com%2Fv1%2Fcontract-test-own-api&method=POST
const res = await pay("https://code.halowerk.com/v1/contract-test-own-api", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"ownership_secret": "halowerk-public-demo-contract-health-readiness-v1-20261115",
"tests": [
{
"expected_status": 200,
"schema": {
"additionalProperties": true,
"properties": {
"endpoints": {
"minimum": 1,
"type": "integer"
},
"status": {
"enum": [
"ok"
],
"type": "string"
}
},
"required": [
"status",
"endpoints"
],
"type": "object"
},
"url": "https://code.halowerk.com/health"
},
{
"expected_status": 200,
"schema": {
"additionalProperties": true,
"properties": {
"ready": {
"enum": [
true
],
"type": "boolean"
},
"settlement": {
"enum": [
"ok"
],
"type": "string"
}
},
"required": [
"ready",
"settlement"
],
"type": "object"
},
"url": "https://code.halowerk.com/readiness"
}
]
}),
});
console.log(res.status, await res.text());Python: pay and call
# pip install "x402[requests,evm]"
import os
from eth_account import Account
from x402 import x402ClientSync
from x402.http.clients import x402_requests
from x402.mechanisms.evm import EthAccountSigner
from x402.mechanisms.evm.exact.register import register_exact_evm_client
# Pays at most $0.004 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.004"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.post(
"https://code.halowerk.com/v1/contract-test-own-api",
json={
"ownership_secret": "halowerk-public-demo-contract-health-readiness-v1-20261115",
"tests": [
{
"expected_status": 200,
"schema": {
"additionalProperties": True,
"properties": {
"endpoints": {
"minimum": 1,
"type": "integer",
},
"status": {
"enum": [
"ok",
],
"type": "string",
},
},
"required": [
"status",
"endpoints",
],
"type": "object",
},
"url": "https://code.halowerk.com/health",
},
{
"expected_status": 200,
"schema": {
"additionalProperties": True,
"properties": {
"ready": {
"enum": [
True,
],
"type": "boolean",
},
"settlement": {
"enum": [
"ok",
],
"type": "string",
},
},
"required": [
"ready",
"settlement",
],
"type": "object",
},
"url": "https://code.halowerk.com/readiness",
},
],
},
)
print(res.status_code, res.text)Security scan
No findings
We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 2 h ago | Passed | 402 | 49 ms | $0.004 |
| 13 h ago | Passed | 402 | 49 ms | $0.004 |
| 23 h ago | Passed | 402 | 49 ms | $0.004 |
| 33 h ago | Passed | 402 | 148 ms | $0.004 |
| 43 h ago | Passed | 402 | 41 ms | $0.004 |
Show 10 older checks
| 2 days ago | Passed | 402 | 149 ms | $0.004 |
| 3 days ago | Passed | 402 | 150 ms | $0.004 |
| 5 days ago | Timed out | - | - | - |
| 6 days ago | Passed | 402 | 128 ms | $0.004 |
| 6 days ago | Passed | 402 | 130 ms | $0.004 |
| 7 days ago | Passed | 402 | 59 ms | $0.004 |
| 7 days ago | Passed | 402 | 146 ms | $0.004 |
| 8 days ago | Passed | 402 | 149 ms | $0.004 |
| 8 days ago | Passed | 402 | 143 ms | $0.004 |
| 8 days ago | Passed | 402 | 130 ms | $0.004 |