Pular para o conteúdo

Policy reference

This page is the canonical reference for policy fields, JavaScript conditions, workflow objects, and policy-writing rules. For the concept, see Policies. For operations, see Manage policies. For reusable patterns, see Policy examples.

API reference

TaskAPI reference
Create, update, lock, or unlock a policyPropose an intent
Test a policy intentPerform a dry run
Query policiesList policies, Get policy details
Check the full schemaOpenAPI specification

Create policy fields

These fields are used in a v0_CreatePolicy payload and in genesis policy entries. Genesis policy entries are embedded in a domain's policies array and do not include the type field.

FieldTypeRequiredRules
idUUID stringYesUnique policy ID.
aliasstringYes1-75 characters. Use a stable operational name.
rankintegerYes0-1000. Higher rank wins among eligible policies in the same domain. Ranks aren't compared across domains. See Policy selection.
intentTypesstring arrayNoIf omitted, the policy can match all intent types. Use only for deliberate fallback or emergency policies. An empty array matches no intent type.
intentOriginenumNoUserSigned or SystemSigned. If omitted, the policy matches user-signed proposals only.
scopeenumYesSelf, Descendants, or SelfAndDescendants.
scriptingEngineenumYesJavascript_v0.
conditionobjectNoIf omitted, the condition behaves as always true.
workflowarrayNoIf omitted or null, matching intents are auto-approved. An empty array rejects matching intents.
lockenumYesUnlocked or Locked.
descriptionstringNo0-250 characters.
customPropertiesobjectYesString key-value metadata. Use {} when empty.
typestringYes for intent payloadsv0_CreatePolicy. Omit inside genesis policy entries.

Update and lock fields

v0_UpdatePolicy uses a reference instead of id so the update targets a specific policy revision.

{
  "payload": {
    "reference": {
      "id": "5b440ba5-d013-11eb-8cd0-dcfb48cfb3cb",
      "revision": 3
    },
    "alias": "policy-governance",
    "rank": 750,
    "intentTypes": ["v0_CreatePolicy", "v0_UpdatePolicy"],
    "intentOrigin": "UserSigned",
    "scope": "Self",
    "scriptingEngine": "Javascript_v0",
    "condition": {
      "expression": "context.references.users[context.request.author.id].roles.includes('policy-operator')",
      "type": "Expression"
    },
    "workflow": [
      {
        "role": "policy-operator",
        "quorum": 2,
        "type": "RoleQuorum"
      }
    ],
    "description": "Controls policy lifecycle operations.",
    "customProperties": {},
    "type": "v0_UpdatePolicy"
  }
}

v0_LockPolicy and v0_UnlockPolicy use only reference and type.

{
  "payload": {
    "reference": {
      "id": "5b440ba5-d013-11eb-8cd0-dcfb48cfb3cb",
      "revision": 3
    },
    "type": "v0_LockPolicy"
  }
}

Policy selection

Policy evaluation selects at most one policy in each domain, not one policy overall. Rank decides between policies of the same domain only. A policy never outranks a policy that belongs to a different domain.

When an intent is submitted, policy evaluation:

  1. Builds the domain path from the root domain down to the target domain. The author must belong to a domain on this path, so a user can target only their own domain or one of its descendants.
  2. Decides which domains on the path to evaluate. If the author's domain uses CoerceDescendants, evaluation stops at the author's domain and skips the domains below it, including the target domain. Otherwise, evaluation covers every domain on the path. For details, see Governing strategy.
  3. In each evaluated domain, takes that domain's unlocked policies and keeps the ones that match:
    • intentOrigin. A policy with omitted intentOrigin matches user-signed proposals only.
    • intentTypes. A policy with omitted intentTypes can match any intent type.
    • scope, relative to the target domain. See Scope values.
    • condition. The condition must return true. A policy without a condition always matches.
  4. In each evaluated domain, selects the eligible policy with the highest rank. If two eligible policies in the same domain have the same rank, the policy whose last modification is oldest wins. Updating, locking, or unlocking a policy counts as a modification.
  5. Checks that the domains that must have a policy have one. The author's domain must have a selected policy, and so must the target domain when evaluation covers it. If either has none, the intent fails with NoApplicablePoliciesForDomain. Other domains on the path that have no eligible policy add no workflow.
  6. Applies the workflow of every selected policy. The system approves the intent only when every selected workflow approves it. A rejection in any selected workflow rejects the intent.

