Lacre
Integrate: require_attestation in your contract.
Produce attestations: gateway, mailbox or MCP with credits, or your own wallet paying the fee.
Extraction: use the gateway or your own body URL, see direct-use.md
Integrate: require_attestation in your contract.
Produce attestations: gateway, mailbox or MCP with credits, or your own wallet paying the fee.
Extraction: use the gateway or your own body URL, see direct-use.md
Drop a signed email and GenLayer validators fetch the sender's keys and check the signature by consensus.
Once that is final, the body is served and its fields are read, agreed on the same way.
Only then is it recorded.
Records live here; your contract reads them by id.
def final(address):
# A record read before FINALIZED can still be appealed away (rule 1), so
# nothing here reads any other state.
return gl.get_contract_at(address).view(state=StorageType.LATEST_FINAL)
def resolved(router, name):
# Resolved on every use and never stored: when the Router moves a name
# after its 48 hour notice, this contract follows without a redeploy.
found = str(final(router).resolve(name))
return Address(found) if found else None
def attested(router, record_id, domain, min_key_bits):
"""(Verifier, record) for a record that passes check_for, or (None, {}).
Never raises: an unreadable Router or Verifier reads as no attestation.
"""
try:
verifier = resolved(router, "verifier")
if verifier is None:
return None, {}
record = dict(final(verifier).get(record_id))
if not record:
return None, {}
# check_for binds a requester. This app accepts a record whoever paid
# for it, since the requester proves nothing about who received the
# message (rule 6), so the record's own is passed and the Verifier's
# own comparisons decide validity, alignment, domain and key size
# (rule 3). An app that pays out to the requester passes its own.
ok = final(verifier).check_for(record_id, str(domain), int(min_key_bits),
str(record.get("requester", "")))
return (verifier, record) if ok is True else (None, {})
except Exception:
return None, {}
Holds the sender keys the validators agreed on, with a quarantine the first time a key is seen for a domain and selector.
Checks a signed email against the cached key and records whether it is valid and aligned.
Validators each fetch the sender's signing key and must agree on it, so no single resolver decides.
An unknown domain needs no integration: its key is fetched and recorded the first time it signs.
What the email says is accepted only when independent validators read it the same way.
curl -X POST https://lacre.in-sidr.xyz/attest \ -H "X-API-Key: $LACRE_KEY" \ -F "[email protected]" \ -F "extract=auto"
{
"mcpServers": {
"lacre": {
"type": "http",
"url": "https://lacre.in-sidr.xyz/mcp",
"headers": { "X-API-Key": "YOUR_KEY" }
}
}
}
Your contract reads records by id with require_attestation. Nothing to sign up for.
SEE THE SNIPPETRequest an API key. The gateway pays the fee and the gas, and you pay it in credits.
Have GEN? Sign attest_inline yourself and pay the fee. No account.