> ## Documentation Index
> Fetch the complete documentation index at: https://new-docs.squads.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Time Locks Reference

## Overview

A time lock is a feature where a transaction is frozen for a specified period after reaching the ready-to-execute threshold. This provides a security buffer allowing members to review and potentially cancel transactions before execution.

## How Time Locks Work

1. Transaction reaches approval threshold
2. Time lock period begins
3. Transaction cannot be executed during the lock period
4. After the lock period expires, transaction can be executed
5. During the lock period, members can cancel the transaction if needed

## Setting a Time Lock

Use a Config Transaction to set or modify the time lock:

```typescript theme={null}
await multisig.rpc.configTransactionCreate({
    connection,
    feePayer: members.proposer,
    multisigPda: autonomousMultisigPda,
    transactionIndex,
    creator: members.proposer.publicKey,
    // Set a new 1 hour time-lock
    actions: [{
        __kind: "SetTimeLock",
        newTimeLock: 60 * 60
    }],
});
```

## Time Lock Values

The `timeLock` parameter is specified in seconds:

| Duration | Seconds |
| - | - |
| No lock | 0 |
| 1 hour | 3600 |
| 24 hours | 86400 |
| 1 week | 604800 |
| Maximum (90 days) | 7776000 |

### Common Configurations

```typescript theme={null}
// 1 hour time lock
actions: [{ __kind: "SetTimeLock", newTimeLock: 60 * 60 }]

// 24 hour time lock
actions: [{ __kind: "SetTimeLock", newTimeLock: 24 * 60 * 60 }]

// 1 week time lock
actions: [{ __kind: "SetTimeLock", newTimeLock: 7 * 24 * 60 * 60 }]

// Remove time lock
actions: [{ __kind: "SetTimeLock", newTimeLock: 0 }]
```

## Use Cases

* **Security**: Provide time for members to review approved transactions
* **Governance**: Allow stakeholders to raise objections before execution
* **Compliance**: Meet regulatory requirements for delayed execution
* **Emergency Override**: Time to cancel compromised or erroneous transactions

## Error Handling

| Error | Cause | Solution |
| - | - | - |
| Time lock active | Attempting to execute before lock expires | Wait for time lock to expire |
| Execution failed | Time lock is blocking execution | Check `time_lock` field in multisig account |

## See Also

* [Create Config Transaction](/developers/typescript-sdk/instructions/create-config-transaction)
* [Execute Vault Transaction](/developers/typescript-sdk/instructions/execute-vault-transaction)
* [Multisig Account](/developers/reference/accounts#multisig)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.