Evaluation stops at the first condition that throws an error, and the intent fails with PolicyScriptingExecutionFailed. In each domain, the system evaluates conditions in rank order and stops at the first eligible policy. It evaluates a condition on a lower-ranked policy only after it rules out every higher-ranked policy in that domain.

System-signed proposals have no author. Evaluation treats the target domain as the author's domain. As a result, evaluation covers every domain from the root to the target domain, and the target domain must have a selected policy.

Approvals across domains

When the system selects more than one policy, each decision counts toward exactly one of them:

  • An approval or rejection counts only toward the selected policy of the decision maker's own domain. A user in a parent domain can't approve the child-domain workflow, and a user in a child domain can't approve the parent-domain workflow.
  • A user can decide on an intent only if their domain is on the path to the target domain and has a selected policy for that intent. Otherwise, the system refuses the decision with No workflow exists in this domain requiring a signature or User not allowed for the targeted domain.
  • If the selected policy of the decision maker's domain has no workflow, the system accepts the decision, but the decision has no effect.
  • A user who already approved an earlier step of a policy can't approve a later step of the same policy. The system refuses the decision with This user has already signed.
  • For user-signed proposals, the author's proposal counts as the first approval in the selected policy of the author's domain only. The author must hold a role required by the first step of that policy, unless the policy has no workflow. If the author doesn't, the intent fails with NoApplicablePoliciesForDomain and the message Author is not authorized to propose.

The following table shows which policies apply to an intent that targets a child domain C under a parent domain P. In every row, the policy selected in each listed domain is the highest-ranked eligible policy of that domain.

Author's domainGoverning strategy of the author's domainDomains evaluatedResult
CEitherP and CC must have a selected policy. If P has an eligible policy with Descendants or SelfAndDescendants scope, its workflow also applies, and users in P must complete it.
PConsiderDescendantsP and CP and C must each have a selected policy. The author's approval counts toward the P workflow. Users in C must complete the C workflow.
PCoerceDescendantsP onlyOnly the selected P policy applies. The system ignores policies in C, including a reject-all policy.

Because each selected workflow must approve, a child-domain policy can't weaken a parent-domain policy that applies to descendants, under either governing strategy. For example, a parent policy with SelfAndDescendants scope and an empty workflow rejects every matching intent in the child domain, even if the child domain's own policy auto-approves it.

Policy changes and open intents

An open intent records the revision of each selected policy. If someone updates, locks, or unlocks one of those policies before the intent completes, the intent fails:

  • Shortly after the change, Ripple Custody (Vault) fails the intent with StaleIntent and the message Intent <id> is referring to old revision of policy <id>. Decisions on it are then refused with cannot be signed anymore.
  • If a decision arrives before that happens, the decision fails the intent with PolicyRevisionMismatch.

Submit a new intent to have it evaluated against the current policies.

If someone locks a domain on the path, the system refuses new intents for that path with DomainLockedError. It also refuses decisions on open intents for that path with Domain <id> is locked. The open intents don't fail. They stay open.

Scope values

The system evaluates scope relative to the target domain of the intent:

ValueApplies to
SelfIntents targeting the policy's own domain.
DescendantsIntents targeting descendant domains only.
SelfAndDescendantsIntents targeting the policy's own domain and descendant domains.

A policy with Descendants or SelfAndDescendants scope in a parent domain adds a parent-domain workflow to matching child-domain intents. It doesn't replace the child domain's policy.

Governing strategy

The governing strategy is a property of the domain. It has an effect only on intents authored by users in that domain. The governing strategies of other domains on the path don't change how the system evaluates an intent.

Governing strategyEffect on intents authored in this domain
ConsiderDescendantsDefault. Evaluation covers every domain from the root down to the target domain, including domains below the author's domain.
CoerceDescendantsEvaluation covers only the domains from the root down to the author's domain. Policies in domains below the author's domain, including the target domain, don't apply, and the target domain doesn't need a matching policy.

