Micro Provenance Graph Integrity
by Provenance graph integrity in Other
Inspect a declared dependency graph of up to 64 nodes and 128 edges: exact cycle membership, source-root reachability, and deterministic graph digest. Duplicate edges and dangling references are rejected. Hash declarations are not authenticated.
POST https://www.mahastrategies.com/api/v1/micro/provenance-graph-integrity
Last 30 days
Status and outage history · Atom feed
- Uptime
- 100%
- Response time
- 362 ms typical, 638 ms slowest 5%
- Last check
- 4 h ago
- Next check
- any minute now
How to call it
POST https://www.mahastrategies.com/api/v1/micro/provenance-graph-integrity
Each call costs $0.0325 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://www.mahastrategies.com/api/v1/micro/provenance-graph-integrity
content-type: application/json
{
"dataClass": "synthetic",
"edges": [
{
"edgeId": "e1",
"from": "p1",
"relation": "derived-from",
"to": "s1"
}
],
"nodes": [
{
"digestHash": "sha256:41cf6794ba4200b839c53531555f0f3998df4cbb01a4d5cb0b94e3ca5e23947d",
"kind": "source",
"nodeId": "s1"
},
{
"digestHash": "sha256:0886b051075687c18a9ae5075383feb8400fbe4328c6e4bd45b77b30f1e73b54",
"kind": "passage",
"nodeId": "p1"
}
]
}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dataClass | string | Yes | One of: public, synthetic. |
edges | array | Yes | |
nodes | array | Yes |
Example response
The provider's example. We can't check it without paying.
Example response, 27 lines
{
"amountBaseUnits": "32500",
"boundaries": [
"Public or synthetic inputs only. Caller labels are declarations,…"
],
"inputDigest": "sha256:7f3cf1641d88dcf696562565f5a0d85b10ff6e2280550d397705df766…",
"offerId": "provenance-graph-integrity",
"receiptDigest": "sha256:b470cb6ff6c70a21c566b7a9a2d567deca67e51475c9af311caa1e85e…",
"result": {
"cycleNodeIds": [],
"dataClass": "synthetic",
"edgeDirection": "from-depends-on-to",
"graphSha256": "sha256:8b6963a7ea4c8e01e2e4035bdedac4d1883eb3f4ec34ceea08b8924c9…",
"inputSha256": "sha256:7f3cf1641d88dcf696562565f5a0d85b10ff6e2280550d397705df766…",
"limits": [
"Public/synthetic is a caller declaration, not content inspection…"
],
"resultSha256": "sha256:ccb59b58cff91774c419fbfc44cc770ecc4075aee533b2314350353b4…",
"rootlessNodeIds": [],
"sourceRootIds": [
"s1"
],
"sourcesVerified": false,
"state": "rooted"
},
"version": "maha-microproducts/0.1"
}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.0325.
curl: see the payment challenge
# bash or zsh: see the payment challenge. Nothing is charged.
curl -sS -g -i -X POST 'https://www.mahastrategies.com/api/v1/micro/provenance-graph-integrity' \
-H 'content-type: application/json' \
--data-raw '{"dataClass":"synthetic","edges":[{"edgeId":"e1","from":"p1","relation":"derived-from","to":"s1"}],"nodes":[{"digestHash":"sha256:41cf6794ba4200b839c53531555f0f3998df4cbb01a4d5cb0b94e3ca5e23947d","kind":"source","nodeId":"s1"},{"digestHash":"sha256:0886b051075687c18a9ae5075383feb8400fbe4328c6e4bd45b77b30f1e73b54","kind":"passage","nodeId":"p1"}]}'
# 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://www.mahastrategies.com/api/v1/micro/provenance-graph-integrity' \
-H 'content-type: application/json' \
--data-raw '{"dataClass":"synthetic","edges":[{"edgeId":"e1","from":"p1","relation":"derived-from","to":"s1"}],"nodes":[{"digestHash":"sha256:41cf6794ba4200b839c53531555f0f3998df4cbb01a4d5cb0b94e3ca5e23947d","kind":"source","nodeId":"s1"},{"digestHash":"sha256:0886b051075687c18a9ae5075383feb8400fbe4328c6e4bd45b77b30f1e73b54","kind":"passage","nodeId":"p1"}]}' \
| 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.0325 per call.
const client = new x402Client().setSpendControls({ maxAmountPerPayment: "$0.0325" });
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.0325 per payment. GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fwww.mahastrategies.com%2Fapi%2Fv1%2Fmicro%2Fprovenance-graph-integrity&method=POST
const res = await pay("https://www.mahastrategies.com/api/v1/micro/provenance-graph-integrity", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({
"dataClass": "synthetic",
"edges": [
{
"edgeId": "e1",
"from": "p1",
"relation": "derived-from",
"to": "s1"
}
],
"nodes": [
{
"digestHash": "sha256:41cf6794ba4200b839c53531555f0f3998df4cbb01a4d5cb0b94e3ca5e23947d",
"kind": "source",
"nodeId": "s1"
},
{
"digestHash": "sha256:0886b051075687c18a9ae5075383feb8400fbe4328c6e4bd45b77b30f1e73b54",
"kind": "passage",
"nodeId": "p1"
}
]
}),
});
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.0325 per call.
client = x402ClientSync().set_spend_controls({"max_amount_per_payment": "$0.0325"})
register_exact_evm_client(client, EthAccountSigner(Account.from_key(os.environ["EVM_PRIVATE_KEY"])))
with x402_requests(client) as session:
res = session.post(
"https://www.mahastrategies.com/api/v1/micro/provenance-graph-integrity",
json={
"dataClass": "synthetic",
"edges": [
{
"edgeId": "e1",
"from": "p1",
"relation": "derived-from",
"to": "s1",
},
],
"nodes": [
{
"digestHash": "sha256:41cf6794ba4200b839c53531555f0f3998df4cbb01a4d5cb0b94e3ca5e23947d",
"kind": "source",
"nodeId": "s1",
},
{
"digestHash": "sha256:0886b051075687c18a9ae5075383feb8400fbe4328c6e4bd45b77b30f1e73b54",
"kind": "passage",
"nodeId": "p1",
},
],
},
)
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 |
|---|---|---|---|---|
| 4 h ago | Passed | 402 | 402 ms | $0.033 |
| 7 h ago | Passed | 402 | 257 ms | $0.033 |
| 11 h ago | Passed | 402 | 430 ms | $0.033 |
| 15 h ago | Passed | 402 | 273 ms | $0.033 |
| 19 h ago | Passed | 402 | 502 ms | $0.033 |
| 23 h ago | Passed | 402 | 243 ms | $0.033 |
| 27 h ago | Passed | 402 | 346 ms | $0.033 |
| 31 h ago | Passed | 402 | 272 ms | $0.033 |
| 34 h ago | Passed | 402 | 447 ms | $0.033 |
| 38 h ago | Passed | 402 | 614 ms | $0.033 |
| 41 h ago | Passed | 402 | 434 ms | $0.033 |
| 45 h ago | Passed | 402 | 345 ms | $0.033 |
| 2 days ago | Passed | 402 | 386 ms | $0.033 |
| 2 days ago | Passed | 402 | 638 ms | $0.033 |
| 2 days ago | Passed | 402 | 597 ms | $0.033 |