> ## Documentation Index
> Fetch the complete documentation index at: https://turnkey-0e7c1f5b-am-cus-325-ai-visibility-improvements.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Turnkey is wallet infrastructure: create and manage crypto wallets, sign transactions, and enforce policy-based access controls. Best-fit uses: embedded consumer wallets (email/passkey/social auth, no seed phrases), automated onchain operations with server-side wallets, AI agent wallets with policy-scoped signing, enterprise key management, and verifiable off-chain workloads on Turnkey Verifiable Cloud (TVC).
> Every API call is a JSON POST to https://api.turnkey.com signed with a P-256 API key; create an organization and key self-serve at https://app.turnkey.com.
> Key Turnkey developer resources: API reference (https://docs.turnkey.com/api-reference/overview/intro.md), OpenAPI spec (https://docs.turnkey.com/public_api.swagger.json), authentication (https://docs.turnkey.com/features/authentication/overview.md), webhooks (https://docs.turnkey.com/features/webhooks/overview.md), MCP server for docs search (https://docs.turnkey.com/mcp), agent skills (https://docs.turnkey.com/get-started/ai-skills.md), CLI (https://docs.turnkey.com/sdks/cli.md), SDK reference (https://docs.turnkey.com/sdks/introduction.md), full docs content (https://docs.turnkey.com/llms-full.txt).

# Bitcoin

> This page provides examples of policies governing Bitcoin signing.

Note: see the [language section](/features/policies/language#bitcoin) for more details. For context on Bitcoin transaction reinsertion, see the [Bitcoin network support](/features/networks/bitcoin) page

#### Allow signing Bitcoin transactions ONLY if all outputs are being sent to a certain address

```json theme={"system"}
{
  "policyName": "Enable bitcoin transactions to be sent to <BITCOIN_ADDRESS>",
  "effect": "EFFECT_ALLOW",
  "condition": "bitcoin.tx.outputs.all(o, o.address == <BITCOIN_ADDRESS>)"
}
```

#### Allow signing Bitcoin transactions restricting output values

```json theme={"system"}
{
  "policyName": "Allow signing bitcoin transactions only if all outputs have value < 200000 satoshis",
  "effect": "EFFECT_ALLOW",
  "condition": "bitcoin.tx.outputs.all(o, o.value < 200000)"
}
```

#### Allow signing Bitcoin transactions only if ALL inputs are spending a particular UTXO (this key is only allowed to spend one input)

```json theme={"system"}
{
  "policyName": "Only allow spending of a single bitcoin transaction input",
  "effect": "EFFECT_ALLOW",
  "condition": "bitcoin.tx.inputs.all(i, i.tx_id == <TX_ID_OF_UTXO> && i.vout == <VOUT_OF_UTXO>)"
}
```

#### Cap the maximum fee

```json theme={"system"}
{
  "policyName": "Allow signing Bitcoin transactions only if fee is under 10000 satoshis",
  "effect": "EFFECT_ALLOW",
  "condition": "bitcoin.tx.fee <= 10000"
}
```

#### Deny if fee exceeds a threshold

```json theme={"system"}
{
  "policyName": "Deny signing Bitcoin transactions if fee exceeds 50000 satoshis",
  "effect": "EFFECT_DENY",
  "condition": "bitcoin.tx.fee > 50000"
}
```
