api.moltrust.ch/guard/api/molcheck/check
MolCheck checks one proposed agent action, such as a payment, against the mandate its principal granted and returns PERMIT, DENY or PENDING with a MolCheck record: digests of mandate, transaction and action plus a sha256 core_digest that anyone holding the same inputs can recompute offline. Meant for the step before an agent executes an action. Fail-closed: a missing or malformed mandate yields DE
POST
https://api.moltrust.ch/guard/api/molcheck/checkUptime100% 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://api.moltrust.ch/guard/api/molcheck/check", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"mandate":{"grants":[{"action_binding":"sha256:8c2938c57c38e44ed13ce9aef8a741bfc6e636fc60857c05c483078aa26cfb76","constraints":[{"field":"to","type":"exact","value":"did:web:merchant.example"},{"field":"amount","hi":1000,"lo":0,"type":"range"}],"disposition":"allow","type_fields":["verb","asset","chain"]}],"mandate_version":"1.0"},"transaction":{"action":{"asset":"USDC","chain":"base","verb":"tra),
});
console.log(await res.json());Example input
{"mandate":{"grants":[{"action_binding":"sha256:8c2938c57c38e44ed13ce9aef8a741bfc6e636fc60857c05c483078aa26cfb76","constraints":[{"field":"to","type":"exact","value":"did:web:merchant.example"},{"field":"amount","hi":1000,"lo":0,"type":"range"}],"disposition":"allow","type_fields":["verb","asset","chain"]}],"mandate_version":"1.0"},"transaction":{"action":{"asset":"USDC","chain":"base","verb":"tra