Skip to main content

Policy Engine v2

Policy Engine v2 is 1claw's signing-time authorization stack: built-in glob policies with tx_conditions, optional Cedar (Team+) and OPA (Business+) backends, contract ABI / Solana IDL decoding, and consensus triggers that return 202 pending approval instead of signing immediately.

Canonical docs

This page is a guide entry point. Full reference lives under Treasury → Policy Engine in the sidebar.

What's included

FeatureTierDoc
Built-in policies + tx_conditionsAllPolicy language — tx_conditions
Cedar backend (shadow / enforce)Team+Policy Engine — Cedar
OPA (Rego/WASM) backendBusiness+Policy Engine — OPA
Contract ABIs + interface_kind (evm_abi / solana_idl)All (registry)Contract ABI registry
Consensus triggers + pending approvalsAllConsensus & pending approvals
Copy-paste cookbooks (USDC caps, Permit deny, Solana, …)AllPolicy cookbooks

Quick start

  1. Read Policy Engine — Cedar, OPA & Consensus for org backend settings (shadow vs enforce), circuit breaker, and the approval workflow.
  2. Register ABIs at POST /v1/org/contract-abis with interface_kind: "evm_abi" or "solana_idl".
  3. Attach tx_conditions or consensus_trigger JSON to access policies on signing key paths.
  4. When consensus matches, the API returns 202 with pending_approval_id. After human approval, execute with POST /v1/pending-approvals/{id}/execute — the approval_id token is single-use and submitter-bound.
curl -s https://api.1claw.xyz/v1/org/settings/policy-backend \
-H "Authorization: Bearer $ONECLAW_TOKEN" | jq