Supported Criteria
On this page, you can find all the criteria supported by the Armory Policy Engine. These will be used to build policy conditions.
checkAction
{
"criterion": "checkAction",
"args": ["signTransaction"]
}
signTransaction
signRaw
signMessage
signUserOperation
signTypedData
grantPermission
checkResource
{
"criterion": "checkResource",
"args": ["vault"]
}
checkPermission
{
"criterion": "checkPermission",
"args": ["wallet:read"]
}
wallet:import
wallet:create
wallet:read
checkPrincipalId
{
"criterion": "checkPrincipalId",
"args": ["bob"]
}
checkPrincipalRole
{
"criterion": "checkPrincipalRole",
"args": ["admin"]
}
root
admin
member
manager
checkPrincipalGroup
{
"criterion": "checkPrincipalGroup",
"args": ["developers"]
}
checkAccountId
{
"criterion": "checkAccountId",
"args": ["eip155:eoa:0xddcf208f219a6e6af072f2cfdc615b2c1805f98e"]
}
checkAccountAddress
{
"criterion": "checkAccountAddress",
"args": ["0xddcf208f219a6e6af072f2cfdc615b2c1805f98e"]
}
checkAccountType
{
"criterion": "checkAccountType",
"args": ["eoa"]
}
eoa
4337
checkAccountGroup
{
"criterion": "checkAccountGroup",
"args": ["engineering-dev-wallet"]
}
checkAccountAssigned
{
"criterion": "checkAccountAssigned",
"args": null
}
checkSourceId
{
"criterion": "checkSourceId",
"args": ["eip155:137:0xddcf208f219a6e6af072f2cfdc615b2c1805f98e"] // CAIP-10
}
checkSourceAddress
{
"criterion": "checkSourceAddress",
"args": ["0xddcf208f219a6e6af072f2cfdc615b2c1805f98e"]
}
checkSourceAccountType
{
"criterion": "checkSourceAccountType",
"args": ["eoa"]
}
eoa
4337
checkSourceClassification
{
"criterion": "checkSourceClassification",
"args": ["internal"]
}
internal
external
counterparty
managed
checkDestinationId
{
"criterion": "checkDestinationId",
"args": ["eip155:137:0xddcf208f219a6e6af072f2cfdc615b2c1805f98e"] // CAIP-10
}
checkDestinationAddress
{
"criterion": "checkDestinationAddress",
"args": ["0xddcf208f219a6e6af072f2cfdc615b2c1805f98e"]
}
checkDestinationAccountType
{
"criterion": "checkDestinationAccountType",
"args": ["eoa"]
}
eoa
4337
checkDestinationClassification
{
"criterion": "checkDestinationClassification",
"args": ["external"]
}
internal
external
counterparty
managed
checkIntentType
{
"criterion": "checkIntentType",
"args": ["transferNative"]
}
transferNative
transferErc20
transferErc721
transferErc1155
approveTokenAllowance
permit
permit2
callContract
cancelTransaction
deployContract
signTypedData
userOperation
checkIntentChainId
{
"criterion": "checkIntentChainId",
"args": ["137"]
}
checkIntentAmount
Intent amount by currency is not supported yet.
{
"criterion": "checkIntentAmount",
"args": {
"currency": "fiat:usd",
"operator": "lte",
"value": "1000000000000000000" // Wei
}
}
fiat:usd
fiat:eur
gt
greater than
gte
greater than or equal
lt
lower than
lte
lower than or equal
eq
equal
ne
not equal
checkIntentContract
{
"criterion": "checkIntentContract",
"args": ["eip155:137:0xddcf208f219a6e6af072f2cfdc615b2c1805f98e"] // CAIP-10
}
checkIntentSpender
{
"criterion": "checkIntentSpender",
"args": ["eip155:137:0xddcf208f219a6e6af072f2cfdc615b2c1805f98e"] // CAIP-10
}
checkIntentToken
{
"criterion": "checkIntentToken",
"args": ["eip155:137:0xddcf208f219a6e6af072f2cfdc615b2c1805f98e"] // CAIP-10
}
checkIntentHexSignature
{
"criterion": "checkIntentHexSignature",
"args": ["0xe8e33700"]
}
checkIntentMessage
{
"criterion": "checkIntentMessage",
"args": {
"operator": "contains"
"value": "Welcome to Opensea!"
}
}
eq
contains
checkIntentPayload
{
"criterion": "checkIntentPayload",
"args": []
}
checkIntentAlgorithm
{
"criterion": "checkIntentAlgorithm",
"args": ["ES256K"]
}
ES256K
secp256k1 - an Ethereum EOA
ES256
secp256r1 - ecdsa but not ethereum
RS256
checkIntentDomain
{
"criterion": "checkIntentDomain",
"args": {
"version": [], // optional
"chainId": [], // optional
"name": [], // optional
"verifyingContract": [] // optional
}
}
checkErc1155TokenId
{
"criterion": "checkErc1155TokenId",
"args": ["eip155:137/erc1155:0x08a08d0504d4f3363a5b7fda1f5fff1c7bca8ad4/12345"]
}
checkErc1155Transfers
{
"criterion": "checkErc1155Transfers",
"args": [{
"tokenId": "eip155:137/erc1155:0x08a08d0504d4f3363a5b7fda1f5fff1c7bca8ad4/12345",
"operator": "lte",
"value": "2"
}]
}
gt
greater than
gte
greater than or equal
lt
lower than
lte
lower than or equal
eq
equal
ne
not equal
checkPermitDeadline
{
"criterion": "checkPermitDeadline",
"args": {
"operator": "lte",
"value": ""
}
}
gt
greater than
gte
greater than or equal
lt
lower than
lte
lower than or equal
eq
equal
ne
not equal
checkGasFeeAmount
Gas fee by currency is not supported yet.
{
"criterion": "checkGasFeeAmount",
"args": {
"currency": "fiat:usd",
"operator": "lte",
"value": "1000000000000000000" // Wei
}
}
fiat:usd
fiat:eur
gt
greater than
gte
greater than or equal
lt
lower than
lte
lower than or equal
eq
equal
ne
not equal
checkNonceExists
{
"criterion": "checkNonceExists",
"args": null
}
checkNonceNotExists
{
"criterion": "checkNonceNotExists",
"args": null
}
checkApprovals
// Require approvals of 3 admins and count the principal signature (if he is an admin)
{
"criterion": "checkApprovals",
"args": [
{
"approvalCount": 3,
"countPrincipal": true,
"approvalEntityType": "Narval::UserRole"
"entityIds": ["admin"]
}
]
}
Narval::User
Narval::UserRole
Narval::UserGroup
checkSpendingLimit
Spending limit by currency is not supported yet.
{
"criterion": "checkSpendingLimit",
"args": {
"limit": "1000000000000000000", // Wei
"operator": "lte",
"currency": "fiat:usd",
"timeWindow": {
"type": "fixed", // "rolling", "fixed"
"period": "1d", // "1d", "1m", "1y"
"value": 86400, // in seconds
"startDate": 1702418817 // timestamp in ms
"endDate": 1722418817 // timestamp in ms
},
"filters": {
"perPrincipal": true,
"tokens": [],
"users": [],
"resources": [],
"destinations": [],
"chains": [],
"userGroups": [],
"accountGroups": []
}
}
}
gt
greater than
gte
greater than or equal
lt
lower than
lte
lower than or equal
eq
equal
ne
not equal
fiat:usd
fiat:eur
type
rolling, fixed
period
1d, 1m, 1y
this can be combined only with fixed type window
value
number
time window length in seconds
startDate
number
timestamp in ms
endDate
number
timestamp in ms
perPrincipal
boolean
filter spendings by principal id
tokens
filter spendings by asset ids
users
filter spendings by user ids
resources
filter spendings by resource ids
destinations
CAIP-10
filter spendings by destination ids
chains
filter spendings by chain ids
userGroups
filter spendings by user group ids
accountGroups
filter spendings by account group ids
checkRateLimit
{
"criterion": "checkRateLimit",
"args": {
"limit": "1000000000000000000", // Wei
"timeWindow": {
"type": "fixed", // "rolling", "fixed"
"period": "1d", // "1d", "1m", "1y"
"startDate": 1702418817 // timestamp in ms
"endDate": 1722418817 // timestamp in ms
},
"filters": {
"perPrincipal": true,
"tokens": [],
"users": [],
"resources": [],
"destinations": [],
"chains": [],
"userGroups": [],
"accountGroups": []
}
}
}
{
"criterion": "checkRateLimit",
"args": {
"limit": "1000000000000000000", // Wei
"timeWindow": {
"type": "rolling", // "rolling", "fixed"
"value": 86400 // In seconds
"startDate": 1702418817 // timestamp in ms
"endDate": 1722418817 // timestamp in ms
},
"filters": {
"perPrincipal": true,
"tokens": [],
"users": [],
"resources": [],
"destinations": [],
"chains": [],
"userGroups": [],
"accountGroups": []
}
}
}
User Operation
checkEntryPointId
{
"criterion": "checkEntryPointId",
"args": ["eip155:137:0xddcf208f219a6e6af072f2cfdc615b2c1805f98e"] // CAIP-10
}
checkEntryPointAddress
{
"criterion": "checkEntryPointAddress",
"args": ["0xddcf208f219a6e6af072f2cfdc615b2c1805f98e"]
}
checkEntryPointAccountType
{
"criterion": "checkEntryPointAccountType",
"args": ["eoa"]
}
eoa
4337
checkEntryPointClassification
{
"criterion": "checkEntryPointClassification",
"args": ["internal"]
}
internal
external
counterparty
managed
checkUserOperationIntents
{
"criterion": "checkUserOperationIntents",
"args": []
}
type
contract
token
spender
chainId
hexSignature
algorithm
source
id: checkSourceId address: checkSourceAddress accountType: checkSourceAccountType classification: checkSourceClassification
destination
id: checkDestinationId address: checkDestinationAddress accountType: checkDestinationAccountType classification: checkDestinationClassification
transfers
tokens: checkErc1155TokenId amounts: checkErc1155Transfers
amount
message
payload
domain
deadline
Last updated