For a user in a child domain, the parent's governing strategy changes nothing. Under either strategy, the system evaluates that user's intents in the parent domains and in the user's own domain. To enforce a parent-domain control on child-domain users, give the parent policy Descendants or SelfAndDescendants scope. You don't need CoerceDescendants for that.

Intent origin values

intentOrigin controls whether a policy matches a normal user-signed proposal or an API-only system-signed proposal.

ValueApplies to
OmittedUser-signed proposals.
UserSignedUser-signed proposals.
SystemSignedSystem-signed proposals submitted through the API.

Existing policies that omit intentOrigin do not match system-signed proposals. To allow a service caller to submit an intent without a client-side payload signature, create or update a policy with intentOrigin: "SystemSigned".

Rank guidance

Rank orders the policies of one domain. Use these ranges within each domain. A high rank in a parent domain doesn't let a parent policy replace a child-domain policy.

RangeTypical use
900-1000Explicit emergency or breakglass controls with narrow intent types and high quorum.
500-800High-risk governance such as policy, domain, user, and root administration.
100-500Standard operational policies.
1-99Catch-all or fallback policies that should lose to specific policies.
0Last-resort behavior or intentionally lowest priority.

Condition object

A condition is either an Expression, an And, or an Or.

{
  "condition": {
    "expression": "context.references.users[context.request.author.id].roles.includes('transaction-operator')",
    "type": "Expression"
  }
}

And and Or use a binary tree. Use left and right, not arrays.

{
  "condition": {
    "left": {
      "expression": "context.request.payload.rank >= 700",
      "type": "Expression"
    },
    "right": {
      "expression": "context.references.users[context.request.author.id].roles.includes('policy-operator')",
      "type": "Expression"
    },
    "type": "And"
  }
}

You can also use JavaScript logical operators inside one expression when that is clearer.

{
  "condition": {
    "expression": "context.request.payload.rank >= 700 && context.references.users[context.request.author.id].roles.includes('policy-operator')",
    "type": "Expression"
  }
}

Condition context

Condition expressions can use the context object. System-signed policy conditions can also use context.submitter and intentOrigin.

ObjectContains
context.requestThe intent being evaluated.
context.referencesEntities explicitly referenced by the intent. You cannot query arbitrary entities from a policy condition.
context.submitterIdentity of the user or service caller that submitted the proposal.
intentOriginProposal origin, either UserSigned or SystemSigned.

Common context.request paths:

PathContains
context.request.author.idUser ID that created the intent.
context.request.author.domainIdAuthor's domain ID.
context.request.targetDomainIdDomain targeted by the intent.
context.request.payloadIntent-specific payload.
context.request.payload.typeIntent type, such as v0_CreatePolicy.
context.request.payload.customPropertiesCustom metadata supplied in the payload, when present.

For system-signed proposals, context.request.author is not present. Use context.submitter to check the service caller instead.

Submitter paths:

PathContains
context.submitter.typeUser or Service.
context.submitter.reference.idUser ID for user-signed proposals.
context.submitter.reference.domainIdUser domain ID for user-signed proposals.
context.submitter.subjectService subject for system-signed proposals.
context.submitter.custodyRolesRoles from the service caller token for system-signed proposals. If the configured roles claim is absent, this is an empty array.

System-signed condition example:

{
  "condition": {
    "expression": "context.submitter.type === 'Service' && context.submitter.custodyRoles.includes('gas-station-service')",
    "type": "Expression"
  }
}

Useful payload paths by intent type:

Intent typeUseful paths
v0_CreateUsercontext.request.payload.roles, context.request.payload.alias, context.request.payload.loginIds
v0_UpdateUsercontext.request.payload.reference.id, context.request.payload.roles, context.request.payload.loginIds
v0_CreatePolicycontext.request.payload.rank, context.request.payload.intentTypes, context.request.payload.scope, context.request.payload.workflow
v0_UpdatePolicycontext.request.payload.reference.id, context.request.payload.rank, context.request.payload.intentTypes, context.request.payload.scope, context.request.payload.workflow
v0_CreateDomaincontext.request.payload.alias, context.request.payload.governingStrategy, context.request.payload.permissions, context.request.payload.childrenDomainIds
v0_UpdateDomainPermissionscontext.request.payload.reference.id, context.request.payload.permissions.readAccess
v0_CreateTransactionOrdercontext.request.payload.accountId, context.request.payload.ledgerId, context.request.payload.parameters
v0_ReleaseQuarantinedTransfersPayload fields for the quarantine release request. Use existence checks before accessing optional fields.

