{"templateId":"markdown","versions":[{"version":"v1.40","label":"v1.40 STS","link":"/products/custody/governance/policies/examples","default":true,"active":false,"folderId":"c15a2701"},{"version":"v1.39","label":"v1.39 STS","link":"/products/custody/v1.39/governance/policies/examples","default":false,"active":false,"folderId":"c15a2701"},{"version":"v1.38","label":"v1.38 STS","link":"/products/custody/v1.38/governance/policies/examples","default":false,"active":true,"folderId":"c15a2701"},{"version":"v1.34","label":"v1.34 LTS","link":"/products/custody/v1.34/governance/policies/examples","default":false,"active":false,"folderId":"c15a2701"},{"version":"v1.26","label":"v1.26 LTS","link":"/products/custody/v1.26/governance/policies/examples","default":false,"active":false,"folderId":"c15a2701"},{"version":"v1.19","label":"v1.19 LTS","link":"/products/custody/v1.19/governance/policies/examples","default":false,"active":false,"folderId":"c15a2701"},{"version":"v1.15","label":"v1.15 LTS","link":"/products/custody/v1.15/governance/policies/examples","default":false,"active":false,"folderId":"c15a2701"}],"sharedDataIds":{"sidebar":"sidebar-products/custody/@v1.15/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Policy examples","description":"User guides, API reference, and support resources.","siteUrl":"https://docs.ripple.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"policy-examples","__idx":0},"children":["Policy examples"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this page for reusable policy patterns and complete ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_CreatePolicy"]}," examples. For the concepts, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/v1.38/governance/policies"},"children":["Policies"]},". For launch design, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/v1.38/governance/genesis/design-your-policies"},"children":["Design your policies"]},". For field rules and JavaScript guidance, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/custody/v1.38/governance/policies/reference"},"children":["Policy reference"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The examples use representative roles, domains, ledgers, thresholds, and UUIDs. Before publication or deployment, validate the payloads against your live environment, especially account, endpoint, ledger, and custom property paths."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"catalog","__idx":1},"children":["Catalog"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Pattern"},"children":["Pattern"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Type"},"children":["Type"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Goal"},"children":["Goal"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Intent types"},"children":["Intent types"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Condition"},"children":["Condition"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Workflow"},"children":["Workflow"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"When to use"},"children":["When to use"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Maker-checker"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Approval pattern"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Require independent review."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Any sensitive intent type."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Usually author role or target operation."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Maker role first, checker role second."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Routine operations that need a second human review."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Quorum"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Approval pattern"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Require multiple approvals from one role."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Lock, unlock, policy, domain, recovery."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Usually broad or high-risk."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["RoleQuorum"]}," with quorum greater than 1."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Sensitive actions controlled by one team."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Multi-step approval"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Approval pattern"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Escalate approval in sequence."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Transfers, policy changes, high-risk administration."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Amount, risk, domain, operation type."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ordered workflow steps."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Later approvers should only act after earlier review."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["And approval"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Approval pattern"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Require multiple groups in one step."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Transfers, exceptions, compliance, policy changes."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Any business condition."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["And"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["left"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["right"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Two teams must both approve."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Or approval"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Approval pattern"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Allow alternative approver groups."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Transfers, operational routing, backup operations."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Any business condition."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Or"]}," with ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["left"]}," and ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["right"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Human or bot, regional alternatives, backup approvers."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Amount threshold"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Condition pattern"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Change approval by value."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_CreateTransactionOrder"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["BigInt(...)"]}," amount comparison."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Tiered approval."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["High-value outgoing transfers."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Trusted endpoint"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Condition pattern"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Treat known destinations differently."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_CreateTransactionOrder"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Destination is endpoint and trust score is high enough."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Lower or automated maker workflow."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Trusted address workflows."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["System-signed service proposal"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Automation pattern"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Allow a service caller to submit a narrow set of API proposals without a client-side payload signature."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Usually ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_CreateTransactionOrder"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_CreateTransferOrder"]},", or another explicitly selected type."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Service submitter role or subject."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Null workflow for deliberate auto-approval, or user approval workflow."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["API-only automation where the deployment supports system-signed intents."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Smart contract endpoint"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Condition pattern"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Escalate smart contract endpoint creation."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_CreateEndpoint"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Endpoint parameters exist."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["System operator plus compliance."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Contract addresses require extra review."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["User management"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Operation policy"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Govern user lifecycle changes."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_CreateUser"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_UpdateUser"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_LockUser"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_UnlockUser"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Requester role or target role assignment."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["User admin, security, compliance."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Creating users or changing user role assignments."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Policy management"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Operation policy"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Govern policy lifecycle changes."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_CreatePolicy"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_UpdatePolicy"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_LockPolicy"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_UnlockPolicy"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Policy operator author role."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Policy operator plus compliance."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Any change to governance rules."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Account management"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Operation policy"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Govern account lifecycle changes."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_CreateAccount"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_UpdateAccount"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_LockAccount"]},", ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_UnlockAccount"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["System operator author role."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["System operator plus compliance."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Account setup and maintenance."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Quarantine release"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Operation policy"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Govern release of quarantined funds."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["v0_ReleaseQuarantinedTransfers"]},"."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Compliance or system operator role."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Compliance quorum."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["AML and screening workflows."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Fallback"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Operation policy"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Catch unmatched legitimate workflows."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Omit ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intentTypes"]}," intentionally."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Maker role or true fallback condition."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Low-rank, high-control workflow."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Exceptions not handled by specific policies."]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"user-management","__idx":2},"children":["User management"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this policy for user creation, user role-assignment changes, locking, and unlocking."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"8925d558-d8d7-47d6-b789-92c49d6d66f6\",\n  \"alias\": \"user-management\",\n  \"rank\": 300,\n  \"scope\": \"SelfAndDescendants\",\n  \"intentTypes\": [\n    \"v0_CreateUser\",\n    \"v0_UpdateUser\",\n    \"v0_LockUser\",\n    \"v0_UnlockUser\"\n  ],\n  \"scriptingEngine\": \"Javascript_v0\",\n  \"condition\": {\n    \"expression\": \"context.references.users[context.request.author.id].roles.includes('system-operator')\",\n    \"type\": \"Expression\"\n  },\n  \"workflow\": [\n    {\n      \"role\": \"system-operator\",\n      \"quorum\": 2,\n      \"type\": \"RoleQuorum\"\n    }\n  ],\n  \"lock\": \"Unlocked\",\n  \"description\": \"Controls user lifecycle operations.\",\n  \"customProperties\": {},\n  \"type\": \"v0_CreatePolicy\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"account-management","__idx":3},"children":["Account management"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this policy for account creation, account updates, locking, and unlocking."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"a13678a6-5f8c-4f85-8657-27f58933bffc\",\n  \"alias\": \"account-management\",\n  \"rank\": 320,\n  \"scope\": \"SelfAndDescendants\",\n  \"intentTypes\": [\n    \"v0_CreateAccount\",\n    \"v0_UpdateAccount\",\n    \"v0_LockAccount\",\n    \"v0_UnlockAccount\"\n  ],\n  \"scriptingEngine\": \"Javascript_v0\",\n  \"condition\": {\n    \"expression\": \"context.references.users[context.request.author.id].roles.includes('system-operator')\",\n    \"type\": \"Expression\"\n  },\n  \"workflow\": [\n    {\n      \"left\": {\n        \"role\": \"system-operator\",\n        \"quorum\": 2,\n        \"type\": \"RoleQuorum\"\n      },\n      \"right\": {\n        \"role\": \"compliance\",\n        \"quorum\": 1,\n        \"type\": \"RoleQuorum\"\n      },\n      \"type\": \"And\"\n    }\n  ],\n  \"lock\": \"Unlocked\",\n  \"description\": \"Controls account lifecycle operations.\",\n  \"customProperties\": {},\n  \"type\": \"v0_CreatePolicy\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"endpoint-management","__idx":4},"children":["Endpoint management"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"18b187ad-9d2e-4e84-9ce8-0063bfe8d8da\",\n  \"alias\": \"endpoint-management\",\n  \"rank\": 300,\n  \"scope\": \"SelfAndDescendants\",\n  \"intentTypes\": [\n    \"v0_CreateEndpoint\",\n    \"v0_UpdateEndpoint\",\n    \"v0_LockEndpoint\",\n    \"v0_UnlockEndpoint\"\n  ],\n  \"scriptingEngine\": \"Javascript_v0\",\n  \"condition\": {\n    \"expression\": \"context.references.users[context.request.author.id].roles.includes('system-operator')\",\n    \"type\": \"Expression\"\n  },\n  \"workflow\": [\n    {\n      \"role\": \"system-operator\",\n      \"quorum\": 2,\n      \"type\": \"RoleQuorum\"\n    }\n  ],\n  \"lock\": \"Unlocked\",\n  \"description\": \"Controls endpoint lifecycle operations.\",\n  \"customProperties\": {},\n  \"type\": \"v0_CreatePolicy\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"smart-contract-endpoint-escalation","__idx":5},"children":["Smart contract endpoint escalation"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this higher-rank policy to catch smart contract endpoint creation before the generic endpoint-management policy."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"ba4d7753-2756-4080-8d7b-9f6699f70ada\",\n  \"alias\": \"smart-contract-endpoint\",\n  \"rank\": 450,\n  \"scope\": \"SelfAndDescendants\",\n  \"intentTypes\": [\"v0_CreateEndpoint\"],\n  \"scriptingEngine\": \"Javascript_v0\",\n  \"condition\": {\n    \"expression\": \"context.references.users[context.request.author.id].roles.includes('system-operator') && context.request.payload.hasOwnProperty('parameters') && context.request.payload.parameters != null\",\n    \"type\": \"Expression\"\n  },\n  \"workflow\": [\n    {\n      \"role\": \"system-operator\",\n      \"quorum\": 2,\n      \"type\": \"RoleQuorum\"\n    },\n    {\n      \"role\": \"compliance\",\n      \"quorum\": 1,\n      \"type\": \"RoleQuorum\"\n    }\n  ],\n  \"lock\": \"Unlocked\",\n  \"description\": \"Escalates smart contract endpoint creation.\",\n  \"customProperties\": {},\n  \"type\": \"v0_CreatePolicy\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"policy-management","__idx":6},"children":["Policy management"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this policy to govern creation, update, lock, and unlock operations for other policies."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"5b440ba5-d013-11eb-8cd0-dcfb48cfb3cb\",\n  \"alias\": \"policy-governance\",\n  \"rank\": 700,\n  \"scope\": \"Self\",\n  \"intentTypes\": [\n    \"v0_CreatePolicy\",\n    \"v0_UpdatePolicy\",\n    \"v0_LockPolicy\",\n    \"v0_UnlockPolicy\"\n  ],\n  \"scriptingEngine\": \"Javascript_v0\",\n  \"condition\": {\n    \"expression\": \"context.references.users[context.request.author.id].roles.includes('policy-operator')\",\n    \"type\": \"Expression\"\n  },\n  \"workflow\": [\n    {\n      \"left\": {\n        \"role\": \"policy-operator\",\n        \"quorum\": 2,\n        \"type\": \"RoleQuorum\"\n      },\n      \"right\": {\n        \"role\": \"compliance\",\n        \"quorum\": 2,\n        \"type\": \"RoleQuorum\"\n      },\n      \"type\": \"And\"\n    }\n  ],\n  \"lock\": \"Unlocked\",\n  \"description\": \"Controls policy lifecycle operations.\",\n  \"customProperties\": {},\n  \"type\": \"v0_CreatePolicy\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"unknown-address-transfer","__idx":7},"children":["Unknown address transfer"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this policy to escalate outgoing transaction orders to an unknown address. The condition checks that the destination field exists before reading it."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"074fb6c8-f433-4f76-95f0-e01934486b73\",\n  \"alias\": \"unknown-address-transfer\",\n  \"rank\": 420,\n  \"scope\": \"Self\",\n  \"intentTypes\": [\"v0_CreateTransactionOrder\"],\n  \"scriptingEngine\": \"Javascript_v0\",\n  \"condition\": {\n    \"expression\": \"context.references.users[context.request.author.id].roles.includes('transaction-operator') && context.request.payload.hasOwnProperty('parameters') && context.request.payload.parameters != null && context.request.payload.parameters.hasOwnProperty('destination') && context.request.payload.parameters.destination.type == 'Address'\",\n    \"type\": \"Expression\"\n  },\n  \"workflow\": [\n    {\n      \"left\": {\n        \"role\": \"transaction-operator\",\n        \"quorum\": 2,\n        \"type\": \"RoleQuorum\"\n      },\n      \"right\": {\n        \"role\": \"compliance\",\n        \"quorum\": 2,\n        \"type\": \"RoleQuorum\"\n      },\n      \"type\": \"And\"\n    }\n  ],\n  \"lock\": \"Unlocked\",\n  \"description\": \"Escalates outgoing transfers to unknown addresses.\",\n  \"customProperties\": {},\n  \"type\": \"v0_CreatePolicy\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"trusted-endpoint-transfer","__idx":8},"children":["Trusted endpoint transfer"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this policy for trusted endpoint destinations. Keep the rank lower than high-risk transfer policies so thresholds and compliance overrides can still win."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"db8c31d5-26e6-4c46-8643-1cbe03019a1a\",\n  \"alias\": \"trusted-endpoint-transfer\",\n  \"rank\": 250,\n  \"scope\": \"Self\",\n  \"intentTypes\": [\"v0_CreateTransactionOrder\"],\n  \"scriptingEngine\": \"Javascript_v0\",\n  \"condition\": {\n    \"expression\": \"(context.references.users[context.request.author.id].roles.includes('transaction-operator') || context.references.users[context.request.author.id].roles.includes('transaction-operator-bot')) && context.request.payload.hasOwnProperty('parameters') && context.request.payload.parameters != null && context.request.payload.parameters.hasOwnProperty('destination') && context.request.payload.parameters.destination.type == 'Endpoint' && context.references.endpoints[context.request.payload.parameters.destination.endpointId].trustScore >= 75\",\n    \"type\": \"Expression\"\n  },\n  \"workflow\": [\n    {\n      \"left\": {\n        \"role\": \"transaction-operator\",\n        \"quorum\": 1,\n        \"type\": \"RoleQuorum\"\n      },\n      \"right\": {\n        \"role\": \"transaction-operator-bot\",\n        \"quorum\": 1,\n        \"type\": \"RoleQuorum\"\n      },\n      \"type\": \"Or\"\n    },\n    {\n      \"left\": {\n        \"role\": \"transaction-operator\",\n        \"quorum\": 1,\n        \"type\": \"RoleQuorum\"\n      },\n      \"right\": {\n        \"role\": \"transaction-operator-bot\",\n        \"quorum\": 1,\n        \"type\": \"RoleQuorum\"\n      },\n      \"type\": \"Or\"\n    }\n  ],\n  \"lock\": \"Unlocked\",\n  \"description\": \"Allows trusted endpoint transfer workflow.\",\n  \"customProperties\": {},\n  \"type\": \"v0_CreatePolicy\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"system-signed-gas-station-proposal","__idx":9},"children":["System-signed Gas Station proposal"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this pattern when a service caller should submit a narrow set of API proposals without managing a user private key. This example allows service callers whose token includes the ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["gas-station-service"]}," custody role to submit transaction order proposals. The policy does not match user-signed proposals."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"af1d2e33-9a94-4456-bcb3-895bba820d38\",\n  \"alias\": \"gas-station-system-signed\",\n  \"rank\": 420,\n  \"scope\": \"SelfAndDescendants\",\n  \"intentTypes\": [\"v0_CreateTransactionOrder\"],\n  \"intentOrigin\": \"SystemSigned\",\n  \"scriptingEngine\": \"Javascript_v0\",\n  \"condition\": {\n    \"expression\": \"context.submitter.type === 'Service' && context.submitter.custodyRoles.includes('gas-station-service')\",\n    \"type\": \"Expression\"\n  },\n  \"lock\": \"Unlocked\",\n  \"description\": \"Allows Gas Station service-submitted transaction orders.\",\n  \"customProperties\": {},\n  \"type\": \"v0_CreatePolicy\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Omit ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["workflow"]}," only when automatic execution is intentional. If the policy includes a workflow, user-signed approvers complete the approval steps."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"large-ethereum-transfer","__idx":10},"children":["Large Ethereum transfer"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this policy to require compliance approval for Ethereum transaction orders above 5 ETH."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"0efa137d-5f59-4d3e-b720-06185c48ebbe\",\n  \"alias\": \"large-ethereum-transfer\",\n  \"rank\": 500,\n  \"scope\": \"Self\",\n  \"intentTypes\": [\"v0_CreateTransactionOrder\"],\n  \"scriptingEngine\": \"Javascript_v0\",\n  \"condition\": {\n    \"expression\": \"context.references.users[context.request.author.id].roles.includes('transaction-operator') && context.references.accounts[context.request.payload.accountId].ledgerId == 'ethereum-testnet' && context.request.payload.hasOwnProperty('parameters') && context.request.payload.parameters != null && context.request.payload.parameters.hasOwnProperty('amount') && BigInt(context.request.payload.parameters.amount) >= 5000000000000000000n\",\n    \"type\": \"Expression\"\n  },\n  \"workflow\": [\n    {\n      \"left\": {\n        \"role\": \"transaction-operator\",\n        \"quorum\": 1,\n        \"type\": \"RoleQuorum\"\n      },\n      \"right\": {\n        \"role\": \"compliance\",\n        \"quorum\": 2,\n        \"type\": \"RoleQuorum\"\n      },\n      \"type\": \"And\"\n    }\n  ],\n  \"lock\": \"Unlocked\",\n  \"description\": \"Escalates Ethereum transfers above 5 ETH.\",\n  \"customProperties\": {},\n  \"type\": \"v0_CreatePolicy\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"large-bitcoin-transfer","__idx":11},"children":["Large Bitcoin transfer"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this policy to sum Bitcoin outputs and require compliance approval above 5 BTC."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"4e9cc80b-e4d7-4be8-9940-a1eb0b2e1484\",\n  \"alias\": \"large-bitcoin-transfer\",\n  \"rank\": 500,\n  \"scope\": \"Self\",\n  \"intentTypes\": [\"v0_CreateTransactionOrder\"],\n  \"scriptingEngine\": \"Javascript_v0\",\n  \"condition\": {\n    \"expression\": \"context.references.users[context.request.author.id].roles.includes('transaction-operator') && context.references.accounts[context.request.payload.accountId].ledgerId == 'bitcoin-testnet' && context.request.payload.hasOwnProperty('parameters') && context.request.payload.parameters != null && context.request.payload.parameters.hasOwnProperty('outputs') && context.request.payload.parameters.outputs.reduce((sum, output) => sum + BigInt(output.amount), 0n) >= 500000000n\",\n    \"type\": \"Expression\"\n  },\n  \"workflow\": [\n    {\n      \"left\": {\n        \"role\": \"transaction-operator\",\n        \"quorum\": 1,\n        \"type\": \"RoleQuorum\"\n      },\n      \"right\": {\n        \"role\": \"compliance\",\n        \"quorum\": 2,\n        \"type\": \"RoleQuorum\"\n      },\n      \"type\": \"And\"\n    }\n  ],\n  \"lock\": \"Unlocked\",\n  \"description\": \"Escalates Bitcoin transfers above 5 BTC.\",\n  \"customProperties\": {},\n  \"type\": \"v0_CreatePolicy\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"quarantine-release","__idx":12},"children":["Quarantine release"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use this policy for incoming funds that must stay quarantined until compliance releases them."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"2431fbf2-69c1-4d74-b99a-a7ebf7bf5097\",\n  \"alias\": \"quarantine-release\",\n  \"rank\": 400,\n  \"scope\": \"SelfAndDescendants\",\n  \"intentTypes\": [\"v0_ReleaseQuarantinedTransfers\"],\n  \"scriptingEngine\": \"Javascript_v0\",\n  \"condition\": {\n    \"expression\": \"context.references.users[context.request.author.id].roles.includes('system-operator')\",\n    \"type\": \"Expression\"\n  },\n  \"workflow\": [\n    {\n      \"left\": {\n        \"role\": \"system-operator\",\n        \"quorum\": 1,\n        \"type\": \"RoleQuorum\"\n      },\n      \"right\": {\n        \"role\": \"compliance\",\n        \"quorum\": 1,\n        \"type\": \"RoleQuorum\"\n      },\n      \"type\": \"And\"\n    }\n  ],\n  \"lock\": \"Unlocked\",\n  \"description\": \"Requires compliance approval for quarantine release.\",\n  \"customProperties\": {},\n  \"type\": \"v0_CreatePolicy\"\n}\n","lang":"json"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"catch-all-fallback","__idx":13},"children":["Catch-all fallback"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Use fallback policies with low rank and strong approval. They should catch exceptions, not replace specific policies. This example intentionally omits ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["intentTypes"]}," so it can match any intent type after more specific policies fail to match."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"json","header":{"controls":{"copy":{}}},"source":"{\n  \"id\": \"ed6a0b68-d18c-4d14-8ad6-0e9e595fa0d6\",\n  \"alias\": \"fallback-governance\",\n  \"rank\": 10,\n  \"scope\": \"SelfAndDescendants\",\n  \"scriptingEngine\": \"Javascript_v0\",\n  \"condition\": {\n    \"expression\": \"context.references.users[context.request.author.id].roles.includes('system-operator') || context.references.users[context.request.author.id].roles.includes('policy-operator') || context.references.users[context.request.author.id].roles.includes('transaction-operator')\",\n    \"type\": \"Expression\"\n  },\n  \"workflow\": [\n    {\n      \"left\": {\n        \"left\": {\n          \"role\": \"system-operator\",\n          \"quorum\": 1,\n          \"type\": \"RoleQuorum\"\n        },\n        \"right\": {\n          \"role\": \"policy-operator\",\n          \"quorum\": 1,\n          \"type\": \"RoleQuorum\"\n        },\n        \"type\": \"Or\"\n      },\n      \"right\": {\n        \"role\": \"transaction-operator\",\n        \"quorum\": 1,\n        \"type\": \"RoleQuorum\"\n      },\n      \"type\": \"Or\"\n    },\n    {\n      \"role\": \"compliance\",\n      \"quorum\": 2,\n      \"type\": \"RoleQuorum\"\n    }\n  ],\n  \"lock\": \"Unlocked\",\n  \"description\": \"Low-rank fallback for unexpected governed workflows.\",\n  \"customProperties\": {},\n  \"type\": \"v0_CreatePolicy\"\n}\n","lang":"json"},"children":[]}]},"headings":[{"value":"Policy examples","id":"policy-examples","depth":1},{"value":"Catalog","id":"catalog","depth":2},{"value":"User management","id":"user-management","depth":2},{"value":"Account management","id":"account-management","depth":2},{"value":"Endpoint management","id":"endpoint-management","depth":2},{"value":"Smart contract endpoint escalation","id":"smart-contract-endpoint-escalation","depth":2},{"value":"Policy management","id":"policy-management","depth":2},{"value":"Unknown address transfer","id":"unknown-address-transfer","depth":2},{"value":"Trusted endpoint transfer","id":"trusted-endpoint-transfer","depth":2},{"value":"System-signed Gas Station proposal","id":"system-signed-gas-station-proposal","depth":2},{"value":"Large Ethereum transfer","id":"large-ethereum-transfer","depth":2},{"value":"Large Bitcoin transfer","id":"large-bitcoin-transfer","depth":2},{"value":"Quarantine release","id":"quarantine-release","depth":2},{"value":"Catch-all fallback","id":"catch-all-fallback","depth":2}],"frontmatter":{"seo":{"title":"Policy examples"}},"lastModified":"2026-07-27T10:10:43.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/custody/v1.38/governance/policies/examples","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}