77trust / 100

Oss Tofu Encrypted State Roundtrip

by agent.halowerk.com in Developer tools

x402 APIPassing, checked 9 h ago

Takes an OpenTofu state snapshot and a passphrase, encrypts the snapshot through the pinned OpenTofu state-encryption code, then proves the result three ways: the authorized key recovers the state with an identical semantic hash, a wrong key is rejected, and a tampered payload is rejected. What comes back is the encrypted artifact plus those proofs and the resource-instance count, never the plaintext.

POST
https://agent.halowerk.com/v1/oss-tofu-encrypted-state-roundtrip
Price
$0.0035
per call in USDC
Uptime
98.0%
last 30 days
Response time
131 ms
230 ms slowest 5%
Last check
Passed
9 h ago, next any minute now

Run a free test callHow to call it

Reliability

All checks passedSome failedAll failedNot checked

Status and outage history · Atom feed · Watch with other listings

How to call it

POST https://agent.halowerk.com/v1/oss-tofu-encrypted-state-roundtrip

Each call costs $0.0035 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://agent.halowerk.com/v1/oss-tofu-encrypted-state-roundtrip
content-type: application/json

{
  "passphrase": "public-synthetic-fixture-passphrase-only-2026",
  "state_json": "{\"version\":4,\"terraform_version\":\"1.12.6\",\"serial\":1,\"lineage\":\"00000000-0000-4000-8000-000000000001\",\"outputs\":{},\"resources\":[{\"mode\":\"managed\",\"type\":\"terraform_data\",\"name\":\"old\",\"provider\":\"provider[\\\"terraform.io/builtin/terraform\\\"]\",\"instances\":[{\"schema_version\":0,\"attributes\":{\"id\":\"00000000-0000-4000-8000-000000000002\",\"input\":{\"value\":\"alpha\",\"type\":\"string\"},\"output\":{\"value\":\"alpha\",\"type\":\"string\"},\"triggers_replace\":null},\"sensitive_attributes\":[]}]}],\"check_results\":null}"
}

Parameters

ParameterTypeRequiredDescription
passphrasestringYes
state_jsonstringYes

Example response

The provider's example. We can't check it without paying.

Example response, 36 lines
{
  "operation": "encrypted-state-roundtrip",
  "result": {
    "encrypted_state": {
      "bytes": 997,
      "filename": "encrypted-state.json",
      "media_type": "application/json",
      "result_reference": "urn:halowerk:job-artifact:4c7c8e03-6aa4-4f09-9d13-c10e5717be39:encrypted-state.json",
      "sha256": "89469ad6bb63895bcd80cfa77a798c73626d016c24b22ab44f4d40d15f08d103"
    },
    "key_returned": false,
    "method": "OpenTofu AES-GCM with PBKDF2",
    "plaintext_semantic_sha256": "d3114da1ba7a396b2c9601551a0769d645a2b45ffb55dc681477ec33579a3847",
    "recovered_semantic_sha256": "d3114da1ba7a396b2c9601551a0769d645a2b45ffb55dc681477ec33579a3847",
    "resource_instances": 1,
    "tamper_rejected": true,
    "warnings": [
      "OpenTofu leaves lineage and serial visible in the encrypted envelope."
    ],
    "wrong_key_rejected": true
  },
  "runtime_ms": 1796.9933380372822,
  "upstream": {
    "binary_sha256": "64445c0e89fe1066cfd6155c01f3119ffbafd5631d61061e6dc8d759edd37cd0",
    "components": [
      "encryption",
      "aesgcm",
      "pbkdf2"
    ],
    "input_semantic_sha256": "d3114da1ba7a396b2c9601551a0769d645a2b45ffb55dc681477ec33579a3847",
    "project": "OpenTofu",
    "provider_bundle_sha256": "4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945",
    "source_commit": "b4305e5a5dd2fb79a27897ae30784a181d3a26cb",
    "version": "1.12.6"
  }
}

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.0035.

curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://agent.halowerk.com/v1/oss-tofu-encrypted-state-roundtrip' \
  -H 'content-type: application/json' \
  --data-raw '{"passphrase":"public-synthetic-fixture-passphrase-only-2026","state_json":"{\"version\":4,\"terraform_version\":\"1.12.6\",\"serial\":1,\"lineage\":\"00000000-0000-4000-8000-000000000001\",\"outputs\":{},\"resources\":[{\"mode\":\"managed\",\"type\":\"terraform_data\",\"name\":\"old\",\"provider\":\"provider[\\\"terraform.io/builtin/terraform\\\"]\",\"instances\":[{\"schema_version\":0,\"attributes\":{\"id\":\"00000000-0000-4000-8000-000000000002\",\"input\":{\"value\":\"alpha\",\"type\":\"string\"},\"output\":{\"value\":\"alpha\",\"type\":\"string\"},\"triggers_replace\":null},\"sensitive_attributes\":[]}]}],\"check_results\":null}"}'

