rules
with defined criteria.action
, operation
, and criteria
:
action
can either accept
or reject
a transaction if the criteria in the rule are met.criteria
is an array of logical expressions. All parameters must evaluate to true for the action to be applied.operation
corresponds to a CDP v2 API:
signEvmTransaction
or signSolTransaction
for signing transactions (to set a transaction limit)sendEvmTransaction
for signing a transaction and sending it to a supported networksignEvmTransaction
and signSolTransaction
operations are currently supported.project
-level policy applies to all accounts in a CDP Project. Only one project-level policy can be applied to accounts within a CDP Project at any given time.account
-level policy applies to one or more accounts. An account can have at most one account-level policy at any given time.
Thus, a single account can be assigned at most two policies at any given time: one project-level policy and one account-level policy.scope
field of a policy:
rules
array:
criteria
(processed as a logical AND operation applied to a list of independently evaluated boolean expressions) are met, accept
or reject
behavior is applied immediately and the engine stops further evaluation of the policy.criteria
are met, the engine moves to processing the next policy (i.e., an account
-level policy).signEvmTransaction
request, accept the request if the transaction is less than or equal to 1000000000000000000 wei ORsignEvmTransaction
request, accept the request if the transaction is less than or equal to 2000000000000000000 wei AND the request is made to the address 0xEeeeeeEeeeEeEeeEeEeeEEEeeeeEeeeeeeeEEeE
.account
-level policy (if one exists).deletePolicy
operation.
Account-level policies can be applied in two ways:
policies
field in the request body of the createEvmAccount
and createSolAccount
operations.policies
field in the request body of the updateEvmAccount
and updateSolanaAccount
operations.value
field is compared to the criterion’s ethValue
field using the operator
field.
evmAddress
A criterion based on the recipient address of the transaction. The transaction’s to
field is compared to the criterion’s addresses
field using the operator
field.
address
field is compared to the list of addresses in the transaction’s accountKeys
(for legacy transactions) or staticAccountKeys
(for V0 transactions) array using the operator
field.