Simulate policies
Simulates policy evaluation for one operation against the project’s current policies and returns the action the real operation would take, the rule that decided it, and the first unmet criterion of every rule that did not match. Nothing is signed, broadcast, or persisted, and gas and nonce are not populated: the transaction is evaluated as submitted.
Each unmet criterion (observed) and each matched-rule criterion (observations) can include the value observed in the request, with messages and decoded arguments returned up to their documented size limits.
Rate-limiting criteria are read but not consumed. netUSDChange criteria run transaction simulation, and pass successfully on testnets, as in the real operation. The result is a snapshot: policies, rate-limit counters, or chain state may change before a real call.
A policy rejection returns 200 with action: reject; this endpoint never returns policy_violation. A criterion that cannot be evaluated for this input returns 422.
Authorizations
A JWT signed using your CDP API Key Secret, encoded in base64. Refer to the Generate Bearer Token section of our Authentication docs for information on how to generate your Bearer Token.
Body
- SignEvmTransactionSimulationInput
- SendEvmTransactionSimulationInput
- SignEvmHashSimulationInput
- SignEvmMessageSimulationInput
- SignEvmTypedDataSimulationInput
- PrepareUserOperationSimulationInput
- SendUserOperationSimulationInput
- SignSolTransactionSimulationInput
- SendSolTransactionSimulationInput
- SignSolMessageSimulationInput
- SignEndUserEvmHashSimulationInput
- SignEndUserEvmTransactionSimulationInput
- SendEndUserEvmTransactionSimulationInput
- SignEndUserEvmMessageSimulationInput
- SignEndUserEvmTypedDataSimulationInput
- SendEndUserOperationSimulationInput
- SignEndUserSolTransactionSimulationInput
- SendEndUserSolTransactionSimulationInput
- SignEndUserSolMessageSimulationInput
- SendEndUserEvmAssetSimulationInput
- SendEndUserSolAssetSimulationInput
- CreateEndUserEvmSwapSimulationInput
Inputs for one operation, without signing credentials. operation is the policy rule operation name (for example signSolTransaction), not the HTTP operation ID (signSolanaTransaction).
Rule operation to simulate.
signEvmTransaction The 0x-prefixed address of the EVM account.
^0x[0-9a-fA-F]{40}$The RLP-encoded transaction to evaluate, as a 0x-prefixed hex string.
"0x02f082210580843b9aca00847735940082520894123456789012345678901234567890123456789087038d7ea4c6800080c0"
Response
Policy simulation result.
The action the real operation would take and why. matchedRule is present exactly when reason is rule_accepted or rule_rejected.
Whether the real operation would be accepted or rejected.
accept, reject "reject"
Why the operation got its action. Each value implies exactly one action.
Within a policy, a matching reject rule overrides any matching accept rule, regardless of rule order.
With accept: rule_accepted means matchedRule matched all of its criteria, its action is accept, and no reject rule in the same policy matched. no_rule_for_operation means no rule targeted the operation, so it was accepted by default.
With reject: rule_rejected means matchedRule matched all of its criteria and its action is reject, so the rejection is caused by the entire rule. no_rule_matched means at least one rule targeted the operation but none matched, so it was rejected by default; unmatchedRules shows the criterion that disqualified each one.
rule_accepted, rule_rejected, no_rule_matched, no_rule_for_operation "no_rule_matched"
Rules targeting the operation that were evaluated and did not match. Within a policy, reject rules are evaluated before accept rules, and evaluation stops at matchedRule. Rules that were not evaluated are omitted. When there is no matchedRule, every rule that targeted the operation appears here. Among matching rules with the same action, the first in policy order is matchedRule.
Policies iterated, in order: the project policy, then the account policy. Evaluation stops at the policy containing matchedRule. End-user operations consult only the project policy.
The rule whose action decided the evaluation.
The unit this result describes. Present only when the operation was evaluated as more than one unit: one unit per call for user operations, and one unit per signing account for Solana transactions. Each unit is evaluated against the policies separately, and matchedRule, unmatchedRules, evaluatedPolicies, and every observed value describe this unit only. When action is reject, this is the first unit that was rejected. When action is accept, every unit was accepted and this is the last one.