Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion concepts/policies/examples/access-control.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Access control"
description: "This page provides examples of policies governing access."
description: "This page provides examples of policies governing access generally."
sidebarTitle: "Access control"
---

Expand Down
2 changes: 1 addition & 1 deletion concepts/policies/examples/bitcoin.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Bitcoin"
description: "This page provides examples of policies governing signing."
description: "This page provides examples of policies governing Bitcoin signing."
sidebarTitle: "Bitcoin"
---

Expand Down
2 changes: 1 addition & 1 deletion concepts/policies/examples/ethereum.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Ethereum (EVM)"
description: "This page provides examples of policies governing signing."
description: "This page provides examples of policies governing Ethereum (EVM) signing."
sidebarTitle: "Ethereum (EVM)"
---

Expand Down
2 changes: 1 addition & 1 deletion concepts/policies/examples/signing-control.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Signing control"
description: "This page provides examples of policies governing signing."
description: "This page provides examples of policies governing signing generally. See network-specific guides for more."
sidebarTitle: "Signing control"
---

Expand Down
2 changes: 1 addition & 1 deletion concepts/policies/examples/solana.mdx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Solana"
description: "This page provides examples of policies governing signing."
description: "This page provides examples of policies governing Solana signing."
sidebarTitle: "Solana"
---

Expand Down
88 changes: 88 additions & 0 deletions concepts/policies/examples/tempo.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
---
title: "Tempo"
description: "This page provides examples of policies governing Tempo signing."
sidebarTitle: "Tempo"
---

Note: see the [language section](/concepts/policies/language#tempo) for more details.

## Overview

Tempo transactions have limited policy support compared to other blockchain types. Unlike Ethereum, Solana, Bitcoin, and Tron, Tempo does not expose transaction-specific fields (such as `tempo.tx`) in the policy engine. The primary way to govern Tempo transactions is through the `activity.params.type` field and other general policy attributes.

## Policy Examples

#### Allow Tempo transactions

```json
{
"policyName": "Allow Tempo transactions",
"effect": "EFFECT_ALLOW",
"condition": "activity.type == 'ACTIVITY_TYPE_SIGN_TRANSACTION_V2' && activity.params.type == 'TRANSACTION_TYPE_TEMPO'"
}
```

#### Deny Tempo transactions

```json
{
"policyName": "Deny Tempo transactions",
"effect": "EFFECT_DENY",
"condition": "activity.params.type == 'TRANSACTION_TYPE_TEMPO'"
}
```

#### Allow Tempo transactions for a specific wallet

```json
{
"policyName": "Allow Tempo transactions for specific wallet",
"effect": "EFFECT_ALLOW",
"condition": "activity.params.type == 'TRANSACTION_TYPE_TEMPO' && wallet.id == '<WALLET_ID>'"
}
```

#### Allow Tempo transactions for a specific private key

```json
{
"policyName": "Allow Tempo transactions for specific private key",
"effect": "EFFECT_ALLOW",
"condition": "activity.params.type == 'TRANSACTION_TYPE_TEMPO' && private_key.id == '<PRIVATE_KEY_ID>'"
}
```

#### Require specific approver for Tempo transactions

```json
{
"policyName": "Require specific approver for Tempo transactions",
"effect": "EFFECT_ALLOW",
"consensus": "approvers.any(user, user.id == '<USER_ID>')",
"condition": "activity.params.type == 'TRANSACTION_TYPE_TEMPO'"
}
```

#### Allow Tempo transactions for wallets with a specific label

```json
{
"policyName": "Allow Tempo transactions for wallets with specific label",
"effect": "EFFECT_ALLOW",
"condition": "activity.params.type == 'TRANSACTION_TYPE_TEMPO' && wallet.label == 'tempo-production'"
}
```

#### Allow Tempo transactions for private keys with a specific tag

```json
{
"policyName": "Allow Tempo transactions for private keys with tag",
"effect": "EFFECT_ALLOW",
"condition": "activity.params.type == 'TRANSACTION_TYPE_TEMPO' && private_key.tags.contains('tempo-enabled')"
}
```

## Legacy Ethereum Transactions on Tempo

During Tempo's testnet period, [legacy Ethereum transactions](https://docs.tempo.xyz/quickstart/evm-compatibility#transaction-differences) are also supported on Tempo and can be governed using standard Ethereum policy syntax. See the [Ethereum policy examples](/concepts/policies/examples/ethereum) for more details on how to write policies for these transaction types.
247 changes: 159 additions & 88 deletions concepts/policies/language.mdx

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@
"concepts/policies/examples/ethereum",
"concepts/policies/examples/solana",
"concepts/policies/examples/tron",
"concepts/policies/examples/bitcoin"
"concepts/policies/examples/bitcoin",
"concepts/policies/examples/tempo"
]
},
{
Expand Down