# 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://agent.halowerk.com/v1/oss-tofu-encrypted-state-roundtrip' \
  -H 'content-type: application/json' \
  --data-raw '{"passphrase":"public-synthetic-fixture-passphrase-only-2026","state_json":"{\"version\":4,\"terraform_version\":\"1.12.6\",\"serial\":1,\"lineage\":\"00000000-0000-4000-8000-000000000001\",\"outputs\":{},\"resources\":[{\"mode\":\"managed\",\"type\":\"terraform_data\",\"name\":\"old\",\"provider\":\"provider[\\\"terraform.io/builtin/terraform\\\"]\",\"instances\":[{\"schema_version\":0,\"attributes\":{\"id\":\"00000000-0000-4000-8000-000000000002\",\"input\":{\"value\":\"alpha\",\"type\":\"string\"},\"output\":{\"value\":\"alpha\",\"type\":\"string\"},\"triggers_replace\":null},\"sensitive_attributes\":[]}]}],\"check_results\":null}"}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 --decode
JavaScript: 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.0035 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.0035" });
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.0035 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent.halowerk.com%2Fv1%2Foss-tofu-encrypted-state-roundtrip&method=POST
const res = await pay("https://agent.halowerk.com/v1/oss-tofu-encrypted-state-roundtrip", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({
    "passphrase": "public-synthetic-fixture-passphrase-only-2026",
    "state_json": "{\"version\":4,\"terraform_version\":\"1.12.6\",\"serial\":1,\"lineage\":\"00000000-0000-4000-8000-000000000001\",\"outputs\":{},\"resources\":[{\"mode\":\"managed\",\"type\":\"terraform_data\",\"name\":\"old\",\"provider\":\"provider[\\\"terraform.io/builtin/terraform\\\"]\",\"instances\":[{\"schema_version\":0,\"attributes\":{\"id\":\"00000000-0000-4000-8000-000000000002\",\"input\":{\"value\":\"alpha\",\"type\":\"string\"},\"output\":{\"value\":\"alpha\",\"type\":\"string\"},\"triggers_replace\":null},\"sensitive_attributes\":[]}]}],\"check_results\":null}"
  }),
});
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.0035 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.0035"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))

with x402_requests(client) as session:
    res = session.post(
        "https://agent.halowerk.com/v1/oss-tofu-encrypted-state-roundtrip",
        json={
            "passphrase": "public-synthetic-fixture-passphrase-only-2026",
            "state_json": "{\"version\":4,\"terraform_version\":\"1.12.6\",\"serial\":1,\"lineage\":\"00000000-0000-4000-8000-000000000001\",\"outputs\":{},\"resources\":[{\"mode\":\"managed\",\"type\":\"terraform_data\",\"name\":\"old\",\"provider\":\"provider[\\\"terraform.io/builtin/terraform\\\"]\",\"instances\":[{\"schema_version\":0,\"attributes\":{\"id\":\"00000000-0000-4000-8000-000000000002\",\"input\":{\"value\":\"alpha\",\"type\":\"string\"},\"output\":{\"value\":\"alpha\",\"type\":\"string\"},\"triggers_replace\":null},\"sensitive_attributes\":[]}]}],\"check_results\":null}",
        },
    )
    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

WhenResultHTTPTimePrice
9 h agoPassed402127 ms$0.0035
19 h agoPassed40238 ms$0.0035
37 h agoTimed out---
4 days agoTimed out---
5 days agoPassed40241 ms$0.0035
Show 10 older checks
5 days agoPassed402122 ms$0.0035
5 days agoPassed402123 ms$0.0035
6 days agoPassed402131 ms$0.0035
6 days agoPassed402118 ms$0.0035
7 days agoPassed402125 ms$0.0035
7 days agoPassed402149 ms$0.0035
7 days agoPassed402146 ms$0.0035
8 days agoPassed402194 ms$0.0035
8 days agoPassed402153 ms$0.0035
8 days agoPassed402125 ms$0.0035