Common context.references collections:

CollectionAccess patternUse when
Userscontext.references.users[userId]Check the author's current roles or target user state.
Accountscontext.references.accounts[accountId]Check ledger, account metadata, or account custom properties.
Endpointscontext.references.endpoints[endpointId]Check endpoint trust score or endpoint metadata.
Vaultscontext.references.vaults[vaultId]Check vault properties for account or vault operations.
Tickerscontext.references.tickers[tickerId]Check ticker or asset metadata when referenced.
Domainscontext.references.domains[domainId]Check domain metadata when referenced.

The following diagram shows how a condition can navigate from an intent payload to a referenced account's custom properties:

Context references

JavaScript rules for conditions

Conditions are JavaScript expressions. Write one expression that evaluates to true or false.

RuleGuidance
Use Javascript_v0This is the supported scripting engine.
Return a booleanThe expression should evaluate to true or false for every matching intent.
Prefer strict pathsCheck the actual payload shape for each intent type in the API reference before writing paths.
Check optional fieldsUse hasOwnProperty, null checks, or array length checks before accessing optional nested fields.
Use role names exactlyRole names are case-sensitive and must match user roles.
Keep expressions deterministicAvoid relying on external state. Policies cannot call APIs or query arbitrary entities.

Supported JavaScript patterns:

PatternExample
Comparisoncontext.request.payload.rank >= 700
Logical operatorsa && b, `a
Array includesroles.includes('compliance')
Array some/every/filteroutputs.some(output => BigInt(output.amount) > 100000000n)
Array reduceoutputs.reduce((sum, output) => sum + BigInt(output.amount), 0n)
String methodsalias.startsWith('prod-'), alias.includes('treasury')
Object checkspayload.hasOwnProperty('parameters')
JSON methodsJSON.parse(rawTx), JSON.stringify(roles)
Date methodsnew Date().getHours(), new Date().getDay()

Amount handling:

  • Use BigInt for amount comparisons.
  • Use an n suffix for integer literals, such as 50000000000n.
  • When the payload value is a string, wrap it with BigInt(...).
  • For multi-output payloads, sum amounts with reduce.
{
  "condition": {
    "expression": "context.request.payload.parameters.outputs.reduce((sum, output) => sum + BigInt(output.amount), 0n) >= 500000000n",
    "type": "Expression"
  }
}

Null-safe nested access:

{
  "condition": {
    "expression": "context.request.payload.hasOwnProperty('parameters') && context.request.payload.parameters != null && context.request.payload.parameters.hasOwnProperty('destination') && context.request.payload.parameters.destination.type == 'Endpoint'",
    "type": "Expression"
  }
}

Condition examples

High-risk Bitcoin transaction

This condition matches when the author is an operator, the transaction parameters are Bitcoin, and either the amount is at least 1 BTC or the source account has a custom property named escalatePolicy set to true.

{
  "expression": "context.references.users[context.request.author.id].roles.includes('operator') && context.request.payload.hasOwnProperty('parameters') && context.request.payload.parameters != null && context.request.payload.parameters.type == 'Bitcoin' && (context.request.payload.parameters.outputs.reduce((sum, output) => sum + BigInt(output.amount), 0n) >= 100000000n || context.references.accounts[context.request.payload.accountId].metadata.customProperties.escalatePolicy == 'true')",
  "type": "Expression"
}

Medium-risk Bitcoin transaction

This condition matches operator-created Bitcoin transactions below 1 BTC where the account is not escalated and the destination is either an unknown address or an endpoint with a trust score of 50 or lower.

{
  "left": {
    "expression": "context.references.users[context.request.author.id].roles.includes('operator') && context.request.payload.hasOwnProperty('parameters') && context.request.payload.parameters != null && context.request.payload.parameters.type == 'Bitcoin' && context.request.payload.parameters.outputs.reduce((sum, output) => sum + BigInt(output.amount), 0n) <= 100000000n && context.references.accounts[context.request.payload.accountId].metadata.customProperties.escalatePolicy != 'true' && context.request.payload.parameters.outputs[0].destination.type == 'Address'",
    "type": "Expression"
  },
  "right": {
    "expression": "context.references.users[context.request.author.id].roles.includes('operator') && context.request.payload.hasOwnProperty('parameters') && context.request.payload.parameters != null && context.request.payload.parameters.type == 'Bitcoin' && context.request.payload.parameters.outputs.reduce((sum, output) => sum + BigInt(output.amount), 0n) <= 100000000n && context.references.accounts[context.request.payload.accountId].metadata.customProperties.escalatePolicy != 'true' && context.request.payload.parameters.outputs[0].destination.type == 'Endpoint' && context.references.endpoints[context.request.payload.parameters.outputs[0].destination.endpointId].trustScore <= 50",
    "type": "Expression"
  },
  "type": "Or"
}

Low-risk Bitcoin transaction

This condition matches operator-created Bitcoin transactions below 1 BTC where the account is not escalated and the destination is either an internal account or an endpoint with a trust score of 50 or higher.

{
  "left": {
    "expression": "context.references.users[context.request.author.id].roles.includes('operator') && context.request.payload.hasOwnProperty('parameters') && context.request.payload.parameters != null && context.request.payload.parameters.type == 'Bitcoin' && context.request.payload.parameters.outputs.reduce((sum, output) => sum + BigInt(output.amount), 0n) <= 100000000n && context.references.accounts[context.request.payload.accountId].metadata.customProperties.escalatePolicy != 'true' && context.request.payload.parameters.outputs[0].destination.type == 'Account'",
    "type": "Expression"
  },
  "right": {
    "expression": "context.references.users[context.request.author.id].roles.includes('operator') && context.request.payload.hasOwnProperty('parameters') && context.request.payload.parameters != null && context.request.payload.parameters.type == 'Bitcoin' && context.request.payload.parameters.outputs.reduce((sum, output) => sum + BigInt(output.amount), 0n) <= 100000000n && context.references.accounts[context.request.payload.accountId].metadata.customProperties.escalatePolicy != 'true' && context.request.payload.parameters.outputs[0].destination.type == 'Endpoint' && context.references.endpoints[context.request.payload.parameters.outputs[0].destination.endpointId].trustScore >= 50",
    "type": "Expression"
  },
  "type": "Or"
}

Create or update privileged users

This condition matches user creation or update intents when the target user has the admin or compliance role.

{
  "expression": "context.request.payload.roles.includes('admin') || context.request.payload.roles.includes('compliance')",
  "type": "Expression"
}

This condition matches user creation or update intents when the target user does not have either privileged role.

{
  "expression": "!context.request.payload.roles.includes('admin') && !context.request.payload.roles.includes('compliance')",
  "type": "Expression"
}

Avoid these patterns:

AvoidReason
fetch, imports, network calls, or database callsConditions cannot call external systems.
DOM, browser APIs, timers, or process APIsPolicy evaluation is server-side.
Statements that require a blockThe field expects an expression. Prefer array methods and logical operators.
Missing optional-field checksUndefined nested paths can make condition evaluation fail.
Comparing large amounts as normal numbersJavaScript numbers can lose precision.

Workflow objects

A workflow is an ordered array of approval steps. Each step must be satisfied before the next step is active.

TypeShapeUse when
RoleQuorum{ "role": "operator", "quorum": 2, "type": "RoleQuorum" }A number of users with one role must approve.
And{ "left": {...}, "right": {...}, "type": "And" }Multiple approval groups are required in the same step.
Or{ "left": {...}, "right": {...}, "type": "Or" }Either approval group can satisfy the step.

Example workflow:

{
  "workflow": [
    {
      "role": "transaction-operator",
      "quorum": 1,
      "type": "RoleQuorum"
    },
    {
      "left": {
        "role": "compliance",
        "quorum": 1,
        "type": "RoleQuorum"
      },
      "right": {
        "role": "risk",
        "quorum": 1,
        "type": "RoleQuorum"
      },
      "type": "And"
    }
  ]
}

Workflow rules:

  • For user-signed proposals, the intent author counts as the first approval in the selected policy of the author's own domain.
  • For user-signed proposals, the submitter must have a role required by the first workflow step of that policy.
  • When the system selects policies in more than one domain, each user's decision counts only toward the policy of the user's own domain. See Approvals across domains.
  • For system-signed proposals, the service submitter does not count as a user approval. If a system-signed policy includes a workflow, user-signed approvers must satisfy it.
  • If quorum is not reached, the step remains open and users can change their decision. Once a step is executed, it cannot be changed.
  • A user can count only once in the complete approval workflow.
  • Duplicate approvals are checked at public-key level.
  • If a user has roles on both sides of an And or Or, the engine uses one approval on the quickest valid path.
  • RoleQuorum.quorum must be from 1 to 2000.
  • And and Or use left and right, not arrays.
  • An omitted or null workflow auto-approves a matching intent.
  • An empty workflow array rejects a matching intent.

Workflow examples

Operator followed by supervisor or supervisor bot

Step 1 is satisfied by the submitter with the operator role. Step 2 is satisfied by one supervisor or one supervisor-bot.

[
  {
    "role": "operator",
    "quorum": 1,
    "type": "RoleQuorum"
  },
  {
    "left": {
      "role": "supervisor",
      "quorum": 1,
      "type": "RoleQuorum"
    },
    "right": {
      "role": "supervisor-bot",
      "quorum": 1,
      "type": "RoleQuorum"
    },
    "type": "Or"
  }
]

Operator, compliance or risk alternatives, then CISO

Step 1 is satisfied by the submitter with the operator role. Step 2 requires compliance or compliance-bot approval and risk or risk-bot approval. Step 3 requires one ciso approval.

[
  {
    "role": "operator",
    "quorum": 1,
    "type": "RoleQuorum"
  },
  {
    "left": {
      "left": {
        "role": "compliance",
        "quorum": 1,
        "type": "RoleQuorum"
      },
      "right": {
        "role": "compliance-bot",
        "quorum": 1,
        "type": "RoleQuorum"
      },
      "type": "Or"
    },
    "right": {
      "left": {
        "role": "risk",
        "quorum": 1,
        "type": "RoleQuorum"
      },
      "right": {
        "role": "risk-bot",
        "quorum": 1,
        "type": "RoleQuorum"
      },
      "type": "Or"
    },
    "type": "And"
  },
  {
    "role": "ciso",
    "quorum": 1,
    "type": "RoleQuorum"
  }
]

UI policy builder mapping

The Create policy wizard in the UI builds a v0_CreatePolicy payload, and Edit policy builds a v0_UpdatePolicy payload. This section lists every option the wizard offers and the payload field it sets. For the procedure, see Create a policy in the UI.

Wizard stepFieldPayload fieldNotes
InformationPolicy namealiasRequired.
InformationDescriptiondescriptionOptional.
InformationScopescopeSelf, Descendants, or Self & descendants. Default Self.
InformationCustom propertiescustomPropertiesName-value pairs.
InformationInitial lock statuslockUnlocked or Locked. Default Unlocked. Shown only when you create a policy.
ConditionsIntent typesintentTypesAlways an explicit list. See Intent types in the UI.
ConditionsAdditional conditionsconditionSee Condition types in the UI. An empty editor sends null.
Evaluation orderImportance rankrank0-1000. Default 1.
Approval workflowWorkflow option and stepsworkflowSee Workflow options in the UI.
Not shownPolicy IDidGenerated.
Not shownScripting enginescriptingEngineAlways Javascript_v0.
Not shownIntent originintentOriginNever set. The UI creates user-signed policies only.
Editing an API-created policy in the UI

The UI update payload never includes intentOrigin and always lists intent types explicitly. If you edit a policy in the UI:

  • A policy with intentOrigin: "SystemSigned" becomes a user-signed policy and stops matching system-signed proposals.
  • A policy without intentTypes gets an explicit list of the intent types the UI offers, and stops matching the intent types that the UI doesn't offer.
  • The UI removes intent types that have no UI selector, such as v0_NotarizeData, from the policy. If the policy has no other intent types, the UI saves an empty list, so the policy matches nothing. The UI doesn't warn you, and the Review step shows 0 intent types.

The policy details page in the UI doesn't show intentOrigin. Check it with Get policy details. Update system-signed policies, catch-all policies, and policies that use intent types without a UI selector with the API.

Intent types in the UI

The Conditions step groups the selectable intent types by entity. Each selected item adds an entry to intentTypes, and you must select at least one. Select all intent types selects every item, and the UI still sends them as an explicit list. You can't create a policy without intentTypes in the UI. To create a catch-all policy, use the API.

UI groupAPI intent types
Transactions & Transfersv0_CreateTransactionOrder, v0_CreateTransferOrder, v0_AttemptTransactionOrderCancellation, v0_ReleaseQuarantinedTransfers
Endpointsv0_CreateEndpoint, v0_UpdateEndpoint, v0_LockEndpoint, v0_UnlockEndpoint
Policiesv0_CreatePolicy, v0_UpdatePolicy, v0_LockPolicy, v0_UnlockPolicy
Domainsv0_CreateDomain, v0_UpdateDomain, v0_UpdateDomainPermissions, v0_LockDomain, v0_UnlockDomain
Ledgersv0_CreateLedger, v0_UpdateLedger
Accountsv0_CreateAccount, v0_UpdateAccount, v0_AddAccountLedgers, v0_LockAccount, v0_UnlockAccount
Assetsv0_UpdateTicker, v0_ValidateTickers, v0_LockTicker, v0_UnlockTicker
Usersv0_CreateUser, v0_UpdateUser, v0_LockUser, v0_UnlockUser
Vaultsv0_CreateVault, v0_UpdateVault, v0_LockVault, v0_UnlockVault, v0_RewrapVaultKeyMaterial, v0_CreateBackup, v0_AcknowledgeBackup
Separate checkboxesv0_SignManifest (Sign Manifest), v0_ExecuteExtension (Execute Extension)

Item labels show the intent type name in sentence case and use Asset in place of Ticker. For example, v0_LockTicker is Lock asset and v0_ValidateTickers is Validate assets.

The following intent types have no UI selector. You can reference them in intentTypes only through the API: v0_CreateTicker, v0_NotarizeData, v0_RegisterTrustedPublicKey, v0_AddTrustedPublicKeysForMigration, v0_SetSystemProperty, and v0_MigrateSilo3AccountBatch.

Condition types in the UI

Under Additional conditions, select Create an additional condition to open the condition editor. Select an entry from Predefined conditions, enter its Value, and select Add condition + to insert the generated condition. If the editor already contains a condition, the UI combines the existing condition and the new one in an And node. The UI has no option to combine predefined conditions with Or. To use Or, or to write your own expression, edit the condition JSON in the editor directly.

The UI wraps predefined conditions that apply only to certain intent types in an And node with an intent type check, so the condition is false for other intent types. You enter values as text: you type IDs instead of picking them. For list values, separate the values with commas.

The author conditions generate the following expressions:

Predefined conditionGenerated expression
If intent author belongs to domaincontext.request.author.domainId == "<value>"
If intent author does not belong to domaincontext.request.author.domainId != "<value>"
If intent author iscontext.request.author.id == "<value>"
If intent author is notcontext.request.author.id != "<value>"

The other predefined conditions cover:

AreaPredefined conditions
UsersIf user with role is created or updated
PoliciesIf policy targets intent type, If policy scope is, If policy rank is greater than or equal to, If policy rank is less than or equal to
AccountsIf account ledger is, If account is in vault
TransactionsIf transaction amount is greater than or equal to, If transaction amount is less than or equal to, If transaction is sent from account, If transaction vault source is, If transaction destination endpoint is, If transaction destination address is, If transaction destination account is, If transaction destination is an account, If transaction is sent to endpoint which has a score that is greater than or equal to, If transaction is sent to endpoint which has a score that is less than or equal to, If transaction makes Ethereum contract call or has payload data
EndpointsIf endpoint ledger is, If endpoint trust score is greater than or equal to, If endpoint trust score is less than or equal to

Review the generated JSON in the editor before you continue. The transaction amount conditions compare the integer amount in the ledger's smallest unit.

Workflow options in the UI

The Approval workflow step offers three options that map to the workflow field:

UI optionResulting workflowBehavior
Approval workflow (recommended)Array with one entry per stepApprovers must satisfy each step in order.
Always approvenullThe system approves matching intents without user approvals.
Always rejectEmpty array []Matching intents are rejected without user intervention.

In an approval workflow step, each approval group becomes a RoleQuorum object, with Amount as quorum and the selected Role as role. The default amount is 1. Add condition + nests the groups of a step in an And or Or object, and Add step + appends another entry to the workflow array.

Review step fields

The Review step shows the policy before submission:

SectionFieldsPayload fields
Policy informationPolicy name, policy ID, description, evaluation order, scope, custom properties, lock statusalias, id, description, rank, scope, customProperties, lock
Intent typesSelected intent typesintentTypes
Additional conditionsCondition JSONcondition
Approval workflowOne entry per stepworkflow

Role rules

Role names used in users, read access, conditions, and workflows must match exactly.

ValidAvoid
policy-operatorPolicyOperator
transaction-operatortransaction_operator
complianceCompliance Team
platform-adminplatform admin

The API schema accepts role names that match [a-z0-9\-]+.

Minimal create-policy example

{
  "id": "c35fa005-1640-42ee-a8a5-c43aaae6eb87",
  "alias": "operator-approval",
  "rank": 100,
  "scope": "Self",
  "intentTypes": ["v0_CreateTransactionOrder"],
  "scriptingEngine": "Javascript_v0",
  "condition": {
    "expression": "context.references.users[context.request.author.id].roles.includes('transaction-operator')",
    "type": "Expression"
  },
  "workflow": [
    {
      "role": "transaction-operator",
      "quorum": 2,
      "type": "RoleQuorum"
    }
  ],
  "lock": "Unlocked",
  "description": "Requires transaction operator quorum.",
  "customProperties": {},
  "type": "v0_CreatePolicy"
}

Common mistakes

MistakeResultFix
Empty workflow: []Matching intents are rejected.Omit workflow or use null for auto-approval, or define approval steps.
Omitted intentTypes on a high-rank policyPolicy can match unexpectedly broad workflows.Specify intent types unless the policy is a deliberate fallback.
customProperties: nullPayload validation can fail.Use {} when empty.
Role names with uppercase, underscores, spaces, or paddingWorkflows cannot be satisfied by expected roles.Use lowercase hyphenated role names, such as policy-operator.
And or Or written as arraysPayload validation fails.Use left, right, and type.
Amount compared as a JavaScript numberPrecision loss or mismatched comparisons.Use BigInt(...) and n literals.
Missing optional-field checksCondition can fail for intent types with different payload shapes.Check existence before accessing nested fields.
Required quorum has too few usersIntent cannot be approved.Create enough users before deploying the policy.
First workflow step excludes maker role for a user-signed policyIntent fails at submission with NoApplicablePoliciesForDomain.Include the maker role in the first workflow step. For system-signed policies, make sure user approvers can satisfy the workflow.
Relying on a high-rank parent policy to replace a child-domain policyBoth policies apply. The child-domain workflow is still required, and a child reject-all still rejects.Ranks compete only within a domain. Design each domain's policies so that its own workflow is acceptable.
Relying on CoerceDescendants to protect child domains from weak child policiesThe strategy doesn't affect child-domain authors. Under either strategy, the system evaluates their intents in the parent and child domains.Give the parent policy Descendants or SelfAndDescendants scope.
No eligible policy in the author's domainIntent fails with NoApplicablePoliciesForDomain, even when the target domain has a matching policy.Give each domain whose users propose intents a policy that matches those intents.

For implementation patterns, see Policy examples.